diff --git a/include/structs/map.h b/include/structs/map.h index 30aa81524..f165564c2 100644 --- a/include/structs/map.h +++ b/include/structs/map.h @@ -4,7 +4,7 @@ #include "structs/dungeon_entity.h" #include "structs/str_position.h" -#define MAX_ROOM_COUNT 24 // Empirical max, not sure if the code supports any more. +#define MAX_ROOM_COUNT 32 // Empirical max, not sure if the code supports any more. #define CORRIDOR_ROOM 0xFF enum TerrainType diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index 0cf9ae4b7..544acde64 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -177,11 +177,8 @@ typedef struct Dungeon /* 0xE8C0 */ Tile *tilePointers[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X]; u8 unk104C0; /* 0x104C4 */ RoomData roomData[MAX_ROOM_COUNT]; - u8 fill10764[0x10844 - 0x10764]; /* 0x10844 */ s16 naturalJunctionListCounts[MAX_ROOM_COUNT]; - u8 fill10874[0x10884 - 0x10874]; - /* 0x10884 */ Position naturalJunctionList[MAX_ROOM_COUNT][32]; // Arrays of room exits for each room. - u8 fill11444[0x11884 - 0x11484]; + /* 0x10884 */ Position naturalJunctionList[MAX_ROOM_COUNT][MAX_ROOM_COUNT]; // Arrays of room exits for each room. u8 unk11884[0x1194]; u8 fill12A18[0x12C24 - 0x12A18]; u8 unk12C24[0x930]; diff --git a/src/dungeon_map_access_1.c b/src/dungeon_map_access_1.c index 7e6ef6c1e..93a0cb76f 100644 --- a/src/dungeon_map_access_1.c +++ b/src/dungeon_map_access_1.c @@ -50,7 +50,7 @@ void sub_804AAD4(void) s32 maxRooms; s32 index; - for(index = 0; index < 0x20; index++) + for(index = 0; index < MAX_ROOM_COUNT; index++) { gDungeon->roomData[index].unk0 = 0; gDungeon->roomData[index].unk1 = 0; @@ -90,7 +90,7 @@ void sub_804AAD4(void) } - for(index = 0; index < 0x20; index++) + for(index = 0; index < MAX_ROOM_COUNT; index++) { room2 = &gDungeon->roomData[index]; if(room2 ->unk0 != 0)