The ScreenEditor class allows the user to edit a variety of screens in the game or create a custom menu. More...
#include <screen_editor.h>
Public Member Functions | |
ScreenEditor () | |
absl::Status | Update () override |
absl::Status | Undo () override |
absl::Status | Redo () override |
absl::Status | Cut () override |
absl::Status | Copy () override |
absl::Status | Paste () override |
absl::Status | Find () override |
absl::Status | SaveDungeonMaps () |
Public Member Functions inherited from yaze::app::SharedRom | |
SharedRom ()=default | |
virtual | ~SharedRom ()=default |
std::shared_ptr< Rom > | shared_rom () |
auto | rom () |
Public Member Functions inherited from yaze::app::editor::Editor | |
Editor ()=default | |
virtual | ~Editor ()=default |
EditorType | type () const |
Private Member Functions | |
void | DrawTitleScreenEditor () |
void | DrawNamingScreenEditor () |
void | DrawOverworldMapEditor () |
void | DrawInventoryMenuEditor () |
void | DrawToolset () |
void | DrawInventoryToolset () |
absl::Status | LoadDungeonMaps () |
absl::Status | LoadDungeonMapTile16 () |
void | DrawDungeonMapsTabs () |
void | DrawDungeonMapsEditor () |
Private Attributes | |
bool | dungeon_maps_loaded_ = false |
uint8_t | selected_room = 0 |
uint8_t | boss_room = 0 |
int | selected_tile16_ = 0 |
int | selected_dungeon = 0 |
int | floor_number = 1 |
bool | copy_button_pressed = false |
bool | paste_button_pressed = false |
std::vector< uint8_t > | all_gfx_ |
std::unordered_map< int, gfx::Bitmap > | tile16_individual_ |
std::vector< zelda3::screen::DungeonMap > | dungeon_maps_ |
std::vector< std::vector< std::array< std::string, 25 > > > | dungeon_map_labels_ |
absl::Status | status_ |
gfx::SnesPalette | palette_ |
gfx::BitmapTable | sheets_ |
gfx::Tilesheet | tile16_sheet_ |
gui::Canvas | screen_canvas_ |
gui::Canvas | tilesheet_canvas_ |
gui::Canvas | tilemap_canvas_ |
zelda3::screen::Inventory | inventory_ |
Additional Inherited Members | |
Static Public Attributes inherited from yaze::app::SharedRom | |
static std::shared_ptr< Rom > | shared_rom_ = nullptr |
Protected Attributes inherited from yaze::app::editor::Editor | |
EditorType | type_ |
The ScreenEditor class allows the user to edit a variety of screens in the game or create a custom menu.
This class is currently a work in progress (WIP) and provides functionality for updating the screens, saving dungeon maps, drawing different types of screens, loading dungeon maps, and managing various properties related to the editor.
The screens that can be edited include the title screen, naming screen, overworld map, inventory menu, and more.
The class inherits from the SharedRom class.
Definition at line 39 of file screen_editor.h.
|
inline |
Definition at line 41 of file screen_editor.h.
References yaze::app::editor::kScreen, screen_canvas_, yaze::app::gui::Canvas::SetCanvasSize(), and yaze::app::editor::Editor::type_.
|
overridevirtual |
Implements yaze::app::editor::Editor.
Definition at line 31 of file screen_editor.cc.
References DrawDungeonMapsEditor(), DrawInventoryMenuEditor(), DrawNamingScreenEditor(), DrawOverworldMapEditor(), DrawTitleScreenEditor(), END_TAB_BAR, END_TAB_ITEM, yaze::app::SharedRom::rom(), TAB_BAR, and TAB_ITEM.
Referenced by yaze::app::editor::EditorManager::ManageActiveEditors().
|
inlineoverridevirtual |
Implements yaze::app::editor::Editor.
Definition at line 48 of file screen_editor.h.
|
inlineoverridevirtual |
Implements yaze::app::editor::Editor.
Definition at line 49 of file screen_editor.h.
|
inlineoverridevirtual |
Implements yaze::app::editor::Editor.
Definition at line 50 of file screen_editor.h.
|
inlineoverridevirtual |
Implements yaze::app::editor::Editor.
Definition at line 51 of file screen_editor.h.
|
inlineoverridevirtual |
Implements yaze::app::editor::Editor.
Definition at line 52 of file screen_editor.h.
|
inlineoverridevirtual |
Implements yaze::app::editor::Editor.
Definition at line 53 of file screen_editor.h.
absl::Status yaze::app::editor::ScreenEditor::SaveDungeonMaps | ( | ) |
Definition at line 188 of file screen_editor.cc.
References dungeon_maps_, yaze::app::zelda3::screen::kDungeonMapGfxPtr, yaze::app::zelda3::screen::kDungeonMapRoomsPtr, RETURN_IF_ERROR, yaze::app::SharedRom::rom(), and yaze::app::core::SnesToPc().
Referenced by yaze::app::editor::EditorManager::SaveRom().
|
private |
Definition at line 398 of file screen_editor.cc.
References END_TAB_ITEM, and TAB_ITEM.
Referenced by Update().
|
private |
Definition at line 402 of file screen_editor.cc.
References END_TAB_ITEM, and TAB_ITEM.
Referenced by Update().
|
private |
Definition at line 406 of file screen_editor.cc.
References END_TAB_ITEM, and TAB_ITEM.
Referenced by Update().
|
private |
Definition at line 47 of file screen_editor.cc.
References yaze::app::zelda3::screen::Inventory::Bitmap(), yaze::app::zelda3::screen::Inventory::Create(), yaze::app::gui::DisplayPalette(), yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawBitmap(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::gui::Canvas::DrawGrid(), DrawInventoryToolset(), yaze::app::gui::Canvas::DrawOverlay(), END_TAB_ITEM, inventory_, yaze::app::zelda3::screen::Inventory::Palette(), palette_, yaze::app::SharedRom::rom(), screen_canvas_, status_, TAB_ITEM, yaze::app::zelda3::screen::Inventory::Tilesheet(), and tilesheet_canvas_.
Referenced by Update().
|
private |
Definition at line 411 of file screen_editor.cc.
|
private |
Definition at line 88 of file screen_editor.cc.
References BUTTON_COLUMN, ICON_MD_BUILD, ICON_MD_DRAW, ICON_MD_MORE_VERT, ICON_MD_REDO, ICON_MD_UNDO, ICON_MD_ZOOM_IN, ICON_MD_ZOOM_OUT, and TEXT_COLUMN.
Referenced by DrawInventoryMenuEditor().
|
private |
Definition at line 113 of file screen_editor.cc.
References ASSIGN_OR_RETURN, dungeon_map_labels_, dungeon_maps_, yaze::app::zelda3::screen::kDungeonMapBossRooms, yaze::app::zelda3::screen::kDungeonMapFloors, yaze::app::zelda3::screen::kDungeonMapRoomsPtr, yaze::app::SharedRom::rom(), yaze::app::core::SnesToPc(), and yaze::app::core::UppercaseHexByte().
Referenced by DrawDungeonMapsEditor().
|
private |
Definition at line 211 of file screen_editor.cc.
References ASSIGN_OR_RETURN, yaze::app::gfx::Tilesheet::ComposeTile16(), yaze::app::core::Renderer::GetInstance(), yaze::app::gfx::Tilesheet::GetTile16(), yaze::app::gfx::Tilesheet::Init(), yaze::app::zelda3::screen::kDungeonMapExpCheck, yaze::app::zelda3::screen::kDungeonMapTile16, yaze::app::zelda3::screen::kDungeonMapTile16Expanded, yaze::app::gfx::Tilesheet::mutable_bitmap(), yaze::app::gfx::Tilesheet::num_tiles(), yaze::app::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, yaze::app::SharedRom::rom(), yaze::app::gfx::Tile16, tile16_individual_, tile16_sheet_, and yaze::app::gfx::WordToTileInfo().
Referenced by DrawDungeonMapsEditor().
|
private |
Definition at line 250 of file screen_editor.cc.
References boss_room, copy_button_pressed, yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawBitmap(), yaze::app::gui::Canvas::DrawGrid(), yaze::app::gui::Canvas::DrawOutlineWithColor(), yaze::app::gui::Canvas::DrawOverlay(), yaze::app::gui::Canvas::DrawText(), yaze::app::gui::Canvas::DrawTileSelector(), dungeon_map_labels_, dungeon_maps_, floor_number, yaze::app::core::Renderer::GetInstance(), yaze::app::gfx::Tilesheet::GetTile16(), yaze::app::gui::InputHexByte(), yaze::app::gui::InputHexWord(), yaze::app::editor::kRedPen, paste_button_pressed, yaze::app::gui::Canvas::points(), yaze::app::core::Renderer::RenderBitmap(), screen_canvas_, selected_dungeon, selected_room, tile16_individual_, and tile16_sheet_.
Referenced by DrawDungeonMapsEditor().
|
private |
Definition at line 325 of file screen_editor.cc.
References yaze::app::gfx::Tilesheet::bitmap(), yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawBitmap(), yaze::app::gui::Canvas::DrawBitmapTable(), yaze::app::gui::Canvas::DrawContextMenu(), DrawDungeonMapsTabs(), yaze::app::gui::Canvas::DrawGrid(), yaze::app::gui::Canvas::DrawOverlay(), yaze::app::gui::Canvas::DrawTileSelector(), dungeon_maps_loaded_, LoadDungeonMaps(), LoadDungeonMapTile16(), yaze::app::gui::Canvas::points(), yaze::app::SharedRom::rom(), selected_dungeon, selected_tile16_, sheets_, tile16_sheet_, tilemap_canvas_, and tilesheet_canvas_.
Referenced by Update().
|
private |
Definition at line 71 of file screen_editor.h.
Referenced by DrawDungeonMapsEditor().
|
private |
Definition at line 73 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs().
|
private |
Definition at line 74 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs().
|
private |
Definition at line 76 of file screen_editor.h.
Referenced by DrawDungeonMapsEditor().
|
private |
Definition at line 77 of file screen_editor.h.
Referenced by DrawDungeonMapsEditor(), and DrawDungeonMapsTabs().
|
private |
Definition at line 78 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs().
|
private |
Definition at line 80 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs().
|
private |
Definition at line 81 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs().
|
private |
Definition at line 83 of file screen_editor.h.
|
private |
Definition at line 84 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs(), and LoadDungeonMapTile16().
|
private |
Definition at line 85 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs(), LoadDungeonMaps(), and SaveDungeonMaps().
|
private |
Definition at line 86 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs(), and LoadDungeonMaps().
|
private |
Definition at line 88 of file screen_editor.h.
Referenced by DrawInventoryMenuEditor().
|
private |
Definition at line 90 of file screen_editor.h.
Referenced by DrawInventoryMenuEditor().
|
private |
Definition at line 91 of file screen_editor.h.
Referenced by DrawDungeonMapsEditor().
|
private |
Definition at line 92 of file screen_editor.h.
Referenced by DrawDungeonMapsEditor(), DrawDungeonMapsTabs(), and LoadDungeonMapTile16().
|
private |
Definition at line 94 of file screen_editor.h.
Referenced by DrawDungeonMapsTabs(), DrawInventoryMenuEditor(), and ScreenEditor().
|
private |
Definition at line 95 of file screen_editor.h.
Referenced by DrawDungeonMapsEditor(), and DrawInventoryMenuEditor().
|
private |
Definition at line 96 of file screen_editor.h.
Referenced by DrawDungeonMapsEditor().
|
private |
Definition at line 98 of file screen_editor.h.
Referenced by DrawInventoryMenuEditor().