Browse Source

Clean up TFit_Obj3

pull/88/head
Anders Jenbo 7 years ago
parent
commit
ba9cf89a9e
  1. 29
      Source/themes.cpp
  2. 2
      Source/themes.h

29
Source/themes.cpp

@ -229,33 +229,22 @@ BOOL __fastcall CheckThemeObj3(int xp, int yp, int t, int f)
return TRUE;
}
BOOLEAN __fastcall TFit_Obj3(int t)
BOOL __fastcall TFit_Obj3(int t)
{
int yp; // edi
int xp; // esi
char objrnd[4]; // [esp+Bh] [ebp-5h]
objrnd[0] = 4;
objrnd[1] = 4;
objrnd[2] = 3;
objrnd[3] = 5;
yp = 1;
while (2) {
xp = 1;
do {
int xp, yp;
char objrnd[4] = { 4, 4, 3, 5 };
for (yp = 1; yp < MAXDUNY - 1; yp++) {
for (xp = 1; xp < MAXDUNX - 1; xp++) {
if (CheckThemeObj3(xp, yp, t, objrnd[leveltype - 1])) {
themex = xp;
themey = yp;
return 1;
return TRUE;
}
++xp;
} while (xp < 111);
if (++yp < 111) {
continue;
}
break;
}
return 0;
return FALSE;
}
BOOLEAN __fastcall CheckThemeReqs(int t)

2
Source/themes.h

@ -24,7 +24,7 @@ BOOL __fastcall TFit_Obj5(int t);
BOOL __fastcall TFit_SkelRoom(int t);
BOOL __fastcall TFit_GoatShrine(int t);
BOOL __fastcall CheckThemeObj3(int xp, int yp, int t, int f);
BOOLEAN __fastcall TFit_Obj3(int t);
BOOL __fastcall TFit_Obj3(int t);
BOOLEAN __fastcall CheckThemeReqs(int t);
BOOLEAN __fastcall SpecialThemeFit(int i, int t);
BOOLEAN __fastcall CheckThemeRoom(int tv);

Loading…
Cancel
Save