From 9821ff72d11e4d4da40cdd6bf62a5de62f711f17 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 6 Jul 2020 03:54:41 +0200 Subject: [PATCH] Document variables in drlg files --- Source/drlg_l1.cpp | 100 ++- Source/drlg_l2.cpp | 1605 +++++++++++++++++++++++++++++++++++++++++--- Source/drlg_l3.cpp | 531 +++++++++++++-- Source/drlg_l4.cpp | 337 +++------- 4 files changed, 2151 insertions(+), 422 deletions(-) diff --git a/Source/drlg_l1.cpp b/Source/drlg_l1.cpp index 655b40613..12bf22e9c 100644 --- a/Source/drlg_l1.cpp +++ b/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) diff --git a/Source/drlg_l2.cpp b/Source/drlg_l2.cpp index 17608cba6..f0d2678ae 100644 --- a/Source/drlg_l2.cpp +++ b/Source/drlg_l2.cpp @@ -22,119 +22,1502 @@ int Dir_Xadd[5] = { 0, 0, 1, 0, -1 }; int Dir_Yadd[5] = { 0, -1, 0, 1, 0 }; ShadowStruct SPATSL2[2] = { { 6, 3, 0, 3, 48, 0, 50 }, { 9, 3, 0, 3, 48, 0, 50 } }; //short word_48489A = 0; + BYTE BTYPESL2[161] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 17, 18, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; BYTE BSTYPESL2[161] = { 0, 1, 2, 3, 0, 0, 6, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 6, 6, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 6, 2, 2, 2, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 2, 2, 3, 3, 3, 3, 1, 1, 2, 2, 3, 3, 3, 3, 1, 1, 3, 3, 2, 2, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -BYTE VARCH1[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 7, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH2[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 8, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH3[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 6, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH4[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 9, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH5[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 14, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH6[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 13, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH7[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 16, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH8[] = { 2, 4, 3, 0, 3, 1, 3, 4, 0, 15, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH9[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 7, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH10[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 8, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH11[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 6, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH12[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 9, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH13[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 14, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH14[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 13, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH15[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 16, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH16[] = { 2, 4, 3, 0, 3, 8, 3, 4, 0, 15, 48, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH17[] = { 2, 3, 2, 7, 3, 4, 0, 7, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH18[] = { 2, 3, 2, 7, 3, 4, 0, 8, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH19[] = { 2, 3, 2, 7, 3, 4, 0, 6, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH20[] = { 2, 3, 2, 7, 3, 4, 0, 9, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH21[] = { 2, 3, 2, 7, 3, 4, 0, 14, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH22[] = { 2, 3, 2, 7, 3, 4, 0, 13, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH23[] = { 2, 3, 2, 7, 3, 4, 0, 16, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH24[] = { 2, 3, 2, 7, 3, 4, 0, 15, 141, 39, 47, 44, 0, 0 }; -BYTE VARCH25[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 7, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH26[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 8, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH27[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 6, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH28[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 9, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH29[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 14, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH30[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 13, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH31[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 16, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH32[] = { 2, 4, 3, 0, 3, 4, 3, 1, 0, 15, 48, 0, 51, 39, 47, 44, 0, 0 }; -BYTE VARCH33[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 7, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH34[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 8, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH35[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 6, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH36[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 9, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH37[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 14, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH38[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 13, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH39[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 16, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE VARCH40[] = { 2, 4, 2, 0, 3, 8, 3, 4, 0, 15, 142, 0, 51, 42, 47, 44, 0, 0 }; -BYTE HARCH1[] = { 3, 2, 3, 3, 0, 2, 5, 9, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH2[] = { 3, 2, 3, 3, 0, 2, 5, 6, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH3[] = { 3, 2, 3, 3, 0, 2, 5, 8, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH4[] = { 3, 2, 3, 3, 0, 2, 5, 7, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH5[] = { 3, 2, 3, 3, 0, 2, 5, 15, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH6[] = { 3, 2, 3, 3, 0, 2, 5, 16, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH7[] = { 3, 2, 3, 3, 0, 2, 5, 13, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH8[] = { 3, 2, 3, 3, 0, 2, 5, 14, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH9[] = { 3, 2, 3, 3, 0, 8, 5, 9, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH10[] = { 3, 2, 3, 3, 0, 8, 5, 6, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH11[] = { 3, 2, 3, 3, 0, 8, 5, 8, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH12[] = { 3, 2, 3, 3, 0, 8, 5, 7, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH13[] = { 3, 2, 3, 3, 0, 8, 5, 15, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH14[] = { 3, 2, 3, 3, 0, 8, 5, 16, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH15[] = { 3, 2, 3, 3, 0, 8, 5, 13, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH16[] = { 3, 2, 3, 3, 0, 8, 5, 14, 49, 46, 0, 43, 45, 0 }; -BYTE HARCH17[] = { 3, 2, 1, 3, 0, 8, 5, 9, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH18[] = { 3, 2, 1, 3, 0, 8, 5, 6, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH19[] = { 3, 2, 1, 3, 0, 8, 5, 8, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH20[] = { 3, 2, 1, 3, 0, 8, 5, 7, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH21[] = { 3, 2, 1, 3, 0, 8, 5, 15, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH22[] = { 3, 2, 1, 3, 0, 8, 5, 16, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH23[] = { 3, 2, 1, 3, 0, 8, 5, 13, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH24[] = { 3, 2, 1, 3, 0, 8, 5, 14, 140, 46, 0, 43, 45, 0 }; -BYTE HARCH25[] = { 3, 2, 3, 3, 0, 5, 2, 9, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH26[] = { 3, 2, 3, 3, 0, 5, 2, 6, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH27[] = { 3, 2, 3, 3, 0, 5, 2, 8, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH28[] = { 3, 2, 3, 3, 0, 5, 2, 7, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH29[] = { 3, 2, 3, 3, 0, 5, 2, 15, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH30[] = { 3, 2, 3, 3, 0, 5, 2, 16, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH31[] = { 3, 2, 3, 3, 0, 5, 2, 13, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH32[] = { 3, 2, 3, 3, 0, 5, 2, 14, 49, 46, 0, 40, 45, 0 }; -BYTE HARCH33[] = { 3, 2, 1, 3, 0, 9, 5, 9, 140, 46, 0, 40, 45, 0 }; -BYTE HARCH34[] = { 3, 2, 1, 3, 0, 9, 5, 6, 140, 46, 0, 40, 45, 0 }; -BYTE HARCH35[] = { 3, 2, 1, 3, 0, 9, 5, 8, 140, 46, 0, 40, 45, 0 }; -BYTE HARCH36[] = { 3, 2, 1, 3, 0, 9, 5, 7, 140, 46, 0, 40, 45, 0 }; -BYTE HARCH37[] = { 3, 2, 1, 3, 0, 9, 5, 15, 140, 46, 0, 40, 45, 0 }; -BYTE HARCH38[] = { 3, 2, 1, 3, 0, 9, 5, 16, 140, 46, 0, 40, 45, 0 }; -BYTE HARCH39[] = { 3, 2, 1, 3, 0, 9, 5, 13, 140, 46, 0, 40, 45, 0 }; -BYTE HARCH40[] = { 3, 2, 1, 3, 0, 9, 5, 14, 140, 46, 0, 40, 45, 0 }; -BYTE USTAIRS[] = { 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 72, 77, 0, 0, 76, 0, 0, 0, 0, 0, 0 }; -BYTE DSTAIRS[] = { 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 48, 71, 0, 0, 50, 78, 0, 0, 0, 0, 0 }; -BYTE WARPSTAIRS[] = { 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 158, 160, 0, 0, 159, 0, 0, 0, 0, 0, 0 }; -BYTE CRUSHCOL[] = { 3, 3, 3, 1, 3, 2, 6, 3, 3, 3, 3, 0, 0, 0, 0, 83, 0, 0, 0, 0 }; -BYTE BIG1[] = { 2, 2, 3, 3, 3, 3, 113, 0, 112, 0 }; -BYTE BIG2[] = { 2, 2, 3, 3, 3, 3, 114, 115, 0, 0 }; -BYTE BIG3[] = { 1, 2, 1, 1, 117, 116 }; -BYTE BIG4[] = { 2, 1, 2, 2, 118, 119 }; -BYTE BIG5[] = { 2, 2, 3, 3, 3, 3, 120, 122, 121, 123 }; -BYTE BIG6[] = { 1, 2, 1, 1, 125, 124 }; -BYTE BIG7[] = { 2, 1, 2, 2, 126, 127 }; -BYTE BIG8[] = { 2, 2, 3, 3, 3, 3, 128, 130, 129, 131 }; -BYTE BIG9[] = { 2, 2, 1, 3, 1, 3, 133, 135, 132, 134 }; -BYTE BIG10[] = { 2, 2, 2, 2, 3, 3, 136, 137, 3, 3 }; -BYTE RUINS1[] = { 1, 1, 1, 80 }; -BYTE RUINS2[] = { 1, 1, 1, 81 }; -BYTE RUINS3[] = { 1, 1, 1, 82 }; -BYTE RUINS4[] = { 1, 1, 2, 84 }; -BYTE RUINS5[] = { 1, 1, 2, 85 }; -BYTE RUINS6[] = { 1, 1, 2, 86 }; -BYTE RUINS7[] = { 1, 1, 8, 87 }; -BYTE PANCREAS1[] = { 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 0 }; -BYTE PANCREAS2[] = { 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0 }; -BYTE CTRDOOR1[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 9, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; -BYTE CTRDOOR2[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 8, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; -BYTE CTRDOOR3[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 6, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; -BYTE CTRDOOR4[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 7, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; -BYTE CTRDOOR5[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 15, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; -BYTE CTRDOOR6[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 13, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; -BYTE CTRDOOR7[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 16, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; -BYTE CTRDOOR8[] = { 3, 3, 3, 1, 3, 0, 4, 0, 0, 14, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0 }; + +/** Miniset: Arch vertical. */ +BYTE VARCH1[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 7, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH2[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 8, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on + }; +/** Miniset: Arch vertical. */ +BYTE VARCH3[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 6, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH4[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 9, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH5[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 14, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH6[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 13, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH7[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 16, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH8[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 1, + 3, 4, + 0, 15, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH9[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 7, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH10[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 8, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH11[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 6, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH12[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 9, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH13[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 14, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH14[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 13, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH15[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 16, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - corner. */ +BYTE VARCH16[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 8, + 3, 4, + 0, 15, + + 48, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH17[] = { + // clang-format off + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 7, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH18[] = { + // clang-format off + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 8, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH19[] = { + // clang-format off + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 6, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH20[] = { + // clang-format off + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 9, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH21[] = { + // clang-format off + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 14, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH22[] = { + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 13, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH23[] = { + // clang-format off + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 16, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - open wall. */ +BYTE VARCH24[] = { + // clang-format off + 2, 3, // width, height + + 2, 7, // search + 3, 4, + 0, 15, + + 141, 39, // replace + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH25[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 7, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH26[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 8, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH27[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 6, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH28[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 9, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH29[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 14, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH30[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 13, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH31[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 16, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical. */ +BYTE VARCH32[] = { + // clang-format off + 2, 4, // width, height + + 3, 0, // search + 3, 4, + 3, 1, + 0, 15, + + 48, 0, // replace + 51, 39, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH33[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 7, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH34[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 8, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH35[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 6, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH36[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 9, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH37[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 14, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH38[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 13, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH39[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 16, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch vertical - room west entrance. */ +BYTE VARCH40[] = { + // clang-format off + 2, 4, // width, height + + 2, 0, // search + 3, 8, + 3, 4, + 0, 15, + + 142, 0, // replace + 51, 42, + 47, 44, + 0, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH1[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 9, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH2[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 6, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH3[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 8, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH4[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 7, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH5[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 15, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH6[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 16, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH7[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 13, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH8[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 2, 5, 14, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH9[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 9, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH10[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 6, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH11[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 8, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH12[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 7, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH13[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 15, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH14[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 16, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH15[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 13, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - north corner. */ +BYTE HARCH16[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 8, 5, 14, + + 49, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH17[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 9, + + 140, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH18[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 6, + + 140, 46, 0, // Replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH19[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 8, + + 140, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH20[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 7, + + 140, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH21[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 15, + + 140, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH22[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 16, + + 140, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH23[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 13, + + 140, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - wall. */ +BYTE HARCH24[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 8, 5, 14, + + 140, 46, 0, // replace + 43, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH25[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 9, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH26[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 6, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH27[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 8, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH28[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 7, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH29[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 15, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH30[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 16, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH31[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 13, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal. */ +BYTE HARCH32[] = { + // clang-format off + 3, 2, // width, height + + 3, 3, 0, // search + 5, 2, 14, + + 49, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH33[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 9, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH34[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 6, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH35[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 8, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH36[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 7, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH37[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 15, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH38[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 16, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH39[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 13, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Arch horizontal - west corner. */ +BYTE HARCH40[] = { + // clang-format off + 3, 2, // width, height + + 1, 3, 0, // search + 9, 5, 14, + + 140, 46, 0, // replace + 40, 45, 0, + // clang-format on +}; +/** Miniset: Stairs up. */ +BYTE USTAIRS[] = { + // clang-format off + 4, 4, // width, height + + 3, 3, 3, 3, // search + 3, 3, 3, 3, + 3, 3, 3, 3, + 3, 3, 3, 3, + + 0, 0, 0, 0, // replace + 0, 72, 77, 0, + 0, 76, 0, 0, + 0, 0, 0, 0, + // clang-format on +}; +/** Miniset: Stairs down. */ +BYTE DSTAIRS[] = { + // clang-format off + 4, 4, // width, height + + 3, 3, 3, 3, // search + 3, 3, 3, 3, + 3, 3, 3, 3, + 3, 3, 3, 3, + + 0, 0, 0, 0, // replace + 0, 48, 71, 0, + 0, 50, 78, 0, + 0, 0, 0, 0, + // clang-format on +}; +/** Miniset: Stairs to town. */ +BYTE WARPSTAIRS[] = { + // clang-format off + 4, 4, // width, height + + 3, 3, 3, 3, // search + 3, 3, 3, 3, + 3, 3, 3, 3, + 3, 3, 3, 3, + + 0, 0, 0, 0, // replace + 0, 158, 160, 0, + 0, 159, 0, 0, + 0, 0, 0, 0, + // clang-format on +}; +/** Miniset: Crumbled south pillar. */ +BYTE CRUSHCOL[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 2, 6, 3, + 3, 3, 3, + + 0, 0, 0, // replace + 0, 83, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Vertical oil spill. */ +BYTE BIG1[] = { + // clang-format off + 2, 2, // width, height + + 3, 3, // search + 3, 3, + + 113, 0, // replace + 112, 0, + // clang-format on +}; +/** Miniset: Horizontal oil spill. */ +BYTE BIG2[] = { + // clang-format off + 2, 2, // width, height + + 3, 3, // search + 3, 3, + + 114, 115, // replace + 0, 0, + // clang-format on +}; +/** Miniset: Horizontal platform. */ +BYTE BIG3[] = { + // clang-format off + 1, 2, // width, height + + 1, // search + 1, + + 117, // replace + 116, + // clang-format on +}; +/** Miniset: Vertical platform. */ +BYTE BIG4[] = { + // clang-format off + 2, 1, // width, height + + 2, 2, // search + + 118, 119, // replace + // clang-format on +}; +/** Miniset: Large oil spill. */ +BYTE BIG5[] = { + // clang-format off + 2, 2, // width, height + + 3, 3, // search + 3, 3, + + 120, 122, // replace + 121, 123, + // clang-format on +}; +/** Miniset: Vertical wall with debris. */ +BYTE BIG6[] = { + // clang-format off + 1, 2, // width, height + + 1, // search + 1, + + 125, // replace + 124, + // clang-format on +}; +/** Miniset: Horizontal wall with debris. */ +BYTE BIG7[] = { + // clang-format off + 2, 1, // width, height + + 2, 2, // search + + 126, 127, // replace + // clang-format on +}; +/** Miniset: Rock pile. */ +BYTE BIG8[] = { + // clang-format off + 2, 2, // width, height + + 3, 3, // search + 3, 3, + + 128, 130, // replace + 129, 131, + // clang-format on +}; +/** Miniset: Vertical wall collapsed. */ +BYTE BIG9[] = { + // clang-format off + 2, 2, // width, height + + 1, 3, // search + 1, 3, + + 133, 135, // replace + 132, 134, + // clang-format on +}; +/** Miniset: Horizontal wall collapsed. */ +BYTE BIG10[] = { + // clang-format off + 2, 2, // width, height + + 2, 2, // search + 3, 3, + + 136, 137, // replace + 3, 3, + // clang-format on +}; +/** Miniset: Crumbled vertical wall 1. */ +BYTE RUINS1[] = { + // clang-format off + 1, 1, // width, height + + 1, // search + + 80, // replace + // clang-format on +}; +/** Miniset: Crumbled vertical wall 2. */ +BYTE RUINS2[] = { + // clang-format off + 1, 1, // width, height + + 1, // search + + 81, // replace + // clang-format on +}; +/** Miniset: Crumbled vertical wall 3. */ +BYTE RUINS3[] = { + // clang-format off + 1, 1, // width, height + + 1, // search + + 82, // replace + // clang-format on +}; +/** Miniset: Crumbled horizontal wall 1. */ +BYTE RUINS4[] = { + // clang-format off + 1, 1, // width, height + + 2, // search + + 84, // replace + // clang-format on +}; +/** Miniset: Crumbled horizontal wall 2. */ +BYTE RUINS5[] = { + // clang-format off + 1, 1, // width, height + + 2, // search + + 85, // replace + // clang-format on +}; +/** Miniset: Crumbled horizontal wall 3. */ +BYTE RUINS6[] = { + // clang-format off + 1, 1, // width, height + + 2, // search + + 86, // replace + // clang-format on +}; +/** Miniset: Crumbled north pillar. */ +BYTE RUINS7[] = { + // clang-format off + 1, 1, // width, height + + 8, // search + + 87, // replace + // clang-format on +}; +/** Miniset: Bloody gib 1. */ +BYTE PANCREAS1[] = { + // clang-format off + 5, 3, // width, height + + 3, 3, 3, 3, 3, // search + 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, + + 0, 0, 0, 0, 0, // replace + 0, 0, 108, 0, 0, + 0, 0, 0, 0, 0, + // clang-format on +}; +/** Miniset: Bloody gib 2. */ +BYTE PANCREAS2[] = { + // clang-format off + 5, 3, // width, height + + 3, 3, 3, 3, 3, // search + 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, + + 0, 0, 0, 0, 0, // replace + 0, 0, 110, 0, 0, + 0, 0, 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 1. */ +BYTE CTRDOOR1[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 9, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 2. */ +BYTE CTRDOOR2[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 8, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 3. */ +BYTE CTRDOOR3[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 6, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 4. */ +BYTE CTRDOOR4[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 7, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 5. */ +BYTE CTRDOOR5[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 15, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 6. */ +BYTE CTRDOOR6[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 13, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 7. */ +BYTE CTRDOOR7[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 16, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; +/** Miniset: Move vertical doors away from west pillar 8. */ +BYTE CTRDOOR8[] = { + // clang-format off + 3, 3, // width, height + + 3, 1, 3, // search + 0, 4, 0, + 0, 14, 0, + + 0, 4, 0, // replace + 0, 1, 0, + 0, 0, 0, + // clang-format on +}; + int Patterns[100][10] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 }, { 0, 0, 0, 0, 2, 0, 0, 0, 0, 3 }, diff --git a/Source/drlg_l3.cpp b/Source/drlg_l3.cpp index d45c66e50..ecb085d08 100644 --- a/Source/drlg_l3.cpp +++ b/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() diff --git a/Source/drlg_l4.cpp b/Source/drlg_l4.cpp index 0be518c0b..9c3fd94bb 100644 --- a/Source/drlg_l4.cpp +++ b/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,