Browse Source

[hellfire] fix drlg_l4 functions

pull/898/head
galaxyhaxz 6 years ago committed by Anders Jenbo
parent
commit
d22d223ba9
  1. 18
      Source/drlg_l4.cpp

18
Source/drlg_l4.cpp

@ -241,9 +241,9 @@ static void L4makeDmt()
for (j = 0, dmty = 1; dmty <= 77; j++, dmty += 2) { for (j = 0, dmty = 1; dmty <= 77; j++, dmty += 2) {
for (i = 0, dmtx = 1; dmtx <= 77; i++, dmtx += 2) { for (i = 0, dmtx = 1; dmtx <= 77; i++, dmtx += 2) {
val = 8 * L4dungeon[dmtx + 1][dmty + 1] val = 8 * L4dungeon[dmtx + 1][dmty + 1]
+ 4 * L4dungeon[dmtx][dmty + 1] + 4 * L4dungeon[dmtx][dmty + 1]
+ 2 * L4dungeon[dmtx + 1][dmty] + 2 * L4dungeon[dmtx + 1][dmty]
+ L4dungeon[dmtx][dmty]; + L4dungeon[dmtx][dmty];
idx = L4ConvTbl[val]; idx = L4ConvTbl[val];
dungeon[i][j] = idx; dungeon[i][j] = idx;
} }
@ -902,8 +902,10 @@ static void DRLG_L4Subs()
for (y = 0; y < DMAXY; y++) { for (y = 0; y < DMAXY; y++) {
for (x = 0; x < DMAXX; x++) { for (x = 0; x < DMAXX; x++) {
if (random_(0, 3) == 0) { rv = random_(0, 3);
c = L4BTYPES[dungeon[x][y]]; if (rv == 0) {
c = dungeon[x][y];
c = L4BTYPES[c];
if (c != 0 && dflags[x][y] == 0) { if (c != 0 && dflags[x][y] == 0) {
rv = random_(0, 16); rv = random_(0, 16);
i = -1; i = -1;
@ -923,8 +925,10 @@ static void DRLG_L4Subs()
} }
for (y = 0; y < DMAXY; y++) { for (y = 0; y < DMAXY; y++) {
for (x = 0; x < DMAXX; x++) { for (x = 0; x < DMAXX; x++) {
if (random_(0, 10) == 0) { rv = random_(0, 10);
if (L4BTYPES[dungeon[x][y]] == 6 && dflags[x][y] == 0) { if (rv == 0) {
c = dungeon[x][y];
if (L4BTYPES[c] == 6 && dflags[x][y] == 0) {
dungeon[x][y] = random_(0, 3) + 95; dungeon[x][y] = random_(0, 3) + 95;
} }
} }

Loading…
Cancel
Save