mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-26 04:12:34 +01:00
- [EMU] added LINE_F3 and LINE_F4 drawing
This commit is contained in:
parent
295018a47a
commit
fec76bcfa4
@ -854,34 +854,93 @@ int ParsePrimitive(uintptr_t primPtr)
|
||||
case 0x48: // TODO (unused)
|
||||
{
|
||||
LINE_F3* poly = (LINE_F3*)pTag;
|
||||
/*
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
AddSplit(POLY_TYPE_LINES, semi_transparent, activeDrawEnv.tpage, whiteTexture);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
//First line
|
||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x0, &poly->x1, NULL, NULL);
|
||||
Emulator_GenerateColourArrayQuad(&g_vertexBuffer[g_vertexIndex], &poly->r0, NULL, NULL, NULL);
|
||||
g_vertexIndex += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Second line
|
||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x1, &poly->x2, NULL, NULL);
|
||||
Emulator_GenerateColourArrayQuad(&g_vertexBuffer[g_vertexIndex], &poly->r0, NULL, NULL, NULL);
|
||||
g_vertexIndex += 2;
|
||||
}
|
||||
#if defined(DEBUG_POLY_COUNT)
|
||||
polygon_count++;
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
AddSplit(semi_transparent, activeDrawEnv.tpage, whiteTexture);
|
||||
|
||||
{
|
||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x0, &poly->x1);
|
||||
Emulator_GenerateTexcoordArrayLineZero(&g_vertexBuffer[g_vertexIndex], 0);
|
||||
Emulator_GenerateColourArrayLine(&g_vertexBuffer[g_vertexIndex], &poly->r0, &poly->r0);
|
||||
|
||||
MakeTriangle();
|
||||
|
||||
g_vertexIndex += 6;
|
||||
#if defined(DEBUG_POLY_COUNT)
|
||||
polygon_count++;
|
||||
#endif
|
||||
}
|
||||
|
||||
{
|
||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x1, &poly->x2);
|
||||
Emulator_GenerateTexcoordArrayLineZero(&g_vertexBuffer[g_vertexIndex], 0);
|
||||
Emulator_GenerateColourArrayLine(&g_vertexBuffer[g_vertexIndex], &poly->r0, &poly->r0);
|
||||
|
||||
MakeTriangle();
|
||||
|
||||
g_vertexIndex += 6;
|
||||
#if defined(DEBUG_POLY_COUNT)
|
||||
polygon_count++;
|
||||
#endif
|
||||
}
|
||||
|
||||
primitive_size = sizeof(LINE_F3);
|
||||
break;
|
||||
}
|
||||
case 0x4c:
|
||||
{
|
||||
LINE_F4* poly = (LINE_F4*)pTag;
|
||||
|
||||
AddSplit(semi_transparent, activeDrawEnv.tpage, whiteTexture);
|
||||
|
||||
{
|
||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x0, &poly->x1);
|
||||
Emulator_GenerateTexcoordArrayLineZero(&g_vertexBuffer[g_vertexIndex], 0);
|
||||
Emulator_GenerateColourArrayLine(&g_vertexBuffer[g_vertexIndex], &poly->r0, &poly->r0);
|
||||
|
||||
MakeTriangle();
|
||||
|
||||
g_vertexIndex += 6;
|
||||
#if defined(DEBUG_POLY_COUNT)
|
||||
polygon_count++;
|
||||
#endif
|
||||
}
|
||||
|
||||
{
|
||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x1, &poly->x2);
|
||||
Emulator_GenerateTexcoordArrayLineZero(&g_vertexBuffer[g_vertexIndex], 0);
|
||||
Emulator_GenerateColourArrayLine(&g_vertexBuffer[g_vertexIndex], &poly->r0, &poly->r0);
|
||||
|
||||
MakeTriangle();
|
||||
|
||||
g_vertexIndex += 6;
|
||||
#if defined(DEBUG_POLY_COUNT)
|
||||
polygon_count++;
|
||||
#endif
|
||||
}
|
||||
|
||||
{
|
||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x2, &poly->x3);
|
||||
Emulator_GenerateTexcoordArrayLineZero(&g_vertexBuffer[g_vertexIndex], 0);
|
||||
Emulator_GenerateColourArrayLine(&g_vertexBuffer[g_vertexIndex], &poly->r0, &poly->r0);
|
||||
|
||||
MakeTriangle();
|
||||
|
||||
g_vertexIndex += 6;
|
||||
#if defined(DEBUG_POLY_COUNT)
|
||||
polygon_count++;
|
||||
#endif
|
||||
}
|
||||
|
||||
primitive_size = sizeof(LINE_F2);
|
||||
#if defined(DEBUG_POLY_COUNT)
|
||||
polygon_count++;
|
||||
#endif
|
||||
|
||||
// TODO: unsupported
|
||||
|
||||
primitive_size = sizeof(LINE_F4);
|
||||
break;
|
||||
}
|
||||
case 0x50:
|
||||
{
|
||||
LINE_G2* poly = (LINE_G2*)pTag;
|
||||
|
Loading…
Reference in New Issue
Block a user