mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
(SBARINFO patch)
- Fixed: DrawBar would not show. - Fixed: IsSelected took string constants instead of identifiers. SVN r1176 (trunk)
This commit is contained in:
parent
774e559eaf
commit
371d4704b8
3 changed files with 30 additions and 24 deletions
|
@ -1,3 +1,7 @@
|
|||
August 18, 2008 (SBARINFO patch)
|
||||
- Fixed: DrawBar would not show.
|
||||
- Fixed: IsSelected took string constants instead of identifiers.
|
||||
|
||||
August 16, 2008 (Changes by Graf Zahl)
|
||||
- Put more floor/ceiling properties in sector_t into a substructure and
|
||||
added wrapper functions.
|
||||
|
|
|
@ -901,30 +901,27 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a
|
|||
int cx, cy, cw, ch, cr, cb;
|
||||
|
||||
// These still need to be caclulated for the clear call.
|
||||
if(bg == NULL)
|
||||
if(!block.fullScreenOffsets)
|
||||
{
|
||||
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();
|
||||
if (Scaled)
|
||||
{
|
||||
// Calc real screen coordinates for bar
|
||||
x = cmd.x + ST_X + xOffset;
|
||||
y = cmd.y + ST_Y + yOffset;
|
||||
w = fg->GetScaledWidth();
|
||||
h = fg->GetScaledHeight();
|
||||
if (Scaled)
|
||||
{
|
||||
screen->VirtualToRealCoordsInt(x, y, w, h, 320, 200, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
x = cmd.x + xOffset;
|
||||
y = cmd.y + yOffset;
|
||||
w = fg->GetScaledWidth();
|
||||
h = fg->GetScaledHeight();
|
||||
if(vid_fps && x < 0 && y >= 0)
|
||||
y += 10;
|
||||
screen->VirtualToRealCoordsInt(x, y, w, h, 320, 200, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
x = cmd.x + xOffset;
|
||||
y = cmd.y + yOffset;
|
||||
w = fg->GetScaledWidth();
|
||||
h = fg->GetScaledHeight();
|
||||
if(vid_fps && x < 0 && y >= 0)
|
||||
y += 10;
|
||||
}
|
||||
|
||||
if(cmd.special3 != 0)
|
||||
{
|
||||
|
|
|
@ -1147,16 +1147,18 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
|||
this->ParseSBarInfoBlock(sc, cmd.subBlock);
|
||||
break;
|
||||
case SBARINFO_ISSELECTED:
|
||||
//Using StringConst instead of Identifieres is deperecated!
|
||||
if(sc.CheckToken(TK_Identifier))
|
||||
{
|
||||
if(sc.Compare("not"))
|
||||
{
|
||||
cmd.flags |= SBARINFOEVENT_NOT;
|
||||
if(!sc.CheckToken(TK_StringConst))
|
||||
sc.MustGetToken(TK_Identifier);
|
||||
}
|
||||
else
|
||||
sc.ScriptError("Expected 'not' got '%s' instead.", sc.String);
|
||||
}
|
||||
sc.MustGetToken(TK_StringConst);
|
||||
else
|
||||
sc.MustGetToken(TK_StringConst);
|
||||
for(int i = 0;i < 2;i++)
|
||||
{
|
||||
cmd.setString(sc, sc.String, i);
|
||||
|
@ -1166,7 +1168,10 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
|||
sc.ScriptError("'%s' is not a type of weapon.", sc.String);
|
||||
}
|
||||
if(sc.CheckToken(','))
|
||||
sc.MustGetToken(TK_StringConst);
|
||||
{
|
||||
if(!sc.CheckToken(TK_StringConst))
|
||||
sc.MustGetToken(TK_Identifier);
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue