Manages loading and saving of dungeon room data. More...
#include <dungeon_room_loader.h>
Public Member Functions | |
DungeonRoomLoader (Rom *rom) | |
absl::Status | LoadRoom (int room_id, zelda3::Room &room) |
absl::Status | LoadAllRooms (std::array< zelda3::Room, 0x128 > &rooms) |
absl::Status | LoadRoomEntrances (std::array< zelda3::RoomEntrance, 0x8C > &entrances) |
void | LoadDungeonRoomSize () |
uint64_t | GetTotalRoomSize () const |
absl::Status | LoadAndRenderRoomGraphics (zelda3::Room &room) |
absl::Status | ReloadAllRoomGraphics (std::array< zelda3::Room, 0x128 > &rooms) |
const std::vector< int64_t > & | GetRoomSizePointers () const |
const std::vector< int64_t > & | GetRoomSizes () const |
const std::unordered_map< int, int > & | GetRoomSizeAddresses () const |
const std::unordered_map< int, ImVec4 > & | GetRoomPalette () const |
Private Attributes | |
Rom * | rom_ |
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 21 of file dungeon_room_loader.h.
|
inlineexplicit |
Definition at line 23 of file dungeon_room_loader.h.
absl::Status yaze::editor::DungeonRoomLoader::LoadRoom | ( | int | room_id, |
zelda3::Room & | room | ||
) |
Definition at line 16 of file dungeon_room_loader.cc.
References yaze::Rom::is_loaded(), yaze::zelda3::Room::LoadObjects(), yaze::zelda3::LoadRoomFromRom(), and rom_.
Referenced by yaze::editor::DungeonEditorV2::DrawDebugControlsCard(), and yaze::editor::DungeonEditorV2::DrawRoomTab().
absl::Status yaze::editor::DungeonRoomLoader::LoadAllRooms | ( | std::array< zelda3::Room, 0x128 > & | rooms | ) |
Definition at line 30 of file dungeon_room_loader.cc.
References yaze::zelda3::CalculateRoomSize(), yaze::Rom::is_loaded(), LoadDungeonRoomSize(), yaze::zelda3::LoadRoomFromRom(), LOG_DEBUG, yaze::Rom::palette_group(), yaze::Rom::paletteset_ids, yaze::Rom::ReadWord(), RETURN_IF_ERROR, rom_, room_palette_, room_size_addresses_, room_size_pointers_, and room_sizes_.
absl::Status yaze::editor::DungeonRoomLoader::LoadRoomEntrances | ( | std::array< zelda3::RoomEntrance, 0x8C > & | entrances | ) |
Definition at line 128 of file dungeon_room_loader.cc.
References yaze::Rom::is_loaded(), and rom_.
Referenced by yaze::editor::DungeonEditorV2::Load().
void yaze::editor::DungeonRoomLoader::LoadDungeonRoomSize | ( | ) |
Definition at line 145 of file dungeon_room_loader.cc.
References room_size_addresses_, room_sizes_, and total_room_size_.
Referenced by LoadAllRooms().
|
inline |
Definition at line 32 of file dungeon_room_loader.h.
References total_room_size_.
absl::Status yaze::editor::DungeonRoomLoader::LoadAndRenderRoomGraphics | ( | zelda3::Room & | room | ) |
Definition at line 181 of file dungeon_room_loader.cc.
References yaze::zelda3::Room::blockset, yaze::Rom::is_loaded(), yaze::zelda3::Room::LoadRoomGraphics(), yaze::zelda3::Room::RenderRoomGraphics(), and rom_.
Referenced by ReloadAllRoomGraphics().
absl::Status yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics | ( | std::array< zelda3::Room, 0x128 > & | rooms | ) |
Definition at line 195 of file dungeon_room_loader.cc.
References yaze::Rom::is_loaded(), LoadAndRenderRoomGraphics(), and rom_.
|
inline |
Definition at line 39 of file dungeon_room_loader.h.
References room_size_pointers_.
|
inline |
Definition at line 40 of file dungeon_room_loader.h.
References room_sizes_.
|
inline |
Definition at line 41 of file dungeon_room_loader.h.
References room_size_addresses_.
|
inline |
Definition at line 42 of file dungeon_room_loader.h.
References room_palette_.
|
private |
Definition at line 45 of file dungeon_room_loader.h.
Referenced by LoadAllRooms(), LoadAndRenderRoomGraphics(), LoadRoom(), LoadRoomEntrances(), and ReloadAllRoomGraphics().
|
private |
Definition at line 47 of file dungeon_room_loader.h.
Referenced by GetRoomSizePointers(), and LoadAllRooms().
|
private |
Definition at line 48 of file dungeon_room_loader.h.
Referenced by GetRoomSizes(), LoadAllRooms(), and LoadDungeonRoomSize().
|
private |
Definition at line 49 of file dungeon_room_loader.h.
Referenced by GetRoomSizeAddresses(), LoadAllRooms(), and LoadDungeonRoomSize().
|
private |
Definition at line 50 of file dungeon_room_loader.h.
Referenced by GetRoomPalette(), and LoadAllRooms().
|
private |
Definition at line 51 of file dungeon_room_loader.h.
Referenced by GetTotalRoomSize(), and LoadDungeonRoomSize().