diff --git a/src/app/editor/overworld/overworld_editor.cc b/src/app/editor/overworld/overworld_editor.cc index 7d4dfe2e..049a3199 100644 --- a/src/app/editor/overworld/overworld_editor.cc +++ b/src/app/editor/overworld/overworld_editor.cc @@ -21,6 +21,7 @@ #include "app/gui/style.h" #include "app/gui/zeml.h" #include "app/rom.h" +#include "app/zelda3/common.h" #include "app/zelda3/overworld/overworld.h" #include "imgui/imgui.h" #include "imgui_memory_editor.h" @@ -1366,8 +1367,9 @@ absl::Status OverworldEditor::UpdateUsageStats() { if (BeginChild("UnusedSpritesetScroll", ImVec2(0, 0), true, ImGuiWindowFlags_HorizontalScrollbar)) { for (int i = 0; i < 0x81; i++) { - auto entrance_name = rom_.resource_label()->GetLabel( - "Dungeon Entrance Names", core::HexByte(i)); + auto entrance_name = rom_.resource_label()->CreateOrGetLabel( + "Dungeon Entrance Names", core::HexByte(i), + zelda3::kEntranceNames[i].data()); std::string str = absl::StrFormat("%#x - %s", i, entrance_name); if (Selectable(str.c_str(), selected_entrance_ == i, overworld_.entrances().at(i).deleted diff --git a/src/app/zelda3/common.h b/src/app/zelda3/common.h index c5cff655..34fd8721 100644 --- a/src/app/zelda3/common.h +++ b/src/app/zelda3/common.h @@ -45,6 +45,141 @@ class GameEntity { virtual void UpdateMapProperties(uint16_t map_id) = 0; }; +constexpr std::string_view kEntranceNames[] = { + "Link's House Intro", + "Link's House Post-intro", + "Sanctuary", + "Hyrule Castle West", + "Hyrule Castle Central", + "Hyrule Castle East", + "Death Mountain Express (Lower)", + "Death Mountain Express (Upper)", + "Eastern Palace", + "Desert Palace Central", + "Desert Palace East", + "Desert Palace West", + "Desert Palace Boss Lair", + "Kakariko Elder's House West", + "Kakariko Elder's House East", + "Kakariko Angry Bros West", + "Kakariko Angry Bros East", + "Mad Batter Lair", + "Under Lumberjacks' Weird Tree", + "Death Mountain Maze 0000", + "Death Mountain Maze 0001", + "Turtle Rock Mountainface 1", + "Death Mountain Cape Heart Piece Cave (Lower)", + "Death Mountain Cape Heart Piece Cave (Upper)", + "Turtle Rock Mountainface 2", + "Turtle Rock Mountainface 3", + "Death Mountain Maze 0002", + "Death Mountain Maze 0003", + "Death Mountain Maze 0004", + "Death Mountain Maze 0005", + "Death Mountain Maze 0006", + "Death Mountain Maze 0007", + "Death Mountain Maze 0008", + "Spectacle Rock Maze 1", + "Spectacle Rock Maze 2", + "Spectacle Rock Maze 3", + "Hyrule Castle Tower", + "Swamp Palace", + "Palace of Darkness", + "Misery Mire", + "Skull Woods 1", + "Skull Woods 2", + "Skull Woods Big Chest", + "Skull Woods Boss Lair", + "Lost Woods Thieves' Lair", + "Ice Palace", + "Death Mountain Escape West", + "Death Mountain Escape East", + "Death Mountain Elder's Cave (Lower)", + "Death Mountain Elder's Cave (Upper)", + "Hyrule Castle Secret Cellar", + "Tower of Hera", + "Thieves's Town", + "Turtle Rock Main", + "Ganon's Pyramid Sanctum (Lower)", + "Ganon's Tower", + "Fairy Cave 1", + "Kakariko Western Well", + "Death Mountain Maze 0009", + "Death Mountain Maze 0010", + "Treasure Shell Game 1", + "Storyteller Cave 1", + "Snitch House 1", + "Snitch House 2", + "SickBoy House", + "Byrna Gauntlet", + "Kakariko Pub South", + "Kakariko Pub North", + "Kakariko Inn", + "Sahasrahlah's Disco Infernum", + "Kakariko's Lame Shop", + "Village of Outcasts Chest Game", + "Village of Outcasts Orphanage", + "Kakariko Library", + "Kakariko Storage Shed", + "Kakariko Sweeper Lady's House", + "Potion Shop", + "Aginah's Desert Cottage", + "Watergate", + "Death Mountain Maze 0011", + "Fairy Cave 2", + "Refill Cave 0001", + "Refill Cave 0002", + "The Bomb \"Shop\"", + "Village of Outcasts Retirement Center", + "Fairy Cave 3", + "Good Bee Cave", + "General Store 1", + "General Store 2", + "Archery Game", + "Storyteller Cave 2", + "Hall of the Invisibility Cape", + "Pond of Wishing", + "Pond of Happiness", + "Fairy Cave 4", + "Swamp of Evil Heart Piece Hall", + "General Store 3", + "Blind's Old Hideout", + "Storyteller Cave 3", + "Warped Pond of Wishing", + "Chez Smithies", + "Fortune Teller 1", + "Fortune Teller 2", + "Chest Shell Game 2", + "Storyteller Cave 4", + "Storyteller Cave 5", + "Storyteller Cave 6", + "Village House 1", + "Thief Hideout 1", + "Thief Hideout 2", + "Heart Piece Cave 1", + "Thief Hideout 3", + "Refill Cave 3", + "Fairy Cave 5", + "Heart Piece Cave 2", + "Hyrule Castle Prison", + "Hyrule Castle Throne Room", + "Hyrule Tower Agahnim's Sanctum", + "Skull Woods 3 (Drop In)", + "Skull Woods 4 (Drop In)", + "Skull Woods 5 (Drop In)", + "Skull Woods 6 (Drop In)", + "Lost Woods Thieves' Hideout (Drop In)", + "Ganon's Pyramid Sanctum (Upper)", + "Fairy Cave 6 (Drop In)", + "Hyrule Castle Secret Cellar (Drop In)", + "Mad Batter Lair (Drop In)", + "Under Lumberjacks' Weird Tree (Drop In)", + "Kakariko Western Well (Drop In)", + "Hyrule Sewers Goodies Room (Drop In)", + "Chris Houlihan Room (Drop In)", + "Heart Piece Cave 3 (Drop In)", + "Ice Rod Cave"}; + static const std::string TileTypeNames[] = { "$00 Nothing (standard floor)", "$01 Collision", @@ -304,7 +439,6 @@ static const std::string TileTypeNames[] = { "$FF Door X top? (unused?)"}; } // namespace zelda3 - } // namespace yaze #endif // YAZE_APP_ZELDA3_COMMON_H diff --git a/src/app/zelda3/dungeon/object_renderer.h b/src/app/zelda3/dungeon/object_renderer.h index c1743046..c83990d5 100644 --- a/src/app/zelda3/dungeon/object_renderer.h +++ b/src/app/zelda3/dungeon/object_renderer.h @@ -16,7 +16,6 @@ namespace yaze { namespace zelda3 { - struct PseudoVram { std::array sheets; std::vector palettes; @@ -50,8 +49,5 @@ class DungeonObjectRenderer : public SharedRom { gfx::Bitmap bitmap_; }; - - } // namespace zelda3 - } // namespace yaze \ No newline at end of file diff --git a/src/app/zelda3/dungeon/room.h b/src/app/zelda3/dungeon/room.h index 1250eae1..33e884a1 100644 --- a/src/app/zelda3/dungeon/room.h +++ b/src/app/zelda3/dungeon/room.h @@ -16,7 +16,6 @@ namespace yaze { namespace zelda3 { - // room_object_layout_pointer 0x882D // room_object_pointer 0x874C // 0x882D -> readlong() -> 2FEF04 (04EF2F -> toPC->026F2F) -> @@ -465,145 +464,7 @@ constexpr std::string_view kRoomNames[] = { "Mazeblock Cave", "Smith Peg Cave"}; -constexpr std::string_view kEntranceNames[] = { - "Link's House Intro", - "Link's House Post-intro", - "Sanctuary", - "Hyrule Castle West", - "Hyrule Castle Central", - "Hyrule Castle East", - "Death Mountain Express (Lower)", - "Death Mountain Express (Upper)", - "Eastern Palace", - "Desert Palace Central", - "Desert Palace East", - "Desert Palace West", - "Desert Palace Boss Lair", - "Kakariko Elder's House West", - "Kakariko Elder's House East", - "Kakariko Angry Bros West", - "Kakariko Angry Bros East", - "Mad Batter Lair", - "Under Lumberjacks' Weird Tree", - "Death Mountain Maze 0000", - "Death Mountain Maze 0001", - "Turtle Rock Mountainface 1", - "Death Mountain Cape Heart Piece Cave (Lower)", - "Death Mountain Cape Heart Piece Cave (Upper)", - "Turtle Rock Mountainface 2", - "Turtle Rock Mountainface 3", - "Death Mountain Maze 0002", - "Death Mountain Maze 0003", - "Death Mountain Maze 0004", - "Death Mountain Maze 0005", - "Death Mountain Maze 0006", - "Death Mountain Maze 0007", - "Death Mountain Maze 0008", - "Spectacle Rock Maze 1", - "Spectacle Rock Maze 2", - "Spectacle Rock Maze 3", - "Hyrule Castle Tower", - "Swamp Palace", - "Palace of Darkness", - "Misery Mire", - "Skull Woods 1", - "Skull Woods 2", - "Skull Woods Big Chest", - "Skull Woods Boss Lair", - "Lost Woods Thieves' Lair", - "Ice Palace", - "Death Mountain Escape West", - "Death Mountain Escape East", - "Death Mountain Elder's Cave (Lower)", - "Death Mountain Elder's Cave (Upper)", - "Hyrule Castle Secret Cellar", - "Tower of Hera", - "Thieves's Town", - "Turtle Rock Main", - "Ganon's Pyramid Sanctum (Lower)", - "Ganon's Tower", - "Fairy Cave 1", - "Kakariko Western Well", - "Death Mountain Maze 0009", - "Death Mountain Maze 0010", - "Treasure Shell Game 1", - "Storyteller Cave 1", - "Snitch House 1", - "Snitch House 2", - "SickBoy House", - "Byrna Gauntlet", - "Kakariko Pub South", - "Kakariko Pub North", - "Kakariko Inn", - "Sahasrahlah's Disco Infernum", - "Kakariko's Lame Shop", - "Village of Outcasts Chest Game", - "Village of Outcasts Orphanage", - "Kakariko Library", - "Kakariko Storage Shed", - "Kakariko Sweeper Lady's House", - "Potion Shop", - "Aginah's Desert Cottage", - "Watergate", - "Death Mountain Maze 0011", - "Fairy Cave 2", - "Refill Cave 0001", - "Refill Cave 0002", - "The Bomb \"Shop\"", - "Village of Outcasts Retirement Center", - "Fairy Cave 3", - "Good Bee Cave", - "General Store 1", - "General Store 2", - "Archery Game", - "Storyteller Cave 2", - "Hall of the Invisibility Cape", - "Pond of Wishing", - "Pond of Happiness", - "Fairy Cave 4", - "Swamp of Evil Heart Piece Hall", - "General Store 3", - "Blind's Old Hideout", - "Storyteller Cave 3", - "Warped Pond of Wishing", - "Chez Smithies", - "Fortune Teller 1", - "Fortune Teller 2", - "Chest Shell Game 2", - "Storyteller Cave 4", - "Storyteller Cave 5", - "Storyteller Cave 6", - "Village House 1", - "Thief Hideout 1", - "Thief Hideout 2", - "Heart Piece Cave 1", - "Thief Hideout 3", - "Refill Cave 3", - "Fairy Cave 5", - "Heart Piece Cave 2", - "Hyrule Castle Prison", - "Hyrule Castle Throne Room", - "Hyrule Tower Agahnim's Sanctum", - "Skull Woods 3 (Drop In)", - "Skull Woods 4 (Drop In)", - "Skull Woods 5 (Drop In)", - "Skull Woods 6 (Drop In)", - "Lost Woods Thieves' Hideout (Drop In)", - "Ganon's Pyramid Sanctum (Upper)", - "Fairy Cave 6 (Drop In)", - "Hyrule Castle Secret Cellar (Drop In)", - "Mad Batter Lair (Drop In)", - "Under Lumberjacks' Weird Tree (Drop In)", - "Kakariko Western Well (Drop In)", - "Hyrule Sewers Goodies Room (Drop In)", - "Chris Houlihan Room (Drop In)", - "Heart Piece Cave 3 (Drop In)", - "Ice Rod Cave"}; - - - } // namespace zelda3 - } // namespace yaze #endif diff --git a/src/app/zelda3/dungeon/room_entrance.h b/src/app/zelda3/dungeon/room_entrance.h index 634065f0..978c8487 100644 --- a/src/app/zelda3/dungeon/room_entrance.h +++ b/src/app/zelda3/dungeon/room_entrance.h @@ -8,11 +8,6 @@ namespace yaze { namespace zelda3 { - -// ============================================================================ -// Dungeon Entrances Related Variables -// ============================================================================ - // 0x14577 word value for each room constexpr int kEntranceRoom = 0x14813; @@ -349,10 +344,7 @@ class RoomEntrance { uint8_t camera_boundary_fe_; }; - - } // namespace zelda3 - } // namespace yaze #endif // YAZE_APP_ZELDA3_DUNGEON_ROOM_ENTRANCE_H diff --git a/src/app/zelda3/dungeon/room_tag.h b/src/app/zelda3/dungeon/room_tag.h index 9e677708..d1a139f6 100644 --- a/src/app/zelda3/dungeon/room_tag.h +++ b/src/app/zelda3/dungeon/room_tag.h @@ -6,7 +6,6 @@ namespace yaze { namespace zelda3 { - static const std::string RoomEffect[] = {"Nothing", "Nothing", "Moving Floor", @@ -88,7 +87,6 @@ static const std::string RoomTag[] = {"Nothing", } // namespace zelda3 - } // namespace yaze #endif // YAZE_APP_ZELDA3_DUNGEON_ROOM_TAG_H \ No newline at end of file