mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- Fixed: SBARINFO used different rounding modes for the background and
foreground of the DrawBar command. SVN r1398 (trunk)
This commit is contained in:
parent
72343d9f2c
commit
b983886acd
2 changed files with 20 additions and 10 deletions
|
@ -1,4 +1,6 @@
|
|||
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.
|
||||
- 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.
|
||||
|
|
|
@ -914,14 +914,18 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
|
|||
if(!block.fullScreenOffsets)
|
||||
{
|
||||
// Calc real screen coordinates for bar
|
||||
x = cmd.x + ST_X + xOffset;
|
||||
y = cmd.y + ST_Y + yOffset;
|
||||
w = fg->GetScaledWidth();
|
||||
h = fg->GetScaledHeight();
|
||||
x = (cmd.x + ST_X + xOffset) << FRACBITS;
|
||||
y = (cmd.y + ST_Y + yOffset) << FRACBITS;
|
||||
w = fg->GetScaledWidth() << FRACBITS;
|
||||
h = fg->GetScaledHeight() << FRACBITS;
|
||||
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
|
||||
{
|
||||
|
@ -954,14 +958,18 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
|
|||
if(!block.fullScreenOffsets)
|
||||
{
|
||||
// Calc clipping rect for background
|
||||
cx = cmd.x + ST_X + cmd.special3 + xOffset;
|
||||
cy = cmd.y + ST_Y + cmd.special3 + yOffset;
|
||||
cw = fg->GetScaledWidth() - fg->GetScaledLeftOffset() - cmd.special3 * 2;
|
||||
ch = fg->GetScaledHeight() - fg->GetScaledTopOffset() - cmd.special3 * 2;
|
||||
cx = (cmd.x + ST_X + cmd.special3 + xOffset) << FRACBITS;
|
||||
cy = (cmd.y + ST_Y + cmd.special3 + yOffset) << FRACBITS;
|
||||
cw = (fg->GetScaledWidth() - fg->GetScaledLeftOffset() - cmd.special3 * 2) << FRACBITS;
|
||||
ch = (fg->GetScaledHeight() - fg->GetScaledTopOffset() - cmd.special3 * 2) << FRACBITS;
|
||||
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue