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

Comprehensive dungeon editing system. More...

#include <dungeon_editor_system.h>

Collaboration diagram for yaze::zelda3::DungeonEditorSystem:

Classes

struct  ChestData
 
struct  DoorData
 
struct  DungeonSettings
 
struct  EditorState
 
struct  EntranceData
 
struct  ItemData
 
struct  RoomProperties
 
struct  SpriteData
 
struct  UndoPoint
 

Public Types

enum class  EditorMode {
  kObjects , kSprites , kItems , kEntrances ,
  kDoors , kChests , kProperties , kGlobal
}
 
enum class  SpriteType {
  kEnemy , kNPC , kInteractive , kDecoration ,
  kBoss , kSpecial
}
 
enum class  ItemType {
  kWeapon , kTool , kKey , kHeart ,
  kRupee , kBottle , kUpgrade , kSpecial
}
 
enum class  EntranceType {
  kNormal , kStairs , kDoor , kCave ,
  kWarp , kBoss , kSpecial
}
 
using RoomChangedCallback = std::function<void(int room_id)>
 
using SpriteChangedCallback = std::function<void(int sprite_id)>
 
using ItemChangedCallback = std::function<void(int item_id)>
 
using EntranceChangedCallback = std::function<void(int entrance_id)>
 
using DoorChangedCallback = std::function<void(int door_id)>
 
using ChestChangedCallback = std::function<void(int chest_id)>
 
using ModeChangedCallback = std::function<void(EditorMode mode)>
 
using ValidationCallback
 

Public Member Functions

 DungeonEditorSystem (Rom *rom, GameData *game_data=nullptr)
 
 ~DungeonEditorSystem ()=default
 
void SetGameData (GameData *game_data)
 
absl::Status Initialize ()
 
absl::Status LoadDungeon (int dungeon_id)
 
absl::Status SaveDungeon ()
 
absl::Status SaveRoom (int room_id)
 
absl::Status ReloadRoom (int room_id)
 
void SetEditorMode (EditorMode mode)
 
EditorMode GetEditorMode () const
 
absl::Status SetCurrentRoom (int room_id)
 
int GetCurrentRoom () const
 
absl::StatusOr< RoomGetRoom (int room_id)
 
absl::Status CreateRoom (int room_id, const std::string &name="")
 
absl::Status DeleteRoom (int room_id)
 
absl::Status DuplicateRoom (int source_room_id, int target_room_id)
 
std::shared_ptr< DungeonObjectEditorGetObjectEditor ()
 
absl::Status SetObjectEditorMode ()
 
absl::Status AddSprite (const SpriteData &sprite_data)
 
absl::Status RemoveSprite (int sprite_id)
 
absl::Status UpdateSprite (int sprite_id, const SpriteData &sprite_data)
 
absl::StatusOr< SpriteDataGetSprite (int sprite_id)
 
absl::StatusOr< std::vector< SpriteData > > GetSpritesByRoom (int room_id)
 
absl::StatusOr< std::vector< SpriteData > > GetSpritesByType (DungeonEditorSystem::SpriteType type)
 
absl::Status MoveSprite (int sprite_id, int new_x, int new_y)
 
absl::Status SetSpriteActive (int sprite_id, bool active)
 
absl::Status AddItem (const ItemData &item_data)
 
absl::Status RemoveItem (int item_id)
 
absl::Status UpdateItem (int item_id, const ItemData &item_data)
 
absl::StatusOr< ItemDataGetItem (int item_id)
 
absl::StatusOr< std::vector< ItemData > > GetItemsByRoom (int room_id)
 
absl::StatusOr< std::vector< ItemData > > GetItemsByType (DungeonEditorSystem::ItemType type)
 
absl::Status MoveItem (int item_id, int new_x, int new_y)
 
absl::Status SetItemHidden (int item_id, bool hidden)
 
absl::Status AddEntrance (const EntranceData &entrance_data)
 
absl::Status RemoveEntrance (int entrance_id)
 
absl::Status UpdateEntrance (int entrance_id, const EntranceData &entrance_data)
 
absl::StatusOr< EntranceDataGetEntrance (int entrance_id)
 
absl::StatusOr< std::vector< EntranceData > > GetEntrancesByRoom (int room_id)
 
absl::StatusOr< std::vector< EntranceData > > GetEntrancesByType (DungeonEditorSystem::EntranceType type)
 
absl::Status ConnectRooms (int room1_id, int room2_id, int x1, int y1, int x2, int y2)
 
absl::Status DisconnectRooms (int room1_id, int room2_id)
 
absl::Status AddDoor (const DoorData &door_data)
 
absl::Status RemoveDoor (int door_id)
 
absl::Status UpdateDoor (int door_id, const DoorData &door_data)
 
absl::StatusOr< DoorDataGetDoor (int door_id)
 
absl::StatusOr< std::vector< DoorData > > GetDoorsByRoom (int room_id)
 
absl::Status SetDoorLocked (int door_id, bool locked)
 
absl::Status SetDoorKeyRequirement (int door_id, bool requires_key, int key_type)
 
absl::Status AddChest (const ChestData &chest_data)
 
absl::Status RemoveChest (int chest_id)
 
absl::Status UpdateChest (int chest_id, const ChestData &chest_data)
 
absl::StatusOr< ChestDataGetChest (int chest_id)
 
absl::StatusOr< std::vector< ChestData > > GetChestsByRoom (int room_id)
 
absl::Status SetChestItem (int chest_id, int item_id, int quantity)
 
absl::Status SetChestOpened (int chest_id, bool opened)
 
absl::Status SetRoomProperties (int room_id, const RoomProperties &properties)
 
absl::StatusOr< RoomPropertiesGetRoomProperties (int room_id)
 
absl::Status SetDungeonSettings (const DungeonSettings &settings)
 
absl::StatusOr< DungeonSettingsGetDungeonSettings ()
 
absl::Status ValidateRoom (int room_id)
 
absl::Status ValidateDungeon ()
 
std::vector< std::string > GetValidationErrors (int room_id)
 
std::vector< std::string > GetDungeonValidationErrors ()
 
absl::StatusOr< gfx::BitmapRenderRoom (int room_id)
 
absl::StatusOr< gfx::BitmapRenderRoomPreview (int room_id, EditorMode mode)
 
absl::StatusOr< gfx::BitmapRenderDungeonMap ()
 
absl::Status ImportRoomFromFile (const std::string &file_path, int room_id)
 
absl::Status ExportRoomToFile (int room_id, const std::string &file_path)
 
absl::Status ImportDungeonFromFile (const std::string &file_path)
 
absl::Status ExportDungeonToFile (const std::string &file_path)
 
absl::Status Undo ()
 
absl::Status Redo ()
 
bool CanUndo () const
 
bool CanRedo () const
 
void ClearHistory ()
 
void SetRoomChangedCallback (RoomChangedCallback callback)
 
void SetSpriteChangedCallback (SpriteChangedCallback callback)
 
void SetItemChangedCallback (ItemChangedCallback callback)
 
void SetEntranceChangedCallback (EntranceChangedCallback callback)
 
void SetDoorChangedCallback (DoorChangedCallback callback)
 
void SetChestChangedCallback (ChestChangedCallback callback)
 
void SetModeChangedCallback (ModeChangedCallback callback)
 
void SetValidationCallback (ValidationCallback callback)
 
EditorState GetEditorState () const
 
RomGetROM () const
 
bool IsDirty () const
 
bool HasUnsavedChanges () const
 
void SetROM (Rom *rom)
 
void SetExternalRoom (Room *room)
 

Private Member Functions

absl::Status InitializeObjectEditor ()
 
absl::Status InitializeSpriteSystem ()
 
absl::Status InitializeItemSystem ()
 
absl::Status InitializeEntranceSystem ()
 
absl::Status InitializeDoorSystem ()
 
absl::Status InitializeChestSystem ()
 
absl::Status LoadRoomData (int room_id)
 
absl::Status SaveRoomData (int room_id)
 
absl::Status LoadSpriteData ()
 
absl::Status SaveSpriteData ()
 
absl::Status LoadItemData ()
 
absl::Status SaveItemData ()
 
absl::Status LoadEntranceData ()
 
absl::Status SaveEntranceData ()
 
absl::Status LoadDoorData ()
 
absl::Status SaveDoorData ()
 
absl::Status LoadChestData ()
 
absl::Status SaveChestData ()
 
absl::Status ValidateSprite (const SpriteData &sprite)
 
absl::Status ValidateItem (const ItemData &item)
 
absl::Status ValidateEntrance (const EntranceData &entrance)
 
absl::Status ValidateDoor (const DoorData &door)
 
absl::Status ValidateChest (const ChestData &chest)
 
int GenerateSpriteId ()
 
int GenerateItemId ()
 
int GenerateEntranceId ()
 
int GenerateDoorId ()
 
int GenerateChestId ()
 

Private Attributes

Romrom_
 
GameDatagame_data_ = nullptr
 
std::shared_ptr< DungeonObjectEditorobject_editor_
 
EditorState editor_state_
 
DungeonSettings dungeon_settings_
 
std::unordered_map< int, Roomrooms_
 
std::unordered_map< int, SpriteDatasprites_
 
std::unordered_map< int, ItemDataitems_
 
std::unordered_map< int, EntranceDataentrances_
 
std::unordered_map< int, DoorDatadoors_
 
std::unordered_map< int, ChestDatachests_
 
std::unordered_map< int, RoomPropertiesroom_properties_
 
int next_sprite_id_ = 1
 
int next_item_id_ = 1
 
int next_entrance_id_ = 1
 
int next_door_id_ = 1
 
int next_chest_id_ = 1
 
RoomChangedCallback room_changed_callback_
 
SpriteChangedCallback sprite_changed_callback_
 
ItemChangedCallback item_changed_callback_
 
EntranceChangedCallback entrance_changed_callback_
 
DoorChangedCallback door_changed_callback_
 
ChestChangedCallback chest_changed_callback_
 
ModeChangedCallback mode_changed_callback_
 
ValidationCallback validation_callback_
 
std::vector< UndoPointundo_history_
 
std::vector< UndoPointredo_history_
 

Static Private Attributes

static constexpr size_t kMaxUndoHistory = 100
 

Detailed Description

Comprehensive dungeon editing system.

This class provides a complete dungeon editing solution including:

  • Object editing (walls, floors, decorations)
  • Sprite management (enemies, NPCs, interactive elements)
  • Item placement and management
  • Entrance/exit data editing
  • Door configuration
  • Chest and treasure management
  • Room properties and metadata
  • Dungeon-wide settings

Definition at line 38 of file dungeon_editor_system.h.

Member Typedef Documentation

◆ RoomChangedCallback

using yaze::zelda3::DungeonEditorSystem::RoomChangedCallback = std::function<void(int room_id)>

Definition at line 300 of file dungeon_editor_system.h.

◆ SpriteChangedCallback

using yaze::zelda3::DungeonEditorSystem::SpriteChangedCallback = std::function<void(int sprite_id)>

Definition at line 301 of file dungeon_editor_system.h.

◆ ItemChangedCallback

using yaze::zelda3::DungeonEditorSystem::ItemChangedCallback = std::function<void(int item_id)>

Definition at line 302 of file dungeon_editor_system.h.

◆ EntranceChangedCallback

using yaze::zelda3::DungeonEditorSystem::EntranceChangedCallback = std::function<void(int entrance_id)>

Definition at line 303 of file dungeon_editor_system.h.

◆ DoorChangedCallback

using yaze::zelda3::DungeonEditorSystem::DoorChangedCallback = std::function<void(int door_id)>

Definition at line 304 of file dungeon_editor_system.h.

◆ ChestChangedCallback

using yaze::zelda3::DungeonEditorSystem::ChestChangedCallback = std::function<void(int chest_id)>

Definition at line 305 of file dungeon_editor_system.h.

◆ ModeChangedCallback

Definition at line 306 of file dungeon_editor_system.h.

◆ ValidationCallback

Initial value:
std::function<void(const std::vector<std::string>& errors)>

Definition at line 307 of file dungeon_editor_system.h.

Member Enumeration Documentation

◆ EditorMode

Enumerator
kObjects 
kSprites 
kItems 
kEntrances 
kDoors 
kChests 
kProperties 
kGlobal 

Definition at line 41 of file dungeon_editor_system.h.

◆ SpriteType

Enumerator
kEnemy 
kNPC 
kInteractive 
kDecoration 
kBoss 
kSpecial 

Definition at line 53 of file dungeon_editor_system.h.

◆ ItemType

Enumerator
kWeapon 
kTool 
kKey 
kHeart 
kRupee 
kBottle 
kUpgrade 
kSpecial 

Definition at line 63 of file dungeon_editor_system.h.

◆ EntranceType

Enumerator
kNormal 
kStairs 
kDoor 
kCave 
kWarp 
kBoss 
kSpecial 

Definition at line 75 of file dungeon_editor_system.h.

Constructor & Destructor Documentation

◆ DungeonEditorSystem()

yaze::zelda3::DungeonEditorSystem::DungeonEditorSystem ( Rom * rom,
GameData * game_data = nullptr )
explicit

Definition at line 11 of file dungeon_editor_system.cc.

◆ ~DungeonEditorSystem()

yaze::zelda3::DungeonEditorSystem::~DungeonEditorSystem ( )
default

Member Function Documentation

◆ SetGameData()

void yaze::zelda3::DungeonEditorSystem::SetGameData ( GameData * game_data)
inline

Definition at line 159 of file dungeon_editor_system.h.

References game_data_.

◆ Initialize()

◆ LoadDungeon()

◆ SaveDungeon()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveDungeon ( )

◆ SaveRoom()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveRoom ( int room_id)

Definition at line 66 of file dungeon_editor_system.cc.

References SaveRoomData().

Here is the call graph for this function:

◆ ReloadRoom()

absl::Status yaze::zelda3::DungeonEditorSystem::ReloadRoom ( int room_id)

Definition at line 70 of file dungeon_editor_system.cc.

References LoadRoomData().

Here is the call graph for this function:

◆ SetEditorMode()

void yaze::zelda3::DungeonEditorSystem::SetEditorMode ( EditorMode mode)

◆ GetEditorMode()

DungeonEditorSystem::EditorMode yaze::zelda3::DungeonEditorSystem::GetEditorMode ( ) const

◆ SetCurrentRoom()

absl::Status yaze::zelda3::DungeonEditorSystem::SetCurrentRoom ( int room_id)

◆ GetCurrentRoom()

int yaze::zelda3::DungeonEditorSystem::GetCurrentRoom ( ) const

◆ GetRoom()

◆ CreateRoom()

absl::Status yaze::zelda3::DungeonEditorSystem::CreateRoom ( int room_id,
const std::string & name = "" )
Todo
Implement room creation

Definition at line 104 of file dungeon_editor_system.cc.

◆ DeleteRoom()

absl::Status yaze::zelda3::DungeonEditorSystem::DeleteRoom ( int room_id)
Todo
Implement room deletion

Definition at line 110 of file dungeon_editor_system.cc.

◆ DuplicateRoom()

absl::Status yaze::zelda3::DungeonEditorSystem::DuplicateRoom ( int source_room_id,
int target_room_id )
Todo
Implement room duplication

Definition at line 115 of file dungeon_editor_system.cc.

◆ GetObjectEditor()

std::shared_ptr< DungeonObjectEditor > yaze::zelda3::DungeonEditorSystem::GetObjectEditor ( )

Definition at line 121 of file dungeon_editor_system.cc.

References object_editor_, and rom_.

◆ SetObjectEditorMode()

absl::Status yaze::zelda3::DungeonEditorSystem::SetObjectEditorMode ( )

◆ AddSprite()

absl::Status yaze::zelda3::DungeonEditorSystem::AddSprite ( const SpriteData & sprite_data)

Definition at line 134 of file dungeon_editor_system.cc.

References GenerateSpriteId(), sprite_changed_callback_, yaze::zelda3::DungeonEditorSystem::SpriteData::sprite_id, and sprites_.

Here is the call graph for this function:

◆ RemoveSprite()

absl::Status yaze::zelda3::DungeonEditorSystem::RemoveSprite ( int sprite_id)

Definition at line 146 of file dungeon_editor_system.cc.

References sprites_.

◆ UpdateSprite()

absl::Status yaze::zelda3::DungeonEditorSystem::UpdateSprite ( int sprite_id,
const SpriteData & sprite_data )

◆ GetSprite()

absl::StatusOr< DungeonEditorSystem::SpriteData > yaze::zelda3::DungeonEditorSystem::GetSprite ( int sprite_id)

Definition at line 173 of file dungeon_editor_system.cc.

References sprites_.

◆ GetSpritesByRoom()

absl::StatusOr< std::vector< DungeonEditorSystem::SpriteData > > yaze::zelda3::DungeonEditorSystem::GetSpritesByRoom ( int room_id)

Definition at line 184 of file dungeon_editor_system.cc.

References sprites_.

◆ GetSpritesByType()

absl::StatusOr< std::vector< DungeonEditorSystem::SpriteData > > yaze::zelda3::DungeonEditorSystem::GetSpritesByType ( DungeonEditorSystem::SpriteType type)

Definition at line 197 of file dungeon_editor_system.cc.

References sprites_.

◆ MoveSprite()

absl::Status yaze::zelda3::DungeonEditorSystem::MoveSprite ( int sprite_id,
int new_x,
int new_y )

Definition at line 209 of file dungeon_editor_system.cc.

References sprite_changed_callback_, and sprites_.

◆ SetSpriteActive()

absl::Status yaze::zelda3::DungeonEditorSystem::SetSpriteActive ( int sprite_id,
bool active )

Definition at line 226 of file dungeon_editor_system.cc.

References sprite_changed_callback_, and sprites_.

◆ AddItem()

absl::Status yaze::zelda3::DungeonEditorSystem::AddItem ( const ItemData & item_data)

Definition at line 242 of file dungeon_editor_system.cc.

References GenerateItemId(), item_changed_callback_, yaze::zelda3::DungeonEditorSystem::ItemData::item_id, and items_.

Here is the call graph for this function:

◆ RemoveItem()

absl::Status yaze::zelda3::DungeonEditorSystem::RemoveItem ( int item_id)

Definition at line 254 of file dungeon_editor_system.cc.

References items_.

◆ UpdateItem()

absl::Status yaze::zelda3::DungeonEditorSystem::UpdateItem ( int item_id,
const ItemData & item_data )

◆ GetItem()

absl::StatusOr< DungeonEditorSystem::ItemData > yaze::zelda3::DungeonEditorSystem::GetItem ( int item_id)

Definition at line 281 of file dungeon_editor_system.cc.

References items_.

◆ GetItemsByRoom()

absl::StatusOr< std::vector< DungeonEditorSystem::ItemData > > yaze::zelda3::DungeonEditorSystem::GetItemsByRoom ( int room_id)

Definition at line 292 of file dungeon_editor_system.cc.

References items_.

◆ GetItemsByType()

absl::StatusOr< std::vector< DungeonEditorSystem::ItemData > > yaze::zelda3::DungeonEditorSystem::GetItemsByType ( DungeonEditorSystem::ItemType type)

Definition at line 305 of file dungeon_editor_system.cc.

References items_.

◆ MoveItem()

absl::Status yaze::zelda3::DungeonEditorSystem::MoveItem ( int item_id,
int new_x,
int new_y )

Definition at line 317 of file dungeon_editor_system.cc.

References item_changed_callback_, and items_.

◆ SetItemHidden()

absl::Status yaze::zelda3::DungeonEditorSystem::SetItemHidden ( int item_id,
bool hidden )

Definition at line 333 of file dungeon_editor_system.cc.

References item_changed_callback_, and items_.

◆ AddEntrance()

absl::Status yaze::zelda3::DungeonEditorSystem::AddEntrance ( const EntranceData & entrance_data)

Definition at line 349 of file dungeon_editor_system.cc.

References entrance_changed_callback_, yaze::zelda3::DungeonEditorSystem::EntranceData::entrance_id, entrances_, and GenerateEntranceId().

Referenced by ConnectRooms().

Here is the call graph for this function:

◆ RemoveEntrance()

absl::Status yaze::zelda3::DungeonEditorSystem::RemoveEntrance ( int entrance_id)

Definition at line 362 of file dungeon_editor_system.cc.

References entrances_.

◆ UpdateEntrance()

absl::Status yaze::zelda3::DungeonEditorSystem::UpdateEntrance ( int entrance_id,
const EntranceData & entrance_data )

◆ GetEntrance()

absl::StatusOr< DungeonEditorSystem::EntranceData > yaze::zelda3::DungeonEditorSystem::GetEntrance ( int entrance_id)

Definition at line 390 of file dungeon_editor_system.cc.

References entrances_.

◆ GetEntrancesByRoom()

absl::StatusOr< std::vector< DungeonEditorSystem::EntranceData > > yaze::zelda3::DungeonEditorSystem::GetEntrancesByRoom ( int room_id)

Definition at line 400 of file dungeon_editor_system.cc.

References entrances_.

◆ GetEntrancesByType()

absl::StatusOr< std::vector< DungeonEditorSystem::EntranceData > > yaze::zelda3::DungeonEditorSystem::GetEntrancesByType ( DungeonEditorSystem::EntranceType type)

Definition at line 414 of file dungeon_editor_system.cc.

References entrances_.

◆ ConnectRooms()

◆ DisconnectRooms()

absl::Status yaze::zelda3::DungeonEditorSystem::DisconnectRooms ( int room1_id,
int room2_id )

Definition at line 441 of file dungeon_editor_system.cc.

References entrances_.

◆ AddDoor()

absl::Status yaze::zelda3::DungeonEditorSystem::AddDoor ( const DoorData & door_data)

Definition at line 459 of file dungeon_editor_system.cc.

References door_changed_callback_, yaze::zelda3::DungeonEditorSystem::DoorData::door_id, doors_, and GenerateDoorId().

Here is the call graph for this function:

◆ RemoveDoor()

absl::Status yaze::zelda3::DungeonEditorSystem::RemoveDoor ( int door_id)

Definition at line 471 of file dungeon_editor_system.cc.

References doors_.

◆ UpdateDoor()

absl::Status yaze::zelda3::DungeonEditorSystem::UpdateDoor ( int door_id,
const DoorData & door_data )

◆ GetDoor()

absl::StatusOr< DungeonEditorSystem::DoorData > yaze::zelda3::DungeonEditorSystem::GetDoor ( int door_id)

Definition at line 498 of file dungeon_editor_system.cc.

References doors_.

◆ GetDoorsByRoom()

absl::StatusOr< std::vector< DungeonEditorSystem::DoorData > > yaze::zelda3::DungeonEditorSystem::GetDoorsByRoom ( int room_id)

Definition at line 509 of file dungeon_editor_system.cc.

References doors_.

◆ SetDoorLocked()

absl::Status yaze::zelda3::DungeonEditorSystem::SetDoorLocked ( int door_id,
bool locked )

Definition at line 521 of file dungeon_editor_system.cc.

References door_changed_callback_, and doors_.

◆ SetDoorKeyRequirement()

absl::Status yaze::zelda3::DungeonEditorSystem::SetDoorKeyRequirement ( int door_id,
bool requires_key,
int key_type )

Definition at line 536 of file dungeon_editor_system.cc.

References door_changed_callback_, and doors_.

◆ AddChest()

absl::Status yaze::zelda3::DungeonEditorSystem::AddChest ( const ChestData & chest_data)

Definition at line 555 of file dungeon_editor_system.cc.

References chest_changed_callback_, chests_, and GenerateChestId().

Here is the call graph for this function:

◆ RemoveChest()

absl::Status yaze::zelda3::DungeonEditorSystem::RemoveChest ( int chest_id)

Definition at line 567 of file dungeon_editor_system.cc.

References chests_.

◆ UpdateChest()

absl::Status yaze::zelda3::DungeonEditorSystem::UpdateChest ( int chest_id,
const ChestData & chest_data )

Definition at line 577 of file dungeon_editor_system.cc.

References chest_changed_callback_, and chests_.

◆ GetChest()

absl::StatusOr< DungeonEditorSystem::ChestData > yaze::zelda3::DungeonEditorSystem::GetChest ( int chest_id)

Definition at line 594 of file dungeon_editor_system.cc.

References chests_.

◆ GetChestsByRoom()

absl::StatusOr< std::vector< DungeonEditorSystem::ChestData > > yaze::zelda3::DungeonEditorSystem::GetChestsByRoom ( int room_id)

Definition at line 605 of file dungeon_editor_system.cc.

References chests_.

◆ SetChestItem()

absl::Status yaze::zelda3::DungeonEditorSystem::SetChestItem ( int chest_id,
int item_id,
int quantity )

Definition at line 617 of file dungeon_editor_system.cc.

References chest_changed_callback_, and chests_.

◆ SetChestOpened()

absl::Status yaze::zelda3::DungeonEditorSystem::SetChestOpened ( int chest_id,
bool opened )

Definition at line 634 of file dungeon_editor_system.cc.

References chest_changed_callback_, and chests_.

◆ SetRoomProperties()

absl::Status yaze::zelda3::DungeonEditorSystem::SetRoomProperties ( int room_id,
const RoomProperties & properties )

Definition at line 650 of file dungeon_editor_system.cc.

References room_changed_callback_, and room_properties_.

◆ GetRoomProperties()

◆ SetDungeonSettings()

absl::Status yaze::zelda3::DungeonEditorSystem::SetDungeonSettings ( const DungeonSettings & settings)

Definition at line 684 of file dungeon_editor_system.cc.

References dungeon_settings_.

◆ GetDungeonSettings()

absl::StatusOr< DungeonEditorSystem::DungeonSettings > yaze::zelda3::DungeonEditorSystem::GetDungeonSettings ( )

Definition at line 691 of file dungeon_editor_system.cc.

References dungeon_settings_.

◆ ValidateRoom()

absl::Status yaze::zelda3::DungeonEditorSystem::ValidateRoom ( int room_id)
Todo
Implement room validation

Definition at line 696 of file dungeon_editor_system.cc.

◆ ValidateDungeon()

absl::Status yaze::zelda3::DungeonEditorSystem::ValidateDungeon ( )
Todo
Implement dungeon validation

Definition at line 701 of file dungeon_editor_system.cc.

◆ GetValidationErrors()

std::vector< std::string > yaze::zelda3::DungeonEditorSystem::GetValidationErrors ( int room_id)
Todo
Implement validation error collection

Definition at line 706 of file dungeon_editor_system.cc.

◆ GetDungeonValidationErrors()

std::vector< std::string > yaze::zelda3::DungeonEditorSystem::GetDungeonValidationErrors ( )
Todo
Implement dungeon validation error collection

Definition at line 711 of file dungeon_editor_system.cc.

◆ RenderRoom()

absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderRoom ( int room_id)
Todo
Implement room rendering

Definition at line 717 of file dungeon_editor_system.cc.

◆ RenderRoomPreview()

absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderRoomPreview ( int room_id,
EditorMode mode )
Todo
Implement room preview rendering

Definition at line 722 of file dungeon_editor_system.cc.

◆ RenderDungeonMap()

absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderDungeonMap ( )
Todo
Implement dungeon map rendering

Definition at line 728 of file dungeon_editor_system.cc.

◆ ImportRoomFromFile()

absl::Status yaze::zelda3::DungeonEditorSystem::ImportRoomFromFile ( const std::string & file_path,
int room_id )
Todo
Implement room import

Definition at line 734 of file dungeon_editor_system.cc.

◆ ExportRoomToFile()

absl::Status yaze::zelda3::DungeonEditorSystem::ExportRoomToFile ( int room_id,
const std::string & file_path )
Todo
Implement room export

Definition at line 740 of file dungeon_editor_system.cc.

◆ ImportDungeonFromFile()

absl::Status yaze::zelda3::DungeonEditorSystem::ImportDungeonFromFile ( const std::string & file_path)
Todo
Implement dungeon import

Definition at line 746 of file dungeon_editor_system.cc.

◆ ExportDungeonToFile()

absl::Status yaze::zelda3::DungeonEditorSystem::ExportDungeonToFile ( const std::string & file_path)
Todo
Implement dungeon export

Definition at line 752 of file dungeon_editor_system.cc.

◆ Undo()

absl::Status yaze::zelda3::DungeonEditorSystem::Undo ( )
Todo
Implement undo functionality for other modes

Definition at line 759 of file dungeon_editor_system.cc.

References CanUndo(), yaze::zelda3::DungeonEditorSystem::EditorState::current_mode, editor_state_, kObjects, and object_editor_.

Here is the call graph for this function:

◆ Redo()

absl::Status yaze::zelda3::DungeonEditorSystem::Redo ( )
Todo
Implement redo functionality for other modes

Definition at line 774 of file dungeon_editor_system.cc.

References CanRedo(), yaze::zelda3::DungeonEditorSystem::EditorState::current_mode, editor_state_, kObjects, and object_editor_.

Here is the call graph for this function:

◆ CanUndo()

bool yaze::zelda3::DungeonEditorSystem::CanUndo ( ) const

Definition at line 789 of file dungeon_editor_system.cc.

References undo_history_.

Referenced by Undo().

◆ CanRedo()

bool yaze::zelda3::DungeonEditorSystem::CanRedo ( ) const

Definition at line 793 of file dungeon_editor_system.cc.

References redo_history_.

Referenced by Redo().

◆ ClearHistory()

void yaze::zelda3::DungeonEditorSystem::ClearHistory ( )

Definition at line 797 of file dungeon_editor_system.cc.

References redo_history_, and undo_history_.

◆ SetRoomChangedCallback()

void yaze::zelda3::DungeonEditorSystem::SetRoomChangedCallback ( RoomChangedCallback callback)

Definition at line 803 of file dungeon_editor_system.cc.

References room_changed_callback_.

◆ SetSpriteChangedCallback()

void yaze::zelda3::DungeonEditorSystem::SetSpriteChangedCallback ( SpriteChangedCallback callback)

Definition at line 807 of file dungeon_editor_system.cc.

References sprite_changed_callback_.

◆ SetItemChangedCallback()

void yaze::zelda3::DungeonEditorSystem::SetItemChangedCallback ( ItemChangedCallback callback)

Definition at line 812 of file dungeon_editor_system.cc.

References item_changed_callback_.

◆ SetEntranceChangedCallback()

void yaze::zelda3::DungeonEditorSystem::SetEntranceChangedCallback ( EntranceChangedCallback callback)

Definition at line 816 of file dungeon_editor_system.cc.

References entrance_changed_callback_.

◆ SetDoorChangedCallback()

void yaze::zelda3::DungeonEditorSystem::SetDoorChangedCallback ( DoorChangedCallback callback)

Definition at line 821 of file dungeon_editor_system.cc.

References door_changed_callback_.

◆ SetChestChangedCallback()

void yaze::zelda3::DungeonEditorSystem::SetChestChangedCallback ( ChestChangedCallback callback)

Definition at line 825 of file dungeon_editor_system.cc.

References chest_changed_callback_.

◆ SetModeChangedCallback()

void yaze::zelda3::DungeonEditorSystem::SetModeChangedCallback ( ModeChangedCallback callback)

Definition at line 830 of file dungeon_editor_system.cc.

References mode_changed_callback_.

◆ SetValidationCallback()

void yaze::zelda3::DungeonEditorSystem::SetValidationCallback ( ValidationCallback callback)

Definition at line 834 of file dungeon_editor_system.cc.

References validation_callback_.

◆ GetEditorState()

EditorState yaze::zelda3::DungeonEditorSystem::GetEditorState ( ) const

◆ GetROM()

Rom * yaze::zelda3::DungeonEditorSystem::GetROM ( ) const

Definition at line 859 of file dungeon_editor_system.cc.

References rom_.

◆ IsDirty()

bool yaze::zelda3::DungeonEditorSystem::IsDirty ( ) const

◆ HasUnsavedChanges()

bool yaze::zelda3::DungeonEditorSystem::HasUnsavedChanges ( ) const

◆ SetROM()

void yaze::zelda3::DungeonEditorSystem::SetROM ( Rom * rom)

Definition at line 867 of file dungeon_editor_system.cc.

References object_editor_, and rom_.

◆ SetExternalRoom()

void yaze::zelda3::DungeonEditorSystem::SetExternalRoom ( Room * room)

Definition at line 1032 of file dungeon_editor_system.cc.

References object_editor_.

◆ InitializeObjectEditor()

absl::Status yaze::zelda3::DungeonEditorSystem::InitializeObjectEditor ( )
private

◆ InitializeSpriteSystem()

absl::Status yaze::zelda3::DungeonEditorSystem::InitializeSpriteSystem ( )
private

◆ InitializeItemSystem()

absl::Status yaze::zelda3::DungeonEditorSystem::InitializeItemSystem ( )
private

◆ InitializeEntranceSystem()

absl::Status yaze::zelda3::DungeonEditorSystem::InitializeEntranceSystem ( )
private

◆ InitializeDoorSystem()

absl::Status yaze::zelda3::DungeonEditorSystem::InitializeDoorSystem ( )
private

◆ InitializeChestSystem()

absl::Status yaze::zelda3::DungeonEditorSystem::InitializeChestSystem ( )
private

◆ LoadRoomData()

◆ SaveRoomData()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveRoomData ( int room_id)
private

◆ LoadSpriteData()

absl::Status yaze::zelda3::DungeonEditorSystem::LoadSpriteData ( )
private

Definition at line 992 of file dungeon_editor_system.cc.

◆ SaveSpriteData()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveSpriteData ( )
private

Definition at line 996 of file dungeon_editor_system.cc.

◆ LoadItemData()

absl::Status yaze::zelda3::DungeonEditorSystem::LoadItemData ( )
private

Definition at line 1000 of file dungeon_editor_system.cc.

◆ SaveItemData()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveItemData ( )
private

Definition at line 1004 of file dungeon_editor_system.cc.

◆ LoadEntranceData()

absl::Status yaze::zelda3::DungeonEditorSystem::LoadEntranceData ( )
private

Definition at line 1008 of file dungeon_editor_system.cc.

◆ SaveEntranceData()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveEntranceData ( )
private

Definition at line 1012 of file dungeon_editor_system.cc.

◆ LoadDoorData()

absl::Status yaze::zelda3::DungeonEditorSystem::LoadDoorData ( )
private

Definition at line 1016 of file dungeon_editor_system.cc.

◆ SaveDoorData()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveDoorData ( )
private

Definition at line 1020 of file dungeon_editor_system.cc.

◆ LoadChestData()

absl::Status yaze::zelda3::DungeonEditorSystem::LoadChestData ( )
private

Definition at line 1024 of file dungeon_editor_system.cc.

◆ SaveChestData()

absl::Status yaze::zelda3::DungeonEditorSystem::SaveChestData ( )
private

Definition at line 1028 of file dungeon_editor_system.cc.

◆ ValidateSprite()

absl::Status yaze::zelda3::DungeonEditorSystem::ValidateSprite ( const SpriteData & sprite)
private

◆ ValidateItem()

absl::Status yaze::zelda3::DungeonEditorSystem::ValidateItem ( const ItemData & item)
private

◆ ValidateEntrance()

absl::Status yaze::zelda3::DungeonEditorSystem::ValidateEntrance ( const EntranceData & entrance)
private

◆ ValidateDoor()

absl::Status yaze::zelda3::DungeonEditorSystem::ValidateDoor ( const DoorData & door)
private

◆ ValidateChest()

absl::Status yaze::zelda3::DungeonEditorSystem::ValidateChest ( const ChestData & chest)
private

◆ GenerateSpriteId()

int yaze::zelda3::DungeonEditorSystem::GenerateSpriteId ( )
private

Definition at line 839 of file dungeon_editor_system.cc.

References next_sprite_id_.

Referenced by AddSprite(), and LoadRoomData().

◆ GenerateItemId()

int yaze::zelda3::DungeonEditorSystem::GenerateItemId ( )
private

Definition at line 843 of file dungeon_editor_system.cc.

References next_item_id_.

Referenced by AddItem().

◆ GenerateEntranceId()

int yaze::zelda3::DungeonEditorSystem::GenerateEntranceId ( )
private

Definition at line 847 of file dungeon_editor_system.cc.

References next_entrance_id_.

Referenced by AddEntrance().

◆ GenerateDoorId()

int yaze::zelda3::DungeonEditorSystem::GenerateDoorId ( )
private

Definition at line 851 of file dungeon_editor_system.cc.

References next_door_id_.

Referenced by AddDoor().

◆ GenerateChestId()

int yaze::zelda3::DungeonEditorSystem::GenerateChestId ( )
private

Definition at line 855 of file dungeon_editor_system.cc.

References next_chest_id_.

Referenced by AddChest(), and LoadRoomData().

Member Data Documentation

◆ rom_

Rom* yaze::zelda3::DungeonEditorSystem::rom_
private

◆ game_data_

GameData* yaze::zelda3::DungeonEditorSystem::game_data_ = nullptr
private

Definition at line 368 of file dungeon_editor_system.h.

Referenced by GetRoom(), and SetGameData().

◆ object_editor_

std::shared_ptr<DungeonObjectEditor> yaze::zelda3::DungeonEditorSystem::object_editor_
private

◆ editor_state_

EditorState yaze::zelda3::DungeonEditorSystem::editor_state_
private

◆ dungeon_settings_

DungeonSettings yaze::zelda3::DungeonEditorSystem::dungeon_settings_
private

Definition at line 372 of file dungeon_editor_system.h.

Referenced by GetDungeonSettings(), Initialize(), and SetDungeonSettings().

◆ rooms_

std::unordered_map<int, Room> yaze::zelda3::DungeonEditorSystem::rooms_
private

Definition at line 375 of file dungeon_editor_system.h.

◆ sprites_

std::unordered_map<int, SpriteData> yaze::zelda3::DungeonEditorSystem::sprites_
private

◆ items_

std::unordered_map<int, ItemData> yaze::zelda3::DungeonEditorSystem::items_
private

◆ entrances_

std::unordered_map<int, EntranceData> yaze::zelda3::DungeonEditorSystem::entrances_
private

◆ doors_

std::unordered_map<int, DoorData> yaze::zelda3::DungeonEditorSystem::doors_
private

◆ chests_

std::unordered_map<int, ChestData> yaze::zelda3::DungeonEditorSystem::chests_
private

◆ room_properties_

std::unordered_map<int, RoomProperties> yaze::zelda3::DungeonEditorSystem::room_properties_
private

Definition at line 381 of file dungeon_editor_system.h.

Referenced by GetRoomProperties(), and SetRoomProperties().

◆ next_sprite_id_

int yaze::zelda3::DungeonEditorSystem::next_sprite_id_ = 1
private

Definition at line 384 of file dungeon_editor_system.h.

Referenced by GenerateSpriteId().

◆ next_item_id_

int yaze::zelda3::DungeonEditorSystem::next_item_id_ = 1
private

Definition at line 385 of file dungeon_editor_system.h.

Referenced by GenerateItemId().

◆ next_entrance_id_

int yaze::zelda3::DungeonEditorSystem::next_entrance_id_ = 1
private

Definition at line 386 of file dungeon_editor_system.h.

Referenced by GenerateEntranceId().

◆ next_door_id_

int yaze::zelda3::DungeonEditorSystem::next_door_id_ = 1
private

Definition at line 387 of file dungeon_editor_system.h.

Referenced by GenerateDoorId().

◆ next_chest_id_

int yaze::zelda3::DungeonEditorSystem::next_chest_id_ = 1
private

Definition at line 388 of file dungeon_editor_system.h.

Referenced by GenerateChestId().

◆ room_changed_callback_

RoomChangedCallback yaze::zelda3::DungeonEditorSystem::room_changed_callback_
private

Definition at line 391 of file dungeon_editor_system.h.

Referenced by SetRoomChangedCallback(), and SetRoomProperties().

◆ sprite_changed_callback_

SpriteChangedCallback yaze::zelda3::DungeonEditorSystem::sprite_changed_callback_
private

◆ item_changed_callback_

ItemChangedCallback yaze::zelda3::DungeonEditorSystem::item_changed_callback_
private

◆ entrance_changed_callback_

EntranceChangedCallback yaze::zelda3::DungeonEditorSystem::entrance_changed_callback_
private

◆ door_changed_callback_

DoorChangedCallback yaze::zelda3::DungeonEditorSystem::door_changed_callback_
private

◆ chest_changed_callback_

ChestChangedCallback yaze::zelda3::DungeonEditorSystem::chest_changed_callback_
private

◆ mode_changed_callback_

ModeChangedCallback yaze::zelda3::DungeonEditorSystem::mode_changed_callback_
private

Definition at line 397 of file dungeon_editor_system.h.

Referenced by SetModeChangedCallback().

◆ validation_callback_

ValidationCallback yaze::zelda3::DungeonEditorSystem::validation_callback_
private

Definition at line 398 of file dungeon_editor_system.h.

Referenced by SetValidationCallback().

◆ undo_history_

std::vector<UndoPoint> yaze::zelda3::DungeonEditorSystem::undo_history_
private

Definition at line 412 of file dungeon_editor_system.h.

Referenced by CanUndo(), and ClearHistory().

◆ redo_history_

std::vector<UndoPoint> yaze::zelda3::DungeonEditorSystem::redo_history_
private

Definition at line 413 of file dungeon_editor_system.h.

Referenced by CanRedo(), and ClearHistory().

◆ kMaxUndoHistory

constexpr size_t yaze::zelda3::DungeonEditorSystem::kMaxUndoHistory = 100
staticconstexprprivate

Definition at line 414 of file dungeon_editor_system.h.


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