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::Roomoperator[] (size_t index)
 
const zelda3::Roomoperator[] (size_t index) const
 
zelda3::RoomGetIfMaterialized (int room_id)
 
const zelda3::RoomGetIfMaterialized (int room_id) const
 
zelda3::RoomGetIfLoaded (int room_id)
 
const zelda3::RoomGetIfLoaded (int room_id) const
 
void SetRom (Rom *rom)
 
void SetGameData (zelda3::GameData *game_data)
 
Romrom () const
 
zelda3::GameDatagame_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::RoomEnsureRoom (size_t index) const
 

Private Attributes

Romrom_ = nullptr
 
zelda3::GameDatagame_data_ = nullptr
 
std::array< std::unique_ptr< zelda3::Room >, kRoomCountrooms_
 

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::ObjectTileEditorPanel::ApplyChanges(), yaze::editor::DungeonStatusBar::BuildState(), yaze::editor::DungeonUsageTracker::CalculateUsageStats(), yaze::editor::CustomCollisionPanel::CollectRoomEntries(), yaze::editor::WaterFillPanel::CollectZones(), yaze::editor::ChestEditorPanel::Draw(), yaze::editor::ItemEditorPanel::Draw(), yaze::editor::SpriteEditorPanel::Draw(), yaze::editor::RoomGraphicsContent::Draw(), yaze::editor::DungeonRoomSelector::DrawGroupedRoomList(), yaze::editor::RoomTagEditorPanel::DrawQuickAssign(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::editor::TileObjectHandler::GetRoom(), 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::test::DungeonEditorTestSuite::RunObjectManipulationTest(), yaze::editor::DungeonEditorV2::Save(), yaze::editor::DungeonEditorV2::SaveRoom(), yaze::editor::DungeonEditorV2::SaveRoomData(), yaze::editor::anonymous_namespace{dungeon_editor_v2.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:

◆ GetIfMaterialized() [1/2]

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

◆ GetIfMaterialized() [2/2]

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

Definition at line 34 of file dungeon_room_store.h.

References kRoomCount, and rooms_.

◆ GetIfLoaded() [1/2]

◆ GetIfLoaded() [2/2]

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

Definition at line 46 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 51 of file dungeon_room_store.h.

References ForEachMaterialized(), rom(), rom_, and yaze::zelda3::Room::SetRom().

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

Here is the call graph for this function:

◆ SetGameData()

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

◆ rom()

Rom * yaze::editor::DungeonRoomStore::rom ( ) const
inline

Definition at line 62 of file dungeon_room_store.h.

References rom_.

Referenced by yaze::editor::RoomMatrixContent::GetRoomMetadata(), and SetRom().

◆ game_data()

zelda3::GameData * yaze::editor::DungeonRoomStore::game_data ( ) const
inline

Definition at line 63 of file dungeon_room_store.h.

References game_data_.

Referenced by SetGameData().

◆ Clear()

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

Definition at line 65 of file dungeon_room_store.h.

References rooms_.

◆ ForEachMaterialized() [1/2]

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

◆ ForEachMaterialized() [2/2]

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

Definition at line 81 of file dungeon_room_store.h.

References rooms_.

◆ ForEachLoaded() [1/2]

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

Definition at line 90 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().

Here is the call graph for this function:

◆ ForEachLoaded() [2/2]

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

Definition at line 99 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 107 of file dungeon_room_store.h.

References ForEachLoaded().

Referenced by 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 114 of file dungeon_room_store.h.

References game_data_, rom_, and rooms_.

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

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 124 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 125 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: