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 = std::function< void(const std::vector< std::string > &errors)> |
Public Member Functions | |
DungeonEditorSystem (Rom *rom) | |
~DungeonEditorSystem ()=default | |
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) |
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 37 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::RoomChangedCallback = std::function<void(int room_id)> |
Definition at line 291 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::SpriteChangedCallback = std::function<void(int sprite_id)> |
Definition at line 292 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::ItemChangedCallback = std::function<void(int item_id)> |
Definition at line 293 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::EntranceChangedCallback = std::function<void(int entrance_id)> |
Definition at line 294 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::DoorChangedCallback = std::function<void(int door_id)> |
Definition at line 295 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::ChestChangedCallback = std::function<void(int chest_id)> |
Definition at line 296 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::ModeChangedCallback = std::function<void(EditorMode mode)> |
Definition at line 297 of file dungeon_editor_system.h.
using yaze::zelda3::DungeonEditorSystem::ValidationCallback = std::function<void(const std::vector<std::string>& errors)> |
Definition at line 298 of file dungeon_editor_system.h.
|
strong |
Enumerator | |
---|---|
kObjects | |
kSprites | |
kItems | |
kEntrances | |
kDoors | |
kChests | |
kProperties | |
kGlobal |
Definition at line 40 of file dungeon_editor_system.h.
|
strong |
Enumerator | |
---|---|
kEnemy | |
kNPC | |
kInteractive | |
kDecoration | |
kBoss | |
kSpecial |
Definition at line 52 of file dungeon_editor_system.h.
|
strong |
Enumerator | |
---|---|
kWeapon | |
kTool | |
kKey | |
kHeart | |
kRupee | |
kBottle | |
kUpgrade | |
kSpecial |
Definition at line 62 of file dungeon_editor_system.h.
|
strong |
Enumerator | |
---|---|
kNormal | |
kStairs | |
kDoor | |
kCave | |
kWarp | |
kBoss | |
kSpecial |
Definition at line 74 of file dungeon_editor_system.h.
|
explicit |
Definition at line 11 of file dungeon_editor_system.cc.
|
default |
absl::Status yaze::zelda3::DungeonEditorSystem::Initialize | ( | ) |
Definition at line 13 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, 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 34 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 44 of file dungeon_editor_system.cc.
References editor_state_, yaze::zelda3::DungeonEditorSystem::EditorState::is_dirty, and yaze::zelda3::DungeonEditorSystem::EditorState::last_save_time.
absl::Status yaze::zelda3::DungeonEditorSystem::SaveRoom | ( | int | room_id | ) |
Definition at line 52 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::ReloadRoom | ( | int | room_id | ) |
Definition at line 57 of file dungeon_editor_system.cc.
void yaze::zelda3::DungeonEditorSystem::SetEditorMode | ( | EditorMode | mode | ) |
Definition at line 62 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 66 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 70 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 79 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 83 of file dungeon_editor_system.cc.
References 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(), yaze::cli::handlers::DungeonSetRoomPropertyCommandHandler::Execute(), yaze::cli::HandleDungeonExportLegacy(), and yaze::cli::HandleDungeonListObjectsLegacy().
absl::Status yaze::zelda3::DungeonEditorSystem::CreateRoom | ( | int | room_id, |
const std::string & | name = "" |
||
) |
Definition at line 92 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::DeleteRoom | ( | int | room_id | ) |
Definition at line 97 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::DuplicateRoom | ( | int | source_room_id, |
int | target_room_id | ||
) |
Definition at line 102 of file dungeon_editor_system.cc.
std::shared_ptr< DungeonObjectEditor > yaze::zelda3::DungeonEditorSystem::GetObjectEditor | ( | ) |
Definition at line 107 of file dungeon_editor_system.cc.
References object_editor_, and rom_.
absl::Status yaze::zelda3::DungeonEditorSystem::SetObjectEditorMode | ( | ) |
Definition at line 114 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 120 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 132 of file dungeon_editor_system.cc.
References sprites_.
absl::Status yaze::zelda3::DungeonEditorSystem::UpdateSprite | ( | int | sprite_id, |
const SpriteData & | sprite_data | ||
) |
Definition at line 142 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 158 of file dungeon_editor_system.cc.
References sprites_.
absl::StatusOr< std::vector< DungeonEditorSystem::SpriteData > > yaze::zelda3::DungeonEditorSystem::GetSpritesByRoom | ( | int | room_id | ) |
Definition at line 167 of file dungeon_editor_system.cc.
References sprites_.
absl::StatusOr< std::vector< DungeonEditorSystem::SpriteData > > yaze::zelda3::DungeonEditorSystem::GetSpritesByType | ( | DungeonEditorSystem::SpriteType | type | ) |
Definition at line 179 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 191 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 207 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 223 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 235 of file dungeon_editor_system.cc.
References items_.
absl::Status yaze::zelda3::DungeonEditorSystem::UpdateItem | ( | int | item_id, |
const ItemData & | item_data | ||
) |
Definition at line 245 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 261 of file dungeon_editor_system.cc.
References items_.
absl::StatusOr< std::vector< DungeonEditorSystem::ItemData > > yaze::zelda3::DungeonEditorSystem::GetItemsByRoom | ( | int | room_id | ) |
Definition at line 270 of file dungeon_editor_system.cc.
References items_.
absl::StatusOr< std::vector< DungeonEditorSystem::ItemData > > yaze::zelda3::DungeonEditorSystem::GetItemsByType | ( | DungeonEditorSystem::ItemType | type | ) |
Definition at line 282 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 294 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 310 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 326 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 338 of file dungeon_editor_system.cc.
References entrances_.
absl::Status yaze::zelda3::DungeonEditorSystem::UpdateEntrance | ( | int | entrance_id, |
const EntranceData & | entrance_data | ||
) |
Definition at line 348 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 364 of file dungeon_editor_system.cc.
References entrances_.
absl::StatusOr< std::vector< DungeonEditorSystem::EntranceData > > yaze::zelda3::DungeonEditorSystem::GetEntrancesByRoom | ( | int | room_id | ) |
Definition at line 373 of file dungeon_editor_system.cc.
References entrances_.
absl::StatusOr< std::vector< DungeonEditorSystem::EntranceData > > yaze::zelda3::DungeonEditorSystem::GetEntrancesByType | ( | DungeonEditorSystem::EntranceType | type | ) |
Definition at line 385 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 397 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 411 of file dungeon_editor_system.cc.
References entrances_.
absl::Status yaze::zelda3::DungeonEditorSystem::AddDoor | ( | const DoorData & | door_data | ) |
Definition at line 427 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 439 of file dungeon_editor_system.cc.
References doors_.
absl::Status yaze::zelda3::DungeonEditorSystem::UpdateDoor | ( | int | door_id, |
const DoorData & | door_data | ||
) |
Definition at line 449 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 465 of file dungeon_editor_system.cc.
References doors_.
absl::StatusOr< std::vector< DungeonEditorSystem::DoorData > > yaze::zelda3::DungeonEditorSystem::GetDoorsByRoom | ( | int | room_id | ) |
Definition at line 474 of file dungeon_editor_system.cc.
References doors_.
absl::Status yaze::zelda3::DungeonEditorSystem::SetDoorLocked | ( | int | door_id, |
bool | locked | ||
) |
Definition at line 486 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 501 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 518 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 530 of file dungeon_editor_system.cc.
References chests_.
absl::Status yaze::zelda3::DungeonEditorSystem::UpdateChest | ( | int | chest_id, |
const ChestData & | chest_data | ||
) |
Definition at line 540 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 556 of file dungeon_editor_system.cc.
References chests_.
absl::StatusOr< std::vector< DungeonEditorSystem::ChestData > > yaze::zelda3::DungeonEditorSystem::GetChestsByRoom | ( | int | room_id | ) |
Definition at line 565 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 577 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 593 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 609 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 619 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_.
absl::Status yaze::zelda3::DungeonEditorSystem::SetDungeonSettings | ( | const DungeonSettings & | settings | ) |
Definition at line 641 of file dungeon_editor_system.cc.
References dungeon_settings_.
absl::StatusOr< DungeonEditorSystem::DungeonSettings > yaze::zelda3::DungeonEditorSystem::GetDungeonSettings | ( | ) |
Definition at line 646 of file dungeon_editor_system.cc.
References dungeon_settings_.
absl::Status yaze::zelda3::DungeonEditorSystem::ValidateRoom | ( | int | room_id | ) |
Definition at line 651 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::ValidateDungeon | ( | ) |
Definition at line 656 of file dungeon_editor_system.cc.
std::vector< std::string > yaze::zelda3::DungeonEditorSystem::GetValidationErrors | ( | int | room_id | ) |
Definition at line 661 of file dungeon_editor_system.cc.
std::vector< std::string > yaze::zelda3::DungeonEditorSystem::GetDungeonValidationErrors | ( | ) |
Definition at line 666 of file dungeon_editor_system.cc.
absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderRoom | ( | int | room_id | ) |
Definition at line 672 of file dungeon_editor_system.cc.
absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderRoomPreview | ( | int | room_id, |
EditorMode | mode | ||
) |
Definition at line 677 of file dungeon_editor_system.cc.
absl::StatusOr< gfx::Bitmap > yaze::zelda3::DungeonEditorSystem::RenderDungeonMap | ( | ) |
Definition at line 682 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::ImportRoomFromFile | ( | const std::string & | file_path, |
int | room_id | ||
) |
Definition at line 688 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::ExportRoomToFile | ( | int | room_id, |
const std::string & | file_path | ||
) |
Definition at line 693 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::ImportDungeonFromFile | ( | const std::string & | file_path | ) |
Definition at line 698 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::ExportDungeonToFile | ( | const std::string & | file_path | ) |
Definition at line 703 of file dungeon_editor_system.cc.
absl::Status yaze::zelda3::DungeonEditorSystem::Undo | ( | ) |
Definition at line 709 of file dungeon_editor_system.cc.
References CanUndo().
absl::Status yaze::zelda3::DungeonEditorSystem::Redo | ( | ) |
Definition at line 718 of file dungeon_editor_system.cc.
References CanRedo().
bool yaze::zelda3::DungeonEditorSystem::CanUndo | ( | ) | const |
Definition at line 727 of file dungeon_editor_system.cc.
References undo_history_.
Referenced by Undo().
bool yaze::zelda3::DungeonEditorSystem::CanRedo | ( | ) | const |
Definition at line 731 of file dungeon_editor_system.cc.
References redo_history_.
Referenced by Redo().
void yaze::zelda3::DungeonEditorSystem::ClearHistory | ( | ) |
Definition at line 735 of file dungeon_editor_system.cc.
References redo_history_, and undo_history_.
void yaze::zelda3::DungeonEditorSystem::SetRoomChangedCallback | ( | RoomChangedCallback | callback | ) |
Definition at line 741 of file dungeon_editor_system.cc.
References room_changed_callback_.
void yaze::zelda3::DungeonEditorSystem::SetSpriteChangedCallback | ( | SpriteChangedCallback | callback | ) |
Definition at line 745 of file dungeon_editor_system.cc.
References sprite_changed_callback_.
void yaze::zelda3::DungeonEditorSystem::SetItemChangedCallback | ( | ItemChangedCallback | callback | ) |
Definition at line 749 of file dungeon_editor_system.cc.
References item_changed_callback_.
void yaze::zelda3::DungeonEditorSystem::SetEntranceChangedCallback | ( | EntranceChangedCallback | callback | ) |
Definition at line 753 of file dungeon_editor_system.cc.
References entrance_changed_callback_.
void yaze::zelda3::DungeonEditorSystem::SetDoorChangedCallback | ( | DoorChangedCallback | callback | ) |
Definition at line 757 of file dungeon_editor_system.cc.
References door_changed_callback_.
void yaze::zelda3::DungeonEditorSystem::SetChestChangedCallback | ( | ChestChangedCallback | callback | ) |
Definition at line 761 of file dungeon_editor_system.cc.
References chest_changed_callback_.
void yaze::zelda3::DungeonEditorSystem::SetModeChangedCallback | ( | ModeChangedCallback | callback | ) |
Definition at line 765 of file dungeon_editor_system.cc.
References mode_changed_callback_.
void yaze::zelda3::DungeonEditorSystem::SetValidationCallback | ( | ValidationCallback | callback | ) |
Definition at line 769 of file dungeon_editor_system.cc.
References validation_callback_.
EditorState yaze::zelda3::DungeonEditorSystem::GetEditorState | ( | ) | const |
Rom * yaze::zelda3::DungeonEditorSystem::GetROM | ( | ) | const |
Definition at line 794 of file dungeon_editor_system.cc.
References rom_.
bool yaze::zelda3::DungeonEditorSystem::IsDirty | ( | ) | const |
Definition at line 798 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 802 of file dungeon_editor_system.cc.
References object_editor_, and rom_.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 774 of file dungeon_editor_system.cc.
References next_sprite_id_.
Referenced by AddSprite().
|
private |
Definition at line 778 of file dungeon_editor_system.cc.
References next_item_id_.
Referenced by AddItem().
|
private |
Definition at line 782 of file dungeon_editor_system.cc.
References next_entrance_id_.
Referenced by AddEntrance().
|
private |
Definition at line 786 of file dungeon_editor_system.cc.
References next_door_id_.
Referenced by AddDoor().
|
private |
Definition at line 790 of file dungeon_editor_system.cc.
References next_chest_id_.
Referenced by AddChest().
|
private |
Definition at line 356 of file dungeon_editor_system.h.
Referenced by GetObjectEditor(), GetROM(), GetRoom(), Initialize(), and SetROM().
|
private |
Definition at line 357 of file dungeon_editor_system.h.
Referenced by GetObjectEditor(), and SetROM().
|
private |
Definition at line 359 of file dungeon_editor_system.h.
Referenced by GetCurrentRoom(), GetEditorMode(), IsDirty(), LoadDungeon(), SaveDungeon(), SetCurrentRoom(), SetEditorMode(), and SetObjectEditorMode().
|
private |
Definition at line 360 of file dungeon_editor_system.h.
Referenced by GetDungeonSettings(), Initialize(), and SetDungeonSettings().
|
private |
Definition at line 363 of file dungeon_editor_system.h.
|
private |
Definition at line 364 of file dungeon_editor_system.h.
Referenced by AddSprite(), GetSprite(), GetSpritesByRoom(), GetSpritesByType(), MoveSprite(), RemoveSprite(), SetSpriteActive(), and UpdateSprite().
|
private |
Definition at line 365 of file dungeon_editor_system.h.
Referenced by AddItem(), GetItem(), GetItemsByRoom(), GetItemsByType(), MoveItem(), RemoveItem(), SetItemHidden(), and UpdateItem().
|
private |
Definition at line 366 of file dungeon_editor_system.h.
Referenced by AddEntrance(), DisconnectRooms(), GetEntrance(), GetEntrancesByRoom(), GetEntrancesByType(), RemoveEntrance(), and UpdateEntrance().
|
private |
Definition at line 367 of file dungeon_editor_system.h.
Referenced by AddDoor(), GetDoor(), GetDoorsByRoom(), RemoveDoor(), SetDoorKeyRequirement(), SetDoorLocked(), and UpdateDoor().
|
private |
Definition at line 368 of file dungeon_editor_system.h.
Referenced by AddChest(), GetChest(), GetChestsByRoom(), RemoveChest(), SetChestItem(), SetChestOpened(), and UpdateChest().
|
private |
Definition at line 369 of file dungeon_editor_system.h.
Referenced by GetRoomProperties(), and SetRoomProperties().
|
private |
Definition at line 372 of file dungeon_editor_system.h.
Referenced by GenerateSpriteId().
|
private |
Definition at line 373 of file dungeon_editor_system.h.
Referenced by GenerateItemId().
|
private |
Definition at line 374 of file dungeon_editor_system.h.
Referenced by GenerateEntranceId().
|
private |
Definition at line 375 of file dungeon_editor_system.h.
Referenced by GenerateDoorId().
|
private |
Definition at line 376 of file dungeon_editor_system.h.
Referenced by GenerateChestId().
|
private |
Definition at line 379 of file dungeon_editor_system.h.
Referenced by SetRoomChangedCallback(), and SetRoomProperties().
|
private |
Definition at line 380 of file dungeon_editor_system.h.
Referenced by AddSprite(), MoveSprite(), SetSpriteActive(), SetSpriteChangedCallback(), and UpdateSprite().
|
private |
Definition at line 381 of file dungeon_editor_system.h.
Referenced by AddItem(), MoveItem(), SetItemChangedCallback(), SetItemHidden(), and UpdateItem().
|
private |
Definition at line 382 of file dungeon_editor_system.h.
Referenced by AddEntrance(), SetEntranceChangedCallback(), and UpdateEntrance().
|
private |
Definition at line 383 of file dungeon_editor_system.h.
Referenced by AddDoor(), SetDoorChangedCallback(), SetDoorKeyRequirement(), SetDoorLocked(), and UpdateDoor().
|
private |
Definition at line 384 of file dungeon_editor_system.h.
Referenced by AddChest(), SetChestChangedCallback(), SetChestItem(), SetChestOpened(), and UpdateChest().
|
private |
Definition at line 385 of file dungeon_editor_system.h.
Referenced by SetModeChangedCallback().
|
private |
Definition at line 386 of file dungeon_editor_system.h.
Referenced by SetValidationCallback().
|
private |
Definition at line 400 of file dungeon_editor_system.h.
Referenced by CanUndo(), and ClearHistory().
|
private |
Definition at line 401 of file dungeon_editor_system.h.
Referenced by CanRedo(), and ClearHistory().
|
staticconstexprprivate |
Definition at line 402 of file dungeon_editor_system.h.