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

DungeonEditorV2 - Simplified dungeon editor using component delegation. More...

#include <dungeon_editor_v2.h>

Inheritance diagram for yaze::editor::DungeonEditorV2:

Classes

struct  PendingCollisionUndo
 
struct  PendingSwap
 
struct  PendingUndo
 
struct  PendingWaterFillUndo
 
struct  PendingWorkflowMode
 
struct  SaveTransactionSnapshot
 

Public Member Functions

 DungeonEditorV2 (Rom *rom=nullptr)
 
 ~DungeonEditorV2 () override
 
void SetGameData (zelda3::GameData *game_data) override
 
void Initialize () override
 
absl::Status Load () override
 
absl::Status Update () override
 
absl::Status Undo () override
 
absl::Status Redo () override
 
absl::Status Cut () override
 
absl::Status Copy () override
 
absl::Status Paste () override
 
absl::Status Find () override
 
absl::Status Save () override
 
absl::Status BeginSaveTransaction () override
 
void RollbackSaveTransaction () override
 
void CommitSaveTransaction () override
 
void ContributeStatus (StatusBar *status_bar) override
 
absl::Status SaveRoom (int room_id)
 
int LoadedRoomCount () const
 
int PendingRoomCount () const
 
bool HasPendingRoomChanges () const
 
bool HasPendingDungeonChanges () const
 
bool CurrentRoomHasPendingChanges () const
 
int TotalRoomCount () const
 
std::vector< std::pair< uint32_t, uint32_t > > CollectWriteRanges () const
 
void SetRom (Rom *rom)
 
absl::Status RefreshRomBackedState ()
 
Romrom () const
 
void add_room (int room_id)
 
void FocusRoom (int room_id)
 
void SelectObject (int obj_id)
 
void SetAgentMode (bool enabled)
 
bool IsRomLoaded () const override
 
std::string GetRomStatus () const override
 
void OpenWindow (const std::string &window_id)
 
void SetWorkbenchWorkflowMode (bool enabled, bool show_toast=true)
 
void QueueWorkbenchWorkflowMode (bool enabled, bool show_toast=true)
 
void ToggleWorkbenchWorkflowMode (bool show_toast=true)
 
bool IsWorkbenchWorkflowEnabled () const
 
int current_room_id () const
 
int * mutable_current_room_id ()
 
const ImVector< int > & active_rooms () const
 
DungeonRoomStorerooms ()
 
const DungeonRoomStorerooms () const
 
gfx::IRendererrenderer () const
 
ObjectSelectorContentobject_selector_panel () const
 
ObjectSelectorContentobject_editor_panel () const
 
ObjectEditorContentobject_editor_content () const
 
DoorEditorContentdoor_editor_panel () const
 
const std::deque< int > & GetRecentRooms () const
 Get the list of recently visited room IDs.
 
- Public Member Functions inherited from yaze::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
virtual void SetDependencies (const EditorDependencies &deps)
 
virtual std::string GetUndoDescription () const
 
virtual std::string GetRedoDescription () const
 
const UndoManagerundo_manager () const
 
virtual absl::Status Clear ()
 
EditorType type () const
 
bool * active ()
 
void set_active (bool active)
 
void toggle_active ()
 
Romrom () const
 
zelda3::GameDatagame_data () const
 
project::YazeProjectproject () const
 
core::VersionManagerversion_manager () const
 
EditorContext context () const
 
bool HasContext () const
 

Static Public Attributes

static constexpr const char * kRoomSelectorId = "dungeon.room_selector"
 
static constexpr const char * kEntranceListId = "dungeon.entrance_list"
 
static constexpr const char * kRoomMatrixId = "dungeon.room_matrix"
 
static constexpr const char * kRoomGraphicsId = "dungeon.room_graphics"
 
static constexpr const char * kObjectSelectorId = "dungeon.object_selector"
 
static constexpr const char * kObjectToolsId = kObjectSelectorId
 
static constexpr const char * kDoorEditorId = "dungeon.door_editor"
 
static constexpr const char * kPaletteEditorId = "dungeon.palette_editor"
 

Private Member Functions

void DrawRoomPanels ()
 
void DrawRoomTab (int room_id)
 
void ProcessDeferredTextures ()
 
void ReloadWaterFillZones ()
 
void OnRoomSelected (int room_id, bool request_focus=true)
 
void OnRoomSelected (int room_id, RoomSelectionIntent intent)
 
void OnEntranceSelected (int entrance_id)
 
void SyncPanelsToRoom (int room_id)
 
void InvalidateDungeonPaletteUsers (gui::DungeonPaletteChange change)
 
uint8_t ResolveSelectedEntranceBlocksetForRoom (int room_id) const
 
void ApplyEntranceRenderContext (int room_id)
 
void ConfigureViewerRenderContext (DungeonCanvasViewer *viewer, int room_id)
 
void WireViewerPanelCallbacks (DungeonCanvasViewer *viewer)
 
void ShowRoomPanel (int room_id)
 
void SaveAllRooms ()
 
void HandleObjectPlaced (const zelda3::RoomObject &obj)
 
void OpenGraphicsEditorForObject (int room_id, const zelda3::RoomObject &object)
 
DungeonCanvasViewerGetViewerForRoom (int room_id)
 
DungeonCanvasViewerGetWorkbenchViewer ()
 
DungeonCanvasViewerGetWorkbenchCompareViewer (int room_id)
 
void RefreshWorkbenchViewerRuntimeContext (DungeonCanvasViewer *viewer, int room_id)
 
void TouchViewerLru (int room_id)
 
void RemoveViewerFromLru (int room_id)
 
absl::Status SaveRoomData (int room_id)
 
absl::Status RunWithSaveTransaction (const std::function< absl::Status()> &operation)
 
void BeginUndoSnapshot (int room_id)
 
void FinalizeUndoAction (int room_id)
 
void RestoreRoomObjects (int room_id, const std::vector< zelda3::RoomObject > &objects, const std::vector< size_t > &selected_indices)
 
void BeginCollisionUndoSnapshot (int room_id)
 
void FinalizeCollisionUndoAction (int room_id)
 
void RestoreRoomCustomCollision (int room_id, const zelda3::CustomCollisionMap &map)
 
void BeginWaterFillUndoSnapshot (int room_id)
 
void FinalizeWaterFillUndoAction (int room_id)
 
void RestoreRoomWaterFill (int room_id, const WaterFillSnapshot &snap)
 
void SwapRoomInPanel (int old_room_id, int new_room_id)
 
void ProcessPendingSwap ()
 
void ProcessPendingWorkflowMode ()
 
int GetOrCreateRoomPanelSlotId (int room_id)
 
void ReleaseRoomPanelSlotId (int room_id)
 

Static Private Member Functions

static bool IsValidRoomId (int room_id)
 

Private Attributes

gfx::IRendererrenderer_ = nullptr
 
Romrom_
 
zelda3::GameDatagame_data_ = nullptr
 
DungeonRoomStore rooms_
 
std::array< zelda3::RoomEntrance, zelda3::kNumDungeonEntranceSlotsentrances_
 
std::array< zelda3::DungeonSpawnPoint, zelda3::kNumDungeonSpawnPointsspawn_points_
 
std::optional< SaveTransactionSnapshotsave_transaction_snapshot_
 
int current_entrance_id_ = 0
 
ImVector< int > active_rooms_
 
int current_room_id_ = 0
 
std::deque< int > recent_rooms_
 
std::vector< int > pinned_rooms_
 
class DungeonWorkbenchContentworkbench_panel_ = nullptr
 
gfx::SnesPalette current_palette_
 
gfx::PaletteGroup current_palette_group_
 
uint64_t current_palette_id_ = 0
 
uint64_t current_palette_group_id_ = 0
 
DungeonRoomLoader room_loader_
 
DungeonRoomSelector room_selector_
 
util::LruCache< int, std::unique_ptr< DungeonCanvasViewer > > room_viewers_
 
std::unique_ptr< DungeonCanvasViewerworkbench_viewer_
 
std::unique_ptr< DungeonCanvasViewerworkbench_compare_viewer_
 
gui::PaletteEditorWidget palette_editor_
 
ObjectSelectorContentobject_selector_panel_ = nullptr
 
ObjectEditorContentobject_editor_content_ = nullptr
 
DoorEditorContentdoor_editor_panel_ = nullptr
 
RoomGraphicsContentroom_graphics_panel_ = nullptr
 
PaletteEditorContentpalette_editor_panel_ = nullptr
 
class SpriteEditorPanelsprite_editor_panel_ = nullptr
 
class ItemEditorPanelitem_editor_panel_ = nullptr
 
class MinecartTrackEditorPanelminecart_track_editor_panel_ = nullptr
 
class RoomTagEditorPanelroom_tag_editor_panel_ = nullptr
 
class CustomCollisionPanelcustom_collision_panel_ = nullptr
 
class WaterFillPanelwater_fill_panel_ = nullptr
 
ObjectTileEditorPanelobject_tile_editor_panel_ = nullptr
 
OverlayManagerPaneloverlay_manager_panel_ = nullptr
 
std::unique_ptr< ObjectSelectorContentowned_object_selector_panel_
 
std::unique_ptr< ObjectEditorContentowned_object_editor_content_
 
std::unique_ptr< DoorEditorContentowned_door_editor_panel_
 
std::unique_ptr< RoomTagEditorPanelowned_room_tag_editor_panel_
 
std::unique_ptr< CustomCollisionPanelowned_custom_collision_panel_
 
std::unique_ptr< WaterFillPanelowned_water_fill_panel_
 
std::unique_ptr< MinecartTrackEditorPanelowned_minecart_track_editor_panel_
 
std::unique_ptr< zelda3::DungeonEditorSystemdungeon_editor_system_
 
std::unique_ptr< emu::render::EmulatorRenderServicerender_service_
 
bool is_loaded_ = false
 
ImGuiWindowClass room_window_class_
 
ImGuiID room_dock_id_ = 0
 
std::unordered_map< int, std::shared_ptr< gui::PanelWindow > > room_cards_
 
int next_room_panel_slot_id_ = 1
 
std::unordered_map< int, int > room_panel_slot_ids_
 
PendingUndo pending_undo_
 
bool has_pending_undo_ = false
 
bool undo_restore_triggered_ping_ = false
 
PendingCollisionUndo pending_collision_undo_
 
PendingWaterFillUndo pending_water_fill_undo_
 
PendingSwap pending_swap_
 
PendingWorkflowMode pending_workflow_mode_
 

Static Private Attributes

static constexpr size_t kMaxRecentRooms = 10
 
static constexpr int kMaxCachedViewers = 20
 

Friends

class DungeonEditorV2RegularEntranceTestPeer
 
class DungeonEditorV2ReloadTestPeer
 
class DungeonEditorV2SpawnPointTestPeer
 
class DungeonEditorV2SpawnRejectionTestPeer
 
class DungeonEditorV2RomSafetyTest_UndoSnapshotLeakDetection_Test
 
class DungeonEditorV2RomSafetyTest_ObjectStreamUndoRedoRestoresSelectionIdentity_Test
 
class DungeonEditorV2RomSafetyTest_ViewerCacheLRUEviction_Test
 
class DungeonEditorV2RomSafetyTest_ViewerCacheNeverEvictsActiveRooms_Test
 
class DungeonEditorV2RomSafetyTest_ViewerCacheLRUAccessOrderUpdate_Test
 
class DungeonEditorV2RomSafetyTest_SaveAllRoomsRollsBackEarlierWritesOnLateFailure_Test
 
class DungeonEditorV2RomSafetyTest_LateCoordinatorRollbackRestoresEntranceDirtyState_Test
 
class DungeonEditorPaletteRefreshTest_SharedHudEditRefreshesRoomUsingDifferentDungeonPalette_Test
 
class DungeonEditorPaletteRefreshTest_DungeonMainEditRefreshesResolvedAliasesOnly_Test
 
class DungeonEditorPaletteRefreshTest_CachedRoomRefreshesThroughViewerCompositePreparation_Test
 
class DungeonEditorPaletteRefreshTest_CompareViewerScopesEntranceContextToRequestedRoom_Test
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::Editor
std::string MakePanelTitle (const std::string &base_title) const
 
std::string MakeWindowId (const std::string &base_id) const
 
template<typename T >
absl::StatusOr< T > SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const
 
- Protected Attributes inherited from yaze::editor::Editor
bool active_ = false
 
EditorType type_
 
EditorDependencies dependencies_
 
UndoManager undo_manager_
 

Detailed Description

DungeonEditorV2 - Simplified dungeon editor using component delegation.

This is a drop-in replacement for DungeonEditor that properly delegates to the component system instead of implementing everything inline.

Architecture:

The editor acts as a coordinator, not an implementer.

Ownership Model

OWNED by DungeonEditorV2 (use unique_ptr or direct member):

  • rooms_ (std::array) - full ownership
  • entrances_ (std::array) - full ownership
  • spawn_points_ (std::array) - full ownership
  • room_viewers_ (map of unique_ptr) - owns canvas viewers per room
  • dungeon_editor_system_ (unique_ptr) - owns editor system
  • render_service_ (unique_ptr) - owns emulator render service
  • room_loader_, room_selector_, palette_editor_ - direct members

EXTERNALLY OWNED (raw pointers, lifetime managed elsewhere):

OWNED BY WorkspaceWindowManager (registered EditorPanels):

  • object_editor_panel_ - registered via RegisterWindowContent()
  • room_graphics_panel_ - registered via RegisterWindowContent()
  • sprite_editor_panel_ - registered via RegisterWindowContent()
  • item_editor_panel_ - registered via RegisterWindowContent()

Panel pointers are stored for convenience access but should NOT be deleted by this class. WorkspaceWindowManager owns them.

Definition at line 97 of file dungeon_editor_v2.h.

Constructor & Destructor Documentation

◆ DungeonEditorV2()

yaze::editor::DungeonEditorV2::DungeonEditorV2 ( Rom * rom = nullptr)
explicit

Definition at line 94 of file dungeon_editor_v2.cc.

References yaze::zelda3::CreateDungeonEditorSystem(), dungeon_editor_system_, yaze::editor::kDungeon, rom(), and yaze::editor::Editor::type_.

Here is the call graph for this function:

◆ ~DungeonEditorV2()

Member Function Documentation

◆ SetGameData()

◆ Initialize()

void yaze::editor::DungeonEditorV2::Initialize ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 387 of file dungeon_editor_v2.cc.

References active_rooms_, yaze::editor::UndoManager::CanRedo(), yaze::editor::UndoManager::CanUndo(), yaze::zelda3::CreateDungeonEditorSystem(), current_entrance_id_, current_room_id_, yaze::editor::Editor::dependencies_, dungeon_editor_system_, entrances_, game_data_, yaze::core::FeatureFlags::get(), yaze::editor::UndoManager::GetRedoDescription(), yaze::editor::UndoManager::GetUndoDescription(), GetWorkbenchCompareViewer(), GetWorkbenchViewer(), ICON_MD_CATEGORY, ICON_MD_DOOR_FRONT, ICON_MD_GRID_VIEW, ICON_MD_IMAGE, ICON_MD_LIST, ICON_MD_PALETTE, ICON_MD_TUNE, ICON_MD_WORKSPACES, yaze::Rom::is_loaded(), kDoorEditorId, kEntranceListId, yaze::editor::kError, kObjectSelectorId, kPaletteEditorId, kRoomGraphicsId, kRoomMatrixId, kRoomSelectorId, yaze::editor::kSuccess, LOG_ERROR, OnEntranceSelected(), OnRoomSelected(), yaze::zelda3::GameData::pit_damage_table, yaze::editor::EditorDependencies::project, QueueWorkbenchWorkflowMode(), recent_rooms_, Redo(), yaze::editor::WorkspaceWindowManager::RegisterPanelAlias(), yaze::editor::EditorDependencies::renderer, renderer_, yaze::editor::EditorDependencies::rom, rom_, room_selector_, room_window_class_, rooms_, yaze::editor::UserSettings::Save(), SaveAllRooms(), SaveRoom(), yaze::editor::UserSettings::SetDungeonInspectorSide(), yaze::editor::DungeonWorkbenchContent::SetOnInspectorSideChanged(), yaze::editor::DungeonWorkbenchContent::SetPitDamageTableProvider(), yaze::editor::DungeonRoomSelector::SetProject(), SetRom(), yaze::editor::DungeonRoomSelector::SetRoomSelectedWithIntentCallback(), yaze::editor::DungeonWorkbenchContent::SetUndoRedoProvider(), SetWorkbenchWorkflowMode(), yaze::editor::ToastManager::Show(), SwapRoomInPanel(), yaze::editor::EditorDependencies::toast_manager, Undo(), yaze::editor::Editor::undo_manager_, yaze::editor::UndoManager::UndoStackSize(), yaze::editor::EditorDependencies::user_settings, yaze::editor::EditorDependencies::window_manager, and workbench_panel_.

Referenced by yaze::test::DungeonEditorTestSuite::RunObjectManipulationTest(), and yaze::test::DungeonEditorTestSuite::RunRoomSaveTest().

◆ Load()

absl::Status yaze::editor::DungeonEditorV2::Load ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 627 of file dungeon_editor_v2.cc.

References active_rooms_, yaze::zelda3::CustomObjectManager::AddObjectFile(), ASSIGN_OR_RETURN, yaze::project::YazeProject::code_folder, yaze::gfx::CreatePaletteGroupFromLargePalette(), current_palette_, current_palette_group_, current_palette_group_id_, current_palette_id_, current_room_id_, custom_collision_panel_, yaze::project::YazeProject::custom_object_files, yaze::project::YazeProject::custom_objects_folder, yaze::editor::Editor::dependencies_, door_editor_panel_, dungeon_editor_system_, yaze::gfx::PaletteGroupMap::dungeon_main, entrances_, yaze::editor::DungeonWorkbenchContent::FocusSelectionInspector(), yaze::editor::Editor::game_data(), yaze::gfx::PaletteManager::Get(), yaze::core::FeatureFlags::get(), yaze::zelda3::CustomObjectManager::Get(), yaze::zelda3::ObjectDimensionTable::Get(), yaze::project::YazeProject::GetAbsolutePath(), GetViewerForRoom(), yaze::zelda3::CustomObjectManager::Initialize(), yaze::gfx::PaletteManager::Initialize(), yaze::gui::PaletteEditorWidget::Initialize(), InvalidateDungeonPaletteUsers(), yaze::editor::DungeonObjectSelector::InvalidatePreviewCache(), yaze::Rom::is_loaded(), is_loaded_, IsWorkbenchWorkflowEnabled(), item_editor_panel_, yaze::core::FeatureFlags::Flags::kEnableCustomObjects, yaze::editor::DungeonRoomLoader::LoadDungeonSpawnPoints(), yaze::editor::DungeonRoomLoader::LoadRoomEntrances(), minecart_track_editor_panel_, object_editor_content_, yaze::editor::ObjectSelectorContent::object_selector(), object_selector_panel_, object_tile_editor_panel_, OnEntranceSelected(), OnRoomSelected(), OpenWindow(), overlay_manager_panel_, owned_custom_collision_panel_, owned_door_editor_panel_, owned_minecart_track_editor_panel_, owned_object_editor_content_, owned_object_selector_panel_, owned_room_tag_editor_panel_, owned_water_fill_panel_, palette_editor_, palette_editor_panel_, yaze::zelda3::GameData::palette_groups, yaze::editor::EditorDependencies::project, yaze::editor::WorkspaceWindowManager::RegisterWindowContent(), ReloadWaterFillZones(), renderer_, RETURN_IF_ERROR, rom_, room_graphics_panel_, room_loader_, room_selector_, room_tag_editor_panel_, room_viewers_, rooms_, yaze::project::YazeProject::Save(), yaze::editor::DungeonRoomSelector::set_active_rooms(), yaze::editor::DungeonRoomSelector::set_entrances(), yaze::editor::DungeonRoomSelector::set_rooms(), yaze::editor::ObjectSelectorContent::SetCurrentPaletteGroup(), yaze::editor::RoomGraphicsContent::SetCurrentPaletteGroup(), yaze::editor::DungeonObjectSelector::SetCustomObjectsFolder(), yaze::gui::PaletteEditorWidget::SetDungeonRenderPaletteMode(), yaze::editor::DungeonWorkbenchContent::SetEmbeddedEditorPanels(), yaze::editor::DungeonWorkbenchContent::SetEmbeddedToolPanels(), yaze::editor::DungeonRoomSelector::SetEntranceSelectedCallback(), yaze::editor::ObjectSelectorContent::SetGameData(), yaze::gui::PaletteEditorWidget::SetOnDungeonPaletteChanged(), yaze::editor::DungeonObjectSelector::SetProject(), yaze::editor::MinecartTrackEditorPanel::SetProject(), yaze::editor::MinecartTrackEditorPanel::SetProjectRoot(), yaze::editor::MinecartTrackEditorPanel::SetRom(), yaze::editor::MinecartTrackEditorPanel::SetRoomNavigationCallback(), yaze::editor::MinecartTrackEditorPanel::SetRooms(), yaze::editor::DungeonRoomSelector::SetRoomSelectedCallback(), yaze::editor::DungeonRoomSelector::SetRoomSelectedWithIntentCallback(), yaze::editor::DungeonObjectSelector::SetTileEditorPanel(), yaze::editor::DungeonRoomStore::size(), spawn_points_, sprite_editor_panel_, yaze::editor::EditorDependencies::toast_manager, water_fill_panel_, yaze::editor::EditorDependencies::window_manager, workbench_compare_viewer_, workbench_panel_, and workbench_viewer_.

◆ Update()

◆ Undo()

◆ Redo()

◆ Cut()

absl::Status yaze::editor::DungeonEditorV2::Cut ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 137 of file dungeon_editor_v2_undo.cc.

References current_room_id_, and GetViewerForRoom().

Here is the call graph for this function:

◆ Copy()

absl::Status yaze::editor::DungeonEditorV2::Copy ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 145 of file dungeon_editor_v2_undo.cc.

References current_room_id_, and GetViewerForRoom().

Here is the call graph for this function:

◆ Paste()

absl::Status yaze::editor::DungeonEditorV2::Paste ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 152 of file dungeon_editor_v2_undo.cc.

References current_room_id_, and GetViewerForRoom().

Here is the call graph for this function:

◆ Find()

absl::Status yaze::editor::DungeonEditorV2::Find ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 138 of file dungeon_editor_v2.h.

◆ Save()

◆ BeginSaveTransaction()

◆ RollbackSaveTransaction()

◆ CommitSaveTransaction()

void yaze::editor::DungeonEditorV2::CommitSaveTransaction ( )
overridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 399 of file dungeon_editor_v2_persistence.cc.

References yaze::gfx::PaletteManager::CommitSaveTransaction(), yaze::gfx::PaletteManager::Get(), and save_transaction_snapshot_.

Referenced by RunWithSaveTransaction().

Here is the call graph for this function:

◆ ContributeStatus()

◆ SaveRoom()

◆ LoadedRoomCount()

int yaze::editor::DungeonEditorV2::LoadedRoomCount ( ) const

Definition at line 1172 of file dungeon_editor_v2.cc.

References yaze::editor::DungeonRoomStore::LoadedCount(), and rooms_.

Referenced by ContributeStatus().

Here is the call graph for this function:

◆ PendingRoomCount()

int yaze::editor::DungeonEditorV2::PendingRoomCount ( ) const

Definition at line 1176 of file dungeon_editor_v2.cc.

References yaze::editor::DungeonRoomStore::ForEachMaterialized(), yaze::zelda3::Room::HasUnsavedChanges(), and rooms_.

Referenced by HasPendingRoomChanges().

Here is the call graph for this function:

◆ HasPendingRoomChanges()

bool yaze::editor::DungeonEditorV2::HasPendingRoomChanges ( ) const

Definition at line 1186 of file dungeon_editor_v2.cc.

References PendingRoomCount().

Referenced by HasPendingDungeonChanges().

Here is the call graph for this function:

◆ HasPendingDungeonChanges()

bool yaze::editor::DungeonEditorV2::HasPendingDungeonChanges ( ) const

◆ CurrentRoomHasPendingChanges()

bool yaze::editor::DungeonEditorV2::CurrentRoomHasPendingChanges ( ) const

Definition at line 1209 of file dungeon_editor_v2.cc.

References current_room_id_, yaze::editor::DungeonRoomStore::GetIfMaterialized(), rooms_, and yaze::editor::DungeonRoomStore::size().

Referenced by ContributeStatus().

Here is the call graph for this function:

◆ TotalRoomCount()

int yaze::editor::DungeonEditorV2::TotalRoomCount ( ) const
inline

Definition at line 152 of file dungeon_editor_v2.h.

References rooms_, and yaze::editor::DungeonRoomStore::size().

Referenced by ContributeStatus().

Here is the call graph for this function:

◆ CollectWriteRanges()

std::vector< std::pair< uint32_t, uint32_t > > yaze::editor::DungeonEditorV2::CollectWriteRanges ( ) const

Definition at line 582 of file dungeon_editor_v2_persistence.cc.

References yaze::zelda3::CollectDirtyDungeonSpawnPointWriteRanges(), yaze::zelda3::CollectDirtyRegularDungeonEntranceWriteRanges(), yaze::zelda3::Room::custom_collision_dirty(), yaze::editor::Editor::dependencies_, yaze::core::FeatureFlags::Flags::dungeon, yaze::zelda3::Room::EncodeObjects(), yaze::zelda3::Room::EncodeSprites(), entrances_, yaze::editor::DungeonRoomStore::ForEachLoaded(), yaze::editor::DungeonRoomStore::ForEachMaterialized(), game_data_, yaze::gfx::PaletteManager::Get(), yaze::core::FeatureFlags::get(), yaze::core::HackManifest::GetDungeonStreamLayout(), yaze::project::YazeProject::hack_manifest, yaze::zelda3::Room::header_dirty(), yaze::zelda3::Room::id(), yaze::Rom::is_loaded(), yaze::core::kCopyOnWrite, yaze::zelda3::kCustomCollisionDataPosition, yaze::zelda3::kCustomCollisionDataSoftEnd, yaze::zelda3::kCustomCollisionRoomPointers, yaze::zelda3::kDoorPointers, yaze::core::kLong24, yaze::zelda3::kMessagesIdDungeon, yaze::zelda3::kNumberOfRooms, yaze::core::kObjects, yaze::zelda3::kRoomObjectPointer, yaze::zelda3::kRoomsSpritePointer, yaze::core::kSprites, yaze::zelda3::kWaterFillTableEnd, yaze::zelda3::kWaterFillTableStart, yaze::core::HackManifest::loaded(), LOG_WARN, yaze::zelda3::Room::object_stream_dirty(), yaze::zelda3::Room::object_stream_header_dirty(), yaze::core::DungeonStreamLayout::pointer_encoding, yaze::editor::EditorDependencies::project, rom_, rooms_, yaze::SnesToPc(), spawn_points_, yaze::zelda3::Room::sprites_dirty(), yaze::Rom::vector(), and yaze::zelda3::Room::water_fill_dirty().

◆ SetRom()

◆ RefreshRomBackedState()

absl::Status yaze::editor::DungeonEditorV2::RefreshRomBackedState ( )

Definition at line 131 of file dungeon_editor_v2.cc.

References ApplyEntranceRenderContext(), ASSIGN_OR_RETURN, yaze::editor::ObjectSelectorContent::CancelPlacement(), yaze::editor::UndoManager::Clear(), yaze::gfx::SnesPalette::clear(), yaze::editor::ObjectTileEditorPanel::Close(), ConfigureViewerRenderContext(), yaze::gfx::CreatePaletteGroupFromLargePalette(), current_palette_, current_palette_group_, current_palette_group_id_, current_palette_id_, current_room_id_, yaze::editor::Editor::dependencies_, dungeon_editor_system_, yaze::gfx::PaletteGroupMap::dungeon_main, yaze::gfx::PaletteGroup::empty(), entrances_, yaze::editor::DungeonRoomStore::ForEachMaterialized(), game_data_, yaze::editor::DungeonRoomStore::GetIfMaterialized(), has_pending_undo_, yaze::gui::PaletteEditorWidget::Initialize(), yaze::editor::DungeonObjectSelector::InvalidatePreviewCache(), yaze::Rom::is_loaded(), is_loaded_, yaze::zelda3::Room::IsLoaded(), IsValidRoomId(), IsWorkbenchWorkflowEnabled(), yaze::editor::DungeonRoomLoader::LoadDungeonSpawnPoints(), yaze::editor::DungeonRoomLoader::LoadRoom(), yaze::editor::DungeonRoomLoader::LoadRoomEntrances(), yaze::zelda3::LoadRoomHeaderFromRom(), minecart_track_editor_panel_, yaze::editor::ObjectSelectorContent::object_selector(), object_selector_panel_, object_tile_editor_panel_, palette_editor_, yaze::zelda3::GameData::palette_groups, pending_collision_undo_, pending_swap_, pending_undo_, pending_water_fill_undo_, pending_workflow_mode_, yaze::editor::EditorDependencies::project, yaze::editor::DungeonCanvasViewer::RefreshRomBackedState(), ReloadWaterFillZones(), renderer_, RETURN_IF_ERROR, rom_, room_graphics_panel_, room_loader_, room_selector_, room_tag_editor_panel_, room_viewers_, rooms_, save_transaction_snapshot_, yaze::editor::DungeonRoomSelector::set_entrances(), yaze::editor::DungeonRoomSelector::set_rooms(), yaze::editor::ObjectSelectorContent::SetContext(), yaze::editor::DungeonCanvasViewer::SetCurrentPaletteGroup(), yaze::editor::ObjectSelectorContent::SetCurrentPaletteGroup(), yaze::editor::ObjectTileEditorPanel::SetCurrentPaletteGroup(), yaze::editor::RoomGraphicsContent::SetCurrentPaletteGroup(), yaze::gui::PaletteEditorWidget::SetCurrentPaletteId(), yaze::editor::DungeonCanvasViewer::SetCurrentPaletteId(), yaze::editor::ObjectSelectorContent::SetCurrentRoom(), yaze::gui::PaletteEditorWidget::SetDungeonRenderPaletteMode(), yaze::editor::DungeonCanvasViewer::SetEditorSystem(), yaze::zelda3::Room::SetGameData(), yaze::editor::DungeonRoomLoader::SetGameData(), yaze::editor::DungeonRoomStore::SetGameData(), yaze::editor::DungeonCanvasViewer::SetMinecartTrackPanel(), yaze::editor::DungeonCanvasViewer::SetProject(), yaze::editor::DungeonCanvasViewer::SetRenderer(), yaze::editor::DungeonRoomLoader::SetRom(), yaze::editor::DungeonRoomSelector::SetRom(), yaze::editor::DungeonRoomStore::SetRom(), yaze::editor::MinecartTrackEditorPanel::SetRom(), yaze::editor::DungeonWorkbenchContent::SetRom(), yaze::editor::ObjectSelectorContent::SetRooms(), yaze::editor::MinecartTrackEditorPanel::SetRooms(), yaze::editor::RoomTagEditorPanel::SetRooms(), yaze::gfx::PaletteGroup::size(), spawn_points_, SyncPanelsToRoom(), yaze::editor::Editor::undo_manager_, undo_restore_triggered_ping_, workbench_compare_viewer_, workbench_panel_, and workbench_viewer_.

◆ rom()

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

Definition at line 180 of file dungeon_editor_v2.h.

References rom_.

Referenced by DungeonEditorV2(), and SetRom().

◆ add_room()

void yaze::editor::DungeonEditorV2::add_room ( int room_id)

Definition at line 1719 of file dungeon_editor_v2.cc.

References OnRoomSelected().

Referenced by yaze::test::DungeonEditorTestSuite::RunObjectManipulationTest(), and yaze::test::DungeonEditorTestSuite::RunRoomSaveTest().

Here is the call graph for this function:

◆ FocusRoom()

void yaze::editor::DungeonEditorV2::FocusRoom ( int room_id)

Definition at line 1723 of file dungeon_editor_v2.cc.

References room_cards_.

Referenced by OnRoomSelected().

◆ SelectObject()

void yaze::editor::DungeonEditorV2::SelectObject ( int obj_id)

◆ SetAgentMode()

◆ IsRomLoaded()

bool yaze::editor::DungeonEditorV2::IsRomLoaded ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 191 of file dungeon_editor_v2.h.

References yaze::Rom::is_loaded(), and rom_.

Here is the call graph for this function:

◆ GetRomStatus()

std::string yaze::editor::DungeonEditorV2::GetRomStatus ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 192 of file dungeon_editor_v2.h.

References yaze::Rom::is_loaded(), rom_, and yaze::Rom::title().

Here is the call graph for this function:

◆ OpenWindow()

void yaze::editor::DungeonEditorV2::OpenWindow ( const std::string & window_id)
inline

◆ SetWorkbenchWorkflowMode()

◆ QueueWorkbenchWorkflowMode()

◆ ToggleWorkbenchWorkflowMode()

void yaze::editor::DungeonEditorV2::ToggleWorkbenchWorkflowMode ( bool show_toast = true)

Definition at line 1287 of file dungeon_editor_v2.cc.

References IsWorkbenchWorkflowEnabled(), and QueueWorkbenchWorkflowMode().

Referenced by ContributeStatus(), and Update().

Here is the call graph for this function:

◆ IsWorkbenchWorkflowEnabled()

◆ current_room_id()

int yaze::editor::DungeonEditorV2::current_room_id ( ) const
inline

Definition at line 226 of file dungeon_editor_v2.h.

References yaze::editor::DungeonRoomSelector::current_room_id(), and room_selector_.

Referenced by ContributeStatus().

Here is the call graph for this function:

◆ mutable_current_room_id()

int * yaze::editor::DungeonEditorV2::mutable_current_room_id ( )
inline

Definition at line 227 of file dungeon_editor_v2.h.

References current_room_id_.

◆ active_rooms()

const ImVector< int > & yaze::editor::DungeonEditorV2::active_rooms ( ) const
inline

Definition at line 228 of file dungeon_editor_v2.h.

References yaze::editor::DungeonRoomSelector::active_rooms(), and room_selector_.

Here is the call graph for this function:

◆ rooms() [1/2]

DungeonRoomStore & yaze::editor::DungeonEditorV2::rooms ( )
inline

◆ rooms() [2/2]

const DungeonRoomStore & yaze::editor::DungeonEditorV2::rooms ( ) const
inline

Definition at line 232 of file dungeon_editor_v2.h.

References rooms_.

◆ renderer()

gfx::IRenderer * yaze::editor::DungeonEditorV2::renderer ( ) const
inline

Definition at line 233 of file dungeon_editor_v2.h.

References renderer_.

◆ object_selector_panel()

ObjectSelectorContent * yaze::editor::DungeonEditorV2::object_selector_panel ( ) const
inline

Definition at line 234 of file dungeon_editor_v2.h.

References object_selector_panel_.

◆ object_editor_panel()

ObjectSelectorContent * yaze::editor::DungeonEditorV2::object_editor_panel ( ) const
inline

Definition at line 237 of file dungeon_editor_v2.h.

References object_selector_panel_.

◆ object_editor_content()

ObjectEditorContent * yaze::editor::DungeonEditorV2::object_editor_content ( ) const
inline

Definition at line 240 of file dungeon_editor_v2.h.

References object_editor_content_.

◆ door_editor_panel()

DoorEditorContent * yaze::editor::DungeonEditorV2::door_editor_panel ( ) const
inline

Definition at line 243 of file dungeon_editor_v2.h.

References door_editor_panel_.

◆ GetRecentRooms()

const std::deque< int > & yaze::editor::DungeonEditorV2::GetRecentRooms ( ) const
inline

Get the list of recently visited room IDs.

Returns
Deque of room IDs, most recent first (max 10 entries)

Definition at line 249 of file dungeon_editor_v2.h.

References recent_rooms_.

◆ DrawRoomPanels()

◆ DrawRoomTab()

◆ ProcessDeferredTextures()

void yaze::editor::DungeonEditorV2::ProcessDeferredTextures ( )
private

Definition at line 1760 of file dungeon_editor_v2.cc.

References yaze::gfx::Arena::Get(), yaze::gfx::Arena::ProcessTextureQueue(), and renderer_.

Here is the call graph for this function:

◆ ReloadWaterFillZones()

◆ OnRoomSelected() [1/2]

void yaze::editor::DungeonEditorV2::OnRoomSelected ( int room_id,
bool request_focus = true )
private

Definition at line 1542 of file dungeon_editor_v2.cc.

References active_rooms_, ApplyEntranceRenderContext(), ConfigureViewerRenderContext(), yaze::gfx::CreatePaletteGroupFromLargePalette(), current_palette_, current_palette_group_, current_palette_group_id_, current_palette_id_, current_room_id_, yaze::editor::Editor::dependencies_, dungeon_editor_system_, yaze::gfx::PaletteGroupMap::dungeon_main, FocusRoom(), yaze::editor::Editor::game_data(), yaze::zelda3::GetRoomLabel(), GetViewerForRoom(), ICON_MD_GRID_ON, yaze::editor::WorkspaceWindowManager::IsWindowOpen(), IsWorkbenchWorkflowEnabled(), kMaxRecentRooms, yaze::editor::DungeonRoomLoader::LoadRoom(), LOG_WARN, yaze::editor::DungeonWorkbenchContent::NotifyRoomChanged(), object_selector_panel_, yaze::editor::WorkspaceWindowManager::OpenWindow(), palette_editor_, yaze::zelda3::GameData::palette_groups, recent_rooms_, yaze::editor::WorkspaceWindowManager::RegisterWindow(), room_graphics_panel_, room_loader_, room_selector_, rooms_, yaze::editor::DungeonRoomSelector::set_active_rooms(), yaze::editor::DungeonRoomSelector::set_current_room_id(), yaze::editor::ObjectSelectorContent::SetCurrentPaletteGroup(), yaze::editor::RoomGraphicsContent::SetCurrentPaletteGroup(), yaze::gui::PaletteEditorWidget::SetCurrentPaletteId(), yaze::editor::DungeonRoomStore::size(), SyncPanelsToRoom(), yaze::editor::EditorDependencies::window_manager, and workbench_panel_.

Referenced by add_room(), DrawRoomPanels(), Initialize(), Load(), OnEntranceSelected(), OnRoomSelected(), ProcessPendingSwap(), and Update().

◆ OnRoomSelected() [2/2]

◆ OnEntranceSelected()

void yaze::editor::DungeonEditorV2::OnEntranceSelected ( int entrance_id)
private

Definition at line 1667 of file dungeon_editor_v2.cc.

References current_entrance_id_, entrances_, OnRoomSelected(), room_selector_, and yaze::editor::DungeonRoomSelector::set_current_entrance_id().

Referenced by Initialize(), and Load().

Here is the call graph for this function:

◆ SyncPanelsToRoom()

◆ InvalidateDungeonPaletteUsers()

void yaze::editor::DungeonEditorV2::InvalidateDungeonPaletteUsers ( gui::DungeonPaletteChange change)
private

◆ ResolveSelectedEntranceBlocksetForRoom()

uint8_t yaze::editor::DungeonEditorV2::ResolveSelectedEntranceBlocksetForRoom ( int room_id) const
private

Definition at line 1677 of file dungeon_editor_v2.cc.

References current_entrance_id_, entrances_, rooms_, and yaze::editor::DungeonRoomStore::size().

Referenced by ApplyEntranceRenderContext(), and ConfigureViewerRenderContext().

Here is the call graph for this function:

◆ ApplyEntranceRenderContext()

void yaze::editor::DungeonEditorV2::ApplyEntranceRenderContext ( int room_id)
private

◆ ConfigureViewerRenderContext()

void yaze::editor::DungeonEditorV2::ConfigureViewerRenderContext ( DungeonCanvasViewer * viewer,
int room_id )
private

◆ WireViewerPanelCallbacks()

void yaze::editor::DungeonEditorV2::WireViewerPanelCallbacks ( DungeonCanvasViewer * viewer)
private

Definition at line 1973 of file dungeon_editor_v2.cc.

References yaze::editor::Editor::dependencies_, yaze::editor::DungeonWorkbenchContent::FocusEntranceBrowser(), yaze::editor::DungeonWorkbenchContent::FocusRoomInspector(), IsWorkbenchWorkflowEnabled(), kEntranceListId, yaze::editor::kError, kObjectSelectorId, kRoomGraphicsId, kRoomMatrixId, kRoomSelectorId, yaze::editor::kSuccess, LOG_ERROR, minecart_track_editor_panel_, yaze::editor::DungeonWorkbenchContent::OpenDoorTool(), OpenGraphicsEditorForObject(), yaze::editor::DungeonWorkbenchContent::OpenItemTool(), yaze::editor::DungeonWorkbenchContent::OpenObjectSelectorTool(), yaze::editor::DungeonWorkbenchContent::OpenRoomGraphicsTool(), yaze::editor::DungeonWorkbenchContent::OpenSpriteTool(), OpenWindow(), yaze::editor::EditorDependencies::project, SaveRoom(), yaze::editor::DungeonCanvasViewer::SetEditGraphicsCallback(), yaze::editor::DungeonCanvasViewer::SetMinecartTrackPanel(), yaze::editor::DungeonCanvasViewer::SetProject(), yaze::editor::DungeonCanvasViewer::SetSaveRoomCallback(), yaze::editor::DungeonCanvasViewer::SetShowDoorEditorCallback(), yaze::editor::DungeonCanvasViewer::SetShowDungeonSettingsCallback(), yaze::editor::DungeonCanvasViewer::SetShowEntranceListCallback(), yaze::editor::DungeonCanvasViewer::SetShowItemPanelCallback(), yaze::editor::DungeonCanvasViewer::SetShowObjectPanelCallback(), yaze::editor::DungeonCanvasViewer::SetShowRoomGraphicsCallback(), yaze::editor::DungeonCanvasViewer::SetShowRoomListCallback(), yaze::editor::DungeonCanvasViewer::SetShowRoomMatrixCallback(), yaze::editor::DungeonCanvasViewer::SetShowSpritePanelCallback(), yaze::editor::ToastManager::Show(), yaze::editor::DungeonWorkbenchContent::ShowConnectedGraph(), yaze::editor::EditorDependencies::toast_manager, and workbench_panel_.

◆ ShowRoomPanel()

void yaze::editor::DungeonEditorV2::ShowRoomPanel ( int room_id)
private

Definition at line 2448 of file dungeon_editor_v2.cc.

References yaze::zelda3::GetRoomLabel(), ICON_MD_GRID_ON, and yaze::gui::MakePanelTitle().

Referenced by DrawRoomPanels(), OnRoomSelected(), and SetWorkbenchWorkflowMode().

Here is the call graph for this function:

◆ SaveAllRooms()

void yaze::editor::DungeonEditorV2::SaveAllRooms ( )
private

Definition at line 1175 of file dungeon_editor_v2_persistence.cc.

References LOG_ERROR.

Referenced by Initialize().

◆ HandleObjectPlaced()

◆ OpenGraphicsEditorForObject()

◆ GetViewerForRoom()

◆ GetWorkbenchViewer()

DungeonCanvasViewer * yaze::editor::DungeonEditorV2::GetWorkbenchViewer ( )
private

Definition at line 2243 of file dungeon_editor_v2.cc.

Referenced by GetViewerForRoom(), and Initialize().

◆ GetWorkbenchCompareViewer()

DungeonCanvasViewer * yaze::editor::DungeonEditorV2::GetWorkbenchCompareViewer ( int room_id)
private

Definition at line 2331 of file dungeon_editor_v2.cc.

Referenced by Initialize().

◆ RefreshWorkbenchViewerRuntimeContext()

◆ TouchViewerLru()

void yaze::editor::DungeonEditorV2::TouchViewerLru ( int room_id)
private

Definition at line 1964 of file dungeon_editor_v2.cc.

References room_viewers_.

◆ RemoveViewerFromLru()

void yaze::editor::DungeonEditorV2::RemoveViewerFromLru ( int room_id)
private

Definition at line 1968 of file dungeon_editor_v2.cc.

◆ SaveRoomData()

◆ RunWithSaveTransaction()

absl::Status yaze::editor::DungeonEditorV2::RunWithSaveTransaction ( const std::function< absl::Status()> & operation)
private

◆ BeginUndoSnapshot()

◆ FinalizeUndoAction()

◆ RestoreRoomObjects()

void yaze::editor::DungeonEditorV2::RestoreRoomObjects ( int room_id,
const std::vector< zelda3::RoomObject > & objects,
const std::vector< size_t > & selected_indices )
private

Definition at line 217 of file dungeon_editor_v2_undo.cc.

References GetViewerForRoom(), IsWorkbenchWorkflowEnabled(), rooms_, yaze::editor::DungeonRoomStore::size(), and undo_restore_triggered_ping_.

Here is the call graph for this function:

◆ BeginCollisionUndoSnapshot()

void yaze::editor::DungeonEditorV2::BeginCollisionUndoSnapshot ( int room_id)
private

◆ FinalizeCollisionUndoAction()

◆ RestoreRoomCustomCollision()

void yaze::editor::DungeonEditorV2::RestoreRoomCustomCollision ( int room_id,
const zelda3::CustomCollisionMap & map )
private

Definition at line 281 of file dungeon_editor_v2_undo.cc.

References rooms_, and yaze::editor::DungeonRoomStore::size().

Here is the call graph for this function:

◆ BeginWaterFillUndoSnapshot()

void yaze::editor::DungeonEditorV2::BeginWaterFillUndoSnapshot ( int room_id)
private

◆ FinalizeWaterFillUndoAction()

◆ RestoreRoomWaterFill()

void yaze::editor::DungeonEditorV2::RestoreRoomWaterFill ( int room_id,
const WaterFillSnapshot & snap )
private

◆ SwapRoomInPanel()

void yaze::editor::DungeonEditorV2::SwapRoomInPanel ( int old_room_id,
int new_room_id )
private

◆ ProcessPendingSwap()

◆ ProcessPendingWorkflowMode()

void yaze::editor::DungeonEditorV2::ProcessPendingWorkflowMode ( )
private

◆ GetOrCreateRoomPanelSlotId()

int yaze::editor::DungeonEditorV2::GetOrCreateRoomPanelSlotId ( int room_id)
private

Definition at line 1358 of file dungeon_editor_v2.cc.

References next_room_panel_slot_id_, and room_panel_slot_ids_.

◆ ReleaseRoomPanelSlotId()

void yaze::editor::DungeonEditorV2::ReleaseRoomPanelSlotId ( int room_id)
private

Definition at line 1368 of file dungeon_editor_v2.cc.

References room_panel_slot_ids_.

Referenced by DrawRoomPanels().

◆ IsValidRoomId()

static bool yaze::editor::DungeonEditorV2::IsValidRoomId ( int room_id)
inlinestaticprivate

Definition at line 487 of file dungeon_editor_v2.h.

References yaze::zelda3::kNumberOfRooms.

Referenced by HandleObjectPlaced(), RefreshRomBackedState(), and Update().

Friends And Related Symbol Documentation

◆ DungeonEditorV2RegularEntranceTestPeer

friend class DungeonEditorV2RegularEntranceTestPeer
friend

Definition at line 252 of file dungeon_editor_v2.h.

◆ DungeonEditorV2ReloadTestPeer

friend class DungeonEditorV2ReloadTestPeer
friend

Definition at line 253 of file dungeon_editor_v2.h.

◆ DungeonEditorV2SpawnPointTestPeer

friend class DungeonEditorV2SpawnPointTestPeer
friend

Definition at line 254 of file dungeon_editor_v2.h.

◆ DungeonEditorV2SpawnRejectionTestPeer

friend class DungeonEditorV2SpawnRejectionTestPeer
friend

Definition at line 255 of file dungeon_editor_v2.h.

◆ DungeonEditorV2RomSafetyTest_UndoSnapshotLeakDetection_Test

friend class DungeonEditorV2RomSafetyTest_UndoSnapshotLeakDetection_Test
friend

Definition at line 256 of file dungeon_editor_v2.h.

◆ DungeonEditorV2RomSafetyTest_ObjectStreamUndoRedoRestoresSelectionIdentity_Test

friend class DungeonEditorV2RomSafetyTest_ObjectStreamUndoRedoRestoresSelectionIdentity_Test
friend

Definition at line 258 of file dungeon_editor_v2.h.

◆ DungeonEditorV2RomSafetyTest_ViewerCacheLRUEviction_Test

friend class DungeonEditorV2RomSafetyTest_ViewerCacheLRUEviction_Test
friend

Definition at line 259 of file dungeon_editor_v2.h.

◆ DungeonEditorV2RomSafetyTest_ViewerCacheNeverEvictsActiveRooms_Test

friend class DungeonEditorV2RomSafetyTest_ViewerCacheNeverEvictsActiveRooms_Test
friend

Definition at line 261 of file dungeon_editor_v2.h.

◆ DungeonEditorV2RomSafetyTest_ViewerCacheLRUAccessOrderUpdate_Test

friend class DungeonEditorV2RomSafetyTest_ViewerCacheLRUAccessOrderUpdate_Test
friend

Definition at line 263 of file dungeon_editor_v2.h.

◆ DungeonEditorV2RomSafetyTest_SaveAllRoomsRollsBackEarlierWritesOnLateFailure_Test

friend class DungeonEditorV2RomSafetyTest_SaveAllRoomsRollsBackEarlierWritesOnLateFailure_Test
friend

Definition at line 265 of file dungeon_editor_v2.h.

◆ DungeonEditorV2RomSafetyTest_LateCoordinatorRollbackRestoresEntranceDirtyState_Test

friend class DungeonEditorV2RomSafetyTest_LateCoordinatorRollbackRestoresEntranceDirtyState_Test
friend

Definition at line 267 of file dungeon_editor_v2.h.

◆ DungeonEditorPaletteRefreshTest_SharedHudEditRefreshesRoomUsingDifferentDungeonPalette_Test

friend class DungeonEditorPaletteRefreshTest_SharedHudEditRefreshesRoomUsingDifferentDungeonPalette_Test
friend

Definition at line 269 of file dungeon_editor_v2.h.

◆ DungeonEditorPaletteRefreshTest_DungeonMainEditRefreshesResolvedAliasesOnly_Test

friend class DungeonEditorPaletteRefreshTest_DungeonMainEditRefreshesResolvedAliasesOnly_Test
friend

Definition at line 271 of file dungeon_editor_v2.h.

◆ DungeonEditorPaletteRefreshTest_CachedRoomRefreshesThroughViewerCompositePreparation_Test

friend class DungeonEditorPaletteRefreshTest_CachedRoomRefreshesThroughViewerCompositePreparation_Test
friend

Definition at line 273 of file dungeon_editor_v2.h.

◆ DungeonEditorPaletteRefreshTest_CompareViewerScopesEntranceContextToRequestedRoom_Test

friend class DungeonEditorPaletteRefreshTest_CompareViewerScopesEntranceContextToRequestedRoom_Test
friend

Definition at line 275 of file dungeon_editor_v2.h.

Member Data Documentation

◆ kRoomSelectorId

constexpr const char* yaze::editor::DungeonEditorV2::kRoomSelectorId = "dungeon.room_selector"
staticconstexpr

◆ kEntranceListId

constexpr const char* yaze::editor::DungeonEditorV2::kEntranceListId = "dungeon.entrance_list"
staticconstexpr

Definition at line 217 of file dungeon_editor_v2.h.

Referenced by Initialize(), and WireViewerPanelCallbacks().

◆ kRoomMatrixId

constexpr const char* yaze::editor::DungeonEditorV2::kRoomMatrixId = "dungeon.room_matrix"
staticconstexpr

◆ kRoomGraphicsId

constexpr const char* yaze::editor::DungeonEditorV2::kRoomGraphicsId = "dungeon.room_graphics"
staticconstexpr

Definition at line 219 of file dungeon_editor_v2.h.

Referenced by Initialize(), SetAgentMode(), and WireViewerPanelCallbacks().

◆ kObjectSelectorId

constexpr const char* yaze::editor::DungeonEditorV2::kObjectSelectorId = "dungeon.object_selector"
staticconstexpr

◆ kObjectToolsId

constexpr const char* yaze::editor::DungeonEditorV2::kObjectToolsId = kObjectSelectorId
staticconstexpr

Definition at line 221 of file dungeon_editor_v2.h.

◆ kDoorEditorId

constexpr const char* yaze::editor::DungeonEditorV2::kDoorEditorId = "dungeon.door_editor"
staticconstexpr

Definition at line 222 of file dungeon_editor_v2.h.

Referenced by Initialize().

◆ kPaletteEditorId

constexpr const char* yaze::editor::DungeonEditorV2::kPaletteEditorId = "dungeon.palette_editor"
staticconstexpr

Definition at line 223 of file dungeon_editor_v2.h.

Referenced by Initialize().

◆ renderer_

gfx::IRenderer* yaze::editor::DungeonEditorV2::renderer_ = nullptr
private

◆ rom_

◆ game_data_

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

◆ rooms_

◆ entrances_

◆ spawn_points_

◆ save_transaction_snapshot_

std::optional<SaveTransactionSnapshot> yaze::editor::DungeonEditorV2::save_transaction_snapshot_
private

◆ current_entrance_id_

int yaze::editor::DungeonEditorV2::current_entrance_id_ = 0
private

◆ active_rooms_

ImVector<int> yaze::editor::DungeonEditorV2::active_rooms_
private

◆ current_room_id_

◆ kMaxRecentRooms

constexpr size_t yaze::editor::DungeonEditorV2::kMaxRecentRooms = 10
staticconstexprprivate

Definition at line 350 of file dungeon_editor_v2.h.

Referenced by OnRoomSelected().

◆ recent_rooms_

std::deque<int> yaze::editor::DungeonEditorV2::recent_rooms_
private

Definition at line 351 of file dungeon_editor_v2.h.

Referenced by GetRecentRooms(), Initialize(), OnRoomSelected(), and Update().

◆ pinned_rooms_

std::vector<int> yaze::editor::DungeonEditorV2::pinned_rooms_
private

Definition at line 352 of file dungeon_editor_v2.h.

◆ workbench_panel_

class DungeonWorkbenchContent* yaze::editor::DungeonEditorV2::workbench_panel_ = nullptr
private

◆ current_palette_

gfx::SnesPalette yaze::editor::DungeonEditorV2::current_palette_
private

Definition at line 358 of file dungeon_editor_v2.h.

Referenced by Load(), OnRoomSelected(), and RefreshRomBackedState().

◆ current_palette_group_

gfx::PaletteGroup yaze::editor::DungeonEditorV2::current_palette_group_
private

Definition at line 359 of file dungeon_editor_v2.h.

Referenced by Load(), OnRoomSelected(), and RefreshRomBackedState().

◆ current_palette_id_

uint64_t yaze::editor::DungeonEditorV2::current_palette_id_ = 0
private

Definition at line 360 of file dungeon_editor_v2.h.

Referenced by Load(), OnRoomSelected(), and RefreshRomBackedState().

◆ current_palette_group_id_

uint64_t yaze::editor::DungeonEditorV2::current_palette_group_id_ = 0
private

Definition at line 361 of file dungeon_editor_v2.h.

Referenced by Load(), OnRoomSelected(), and RefreshRomBackedState().

◆ room_loader_

DungeonRoomLoader yaze::editor::DungeonEditorV2::room_loader_
private

◆ room_selector_

DungeonRoomSelector yaze::editor::DungeonEditorV2::room_selector_
private

◆ kMaxCachedViewers

constexpr int yaze::editor::DungeonEditorV2::kMaxCachedViewers = 20
staticconstexprprivate

Definition at line 366 of file dungeon_editor_v2.h.

◆ room_viewers_

util::LruCache<int, std::unique_ptr<DungeonCanvasViewer> > yaze::editor::DungeonEditorV2::room_viewers_
private

◆ workbench_viewer_

std::unique_ptr<DungeonCanvasViewer> yaze::editor::DungeonEditorV2::workbench_viewer_
private

Definition at line 369 of file dungeon_editor_v2.h.

Referenced by Load(), RefreshRomBackedState(), SetGameData(), and SetRom().

◆ workbench_compare_viewer_

std::unique_ptr<DungeonCanvasViewer> yaze::editor::DungeonEditorV2::workbench_compare_viewer_
private

Definition at line 370 of file dungeon_editor_v2.h.

Referenced by Load(), RefreshRomBackedState(), SetGameData(), and SetRom().

◆ palette_editor_

gui::PaletteEditorWidget yaze::editor::DungeonEditorV2::palette_editor_
private

Definition at line 372 of file dungeon_editor_v2.h.

Referenced by Load(), OnRoomSelected(), and RefreshRomBackedState().

◆ object_selector_panel_

ObjectSelectorContent* yaze::editor::DungeonEditorV2::object_selector_panel_ = nullptr
private

◆ object_editor_content_

ObjectEditorContent* yaze::editor::DungeonEditorV2::object_editor_content_ = nullptr
private

Definition at line 378 of file dungeon_editor_v2.h.

Referenced by Load(), object_editor_content(), and ~DungeonEditorV2().

◆ door_editor_panel_

DoorEditorContent* yaze::editor::DungeonEditorV2::door_editor_panel_ = nullptr
private

Definition at line 379 of file dungeon_editor_v2.h.

Referenced by door_editor_panel(), Load(), and ~DungeonEditorV2().

◆ room_graphics_panel_

RoomGraphicsContent* yaze::editor::DungeonEditorV2::room_graphics_panel_ = nullptr
private

Definition at line 380 of file dungeon_editor_v2.h.

Referenced by Load(), OnRoomSelected(), and RefreshRomBackedState().

◆ palette_editor_panel_

PaletteEditorContent* yaze::editor::DungeonEditorV2::palette_editor_panel_ = nullptr
private

Definition at line 381 of file dungeon_editor_v2.h.

Referenced by Load().

◆ sprite_editor_panel_

class SpriteEditorPanel* yaze::editor::DungeonEditorV2::sprite_editor_panel_ = nullptr
private

Definition at line 382 of file dungeon_editor_v2.h.

Referenced by Load(), and ~DungeonEditorV2().

◆ item_editor_panel_

class ItemEditorPanel* yaze::editor::DungeonEditorV2::item_editor_panel_ = nullptr
private

Definition at line 383 of file dungeon_editor_v2.h.

Referenced by Load(), and ~DungeonEditorV2().

◆ minecart_track_editor_panel_

class MinecartTrackEditorPanel* yaze::editor::DungeonEditorV2::minecart_track_editor_panel_ = nullptr
private

Definition at line 384 of file dungeon_editor_v2.h.

Referenced by Load(), RefreshRomBackedState(), and WireViewerPanelCallbacks().

◆ room_tag_editor_panel_

class RoomTagEditorPanel* yaze::editor::DungeonEditorV2::room_tag_editor_panel_ = nullptr
private

Definition at line 385 of file dungeon_editor_v2.h.

Referenced by Load(), and RefreshRomBackedState().

◆ custom_collision_panel_

class CustomCollisionPanel* yaze::editor::DungeonEditorV2::custom_collision_panel_ = nullptr
private

Definition at line 386 of file dungeon_editor_v2.h.

Referenced by Load(), and ~DungeonEditorV2().

◆ water_fill_panel_

class WaterFillPanel* yaze::editor::DungeonEditorV2::water_fill_panel_ = nullptr
private

Definition at line 387 of file dungeon_editor_v2.h.

Referenced by Load(), and ~DungeonEditorV2().

◆ object_tile_editor_panel_

ObjectTileEditorPanel* yaze::editor::DungeonEditorV2::object_tile_editor_panel_ = nullptr
private

Definition at line 388 of file dungeon_editor_v2.h.

Referenced by Load(), and RefreshRomBackedState().

◆ overlay_manager_panel_

OverlayManagerPanel* yaze::editor::DungeonEditorV2::overlay_manager_panel_ = nullptr
private

Definition at line 389 of file dungeon_editor_v2.h.

Referenced by Load().

◆ owned_object_selector_panel_

std::unique_ptr<ObjectSelectorContent> yaze::editor::DungeonEditorV2::owned_object_selector_panel_
private

Definition at line 393 of file dungeon_editor_v2.h.

Referenced by Load().

◆ owned_object_editor_content_

std::unique_ptr<ObjectEditorContent> yaze::editor::DungeonEditorV2::owned_object_editor_content_
private

Definition at line 394 of file dungeon_editor_v2.h.

Referenced by Load().

◆ owned_door_editor_panel_

std::unique_ptr<DoorEditorContent> yaze::editor::DungeonEditorV2::owned_door_editor_panel_
private

Definition at line 395 of file dungeon_editor_v2.h.

Referenced by Load().

◆ owned_room_tag_editor_panel_

std::unique_ptr<RoomTagEditorPanel> yaze::editor::DungeonEditorV2::owned_room_tag_editor_panel_
private

Definition at line 396 of file dungeon_editor_v2.h.

Referenced by Load().

◆ owned_custom_collision_panel_

std::unique_ptr<CustomCollisionPanel> yaze::editor::DungeonEditorV2::owned_custom_collision_panel_
private

Definition at line 397 of file dungeon_editor_v2.h.

Referenced by Load().

◆ owned_water_fill_panel_

std::unique_ptr<WaterFillPanel> yaze::editor::DungeonEditorV2::owned_water_fill_panel_
private

Definition at line 398 of file dungeon_editor_v2.h.

Referenced by Load().

◆ owned_minecart_track_editor_panel_

std::unique_ptr<MinecartTrackEditorPanel> yaze::editor::DungeonEditorV2::owned_minecart_track_editor_panel_
private

Definition at line 399 of file dungeon_editor_v2.h.

Referenced by Load().

◆ dungeon_editor_system_

std::unique_ptr<zelda3::DungeonEditorSystem> yaze::editor::DungeonEditorV2::dungeon_editor_system_
private

◆ render_service_

std::unique_ptr<emu::render::EmulatorRenderService> yaze::editor::DungeonEditorV2::render_service_
private

Definition at line 401 of file dungeon_editor_v2.h.

◆ is_loaded_

bool yaze::editor::DungeonEditorV2::is_loaded_ = false
private

Definition at line 403 of file dungeon_editor_v2.h.

Referenced by Load(), RefreshRomBackedState(), and Update().

◆ room_window_class_

ImGuiWindowClass yaze::editor::DungeonEditorV2::room_window_class_
private

Definition at line 406 of file dungeon_editor_v2.h.

Referenced by DrawRoomPanels(), Initialize(), and Update().

◆ room_dock_id_

ImGuiID yaze::editor::DungeonEditorV2::room_dock_id_ = 0
private

Definition at line 409 of file dungeon_editor_v2.h.

Referenced by DrawRoomPanels().

◆ room_cards_

std::unordered_map<int, std::shared_ptr<gui::PanelWindow> > yaze::editor::DungeonEditorV2::room_cards_
private

Definition at line 412 of file dungeon_editor_v2.h.

Referenced by DrawRoomPanels(), FocusRoom(), and ProcessPendingSwap().

◆ next_room_panel_slot_id_

int yaze::editor::DungeonEditorV2::next_room_panel_slot_id_ = 1
private

Definition at line 417 of file dungeon_editor_v2.h.

Referenced by GetOrCreateRoomPanelSlotId(), and ProcessPendingSwap().

◆ room_panel_slot_ids_

std::unordered_map<int, int> yaze::editor::DungeonEditorV2::room_panel_slot_ids_
private

◆ pending_undo_

PendingUndo yaze::editor::DungeonEditorV2::pending_undo_
private

◆ has_pending_undo_

bool yaze::editor::DungeonEditorV2::has_pending_undo_ = false
private

◆ undo_restore_triggered_ping_

bool yaze::editor::DungeonEditorV2::undo_restore_triggered_ping_ = false
private

Definition at line 430 of file dungeon_editor_v2.h.

Referenced by Redo(), RefreshRomBackedState(), RestoreRoomObjects(), and Undo().

◆ pending_collision_undo_

PendingCollisionUndo yaze::editor::DungeonEditorV2::pending_collision_undo_
private

◆ pending_water_fill_undo_

PendingWaterFillUndo yaze::editor::DungeonEditorV2::pending_water_fill_undo_
private

◆ pending_swap_

PendingSwap yaze::editor::DungeonEditorV2::pending_swap_
private

Definition at line 450 of file dungeon_editor_v2.h.

Referenced by ProcessPendingSwap(), RefreshRomBackedState(), and SwapRoomInPanel().

◆ pending_workflow_mode_

PendingWorkflowMode yaze::editor::DungeonEditorV2::pending_workflow_mode_
private

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