Browse Source

dlrg: Place constants in an anonymous namespace (#1114)

pull/1116/head
Gleb Mazovetskiy 5 years ago committed by GitHub
parent
commit
86bc2ee9da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      Source/drlg_l1.cpp
  2. 7
      Source/drlg_l2.cpp
  3. 12
      Source/drlg_l3.cpp
  4. 5
      Source/drlg_l4.cpp

20
Source/drlg_l1.cpp

@ -7,6 +7,16 @@
DEVILUTION_BEGIN_NAMESPACE
int UberRow;
int UberCol;
bool IsUberRoomOpened;
int UberLeverRow;
int UberLeverCol;
bool IsUberLeverActivated;
int UberDiabloMonsterIndex;
namespace {
/** Represents a tile ID map of twice the size, repeating each tile of the original map in blocks of 4. */
BYTE L5dungeon[80][80];
BYTE L5dflags[DMAXX][DMAXY];
@ -18,13 +28,7 @@ int HR1;
int HR2;
/** Specifies whether to generate a horizontal room at position 3 in the Cathedral. */
int HR3;
int UberRow;
int UberCol;
bool IsUberRoomOpened;
int UberLeverRow;
int UberLeverCol;
bool IsUberLeverActivated;
int UberDiabloMonsterIndex;
/** Specifies whether to generate a vertical room at position 1 in the Cathedral. */
BOOL VR1;
/** Specifies whether to generate a vertical room at position 2 in the Cathedral. */
@ -472,6 +476,8 @@ BYTE CornerstoneRoomPattern[32] = { 5, 5, 4, 2, 2, 2, 6, 1, 111, 172, 0, 1, 1, 1
*/
BYTE L5ConvTbl[16] = { 22, 13, 1, 13, 2, 13, 13, 13, 4, 13, 1, 13, 2, 13, 16, 13 };
} // namespace
void DRLG_InitL5Vals()
{
int i, j, pc;

7
Source/drlg_l2.cpp

@ -10,12 +10,15 @@
DEVILUTION_BEGIN_NAMESPACE
BYTE predungeon[DMAXX][DMAXY];
namespace {
int nSx1;
int nSy1;
int nSx2;
int nSy2;
int nRoomCnt;
BYTE predungeon[DMAXX][DMAXY];
ROOMNODE RoomList[81];
HALLNODE *pHallList;
@ -1598,6 +1601,8 @@ int Patterns[100][10] = {
{ 0, 0, 0, 0, 255, 0, 0, 0, 0, 0 },
};
} // namespace
static BOOL DRLG_L2PlaceMiniSet(const BYTE *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int ldir)
{
int sx, sy, sw, sh, xx, yy, i, ii, numt, bailcnt;

12
Source/drlg_l3.cpp

@ -10,6 +10,8 @@
DEVILUTION_BEGIN_NAMESPACE
namespace {
/** This will be true if a lava pool has been generated for the level */
BOOLEAN lavapool;
int lockoutcnt;
@ -832,6 +834,8 @@ const BYTE byte_48A9C8[] = {
// clang-format on
};
} // namespace
static void InitL3Dungeon()
{
int i, j;
@ -2165,7 +2169,7 @@ static void DRLG_L3Wood()
FenceDoorFix();
}
BOOL DRLG_L3Anvil()
static BOOL DRLG_L3Anvil()
{
int sx, sy, sw, sh, xx, yy, ii, trys;
BOOL found;
@ -2226,7 +2230,7 @@ BOOL DRLG_L3Anvil()
return FALSE;
}
void FixL3Warp()
static void FixL3Warp()
{
int i, j;
@ -2246,7 +2250,7 @@ void FixL3Warp()
}
}
void FixL3HallofHeroes()
static void FixL3HallofHeroes()
{
int i, j;
@ -2273,7 +2277,7 @@ void FixL3HallofHeroes()
}
}
void DRLG_L3LockRec(int x, int y)
static void DRLG_L3LockRec(int x, int y)
{
if (!lockout[x][y]) {
return;

5
Source/drlg_l4.cpp

@ -15,6 +15,9 @@ int diabquad3x;
int diabquad3y;
int diabquad4x;
int diabquad4y;
namespace {
BOOL hallok[20];
int l4holdx;
int l4holdy;
@ -141,6 +144,8 @@ const BYTE L4BTYPES[140] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
} // namespace
static void DRLG_L4Shadows()
{
int x, y;

Loading…
Cancel
Save