diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index 10e356c7e..9d9219bb5 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -12,7 +12,7 @@ #define DUNGEON_MAX_SIZE_X 56 #define DUNGEON_MAX_SIZE_Y 32 -#define DUNGEON_MAX_SIZE_X_MUL_Y (DUNGEON_MAX_SIZE_X * DUNGEON_MAX_SIZE_Y) +#define DUNGEON_MAX_NUM_TILES (DUNGEON_MAX_SIZE_X * DUNGEON_MAX_SIZE_Y) #define DUNGEON_MAX_WILD_POKEMON 16 #define DUNGEON_MAX_WILD_POKEMON_BODY_SIZE 16 #define DUNGEON_MAX_POKEMON (MAX_TEAM_MEMBERS + DUNGEON_MAX_WILD_POKEMON) diff --git a/src/dungeon_generation.c b/src/dungeon_generation.c index bc7aeb00f..14ad20887 100644 --- a/src/dungeon_generation.c +++ b/src/dungeon_generation.c @@ -4077,7 +4077,7 @@ static void ShuffleSpawnPositions(struct PositionU8 *spawns, s32 count) */ static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse) { - struct PositionU8 validSpawns[DUNGEON_MAX_SIZE_X_MUL_Y]; + struct PositionU8 validSpawns[DUNGEON_MAX_NUM_TILES]; s32 count; s32 randIndex; s32 i; @@ -4413,7 +4413,7 @@ static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHou */ static void SpawnEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse) { - struct PositionU8 validSpawns[DUNGEON_MAX_SIZE_X_MUL_Y]; + struct PositionU8 validSpawns[DUNGEON_MAX_NUM_TILES]; s32 count; s32 randIndex; s32 i; diff --git a/src/dungeon_range.c b/src/dungeon_range.c index fa5bcfcc1..ab1905ade 100644 --- a/src/dungeon_range.c +++ b/src/dungeon_range.c @@ -266,7 +266,7 @@ EntityInfo* GetLeaderInfo(void) bool8 sub_8083660(DungeonPos *posDst) { - struct PositionU8 positions[DUNGEON_MAX_SIZE_X_MUL_Y]; + struct PositionU8 positions[DUNGEON_MAX_NUM_TILES]; s32 yLoop, xLoop; Entity *leader = GetLeader(); s32 randX, randY; @@ -284,13 +284,13 @@ bool8 sub_8083660(DungeonPos *posDst) for (xLoop = 0; xLoop < DUNGEON_MAX_SIZE_X; xLoop++) { y = randY; - if (count >= DUNGEON_MAX_SIZE_X_MUL_Y) + if (count >= DUNGEON_MAX_NUM_TILES) break; for (yLoop = 0; yLoop < DUNGEON_MAX_SIZE_Y; yLoop++) { bool8 setPosition = FALSE; const Tile *tile = GetTile(x, y); - if (count >= DUNGEON_MAX_SIZE_X_MUL_Y) + if (count >= DUNGEON_MAX_NUM_TILES) break; if (i == 0) { if (GetTerrainType(tile) == TERRAIN_TYPE_NORMAL