mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- Use the new isSWALL()
wrapper everywhere.
This commit is contained in:
parent
ffba10a7c5
commit
6894be4ad1
11 changed files with 14 additions and 14 deletions
|
@ -372,7 +372,7 @@ CCMD(printpalcol)
|
|||
bool ShowRedLine(int j, int i)
|
||||
{
|
||||
auto wal = &wall[j];
|
||||
if (!(g_gameType & GAMEFLAG_SW))
|
||||
if (!isSWALL())
|
||||
{
|
||||
return !gFullMap && !show2dsector[wal->nextsector];
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ static void drawwhitelines(int cposx, int cposy, int czoom, int cang)
|
|||
|
||||
for (int i = numsectors - 1; i >= 0; i--)
|
||||
{
|
||||
if (!gFullMap && !show2dsector[i] && !(g_gameType & GAMEFLAG_SW)) continue;
|
||||
if (!gFullMap && !show2dsector[i] && !isSWALL()) continue;
|
||||
|
||||
int startwall = sector[i].wallptr;
|
||||
int endwall = sector[i].wallptr + sector[i].wallnum;
|
||||
|
@ -483,7 +483,7 @@ static void drawwhitelines(int cposx, int cposy, int czoom, int cang)
|
|||
if (wal->nextwall >= 0) continue;
|
||||
if (!gFullMap && !tileGetTexture(wal->picnum)->isValid()) continue;
|
||||
|
||||
if ((g_gameType & GAMEFLAG_SW) && !gFullMap && !show2dwall[j])
|
||||
if (isSWALL() && !gFullMap && !show2dwall[j])
|
||||
continue;
|
||||
|
||||
int ox = wal->x - cposx;
|
||||
|
|
|
@ -116,7 +116,7 @@ void FNotifyBuffer::DrawNative()
|
|||
|
||||
FFont* font = isBlood() ? SmallFont2 : SmallFont;
|
||||
|
||||
double line = isBlood() ? Top : (g_gameType & GAMEFLAG_SW) ? 40 : font->GetDisplacement();
|
||||
double line = isBlood() ? Top : isSWALL() ? 40 : font->GetDisplacement();
|
||||
bool canskip = isBlood();
|
||||
double scale = 1 / (NotifyFontScale * con_notifyscale);
|
||||
double lineadv = font->GetHeight() / NotifyFontScale;
|
||||
|
|
|
@ -310,7 +310,7 @@ bool FMapInfoParser::CheckLegacyMapDefinition(FString& mapname)
|
|||
{
|
||||
sc.MustGetNumber();
|
||||
int vol = sc.Number;
|
||||
if (!(g_gameType & GAMEFLAG_SW))
|
||||
if (!isSWALL())
|
||||
{
|
||||
// Blood and Duke use volume/level pairs
|
||||
sc.MustGetStringName(",");
|
||||
|
|
|
@ -961,7 +961,7 @@ int RunGame()
|
|||
mus_redbook.SetGenericRepDefault(false, CVAR_Bool); // Blood should default to CD Audio off - all other games must default to on.
|
||||
am_showlabel.SetGenericRepDefault(true, CVAR_Bool);
|
||||
}
|
||||
if (g_gameType & GAMEFLAG_SW)
|
||||
if (isSWALL())
|
||||
{
|
||||
cl_weaponswitch.SetGenericRepDefault(1, CVAR_Int);
|
||||
if (cl_weaponswitch > 1) cl_weaponswitch = 1;
|
||||
|
|
|
@ -93,7 +93,7 @@ CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable wea
|
|||
CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable auto weapon switching")
|
||||
{
|
||||
if (self < 0) self = 0;
|
||||
if (self > 1 && (g_gameType & GAMEFLAG_SW)) self = 1;
|
||||
if (self > 1 && isSWALL()) self = 1;
|
||||
if (self > 3 && isBlood()) self = 3;
|
||||
if (self > 7) self = 7;
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ const char* iwad_reserved_ex[12] = { ".map", "menudef", "gldefs", "zscript", "ma
|
|||
const char** iwad_reserved()
|
||||
{
|
||||
return (g_gameType & GAMEFLAG_PSEXHUMED) ? iwad_reserved_ex :
|
||||
(g_gameType & GAMEFLAG_SW) ? iwad_reserved_sw :
|
||||
isSWALL() ? iwad_reserved_sw :
|
||||
(g_gameType & GAMEFLAG_BLOOD) ? iwad_reserved_blood : iwad_reserved_duke;
|
||||
}
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ CCMD(weapalt)
|
|||
|
||||
CCMD(useitem)
|
||||
{
|
||||
int max = (g_gameType & GAMEFLAG_PSEXHUMED)? 6 : (g_gameType & GAMEFLAG_SW)? 7 : isBlood() ? 4 : 5;
|
||||
int max = (g_gameType & GAMEFLAG_PSEXHUMED)? 6 : isSWALL()? 7 : isBlood() ? 4 : 5;
|
||||
if (argv.argc() != 2)
|
||||
{
|
||||
Printf("useitem <itemnum>: activates an inventory item (1-%d)", max);
|
||||
|
|
|
@ -374,7 +374,7 @@ static DMenuItemBase* CreateCustomListMenuItemText(double x, double y, int heigh
|
|||
{
|
||||
const char* classname =
|
||||
isBlood() ? "ListMenuItemBloodTextItem" :
|
||||
(g_gameType & GAMEFLAG_SW) ? "ListMenuItemSWTextItem" :
|
||||
isSWALL() ? "ListMenuItemSWTextItem" :
|
||||
(g_gameType & GAMEFLAG_PSEXHUMED) ? "ListMenuItemExhumedTextItem" : "ListMenuItemDukeTextItem";
|
||||
auto c = PClass::FindClass(classname);
|
||||
auto p = c->CreateNew();
|
||||
|
@ -602,7 +602,7 @@ void SetDefaultMenuColors()
|
|||
gameinfo.mSliderColor = "Red";
|
||||
cls = PClass::FindClass("BloodMenuDelegate");
|
||||
}
|
||||
else if (g_gameType & GAMEFLAG_SW)
|
||||
else if (isSWALL())
|
||||
{
|
||||
OptionSettings.mFontColorHeader = CR_DARKRED;
|
||||
OptionSettings.mFontColorHighlight = CR_WHITE;
|
||||
|
|
|
@ -150,7 +150,7 @@ FileReader OpenMusic(const char* musicname)
|
|||
if (newlumpnum >= 0) lumpnum = newlumpnum;
|
||||
}
|
||||
|
||||
if (lumpnum == -1 && (g_gameType & GAMEFLAG_SW))
|
||||
if (lumpnum == -1 && isSWALL())
|
||||
{
|
||||
// Some Shadow Warrior distributions have the music in a subfolder named 'classic'. Check that, too.
|
||||
FStringf aliasMusicname("classic/music/%s", musicname);
|
||||
|
|
|
@ -933,7 +933,7 @@ const char* G_DefaultDefFile(void)
|
|||
if (g_gameType & GAMEFLAG_WW2GI)
|
||||
return "ww2gi.def";
|
||||
|
||||
if (g_gameType & GAMEFLAG_SW)
|
||||
if (isSWALL())
|
||||
return "sw.def";
|
||||
|
||||
if (g_gameType & GAMEFLAG_PSEXHUMED)
|
||||
|
|
|
@ -166,7 +166,7 @@ void drawMapTitle()
|
|||
double alpha = levelTextTime > 16? 1.0 : levelTextTime / 16.;
|
||||
if (alpha > 0)
|
||||
{
|
||||
double scale = (g_gameType & GAMEFLAG_RRALL)? 0.4 : (g_gameType & GAMEFLAG_SW)? 0.7 : 1.0;
|
||||
double scale = (g_gameType & GAMEFLAG_RRALL)? 0.4 : isSWALL()? 0.7 : 1.0;
|
||||
auto text = currentLevel->DisplayName();
|
||||
auto myfont = PickBigFont(text);
|
||||
double x = 160 - myfont->StringWidth(text) * scale / 2.;
|
||||
|
|
Loading…
Reference in a new issue