yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::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::editor::ScreenEditor:

Public Member Functions

 ScreenEditor (Rom *rom=nullptr)
 
void Initialize () override
 
absl::Status Load () override
 
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 Save () override
 
absl::StatusOr< zelda3::DungeonMapWritePlan > PrepareDungeonMapSave () const
 
absl::Status BeginSaveTransaction () override
 
void RollbackSaveTransaction () override
 
void CommitSaveTransaction () override
 
void set_rom (Rom *rom)
 
Rom * rom () const
 
EditorContextSnapshot BuildContextSnapshot () const override
 
absl::Status LoadMenuTilemapForTesting (const std::string &path)
 
bool IsMenuTilemapDirtyForTesting () const
 
bool IsMenuTilemapLoadedForTesting () const
 
bool HasPendingDungeonMapChanges () const
 
bool HasPendingDungeonMapTile16Changes () const
 
bool HasPendingTitleScreenChanges () const
 
bool HasPendingOverworldMapChanges () const
 
bool HasPendingScreenChanges () const
 
void InvalidateRomBackedState ()
 
absl::Status RefreshRomBackedState ()
 
bool IsRomBackedStateValid () const
 
absl::Status OpenDungeonMapTileGraphics ()
 
- Public Member Functions inherited from yaze::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
virtual void SetDependencies (const EditorDependencies &deps)
 
virtual void SetGameData (zelda3::GameData *game_data)
 
virtual void PrepareForSessionTeardown ()
 
virtual std::string GetUndoDescription () const
 
virtual std::string GetRedoDescription () const
 
const UndoManager & undo_manager () const
 
virtual absl::Status Clear ()
 
virtual bool CanUndo () const
 
virtual bool CanRedo () const
 
virtual bool CanCut () const
 
virtual bool CanCopy () const
 
virtual bool CanPaste () const
 
virtual bool CanFind () const
 
virtual void ContributeStatus (StatusBar *)
 
EditorType type () const
 
bool * active ()
 
void set_active (bool active)
 
void toggle_active ()
 
virtual bool IsRomLoaded () const
 
virtual std::string GetRomStatus () const
 
Rom * rom () const
 
zelda3::GameData * game_data () const
 
project::YazeProject * project () const
 
core::VersionManager * version_manager () const
 
EditorContext context () const
 
bool HasContext () const
 

Public Attributes

std::vector< zelda3::DungeonMap > dungeon_maps_
 

Private Types

enum class  EditingMode { DRAW , EDIT }
 

Private Member Functions

void DrawTitleScreenEditor ()
 
void DrawNamingScreenEditor ()
 
void DrawOverworldMapEditor ()
 
void DrawInventoryMenuEditor ()
 
void DrawInventoryItemIcons ()
 
void DrawMenuTilemapEditor ()
 
void DrawToolset ()
 
void DrawDungeonMapToolset ()
 
void DrawInventoryToolset ()
 
void DrawTitleScreenCompositeCanvas ()
 
void DrawTitleScreenBG1Canvas ()
 
void DrawTitleScreenBG2Canvas ()
 
void DrawTitleScreenBlocksetSelector ()
 
absl::Status LoadDungeonMapTile16 (const std::vector< uint8_t > &gfx_data, bool bin_mode=false)
 
void DrawDungeonMapScreen (int i)
 
void DrawDungeonMapsTabs ()
 
void DrawDungeonMapsEditor ()
 Draw dungeon maps editor with enhanced ROM hacking features.
 
void DrawDungeonMapsRoomGfx ()
 Draw dungeon room graphics editor with enhanced tile16 editing.
 
void RefreshDungeonMapGraphicsFromSession ()
 
void LoadBinaryGfx ()
 
gfx::Bitmap * GetOrCreateSheet (int index)
 
void RefreshTileCacheForReload (gfx::Tilemap &tilemap)
 
bool HasValidDungeonSelection () const
 
bool HasValidDungeonFloorSelection (int floor) const
 
absl::Status ChangeDungeonMapFloorCount (bool basement, bool add)
 
ScreenSnapshot CaptureDungeonMapSnapshot () const
 
ScreenSnapshot CaptureTile16CompSnapshot () const
 
void SaveDungeonMapUndoState (const std::string &description)
 
void SaveTile16CompUndoState (const std::string &description)
 
void CommitDungeonMapUndo ()
 
void CommitTile16CompUndo ()
 
void RestoreFromSnapshot (const ScreenSnapshot &snapshot)
 
void ResetRomBackedStateForLoad ()
 
void MarkDungeonMapModified ()
 
void MarkDungeonMapTile16Modified ()
 
void MarkTitleScreenModified ()
 
void MarkOverworldMapModified ()
 
void MarkOverworldMapPaletteModified ()
 
absl::Status SaveTitleScreenToRom ()
 
absl::Status SaveOverworldMapToRom ()
 

Private Attributes

EditingMode current_mode_ = EditingMode::DRAW
 
bool binary_gfx_loaded_ = false
 
uint8_t selected_room = 0
 
int selected_tile16_ = 0
 
int selected_tile8_ = 0
 
int selected_dungeon = 0
 
int floor_number = 1
 
bool select_floor_tab_ = true
 
bool copy_button_pressed = false
 
bool paste_button_pressed = false
 
zelda3::DungeonMapLabels dungeon_map_labels_
 
gfx::SnesPalette palette_
 
gfx::BitmapTable sheets_
 
gfx::Tilemap tile16_blockset_
 
gfx::Tilemap tile8_tilemap_
 
std::array< gfx::TileInfo, 4 > current_tile16_info
 
gui::Canvas current_tile_canvas_
 
gui::Canvas screen_canvas_
 
gui::Canvas tilesheet_canvas_
 
gui::Canvas tilemap_canvas_
 
gui::Canvas title_bg1_canvas_
 
gui::Canvas title_bg2_canvas_
 
gui::Canvas title_blockset_canvas_
 
std::unique_ptr< zelda3::Inventory > inventory_
 
bool inventory_loaded_ = false
 
MenuTilemapEditorUI menu_tilemap_ui_
 
zelda3::TitleScreen title_screen_
 
zelda3::OverworldMapScreen ow_map_screen_
 
int selected_title_tile16_ = 0
 
bool title_screen_loaded_ = false
 
bool title_h_flip_ = false
 
bool title_v_flip_ = false
 
int title_palette_ = 0
 
bool show_title_bg1_ = true
 
bool show_title_bg2_ = true
 
int selected_ow_tile_ = 0
 
bool ow_map_loaded_ = false
 
bool ow_show_dark_world_ = false
 
gui::Canvas ow_map_canvas_
 
gui::Canvas ow_tileset_canvas_
 
bool has_pending_dungeon_undo_ = false
 
bool has_pending_tile16_undo_ = false
 
bool pending_dungeon_map_changes_ = false
 
bool pending_dungeon_map_tile16_changes_ = false
 
bool pending_title_screen_changes_ = false
 
bool pending_overworld_map_changes_ = false
 
bool pending_overworld_map_palette_changes_ = false
 
bool rom_backed_state_valid_ = false
 
Rom * loaded_rom_ = nullptr
 
zelda3::GameData * loaded_game_data_ = nullptr
 
bool map_save_transaction_active_ = false
 
bool map_save_serialized_ = false
 
ScreenSnapshot pending_dungeon_before_
 
ScreenSnapshot pending_tile16_before_
 
std::string pending_dungeon_desc_
 
std::string pending_tile16_desc_
 
Rom * rom_
 
absl::Status status_
 

Friends

class ScreenEditorSaveStoplossTestPeer
 
class AuthoringSaveWorkflowTestPeer
 
class ScreenGraphicsContextTestPeer
 
class ScreenFloorMutationTestPeer
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::Editor
std::string MakePanelTitle (const std::string &base_title) const
 
std::string MakeWindowId (const std::string &base_id) const
 
template<typename T >
absl::StatusOr< T > SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const
 
- Protected Attributes inherited from yaze::editor::Editor
bool active_ = false
 
EditorType type_
 
EditorDependencies dependencies_
 
UndoManager undo_manager_
 

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.

Definition at line 39 of file screen_editor.h.

Member Enumeration Documentation

◆ EditingMode

enum class yaze::editor::ScreenEditor::EditingMode
strongprivate
Enumerator
DRAW 
EDIT 

Definition at line 170 of file screen_editor.h.

Constructor & Destructor Documentation

◆ ScreenEditor()

yaze::editor::ScreenEditor::ScreenEditor ( Rom * rom = nullptr)
inlineexplicit

Definition at line 41 of file screen_editor.h.

References yaze::editor::kScreen, screen_canvas_, yaze::gui::Canvas::SetCanvasSize(), and yaze::editor::Editor::type_.

Here is the call graph for this function:

Member Function Documentation

◆ Initialize()

◆ Load()

◆ Update()

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

Implements yaze::editor::Editor.

Definition at line 341 of file screen_editor.cc.

References status_.

◆ Undo()

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

Implements yaze::editor::Editor.

Definition at line 49 of file screen_editor.h.

References yaze::editor::UndoManager::Undo(), and yaze::editor::Editor::undo_manager_.

Referenced by DrawInventoryToolset().

Here is the call graph for this function:

◆ Redo()

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

Implements yaze::editor::Editor.

Definition at line 50 of file screen_editor.h.

References yaze::editor::UndoManager::Redo(), and yaze::editor::Editor::undo_manager_.

Referenced by DrawInventoryToolset().

Here is the call graph for this function:

◆ Cut()

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

Implements yaze::editor::Editor.

Definition at line 51 of file screen_editor.h.

◆ Copy()

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

Implements yaze::editor::Editor.

Definition at line 52 of file screen_editor.h.

◆ Paste()

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

Implements yaze::editor::Editor.

Definition at line 53 of file screen_editor.h.

◆ Find()

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

Implements yaze::editor::Editor.

Definition at line 54 of file screen_editor.h.

◆ Save()

absl::Status yaze::editor::ScreenEditor::Save ( )
overridevirtual

◆ PrepareDungeonMapSave()

◆ BeginSaveTransaction()

absl::Status yaze::editor::ScreenEditor::BeginSaveTransaction ( )
overridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 306 of file screen_editor.cc.

References map_save_serialized_, and map_save_transaction_active_.

◆ RollbackSaveTransaction()

void yaze::editor::ScreenEditor::RollbackSaveTransaction ( )
overridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 315 of file screen_editor.cc.

References map_save_serialized_, and map_save_transaction_active_.

Referenced by CommitSaveTransaction(), and ResetRomBackedStateForLoad().

◆ CommitSaveTransaction()

void yaze::editor::ScreenEditor::CommitSaveTransaction ( )
overridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 322 of file screen_editor.cc.

References map_save_serialized_, map_save_transaction_active_, pending_dungeon_map_changes_, and RollbackSaveTransaction().

Here is the call graph for this function:

◆ set_rom()

void yaze::editor::ScreenEditor::set_rom ( Rom * rom)
inline

Definition at line 62 of file screen_editor.h.

References rom(), and rom_.

Here is the call graph for this function:

◆ rom()

Rom * yaze::editor::ScreenEditor::rom ( ) const
inline

◆ BuildContextSnapshot()

◆ LoadMenuTilemapForTesting()

absl::Status yaze::editor::ScreenEditor::LoadMenuTilemapForTesting ( const std::string & path)
inline

Definition at line 74 of file screen_editor.h.

References yaze::editor::MenuTilemapEditorUI::LoadFileForTesting(), and menu_tilemap_ui_.

Here is the call graph for this function:

◆ IsMenuTilemapDirtyForTesting()

bool yaze::editor::ScreenEditor::IsMenuTilemapDirtyForTesting ( ) const
inline

Definition at line 77 of file screen_editor.h.

References yaze::editor::MenuTilemapEditorUI::dirty(), and menu_tilemap_ui_.

Here is the call graph for this function:

◆ IsMenuTilemapLoadedForTesting()

bool yaze::editor::ScreenEditor::IsMenuTilemapLoadedForTesting ( ) const
inline

Definition at line 78 of file screen_editor.h.

References yaze::editor::MenuTilemapEditorUI::loaded(), and menu_tilemap_ui_.

Here is the call graph for this function:

◆ HasPendingDungeonMapChanges()

bool yaze::editor::ScreenEditor::HasPendingDungeonMapChanges ( ) const
inline

Definition at line 82 of file screen_editor.h.

References pending_dungeon_map_changes_.

Referenced by HasPendingScreenChanges(), and PrepareDungeonMapSave().

◆ HasPendingDungeonMapTile16Changes()

bool yaze::editor::ScreenEditor::HasPendingDungeonMapTile16Changes ( ) const
inline

◆ HasPendingTitleScreenChanges()

bool yaze::editor::ScreenEditor::HasPendingTitleScreenChanges ( ) const
inline

Definition at line 88 of file screen_editor.h.

References pending_title_screen_changes_.

Referenced by HasPendingScreenChanges(), and PrepareDungeonMapSave().

◆ HasPendingOverworldMapChanges()

bool yaze::editor::ScreenEditor::HasPendingOverworldMapChanges ( ) const
inline

◆ HasPendingScreenChanges()

bool yaze::editor::ScreenEditor::HasPendingScreenChanges ( ) const
inline

Definition at line 95 of file screen_editor.h.

References HasPendingDungeonMapChanges(), HasPendingDungeonMapTile16Changes(), HasPendingOverworldMapChanges(), and HasPendingTitleScreenChanges().

Here is the call graph for this function:

◆ InvalidateRomBackedState()

void yaze::editor::ScreenEditor::InvalidateRomBackedState ( )

Definition at line 1775 of file screen_editor.cc.

References ResetRomBackedStateForLoad().

Here is the call graph for this function:

◆ RefreshRomBackedState()

absl::Status yaze::editor::ScreenEditor::RefreshRomBackedState ( )

Definition at line 1779 of file screen_editor.cc.

References Load().

Here is the call graph for this function:

◆ IsRomBackedStateValid()

bool yaze::editor::ScreenEditor::IsRomBackedStateValid ( ) const
inline

Definition at line 102 of file screen_editor.h.

References rom_backed_state_valid_.

◆ OpenDungeonMapTileGraphics()

◆ DrawTitleScreenEditor()

◆ DrawNamingScreenEditor()

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

Definition at line 1370 of file screen_editor.cc.

Referenced by Initialize().

◆ DrawOverworldMapEditor()

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

◆ DrawInventoryMenuEditor()

◆ DrawInventoryItemIcons()

void yaze::editor::ScreenEditor::DrawInventoryItemIcons ( )
private
Todo
Select this icon for editing

Definition at line 475 of file screen_editor.cc.

References inventory_.

Referenced by DrawInventoryMenuEditor().

◆ DrawMenuTilemapEditor()

void yaze::editor::ScreenEditor::DrawMenuTilemapEditor ( )
private

◆ DrawToolset()

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

Definition at line 348 of file screen_editor.cc.

◆ DrawDungeonMapToolset()

void yaze::editor::ScreenEditor::DrawDungeonMapToolset ( )
private

Definition at line 1587 of file screen_editor.cc.

◆ DrawInventoryToolset()

◆ DrawTitleScreenCompositeCanvas()

◆ DrawTitleScreenBG1Canvas()

◆ DrawTitleScreenBG2Canvas()

◆ DrawTitleScreenBlocksetSelector()

◆ LoadDungeonMapTile16()

absl::Status yaze::editor::ScreenEditor::LoadDungeonMapTile16 ( const std::vector< uint8_t > & gfx_data,
bool bin_mode = false )
private

◆ DrawDungeonMapScreen()

◆ DrawDungeonMapsTabs()

◆ DrawDungeonMapsEditor()

void yaze::editor::ScreenEditor::DrawDungeonMapsEditor ( )
private

Draw dungeon maps editor with enhanced ROM hacking features.

Enhanced Features:

  • Multi-mode editing (DRAW, EDIT, SELECT)
  • Real-time tile16 preview and editing
  • Floor/basement management for complex dungeons
  • Copy/paste operations for floor layouts
  • Integration with ROM tile16 data

Performance Notes:

  • Lazy loading of dungeon graphics
  • Cached tile16 rendering for fast updates
  • Batch operations for multiple tile changes
  • Efficient memory management for large dungeons

Definition at line 949 of file screen_editor.cc.

References current_mode_, DRAW, yaze::gui::Canvas::DrawBackground(), yaze::gui::Canvas::DrawBitmapTable(), yaze::gui::Canvas::DrawContextMenu(), DrawDungeonMapsRoomGfx(), DrawDungeonMapsTabs(), yaze::gui::Canvas::DrawGrid(), yaze::gui::Canvas::DrawOverlay(), yaze::gui::Canvas::DrawTileSelector(), dungeon_maps_, EDIT, yaze::gui::Canvas::GetConfig(), HasValidDungeonSelection(), ICON_MD_DRAW, ICON_MD_EDIT, ICON_MD_SAVE, yaze::gui::Canvas::IsMouseHovering(), yaze::gui::kSelectionSource, LoadBinaryGfx(), OpenDungeonMapTileGraphics(), yaze::gui::Canvas::points(), yaze::Rom::resource_label(), yaze::gui::CanvasConfig::role, rom(), rom_backed_state_valid_, yaze::project::ResourceLabelManager::SelectableLabelWithNameEdit(), selected_dungeon, selected_tile8_, sheets_, status_, tilemap_canvas_, and yaze::gui::ToolbarIconButton().

Referenced by Initialize().

◆ DrawDungeonMapsRoomGfx()

void yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx ( )
private

Draw dungeon room graphics editor with enhanced tile16 editing.

Enhanced Features:

  • Interactive tile16 selector with visual feedback
  • Real-time tile16 composition from 4x 8x8 tiles
  • Tile metadata editing (mirroring, palette, etc.)
  • Integration with ROM graphics buffer
  • Undo/redo support for tile modifications

Performance Notes:

  • Cached tile16 rendering to avoid repeated composition
  • Efficient tile selector with grid-based snapping
  • Batch tile updates to minimize ROM writes
  • Lazy loading of tile graphics data

Definition at line 759 of file screen_editor.cc.

References yaze::gfx::Tilemap::atlas, yaze::gui::BeginCanvas(), yaze::gfx::TileCache::CacheTile(), yaze::gui::CanvasFrameOptions::canvas_size, CommitDungeonMapUndo(), CommitTile16CompUndo(), yaze::gfx::Arena::CREATE, current_tile16_info, current_tile_canvas_, yaze::gfx::Bitmap::data(), yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::DrawBitmap(), yaze::gui::Canvas::DrawTilePainter(), yaze::gui::DrawTileSelector(), dungeon_maps_, yaze::gui::EndCanvas(), floor_number, yaze::editor::Editor::game_data(), yaze::gfx::Arena::Get(), yaze::gui::Canvas::GetConfig(), yaze::gfx::TileCache::GetTile(), yaze::gui::CanvasFrameOptions::grid_step, HasValidDungeonFloorSelection(), yaze::gfx::Bitmap::height(), yaze::gui::InputTileInfo(), yaze::gui::Canvas::IsMouseHovering(), yaze::zelda3::kNumRooms, yaze::gui::kPreviewOnly, yaze::gui::kSelectionSource, yaze::gfx::ModifyTile16(), yaze::gui::Canvas::mutable_points(), yaze::gfx::Bitmap::palette(), yaze::gui::Canvas::points(), yaze::gfx::Arena::QueueTextureCommand(), yaze::gui::CanvasFrameOptions::render_popups, yaze::gfx::RenderTile16(), yaze::gui::CanvasConfig::role, rom_backed_state_valid_, SaveDungeonMapUndoState(), SaveTile16CompUndoState(), screen_canvas_, selected_dungeon, selected_room, selected_tile16_, selected_tile8_, yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::size(), tile16_blockset_, tile8_tilemap_, yaze::gfx::Tilemap::tile_cache, yaze::gfx::Tilemap::tile_info, tilesheet_canvas_, yaze::gfx::UpdateTile16(), and yaze::gfx::Bitmap::width().

Referenced by DrawDungeonMapsEditor().

◆ RefreshDungeonMapGraphicsFromSession()

◆ LoadBinaryGfx()

◆ GetOrCreateSheet()

gfx::Bitmap * yaze::editor::ScreenEditor::GetOrCreateSheet ( int index)
private

Definition at line 1783 of file screen_editor.cc.

References sheets_.

Referenced by Load(), LoadBinaryGfx(), and RefreshDungeonMapGraphicsFromSession().

◆ RefreshTileCacheForReload()

◆ HasValidDungeonSelection()

bool yaze::editor::ScreenEditor::HasValidDungeonSelection ( ) const
private

◆ HasValidDungeonFloorSelection()

bool yaze::editor::ScreenEditor::HasValidDungeonFloorSelection ( int floor) const
private

Definition at line 1813 of file screen_editor.cc.

References dungeon_map_labels_, dungeon_maps_, HasValidDungeonSelection(), and selected_dungeon.

Referenced by DrawDungeonMapScreen(), DrawDungeonMapsRoomGfx(), and DrawDungeonMapsTabs().

Here is the call graph for this function:

◆ ChangeDungeonMapFloorCount()

absl::Status yaze::editor::ScreenEditor::ChangeDungeonMapFloorCount ( bool basement,
bool add )
private

◆ CaptureDungeonMapSnapshot()

◆ CaptureTile16CompSnapshot()

◆ SaveDungeonMapUndoState()

void yaze::editor::ScreenEditor::SaveDungeonMapUndoState ( const std::string & description)
private

Definition at line 1690 of file screen_editor.cc.

References CaptureDungeonMapSnapshot(), has_pending_dungeon_undo_, pending_dungeon_before_, and pending_dungeon_desc_.

Referenced by ChangeDungeonMapFloorCount(), and DrawDungeonMapsRoomGfx().

Here is the call graph for this function:

◆ SaveTile16CompUndoState()

void yaze::editor::ScreenEditor::SaveTile16CompUndoState ( const std::string & description)
private

Definition at line 1696 of file screen_editor.cc.

References CaptureTile16CompSnapshot(), has_pending_tile16_undo_, pending_tile16_before_, and pending_tile16_desc_.

Referenced by DrawDungeonMapsRoomGfx().

Here is the call graph for this function:

◆ CommitDungeonMapUndo()

void yaze::editor::ScreenEditor::CommitDungeonMapUndo ( )
private

◆ CommitTile16CompUndo()

void yaze::editor::ScreenEditor::CommitTile16CompUndo ( )
private

◆ RestoreFromSnapshot()

◆ ResetRomBackedStateForLoad()

void yaze::editor::ScreenEditor::ResetRomBackedStateForLoad ( )
private

Definition at line 1823 of file screen_editor.cc.

References binary_gfx_loaded_, yaze::editor::UndoManager::Clear(), yaze::gfx::SnesPalette::clear(), copy_button_pressed, current_mode_, current_tile16_info, current_tile_canvas_, DRAW, dungeon_map_labels_, dungeon_maps_, floor_number, has_pending_dungeon_undo_, has_pending_tile16_undo_, inventory_, inventory_loaded_, loaded_game_data_, loaded_rom_, yaze::gfx::Tilemap::map_size, ow_map_canvas_, ow_map_loaded_, ow_map_screen_, ow_show_dark_world_, ow_tileset_canvas_, palette_, paste_button_pressed, pending_dungeon_before_, pending_dungeon_desc_, pending_dungeon_map_changes_, pending_dungeon_map_tile16_changes_, pending_overworld_map_changes_, pending_overworld_map_palette_changes_, pending_tile16_before_, pending_tile16_desc_, pending_title_screen_changes_, yaze::zelda3::OverworldMapScreen::ResetForReload(), yaze::zelda3::TitleScreen::ResetForReload(), RollbackSaveTransaction(), rom_backed_state_valid_, screen_canvas_, select_floor_tab_, selected_dungeon, selected_ow_tile_, selected_room, selected_tile16_, selected_tile8_, selected_title_tile16_, show_title_bg1_, show_title_bg2_, status_, tile16_blockset_, tile8_tilemap_, yaze::gfx::Tilemap::tile_info, yaze::gfx::Tilemap::tile_size, tilemap_canvas_, tilesheet_canvas_, title_bg1_canvas_, title_bg2_canvas_, title_blockset_canvas_, title_h_flip_, title_palette_, title_screen_, title_screen_loaded_, title_v_flip_, and yaze::editor::Editor::undo_manager_.

Referenced by InvalidateRomBackedState(), and Load().

◆ MarkDungeonMapModified()

void yaze::editor::ScreenEditor::MarkDungeonMapModified ( )
inlineprivate

◆ MarkDungeonMapTile16Modified()

void yaze::editor::ScreenEditor::MarkDungeonMapTile16Modified ( )
inlineprivate

◆ MarkTitleScreenModified()

void yaze::editor::ScreenEditor::MarkTitleScreenModified ( )
inlineprivate

◆ MarkOverworldMapModified()

void yaze::editor::ScreenEditor::MarkOverworldMapModified ( )
inlineprivate

Definition at line 163 of file screen_editor.h.

References pending_overworld_map_changes_.

Referenced by DrawOverworldMapEditor().

◆ MarkOverworldMapPaletteModified()

void yaze::editor::ScreenEditor::MarkOverworldMapPaletteModified ( )
inlineprivate

Definition at line 164 of file screen_editor.h.

References pending_overworld_map_palette_changes_.

Referenced by DrawOverworldMapEditor().

◆ SaveTitleScreenToRom()

absl::Status yaze::editor::ScreenEditor::SaveTitleScreenToRom ( )
private

Definition at line 1763 of file screen_editor.cc.

Referenced by DrawTitleScreenEditor().

◆ SaveOverworldMapToRom()

absl::Status yaze::editor::ScreenEditor::SaveOverworldMapToRom ( )
private

Definition at line 1769 of file screen_editor.cc.

Referenced by DrawOverworldMapEditor().

Friends And Related Symbol Documentation

◆ ScreenEditorSaveStoplossTestPeer

friend class ScreenEditorSaveStoplossTestPeer
friend

Definition at line 110 of file screen_editor.h.

◆ AuthoringSaveWorkflowTestPeer

friend class AuthoringSaveWorkflowTestPeer
friend

Definition at line 111 of file screen_editor.h.

◆ ScreenGraphicsContextTestPeer

friend class ScreenGraphicsContextTestPeer
friend

Definition at line 112 of file screen_editor.h.

◆ ScreenFloorMutationTestPeer

friend class ScreenFloorMutationTestPeer
friend

Definition at line 113 of file screen_editor.h.

Member Data Documentation

◆ dungeon_maps_

◆ current_mode_

◆ binary_gfx_loaded_

bool yaze::editor::ScreenEditor::binary_gfx_loaded_ = false
private

◆ selected_room

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

◆ selected_tile16_

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

◆ selected_tile8_

int yaze::editor::ScreenEditor::selected_tile8_ = 0
private

◆ selected_dungeon

◆ floor_number

◆ select_floor_tab_

bool yaze::editor::ScreenEditor::select_floor_tab_ = true
private

◆ copy_button_pressed

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

Definition at line 184 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs(), and ResetRomBackedStateForLoad().

◆ paste_button_pressed

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

Definition at line 185 of file screen_editor.h.

Referenced by DrawDungeonMapsTabs(), and ResetRomBackedStateForLoad().

◆ dungeon_map_labels_

◆ palette_

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

Definition at line 189 of file screen_editor.h.

Referenced by DrawInventoryMenuEditor(), and ResetRomBackedStateForLoad().

◆ sheets_

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

Definition at line 190 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor(), GetOrCreateSheet(), and Load().

◆ tile16_blockset_

◆ tile8_tilemap_

gfx::Tilemap yaze::editor::ScreenEditor::tile8_tilemap_
private

◆ current_tile16_info

std::array<gfx::TileInfo, 4> yaze::editor::ScreenEditor::current_tile16_info
private

◆ current_tile_canvas_

gui::Canvas yaze::editor::ScreenEditor::current_tile_canvas_
private
Initial value:
{"##CurrentTileCanvas", ImVec2(32, 32),

Definition at line 195 of file screen_editor.h.

Referenced by DrawDungeonMapsRoomGfx(), and ResetRomBackedStateForLoad().

◆ screen_canvas_

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

◆ tilesheet_canvas_

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

◆ tilemap_canvas_

gui::Canvas yaze::editor::ScreenEditor::tilemap_canvas_
private
Initial value:
{"##TilemapCanvas", ImVec2(128 + 2, (192) + 4),

Definition at line 199 of file screen_editor.h.

Referenced by DrawDungeonMapsEditor(), and ResetRomBackedStateForLoad().

◆ title_bg1_canvas_

gui::Canvas yaze::editor::ScreenEditor::title_bg1_canvas_
private
Initial value:
{"##TitleBG1Canvas", ImVec2(256, 256),

Definition at line 204 of file screen_editor.h.

Referenced by DrawTitleScreenBG1Canvas(), DrawTitleScreenCompositeCanvas(), and ResetRomBackedStateForLoad().

◆ title_bg2_canvas_

gui::Canvas yaze::editor::ScreenEditor::title_bg2_canvas_
private
Initial value:
{"##TitleBG2Canvas", ImVec2(256, 256),

Definition at line 206 of file screen_editor.h.

Referenced by DrawTitleScreenBG2Canvas(), and ResetRomBackedStateForLoad().

◆ title_blockset_canvas_

gui::Canvas yaze::editor::ScreenEditor::title_blockset_canvas_
private
Initial value:
{"##TitleBlocksetCanvas", ImVec2(128, 512),

Definition at line 209 of file screen_editor.h.

Referenced by DrawTitleScreenBlocksetSelector(), and ResetRomBackedStateForLoad().

◆ inventory_

std::unique_ptr<zelda3::Inventory> yaze::editor::ScreenEditor::inventory_
private
Initial value:
=
std::make_unique<zelda3::Inventory>()

Definition at line 212 of file screen_editor.h.

Referenced by DrawInventoryItemIcons(), DrawInventoryMenuEditor(), and ResetRomBackedStateForLoad().

◆ inventory_loaded_

bool yaze::editor::ScreenEditor::inventory_loaded_ = false
private

Definition at line 214 of file screen_editor.h.

Referenced by DrawInventoryMenuEditor(), and ResetRomBackedStateForLoad().

◆ menu_tilemap_ui_

◆ title_screen_

◆ ow_map_screen_

zelda3::OverworldMapScreen yaze::editor::ScreenEditor::ow_map_screen_
private

Definition at line 217 of file screen_editor.h.

Referenced by DrawOverworldMapEditor(), and ResetRomBackedStateForLoad().

◆ selected_title_tile16_

int yaze::editor::ScreenEditor::selected_title_tile16_ = 0
private

◆ title_screen_loaded_

bool yaze::editor::ScreenEditor::title_screen_loaded_ = false
private

Definition at line 221 of file screen_editor.h.

Referenced by DrawTitleScreenEditor(), and ResetRomBackedStateForLoad().

◆ title_h_flip_

bool yaze::editor::ScreenEditor::title_h_flip_ = false
private

◆ title_v_flip_

bool yaze::editor::ScreenEditor::title_v_flip_ = false
private

◆ title_palette_

int yaze::editor::ScreenEditor::title_palette_ = 0
private

◆ show_title_bg1_

bool yaze::editor::ScreenEditor::show_title_bg1_ = true
private

◆ show_title_bg2_

bool yaze::editor::ScreenEditor::show_title_bg2_ = true
private

◆ selected_ow_tile_

int yaze::editor::ScreenEditor::selected_ow_tile_ = 0
private

Definition at line 229 of file screen_editor.h.

Referenced by DrawOverworldMapEditor(), and ResetRomBackedStateForLoad().

◆ ow_map_loaded_

bool yaze::editor::ScreenEditor::ow_map_loaded_ = false
private

Definition at line 230 of file screen_editor.h.

Referenced by DrawOverworldMapEditor(), and ResetRomBackedStateForLoad().

◆ ow_show_dark_world_

bool yaze::editor::ScreenEditor::ow_show_dark_world_ = false
private

Definition at line 231 of file screen_editor.h.

Referenced by DrawOverworldMapEditor(), and ResetRomBackedStateForLoad().

◆ ow_map_canvas_

gui::Canvas yaze::editor::ScreenEditor::ow_map_canvas_
private
Initial value:
{"##OWMapCanvas", ImVec2(512, 512),

Definition at line 234 of file screen_editor.h.

Referenced by DrawOverworldMapEditor(), and ResetRomBackedStateForLoad().

◆ ow_tileset_canvas_

gui::Canvas yaze::editor::ScreenEditor::ow_tileset_canvas_
private
Initial value:
{"##OWTilesetCanvas", ImVec2(128, 128),

Definition at line 236 of file screen_editor.h.

Referenced by DrawOverworldMapEditor(), and ResetRomBackedStateForLoad().

◆ has_pending_dungeon_undo_

bool yaze::editor::ScreenEditor::has_pending_dungeon_undo_ = false
private

◆ has_pending_tile16_undo_

bool yaze::editor::ScreenEditor::has_pending_tile16_undo_ = false
private

◆ pending_dungeon_map_changes_

bool yaze::editor::ScreenEditor::pending_dungeon_map_changes_ = false
private

◆ pending_dungeon_map_tile16_changes_

bool yaze::editor::ScreenEditor::pending_dungeon_map_tile16_changes_ = false
private

◆ pending_title_screen_changes_

bool yaze::editor::ScreenEditor::pending_title_screen_changes_ = false
private

◆ pending_overworld_map_changes_

bool yaze::editor::ScreenEditor::pending_overworld_map_changes_ = false
private

◆ pending_overworld_map_palette_changes_

bool yaze::editor::ScreenEditor::pending_overworld_map_palette_changes_ = false
private

◆ rom_backed_state_valid_

◆ loaded_rom_

Rom* yaze::editor::ScreenEditor::loaded_rom_ = nullptr
private

Definition at line 248 of file screen_editor.h.

Referenced by Load(), PrepareDungeonMapSave(), and ResetRomBackedStateForLoad().

◆ loaded_game_data_

zelda3::GameData* yaze::editor::ScreenEditor::loaded_game_data_ = nullptr
private

Definition at line 249 of file screen_editor.h.

Referenced by Load(), PrepareDungeonMapSave(), and ResetRomBackedStateForLoad().

◆ map_save_transaction_active_

bool yaze::editor::ScreenEditor::map_save_transaction_active_ = false
private

◆ map_save_serialized_

bool yaze::editor::ScreenEditor::map_save_serialized_ = false
private

◆ pending_dungeon_before_

ScreenSnapshot yaze::editor::ScreenEditor::pending_dungeon_before_
private

◆ pending_tile16_before_

ScreenSnapshot yaze::editor::ScreenEditor::pending_tile16_before_
private

◆ pending_dungeon_desc_

std::string yaze::editor::ScreenEditor::pending_dungeon_desc_
private

◆ pending_tile16_desc_

std::string yaze::editor::ScreenEditor::pending_tile16_desc_
private

◆ rom_

Rom* yaze::editor::ScreenEditor::rom_
private

◆ status_


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