Browse Source

Document variables in drlg files

pull/831/head^2
Anders Jenbo 6 years ago
parent
commit
9821ff72d1
  1. 100
      Source/drlg_l1.cpp
  2. 1605
      Source/drlg_l2.cpp
  3. 531
      Source/drlg_l3.cpp
  4. 337
      Source/drlg_l4.cpp

100
Source/drlg_l1.cpp

@ -5,17 +5,27 @@
*/
#include "all.h"
/** 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];
/** Specifies whether a single player quest DUN has been loaded. */
BOOL L5setloadflag;
/** Specifies whether to generate a horizontal room at position 1 in the Cathedral. */
int HR1;
/** Specifies whether to generate a horizontal room at position 2 in the Cathedral. */
int HR2;
/** Specifies whether to generate a horizontal room at position 3 in the Cathedral. */
int HR3;
/** Specifies whether to generate a vertical room at position 1 in the Cathedral. */
int VR1;
/** Specifies whether to generate a vertical room at position 2 in the Cathedral. */
int VR2;
/** Specifies whether to generate a vertical room at position 3 in the Cathedral. */
int VR3;
/** Contains the contents of the single player quest DUN file. */
BYTE *L5pSetPiece;
/** Contains shadows for 2x2 blocks of base tile IDs in the Cathedral. */
const ShadowStruct SPATS[37] = {
// clang-format off
// strig, s1, s2, s3, nv1, nv2, nv3
@ -60,6 +70,7 @@ const ShadowStruct SPATS[37] = {
};
// BUGFIX: This array should contain an additional 0 (207 elements).
/** Maps tile IDs to their corresponding base tile ID. */
const BYTE BSTYPES[206] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 0, 0,
@ -85,6 +96,7 @@ const BYTE BSTYPES[206] = {
};
// BUGFIX: This array should contain an additional 0 (207 elements).
/** Maps tile IDs to their corresponding undecorated tile ID. */
const BYTE L5BTYPES[206] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 0, 0,
@ -108,13 +120,91 @@ const BYTE L5BTYPES[206] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0
};
const BYTE STAIRSUP[] = { 4, 4, 13, 13, 13, 13, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 0, 66, 6, 0, 63, 64, 65, 0, 0, 67, 68, 0, 0, 0, 0, 0 };
const BYTE L5STAIRSUP[] = { 4, 4, 22, 22, 22, 22, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 0, 66, 23, 0, 63, 64, 65, 0, 0, 67, 68, 0, 0, 0, 0, 0 };
const BYTE STAIRSDOWN[] = { 4, 3, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 62, 57, 58, 0, 61, 59, 60, 0, 0, 0, 0, 0 };
const BYTE LAMPS[] = { 2, 2, 13, 0, 13, 13, 129, 0, 130, 128 };
const BYTE PWATERIN[] = { 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 202, 200, 200, 84, 0, 0, 199, 203, 203, 83, 0, 0, 85, 206, 80, 81, 0, 0, 0, 134, 135, 0, 0, 0, 0, 0, 0, 0, 0 };
/** Miniset: stairs up on a corner wall. */
const BYTE STAIRSUP[] = {
// clang-format off
4, 4, // width, height
13, 13, 13, 13, // search
2, 2, 2, 2,
13, 13, 13, 13,
13, 13, 13, 13,
0, 66, 6, 0, // replace
63, 64, 65, 0,
0, 67, 68, 0,
0, 0, 0, 0,
// clang-format on
};
/** Miniset: stairs up. */
const BYTE L5STAIRSUP[] = {
// clang-format off
4, 4, // width, height
22, 22, 22, 22, // search
2, 2, 2, 2,
13, 13, 13, 13,
13, 13, 13, 13,
0, 66, 23, 0, // replace
63, 64, 65, 0,
0, 67, 68, 0,
0, 0, 0, 0,
// clang-format on
};
/** Miniset: stairs down. */
const BYTE STAIRSDOWN[] = {
// clang-format off
4, 3, // width, height
13, 13, 13, 13, // search
13, 13, 13, 13,
13, 13, 13, 13,
62, 57, 58, 0, // replace
61, 59, 60, 0,
0, 0, 0, 0,
// clang-format on
};
/** Miniset: candlestick. */
const BYTE LAMPS[] = {
// clang-format off
2, 2, // width, height
13, 0, // search
13, 13,
129, 0, // replace
130, 128,
// clang-format on
};
/** Miniset: Poisoned Water Supply entrance. */
const BYTE PWATERIN[] = {
// clang-format off
6, 6, // width, height
13, 13, 13, 13, 13, 13, // search
13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13,
0, 0, 0, 0, 0, 0, // replace
0, 202, 200, 200, 84, 0,
0, 199, 203, 203, 83, 0,
0, 85, 206, 80, 81, 0,
0, 0, 134, 135, 0, 0,
0, 0, 0, 0, 0, 0,
// clang-format on
};
/* data */
/**
* A lookup table for the 16 possible patterns of a 2x2 area,
* where each cell either contains a SW wall or it doesn't.
*/
BYTE L5ConvTbl[16] = { 22, 13, 1, 13, 2, 13, 13, 13, 4, 13, 1, 13, 2, 13, 16, 13 };
static void DRLG_PlaceDoor(int x, int y)

1605
Source/drlg_l2.cpp

File diff suppressed because it is too large Load Diff

531
Source/drlg_l3.cpp

@ -11,68 +11,477 @@ int abyssx;
int lockoutcnt;
BOOLEAN lockout[DMAXX][DMAXY];
/**
* A lookup table for the 16 possible patterns of a 2x2 area,
* where each cell either contains a SW wall or it doesn't.
*/
const BYTE L3ConvTbl[16] = { 8, 11, 3, 10, 1, 9, 12, 12, 6, 13, 4, 13, 2, 14, 5, 7 };
const BYTE L3UP[20] = { 3, 3, 8, 8, 0, 10, 10, 0, 7, 7, 0, 51, 50, 0, 48, 49, 0, 0, 0, 0 };
const BYTE L3DOWN[20] = { 3, 3, 8, 9, 7, 8, 9, 7, 0, 0, 0, 0, 47, 0, 0, 46, 0, 0, 0, 0 };
const BYTE L3HOLDWARP[20] = { 3, 3, 8, 8, 0, 10, 10, 0, 7, 7, 0, 125, 125, 0, 125, 125, 0, 0, 0, 0 };
const BYTE L3TITE1[34] = { 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 57, 58, 0, 0, 56, 55, 0, 0, 0, 0, 0 };
const BYTE L3TITE2[34] = { 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 61, 62, 0, 0, 60, 59, 0, 0, 0, 0, 0 };
const BYTE L3TITE3[34] = { 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 65, 66, 0, 0, 64, 63, 0, 0, 0, 0, 0 };
const BYTE L3TITE6[42] = { 5, 4, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 77, 78, 0, 0, 0, 76, 74, 75, 0, 0, 0, 0, 0, 0 };
const BYTE L3TITE7[42] = { 4, 5, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 83, 0, 0, 0, 82, 80, 0, 0, 81, 79, 0, 0, 0, 0, 0 };
const BYTE L3TITE8[20] = { 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 52, 0, 0, 0, 0 };
const BYTE L3TITE9[20] = { 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 53, 0, 0, 0, 0 };
const BYTE L3TITE10[20] = { 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 54, 0, 0, 0, 0 };
const BYTE L3TITE11[20] = { 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 67, 0, 0, 0, 0 };
const BYTE L3TITE12[6] = { 2, 1, 9, 7, 68, 0 };
const BYTE L3TITE13[6] = { 1, 2, 10, 7, 69, 0 };
const BYTE L3CREV1[6] = { 2, 1, 8, 7, 84, 85 };
const BYTE L3CREV2[6] = { 2, 1, 8, 11, 86, 87 };
const BYTE L3CREV3[6] = { 1, 2, 8, 10, 89, 88 };
const BYTE L3CREV4[6] = { 2, 1, 8, 7, 90, 91 };
const BYTE L3CREV5[6] = { 1, 2, 8, 11, 92, 93 };
const BYTE L3CREV6[6] = { 1, 2, 8, 10, 95, 94 };
const BYTE L3CREV7[6] = { 2, 1, 8, 7, 96, 101 };
const BYTE L3CREV8[6] = { 1, 2, 2, 8, 102, 97 };
const BYTE L3CREV9[6] = { 2, 1, 3, 8, 103, 98 };
const BYTE L3CREV10[6] = { 2, 1, 4, 8, 104, 99 };
const BYTE L3CREV11[6] = { 1, 2, 6, 8, 105, 100 };
const BYTE L3ISLE1[14] = { 2, 3, 5, 14, 4, 9, 13, 12, 7, 7, 7, 7, 7, 7 };
const BYTE L3ISLE2[14] = { 3, 2, 5, 2, 14, 13, 10, 12, 7, 7, 7, 7, 7, 7 };
const BYTE L3ISLE3[14] = { 2, 3, 5, 14, 4, 9, 13, 12, 29, 30, 25, 28, 31, 32 };
const BYTE L3ISLE4[14] = { 3, 2, 5, 2, 14, 13, 10, 12, 29, 26, 30, 31, 27, 32 };
const BYTE L3ISLE5[10] = { 2, 2, 5, 14, 13, 12, 7, 7, 7, 7 };
const BYTE L3XTRA1[4] = { 1, 1, 7, 106 };
const BYTE L3XTRA2[4] = { 1, 1, 7, 107 };
const BYTE L3XTRA3[4] = { 1, 1, 7, 108 };
const BYTE L3XTRA4[4] = { 1, 1, 9, 109 };
const BYTE L3XTRA5[4] = { 1, 1, 10, 110 };
const BYTE L3ANVIL[244] = {
11, 11, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 29, 26, 26, 26,
26, 26, 30, 0, 0, 0, 29, 34, 33, 33,
37, 36, 33, 35, 30, 0, 0, 25, 33, 37,
27, 32, 31, 36, 33, 28, 0, 0, 25, 37,
32, 7, 7, 7, 31, 27, 32, 0, 0, 25,
28, 7, 7, 7, 7, 2, 2, 2, 0, 0,
25, 35, 30, 7, 7, 7, 29, 26, 30, 0,
0, 25, 33, 35, 26, 30, 29, 34, 33, 28,
0, 0, 31, 36, 33, 33, 35, 34, 33, 37,
32, 0, 0, 0, 31, 27, 27, 27, 27, 27,
32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0
/** Miniset: Stairs up. */
const BYTE L3UP[] = {
// clang-format off
3, 3, // width, height
8, 8, 0, // search
10, 10, 0,
7, 7, 0,
51, 50, 0, // replace
48, 49, 0,
0, 0, 0,
// clang-format on
};
/** Miniset: Stairs down. */
const BYTE L3DOWN[] = {
// clang-format off
3, 3, // width, height
8, 9, 7, // search
8, 9, 7,
0, 0, 0,
0, 47, 0, // replace
0, 46, 0,
0, 0, 0,
// clang-format on
};
/** Miniset: Stairs up to town. */
const BYTE L3HOLDWARP[] = {
// clang-format off
3, 3, // width, height
8, 8, 0, // search
10, 10, 0,
7, 7, 0,
125, 125, 0, // replace
125, 125, 0,
0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite white stalactite 1. */
const BYTE L3TITE1[] = {
// clang-format off
4, 4, // width, height
7, 7, 7, 7, // search
7, 7, 7, 7,
7, 7, 7, 7,
7, 7, 7, 7,
0, 0, 0, 0, // replace
0, 57, 58, 0,
0, 56, 55, 0,
0, 0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite white stalactite 2. */
const BYTE L3TITE2[] = {
// clang-format off
4, 4, // width, height
7, 7, 7, 7, // search
7, 7, 7, 7,
7, 7, 7, 7,
7, 7, 7, 7,
0, 0, 0, 0, // replace
0, 61, 62, 0,
0, 60, 59, 0,
0, 0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite white stalactite 3. */
const BYTE L3TITE3[] = {
// clang-format off
4, 4, // width, height
7, 7, 7, 7, // search
7, 7, 7, 7,
7, 7, 7, 7,
7, 7, 7, 7,
0, 0, 0, 0, // replace
0, 65, 66, 0,
0, 64, 63, 0,
0, 0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite white stalactite horizontal. */
const BYTE L3TITE6[] = {
// clang-format off
5, 4, // width, height
7, 7, 7, 7, 7, // search
7, 7, 7, 0, 7,
7, 7, 7, 0, 7,
7, 7, 7, 7, 7,
0, 0, 0, 0, 0, // replace
0, 77, 78, 0, 0,
0, 76, 74, 75, 0,
0, 0, 0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite white stalactite vertical. */
const BYTE L3TITE7[] = {
// clang-format off
4, 5, // width, height
7, 7, 7, 7, // search
7, 7, 0, 7,
7, 7, 7, 7,
7, 7, 7, 7,
7, 7, 7, 7,
0, 0, 0, 0, // replace
0, 83, 0, 0,
0, 82, 80, 0,
0, 81, 79, 0,
0, 0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite 1. */
const BYTE L3TITE8[] = {
// clang-format off
3, 3, // width, height
7, 7, 7, // search
7, 7, 7,
7, 7, 7,
0, 0, 0, // replace
0, 52, 0,
0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite 2. */
const BYTE L3TITE9[] = {
// clang-format off
3, 3, // width, height
7, 7, 7, // search
7, 7, 7,
7, 7, 7,
0, 0, 0, // replace
0, 53, 0,
0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite 3. */
const BYTE L3TITE10[] = {
// clang-format off
3, 3, // width, height
7, 7, 7, // search
7, 7, 7,
7, 7, 7,
0, 0, 0, // replace
0, 54, 0,
0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite 4. */
const BYTE L3TITE11[] = {
// clang-format off
3, 3, // width, height
7, 7, 7, // search
7, 7, 7,
7, 7, 7,
0, 0, 0, // replace
0, 67, 0,
0, 0, 0,
// clang-format on
};
/** Miniset: Stalagmite on vertical wall. */
const BYTE L3TITE12[] = {
// clang-format off
2, 1, // width, height
9, 7, // search
68, 0, // replace
// clang-format on
};
/** Miniset: Stalagmite on horizontal wall. */
const BYTE L3TITE13[] = {
// clang-format off
1, 2, // width, height
10, // search
7,
69, // replace
0,
// clang-format on
};
/** Miniset: Cracked vertical wall 1. */
const BYTE L3CREV1[] = {
// clang-format off
2, 1, // width, height
8, 7, // search
84, 85, // replace
// clang-format on
};
/** Miniset: Cracked vertical wall - north corner. */
const BYTE L3CREV2[] = {
// clang-format off
2, 1, // width, height
8, 11, // search
86, 87, // replace
// clang-format on
};
/** Miniset: Cracked horizontal wall 1. */
const BYTE L3CREV3[] = {
// clang-format off
1, 2, // width, height
8, // search
10,
89, // replace
88,
// clang-format on
};
/** Miniset: Cracked vertical wall 2. */
const BYTE L3CREV4[] = {
// clang-format off
2, 1, // width, height
8, 7, // search
90, 91, // replace
// clang-format on
};
/** Miniset: Cracked horizontal wall - north corner. */
const BYTE L3CREV5[] = {
// clang-format off
1, 2, // width, height
8, // search
11,
92, // replace
93,
// clang-format on
};
/** Miniset: Cracked horizontal wall 2. */
const BYTE L3CREV6[] = {
// clang-format off
1, 2, // width, height
8, // search
10,
95, // replace
94,
// clang-format on
};
/** Miniset: Cracked vertical wall - west corner. */
const BYTE L3CREV7[] = {
// clang-format off
2, 1, // width, height
8, 7, // search
96, 101, // replace
// clang-format on
};
/** Miniset: Cracked horizontal wall - north. */
const BYTE L3CREV8[] = {
// clang-format off
1, 2, // width, height
2, // search
8,
102, // replace
97,
// clang-format on
};
/** Miniset: Cracked vertical wall - east corner. */
const BYTE L3CREV9[] = {
// clang-format off
2, 1, // width, height
3, 8, // search
103, 98, // replace
// clang-format on
};
/** Miniset: Cracked vertical wall - west. */
const BYTE L3CREV10[] = {
// clang-format off
2, 1, // width, height
4, 8, // search
104, 99, // replace
// clang-format on
};
/** Miniset: Cracked horizontal wall - south corner. */
const BYTE L3CREV11[] = {
// clang-format off
1, 2, // width, height
6, // search
8,
105, // replace
100,
// clang-format on
};
/** Miniset: Replace broken wall with floor 1. */
const BYTE L3ISLE1[] = {
// clang-format off
2, 3, // width, height
5, 14, // search
4, 9,
3, 12,
7, 7, // replace
7, 7,
7, 7,
// clang-format on
};
/** Miniset: Replace small wall with floor 2. */
const BYTE L3ISLE2[] = {
// clang-format off
3, 2, // width, height
5, 2, 14, // search
13, 10, 12,
7, 7, 7, // replace
7, 7, 7,
// clang-format on
};
/** Miniset: Replace small wall with lava 1. */
const BYTE L3ISLE3[] = {
// clang-format off
2, 3, // width, height
5, 14, // search
4, 9,
13, 12,
29, 30, // replace
25, 28,
31, 32,
// clang-format on
};/** Miniset: Replace small wall with lava 2. */
const BYTE L3ISLE4[] = {
// clang-format off
3, 2, // width, height
5, 2, 14, // search
13, 10, 12,
29, 26, 30, // replace
31, 27, 32,
// clang-format on
};
/** Miniset: Replace small wall with floor 3. */
const BYTE L3ISLE5[] = {
// clang-format off
2, 2, // width, height
5, 14, // search
13, 12,
7, 7, // replace
7, 7,
// clang-format on
};
/** Miniset: Use random floor tile 1. */
const BYTE L3XTRA1[] = {
// clang-format off
1, 1, // width, height
7, // search
106, // replace
// clang-format on
};
/** Miniset: Use random floor tile 2. */
const BYTE L3XTRA2[] = {
// clang-format off
1, 1, // width, height
7, // search
107, // replace
// clang-format on
};
/** Miniset: Use random floor tile 3. */
const BYTE L3XTRA3[] = {
// clang-format off
1, 1, // width, height
7, // search
108, // replace
// clang-format on
};
/** Miniset: Use random horizontal wall tile. */
const BYTE L3XTRA4[] = {
// clang-format off
1, 1, // width, height
9, // search
109, // replace
// clang-format on
};
/** Miniset: Use random vertical wall tile. */
const BYTE L3XTRA5[] = {
// clang-format off
1, 1, // width, height
10, // search
110, // replace
// clang-format on
};
/** Miniset: Anvil of Fury island. */
const BYTE L3ANVIL[] = {
// clang-format on
11, 11, // width, height
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // search
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // replace
0, 0, 29, 26, 26, 26, 26, 26, 30, 0, 0,
0, 29, 34, 33, 33, 37, 36, 33, 35, 30, 0,
0, 25, 33, 37, 27, 32, 31, 36, 33, 28, 0,
0, 25, 37, 32, 7, 7, 7, 31, 27, 32, 0,
0, 25, 28, 7, 7, 7, 7, 2, 2, 2, 0,
0, 25, 35, 30, 7, 7, 7, 29, 26, 30, 0,
0, 25, 33, 35, 26, 30, 29, 34, 33, 28, 0,
0, 31, 36, 33, 33, 35, 34, 33, 37, 32, 0,
0, 0, 31, 27, 27, 27, 27, 27, 32, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// clang-format on
};
static void InitL3Dungeon()

337
Source/drlg_l4.cpp

@ -25,257 +25,104 @@ BYTE L4dungeon[80][80];
BYTE dung[20][20];
//int dword_52A4DC;
/**
* A lookup table for the 16 possible patterns of a 2x2 area,
* where each cell either contains a SW wall or it doesn't.
*/
const BYTE L4ConvTbl[16] = { 30, 6, 1, 6, 2, 6, 6, 6, 9, 6, 1, 6, 2, 6, 3, 6 };
const BYTE L4USTAIRS[42] = {
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
0,
0,
0,
0,
36,
38,
35,
0,
37,
34,
33,
32,
0,
0,
31,
0,
0,
0,
0,
0
/** Miniset: Stairs up. */
const BYTE L4USTAIRS[] = {
// clang-format off
4, 5, // width, height
6, 6, 6, 6, // search
6, 6, 6, 6,
6, 6, 6, 6,
6, 6, 6, 6,
6, 6, 6, 6,
0, 0, 0, 0, // replace
36, 38, 35, 0,
37, 34, 33, 32,
0, 0, 31, 0,
0, 0, 0, 0,
// clang-format on
};
const BYTE L4TWARP[42] = {
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
0,
0,
0,
0,
134,
136,
133,
0,
135,
132,
131,
130,
0,
0,
129,
0,
0,
0,
0,
0
/** Miniset: Stairs up to town. */
const BYTE L4TWARP[] = {
// clang-format off
4, 5, // width, height
6, 6, 6, 6, // search
6, 6, 6, 6,
6, 6, 6, 6,
6, 6, 6, 6,
6, 6, 6, 6,
0, 0, 0, 0, // replace
134, 136, 133, 0,
135, 132, 131, 130,
0, 0, 129, 0,
0, 0, 0, 0,
// clang-format on
};
const BYTE L4DSTAIRS[52] = {
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
0,
0,
0,
0,
0,
0,
0,
45,
41,
0,
0,
44,
43,
40,
0,
0,
46,
42,
39,
0,
0,
0,
0,
0,
0
/** Miniset: Stairs down. */
const BYTE L4DSTAIRS[] = {
// clang-format off
5, 5, // width, height
6, 6, 6, 6, 6, // search
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
0, 0, 0, 0, 0, // replace
0, 0, 45, 41, 0,
0, 44, 43, 40, 0,
0, 46, 42, 39, 0,
0, 0, 0, 0, 0,
// clang-format on
};
const BYTE L4PENTA[52] = {
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
0,
0,
0,
0,
0,
0,
98,
100,
103,
0,
0,
99,
102,
105,
0,
0,
101,
104,
106,
0,
0,
0,
0,
0,
0
/** Miniset: Pentagram. */
const BYTE L4PENTA[] = {
// clang-format off
5, 5, // width, height
6, 6, 6, 6, 6, // search
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
0, 0, 0, 0, 0, // replace
0, 98, 100, 103, 0,
0, 99, 102, 105, 0,
0, 101, 104, 106, 0,
0, 0, 0, 0, 0,
// clang-format on
};
const BYTE L4PENTA2[52] = {
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
0,
0,
0,
0,
0,
0,
107,
109,
112,
0,
0,
108,
111,
114,
0,
0,
110,
113,
115,
0,
0,
0,
0,
0,
0
/** Miniset: Pentagram portal. */
const BYTE L4PENTA2[] = {
// clang-format off
5, 5, // width, height
6, 6, 6, 6, 6, // search
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
6, 6, 6, 6, 6,
0, 0, 0, 0, 0, // replace
0, 107, 109, 112, 0,
0, 108, 111, 114, 0,
0, 110, 113, 115, 0,
0, 0, 0, 0, 0,
// clang-format on
};
/** Maps tile IDs to their corresponding undecorated tile ID. */
const BYTE L4BTYPES[140] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 0, 0,

Loading…
Cancel
Save