mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-26 12:22:35 +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)
|
case 0x48: // TODO (unused)
|
||||||
{
|
{
|
||||||
LINE_F3* poly = (LINE_F3*)pTag;
|
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)
|
AddSplit(semi_transparent, activeDrawEnv.tpage, whiteTexture);
|
||||||
{
|
|
||||||
//First line
|
{
|
||||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x0, &poly->x1, NULL, NULL);
|
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x0, &poly->x1);
|
||||||
Emulator_GenerateColourArrayQuad(&g_vertexBuffer[g_vertexIndex], &poly->r0, NULL, NULL, NULL);
|
Emulator_GenerateTexcoordArrayLineZero(&g_vertexBuffer[g_vertexIndex], 0);
|
||||||
g_vertexIndex += 2;
|
Emulator_GenerateColourArrayLine(&g_vertexBuffer[g_vertexIndex], &poly->r0, &poly->r0);
|
||||||
}
|
|
||||||
else
|
MakeTriangle();
|
||||||
{
|
|
||||||
//Second line
|
g_vertexIndex += 6;
|
||||||
Emulator_GenerateLineArray(&g_vertexBuffer[g_vertexIndex], &poly->x1, &poly->x2, NULL, NULL);
|
#if defined(DEBUG_POLY_COUNT)
|
||||||
Emulator_GenerateColourArrayQuad(&g_vertexBuffer[g_vertexIndex], &poly->r0, NULL, NULL, NULL);
|
polygon_count++;
|
||||||
g_vertexIndex += 2;
|
#endif
|
||||||
}
|
}
|
||||||
#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);
|
primitive_size = sizeof(LINE_F3);
|
||||||
break;
|
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:
|
case 0x50:
|
||||||
{
|
{
|
||||||
LINE_G2* poly = (LINE_G2*)pTag;
|
LINE_G2* poly = (LINE_G2*)pTag;
|
||||||
|
Loading…
Reference in New Issue
Block a user