Manages loading and saving of dungeon room data. More...
#include <dungeon_room_loader.h>

Private Attributes | |
| Rom * | rom_ |
| zelda3::GameData * | game_data_ = nullptr |
| std::vector< int64_t > | room_size_pointers_ |
| std::vector< int64_t > | room_sizes_ |
| std::unordered_map< int, int > | room_size_addresses_ |
| std::unordered_map< int, ImVec4 > | room_palette_ |
| uint64_t | total_room_size_ = 0 |
Manages loading and saving of dungeon room data.
This component handles all ROM-related operations for loading room data, calculating room sizes, and managing room graphics.
Definition at line 24 of file dungeon_room_loader.h.
|
inlineexplicit |
Definition at line 26 of file dungeon_room_loader.h.
|
inline |
Definition at line 29 of file dungeon_room_loader.h.
References yaze::editor::EditorContext::game_data, game_data_, yaze::editor::EditorContext::rom, and rom_.
|
inline |
Definition at line 33 of file dungeon_room_loader.h.
References game_data_, and rom_.
|
inline |
Definition at line 36 of file dungeon_room_loader.h.
Referenced by yaze::editor::DungeonEditorV2::RefreshRomBackedState().

|
inline |
|
inline |
Definition at line 38 of file dungeon_room_loader.h.
References game_data(), and game_data_.
Referenced by yaze::editor::DungeonEditorV2::RefreshRomBackedState(), yaze::test::DungeonEditorTestSuite::RunRoomSaveTest(), yaze::editor::DungeonEditorV2::SetGameData(), and yaze::editor::DungeonEditorV2::SetRom().

|
inline |
Definition at line 39 of file dungeon_room_loader.h.
References game_data_.
Referenced by SetGameData().
| absl::Status yaze::editor::DungeonRoomLoader::LoadRoom | ( | int | room_id, |
| zelda3::Room & | room ) |
Definition at line 21 of file dungeon_room_loader.cc.
References game_data_, yaze::Rom::is_loaded(), yaze::zelda3::LoadRoomFromRom(), rom_, and yaze::zelda3::Room::SetGameData().
Referenced by yaze::editor::DungeonRoomPanel::Draw(), yaze::editor::DungeonEditorV2::DrawRoomTab(), yaze::editor::DungeonEditorV2::OnRoomSelected(), and yaze::editor::DungeonEditorV2::RefreshRomBackedState().

| absl::Status yaze::editor::DungeonRoomLoader::LoadAllRooms | ( | DungeonRoomStore & | rooms | ) |
Definition at line 35 of file dungeon_room_loader.cc.
References yaze::zelda3::CalculateRoomSize(), yaze::gfx::PaletteGroupMap::dungeon_main, game_data_, yaze::Rom::is_loaded(), LoadDungeonRoomSize(), yaze::zelda3::LoadRoomHeaderFromRom(), LOG_DEBUG, yaze::zelda3::GameData::palette_groups, RETURN_IF_ERROR, rom_, room_palette_, room_size_addresses_, room_size_pointers_, room_sizes_, and yaze::editor::DungeonRoomStore::SetGameData().
| absl::Status yaze::editor::DungeonRoomLoader::LoadRoomEntrances | ( | std::array< zelda3::RoomEntrance, zelda3::kNumDungeonEntranceSlots > & | entrances | ) |
Definition at line 192 of file dungeon_room_loader.cc.
References yaze::Rom::is_loaded(), yaze::zelda3::kNumDungeonSpawnPoints, yaze::zelda3::kNumRegularDungeonEntrances, and rom_.
Referenced by yaze::editor::DungeonEditorV2::Load(), and yaze::editor::DungeonEditorV2::RefreshRomBackedState().

| absl::Status yaze::editor::DungeonRoomLoader::LoadDungeonSpawnPoints | ( | std::array< zelda3::DungeonSpawnPoint, zelda3::kNumDungeonSpawnPoints > & | spawn_points | ) |
Definition at line 212 of file dungeon_room_loader.cc.
References ASSIGN_OR_RETURN, yaze::Rom::is_loaded(), yaze::zelda3::kNumDungeonSpawnPoints, yaze::zelda3::DungeonSpawnPoint::Load(), and rom_.
Referenced by yaze::editor::DungeonEditorV2::Load(), and yaze::editor::DungeonEditorV2::RefreshRomBackedState().

| void yaze::editor::DungeonRoomLoader::LoadDungeonRoomSize | ( | ) |
Definition at line 227 of file dungeon_room_loader.cc.
References room_size_addresses_, room_sizes_, and total_room_size_.
Referenced by LoadAllRooms().
|
inline |
Definition at line 53 of file dungeon_room_loader.h.
References total_room_size_.
| absl::Status yaze::editor::DungeonRoomLoader::LoadAndRenderRoomGraphics | ( | zelda3::Room & | room | ) |
Definition at line 263 of file dungeon_room_loader.cc.
References yaze::Rom::is_loaded(), yaze::zelda3::Room::ReloadGraphics(), and rom_.
Referenced by ReloadAllRoomGraphics().

| absl::Status yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics | ( | DungeonRoomStore & | rooms | ) |
Definition at line 273 of file dungeon_room_loader.cc.
References yaze::editor::DungeonRoomStore::GetIfLoaded(), yaze::Rom::is_loaded(), LoadAndRenderRoomGraphics(), rom_, and yaze::editor::DungeonRoomStore::size().

|
inline |
Definition at line 60 of file dungeon_room_loader.h.
References room_size_pointers_.
|
inline |
Definition at line 63 of file dungeon_room_loader.h.
References room_sizes_.
|
inline |
Definition at line 64 of file dungeon_room_loader.h.
References room_size_addresses_.
|
inline |
Definition at line 67 of file dungeon_room_loader.h.
References room_palette_.
|
private |
Definition at line 72 of file dungeon_room_loader.h.
Referenced by context(), LoadAllRooms(), LoadAndRenderRoomGraphics(), LoadDungeonSpawnPoints(), LoadRoom(), LoadRoomEntrances(), ReloadAllRoomGraphics(), rom(), SetContext(), and SetRom().
|
private |
Definition at line 73 of file dungeon_room_loader.h.
Referenced by context(), game_data(), LoadAllRooms(), LoadRoom(), SetContext(), and SetGameData().
|
private |
Definition at line 75 of file dungeon_room_loader.h.
Referenced by GetRoomSizePointers(), and LoadAllRooms().
|
private |
Definition at line 76 of file dungeon_room_loader.h.
Referenced by GetRoomSizes(), LoadAllRooms(), and LoadDungeonRoomSize().
|
private |
Definition at line 77 of file dungeon_room_loader.h.
Referenced by GetRoomSizeAddresses(), LoadAllRooms(), and LoadDungeonRoomSize().
|
private |
Definition at line 78 of file dungeon_room_loader.h.
Referenced by GetRoomPalette(), and LoadAllRooms().
|
private |
Definition at line 79 of file dungeon_room_loader.h.
Referenced by GetTotalRoomSize(), and LoadDungeonRoomSize().