#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::MinecartTrackEditorPanel::BuildCollisionPreview(), yaze::editor::BuildDungeonSelectionSnapshot(), yaze::editor::DungeonUsageTracker::CalculateUsageStats(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::CollectDirtyChestWriteRanges(), yaze::editor::CustomCollisionPanel::CollectRoomEntries(), yaze::editor::WaterFillPanel::CollectZones(), yaze::editor::DungeonEditorV2::CurrentRoomHasPendingChanges(), yaze::editor::MinecartTrackEditorPanel::Draw(), yaze::editor::RoomGraphicsContent::Draw(), yaze::editor::DungeonCanvasViewer::DrawConnectedRoomMatrix(), yaze::editor::DoorEditorContent::DrawContent(), yaze::editor::ItemEditorPanel::DrawContent(), yaze::editor::SpriteEditorPanel::DrawContent(), yaze::editor::DrawDungeonEntityInspector(), yaze::editor::DungeonRoomSelector::DrawGroupedRoomList(), yaze::editor::ObjectSelectorContent::DrawInteractionSummary(), yaze::editor::RoomTagEditorPanel::DrawQuickAssign(), yaze::editor::DungeonEditorV2::DrawRoomTab(), yaze::editor::DungeonCanvasViewer::ExportRoomDocument(), yaze::editor::DungeonEditorV2::FinalizeCollisionUndoAction(), yaze::editor::DungeonEditorV2::FinalizeUndoAction(), yaze::editor::DungeonEditorV2::FinalizeWaterFillUndoAction(), yaze::editor::TileObjectHandler::GetRoom(), yaze::editor::DungeonEditorV2::HandleDungeonPaletteChanged(), yaze::editor::DoorEditorContent::HasMatchingViewer(), yaze::editor::ItemEditorPanel::HasMatchingViewer(), yaze::editor::DungeonEditorV2::Load(), yaze::editor::DungeonEditorV2::NavigateToPlacedObject(), yaze::editor::DungeonEditorV2::OnEntranceSelected(), yaze::editor::DungeonEditorV2::OnRoomSelected(), yaze::editor::DungeonEditorV2::OnRoomSelected(), yaze::editor::ObjectTileEditorPanel::OpenForCustomObject(), yaze::editor::ObjectTileEditorPanel::OpenForObject(), yaze::editor::DungeonEditorV2::OpenGraphicsEditorForObject(), yaze::editor::DungeonEditorV2::OpenObjectTileEditorForObject(), yaze::editor::DungeonRoomSelector::PassesEntityTypeFilter(), yaze::editor::DungeonEditorV2::PreflightObjectMutation(), yaze::editor::MinecartTrackEditorPanel::RebuildAuditCache(), yaze::editor::ObjectCoveragePanel::RebuildIndex(), yaze::editor::RoomTagEditorPanel::RebuildRoomCountCache(), yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics(), yaze::editor::DungeonEditorV2::ReloadWaterFillZones(), yaze::editor::DungeonEditorV2::ResolveDungeonRenderContextForRoom(), yaze::editor::DungeonEditorV2::RestoreRoomCustomCollision(), 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::DungeonCanvasViewer(), yaze::editor::DungeonCanvasViewer::EnsureRoomLoadedForConnectedView(), yaze::editor::DungeonCanvasViewer::LoadAndRenderRoomGraphics(), yaze::editor::DungeonCanvasViewer::PrepareActiveRoomForCanvasFrame(), yaze::editor::DungeonCanvasViewer::PrepareRoomCompositeWithOutput(), 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::ApplyMinecartCollisionBatch(), yaze::editor::DungeonEditorV2::ApplyMinecartCollisionStamp(), yaze::editor::MinecartTrackEditorPanel::BuildCollisionPreview(), yaze::editor::DungeonEditorV2::BuildContextSnapshot(), yaze::editor::DungeonCanvasViewer::BuildDrawIssueReport(), yaze::editor::DungeonEditorV2::CurrentRoomHasPendingChanges(), yaze::editor::anonymous_namespace{dungeon_workbench_toolbar.cc}::DrawRecentRoomsContents(), yaze::editor::DungeonEditorV2::EditRoomGraphicsSheet(), yaze::editor::DungeonEditorV2::EnsureConnectionRoomLoaded(), yaze::editor::DungeonEditorV2::EnsureRoomTransferLoaded(), GetIfLoaded(), GetIfLoaded(), GetIfMaterialized(), yaze::editor::DungeonCanvasViewer::GetRoomLayerManager(), yaze::editor::DungeonEditorV2::NavigateToPlacedObject(), yaze::editor::DungeonEditorV2::OpenGraphicsEditorForObject(), yaze::editor::DungeonEditorV2::PreflightObjectMutation(), yaze::editor::DungeonCanvasViewer::PrepareRoomCompositeBitmap(), yaze::editor::MinecartTrackEditorPanel::RebuildAuditCache(), yaze::editor::ObjectCoveragePanel::RebuildIndex(), yaze::editor::DungeonEditorV2::RefreshRomBackedState(), yaze::editor::DungeonEditorV2::ResolveDungeonRenderContextForRoom(), yaze::editor::DungeonEditorV2::RestoreRoomCustomCollisionBatch(), yaze::editor::DungeonEditorV2::RestoreRoomEntities(), yaze::editor::DungeonEditorV2::RollbackSaveTransaction(), yaze::editor::DungeonEditorV2::Save(), 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::DungeonEditorV2::ApplyMinecartTrackEdit(), yaze::editor::DungeonEditorV2::ApplyRoomTransfer(), yaze::editor::DoorInteractionHandler::BuildPairBadgeOverlay(), yaze::editor::DungeonEditorV2::CommitSelectionEdit(), yaze::editor::DungeonEditorV2::ConfigureViewerUndoHooks(), yaze::editor::DungeonEditorV2::CycleObjectSelection(), yaze::editor::DungeonCanvasViewer::DeleteChest(), yaze::editor::DungeonEditorV2::DeleteChest(), yaze::editor::DungeonMapPanel::Draw(), yaze::editor::ObjectTileEditorPanel::Draw(), yaze::editor::RoomMatrixContent::Draw(), yaze::editor::DungeonObjectSelector::DrawCustomObjectAssetBrowser(), yaze::editor::DrawDungeonChestEditor(), yaze::editor::DrawDungeonConnectionEditor(), yaze::editor::DrawDungeonDestinationEditor(), yaze::editor::DrawDungeonRoomTransferEditor(), yaze::editor::DungeonRoomSelector::DrawGroupedRoomList(), yaze::editor::DungeonCanvasViewer::DrawHeaderHiddenMetadataHud(), yaze::editor::DungeonObjectSelector::DrawObjectContextMenu(), yaze::editor::DungeonRoomSelector::DrawRoomSelectorInternal(), yaze::editor::DungeonCanvasViewer::EditChest(), yaze::editor::DungeonEditorV2::EditChest(), yaze::editor::DungeonCanvasViewer::EditRoomMetadata(), yaze::editor::DungeonCanvasViewer::EditRoomMetadataBatch(), yaze::editor::DungeonEditorV2::EditRoomMetadataBatch(), yaze::editor::DungeonEditorV2::EnsureRoomTransferLoaded(), yaze::editor::DungeonEditorV2::ExportRoomDocument(), yaze::editor::DungeonEditorV2::FinalizeSelectionUndoAction(), yaze::editor::DungeonCanvasViewer::GetCollisionOverlayCache(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::editor::RoomMatrixContent::GetRoomColor(), yaze::editor::RoomMatrixContent::GetRoomMetadata(), yaze::editor::DungeonEditorV2::HandleDungeonPaletteChanged(), yaze::editor::ObjectTileEditorPanel::HasRenderableRoomContext(), yaze::editor::DungeonObjectSelector::MatchesRoomUsage(), yaze::editor::ObjectTileEditorPanel::OpenForCustomObject(), yaze::editor::DungeonRoomSelector::PassesEntityTypeFilter(), yaze::editor::DungeonEditorV2::PlanPendingRoomStreamRanges(), yaze::editor::DungeonEditorV2::PreflightDoorMutation(), yaze::editor::DungeonEditorV2::PreflightObjectMutation(), yaze::editor::DungeonEditorV2::PreflightPotItemPlacement(), yaze::editor::DungeonEditorV2::PreflightSpriteMutation(), yaze::editor::DungeonEditorV2::PreflightStreamMutation(), yaze::editor::DungeonEditorV2::PreviewDoorConnection(), yaze::editor::DungeonEditorV2::PreviewRoomTransfer(), yaze::editor::DungeonEditorV2::RefreshRoomMetadataViews(), yaze::editor::DungeonEditorV2::RefreshSelectionEditViews(), yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics(), yaze::editor::ObjectTileEditorPanel::RenderObjectPreview(), yaze::editor::ObjectTileEditorPanel::RenderTile8Atlas(), yaze::editor::DungeonEditorV2::RestoreChest(), yaze::editor::DungeonEditorV2::RestoreRoomMetadataBatch(), yaze::editor::DungeonEditorV2::RestoreRoomObjects(), yaze::editor::DungeonEditorV2::RestoreRoomTransfer(), and yaze::editor::DungeonEditorV2::RestoreSelectionEditBatch().

|
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::MinecartTrackEditorPanel::BuildCollisionPreview(), yaze::editor::ObjectCoveragePanel::CheckRoomAgainstGame(), yaze::editor::ObjectCoveragePanel::Draw(), yaze::editor::RoomMatrixContent::Draw(), yaze::editor::RoomMatrixContent::GetRoomColor(), yaze::editor::RoomMatrixContent::GetRoomMetadata(), yaze::editor::MinecartTrackEditorPanel::RebuildAuditCache(), yaze::editor::ObjectCoveragePanel::RebuildIndex(), and SetRom().
|
inline |
Definition at line 75 of file dungeon_room_store.h.
References game_data_.
Referenced by yaze::editor::MinecartTrackEditorPanel::BuildCollisionPreview(), yaze::editor::ObjectCoveragePanel::CheckRoomAgainstGame(), yaze::editor::RoomGraphicsContent::DrawAssignmentControls(), yaze::editor::RoomGraphicsContent::DrawAssignmentPicker(), yaze::editor::RoomMatrixContent::GetRoomColor(), yaze::editor::MinecartTrackEditorPanel::RebuildAuditCache(), yaze::editor::ObjectCoveragePanel::RebuildIndex(), and 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::ObjectTileEditorPanel::ApplyChanges(), yaze::editor::anonymous_namespace{dungeon_editor_v2_room_transfer.cc}::AssignTransferredWaterMask(), yaze::editor::DungeonEditorV2::BeginSaveTransaction(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::CollectDirtyCustomCollisionWriteRanges(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::CollectDirtyPotItemWriteRanges(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::CollectDirtyWaterFillWriteRanges(), yaze::editor::DungeonEditorV2::EditRoomGraphicsSheet(), ForEachLoaded(), ForEachLoaded(), yaze::editor::DungeonEditorV2::InvalidateDungeonPaletteUsers(), yaze::editor::DungeonEditorV2::PendingRoomCount(), yaze::editor::DungeonEditorV2::PreflightPotItemPlacement(), yaze::editor::DungeonEditorV2::PreflightRoomTransfer(), 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(), SetRom(), yaze::editor::DungeonEditorV2::SynchronizeCustomObjectAssets(), yaze::editor::DungeonObjectSelector::SynchronizeCustomObjectGeneration(), yaze::editor::anonymous_namespace{dungeon_editor_v2_persistence.cc}::ValidateChestObjectSaveCoupling(), and yaze::editor::DungeonEditorV2::ValidateSaveScope().
|
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(), yaze::editor::DungeonEditorV2::GetRoomGraphicsUsage(), LoadedCount(), yaze::editor::DungeonEditorV2::PlanPendingRoomStreamRanges(), yaze::editor::DungeonEditorV2::Save(), and yaze::editor::DungeonEditorV2::VisitGraphicsUsageRooms().

|
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::RoomMatrixContent::DrawMatrixHeader(), and 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::GetRoomColor(), 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().