#include <dungeon_room_store.h>

Public Member Functions | |
| DungeonRoomStore ()=default | |
| DungeonRoomStore (Rom *rom, zelda3::GameData *game_data=nullptr) | |
| size_t | size () const |
| zelda3::Room & | operator[] (size_t index) |
| const zelda3::Room & | operator[] (size_t index) const |
| zelda3::Room * | TryEnsureRoom (int room_id) |
| const zelda3::Room * | TryEnsureRoom (int room_id) const |
| zelda3::Room * | GetIfMaterialized (int room_id) |
| const zelda3::Room * | GetIfMaterialized (int room_id) const |
| zelda3::Room * | GetIfLoaded (int room_id) |
| const zelda3::Room * | GetIfLoaded (int room_id) const |
| void | SetRom (Rom *rom) |
| void | SetGameData (zelda3::GameData *game_data) |
| Rom * | rom () const |
| zelda3::GameData * | game_data () const |
| void | Clear () |
| template<typename Fn > | |
| void | ForEachMaterialized (Fn &&fn) |
| template<typename Fn > | |
| void | ForEachMaterialized (Fn &&fn) const |
| template<typename Fn > | |
| void | ForEachLoaded (Fn &&fn) |
| template<typename Fn > | |
| void | ForEachLoaded (Fn &&fn) const |
| int | LoadedCount () const |
Static Public Attributes | |
| static constexpr size_t | kRoomCount = zelda3::kNumberOfRooms |
Private Member Functions | |
| zelda3::Room & | EnsureRoom (size_t index) const |
Private Attributes | |
| Rom * | rom_ = nullptr |
| zelda3::GameData * | game_data_ = nullptr |
| std::array< std::unique_ptr< zelda3::Room >, kRoomCount > | rooms_ |
Definition at line 14 of file dungeon_room_store.h.
|
default |
|
inlineexplicit |
Definition at line 19 of file dungeon_room_store.h.
|
inline |
Definition at line 22 of file dungeon_room_store.h.
References kRoomCount.
Referenced by yaze::editor::DungeonEditorV2::ApplyEntranceRenderContext(), yaze::editor::DungeonEditorV2::BeginCollisionUndoSnapshot(), yaze::editor::DungeonEditorV2::BeginUndoSnapshot(), yaze::editor::DungeonEditorV2::BeginWaterFillUndoSnapshot(), yaze::editor::BuildDungeonSelectionSnapshot(), yaze::editor::DungeonUsageTracker::CalculateUsageStats(), yaze::editor::CustomCollisionPanel::CollectRoomEntries(), yaze::editor::WaterFillPanel::CollectZones(), yaze::editor::DungeonEditorV2::CurrentRoomHasPendingChanges(), yaze::editor::ChestEditorPanel::Draw(), yaze::editor::ItemEditorPanel::Draw(), yaze::editor::SpriteEditorPanel::Draw(), yaze::editor::RoomGraphicsContent::Draw(), yaze::editor::DungeonCanvasViewer::DrawConnectedRoomMatrix(), yaze::editor::DungeonRoomSelector::DrawGroupedRoomList(), yaze::editor::DungeonCanvasViewer::DrawHeaderHiddenMetadataHud(), yaze::editor::ObjectSelectorContent::DrawInteractionSummary(), yaze::editor::RoomTagEditorPanel::DrawQuickAssign(), yaze::editor::DungeonEditorV2::DrawRoomTab(), yaze::editor::ObjectEditorContent::DrawSelectedDoorInfo(), yaze::editor::ObjectEditorContent::DrawSelectedItemInfo(), yaze::editor::ObjectEditorContent::DrawSelectedSpriteInfo(), yaze::editor::ObjectEditorContent::DuplicateSelectedSprite(), yaze::editor::DungeonEditorV2::FinalizeCollisionUndoAction(), yaze::editor::DungeonEditorV2::FinalizeUndoAction(), yaze::editor::DungeonEditorV2::FinalizeWaterFillUndoAction(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::editor::TileObjectHandler::GetRoom(), yaze::editor::ObjectTileEditorPanel::HasRenderableRoomContext(), yaze::editor::DungeonEditorV2::Load(), yaze::editor::DungeonEditorV2::OnRoomSelected(), yaze::editor::DungeonEditorV2::OnRoomSelected(), yaze::editor::ObjectTileEditorPanel::OpenForObject(), yaze::editor::DungeonEditorV2::OpenGraphicsEditorForObject(), yaze::editor::DungeonRoomSelector::PassesEntityTypeFilter(), yaze::editor::MinecartTrackEditorPanel::RebuildAuditCache(), yaze::editor::RoomTagEditorPanel::RebuildRoomCountCache(), yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics(), yaze::editor::DungeonEditorV2::ReloadWaterFillZones(), yaze::editor::ObjectTileEditorPanel::RenderObjectPreview(), yaze::editor::ObjectTileEditorPanel::RenderTile8Atlas(), yaze::editor::DungeonEditorV2::ResolveSelectedEntranceBlocksetForRoom(), yaze::editor::DungeonEditorV2::RestoreRoomCustomCollision(), yaze::editor::DungeonEditorV2::RestoreRoomObjects(), yaze::editor::DungeonEditorV2::RestoreRoomWaterFill(), yaze::test::DungeonEditorTestSuite::RunObjectManipulationTest(), yaze::editor::DungeonEditorV2::Save(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::SaveAllPotItemsForProject(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::SaveWaterFillZones(), yaze::editor::DungeonEditorV2::SwapRoomInPanel(), and yaze::editor::DungeonEditorV2::TotalRoomCount().
|
inline |
Definition at line 24 of file dungeon_room_store.h.
References EnsureRoom().

|
inline |
Definition at line 25 of file dungeon_room_store.h.
References EnsureRoom().

|
inline |
Definition at line 29 of file dungeon_room_store.h.
References TryEnsureRoom().
Referenced by yaze::editor::DungeonCanvasViewer::DrawHeaderHiddenMetadataHud(), yaze::editor::DungeonCanvasViewer::EnsureRoomLoadedForConnectedView(), yaze::editor::DungeonCanvasViewer::LoadAndRenderRoomGraphics(), yaze::editor::DungeonCanvasViewer::PrepareActiveRoomForCanvasFrame(), yaze::editor::DungeonCanvasViewer::PrepareRoomCompositeBitmap(), and TryEnsureRoom().

|
inline |
Definition at line 34 of file dungeon_room_store.h.
References EnsureRoom(), and kRoomCount.

|
inline |
Definition at line 41 of file dungeon_room_store.h.
References GetIfMaterialized().
Referenced by yaze::editor::DungeonEditorV2::CurrentRoomHasPendingChanges(), yaze::editor::DungeonWorkbenchContent::DrawRecentRoomTabs(), GetIfLoaded(), GetIfLoaded(), GetIfMaterialized(), yaze::editor::RoomMatrixContent::GetRoomMetadata(), yaze::editor::DungeonEditorV2::RefreshRomBackedState(), yaze::editor::DungeonEditorV2::RollbackSaveTransaction(), and yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::SaveWaterFillZones().

|
inline |
Definition at line 46 of file dungeon_room_store.h.
References kRoomCount, and rooms_.
|
inline |
Definition at line 53 of file dungeon_room_store.h.
References GetIfMaterialized().
Referenced by yaze::editor::DungeonMapPanel::Draw(), yaze::editor::RoomMatrixContent::Draw(), yaze::editor::DungeonRoomSelector::DrawGroupedRoomList(), yaze::editor::DungeonRoomSelector::DrawRoomSelectorInternal(), yaze::editor::RoomMatrixContent::GetRoomColor(), yaze::editor::DungeonRoomSelector::PassesEntityTypeFilter(), and yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics().

|
inline |
Definition at line 58 of file dungeon_room_store.h.
References GetIfMaterialized().

|
inline |
Definition at line 63 of file dungeon_room_store.h.
References ForEachMaterialized(), rom(), rom_, and yaze::zelda3::Room::SetRom().
Referenced by yaze::editor::DungeonEditorV2::RefreshRomBackedState(), and yaze::editor::DungeonEditorV2::SetRom().

|
inline |
Definition at line 68 of file dungeon_room_store.h.
References ForEachMaterialized(), game_data(), game_data_, and yaze::zelda3::Room::SetGameData().
Referenced by yaze::editor::DungeonRoomLoader::LoadAllRooms(), yaze::editor::DungeonEditorV2::RefreshRomBackedState(), and yaze::editor::DungeonEditorV2::SetGameData().

|
inline |
Definition at line 74 of file dungeon_room_store.h.
References rom_.
Referenced by yaze::editor::RoomMatrixContent::GetRoomMetadata(), and SetRom().
|
inline |
Definition at line 75 of file dungeon_room_store.h.
References game_data_.
Referenced by SetGameData().
|
inline |
Definition at line 77 of file dungeon_room_store.h.
References rooms_.
Referenced by yaze::editor::DungeonEditorV2::SetRom().
|
inline |
Definition at line 84 of file dungeon_room_store.h.
References rooms_.
Referenced by yaze::editor::DungeonEditorV2::BeginSaveTransaction(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::CollectDirtyChestWriteRanges(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::CollectDirtyPotItemWriteRanges(), yaze::editor::DungeonEditorV2::CollectWriteRanges(), ForEachLoaded(), ForEachLoaded(), yaze::editor::DungeonEditorV2::InvalidateDungeonPaletteUsers(), yaze::editor::DungeonEditorV2::PendingRoomCount(), yaze::editor::DungeonEditorV2::RefreshRomBackedState(), yaze::editor::DungeonEditorV2::ReloadWaterFillZones(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::SaveAllPotItemsForProject(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::SaveWaterFillZones(), SetGameData(), and SetRom().
|
inline |
Definition at line 93 of file dungeon_room_store.h.
References rooms_.
|
inline |
Definition at line 102 of file dungeon_room_store.h.
References ForEachMaterialized(), and yaze::zelda3::Room::IsLoaded().
Referenced by yaze::editor::DungeonEditorV2::CollectWriteRanges(), LoadedCount(), and yaze::editor::DungeonEditorV2::Save().

|
inline |
Definition at line 111 of file dungeon_room_store.h.
References ForEachMaterialized(), and yaze::zelda3::Room::IsLoaded().

|
inline |
Definition at line 119 of file dungeon_room_store.h.
References ForEachLoaded().
Referenced by yaze::editor::DungeonEditorV2::LoadedRoomCount().

|
inlineprivate |
Definition at line 126 of file dungeon_room_store.h.
References game_data_, rom_, and rooms_.
Referenced by operator[](), operator[](), and TryEnsureRoom().
|
staticconstexpr |
Definition at line 16 of file dungeon_room_store.h.
Referenced by GetIfMaterialized(), yaze::editor::RoomMatrixContent::GetRoomMetadata(), size(), and TryEnsureRoom().
|
private |
Definition at line 136 of file dungeon_room_store.h.
Referenced by EnsureRoom(), rom(), and SetRom().
|
private |
Definition at line 137 of file dungeon_room_store.h.
Referenced by EnsureRoom(), game_data(), and SetGameData().
|
mutableprivate |
Definition at line 138 of file dungeon_room_store.h.
Referenced by Clear(), EnsureRoom(), ForEachMaterialized(), ForEachMaterialized(), and GetIfMaterialized().