Browse Source

Move crypt code to crypt.cpp

pull/4929/head
Anders Jenbo 4 years ago
parent
commit
a633951947
  1. 16
      Source/levels/crypt.cpp
  2. 1
      Source/levels/crypt.h
  3. 12
      Source/levels/drlg_l1.cpp

16
Source/levels/crypt.cpp

@ -1,6 +1,7 @@
#include "levels/crypt.h"
#include "engine/point.hpp"
#include "items.h"
#include "levels/drlg_l1.h"
namespace devilution {
@ -763,4 +764,19 @@ void CryptSubstitution()
}
}
void SetCryptSetPieceRoom()
{
for (int j = dminPosition.y; j < dmaxPosition.y; j++) {
for (int i = dminPosition.x; i < dmaxPosition.x; i++) {
if (dPiece[i][j] == 289) {
UberRow = i;
UberCol = j;
}
if (dPiece[i][j] == 316) {
CornerStone.position = { i, j };
}
}
}
}
} // namespace devilution

1
Source/levels/crypt.h

@ -23,5 +23,6 @@ void SetCornerRoom();
void FixCryptDirtTiles();
bool PlaceCryptStairs(lvl_entry entry);
void CryptSubstitution();
void SetCryptSetPieceRoom();
} // namespace devilution

12
Source/levels/drlg_l1.cpp

@ -1324,17 +1324,7 @@ void CreateL5Dungeon(uint32_t rseed, lvl_entry entry)
Pass3();
if (leveltype == DTYPE_CRYPT) {
for (int j = dminPosition.y; j < dmaxPosition.y; j++) {
for (int i = dminPosition.x; i < dmaxPosition.x; i++) {
if (dPiece[i][j] == 289) {
UberRow = i;
UberCol = j;
}
if (dPiece[i][j] == 316) {
CornerStone.position = { i, j };
}
}
}
SetCryptSetPieceRoom();
}
}

Loading…
Cancel
Save