yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::editor::ScreenEditor Class Reference

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>

Inheritance diagram for yaze::app::editor::ScreenEditor:
Collaboration diagram for yaze::app::editor::ScreenEditor:

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< Romshared_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::Bitmaptile16_individual_
 
std::vector< zelda3::screen::DungeonMapdungeon_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< Romshared_rom_ = nullptr
 
- Protected Attributes inherited from yaze::app::editor::Editor
EditorType type_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ScreenEditor()

yaze::app::editor::ScreenEditor::ScreenEditor ( )
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_.

Here is the call graph for this function:

Member Function Documentation

◆ Update()

absl::Status yaze::app::editor::ScreenEditor::Update ( )
overridevirtual

◆ Undo()

absl::Status yaze::app::editor::ScreenEditor::Undo ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 48 of file screen_editor.h.

◆ Redo()

absl::Status yaze::app::editor::ScreenEditor::Redo ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 49 of file screen_editor.h.

◆ Cut()

absl::Status yaze::app::editor::ScreenEditor::Cut ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 50 of file screen_editor.h.

◆ Copy()

absl::Status yaze::app::editor::ScreenEditor::Copy ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 51 of file screen_editor.h.

◆ Paste()

absl::Status yaze::app::editor::ScreenEditor::Paste ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 52 of file screen_editor.h.

◆ Find()

absl::Status yaze::app::editor::ScreenEditor::Find ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 53 of file screen_editor.h.

◆ SaveDungeonMaps()

absl::Status yaze::app::editor::ScreenEditor::SaveDungeonMaps ( )

◆ DrawTitleScreenEditor()

void yaze::app::editor::ScreenEditor::DrawTitleScreenEditor ( )
private

Definition at line 398 of file screen_editor.cc.

References END_TAB_ITEM, and TAB_ITEM.

Referenced by Update().

◆ DrawNamingScreenEditor()

void yaze::app::editor::ScreenEditor::DrawNamingScreenEditor ( )
private

Definition at line 402 of file screen_editor.cc.

References END_TAB_ITEM, and TAB_ITEM.

Referenced by Update().

◆ DrawOverworldMapEditor()

void yaze::app::editor::ScreenEditor::DrawOverworldMapEditor ( )
private

Definition at line 406 of file screen_editor.cc.

References END_TAB_ITEM, and TAB_ITEM.

Referenced by Update().

◆ DrawInventoryMenuEditor()

◆ DrawToolset()

void yaze::app::editor::ScreenEditor::DrawToolset ( )
private

Definition at line 411 of file screen_editor.cc.

◆ DrawInventoryToolset()

void yaze::app::editor::ScreenEditor::DrawInventoryToolset ( )
private

◆ LoadDungeonMaps()

◆ LoadDungeonMapTile16()

◆ DrawDungeonMapsTabs()

◆ DrawDungeonMapsEditor()

Member Data Documentation

◆ dungeon_maps_loaded_

bool yaze::app::editor::ScreenEditor::dungeon_maps_loaded_ = false
private

Definition at line 71 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor().

◆ selected_room

uint8_t yaze::app::editor::ScreenEditor::selected_room = 0
private

Definition at line 73 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs().

◆ boss_room

uint8_t yaze::app::editor::ScreenEditor::boss_room = 0
private

Definition at line 74 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs().

◆ selected_tile16_

int yaze::app::editor::ScreenEditor::selected_tile16_ = 0
private

Definition at line 76 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor().

◆ selected_dungeon

int yaze::app::editor::ScreenEditor::selected_dungeon = 0
private

Definition at line 77 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor(), and DrawDungeonMapsTabs().

◆ floor_number

int yaze::app::editor::ScreenEditor::floor_number = 1
private

Definition at line 78 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs().

◆ copy_button_pressed

bool yaze::app::editor::ScreenEditor::copy_button_pressed = false
private

Definition at line 80 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs().

◆ paste_button_pressed

bool yaze::app::editor::ScreenEditor::paste_button_pressed = false
private

Definition at line 81 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs().

◆ all_gfx_

std::vector<uint8_t> yaze::app::editor::ScreenEditor::all_gfx_
private

Definition at line 83 of file screen_editor.h.

◆ tile16_individual_

std::unordered_map<int, gfx::Bitmap> yaze::app::editor::ScreenEditor::tile16_individual_
private

Definition at line 84 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs(), and LoadDungeonMapTile16().

◆ dungeon_maps_

std::vector<zelda3::screen::DungeonMap> yaze::app::editor::ScreenEditor::dungeon_maps_
private

Definition at line 85 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs(), LoadDungeonMaps(), and SaveDungeonMaps().

◆ dungeon_map_labels_

std::vector<std::vector<std::array<std::string, 25> > > yaze::app::editor::ScreenEditor::dungeon_map_labels_
private

Definition at line 86 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs(), and LoadDungeonMaps().

◆ status_

absl::Status yaze::app::editor::ScreenEditor::status_
private

Definition at line 88 of file screen_editor.h.

Referenced by DrawInventoryMenuEditor().

◆ palette_

gfx::SnesPalette yaze::app::editor::ScreenEditor::palette_
private

Definition at line 90 of file screen_editor.h.

Referenced by DrawInventoryMenuEditor().

◆ sheets_

gfx::BitmapTable yaze::app::editor::ScreenEditor::sheets_
private

Definition at line 91 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor().

◆ tile16_sheet_

gfx::Tilesheet yaze::app::editor::ScreenEditor::tile16_sheet_
private

◆ screen_canvas_

gui::Canvas yaze::app::editor::ScreenEditor::screen_canvas_
private

Definition at line 94 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs(), DrawInventoryMenuEditor(), and ScreenEditor().

◆ tilesheet_canvas_

gui::Canvas yaze::app::editor::ScreenEditor::tilesheet_canvas_
private

Definition at line 95 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor(), and DrawInventoryMenuEditor().

◆ tilemap_canvas_

gui::Canvas yaze::app::editor::ScreenEditor::tilemap_canvas_
private

Definition at line 96 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor().

◆ inventory_

zelda3::screen::Inventory yaze::app::editor::ScreenEditor::inventory_
private

Definition at line 98 of file screen_editor.h.

Referenced by DrawInventoryMenuEditor().


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