diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 6cd58509e..c3804be49 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,5 +1,7 @@ July 24, 2008 -- Correct the revision_check target so that it always checks the revision, +- Applied Blzut3's 5:4 SBARINFO patch. (At least I think that's what it's + for.) +- Corrected the revision_check target so that it always checks the revision, not just when src/svnrevision.h is not present. - Added Linux support for the CMakeLists. This meant downgrading them for CMake 2.4, since the distros don't seem to consider 2.6 stable yet. diff --git a/src/g_shared/sbarinfo_display.cpp b/src/g_shared/sbarinfo_display.cpp index 1ed31187d..23583c923 100644 --- a/src/g_shared/sbarinfo_display.cpp +++ b/src/g_shared/sbarinfo_display.cpp @@ -1168,13 +1168,18 @@ void DSBarInfo::DrawGraphic(FTexture* texture, int x, int y, int xOffset, int yO y -= (texture->GetHeight()/2)-texture->TopOffset; } - x += ST_X + xOffset; - y += ST_Y + yOffset; - int w = texture->GetScaledWidth(); - int h = texture->GetScaledHeight() + y; + // I'll handle the conversion from fixed to int myself for more control + fixed_t fx = (x + ST_X + xOffset) << FRACBITS; + fixed_t fy = (y + ST_Y + yOffset) << FRACBITS; + fixed_t fw = texture->GetScaledWidth() << FRACBITS; + fixed_t fh = texture->GetScaledHeight() << FRACBITS; if(Scaled) - screen->VirtualToRealCoordsInt(x, y, w, h, 320, 200, true); - h -= y; + screen->VirtualToRealCoords(fx, fy, fw, fh, 320, 200, true); + x = fx >> FRACBITS; + y = fy >> FRACBITS; + // Round to nearest + int w = (fw + (FRACUNIT>>1)) >> FRACBITS; + int h = (fh + (FRACUNIT>>1)) >> FRACBITS; screen->DrawTexture(texture, x, y, DTA_DestWidth, w, DTA_DestHeight, h,