Comprehensive dungeon editing system. More...
#include <dungeon_editor_system.h>

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< Room > | GetRoom (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< DungeonObjectEditor > | GetObjectEditor () |
| 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< SpriteData > | GetSprite (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< ItemData > | GetItem (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< EntranceData > | GetEntrance (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< DoorData > | GetDoor (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< ChestData > | GetChest (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< RoomProperties > | GetRoomProperties (int room_id) |
| absl::Status | SetDungeonSettings (const DungeonSettings &settings) |
| absl::StatusOr< DungeonSettings > | GetDungeonSettings () |
| 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::Bitmap > | RenderRoom (int room_id) |
| absl::StatusOr< gfx::Bitmap > | RenderRoomPreview (int room_id, EditorMode mode) |
| absl::StatusOr< gfx::Bitmap > | RenderDungeonMap () |
| 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 |
| Rom * | GetROM () 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 () |
Static Private Attributes | |
| static constexpr size_t | kMaxUndoHistory = 100 |
Comprehensive dungeon editing system.
This class provides a complete dungeon editing solution including:
Definition at line 38 of file dungeon_editor_system.h.
| using yaze::zelda3::DungeonEditorSystem::RoomChangedCallback = std::function<void(int room_id)> |
Definition at line 300 of file dungeon_editor_system.h.
| using yaze::zelda3::DungeonEditorSystem::SpriteChangedCallback = std::function<void(int sprite_id)> |
Definition at line 301 of file dungeon_editor_system.h.
| using yaze::zelda3::DungeonEditorSystem::ItemChangedCallback = std::function<void(int item_id)> |
Definition at line 302 of file dungeon_editor_system.h.
| using yaze::zelda3::DungeonEditorSystem::EntranceChangedCallback = std::function<void(int entrance_id)> |
Definition at line 303 of file dungeon_editor_system.h.
| using yaze::zelda3::DungeonEditorSystem::DoorChangedCallback = std::function<void(int door_id)> |
Definition at line 304 of file dungeon_editor_system.h.
| using yaze::zelda3::DungeonEditorSystem::ChestChangedCallback = std::function<void(int chest_id)> |
Definition at line 305 of file dungeon_editor_system.h.
| using yaze::zelda3::DungeonEditorSystem::ModeChangedCallback = std::function<void(EditorMode mode)> |
Definition at line 306 of file dungeon_editor_system.h.
Definition at line 307 of file dungeon_editor_system.h.
|
strong |
| Enumerator | |
|---|---|
| kObjects | |
| kSprites | |
| kItems | |
| kEntrances | |
| kDoors | |
| kChests | |
| kProperties | |
| kGlobal | |
Definition at line 41 of file dungeon_editor_system.h.
|
strong |
| Enumerator | |
|---|---|
| kEnemy | |
| kNPC | |
| kInteractive | |
| kDecoration | |
| kBoss | |
| kSpecial | |
Definition at line 53 of file dungeon_editor_system.h.
|
strong |
| Enumerator | |
|---|---|
| kWeapon | |
| kTool | |
| kKey | |
| kHeart | |
| kRupee | |
| kBottle | |
| kUpgrade | |
| kSpecial | |
Definition at line 63 of file dungeon_editor_system.h.
|
strong |
| Enumerator | |
|---|---|
| kNormal | |
| kStairs | |
| kDoor | |
| kCave | |
| kWarp | |
| kBoss | |
| kSpecial | |
Definition at line 75 of file dungeon_editor_system.h.
|
explicit |
Definition at line 11 of file dungeon_editor_system.cc.
|
default |
|
inline |
Definition at line 159 of file dungeon_editor_system.h.
References game_data_.
| absl::Status yaze::zelda3::DungeonEditorSystem::Initialize | ( | ) |
Definition at line 14 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::DungeonSettings::boss_room_id, yaze::zelda3::DungeonEditorSystem::DungeonSettings::color_palette_id, yaze::zelda3::DungeonEditorSystem::DungeonSettings::description, yaze::zelda3::DungeonEditorSystem::DungeonSettings::dungeon_id, dungeon_settings_, yaze::zelda3::DungeonEditorSystem::DungeonSettings::has_big_key, yaze::zelda3::DungeonEditorSystem::DungeonSettings::has_compass, yaze::zelda3::DungeonEditorSystem::DungeonSettings::has_map, yaze::zelda3::DungeonEditorSystem::DungeonSettings::music_theme_id, yaze::zelda3::DungeonEditorSystem::DungeonSettings::name, object_editor_, RETURN_IF_ERROR, rom_, yaze::zelda3::DungeonEditorSystem::DungeonSettings::starting_room_id, and yaze::zelda3::DungeonEditorSystem::DungeonSettings::total_rooms.
| absl::Status yaze::zelda3::DungeonEditorSystem::LoadDungeon | ( | int | dungeon_id | ) |
Definition at line 39 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::EditorState::auto_save_enabled, yaze::zelda3::DungeonEditorSystem::EditorState::current_room_id, editor_state_, yaze::zelda3::DungeonEditorSystem::EditorState::is_dirty, and yaze::zelda3::DungeonEditorSystem::EditorState::last_save_time.
| absl::Status yaze::zelda3::DungeonEditorSystem::SaveDungeon | ( | ) |
Definition at line 49 of file dungeon_editor_system.cc.
References editor_state_, yaze::zelda3::DungeonEditorSystem::EditorState::is_dirty, yaze::zelda3::DungeonEditorSystem::EditorState::last_save_time, yaze::zelda3::NumberOfRooms, rom_, and SaveRoomData().

| absl::Status yaze::zelda3::DungeonEditorSystem::SaveRoom | ( | int | room_id | ) |
Definition at line 66 of file dungeon_editor_system.cc.
References SaveRoomData().

| absl::Status yaze::zelda3::DungeonEditorSystem::ReloadRoom | ( | int | room_id | ) |
Definition at line 70 of file dungeon_editor_system.cc.
References LoadRoomData().

| void yaze::zelda3::DungeonEditorSystem::SetEditorMode | ( | EditorMode | mode | ) |
Definition at line 74 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::EditorState::current_mode, and editor_state_.
| DungeonEditorSystem::EditorMode yaze::zelda3::DungeonEditorSystem::GetEditorMode | ( | ) | const |
Definition at line 78 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::EditorState::current_mode, and editor_state_.
| absl::Status yaze::zelda3::DungeonEditorSystem::SetCurrentRoom | ( | int | room_id | ) |
Definition at line 82 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::EditorState::current_room_id, editor_state_, and yaze::zelda3::NumberOfRooms.
| int yaze::zelda3::DungeonEditorSystem::GetCurrentRoom | ( | ) | const |
Definition at line 91 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::EditorState::current_room_id, and editor_state_.
| absl::StatusOr< Room > yaze::zelda3::DungeonEditorSystem::GetRoom | ( | int | room_id | ) |
Definition at line 95 of file dungeon_editor_system.cc.
References game_data_, yaze::zelda3::NumberOfRooms, and rom_.
Referenced by yaze::cli::handlers::DungeonListSpritesCommandHandler::Execute(), yaze::cli::handlers::DungeonDescribeRoomCommandHandler::Execute(), yaze::cli::handlers::DungeonExportRoomCommandHandler::Execute(), yaze::cli::handlers::DungeonListObjectsCommandHandler::Execute(), yaze::cli::handlers::DungeonGetRoomTilesCommandHandler::Execute(), and yaze::cli::handlers::DungeonSetRoomPropertyCommandHandler::Execute().
| absl::Status yaze::zelda3::DungeonEditorSystem::CreateRoom | ( | int | room_id, |
| const std::string & | name = "" ) |
Definition at line 104 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::DeleteRoom | ( | int | room_id | ) |
Definition at line 110 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::DuplicateRoom | ( | int | source_room_id, |
| int | target_room_id ) |
Definition at line 115 of file dungeon_editor_system.cc.
| std::shared_ptr< DungeonObjectEditor > yaze::zelda3::DungeonEditorSystem::GetObjectEditor | ( | ) |
Definition at line 121 of file dungeon_editor_system.cc.
References object_editor_, and rom_.
| absl::Status yaze::zelda3::DungeonEditorSystem::SetObjectEditorMode | ( | ) |
Definition at line 128 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::EditorState::current_mode, editor_state_, and kObjects.
| 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_.

| absl::Status yaze::zelda3::DungeonEditorSystem::RemoveSprite | ( | int | sprite_id | ) |
Definition at line 146 of file dungeon_editor_system.cc.
References sprites_.
| absl::Status yaze::zelda3::DungeonEditorSystem::UpdateSprite | ( | int | sprite_id, |
| const SpriteData & | sprite_data ) |
Definition at line 156 of file dungeon_editor_system.cc.
References sprite_changed_callback_, yaze::zelda3::DungeonEditorSystem::SpriteData::sprite_id, and sprites_.
| absl::StatusOr< DungeonEditorSystem::SpriteData > yaze::zelda3::DungeonEditorSystem::GetSprite | ( | int | sprite_id | ) |
Definition at line 173 of file dungeon_editor_system.cc.
References sprites_.
| 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_.
| 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_.
| 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_.
| 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_.
| 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_.

| absl::Status yaze::zelda3::DungeonEditorSystem::RemoveItem | ( | int | item_id | ) |
Definition at line 254 of file dungeon_editor_system.cc.
References items_.
| absl::Status yaze::zelda3::DungeonEditorSystem::UpdateItem | ( | int | item_id, |
| const ItemData & | item_data ) |
Definition at line 264 of file dungeon_editor_system.cc.
References item_changed_callback_, yaze::zelda3::DungeonEditorSystem::ItemData::item_id, and items_.
| absl::StatusOr< DungeonEditorSystem::ItemData > yaze::zelda3::DungeonEditorSystem::GetItem | ( | int | item_id | ) |
Definition at line 281 of file dungeon_editor_system.cc.
References items_.
| 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_.
| 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_.
| 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_.
| 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_.
| 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().

| absl::Status yaze::zelda3::DungeonEditorSystem::RemoveEntrance | ( | int | entrance_id | ) |
Definition at line 362 of file dungeon_editor_system.cc.
References entrances_.
| absl::Status yaze::zelda3::DungeonEditorSystem::UpdateEntrance | ( | int | entrance_id, |
| const EntranceData & | entrance_data ) |
Definition at line 372 of file dungeon_editor_system.cc.
References entrance_changed_callback_, yaze::zelda3::DungeonEditorSystem::EntranceData::entrance_id, and entrances_.
| absl::StatusOr< DungeonEditorSystem::EntranceData > yaze::zelda3::DungeonEditorSystem::GetEntrance | ( | int | entrance_id | ) |
Definition at line 390 of file dungeon_editor_system.cc.
References entrances_.
| 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_.
| 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_.
| absl::Status yaze::zelda3::DungeonEditorSystem::ConnectRooms | ( | int | room1_id, |
| int | room2_id, | ||
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 ) |
Definition at line 426 of file dungeon_editor_system.cc.
References AddEntrance(), yaze::zelda3::DungeonEditorSystem::EntranceData::is_bidirectional, kNormal, yaze::zelda3::DungeonEditorSystem::EntranceData::source_room_id, yaze::zelda3::DungeonEditorSystem::EntranceData::source_x, yaze::zelda3::DungeonEditorSystem::EntranceData::source_y, yaze::zelda3::DungeonEditorSystem::EntranceData::target_room_id, yaze::zelda3::DungeonEditorSystem::EntranceData::target_x, yaze::zelda3::DungeonEditorSystem::EntranceData::target_y, and yaze::zelda3::DungeonEditorSystem::EntranceData::type.

| absl::Status yaze::zelda3::DungeonEditorSystem::DisconnectRooms | ( | int | room1_id, |
| int | room2_id ) |
Definition at line 441 of file dungeon_editor_system.cc.
References entrances_.
| 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().

| absl::Status yaze::zelda3::DungeonEditorSystem::RemoveDoor | ( | int | door_id | ) |
Definition at line 471 of file dungeon_editor_system.cc.
References doors_.
| absl::Status yaze::zelda3::DungeonEditorSystem::UpdateDoor | ( | int | door_id, |
| const DoorData & | door_data ) |
Definition at line 481 of file dungeon_editor_system.cc.
References door_changed_callback_, yaze::zelda3::DungeonEditorSystem::DoorData::door_id, and doors_.
| absl::StatusOr< DungeonEditorSystem::DoorData > yaze::zelda3::DungeonEditorSystem::GetDoor | ( | int | door_id | ) |
Definition at line 498 of file dungeon_editor_system.cc.
References doors_.
| 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_.
| 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_.
| 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_.
| 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().

| absl::Status yaze::zelda3::DungeonEditorSystem::RemoveChest | ( | int | chest_id | ) |
Definition at line 567 of file dungeon_editor_system.cc.
References chests_.
| 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_.
| absl::StatusOr< DungeonEditorSystem::ChestData > yaze::zelda3::DungeonEditorSystem::GetChest | ( | int | chest_id | ) |
Definition at line 594 of file dungeon_editor_system.cc.
References chests_.
| 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_.
| 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_.
| 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_.
| 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_.
| absl::StatusOr< DungeonEditorSystem::RoomProperties > yaze::zelda3::DungeonEditorSystem::GetRoomProperties | ( | int | room_id | ) |
Definition at line 662 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::RoomProperties::ambient_sound_id, yaze::zelda3::DungeonEditorSystem::RoomProperties::description, yaze::zelda3::DungeonEditorSystem::RoomProperties::dungeon_id, yaze::zelda3::DungeonEditorSystem::RoomProperties::floor_level, yaze::zelda3::DungeonEditorSystem::RoomProperties::is_boss_room, yaze::zelda3::DungeonEditorSystem::RoomProperties::is_save_room, yaze::zelda3::DungeonEditorSystem::RoomProperties::is_shop_room, yaze::zelda3::DungeonEditorSystem::RoomProperties::music_id, yaze::zelda3::DungeonEditorSystem::RoomProperties::name, yaze::zelda3::DungeonEditorSystem::RoomProperties::room_id, and room_properties_.
Referenced by yaze::cli::handlers::DungeonDescribeRoomCommandHandler::Execute().
| absl::Status yaze::zelda3::DungeonEditorSystem::SetDungeonSettings | ( | const DungeonSettings & | settings | ) |
Definition at line 684 of file dungeon_editor_system.cc.
References dungeon_settings_.
| absl::StatusOr< DungeonEditorSystem::DungeonSettings > yaze::zelda3::DungeonEditorSystem::GetDungeonSettings | ( | ) |
Definition at line 691 of file dungeon_editor_system.cc.
References dungeon_settings_.
| absl::Status yaze::zelda3::DungeonEditorSystem::ValidateRoom | ( | int | room_id | ) |
Definition at line 696 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::ValidateDungeon | ( | ) |
Definition at line 701 of file dungeon_editor_system.cc.
| std::vector< std::string > yaze::zelda3::DungeonEditorSystem::GetValidationErrors | ( | int | room_id | ) |
Definition at line 706 of file dungeon_editor_system.cc.
| std::vector< std::string > yaze::zelda3::DungeonEditorSystem::GetDungeonValidationErrors | ( | ) |
Definition at line 711 of file dungeon_editor_system.cc.
| absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderRoom | ( | int | room_id | ) |
Definition at line 717 of file dungeon_editor_system.cc.
| absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderRoomPreview | ( | int | room_id, |
| EditorMode | mode ) |
Definition at line 722 of file dungeon_editor_system.cc.
| absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderDungeonMap | ( | ) |
Definition at line 728 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::ImportRoomFromFile | ( | const std::string & | file_path, |
| int | room_id ) |
Definition at line 734 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::ExportRoomToFile | ( | int | room_id, |
| const std::string & | file_path ) |
Definition at line 740 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::ImportDungeonFromFile | ( | const std::string & | file_path | ) |
Definition at line 746 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::ExportDungeonToFile | ( | const std::string & | file_path | ) |
Definition at line 752 of file dungeon_editor_system.cc.
| absl::Status yaze::zelda3::DungeonEditorSystem::Undo | ( | ) |
Definition at line 759 of file dungeon_editor_system.cc.
References CanUndo(), yaze::zelda3::DungeonEditorSystem::EditorState::current_mode, editor_state_, kObjects, and object_editor_.

| absl::Status yaze::zelda3::DungeonEditorSystem::Redo | ( | ) |
Definition at line 774 of file dungeon_editor_system.cc.
References CanRedo(), yaze::zelda3::DungeonEditorSystem::EditorState::current_mode, editor_state_, kObjects, and object_editor_.

| bool yaze::zelda3::DungeonEditorSystem::CanUndo | ( | ) | const |
Definition at line 789 of file dungeon_editor_system.cc.
References undo_history_.
Referenced by Undo().
| bool yaze::zelda3::DungeonEditorSystem::CanRedo | ( | ) | const |
Definition at line 793 of file dungeon_editor_system.cc.
References redo_history_.
Referenced by Redo().
| void yaze::zelda3::DungeonEditorSystem::ClearHistory | ( | ) |
Definition at line 797 of file dungeon_editor_system.cc.
References redo_history_, and undo_history_.
| void yaze::zelda3::DungeonEditorSystem::SetRoomChangedCallback | ( | RoomChangedCallback | callback | ) |
Definition at line 803 of file dungeon_editor_system.cc.
References room_changed_callback_.
| void yaze::zelda3::DungeonEditorSystem::SetSpriteChangedCallback | ( | SpriteChangedCallback | callback | ) |
Definition at line 807 of file dungeon_editor_system.cc.
References sprite_changed_callback_.
| void yaze::zelda3::DungeonEditorSystem::SetItemChangedCallback | ( | ItemChangedCallback | callback | ) |
Definition at line 812 of file dungeon_editor_system.cc.
References item_changed_callback_.
| void yaze::zelda3::DungeonEditorSystem::SetEntranceChangedCallback | ( | EntranceChangedCallback | callback | ) |
Definition at line 816 of file dungeon_editor_system.cc.
References entrance_changed_callback_.
| void yaze::zelda3::DungeonEditorSystem::SetDoorChangedCallback | ( | DoorChangedCallback | callback | ) |
Definition at line 821 of file dungeon_editor_system.cc.
References door_changed_callback_.
| void yaze::zelda3::DungeonEditorSystem::SetChestChangedCallback | ( | ChestChangedCallback | callback | ) |
Definition at line 825 of file dungeon_editor_system.cc.
References chest_changed_callback_.
| void yaze::zelda3::DungeonEditorSystem::SetModeChangedCallback | ( | ModeChangedCallback | callback | ) |
Definition at line 830 of file dungeon_editor_system.cc.
References mode_changed_callback_.
| void yaze::zelda3::DungeonEditorSystem::SetValidationCallback | ( | ValidationCallback | callback | ) |
Definition at line 834 of file dungeon_editor_system.cc.
References validation_callback_.
| EditorState yaze::zelda3::DungeonEditorSystem::GetEditorState | ( | ) | const |
| Rom * yaze::zelda3::DungeonEditorSystem::GetROM | ( | ) | const |
Definition at line 859 of file dungeon_editor_system.cc.
References rom_.
| bool yaze::zelda3::DungeonEditorSystem::IsDirty | ( | ) | const |
Definition at line 863 of file dungeon_editor_system.cc.
References editor_state_, and yaze::zelda3::DungeonEditorSystem::EditorState::is_dirty.
| bool yaze::zelda3::DungeonEditorSystem::HasUnsavedChanges | ( | ) | const |
| void yaze::zelda3::DungeonEditorSystem::SetROM | ( | Rom * | rom | ) |
Definition at line 867 of file dungeon_editor_system.cc.
References object_editor_, and rom_.
| void yaze::zelda3::DungeonEditorSystem::SetExternalRoom | ( | Room * | room | ) |
Definition at line 1032 of file dungeon_editor_system.cc.
References object_editor_.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 876 of file dungeon_editor_system.cc.
References yaze::zelda3::DungeonEditorSystem::ChestData::chest_id, chests_, GenerateChestId(), GenerateSpriteId(), yaze::zelda3::Room::GetChests(), yaze::zelda3::Room::GetSprites(), yaze::zelda3::DungeonEditorSystem::ChestData::is_big_chest, yaze::zelda3::DungeonEditorSystem::ChestData::item_id, kEnemy, yaze::zelda3::DungeonEditorSystem::SpriteData::layer, yaze::zelda3::LoadRoomFromRom(), yaze::zelda3::DungeonEditorSystem::SpriteData::name, yaze::zelda3::DungeonEditorSystem::SpriteData::properties, rom_, yaze::zelda3::DungeonEditorSystem::ChestData::room_id, yaze::zelda3::DungeonEditorSystem::SpriteData::sprite_id, sprites_, yaze::zelda3::DungeonEditorSystem::SpriteData::type, yaze::zelda3::DungeonEditorSystem::SpriteData::x, and yaze::zelda3::DungeonEditorSystem::SpriteData::y.
Referenced by ReloadRoom().
|
private |
Definition at line 931 of file dungeon_editor_system.cc.
References yaze::zelda3::Room::GetSprites(), yaze::zelda3::LoadRoomFromRom(), object_editor_, rom_, yaze::zelda3::Room::SaveObjects(), yaze::zelda3::Room::SaveSprites(), and sprites_.
Referenced by SaveDungeon(), and SaveRoom().

|
private |
Definition at line 992 of file dungeon_editor_system.cc.
|
private |
Definition at line 996 of file dungeon_editor_system.cc.
|
private |
Definition at line 1000 of file dungeon_editor_system.cc.
|
private |
Definition at line 1004 of file dungeon_editor_system.cc.
|
private |
Definition at line 1008 of file dungeon_editor_system.cc.
|
private |
Definition at line 1012 of file dungeon_editor_system.cc.
|
private |
Definition at line 1016 of file dungeon_editor_system.cc.
|
private |
Definition at line 1020 of file dungeon_editor_system.cc.
|
private |
Definition at line 1024 of file dungeon_editor_system.cc.
|
private |
Definition at line 1028 of file dungeon_editor_system.cc.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 839 of file dungeon_editor_system.cc.
References next_sprite_id_.
Referenced by AddSprite(), and LoadRoomData().
|
private |
Definition at line 843 of file dungeon_editor_system.cc.
References next_item_id_.
Referenced by AddItem().
|
private |
Definition at line 847 of file dungeon_editor_system.cc.
References next_entrance_id_.
Referenced by AddEntrance().
|
private |
Definition at line 851 of file dungeon_editor_system.cc.
References next_door_id_.
Referenced by AddDoor().
|
private |
Definition at line 855 of file dungeon_editor_system.cc.
References next_chest_id_.
Referenced by AddChest(), and LoadRoomData().
|
private |
Definition at line 367 of file dungeon_editor_system.h.
Referenced by GetObjectEditor(), GetROM(), GetRoom(), Initialize(), LoadRoomData(), SaveDungeon(), SaveRoomData(), and SetROM().
|
private |
Definition at line 368 of file dungeon_editor_system.h.
Referenced by GetRoom(), and SetGameData().
|
private |
Definition at line 369 of file dungeon_editor_system.h.
Referenced by GetObjectEditor(), Initialize(), Redo(), SaveRoomData(), SetExternalRoom(), SetROM(), and Undo().
|
private |
Definition at line 371 of file dungeon_editor_system.h.
Referenced by GetCurrentRoom(), GetEditorMode(), IsDirty(), LoadDungeon(), Redo(), SaveDungeon(), SetCurrentRoom(), SetEditorMode(), SetObjectEditorMode(), and Undo().
|
private |
Definition at line 372 of file dungeon_editor_system.h.
Referenced by GetDungeonSettings(), Initialize(), and SetDungeonSettings().
|
private |
Definition at line 375 of file dungeon_editor_system.h.
|
private |
Definition at line 376 of file dungeon_editor_system.h.
Referenced by AddSprite(), GetSprite(), GetSpritesByRoom(), GetSpritesByType(), LoadRoomData(), MoveSprite(), RemoveSprite(), SaveRoomData(), SetSpriteActive(), and UpdateSprite().
|
private |
Definition at line 377 of file dungeon_editor_system.h.
Referenced by AddItem(), GetItem(), GetItemsByRoom(), GetItemsByType(), MoveItem(), RemoveItem(), SetItemHidden(), and UpdateItem().
|
private |
Definition at line 378 of file dungeon_editor_system.h.
Referenced by AddEntrance(), DisconnectRooms(), GetEntrance(), GetEntrancesByRoom(), GetEntrancesByType(), RemoveEntrance(), and UpdateEntrance().
|
private |
Definition at line 379 of file dungeon_editor_system.h.
Referenced by AddDoor(), GetDoor(), GetDoorsByRoom(), RemoveDoor(), SetDoorKeyRequirement(), SetDoorLocked(), and UpdateDoor().
|
private |
Definition at line 380 of file dungeon_editor_system.h.
Referenced by AddChest(), GetChest(), GetChestsByRoom(), LoadRoomData(), RemoveChest(), SetChestItem(), SetChestOpened(), and UpdateChest().
|
private |
Definition at line 381 of file dungeon_editor_system.h.
Referenced by GetRoomProperties(), and SetRoomProperties().
|
private |
Definition at line 384 of file dungeon_editor_system.h.
Referenced by GenerateSpriteId().
|
private |
Definition at line 385 of file dungeon_editor_system.h.
Referenced by GenerateItemId().
|
private |
Definition at line 386 of file dungeon_editor_system.h.
Referenced by GenerateEntranceId().
|
private |
Definition at line 387 of file dungeon_editor_system.h.
Referenced by GenerateDoorId().
|
private |
Definition at line 388 of file dungeon_editor_system.h.
Referenced by GenerateChestId().
|
private |
Definition at line 391 of file dungeon_editor_system.h.
Referenced by SetRoomChangedCallback(), and SetRoomProperties().
|
private |
Definition at line 392 of file dungeon_editor_system.h.
Referenced by AddSprite(), MoveSprite(), SetSpriteActive(), SetSpriteChangedCallback(), and UpdateSprite().
|
private |
Definition at line 393 of file dungeon_editor_system.h.
Referenced by AddItem(), MoveItem(), SetItemChangedCallback(), SetItemHidden(), and UpdateItem().
|
private |
Definition at line 394 of file dungeon_editor_system.h.
Referenced by AddEntrance(), SetEntranceChangedCallback(), and UpdateEntrance().
|
private |
Definition at line 395 of file dungeon_editor_system.h.
Referenced by AddDoor(), SetDoorChangedCallback(), SetDoorKeyRequirement(), SetDoorLocked(), and UpdateDoor().
|
private |
Definition at line 396 of file dungeon_editor_system.h.
Referenced by AddChest(), SetChestChangedCallback(), SetChestItem(), SetChestOpened(), and UpdateChest().
|
private |
Definition at line 397 of file dungeon_editor_system.h.
Referenced by SetModeChangedCallback().
|
private |
Definition at line 398 of file dungeon_editor_system.h.
Referenced by SetValidationCallback().
|
private |
Definition at line 412 of file dungeon_editor_system.h.
Referenced by CanUndo(), and ClearHistory().
|
private |
Definition at line 413 of file dungeon_editor_system.h.
Referenced by CanRedo(), and ClearHistory().
|
staticconstexprprivate |
Definition at line 414 of file dungeon_editor_system.h.