Browse Source

Clean up TFit_SkelRoom

pull/88/head
Anders Jenbo 7 years ago
parent
commit
adf3685c1e
  1. 24
      Source/themes.cpp
  2. 4
      Source/themes.h

24
Source/themes.cpp

@ -110,7 +110,7 @@ BOOLEAN __fastcall TFit_Shrine(int i)
return 1; return 1;
} }
BOOLEAN __fastcall TFit_Obj5(int t) BOOL __fastcall TFit_Obj5(int t)
{ {
int v2; // ebx int v2; // ebx
int v3; // esi int v3; // esi
@ -177,26 +177,22 @@ BOOLEAN __fastcall TFit_Obj5(int t)
} }
} }
BOOLEAN __fastcall TFit_SkelRoom(int t) BOOL __fastcall TFit_SkelRoom(int t)
{ {
int i; // esi int i;
if (leveltype != 1 && leveltype != 2) { if (leveltype != 1 && leveltype != 2) {
return 0; return FALSE;
}
i = 0;
if (nummtypes <= 0) {
return 0;
} }
while (!IsSkel(Monsters[i].mtype)) { for (i = 0; i < nummtypes; i++) {
++i; if (IsSkel(Monsters[i].mtype)) {
if (i >= nummtypes) { themeVar1 = i;
return 0; return TFit_Obj5(t);
} }
} }
themeVar1 = i;
return TFit_Obj5(t); return FALSE;
} }
BOOLEAN __fastcall TFit_GoatShrine(int t) BOOLEAN __fastcall TFit_GoatShrine(int t)

4
Source/themes.h

@ -20,8 +20,8 @@ extern BOOLEAN bFountainFlag; // weak
extern BOOL bCrossFlag; extern BOOL bCrossFlag;
BOOLEAN __fastcall TFit_Shrine(int i); BOOLEAN __fastcall TFit_Shrine(int i);
BOOLEAN __fastcall TFit_Obj5(int t); BOOL __fastcall TFit_Obj5(int t);
BOOLEAN __fastcall TFit_SkelRoom(int t); BOOL __fastcall TFit_SkelRoom(int t);
BOOLEAN __fastcall TFit_GoatShrine(int t); BOOLEAN __fastcall TFit_GoatShrine(int t);
BOOL __fastcall CheckThemeObj3(int xp, int yp, int t, int f); BOOL __fastcall CheckThemeObj3(int xp, int yp, int t, int f);
BOOLEAN __fastcall TFit_Obj3(int t); BOOLEAN __fastcall TFit_Obj3(int t);

Loading…
Cancel
Save