diff options
| author | Steven Fuller <relnev@icculus.org> | 2001-08-09 06:23:42 +0000 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:36 +0200 |
| commit | ea2f8c4527f401e721717177a11306213c13eac1 (patch) | |
| tree | bbf2e2316b1dce71feed550b11e33e9f7885b52e /src/opengl.c | |
| parent | 45cf2eb3a194d53ccdd05a75b46e472a01359abf (diff) | |
Fixed FPU assembly. (fistp is 16bit, fistpl is 32bit)
Game displays now.
Diffstat (limited to 'src/opengl.c')
| -rw-r--r-- | src/opengl.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/opengl.c b/src/opengl.c index 7379066..535a8e3 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -27,6 +27,7 @@ static void *CurrTextureHandle; void D3D_ZBufferedGouraudTexturedPolygon_Output(POLYHEADER *inputPolyPtr, RENDERVERTEX *renderVerticesPtr) { +#if 1 int texoffset; void *TextureHandle; int i; @@ -41,9 +42,9 @@ void D3D_ZBufferedGouraudTexturedPolygon_Output(POLYHEADER *inputPolyPtr, RENDER TextureHandle = CurrTextureHandle; } - fprintf(stderr, "D3D_ZBufferedGouraudTexturedPolygon_Output(%p, %p)\n", inputPolyPtr, renderVerticesPtr); - fprintf(stderr, "\tRenderPolygon.NumberOfVertices = %d\n", RenderPolygon.NumberOfVertices); - fprintf(stderr, "\ttexoffset = %d (ptr = %p)\n", texoffset, texoffset ? (void *)ImageHeaderArray[texoffset].D3DHandle : CurrTextureHandle); +// fprintf(stderr, "D3D_ZBufferedGouraudTexturedPolygon_Output(%p, %p)\n", inputPolyPtr, renderVerticesPtr); +// fprintf(stderr, "\tRenderPolygon.NumberOfVertices = %d\n", RenderPolygon.NumberOfVertices); +// fprintf(stderr, "\ttexoffset = %d (ptr = %p)\n", texoffset, texoffset ? (void *)ImageHeaderArray[texoffset].D3DHandle : CurrTextureHandle); switch(RenderPolygon.TranslucencyMode) { @@ -81,35 +82,23 @@ switch(RenderPolygon.TranslucencyMode) /* this is just random garbage */ x1 = (vertices->X*(Global_VDB_Ptr->VDB_ProjX+1))/vertices->Z+Global_VDB_Ptr->VDB_CentreX; y1 = (vertices->Y*(Global_VDB_Ptr->VDB_ProjY+1))/vertices->Z+Global_VDB_Ptr->VDB_CentreY; -// x = vertices->X; -// y = vertices->Y; x = x1; y = y1; -// x = x/32768.0; -// y = y/32768.0; -// x = (x - 32768.0)/32768.0; -// y = (y - 32768.0)/32768.0; - x = (x - 320.0)/320.0; - y = (y - 240.0)/240.0; + x = (x - 320.0)/320.0; + y = -(y - 240.0)/240.0; -// z = vertices->Z*16; -// z = -z/65536; - zvalue = 65536 - vertices->Z+HeadUpDisplayZOffset; zvalue = 1.0 - ZNear/zvalue; z = -zvalue; -// x *= 16.0; -// y *= 16.0; -// z *= 16.0; - glColor4ub(vertices->R, vertices->G, vertices->B, vertices->A); glVertex3f(x, y, z); - fprintf(stderr, "Vertex %d: (%f, %f, %f)\n\t[%d, %d, %d]->[%d, %d] (%d, %d, %d, %d)\n", i, x, y, z, vertices->X, vertices->Y, vertices->Z, x1, y1, vertices->R, vertices->G, vertices->B, vertices->A); - fprintf(stderr, "znear = %f, zvalue = %f, z = %f\n", ZNear, zvalue, z); +// fprintf(stderr, "Vertex %d: (%f, %f, %f)\n\t[%d, %d, %d]->[%d, %d] (%d, %d, %d, %d)\n", i, x, y, z, vertices->X, vertices->Y, vertices->Z, x1, y1, vertices->R, vertices->G, vertices->B, vertices->A); +// fprintf(stderr, "znear = %f, zvalue = %f, z = %f\n", ZNear, zvalue, z); } glEnd(); CurrTextureHandle = TextureHandle; +#endif } |
