yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::DungeonRoomStore Class Reference

#include <dungeon_room_store.h>

Collaboration diagram for yaze::editor::DungeonRoomStore:

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_
 

Detailed Description

Definition at line 14 of file dungeon_room_store.h.

Constructor & Destructor Documentation

◆ DungeonRoomStore() [1/2]

yaze::editor::DungeonRoomStore::DungeonRoomStore ( )
default

◆ DungeonRoomStore() [2/2]

yaze::editor::DungeonRoomStore::DungeonRoomStore ( Rom * rom,
zelda3::GameData * game_data = nullptr )
inlineexplicit

Definition at line 19 of file dungeon_room_store.h.

Member Function Documentation

◆ size()

size_t yaze::editor::DungeonRoomStore::size ( ) const
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().

◆ operator[]() [1/2]

zelda3::Room & yaze::editor::DungeonRoomStore::operator[] ( size_t index)
inline

Definition at line 24 of file dungeon_room_store.h.

References EnsureRoom().

Here is the call graph for this function:

◆ operator[]() [2/2]

const zelda3::Room & yaze::editor::DungeonRoomStore::operator[] ( size_t index) const
inline

Definition at line 25 of file dungeon_room_store.h.

References EnsureRoom().

Here is the call graph for this function:

◆ TryEnsureRoom() [1/2]

◆ TryEnsureRoom() [2/2]

const zelda3::Room * yaze::editor::DungeonRoomStore::TryEnsureRoom ( int room_id) const
inline

Definition at line 34 of file dungeon_room_store.h.

References EnsureRoom(), and kRoomCount.

Here is the call graph for this function:

◆ GetIfMaterialized() [1/2]

zelda3::Room * yaze::editor::DungeonRoomStore::GetIfMaterialized ( int room_id)
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().

Here is the call graph for this function:

◆ GetIfMaterialized() [2/2]

const zelda3::Room * yaze::editor::DungeonRoomStore::GetIfMaterialized ( int room_id) const
inline

Definition at line 46 of file dungeon_room_store.h.

References kRoomCount, and rooms_.

◆ GetIfLoaded() [1/2]

zelda3::Room * yaze::editor::DungeonRoomStore::GetIfLoaded ( int room_id)
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().

Here is the call graph for this function:

◆ GetIfLoaded() [2/2]

const zelda3::Room * yaze::editor::DungeonRoomStore::GetIfLoaded ( int room_id) const
inline

Definition at line 58 of file dungeon_room_store.h.

References GetIfMaterialized().

Here is the call graph for this function:

◆ SetRom()

void yaze::editor::DungeonRoomStore::SetRom ( Rom * rom)
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().

Here is the call graph for this function:

◆ SetGameData()

void yaze::editor::DungeonRoomStore::SetGameData ( zelda3::GameData * game_data)
inline

◆ rom()

◆ game_data()

◆ Clear()

void yaze::editor::DungeonRoomStore::Clear ( )
inline

Definition at line 77 of file dungeon_room_store.h.

References rooms_.

Referenced by yaze::editor::DungeonEditorV2::SetRom().

◆ ForEachMaterialized() [1/2]

template<typename Fn >
void yaze::editor::DungeonRoomStore::ForEachMaterialized ( Fn && fn)
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().

◆ ForEachMaterialized() [2/2]

template<typename Fn >
void yaze::editor::DungeonRoomStore::ForEachMaterialized ( Fn && fn) const
inline

Definition at line 93 of file dungeon_room_store.h.

References rooms_.

◆ ForEachLoaded() [1/2]

◆ ForEachLoaded() [2/2]

template<typename Fn >
void yaze::editor::DungeonRoomStore::ForEachLoaded ( Fn && fn) const
inline

Definition at line 111 of file dungeon_room_store.h.

References ForEachMaterialized(), and yaze::zelda3::Room::IsLoaded().

Here is the call graph for this function:

◆ LoadedCount()

int yaze::editor::DungeonRoomStore::LoadedCount ( ) const
inline

Definition at line 119 of file dungeon_room_store.h.

References ForEachLoaded().

Referenced by yaze::editor::RoomMatrixContent::DrawMatrixHeader(), and yaze::editor::DungeonEditorV2::LoadedRoomCount().

Here is the call graph for this function:

◆ EnsureRoom()

zelda3::Room & yaze::editor::DungeonRoomStore::EnsureRoom ( size_t index) const
inlineprivate

Definition at line 126 of file dungeon_room_store.h.

References game_data_, rom_, and rooms_.

Referenced by operator[](), operator[](), and TryEnsureRoom().

Member Data Documentation

◆ kRoomCount

constexpr size_t yaze::editor::DungeonRoomStore::kRoomCount = zelda3::kNumberOfRooms
staticconstexpr

◆ rom_

Rom* yaze::editor::DungeonRoomStore::rom_ = nullptr
private

Definition at line 136 of file dungeon_room_store.h.

Referenced by EnsureRoom(), rom(), and SetRom().

◆ game_data_

zelda3::GameData* yaze::editor::DungeonRoomStore::game_data_ = nullptr
private

Definition at line 137 of file dungeon_room_store.h.

Referenced by EnsureRoom(), game_data(), and SetGameData().

◆ rooms_

std::array<std::unique_ptr<zelda3::Room>, kRoomCount> yaze::editor::DungeonRoomStore::rooms_
mutableprivate

The documentation for this class was generated from the following file: