- Fixed: SBARINFO used different rounding modes for the background and

foreground of the DrawBar command.


SVN r1398 (trunk)
This commit is contained in:
Randy Heit 2009-02-04 02:01:32 +00:00
parent 72343d9f2c
commit b983886acd
2 changed files with 20 additions and 10 deletions

View file

@ -1,4 +1,6 @@
February 3, 2009 February 3, 2009
- Fixed: SBARINFO used different rounding modes for the background and
foreground of the DrawBar command.
- Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Bumped MINSAVEVER to coincide with the new MAPINFO merge.
- Added a fflush() call after the logfile write in I_FatalError so that the - Added a fflush() call after the logfile write in I_FatalError so that the
error text is visible in the file while the error dialog is displayed. error text is visible in the file while the error dialog is displayed.

View file

@ -914,14 +914,18 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
if(!block.fullScreenOffsets) if(!block.fullScreenOffsets)
{ {
// Calc real screen coordinates for bar // Calc real screen coordinates for bar
x = cmd.x + ST_X + xOffset; x = (cmd.x + ST_X + xOffset) << FRACBITS;
y = cmd.y + ST_Y + yOffset; y = (cmd.y + ST_Y + yOffset) << FRACBITS;
w = fg->GetScaledWidth(); w = fg->GetScaledWidth() << FRACBITS;
h = fg->GetScaledHeight(); h = fg->GetScaledHeight() << FRACBITS;
if (Scaled) if (Scaled)
{ {
screen->VirtualToRealCoordsInt(x, y, w, h, 320, 200, true); screen->VirtualToRealCoords(x, y, w, h, 320, 200, true);
} }
x >>= FRACBITS;
y >>= FRACBITS;
w = (w + FRACUNIT/2) >> FRACBITS;
h = (h + FRACUNIT/2) >> FRACBITS;
} }
else else
{ {
@ -954,14 +958,18 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
if(!block.fullScreenOffsets) if(!block.fullScreenOffsets)
{ {
// Calc clipping rect for background // Calc clipping rect for background
cx = cmd.x + ST_X + cmd.special3 + xOffset; cx = (cmd.x + ST_X + cmd.special3 + xOffset) << FRACBITS;
cy = cmd.y + ST_Y + cmd.special3 + yOffset; cy = (cmd.y + ST_Y + cmd.special3 + yOffset) << FRACBITS;
cw = fg->GetScaledWidth() - fg->GetScaledLeftOffset() - cmd.special3 * 2; cw = (fg->GetScaledWidth() - fg->GetScaledLeftOffset() - cmd.special3 * 2) << FRACBITS;
ch = fg->GetScaledHeight() - fg->GetScaledTopOffset() - cmd.special3 * 2; ch = (fg->GetScaledHeight() - fg->GetScaledTopOffset() - cmd.special3 * 2) << FRACBITS;
if (Scaled) if (Scaled)
{ {
screen->VirtualToRealCoordsInt(cx, cy, cw, ch, 320, 200, true); screen->VirtualToRealCoords(cx, cy, cw, ch, 320, 200, true);
} }
cx >>= FRACBITS;
cy >>= FRACBITS;
cw = (cw + FRACUNIT/2) >> FRACBITS;
ch = (ch + FRACUNIT/2) >> FRACBITS;
} }
else else
{ {