decompile dungeon_generation

This commit is contained in:
DizzyEggg
2024-11-12 12:30:12 +01:00
parent f97df99fdf
commit 102403cd9a
5 changed files with 226 additions and 667 deletions

View File

@@ -15,4 +15,15 @@ enum FloorType {
FLOOR_TYPE_RESCUE, // Rescuing another player
};
// Helper type used to make explicit the possible secondary structures which can be randomly rolled to generate in the dungeon algorithm.
enum SecondaryStructureType {
SECONDARY_STRUCTURE_NONE, // No secondary structure will be generated.
SECONDARY_STRUCTURE_MAZE_PLUS_DOT, // One of 3 secondary structures depending on the dimensions of the room. If the room has odd dimensions, the result is a maze room. Otherwise, if the room has dimensions of at least `5x5`, a cross or plus pattern is made instead. If both fail, a single tile of secondary terrain will be placed in the center of the room.
SECONDARY_STRUCTURE_CHECKERBOARD, // If the room has odd dimensions, a checkerboard pattern made of randomly placed diagonal stripes of secondary terrain will be generated. If not, no secondary structure will be generated.
SECONDARY_STRUCTURE_POOL, // If the room has dimensions of at least `5x5`, a rectangular pool of secondary terrain will be generated. If not, no secondary structure will be generated.
SECONDARY_STRUCTURE_ISLAND, // If the room has dimensions of at least `6x6`, an island of items and a warp tile surrounded by secondary terrain will be generated. If not, no secondary structure will be generated.
SECONDARY_STRUCTURE_DIVIDER, // A "divider" of secondary terrain will split the room in half randomly either horizontally or vertically.
};
#endif

View File

@@ -18,6 +18,7 @@ enum TerrainType
TERRAIN_TYPE_IMPASSABLE_WALL = 1 << 4, // x10
TERRAIN_TYPE_SHOP = 1 << 5, // x20
TERRAIN_TYPE_IN_MONSTER_HOUSE = 1 << 6, // x40
TERRAIN_TYPE_UNK_7 = 1 << 7, // x80
TERRAIN_TYPE_UNK_8 = 1 << 8, // x100
TERRAIN_TYPE_STAIRS = 1 << 9, // x200
TERRAIN_TYPE_UNK_x400 = 1 << 10,