diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index d677af281..bc655e935 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -256,8 +256,8 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t fheight = (float)SHORT(gpatch->height) * fscaleh * dupy; // positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1 - cx = -1.0f + (cx / (vid.width / 2.0f)); - cy = 1.0f - (cy / (vid.height / 2.0f)); + cx = -1.0f + (cx / (fvw / 2.0f)); + cy = 1.0f - (cy / (fvh / 2.0f)); // fwidth and fheight are similar fwidth /= fvw / 2.0f; @@ -301,7 +301,7 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t { FSurfaceInfo Surf; Surf.PolyColor.s.red = Surf.PolyColor.s.green = Surf.PolyColor.s.blue = 0xff; - + if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[hudtrans]; else if (alphalevel == 14) Surf.PolyColor.s.alpha = softwaretranstogl[hudtrans]; else if (alphalevel == 15) Surf.PolyColor.s.alpha = softwaretranstogl_hi[hudtrans]; @@ -430,8 +430,8 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal } // positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1 - cx = -1.0f + (cx / (vid.width / 2.0f)); - cy = 1.0f - (cy / (vid.height / 2.0f)); + cx = -1.0f + (cx / (fvw / 2.0f)); + cy = 1.0f - (cy / (fvh / 2.0f)); // fwidth and fheight are similar fwidth /= fvw / 2.0f; @@ -468,7 +468,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal else if (alphalevel == 14) Surf.PolyColor.s.alpha = softwaretranstogl[cv_translucenthud.value]; else if (alphalevel == 15) Surf.PolyColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value]; else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel]; - + flags |= PF_Modulated; GL_DrawPolygon(&Surf, v, 4, flags); }