Browse Source

DRLG_L3 bin exact

pull/88/head
galaxyhaxz 7 years ago committed by Anders Jenbo
parent
commit
9d1f020aa9
  1. 136
      Source/drlg_l3.cpp
  2. 2
      Source/drlg_l3.h

136
Source/drlg_l3.cpp

@ -331,7 +331,7 @@ void DRLG_L3LockRec(int x, int y)
} }
// 528380: using guessed type int lockoutcnt; // 528380: using guessed type int lockoutcnt;
BOOLEAN DRLG_L3Lockout() BOOL DRLG_L3Lockout()
{ {
int v0; // esi int v0; // esi
signed int v1; // edx signed int v1; // edx
@ -402,92 +402,77 @@ void CreateL3Dungeon(unsigned int rseed, int entry)
void DRLG_L3(int entry) void DRLG_L3(int entry)
{ {
int x1; // esi int x1, y1, x2, y2, i, j;
int y1; // eax BOOL found, genok;
int x2; // edi
int y2; // eax lavapool = FALSE;
int found; // eax
int genok; // eax
signed int i; // ecx
signed int j; // esi
BOOLEAN v24; // [esp-8h] [ebp-20h]
lavapool = 0;
do { do {
do { do {
do { do {
InitL3Dungeon(); InitL3Dungeon();
x1 = random(0, 20) + 10; x1 = random(0, 20) + 10;
y1 = random(0, 20); y1 = random(0, 20) + 10;
DRLG_L3FillRoom(x1, y1 + 10, x1 + 2, y1 + 12); x2 = x1 + 2;
DRLG_L3CreateBlock(x1, y1 + 10, 2, 0); y2 = y1 + 2;
DRLG_L3CreateBlock(x1 + 2, y1 + 10, 2, 1); DRLG_L3FillRoom(x1, y1, x2, y2);
DRLG_L3CreateBlock(x1, y1 + 12, 2, 2); DRLG_L3CreateBlock(x1, y1, 2, 0);
DRLG_L3CreateBlock(x1, y1 + 10, 2, 3); DRLG_L3CreateBlock(x2, y1, 2, 1);
DRLG_L3CreateBlock(x1, y2, 2, 2);
if (QuestStatus(QTYPE_ANVIL)) { DRLG_L3CreateBlock(x1, y1, 2, 3);
x2 = random(0, 10) + 10; if(QuestStatus(QTYPE_ANVIL)) {
y2 = random(0, 10); x1 = random(0, 10) + 10;
DRLG_L3FloorArea(x2, y2 + 10, x2 + 12, y2 + 22); y1 = random(0, 10) + 10;
x2 = x1 + 12;
y2 = y1 + 12;
DRLG_L3FloorArea(x1, y1, x2, y2);
} }
DRLG_L3FillDiags(); DRLG_L3FillDiags();
DRLG_L3FillSingles(); DRLG_L3FillSingles();
DRLG_L3FillStraights(); DRLG_L3FillStraights();
DRLG_L3FillDiags(); DRLG_L3FillDiags();
DRLG_L3Edges(); DRLG_L3Edges();
if (DRLG_L3GetFloorArea() < 600) if(DRLG_L3GetFloorArea() >= 600) {
found = 0;
else
found = DRLG_L3Lockout(); found = DRLG_L3Lockout();
} while (!found); } else {
found = FALSE;
}
} while(!found);
DRLG_L3MakeMegas(); DRLG_L3MakeMegas();
if (!entry) { if(entry == 0) {
genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, 1, 0); genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, 1, 0);
if (genok) if(!genok) {
continue; genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, 0, 1);
genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, 0, 1); if(!genok && currlevel == 9) {
if (genok) genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, 0, 6);
continue; }
if (currlevel != 9) }
goto LABEL_24; } else if(entry == 1) {
genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, 0, 6); genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, 0, 0);
goto LABEL_23; if(!genok) {
} genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, 1, 1);
genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, 0, 0); ViewX += 2;
if (entry == 1) { ViewY -= 2;
if (genok) if(!genok && currlevel == 9) {
continue; genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, 0, 6);
genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, 1, 1); }
ViewX += 2; }
ViewY -= 2; } else {
if (genok) genok = DRLG_L3PlaceMiniSet(L3UP, 1, 1, -1, -1, 0, 0);
continue; if(!genok) {
if (currlevel != 9) genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, 0, 1);
goto LABEL_24; if(!genok && currlevel == 9) {
v24 = 0; genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, 1, 6);
LABEL_22: }
genok = DRLG_L3PlaceMiniSet(L3HOLDWARP, 1, 1, -1, -1, v24, 6); }
LABEL_23:
if (genok)
continue;
goto LABEL_24;
} }
if (genok) if(!genok && QuestStatus(QTYPE_ANVIL)) {
continue; genok = DRLG_L3Anvil();
genok = DRLG_L3PlaceMiniSet(L3DOWN, 1, 1, -1, -1, 0, 1);
if (genok)
continue;
if (currlevel == 9) {
v24 = 1;
goto LABEL_22;
} }
LABEL_24: } while(genok == TRUE);
if (!QuestStatus(QTYPE_ANVIL))
break;
genok = DRLG_L3Anvil();
} while (genok == 1);
DRLG_L3Pool(); DRLG_L3Pool();
} while (!lavapool); } while(!lavapool);
DRLG_L3PoolFix(); DRLG_L3PoolFix();
FixL3Warp(); FixL3Warp();
DRLG_L3PlaceRndSet(L3ISLE1, 70); DRLG_L3PlaceRndSet(L3ISLE1, 70);
@ -500,13 +485,13 @@ void DRLG_L3(int entry)
FixL3HallofHeroes(); FixL3HallofHeroes();
DRLG_L3River(); DRLG_L3River();
if (QuestStatus(QTYPE_ANVIL)) { if(QuestStatus(QTYPE_ANVIL)) {
dungeon[setpc_x + 7][setpc_y + 5] = 7; dungeon[setpc_x + 7][setpc_y + 5] = 7;
dungeon[setpc_x + 8][setpc_y + 5] = 7; dungeon[setpc_x + 8][setpc_y + 5] = 7;
dungeon[setpc_x + 9][setpc_y + 5] = 7; dungeon[setpc_x + 9][setpc_y + 5] = 7;
if (dungeon[setpc_x + 10][setpc_y + 5] == 17 if(dungeon[setpc_x + 10][setpc_y + 5] == 17 || dungeon[setpc_x + 10][setpc_y + 5] == 18) {
|| dungeon[setpc_x + 10][setpc_y + 5] == 18)
dungeon[setpc_x + 10][setpc_y + 5] = 45; dungeon[setpc_x + 10][setpc_y + 5] = 45;
}
} }
DRLG_PlaceThemeRooms(5, 10, 7, 0, 0); DRLG_PlaceThemeRooms(5, 10, 7, 0, 0);
@ -539,9 +524,10 @@ void DRLG_L3(int entry)
DRLG_L3PlaceRndSet(L3XTRA4, 25); DRLG_L3PlaceRndSet(L3XTRA4, 25);
DRLG_L3PlaceRndSet(L3XTRA5, 25); DRLG_L3PlaceRndSet(L3XTRA5, 25);
for (i = 0; i < 40; i++) { for(j = 0; j < DMAXY; j++) {
for (j = 0; j < 40; j++) for(i = 0; i < DMAXX; i++) {
pdungeon[i][j] = dungeon[i][j]; pdungeon[i][j] = dungeon[i][j];
}
} }
DRLG_Init_Globals(); DRLG_Init_Globals();

2
Source/drlg_l3.h

@ -13,7 +13,7 @@ int DRLG_L3Anvil();
void FixL3Warp(); void FixL3Warp();
void FixL3HallofHeroes(); void FixL3HallofHeroes();
void DRLG_L3LockRec(int x, int y); void DRLG_L3LockRec(int x, int y);
BOOLEAN DRLG_L3Lockout(); BOOL DRLG_L3Lockout();
void CreateL3Dungeon(unsigned int rseed, int entry); void CreateL3Dungeon(unsigned int rseed, int entry);
void DRLG_L3(int entry); void DRLG_L3(int entry);
void InitL3Dungeon(); void InitL3Dungeon();

Loading…
Cancel
Save