mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- SW: Move static function DoReloadStatus()
into the class as private function
This commit is contained in:
parent
26ffc82cc0
commit
c0374cf890
1 changed files with 22 additions and 16 deletions
|
@ -65,22 +65,6 @@ static const short icons[] = {
|
||||||
ID_PanelCaltrops,
|
ID_PanelCaltrops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool DoReloadStatus(char *reloadstate, int ammo)
|
|
||||||
{
|
|
||||||
bool reloading = ammo == 0 && *reloadstate != 2;
|
|
||||||
|
|
||||||
if (ammo == 0 && *reloadstate == 0)
|
|
||||||
{
|
|
||||||
*reloadstate = 1;
|
|
||||||
}
|
|
||||||
if (ammo)
|
|
||||||
{
|
|
||||||
*reloadstate = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return reloading;
|
|
||||||
}
|
|
||||||
|
|
||||||
class DSWStatusBar : public DBaseStatusBar
|
class DSWStatusBar : public DBaseStatusBar
|
||||||
{
|
{
|
||||||
DHUDFont miniFont, numberFont;
|
DHUDFont miniFont, numberFont;
|
||||||
|
@ -719,6 +703,28 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Used in DrawHUD2() for determining whether a reloadable weapon is reloading.
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool DoReloadStatus(char *reloadstate, int ammo)
|
||||||
|
{
|
||||||
|
bool reloading = ammo == 0 && *reloadstate != 2;
|
||||||
|
|
||||||
|
if (ammo == 0 && *reloadstate == 0)
|
||||||
|
{
|
||||||
|
*reloadstate = 1;
|
||||||
|
}
|
||||||
|
else if (ammo)
|
||||||
|
{
|
||||||
|
*reloadstate = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return reloading;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue