diff --git a/code/source/rnd/gfx.cpp b/code/source/rnd/gfx.cpp index 83517a8..203d8d8 100644 --- a/code/source/rnd/gfx.cpp +++ b/code/source/rnd/gfx.cpp @@ -55,17 +55,17 @@ namespace rnd { -1, -1, -1, - GROUP_DUNGEON_WOODFALL_TEMPLE, - GROUP_DUNGEON_SNOWHEAD_TEMPLE, - GROUP_DUNGEON_GREAT_BAY, - GROUP_DUNGEON_STONE_TOWER, - GROUP_DUNGEON_PIRATE_FORTRESS, - GROUP_DUNGEON_BENEATH_THE_WELL, - GROUP_DUNGEON_IKANA_CASTLE, - GROUP_DUNGEON_SECRET_SHRINE, - GROUP_DUNGEON_THE_MOON, - GROUP_SWAMP_SKULLTULA_HOUSE, - GROUP_OCEAN_SKULLTULA_HOUSE, + DUNGEON_WOODFALL, + DUNGEON_SNOWHEAD, + DUNGEON_GREAT_BAY, + DUNGEON_STONE_TOWER, + -1, + -1, + -1, + -1, + -1, + -1, + -1, }; static bool IsDungeonDiscovered(s8 dungeonId) { @@ -77,22 +77,22 @@ namespace rnd { } // A dungeon is considered discovered if we've visited the dungeon or have the map, //Check for Woodfall Temple Map - if (dungeonId == 0) { + if (dungeonId == DUNGEON_WOODFALL) { hasMap = saveData.inventory.woodfall_dungeon_items.map.Value(); sceneId = 0x1B; } //Check for Snowhead Temple Map - else if (dungeonId == 1) { + else if (dungeonId == DUNGEON_SNOWHEAD) { hasMap = saveData.inventory.snowhead_dungeon_items.map.Value(); sceneId = 0x21; } //Check for Great Bay Temple Map - else if (dungeonId == 2) { + else if (dungeonId == DUNGEON_GREAT_BAY) { hasMap = saveData.inventory.great_bay_dungeon_items.map.Value(); sceneId = 0x49; } //Check for Stone Tower Temple Map - else if (dungeonId == 3) { + else if (dungeonId == DUNGEON_STONE_TOWER) { hasMap = saveData.inventory.stone_tower_dungeon_items.map.Value(); sceneId = 0x16; } diff --git a/code/source/rnd/savefile.cpp b/code/source/rnd/savefile.cpp index 8a20cc6..cd4dd7e 100644 --- a/code/source/rnd/savefile.cpp +++ b/code/source/rnd/savefile.cpp @@ -843,7 +843,7 @@ namespace rnd { u32 numBits = sizeof(u32) * 8; u32 idx = sceneNum / numBits; if (idx < SAVEFILE_SCENES_DISCOVERED_IDX_COUNT) { - u32 bit = 1 << (sceneNum - (idx * numBits)); + u32 bit = 1 << abs(sceneNum - (idx * numBits)); return (gExtSaveData.scenesDiscovered[idx] & bit) != 0; } return 0; @@ -857,7 +857,7 @@ namespace rnd { u16 numBits = sizeof(u32) * 8; u32 idx = sceneNum / numBits; if (idx < SAVEFILE_SCENES_DISCOVERED_IDX_COUNT) { - u32 sceneBit = 1 << (sceneNum - (idx * numBits)); + u32 sceneBit = 1 << abs(sceneNum - (idx * numBits)); gExtSaveData.scenesDiscovered[idx] |= sceneBit; } }