tiny cleanup + warning fix

This commit is contained in:
Alug committed 2026-01-12 18:26:32 +01:00
1 parent 381f006f31
commit 193f9630ea
2 files changed
+12 -19

No files matched your search

+12 -11
View File
@@ -1576,28 +1576,29 @@ void HWR_Draw2DModel(md2_t *md2, INT32 x, INT32 y, INT32 skinnum, skincolors_t c
memset(&p, 0x00, sizeof(FTransform));
p.x = x*vid.dup + (vid.width - BASEVIDWIDTH*vid.dup)/2;
p.y = -200.0f; // idk man, but this makes the model not cull, kinda?
p.z = y*vid.dup + (vid.height - BASEVIDHEIGHT*vid.dup)/2; // for whatever reason y and z are switched here
p.x = x*vid.dup + (float)(vid.width - BASEVIDWIDTH*vid.dup)/2.f;
p.y = -200.f; // push it back to prevent wonky culling, idk lul
p.z = y*vid.dup + (float)(vid.height - BASEVIDHEIGHT*vid.dup)/2.f;
p.angley = FixedToFloat(AngleFixed(angle));
p.anglex = 0.0f;
p.anglez = 0.0f;
p.anglex = 0.f;
p.anglez = 0.f;
p.roll = false;
p.fliptype = TRANSFORM_NONE;
const float fscale = FixedToFloat(scale*vid.dup);
GL_Draw2DModel(
md2->model,
frame,
0.0f,
0.0f,
0.f,
0.f,
-1,
&p,
FixedToFloat(scale*vid.dup),
FixedToFloat(scale*vid.dup),
true,
fscale,
fscale,
true, // flip it vertically lul
false,
&Surf
);
-8
View File
@@ -3136,8 +3136,6 @@ void GL_Draw2DModel(model_t *model, INT32 frameIndex, INT32 duration, INT32 tics
// switch to ortho mode to make our lives easier
// thisll make sure our coords will be remapped to pixel coords
// try to scale it to the base width and height
// shit still be weird, and needs accounting for diff resolutions
pglOrtho(0.0f, (float)vid.width, (float)vid.height, 0.0f, NZCLIP_PLANE, FAR_ZCLIP_DEFAULT);
pglMatrixMode(GL_MODELVIEW);
@@ -3147,15 +3145,9 @@ void GL_Draw2DModel(model_t *model, INT32 frameIndex, INT32 duration, INT32 tics
pglDepthMask(GL_TRUE);
pglClear(GL_DEPTH_BUFFER_BIT);
// FIXME: theres some weird culling issues i cant wrap my head around
// so until then gotta disable depth testing until i can figure this out
//pglDisable(GL_DEPTH_TEST);
GL_DrawModelEx(model, frameIndex, duration, tics, nextFrameIndex,
pos, hscale, vscale, flipped, hflipped, Surface);
//pglDepthMask(GL_TRUE);
//pglEnable(GL_DEPTH_TEST);
// restore the matrix´s
pglMatrixMode(GL_PROJECTION);
pglPopMatrix();