yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::OverworldEditor Class Reference

Main UI class for editing overworld maps in A Link to the Past. More...

#include <overworld_editor.h>

Inheritance diagram for yaze::editor::OverworldEditor:

Classes

struct  OverworldUndoPoint
 

Public Member Functions

 OverworldEditor (Rom *rom)
 
 OverworldEditor (Rom *rom, const EditorDependencies &deps)
 
 ~OverworldEditor () override
 
void SetMainGraphicsUsageCallback (GfxGroupEditor::MainUsageCallback callback)
 
void SetRoomsetGraphicsUsageCallback (GfxGroupEditor::RoomsetUsageCallback callback)
 
void PrepareForSessionTeardown () override
 
void SetDependencies (const EditorDependencies &deps) override
 
void SetGameData (zelda3::GameData *game_data) override
 
void Initialize () override
 
absl::Status Load () override
 
absl::Status Update () final
 
absl::Status Undo () override
 
absl::Status Redo () override
 
absl::Status Cut () override
 
absl::Status Copy () override
 
absl::Status Paste () override
 
absl::StatusOr< int > ApplyTile16Stencil (int map_id, const std::vector< GuardedTileCell > &cells)
 Select map_id and apply a guarded stencil as one undoable paint.
 
absl::Status Find () override
 
absl::Status Save () override
 
absl::Status BeginSaveTransaction () override
 
void RollbackSaveTransaction () override
 
void CommitSaveTransaction () override
 
absl::Status Clear () override
 
bool HasPendingProjectDraftChanges () const
 
bool HasUnpublishedProjectGraphics () const
 
absl::Status OpenProjectGraphicsSource ()
 
absl::StatusOr< ProjectGraphicsImportPlan > PreviewProjectGraphicsImport (const std::string &pack, const ProjectGraphicsImportBindings &bindings)
 
absl::Status ApplyProjectGraphicsImport (const std::string &pack, const ProjectGraphicsImportBindings &bindings)
 
absl::Status PlaceProjectGraphicsImport (int world_x, int world_y)
 
absl::Status PublishProjectGraphicsSource ()
 
void SetProjectContextProvider (std::function< project::YazeProject *()> provider)
 
absl::Status PrepareProjectSave ()
 
void ProjectSaveCommitted ()
 
void ContributeStatus (StatusBar *status_bar) override
 
void DrawEditorMenu () override
 
void DrawEditMenuItems () override
 
EditorContextSnapshot BuildContextSnapshot () const override
 
zelda3::Overworld & overworld ()
 Access the underlying Overworld data.
 
const gfx::Bitmap * AreaScreenBitmap (int map_id)
 
int jump_to_tab ()
 
bool IsRomLoaded () const override
 
std::string GetRomStatus () const override
 
Rom * rom () const
 
absl::Status EditProjectMapAuthoring (core::LyraAuthoringState after)
 
absl::Status CreateLyraTerrain ()
 
absl::Status OpenLyraTerrain (const std::string &path)
 
absl::Status SaveProjectTerrainAs (project::YazeProject *project, const std::string &project_path)
 
int DisplayedMapCount () const
 
bool IsProjectTerrainMap (int map_id) const
 
bool is_lyra_preview () const
 
bool lyra_a0_terrain_writable () const
 
absl::Status PaintLyraA0Terrain (int map_id, int x, int y, uint16_t tile)
 
absl::Status SaveLyraA0TerrainAs (const std::string &filename)
 
absl::Status CheckRomReplacement (const Rom &replacement) const
 
bool overlay_preview_enabled () const
 
void set_current_map (int map_id)
 Set the current map for editing (also updates world)
 
void SetCurrentMap (int map_id)
 
void SelectMapForEditing (int map_id, bool respect_pin=true)
 
void set_current_tile16 (int tile_id)
 
int current_tile16_id () const
 
absl::Status OpenGraphicsForTile16Quadrant (int tile16_id, int quadrant)
 
absl::Status OpenGraphicsForContextTile16 (const OverworldContextTarget &target)
 
const TilePaintingManager * tile_painting () const
 
const gfx::Bitmap & map_bitmap (int map_id) const
 
bool map_pinned () const
 
int current_map_id () const
 
int current_world_id () const
 
int hovered_map_id () const
 
absl::Status LoadGraphics ()
 Load the Bitmap objects for each OverworldMap.
 
absl::Status SyncProjectGraphicsPreview (bool force=false)
 
void SetCurrentEntity (zelda3::GameEntity *entity)
 Set the currently active entity for editing.
 
zelda3::GameEntity * current_entity () const
 
void NotifyEntityModified (zelda3::GameEntity *entity)
 Notify that an entity has been modified, marking ROM as dirty.
 
absl::Status ApplyEntranceEdit (zelda3::OverworldEntrance *target, const zelda3::OverworldEntrance &draft)
 
absl::Status ApplyExitEdit (zelda3::OverworldExit *target, const zelda3::OverworldExit &draft)
 
void OpenEntityEditor (zelda3::GameEntity *entity)
 
void RequestJumpToRoom (int room_id)
 Trigger a jump to a dungeon room.
 
void RequestJumpToEntrance (int entrance_id)
 Trigger a jump to a dungeon entrance.
 
EntityMutationService * entity_mutation_service ()
 Access the entity mutation service.
 
zelda3::OverworldEntrance & edit_entrance ()
 
zelda3::OverworldExit & edit_exit ()
 
zelda3::OverworldItem & edit_item ()
 
zelda3::Sprite & edit_sprite ()
 
std::optional< OverworldEntityInsertionRequest > TakePendingEntityInsertion ()
 
std::string & insert_error ()
 
gui::Canvas & ow_map_canvas ()
 
int game_state () const
 
void SetPreviewStoryState (int state)
 
void SetSelectionBrush (TileBrush brush)
 
void ClearSelectionBrush ()
 
const TileBrush * selection_brush () const
 
int GetTile16UsageCount (int tile_id) const
 
std::string GetTile16ScopeLabel () const
 
void HandleEntityInsertion (const std::string &entity_type, const OverworldContextTarget &target)
 Handle entity insertion from context menu.
 
void RequestItemInsertPopup (const std::optional< OverworldContextTarget > &target)
 
void DrawItemInsertPopup ()
 
bool TryPlaceArmedItem ()
 
void HandleTile16Edit (const OverworldContextTarget &target)
 Handle tile16 editing from context menu (MOUSE mode) Opens the Tile16 captured at menu-open through the pending-edit guard.
 
bool SampleContextTile16 (const OverworldContextTarget &target)
 
bool SelectItemByIdentity (const zelda3::OverworldItem &item_identity)
 Select an overworld item using value identity matching.
 
void ClearSelectedItem ()
 Clear active item selection.
 
std::optional< zelda3::OverworldItem > selected_item_identity () const
 Get current selected item identity snapshot.
 
zelda3::OverworldItem * GetSelectedItem ()
 Resolve selected item identity to the current live item pointer.
 
const zelda3::OverworldItem * GetSelectedItem () const
 
bool DuplicateSelectedItem (int offset_x=16, int offset_y=0)
 Duplicate selected item with optional pixel offset.
 
bool NudgeSelectedItem (int delta_x, int delta_y)
 Move selected item by signed pixel deltas.
 
bool DeleteSelectedItem ()
 Delete selected item and preserve nearest-item selection continuity.
 
bool DeleteItemByIdentity (const zelda3::OverworldItem &item_identity)
 
void ToggleBrushTool ()
 
void ActivateFillTool ()
 
void CycleTileSelection (int delta)
 
void ToggleMapLock ()
 
void ToggleCanvasFullscreen ()
 
void ToggleTile16EditorWindow ()
 
bool Tile16MenuEnabled () const
 
void ToggleItemListWindow ()
 
void SetEditingMode (EditingMode mode)
 Tool change from the toolbar or keys 1/2: also leaves entity modes.
 
void SelectAdjacentMap (int dx, int dy)
 Alt+Arrow: select the neighbouring screen in the world grid and center it.
 
void JumpToMap (int map_id)
 
void LocateOverworldTile (int map_id, int world_x, int world_y)
 
void SwitchToWorld (int world)
 
void ZoomIn ()
 
void ZoomOut ()
 
void ZoomToFit ()
 
void ResetOverworldView ()
 
void CenterOverworldView ()
 
void SetEntityEditMode (EntityEditMode mode)
 Entity focus (entrances/exits/items/sprites); NONE = all entities.
 
void ToggleEntityVisibility ()
 
bool entities_visible () const
 
void ToggleGrid ()
 
bool grid_visible () const
 
void OpenMapPropertiesWindow ()
 
void RequestTile16Selection (int tile_id)
 
bool PickTile16FromHoveredCanvas ()
 
absl::Status DrawAreaGraphics ()
 
absl::Status DrawTile16Selector ()
 
void DrawMapProperties ()
 
void InvalidateGraphicsCache (int map_id=-1)
 Invalidate cached graphics for a specific map or all maps.
 
absl::Status DrawScratchSpace ()
 
void DrawTile8Selector ()
 
absl::Status UpdateGfxGroupEditor ()
 
void DrawV3Settings ()
 
UsageStatisticsCard * usage_stats_card ()
 Access usage statistics card for panel.
 
DebugWindowCard * debug_window_card ()
 Access debug window card for panel.
 
Tile16Editor & tile16_editor ()
 Access the Tile16 Editor for panel integration.
 
const Tile16Editor & tile16_editor () const
 
const gfx::Tilemap & tile16_blockset () const
 Read-only access for integration tests that verify refresh output.
 
const gfx::Bitmap & current_gfx_bmp_for_testing () const
 
OverworldEntityWorkbench * GetWorkbench ()
 Resolve the entity workbench window content (may be null).
 
void DrawOverworldCanvas ()
 Draw the main overworld canvas.
 
- Public Member Functions inherited from yaze::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
virtual std::string GetUndoDescription () const
 
virtual std::string GetRedoDescription () const
 
const UndoManager & undo_manager () const
 
virtual bool CanUndo () const
 
virtual bool CanRedo () const
 
virtual bool CanCut () const
 
virtual bool CanCopy () const
 
virtual bool CanPaste () const
 
virtual bool CanFind () const
 
EditorType type () const
 
bool * active ()
 
void set_active (bool active)
 
void toggle_active ()
 
Rom * rom () const
 
zelda3::GameData * game_data () const
 
project::YazeProject * project () const
 
core::VersionManager * version_manager () const
 
EditorContext context () const
 
bool HasContext () const
 

Static Public Member Functions

static bool NormalizeMapSelection (int &current_world, int &current_map, int map_count=zelda3::kNumOverworldMaps)
 Clamp a possibly stale world/map selection back into a valid overworld range.
 

Public Attributes

int jump_to_tab_ = -1
 
int jump_to_entrance_ = -1
 
LyraTerrainCanvas lyra_canvas_
 
absl::Status lyra_canvas_status_
 

Private Types

enum  OverworldProperty {
  LW_AREA_GFX , DW_AREA_GFX , LW_AREA_PAL , DW_AREA_PAL ,
  LW_SPR_GFX_PART1 , LW_SPR_GFX_PART2 , DW_SPR_GFX_PART1 , DW_SPR_GFX_PART2 ,
  LW_SPR_PAL_PART1 , LW_SPR_PAL_PART2 , DW_SPR_PAL_PART1 , DW_SPR_PAL_PART2
}
 

Private Member Functions

void FocusLyraTerrain ()
 
project::YazeProject * TerrainProject () const
 
void DrawProjectGraphicsSource ()
 
void DrawProjectGraphicsImport ()
 
std::string ProjectGraphicsPath () const
 
absl::Status ReloadProjectGraphics ()
 
absl::Status RefreshPendingProjectGraphics ()
 
absl::StatusOr< ProjectGraphicsImportContext > GraphicsImportContext ()
 
bool NormalizeCurrentSelectionState ()
 Handle overworld keyboard shortcuts and edit-mode hotkeys.
 
void InitMapRefreshCoordinator ()
 Initialize the map refresh coordinator (called during Initialize)
 
void InitMapTextureCoordinator ()
 
void InitInteractionCoordinator ()
 
void RefreshChildMap (int map_index)
 
void RefreshOverworldMap ()
 
void RefreshOverworldMapOnDemand (int map_index)
 
void RefreshChildMapOnDemand (int map_index)
 
absl::Status RefreshMapPalette (int map_id=-1)
 
void RefreshMapProperties (int map_id=-1)
 
absl::Status RefreshTile16Blockset ()
 
void UpdateBlocksetWithPendingTileChanges ()
 
void ForceRefreshGraphics (int map_index)
 
void RefreshSiblingMapGraphics (int map_index, bool include_self=false)
 
void InitTilePaintingManager ()
 Initialize the tile painting manager (called after graphics load)
 
void CheckForOverworldEdits ()
 Check for tile edits - delegates to TilePaintingManager.
 
absl::Status CheckForCurrentMap ()
 Check for map changes and refresh if needed.
 
void HandleMapInteraction ()
 
void UpdateBlocksetSelectorState ()
 
void ScrollBlocksetCanvasToCurrentTile ()
 Scroll the blockset canvas to show the current selected tile16.
 
void InitCanvasNavigationManager ()
 Initialize the canvas navigation manager (called during Initialize)
 
void DrawEntityPopups ()
 
void OpenEntityContextMenu (zelda3::GameEntity *entity)
 
void DrawEntityContextMenu ()
 
zelda3::GameEntity * ResolveEditingEntity ()
 
absl::Status LoadSpriteGraphics ()
 
void ProcessDeferredTextures ()
 Create textures for deferred map bitmaps on demand.
 
void RefreshMapsForSheetEdits ()
 Mark maps for a graphics rebuild when a sheet they use changed in the session's sheet store (an unsaved Graphics editor edit).
 
void EnsureMapTexture (int map_index)
 Ensure a specific map has its texture created.
 
void PrimeWorldMaps (int world, bool process_texture_queue=false)
 
void SetupCanvasAutomation ()
 
gui::Canvas * GetOverworldCanvas ()
 
bool AutomationSetTile (int x, int y, int tile_id)
 
int AutomationGetTile (int x, int y)
 
absl::Status SaveCurrentSelectionToScratch ()
 
absl::Status LoadScratchToSelection ()
 
absl::Status ClearScratchSpace ()
 
void DrawScratchSpaceEdits ()
 
void DrawScratchSpacePattern ()
 
void DrawScratchSpaceSelection ()
 
void UpdateScratchBitmapTile (int tile_x, int tile_y, int tile_id)
 
absl::Status LoadScratchPad ()
 
absl::Status SaveScratchPad ()
 
void BeginScratchEdit ()
 
void FinishScratchEdit (const std::string &description)
 
absl::Status RestoreScratchState (const ScratchWorkspaceState &state)
 
absl::Status FlushScratchPadIfDirty ()
 
absl::Status RebuildScratchBitmapFromTileData ()
 
void MarkScratchSpaceDirty ()
 
void CreateUndoPoint (int map_id, int world, int x, int y, int old_tile_id)
 
void FinalizePaintOperation ()
 
auto & GetWorldTiles (int world)
 
OverworldItemsSnapshot CaptureItemUndoSnapshot () const
 
void RestoreItemUndoSnapshot (const OverworldItemsSnapshot &snapshot)
 
void PushItemUndoAction (OverworldItemsSnapshot before, std::string description)
 
absl::Status ApplyOverworldPropertyEdit (const OverworldPropertyEdit &edit, bool record_undo=true)
 
absl::Status ApplyOverworldPropertyEdits (const std::vector< OverworldPropertyEdit > &edits, const std::string &description, bool record_undo=true)
 
absl::Status RenameProjectResourceLabelWithUndo (const std::string &type, int id, const std::string &label)
 

Private Attributes

std::function< project::YazeProject *()> project_context_provider_
 
std::shared_ptr< ProjectGraphicsSource > graphics_source_
 
const project::YazeProject * graphics_source_project_ = nullptr
 
bool graphics_source_open_ = false
 
bool graphics_import_applied_ = false
 
int graphics_source_tile_ = 0
 
int graphics_source_palette_ = 5
 
int graphics_source_index_ = 1
 
absl::Status graphics_source_status_
 
std::string graphics_source_message_
 
zelda3::OverworldGraphicsPreview graphics_preview_baseline_
 
std::array< char, 1024 > graphics_import_path_ {}
 
std::optional< ProjectGraphicsImportAsset > graphics_import_asset_
 
std::optional< ProjectGraphicsImportPlan > graphics_import_plan_
 
ProjectGraphicsImportBindings graphics_import_bindings_
 
ProjectGraphicsImportBindings graphics_import_applied_bindings_
 
std::string graphics_import_pack_
 
bool graphics_import_ranges_reviewed_ = false
 
std::string lyra_loaded_rom_sha1_
 
int lyra_terrain_brush_ = 0x2103
 
std::string graphics_preview_config_path_
 
EditingMode current_mode = EditingMode::DRAW_TILE
 
EditingMode previous_mode = EditingMode::DRAW_TILE
 
EntityEditMode entity_edit_mode_ = EntityEditMode::NONE
 
int current_world_ = 0
 
int current_map_ = 0
 
int current_parent_ = 0
 
int hovered_map_ = -1
 
int current_blockset_ = 0
 
int game_state_ = 1
 
int current_tile16_ = 0
 
int selected_entrance_ = 0
 
int selected_usage_map_ = 0xFFFF
 
std::vector< int > selected_tile16_ids_
 
bool all_gfx_loaded_ = false
 
bool map_blockset_loaded_ = false
 
std::optional< int > pending_tile16_selection_after_gfx_
 
bool overworld_canvas_fullscreen_ = false
 
bool is_dragging_entity_ = false
 
std::optional< OverworldItemsSnapshot > drag_item_snapshot_
 Item state before an in-progress canvas drag (drag undo).
 
bool dragged_entity_free_movement_ = false
 
bool current_map_lock_ = false
 
bool show_custom_bg_color_editor_ = false
 
bool show_overlay_editor_ = false
 
bool show_overlay_preview_ = true
 
bool show_entities_ = true
 
std::unique_ptr< OverworldCanvasRenderer > canvas_renderer_
 
std::unique_ptr< CanvasNavigationManager > canvas_nav_
 
std::unique_ptr< TilePaintingManager > tile_painting_
 
std::unique_ptr< zelda3::OverworldUpgradeSystem > upgrade_system_
 
std::unique_ptr< EntityMutationService > entity_mutation_service_
 
std::unique_ptr< OverworldInteractionCoordinator > interaction_coordinator_
 
std::unique_ptr< MapRefreshCoordinator > map_refresh_
 
std::unique_ptr< OverworldMapTextureCoordinator > map_texture_
 
std::unique_ptr< MapPropertiesSystem > map_properties_system_
 
std::unique_ptr< OverworldSidebar > sidebar_
 
std::unique_ptr< OverworldEntityRenderer > entity_renderer_
 
std::unique_ptr< OverworldToolbar > toolbar_
 
ScratchWorkspace scratch_workspace_
 
gfx::Bitmap scratch_bitmap_
 
std::optional< ScratchWorkspaceState > scratch_edit_before_
 
bool scratch_space_dirty_ = false
 
absl::Status scratch_load_status_
 
absl::Status scratch_action_status_
 
absl::Status scratch_save_status_
 
bool scratch_initialized_ = false
 
std::filesystem::path scratch_path_
 
uint64_t scratch_name_id_ = 0
 
std::array< char, 129 > scratch_name_buffer_ {}
 
uint64_t scratch_resize_id_ = 0
 
std::array< int, 2 > scratch_resize_dimensions_ {16, 16}
 
int scratch_preview_map_ = -1
 
uint64_t scratch_preview_revision_ = 0
 
bool scratch_paint_gesture_owned_ = false
 
bool scratch_select_active_ = false
 
ImVec2 scratch_select_min_ {-1, -1}
 
ImVec2 scratch_select_max_ {-1, -1}
 
bool scratch_selecting_ = false
 
ImVec2 scratch_drag_start_ {-1, -1}
 
gui::AdaptiveSheetScaleMode scratch_scale_mode_
 
gfx::Tilemap tile16_blockset_
 
Rom * rom_
 
zelda3::GameData * game_data_ = nullptr
 
gfx::IRenderer * renderer_
 
Tile16Editor tile16_editor_ {rom_, &tile16_blockset_}
 
GfxGroupEditor gfx_group_editor_
 
PaletteEditor palette_editor_
 
gfx::SnesPalette palette_
 
gfx::Bitmap selected_tile_bmp_
 
gfx::Bitmap tile16_blockset_bmp_
 
gfx::Bitmap current_gfx_bmp_
 
gfx::Bitmap all_gfx_bmp
 
std::array< gfx::Bitmap, zelda3::kExpandedMapCount > maps_bmp_
 
gfx::BitmapTable current_graphics_set_
 
std::vector< gfx::Bitmap > sprite_previews_
 
zelda3::Overworld overworld_ {rom_}
 
bool map_tile_save_transaction_open_ = false
 
zelda3::OverworldBlockset refresh_blockset_
 
zelda3::OverworldEntranceTileTypes entrance_tiletypes_ = {}
 
zelda3::GameEntity * current_entity_ = nullptr
 
zelda3::GameEntity * dragged_entity_ = nullptr
 
std::optional< zelda3::OverworldItem > selected_item_identity_
 
std::optional< OverworldEntityEditingTarget > editing_target_
 
zelda3::OverworldEntrance edit_entrance_
 
zelda3::OverworldExit edit_exit_
 
zelda3::OverworldItem edit_item_
 
zelda3::Sprite edit_sprite_
 
std::optional< OverworldEntityInsertionRequest > pending_entity_insertion_
 
std::optional< OverworldContextTarget > item_insert_target_
 
bool item_insert_popup_requested_ = false
 
bool item_placement_armed_ = false
 
uint8_t armed_item_id_ = 0
 
std::string insert_error_
 
gui::Canvas ow_map_canvas_
 
gui::Canvas current_gfx_canvas_
 
gui::Canvas blockset_canvas_
 
std::unique_ptr< gui::TileSelectorWidget > blockset_selector_
 
gui::Canvas graphics_bin_canvas_
 
gui::Canvas properties_canvas_
 
gui::Canvas scratch_canvas_
 
std::unique_ptr< UsageStatisticsCard > usage_stats_card_
 
std::unique_ptr< DebugWindowCard > debug_window_card_
 
absl::Status status_
 
std::optional< OverworldUndoPoint > current_paint_operation_
 
int palette_listener_id_ = -1
 

Friends

class OverworldCanvasRenderer
 
class OverworldScratchTestPeer
 
class AuthoringSaveWorkflowTestPeer
 
class ProjectGraphicsImportSaveTestPeer
 
class ProjectGraphicsImportWorkflowTestPeer
 

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_
 
- Static Protected Attributes inherited from yaze::gfx::GfxContext
static std::unordered_map< uint8_t, gfx::Paletteset > palettesets_
 

Detailed Description

Main UI class for editing overworld maps in A Link to the Past.

The OverworldEditor orchestrates tile editing, entity management, and map property configuration. It coordinates between the data layer (zelda3::Overworld) and the UI components (canvas, panels, popups).

Key subsystems:

  • Tile16Editor: Individual tile editing with pending changes workflow
  • MapPropertiesSystem: Toolbar, context menus, property panels
  • Entity system: Entrances, exits, items, sprites
  • Canvas system: Main map display and tile selection
See also
README.md in this directory for architecture documentation
zelda3/overworld/overworld.h for the data layer
tile16_editor.h for tile editing details

Definition at line 139 of file overworld_editor.h.

Member Enumeration Documentation

◆ OverworldProperty

Enumerator
LW_AREA_GFX 
DW_AREA_GFX 
LW_AREA_PAL 
DW_AREA_PAL 
LW_SPR_GFX_PART1 
LW_SPR_GFX_PART2 
DW_SPR_GFX_PART1 
DW_SPR_GFX_PART2 
LW_SPR_PAL_PART1 
LW_SPR_PAL_PART2 
DW_SPR_PAL_PART1 
DW_SPR_PAL_PART2 

Definition at line 813 of file overworld_editor.h.

Constructor & Destructor Documentation

◆ OverworldEditor() [1/2]

yaze::editor::OverworldEditor::OverworldEditor ( Rom * rom)
inlineexplicit

◆ OverworldEditor() [2/2]

yaze::editor::OverworldEditor::OverworldEditor ( Rom * rom,
const EditorDependencies & deps )
inlineexplicit

Definition at line 156 of file overworld_editor.h.

References yaze::editor::Editor::dependencies_.

◆ ~OverworldEditor()

Member Function Documentation

◆ SetMainGraphicsUsageCallback()

void yaze::editor::OverworldEditor::SetMainGraphicsUsageCallback ( GfxGroupEditor::MainUsageCallback callback)
inline

Definition at line 161 of file overworld_editor.h.

References gfx_group_editor_, and yaze::editor::GfxGroupEditor::SetMainUsageCallback().

Here is the call graph for this function:

◆ SetRoomsetGraphicsUsageCallback()

void yaze::editor::OverworldEditor::SetRoomsetGraphicsUsageCallback ( GfxGroupEditor::RoomsetUsageCallback callback)
inline

Definition at line 165 of file overworld_editor.h.

References gfx_group_editor_, and yaze::editor::GfxGroupEditor::SetRoomsetUsageCallback().

Here is the call graph for this function:

◆ PrepareForSessionTeardown()

void yaze::editor::OverworldEditor::PrepareForSessionTeardown ( )
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 169 of file overworld_editor.h.

References yaze::editor::GfxGroupEditor::DetachRuntimeContext(), and gfx_group_editor_.

Here is the call graph for this function:

◆ SetDependencies()

void yaze::editor::OverworldEditor::SetDependencies ( const EditorDependencies & deps)
inlineoverridevirtual

◆ SetGameData()

◆ Initialize()

void yaze::editor::OverworldEditor::Initialize ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 198 of file overworld_editor.cc.

References ApplyOverworldPropertyEdit(), ApplyOverworldPropertyEdits(), canvas_renderer_, CenterOverworldView(), current_map_, debug_window_card_, yaze::editor::Editor::dependencies_, yaze::editor::LyraTerrainCanvas::DrawProperties(), entities_visible(), entity_mutation_service_, yaze::editor::LyraTerrainCanvas::entity_placement_active(), entity_renderer_, ForceRefreshGraphics(), game_state_, yaze::editor::ShortcutManager::GetDisplayString(), gfx_group_editor_, yaze::gui::Canvas::global_scale(), grid_visible(), InitCanvasNavigationManager(), InitInteractionCoordinator(), InitMapRefreshCoordinator(), InitMapTextureCoordinator(), InitTilePaintingManager(), JumpToMap(), yaze::editor::LyraTerrainCanvas::loaded(), lyra_canvas_, map_properties_system_, maps_bmp_, OpenMapPropertiesWindow(), overworld_, ow_map_canvas_, RefreshMapPalette(), RefreshMapProperties(), RefreshOverworldMap(), RefreshTile16Blockset(), RenameProjectResourceLabelWithUndo(), yaze::editor::EditorDependencies::renderer, renderer_, RequestItemInsertPopup(), ResetOverworldView(), rom_, SelectMapForEditing(), SetEditingMode(), SetEntityEditMode(), yaze::editor::GfxGroupEditor::SetHostSurfaceHint(), SetPreviewStoryState(), SetupCanvasAutomation(), yaze::editor::EditorDependencies::shortcut_manager, show_entities_, show_overlay_preview_, sidebar_, sprite_previews_, SwitchToWorld(), ToggleEntityVisibility(), ToggleGrid(), toolbar_, yaze::editor::Editor::type(), yaze::editor::Editor::undo_manager_, upgrade_system_, usage_stats_card_, ZoomIn(), ZoomOut(), and ZoomToFit().

Referenced by yaze::test::OverworldEditorTestSuite::RunEntityManipulationTest(), and yaze::test::OverworldEditorTestSuite::RunTilePlacementTest().

◆ Load()

absl::Status yaze::editor::OverworldEditor::Load ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 592 of file overworld_editor.cc.

References all_gfx_loaded_, ASSIGN_OR_RETURN, yaze::editor::Tile16Editor::BindDocument(), canvas_nav_, yaze::editor::UndoManager::Clear(), yaze::editor::Tile16Editor::ClearCollisionTypes(), yaze::gui::Canvas::ClearContextMenuItems(), yaze::util::ComputeSha1Hex(), current_gfx_bmp_, current_map_, current_paint_operation_, current_tile16_, yaze::Rom::data(), yaze::editor::Editor::dependencies_, yaze::editor::LyraTerrainCanvas::dirty(), entrance_tiletypes_, game_data_, yaze::gfx::Arena::Get(), yaze::gfx::PaletteManager::Get(), GetTile16ScopeLabel(), GetTile16UsageCount(), yaze::zelda3::Overworld::GetTile8CollisionTypes(), graphics_import_applied_, graphics_import_asset_, graphics_import_plan_, graphics_source_, graphics_source_open_, graphics_source_project_, HandleEntityInsertion(), HandleTile16Edit(), hovered_map_, yaze::editor::Tile16Editor::Initialize(), yaze::Rom::InspectLyraLayout(), yaze::Rom::is_loaded(), yaze::zelda3::Overworld::is_loaded(), yaze::zelda3::Overworld::is_lyra_preview(), IsProjectTerrainMap(), yaze::rom::kInvalid, yaze::rom::kValid, yaze::editor::LyraTerrainCanvas::Load(), yaze::zelda3::LoadEntranceTileTypes(), LoadGraphics(), LoadScratchPad(), LOG_DEBUG, LOG_WARN, lyra_canvas_, lyra_canvas_status_, lyra_loaded_rom_sha1_, map_properties_system_, map_refresh_, yaze::zelda3::Overworld::mutable_all_tiles_types(), yaze::zelda3::Overworld::mutable_tiles16(), OpenGraphicsForContextTile16(), OpenGraphicsForTile16Quadrant(), overworld_, ow_map_canvas_, palette_, palette_listener_id_, pending_entity_insertion_, pending_tile16_selection_after_gfx_, RefreshOverworldMap(), RefreshTile16Blockset(), yaze::gfx::Arena::RegisterPaletteListener(), yaze::editor::WorkspaceWindowManager::RegisterPanelAlias(), RequestTile16Selection(), RETURN_IF_ERROR, rom_, SampleContextTile16(), SelectMapForEditing(), yaze::editor::Tile16Editor::set_on_current_tile_changed(), yaze::editor::Tile16Editor::set_on_document_changed(), yaze::editor::Tile16Editor::set_palette(), yaze::editor::Tile16Editor::SetCollisionTypes(), yaze::editor::Tile16Editor::SetHoverDetailProvider(), yaze::editor::Tile16Editor::SetOpenGraphicsForQuadrant(), yaze::editor::Tile16Editor::SetRom(), yaze::Rom::size(), status_, TerrainProject(), tile16_blockset_bmp_, tile16_editor_, yaze::editor::Editor::undo_manager_, and yaze::editor::EditorDependencies::window_manager.

Referenced by yaze::test::OverworldEditorTestSuite::RunEntityManipulationTest(), yaze::test::OverworldEditorTestSuite::RunTilePlacementTest(), and Update().

◆ Update()

◆ Undo()

◆ Redo()

◆ Cut()

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

Implements yaze::editor::Editor.

Definition at line 194 of file overworld_editor.h.

◆ Copy()

◆ Paste()

absl::Status yaze::editor::OverworldEditor::Paste ( )
overridevirtual

◆ ApplyTile16Stencil()

absl::StatusOr< int > yaze::editor::OverworldEditor::ApplyTile16Stencil ( int map_id,
const std::vector< GuardedTileCell > & cells )

Select map_id and apply a guarded stencil as one undoable paint.

Definition at line 1474 of file overworld_editor.cc.

References current_map_, yaze::zelda3::Overworld::is_loaded(), is_lyra_preview(), IsProjectTerrainMap(), yaze::zelda3::kNumOverworldMaps, overworld_, SelectMapForEditing(), and tile_painting_.

Here is the call graph for this function:

◆ Find()

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

Implements yaze::editor::Editor.

Definition at line 200 of file overworld_editor.h.

◆ Save()

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

Implements yaze::editor::Editor.

Definition at line 1543 of file overworld_editor.cc.

References yaze::zelda3::ApplyOverworldSpriteSave(), ASSIGN_OR_RETURN, yaze::Rom::AttachLyraPrivateReservation(), yaze::Rom::CheckLayoutWritable(), yaze::ScopedRomTransaction::Commit(), yaze::zelda3::Overworld::CreateTile32Tilemap(), yaze::editor::Editor::dependencies_, yaze::zelda3::DetectOverworldRomProfile(), FinishScratchEdit(), FlushScratchPadIfDirty(), yaze::core::FeatureFlags::get(), yaze::zelda3::Overworld::GetProjectedWriteRanges(), graphics_source_, yaze::project::YazeProject::hack_manifest, yaze::core::FeatureFlags::Flags::Overworld::kSaveOverworldMaps, yaze::core::FeatureFlags::Flags::Overworld::kSaveOverworldSprites, yaze::core::HackManifest::loaded(), overworld(), yaze::core::FeatureFlags::Flags::overworld, overworld_, yaze::zelda3::Overworld::PrepareSpriteSave(), yaze::editor::EditorDependencies::project, RETURN_IF_ERROR, rom_, yaze::project::YazeProject::rom_metadata, yaze::zelda3::Overworld::SaveCustomOverworldData(), yaze::zelda3::Overworld::SaveEntrances(), yaze::zelda3::Overworld::SaveExits(), yaze::zelda3::Overworld::SaveItems(), yaze::zelda3::Overworld::SaveMap16Expanded(), yaze::zelda3::Overworld::SaveMap16Tiles(), yaze::zelda3::Overworld::SaveMap32Expanded(), yaze::zelda3::Overworld::SaveMap32Tiles(), yaze::zelda3::Overworld::SaveMapProperties(), yaze::zelda3::Overworld::SaveMusic(), yaze::zelda3::Overworld::SaveOverworldMaps(), yaze::editor::EditorDependencies::toast_manager, yaze::editor::ValidateHackManifestSaveConflicts(), yaze::zelda3::Overworld::ValidatePrivateNativeTerrainSave(), and yaze::project::RomMetadata::write_policy.

◆ BeginSaveTransaction()

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

Reimplemented from yaze::editor::Editor.

Definition at line 1517 of file overworld_editor.cc.

References map_tile_save_transaction_open_, overworld_, and yaze::zelda3::Overworld::RollbackSavedMapTiles().

Here is the call graph for this function:

◆ RollbackSaveTransaction()

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

Reimplemented from yaze::editor::Editor.

Definition at line 1527 of file overworld_editor.cc.

References map_tile_save_transaction_open_, overworld_, and yaze::zelda3::Overworld::RollbackSavedMapTiles().

Here is the call graph for this function:

◆ CommitSaveTransaction()

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

Reimplemented from yaze::editor::Editor.

Definition at line 1535 of file overworld_editor.cc.

References yaze::zelda3::Overworld::CommitSavedMapTiles(), map_tile_save_transaction_open_, and overworld_.

Here is the call graph for this function:

◆ Clear()

◆ HasPendingProjectDraftChanges()

bool yaze::editor::OverworldEditor::HasPendingProjectDraftChanges ( ) const
inline

Definition at line 206 of file overworld_editor.h.

References yaze::editor::LyraTerrainCanvas::dirty(), graphics_source_, lyra_canvas_, and scratch_space_dirty_.

Here is the call graph for this function:

◆ HasUnpublishedProjectGraphics()

bool yaze::editor::OverworldEditor::HasUnpublishedProjectGraphics ( ) const
inline

Definition at line 210 of file overworld_editor.h.

References graphics_source_.

◆ OpenProjectGraphicsSource()

◆ PreviewProjectGraphicsImport()

◆ ApplyProjectGraphicsImport()

◆ PlaceProjectGraphicsImport()

absl::Status yaze::editor::OverworldEditor::PlaceProjectGraphicsImport ( int world_x,
int world_y )

◆ PublishProjectGraphicsSource()

absl::Status yaze::editor::OverworldEditor::PublishProjectGraphicsSource ( )

Definition at line 104 of file project_graphics_import_controller.cc.

References ASSIGN_OR_RETURN, graphics_source_, and ReloadProjectGraphics().

Here is the call graph for this function:

◆ SetProjectContextProvider()

void yaze::editor::OverworldEditor::SetProjectContextProvider ( std::function< project::YazeProject *()> provider)
inline

Definition at line 220 of file overworld_editor.h.

References project_context_provider_.

◆ PrepareProjectSave()

◆ ProjectSaveCommitted()

void yaze::editor::OverworldEditor::ProjectSaveCommitted ( )
inline

Definition at line 225 of file overworld_editor.h.

References lyra_canvas_, and yaze::editor::LyraTerrainCanvas::ProjectSaveCommitted().

Here is the call graph for this function:

◆ ContributeStatus()

◆ DrawEditorMenu()

◆ DrawEditMenuItems()

void yaze::editor::OverworldEditor::DrawEditMenuItems ( )
overridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 2619 of file overworld_editor.cc.

References yaze::editor::Tile16Editor::DrawEditMenuItems(), tile16_editor_, and Tile16MenuEnabled().

Here is the call graph for this function:

◆ BuildContextSnapshot()

EditorContextSnapshot yaze::editor::OverworldEditor::BuildContextSnapshot ( ) const
overridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 2700 of file overworld_editor.cc.

References yaze::editor::EditorContextSnapshot::actions, yaze::zelda3::Overworld::all_items(), yaze::editor::AppendResolvedGraphicsContext(), yaze::editor::OverworldMapMetadata::area_gfx_label, yaze::editor::OverworldMapMetadata::area_palette_label, yaze::editor::OverworldMapMetadata::area_size_label, yaze::editor::BuildOverworldMapMetadata(), yaze::editor::EditorContextSnapshot::capabilities, yaze::editor::EditorContextSnapshot::category, yaze::editor::EditorContextSnapshot::counts, current_map_, current_map_lock_, current_parent_, current_tile16_, yaze::editor::Editor::dependencies_, yaze::zelda3::DescribeOverworldGraphicsContext(), yaze::editor::EditorContextSnapshot::diagnostics, yaze::Rom::dirty(), yaze::zelda3::Overworld::entrances(), yaze::zelda3::Overworld::exits(), game_state_, yaze::editor::EditorContextSnapshot::has_pending_changes, yaze::zelda3::Overworld::is_loaded(), yaze::editor::kInfo, yaze::editor::OverworldMapMetadata::map_id_label, yaze::editor::OverworldMapMetadata::map_title, yaze::editor::EditorContextSnapshot::metadata, yaze::project::YazeProject::name, overworld_, yaze::zelda3::Overworld::overworld_map(), yaze::editor::OverworldMapMetadata::parent_label, yaze::editor::EditorContextSnapshot::pending_label, yaze::editor::EditorDependencies::project, yaze::zelda3::GraphicsContextIdentity::project_name, rom_, selected_tile16_ids_, yaze::editor::EditorContextSnapshot::semantic_owner, yaze::zelda3::Overworld::sprites(), yaze::editor::EditorContextSnapshot::subtitle, yaze::editor::EditorContextSnapshot::title, and yaze::editor::OverworldMapMetadata::world_label.

◆ overworld()

zelda3::Overworld & yaze::editor::OverworldEditor::overworld ( )
inline

Access the underlying Overworld data.

Definition at line 232 of file overworld_editor.h.

References overworld_.

Referenced by LoadGraphics(), yaze::test::OverworldEditorTestSuite::RunEntityManipulationTest(), and Save().

◆ AreaScreenBitmap()

const gfx::Bitmap * yaze::editor::OverworldEditor::AreaScreenBitmap ( int map_id)

Definition at line 2064 of file overworld_editor.cc.

References EnsureMapTexture(), yaze::gfx::Bitmap::is_active(), yaze::zelda3::kNumOverworldMaps, maps_bmp_, and yaze::gfx::Bitmap::texture().

Here is the call graph for this function:

◆ jump_to_tab()

int yaze::editor::OverworldEditor::jump_to_tab ( )
inline

Definition at line 238 of file overworld_editor.h.

References jump_to_tab_.

◆ IsRomLoaded()

bool yaze::editor::OverworldEditor::IsRomLoaded ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 248 of file overworld_editor.h.

References yaze::Rom::is_loaded(), and rom_.

Here is the call graph for this function:

◆ GetRomStatus()

std::string yaze::editor::OverworldEditor::GetRomStatus ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 249 of file overworld_editor.h.

References yaze::Rom::is_loaded(), rom_, and yaze::Rom::title().

Here is the call graph for this function:

◆ rom()

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

Definition at line 257 of file overworld_editor.h.

References rom_.

Referenced by OverworldEditor().

◆ EditProjectMapAuthoring()

absl::Status yaze::editor::OverworldEditor::EditProjectMapAuthoring ( core::LyraAuthoringState after)
inline

Definition at line 258 of file overworld_editor.h.

References yaze::editor::LyraTerrainCanvas::EditAuthoring(), lyra_canvas_, overworld_, and yaze::editor::Editor::undo_manager_.

Here is the call graph for this function:

◆ CreateLyraTerrain()

◆ OpenLyraTerrain()

◆ SaveProjectTerrainAs()

absl::Status yaze::editor::OverworldEditor::SaveProjectTerrainAs ( project::YazeProject * project,
const std::string & project_path )

◆ DisplayedMapCount()

◆ IsProjectTerrainMap()

◆ is_lyra_preview()

◆ lyra_a0_terrain_writable()

bool yaze::editor::OverworldEditor::lyra_a0_terrain_writable ( ) const
inline

◆ PaintLyraA0Terrain()

◆ SaveLyraA0TerrainAs()

◆ CheckRomReplacement()

◆ overlay_preview_enabled()

bool yaze::editor::OverworldEditor::overlay_preview_enabled ( ) const
inline

Definition at line 283 of file overworld_editor.h.

References show_overlay_preview_.

◆ NormalizeMapSelection()

bool yaze::editor::OverworldEditor::NormalizeMapSelection ( int & current_world,
int & current_map,
int map_count = zelda3::kNumOverworldMaps )
static

Clamp a possibly stale world/map selection back into a valid overworld range.

Definition at line 181 of file overworld_editor.cc.

References yaze::zelda3::kExpandedMapCount.

Referenced by NormalizeCurrentSelectionState().

◆ set_current_map()

◆ SetCurrentMap()

void yaze::editor::OverworldEditor::SetCurrentMap ( int map_id)
inline

Definition at line 310 of file overworld_editor.h.

References set_current_map().

Here is the call graph for this function:

◆ SelectMapForEditing()

◆ set_current_tile16()

void yaze::editor::OverworldEditor::set_current_tile16 ( int tile_id)
inline

Definition at line 313 of file overworld_editor.h.

References current_tile16_.

◆ current_tile16_id()

int yaze::editor::OverworldEditor::current_tile16_id ( ) const
inline

Definition at line 314 of file overworld_editor.h.

References current_tile16_.

◆ OpenGraphicsForTile16Quadrant()

absl::Status yaze::editor::OverworldEditor::OpenGraphicsForTile16Quadrant ( int tile16_id,
int quadrant )

◆ OpenGraphicsForContextTile16()

◆ tile_painting()

const TilePaintingManager * yaze::editor::OverworldEditor::tile_painting ( ) const
inline

Definition at line 322 of file overworld_editor.h.

References tile_painting_.

◆ map_bitmap()

const gfx::Bitmap & yaze::editor::OverworldEditor::map_bitmap ( int map_id) const
inline

Definition at line 325 of file overworld_editor.h.

References yaze::gfx::Bitmap::at(), and maps_bmp_.

Here is the call graph for this function:

◆ map_pinned()

bool yaze::editor::OverworldEditor::map_pinned ( ) const
inline

Definition at line 328 of file overworld_editor.h.

References current_map_lock_.

◆ current_map_id()

int yaze::editor::OverworldEditor::current_map_id ( ) const
inline

Definition at line 329 of file overworld_editor.h.

References current_map_.

◆ current_world_id()

int yaze::editor::OverworldEditor::current_world_id ( ) const
inline

Definition at line 330 of file overworld_editor.h.

References current_world_.

◆ hovered_map_id()

int yaze::editor::OverworldEditor::hovered_map_id ( ) const
inline

Definition at line 331 of file overworld_editor.h.

References hovered_map_.

◆ LoadGraphics()

absl::Status yaze::editor::OverworldEditor::LoadGraphics ( )

Load the Bitmap objects for each OverworldMap.

Calls the Overworld class to load the image data and palettes from the Rom, then renders the area graphics and tile16 blockset Bitmap objects before assembling the OverworldMap Bitmap objects.

Definition at line 1938 of file overworld_editor.cc.

References yaze::gfx::Tilemap::atlas, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, yaze::gfx::CreateTilemap(), yaze::zelda3::Overworld::current_area_palette(), current_gfx_bmp_, yaze::zelda3::Overworld::current_graphics(), current_map_, current_parent_, current_world_, yaze::zelda3::Overworld::EnsureMapBuilt(), game_state_, yaze::gfx::Arena::Get(), yaze::core::FeatureFlags::get(), yaze::Rom::InspectLyraLayout(), yaze::gfx::Bitmap::is_active(), yaze::zelda3::kNumTile16Individual, yaze::editor::kOverworldMapSize, yaze::editor::kTile16Size, yaze::rom::kValid, yaze::zelda3::Overworld::Load(), yaze::zelda3::Overworld::LoadLyraTerrainPreview(), LoadSpriteGraphics(), LOG_DEBUG, map_blockset_loaded_, map_texture_, overworld(), overworld_, yaze::zelda3::Overworld::overworld_map(), palette_, yaze::rom::LyraLayoutInspection::presence, yaze::gfx::Arena::QueueTextureCommand(), renderer_, RETURN_IF_ERROR, rom_, yaze::zelda3::Overworld::set_current_map(), yaze::zelda3::Overworld::set_current_world(), yaze::zelda3::Overworld::set_game_state(), yaze::gfx::Bitmap::SetPalette(), show_overlay_preview_, yaze::gfx::SnesPalette::size(), yaze::gfx::Bitmap::surface(), SyncProjectGraphicsPreview(), tile16_blockset_, tile16_blockset_bmp_, and yaze::zelda3::Overworld::tile16_blockset_data().

Referenced by Load().

◆ SyncProjectGraphicsPreview()

absl::Status yaze::editor::OverworldEditor::SyncProjectGraphicsPreview ( bool force = false)

◆ SetCurrentEntity()

void yaze::editor::OverworldEditor::SetCurrentEntity ( zelda3::GameEntity * entity)

Set the currently active entity for editing.

Definition at line 559 of file overworld_editor.cc.

References current_entity_, yaze::zelda3::GameEntity::entity_type_, yaze::zelda3::GameEntity::kItem, and selected_item_identity_.

Referenced by SelectMapForEditing(), and SetPreviewStoryState().

◆ current_entity()

zelda3::GameEntity * yaze::editor::OverworldEditor::current_entity ( ) const
inline

Definition at line 353 of file overworld_editor.h.

References current_entity_.

◆ NotifyEntityModified()

void yaze::editor::OverworldEditor::NotifyEntityModified ( zelda3::GameEntity * entity)

Notify that an entity has been modified, marking ROM as dirty.

Definition at line 572 of file overworld_editor.cc.

References rom_, and yaze::Rom::set_dirty().

Referenced by ApplyEntranceEdit(), and ApplyExitEdit().

Here is the call graph for this function:

◆ ApplyEntranceEdit()

◆ ApplyExitEdit()

absl::Status yaze::editor::OverworldEditor::ApplyExitEdit ( zelda3::OverworldExit * target,
const zelda3::OverworldExit & draft )

◆ OpenEntityEditor()

void yaze::editor::OverworldEditor::OpenEntityEditor ( zelda3::GameEntity * entity)

◆ RequestJumpToRoom()

void yaze::editor::OverworldEditor::RequestJumpToRoom ( int room_id)
inline

Trigger a jump to a dungeon room.

Definition at line 364 of file overworld_editor.h.

References jump_to_tab_.

◆ RequestJumpToEntrance()

void yaze::editor::OverworldEditor::RequestJumpToEntrance ( int entrance_id)
inline

Trigger a jump to a dungeon entrance.

Definition at line 367 of file overworld_editor.h.

References jump_to_entrance_.

Referenced by InitInteractionCoordinator().

◆ entity_mutation_service()

EntityMutationService * yaze::editor::OverworldEditor::entity_mutation_service ( )
inline

Access the entity mutation service.

Definition at line 372 of file overworld_editor.h.

References entity_mutation_service_.

◆ edit_entrance()

zelda3::OverworldEntrance & yaze::editor::OverworldEditor::edit_entrance ( )
inline

Definition at line 376 of file overworld_editor.h.

References edit_entrance_.

◆ edit_exit()

zelda3::OverworldExit & yaze::editor::OverworldEditor::edit_exit ( )
inline

Definition at line 377 of file overworld_editor.h.

References edit_exit_.

◆ edit_item()

zelda3::OverworldItem & yaze::editor::OverworldEditor::edit_item ( )
inline

Definition at line 378 of file overworld_editor.h.

References edit_item_.

◆ edit_sprite()

zelda3::Sprite & yaze::editor::OverworldEditor::edit_sprite ( )
inline

Definition at line 379 of file overworld_editor.h.

References edit_sprite_.

◆ TakePendingEntityInsertion()

std::optional< OverworldEntityInsertionRequest > yaze::editor::OverworldEditor::TakePendingEntityInsertion ( )
inline

Definition at line 381 of file overworld_editor.h.

References pending_entity_insertion_.

◆ insert_error()

std::string & yaze::editor::OverworldEditor::insert_error ( )
inline

Definition at line 386 of file overworld_editor.h.

References insert_error_.

◆ ow_map_canvas()

gui::Canvas & yaze::editor::OverworldEditor::ow_map_canvas ( )
inline

Definition at line 388 of file overworld_editor.h.

References ow_map_canvas_.

◆ game_state()

int yaze::editor::OverworldEditor::game_state ( ) const
inline

Definition at line 389 of file overworld_editor.h.

References game_state_.

◆ SetPreviewStoryState()

◆ SetSelectionBrush()

◆ ClearSelectionBrush()

void yaze::editor::OverworldEditor::ClearSelectionBrush ( )

Definition at line 2815 of file overworld_editor.cc.

References tile_painting_.

Referenced by DrawScratchSpace().

◆ selection_brush()

const TileBrush * yaze::editor::OverworldEditor::selection_brush ( ) const

Definition at line 2821 of file overworld_editor.cc.

References tile_painting_.

Referenced by DrawEditorMenu(), and DrawScratchSpace().

◆ GetTile16UsageCount()

int yaze::editor::OverworldEditor::GetTile16UsageCount ( int tile_id) const

Definition at line 2825 of file overworld_editor.cc.

References canvas_renderer_.

Referenced by DrawScratchSpace(), and Load().

◆ GetTile16ScopeLabel()

std::string yaze::editor::OverworldEditor::GetTile16ScopeLabel ( ) const

Definition at line 2829 of file overworld_editor.cc.

References canvas_renderer_.

Referenced by DrawScratchSpace(), and Load().

◆ HandleEntityInsertion()

void yaze::editor::OverworldEditor::HandleEntityInsertion ( const std::string & entity_type,
const OverworldContextTarget & target )

Handle entity insertion from context menu.

Parameters
entity_typeType: "entrance", "hole", "exit", "item", "sprite"

Definition at line 74 of file overworld_context_actions.cc.

References pending_entity_insertion_, RequestItemInsertPopup(), and yaze::editor::OverworldContextTarget::valid().

Referenced by Load().

Here is the call graph for this function:

◆ RequestItemInsertPopup()

void yaze::editor::OverworldEditor::RequestItemInsertPopup ( const std::optional< OverworldContextTarget > & target)

Insert Item opens the item catalog. A context-menu target places the chosen item there; otherwise the next map click places it.

Definition at line 127 of file overworld_context_actions.cc.

References item_insert_popup_requested_, and item_insert_target_.

Referenced by HandleEntityInsertion(), and Initialize().

◆ DrawItemInsertPopup()

void yaze::editor::OverworldEditor::DrawItemInsertPopup ( )

◆ TryPlaceArmedItem()

◆ HandleTile16Edit()

void yaze::editor::OverworldEditor::HandleTile16Edit ( const OverworldContextTarget & target)

◆ SampleContextTile16()

◆ SelectItemByIdentity()

bool yaze::editor::OverworldEditor::SelectItemByIdentity ( const zelda3::OverworldItem & item_identity)

◆ ClearSelectedItem()

◆ selected_item_identity()

std::optional< zelda3::OverworldItem > yaze::editor::OverworldEditor::selected_item_identity ( ) const
inline

Get current selected item identity snapshot.

Definition at line 429 of file overworld_editor.h.

References selected_item_identity_.

◆ GetSelectedItem() [1/2]

zelda3::OverworldItem * yaze::editor::OverworldEditor::GetSelectedItem ( )

Resolve selected item identity to the current live item pointer.

Definition at line 1198 of file overworld_editor.cc.

References ClearSelectedItem(), current_entity_, yaze::editor::FindItemByIdentity(), GetWorkbench(), overworld_, and selected_item_identity_.

Referenced by DeleteSelectedItem(), DuplicateSelectedItem(), GetSelectedItem(), InitInteractionCoordinator(), and NudgeSelectedItem().

Here is the call graph for this function:

◆ GetSelectedItem() [2/2]

const zelda3::OverworldItem * yaze::editor::OverworldEditor::GetSelectedItem ( ) const

Definition at line 1216 of file overworld_editor.cc.

References GetSelectedItem().

Here is the call graph for this function:

◆ DuplicateSelectedItem()

◆ NudgeSelectedItem()

◆ DeleteSelectedItem()

◆ DeleteItemByIdentity()

bool yaze::editor::OverworldEditor::DeleteItemByIdentity ( const zelda3::OverworldItem & item_identity)

◆ ToggleBrushTool()

void yaze::editor::OverworldEditor::ToggleBrushTool ( )
inline

Definition at line 451 of file overworld_editor.h.

References tile_painting_.

◆ ActivateFillTool()

void yaze::editor::OverworldEditor::ActivateFillTool ( )
inline

Definition at line 455 of file overworld_editor.h.

References tile_painting_.

◆ CycleTileSelection()

void yaze::editor::OverworldEditor::CycleTileSelection ( int delta)

Definition at line 2341 of file overworld_editor.cc.

References current_tile16_, yaze::zelda3::kNumTile16Individual, and RequestTile16Selection().

Here is the call graph for this function:

◆ ToggleMapLock()

void yaze::editor::OverworldEditor::ToggleMapLock ( )

Definition at line 2347 of file overworld_editor.cc.

References current_map_lock_.

◆ ToggleCanvasFullscreen()

void yaze::editor::OverworldEditor::ToggleCanvasFullscreen ( )

Definition at line 2351 of file overworld_editor.cc.

References overworld_canvas_fullscreen_.

◆ ToggleTile16EditorWindow()

◆ Tile16MenuEnabled()

bool yaze::editor::OverworldEditor::Tile16MenuEnabled ( ) const

◆ ToggleItemListWindow()

◆ SetEditingMode()

void yaze::editor::OverworldEditor::SetEditingMode ( EditingMode mode)

◆ SelectAdjacentMap()

void yaze::editor::OverworldEditor::SelectAdjacentMap ( int dx,
int dy )

Alt+Arrow: select the neighbouring screen in the world grid and center it.

Definition at line 2373 of file overworld_editor.cc.

References canvas_nav_, current_map_, current_world_, DisplayedMapCount(), and SelectMapForEditing().

Here is the call graph for this function:

◆ JumpToMap()

void yaze::editor::OverworldEditor::JumpToMap ( int map_id)

Select map_id (switching world if needed) and center it; the context menu's Related Maps entries.

Definition at line 2395 of file overworld_editor.cc.

References canvas_nav_, current_world_, DisplayedMapCount(), yaze::zelda3::Overworld::is_loaded(), overworld_, SelectMapForEditing(), set_current_map(), and SwitchToWorld().

Referenced by yaze::editor::OverworldCanvasRenderer::DrawOverworldCanvas(), Initialize(), and LocateOverworldTile().

◆ LocateOverworldTile()

void yaze::editor::OverworldEditor::LocateOverworldTile ( int map_id,
int world_x,
int world_y )

Definition at line 2415 of file overworld_editor.cc.

References canvas_nav_, and JumpToMap().

Here is the call graph for this function:

◆ SwitchToWorld()

◆ ZoomIn()

void yaze::editor::OverworldEditor::ZoomIn ( )

Definition at line 11 of file overworld_navigation.cc.

References canvas_nav_.

Referenced by Initialize().

◆ ZoomOut()

void yaze::editor::OverworldEditor::ZoomOut ( )

Definition at line 16 of file overworld_navigation.cc.

References canvas_nav_.

Referenced by Initialize().

◆ ZoomToFit()

void yaze::editor::OverworldEditor::ZoomToFit ( )

Definition at line 21 of file overworld_navigation.cc.

References canvas_nav_.

Referenced by Initialize().

◆ ResetOverworldView()

void yaze::editor::OverworldEditor::ResetOverworldView ( )

Definition at line 26 of file overworld_navigation.cc.

References canvas_nav_.

Referenced by Initialize().

◆ CenterOverworldView()

void yaze::editor::OverworldEditor::CenterOverworldView ( )

Definition at line 31 of file overworld_navigation.cc.

References canvas_nav_.

Referenced by Initialize().

◆ SetEntityEditMode()

void yaze::editor::OverworldEditor::SetEntityEditMode ( EntityEditMode mode)

Entity focus (entrances/exits/items/sprites); NONE = all entities.

Definition at line 2437 of file overworld_editor.cc.

References current_map_, current_mode, entity_edit_mode_, is_lyra_preview(), IsProjectTerrainMap(), yaze::gui::kEntityManipulation, yaze::editor::MOUSE, yaze::editor::NONE, ow_map_canvas_, and yaze::gui::Canvas::SetUsageMode().

Referenced by DrawEditorMenu(), DrawItemInsertPopup(), Initialize(), and InitInteractionCoordinator().

Here is the call graph for this function:

◆ ToggleEntityVisibility()

void yaze::editor::OverworldEditor::ToggleEntityVisibility ( )
inline

Definition at line 485 of file overworld_editor.h.

References show_entities_.

Referenced by Initialize().

◆ entities_visible()

bool yaze::editor::OverworldEditor::entities_visible ( ) const
inline

Definition at line 486 of file overworld_editor.h.

References show_entities_.

Referenced by Initialize().

◆ ToggleGrid()

void yaze::editor::OverworldEditor::ToggleGrid ( )

Definition at line 2449 of file overworld_editor.cc.

References yaze::gui::Canvas::ApplyConfigSnapshot(), yaze::gui::CanvasConfig::enable_grid, yaze::gui::Canvas::GetConfig(), and ow_map_canvas_.

Referenced by Initialize().

Here is the call graph for this function:

◆ grid_visible()

bool yaze::editor::OverworldEditor::grid_visible ( ) const

Definition at line 2455 of file overworld_editor.cc.

References yaze::gui::CanvasConfig::enable_grid, yaze::gui::Canvas::GetConfig(), and ow_map_canvas_.

Referenced by Initialize().

Here is the call graph for this function:

◆ OpenMapPropertiesWindow()

void yaze::editor::OverworldEditor::OpenMapPropertiesWindow ( )

Open and focus the docked Map Properties window (double-click a map, context menu "Map > Map Properties").

Definition at line 2459 of file overworld_editor.cc.

References yaze::editor::Editor::dependencies_, yaze::editor::WorkspaceWindowManager::GetActiveSessionId(), yaze::editor::OverworldPanelIds::kMapProperties, and yaze::editor::EditorDependencies::window_manager.

Referenced by DrawEditorMenu(), InitCanvasNavigationManager(), and Initialize().

Here is the call graph for this function:

◆ RequestTile16Selection()

void yaze::editor::OverworldEditor::RequestTile16Selection ( int tile_id)

◆ PickTile16FromHoveredCanvas()

bool yaze::editor::OverworldEditor::PickTile16FromHoveredCanvas ( )

Definition at line 1427 of file overworld_editor.cc.

References tile_painting_.

Referenced by InitCanvasNavigationManager(), and InitInteractionCoordinator().

◆ DrawAreaGraphics()

absl::Status yaze::editor::OverworldEditor::DrawAreaGraphics ( )
inline

Definition at line 506 of file overworld_editor.h.

References canvas_renderer_, is_lyra_preview(), NormalizeCurrentSelectionState(), OpenProjectGraphicsSource(), and status_.

Here is the call graph for this function:

◆ DrawTile16Selector()

absl::Status yaze::editor::OverworldEditor::DrawTile16Selector ( )
inline

Definition at line 518 of file overworld_editor.h.

References canvas_renderer_, and is_lyra_preview().

Here is the call graph for this function:

◆ DrawMapProperties()

void yaze::editor::OverworldEditor::DrawMapProperties ( )
inline

Definition at line 527 of file overworld_editor.h.

References canvas_renderer_, is_lyra_preview(), and NormalizeCurrentSelectionState().

Here is the call graph for this function:

◆ InvalidateGraphicsCache()

void yaze::editor::OverworldEditor::InvalidateGraphicsCache ( int map_id = -1)
inline

Invalidate cached graphics for a specific map or all maps.

Parameters
map_idThe map to invalidate (-1 to invalidate all maps) Call this when palette or graphics settings change.

Definition at line 540 of file overworld_editor.h.

References map_refresh_.

◆ DrawScratchSpace()

absl::Status yaze::editor::OverworldEditor::DrawScratchSpace ( )

Definition at line 207 of file scratch_space.cc.

References yaze::editor::ScratchWorkspace::AddPage(), yaze::gfx::Tilemap::atlas, yaze::gui::BeginCanvas(), yaze::gui::BeginChildWithScrollbar(), BeginScratchEdit(), yaze::gui::CanvasFrameOptions::canvas_size, ClearScratchSpace(), ClearSelectionBrush(), yaze::editor::ScratchWorkspace::current(), current_map_, yaze::editor::ScratchWorkspace::DeletePage(), yaze::gui::AdaptiveSheetLayout::display_scale, yaze::gui::CanvasFrameOptions::draw_context_menu, yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::CanvasFrameOptions::draw_overlay, yaze::gui::Canvas::DrawBitmap(), DrawScratchSpaceEdits(), yaze::editor::DrawSheetScaleControl(), yaze::gui::EndCanvas(), FinishScratchEdit(), FlushScratchPadIfDirty(), GetTile16ScopeLabel(), GetTile16UsageCount(), yaze::editor::TileBrush::height, yaze::gfx::Bitmap::height(), ICON_MD_ADD, ICON_MD_CHEVRON_LEFT, ICON_MD_CHEVRON_RIGHT, ICON_MD_FILE_DOWNLOAD, ICON_MD_MORE_VERT, yaze::gfx::Bitmap::is_active(), is_lyra_preview(), yaze::editor::ScratchWorkspace::kMaxPages, LoadScratchPad(), LoadScratchToSelection(), map_blockset_loaded_, MarkScratchSpaceDirty(), yaze::editor::ScratchWorkspaceState::pages, RebuildScratchBitmapFromTileData(), yaze::editor::ScratchWorkspace::Rename(), yaze::gui::CanvasFrameOptions::render_popups, RequestTile16Selection(), yaze::editor::ScratchWorkspace::Resize(), yaze::gui::ResolveAdaptiveSheetLayout(), SaveCurrentSelectionToScratch(), scratch_action_status_, scratch_bitmap_, scratch_canvas_, scratch_drag_start_, scratch_load_status_, scratch_name_buffer_, scratch_name_id_, scratch_paint_gesture_owned_, scratch_preview_map_, scratch_preview_revision_, scratch_resize_dimensions_, scratch_resize_id_, scratch_save_status_, scratch_scale_mode_, scratch_select_active_, scratch_select_max_, scratch_select_min_, scratch_selecting_, scratch_workspace_, yaze::gui::Canvas::scrolling(), yaze::editor::ScratchWorkspace::Select(), yaze::editor::ScratchWorkspaceState::selected_id, selection_brush(), yaze::gui::Canvas::SetGlobalScale(), SetSelectionBrush(), yaze::editor::ScratchWorkspace::Stamp(), yaze::editor::ScratchWorkspace::state(), yaze::gfx::Bitmap::texture(), tile16_blockset_, yaze::editor::TileBrush::tile_ids, yaze::gui::CanvasFrameOptions::use_child_window, yaze::editor::TileBrush::width, yaze::gfx::Bitmap::width(), and yaze::gui::Canvas::zero_point().

◆ DrawTile8Selector()

void yaze::editor::OverworldEditor::DrawTile8Selector ( )
inline

Definition at line 545 of file overworld_editor.h.

References canvas_renderer_, and is_lyra_preview().

Here is the call graph for this function:

◆ UpdateGfxGroupEditor()

absl::Status yaze::editor::OverworldEditor::UpdateGfxGroupEditor ( )

◆ DrawV3Settings()

void yaze::editor::OverworldEditor::DrawV3Settings ( )
inline

Definition at line 554 of file overworld_editor.h.

References canvas_renderer_, is_lyra_preview(), and NormalizeCurrentSelectionState().

Here is the call graph for this function:

◆ usage_stats_card()

UsageStatisticsCard * yaze::editor::OverworldEditor::usage_stats_card ( )
inline

Access usage statistics card for panel.

Definition at line 565 of file overworld_editor.h.

References usage_stats_card_.

◆ debug_window_card()

DebugWindowCard * yaze::editor::OverworldEditor::debug_window_card ( )
inline

Access debug window card for panel.

Definition at line 568 of file overworld_editor.h.

References debug_window_card_.

◆ tile16_editor() [1/2]

Tile16Editor & yaze::editor::OverworldEditor::tile16_editor ( )
inline

Access the Tile16 Editor for panel integration.

Definition at line 571 of file overworld_editor.h.

References tile16_editor_.

◆ tile16_editor() [2/2]

const Tile16Editor & yaze::editor::OverworldEditor::tile16_editor ( ) const
inline

Definition at line 572 of file overworld_editor.h.

References tile16_editor_.

◆ tile16_blockset()

const gfx::Tilemap & yaze::editor::OverworldEditor::tile16_blockset ( ) const
inline

Read-only access for integration tests that verify refresh output.

Definition at line 575 of file overworld_editor.h.

References tile16_blockset_.

◆ current_gfx_bmp_for_testing()

const gfx::Bitmap & yaze::editor::OverworldEditor::current_gfx_bmp_for_testing ( ) const
inline

Definition at line 576 of file overworld_editor.h.

References current_gfx_bmp_.

◆ GetWorkbench()

OverworldEntityWorkbench * yaze::editor::OverworldEditor::GetWorkbench ( )

◆ DrawOverworldCanvas()

void yaze::editor::OverworldEditor::DrawOverworldCanvas ( )

Draw the main overworld canvas.

Definition at line 960 of file overworld_editor.cc.

References canvas_renderer_, and NormalizeCurrentSelectionState().

Here is the call graph for this function:

◆ FocusLyraTerrain()

void yaze::editor::OverworldEditor::FocusLyraTerrain ( )
private

Definition at line 1007 of file overworld_editor.cc.

References canvas_nav_, hovered_map_, yaze::core::LyraTerrainDocument::kFirstMap, and SelectMapForEditing().

Referenced by CreateLyraTerrain(), and OpenLyraTerrain().

Here is the call graph for this function:

◆ TerrainProject()

◆ DrawProjectGraphicsSource()

◆ DrawProjectGraphicsImport()

◆ ProjectGraphicsPath()

std::string yaze::editor::OverworldEditor::ProjectGraphicsPath ( ) const
private

Definition at line 63 of file project_graphics_import_controller.cc.

References TerrainProject().

Referenced by DrawProjectGraphicsSource(), OpenProjectGraphicsSource(), RefreshPendingProjectGraphics(), and SyncProjectGraphicsPreview().

Here is the call graph for this function:

◆ ReloadProjectGraphics()

absl::Status yaze::editor::OverworldEditor::ReloadProjectGraphics ( )
private

Definition at line 100 of file project_graphics_import_controller.cc.

References SyncProjectGraphicsPreview().

Referenced by DrawProjectGraphicsSource(), and PublishProjectGraphicsSource().

Here is the call graph for this function:

◆ RefreshPendingProjectGraphics()

◆ GraphicsImportContext()

◆ NormalizeCurrentSelectionState()

◆ InitMapRefreshCoordinator()

◆ InitMapTextureCoordinator()

◆ InitInteractionCoordinator()

◆ RefreshChildMap()

void yaze::editor::OverworldEditor::RefreshChildMap ( int map_index)
inlineprivate

Definition at line 645 of file overworld_editor.h.

References IsProjectTerrainMap(), and map_refresh_.

Here is the call graph for this function:

◆ RefreshOverworldMap()

void yaze::editor::OverworldEditor::RefreshOverworldMap ( )
inlineprivate

Definition at line 649 of file overworld_editor.h.

References current_map_, IsProjectTerrainMap(), and map_refresh_.

Referenced by InitCanvasNavigationManager(), Initialize(), Load(), RestoreItemUndoSnapshot(), and SetPreviewStoryState().

Here is the call graph for this function:

◆ RefreshOverworldMapOnDemand()

void yaze::editor::OverworldEditor::RefreshOverworldMapOnDemand ( int map_index)
inlineprivate

Definition at line 653 of file overworld_editor.h.

References IsProjectTerrainMap(), and map_refresh_.

Referenced by InitMapTextureCoordinator(), InitTilePaintingManager(), RefreshMapsForSheetEdits(), RefreshPendingProjectGraphics(), and SwitchToWorld().

Here is the call graph for this function:

◆ RefreshChildMapOnDemand()

void yaze::editor::OverworldEditor::RefreshChildMapOnDemand ( int map_index)
inlineprivate

Definition at line 657 of file overworld_editor.h.

References IsProjectTerrainMap(), and map_refresh_.

Here is the call graph for this function:

◆ RefreshMapPalette()

absl::Status yaze::editor::OverworldEditor::RefreshMapPalette ( int map_id = -1)
inlineprivate

Definition at line 661 of file overworld_editor.h.

References current_map_, IsProjectTerrainMap(), and map_refresh_.

Referenced by Initialize().

Here is the call graph for this function:

◆ RefreshMapProperties()

void yaze::editor::OverworldEditor::RefreshMapProperties ( int map_id = -1)
inlineprivate

Definition at line 669 of file overworld_editor.h.

References current_map_, IsProjectTerrainMap(), and map_refresh_.

Referenced by Initialize(), and SelectMapForEditing().

Here is the call graph for this function:

◆ RefreshTile16Blockset()

absl::Status yaze::editor::OverworldEditor::RefreshTile16Blockset ( )
inlineprivate

◆ UpdateBlocksetWithPendingTileChanges()

void yaze::editor::OverworldEditor::UpdateBlocksetWithPendingTileChanges ( )
inlineprivate

Definition at line 682 of file overworld_editor.h.

References current_map_, IsProjectTerrainMap(), and map_refresh_.

Here is the call graph for this function:

◆ ForceRefreshGraphics()

void yaze::editor::OverworldEditor::ForceRefreshGraphics ( int map_index)
inlineprivate

Definition at line 686 of file overworld_editor.h.

References IsProjectTerrainMap(), and map_refresh_.

Referenced by Initialize(), RefreshMapsForSheetEdits(), RefreshPendingProjectGraphics(), SetPreviewStoryState(), and SwitchToWorld().

Here is the call graph for this function:

◆ RefreshSiblingMapGraphics()

void yaze::editor::OverworldEditor::RefreshSiblingMapGraphics ( int map_index,
bool include_self = false )
inlineprivate

Definition at line 690 of file overworld_editor.h.

References IsProjectTerrainMap(), and map_refresh_.

Here is the call graph for this function:

◆ InitTilePaintingManager()

void yaze::editor::OverworldEditor::InitTilePaintingManager ( )
private

Initialize the tile painting manager (called after graphics load)

Definition at line 440 of file overworld_editor.cc.

References yaze::editor::TilePaintingCallbacks::allocated_rows, yaze::editor::TilePaintingCallbacks::create_undo_point, CreateUndoPoint(), yaze::editor::TilePaintingDependencies::current_map, current_map_, current_mode, yaze::editor::TilePaintingDependencies::current_mode, yaze::editor::TilePaintingDependencies::current_tile16, current_tile16_, yaze::editor::TilePaintingDependencies::current_world, current_world_, yaze::editor::LyraTerrainCanvas::document(), yaze::editor::TilePaintingCallbacks::finalize_paint_operation, yaze::editor::TilePaintingCallbacks::finalize_project_paint, FinalizePaintOperation(), yaze::editor::LyraTerrainCanvas::FinishStroke(), yaze::editor::TilePaintingCallbacks::is_project_tile, yaze::editor::LyraTerrainCanvas::loaded(), lyra_canvas_, yaze::editor::LyraTerrainCanvas::MapAtlas(), yaze::editor::TilePaintingDependencies::maps_bmp, maps_bmp_, yaze::editor::TilePaintingDependencies::overworld, overworld_, yaze::editor::TilePaintingDependencies::ow_map_canvas, ow_map_canvas_, yaze::editor::TilePaintingCallbacks::paint_project_pattern, yaze::editor::LyraTerrainCanvas::PaintPattern(), yaze::editor::TilePaintingCallbacks::project_tile_atlas, yaze::editor::TilePaintingCallbacks::read_project_tile, yaze::editor::TilePaintingCallbacks::refresh_overworld_map_on_demand, RefreshOverworldMapOnDemand(), yaze::editor::TilePaintingCallbacks::request_tile16_selection, RequestTile16Selection(), yaze::editor::TilePaintingDependencies::rom, rom_, yaze::editor::TilePaintingCallbacks::scroll_blockset_to_current_tile, ScrollBlocksetCanvasToCurrentTile(), yaze::editor::TilePaintingCallbacks::select_map_for_editing, yaze::editor::TilePaintingDependencies::selected_tile16_ids, selected_tile16_ids_, SelectMapForEditing(), status_, yaze::core::LyraTerrainDocument::tile(), yaze::editor::TilePaintingDependencies::tile16_blockset, tile16_blockset_, yaze::editor::TilePaintingDependencies::tile16_editor, tile16_editor_, tile_painting_, and yaze::editor::Editor::undo_manager_.

Referenced by Initialize().

◆ CheckForOverworldEdits()

void yaze::editor::OverworldEditor::CheckForOverworldEdits ( )
private

Check for tile edits - delegates to TilePaintingManager.

Definition at line 1421 of file overworld_editor.cc.

References tile_painting_.

◆ CheckForCurrentMap()

absl::Status yaze::editor::OverworldEditor::CheckForCurrentMap ( )
private

Check for map changes and refresh if needed.

Definition at line 1493 of file overworld_editor.cc.

References canvas_nav_.

◆ HandleMapInteraction()

void yaze::editor::OverworldEditor::HandleMapInteraction ( )
private

Definition at line 2114 of file overworld_editor.cc.

References canvas_nav_.

◆ UpdateBlocksetSelectorState()

void yaze::editor::OverworldEditor::UpdateBlocksetSelectorState ( )
private

Definition at line 2336 of file overworld_editor.cc.

References canvas_nav_.

◆ ScrollBlocksetCanvasToCurrentTile()

void yaze::editor::OverworldEditor::ScrollBlocksetCanvasToCurrentTile ( )
private

Scroll the blockset canvas to show the current selected tile16.

Definition at line 2119 of file overworld_editor.cc.

References canvas_nav_.

Referenced by InitTilePaintingManager(), and SampleContextTile16().

◆ InitCanvasNavigationManager()

void yaze::editor::OverworldEditor::InitCanvasNavigationManager ( )
private

Initialize the canvas navigation manager (called during Initialize)

Definition at line 509 of file overworld_editor.cc.

References yaze::editor::CanvasNavigationContext::blockset_selector, blockset_selector_, canvas_nav_, yaze::editor::CanvasNavigationContext::current_map, current_map_, yaze::editor::CanvasNavigationContext::current_map_lock, current_map_lock_, yaze::editor::CanvasNavigationContext::current_mode, current_mode, yaze::editor::CanvasNavigationContext::current_parent, current_parent_, yaze::editor::CanvasNavigationContext::current_tile16, current_tile16_, yaze::editor::CanvasNavigationContext::current_world, current_world_, yaze::editor::CanvasNavigationCallbacks::displayed_map_count, DisplayedMapCount(), yaze::editor::CanvasNavigationCallbacks::ensure_map_texture, EnsureMapTexture(), entity_renderer_, yaze::editor::CanvasNavigationContext::hovered_map, hovered_map_, yaze::editor::CanvasNavigationContext::is_dragging_entity, is_dragging_entity_, yaze::editor::CanvasNavigationCallbacks::is_entity_hovered, yaze::editor::CanvasNavigationCallbacks::is_project_terrain_map, IsProjectTerrainMap(), yaze::editor::CanvasNavigationContext::maps_bmp, maps_bmp_, yaze::editor::CanvasNavigationCallbacks::open_map_properties, OpenMapPropertiesWindow(), yaze::editor::CanvasNavigationContext::overworld, overworld_, yaze::editor::CanvasNavigationContext::ow_map_canvas, ow_map_canvas_, yaze::editor::CanvasNavigationCallbacks::pick_tile16_from_hovered_canvas, PickTile16FromHoveredCanvas(), yaze::editor::CanvasNavigationCallbacks::refresh_overworld_map, yaze::editor::CanvasNavigationCallbacks::refresh_tile16_blockset, RefreshOverworldMap(), RefreshTile16Blockset(), yaze::editor::CanvasNavigationContext::rom, rom_, yaze::editor::CanvasNavigationCallbacks::select_map_for_editing, SelectMapForEditing(), yaze::editor::CanvasNavigationContext::tile16_blockset, and tile16_blockset_.

Referenced by Initialize().

◆ DrawEntityPopups()

void yaze::editor::OverworldEditor::DrawEntityPopups ( )
private

◆ OpenEntityContextMenu()

void yaze::editor::OverworldEditor::OpenEntityContextMenu ( zelda3::GameEntity * entity)
private

◆ DrawEntityContextMenu()

void yaze::editor::OverworldEditor::DrawEntityContextMenu ( )
private

◆ ResolveEditingEntity()

zelda3::GameEntity * yaze::editor::OverworldEditor::ResolveEditingEntity ( )
private

◆ LoadSpriteGraphics()

absl::Status yaze::editor::OverworldEditor::LoadSpriteGraphics ( )
private

◆ ProcessDeferredTextures()

void yaze::editor::OverworldEditor::ProcessDeferredTextures ( )
private

Create textures for deferred map bitmaps on demand.

Definition at line 2059 of file overworld_editor.cc.

References map_texture_.

Referenced by Update().

◆ RefreshMapsForSheetEdits()

void yaze::editor::OverworldEditor::RefreshMapsForSheetEdits ( )
private

Mark maps for a graphics rebuild when a sheet they use changed in the session's sheet store (an unsaved Graphics editor edit).

Definition at line 784 of file overworld_editor.cc.

References current_map_, ForceRefreshGraphics(), game_state_, yaze::zelda3::kNumOverworldMaps, maps_bmp_, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, RefreshOverworldMapOnDemand(), RefreshTile16Blockset(), yaze::zelda3::Overworld::set_game_state(), and status_.

Referenced by OpenGraphicsForTile16Quadrant(), SelectMapForEditing(), and Update().

◆ EnsureMapTexture()

void yaze::editor::OverworldEditor::EnsureMapTexture ( int map_index)
private

Ensure a specific map has its texture created.

Definition at line 2073 of file overworld_editor.cc.

References IsProjectTerrainMap(), and map_texture_.

Referenced by AreaScreenBitmap(), InitCanvasNavigationManager(), InitMapRefreshCoordinator(), PaintLyraA0Terrain(), SelectMapForEditing(), and SwitchToWorld().

Here is the call graph for this function:

◆ PrimeWorldMaps()

void yaze::editor::OverworldEditor::PrimeWorldMaps ( int world,
bool process_texture_queue = false )
private

Definition at line 1112 of file overworld_editor.cc.

References map_texture_.

Referenced by SwitchToWorld().

◆ SetupCanvasAutomation()

void yaze::editor::OverworldEditor::SetupCanvasAutomation ( )
private

Definition at line 12 of file automation.cc.

References AutomationGetTile(), AutomationSetTile(), yaze::gui::Canvas::GetAutomationAPI(), ow_map_canvas_, and yaze::gui::CanvasAutomationAPI::SetTilePaintCallback().

Referenced by Initialize().

Here is the call graph for this function:

◆ GetOverworldCanvas()

gui::Canvas * yaze::editor::OverworldEditor::GetOverworldCanvas ( )
inlineprivate

Definition at line 750 of file overworld_editor.h.

References ow_map_canvas_.

◆ AutomationSetTile()

◆ AutomationGetTile()

int yaze::editor::OverworldEditor::AutomationGetTile ( int x,
int y )
private

◆ SaveCurrentSelectionToScratch()

absl::Status yaze::editor::OverworldEditor::SaveCurrentSelectionToScratch ( )
private

Definition at line 717 of file scratch_space.cc.

References RETURN_IF_ERROR.

Referenced by DrawEditorMenu(), and DrawScratchSpace().

◆ LoadScratchToSelection()

absl::Status yaze::editor::OverworldEditor::LoadScratchToSelection ( )
private

Definition at line 730 of file scratch_space.cc.

Referenced by DrawEditorMenu(), and DrawScratchSpace().

◆ ClearScratchSpace()

absl::Status yaze::editor::OverworldEditor::ClearScratchSpace ( )
private

Definition at line 745 of file scratch_space.cc.

References RETURN_IF_ERROR.

Referenced by DrawEditorMenu(), and DrawScratchSpace().

◆ DrawScratchSpaceEdits()

void yaze::editor::OverworldEditor::DrawScratchSpaceEdits ( )
private

Definition at line 667 of file scratch_space.cc.

References yaze::editor::ScratchWorkspace::current(), current_tile16_, scratch_canvas_, scratch_workspace_, and yaze::editor::ScratchWorkspace::Stamp().

Referenced by DrawScratchSpace().

Here is the call graph for this function:

◆ DrawScratchSpacePattern()

void yaze::editor::OverworldEditor::DrawScratchSpacePattern ( )
private

Definition at line 683 of file scratch_space.cc.

◆ DrawScratchSpaceSelection()

void yaze::editor::OverworldEditor::DrawScratchSpaceSelection ( )
private

◆ UpdateScratchBitmapTile()

void yaze::editor::OverworldEditor::UpdateScratchBitmapTile ( int tile_x,
int tile_y,
int tile_id )
private

Definition at line 702 of file scratch_space.cc.

References yaze::gfx::Arena::Get(), yaze::gfx::GetTilemapData(), yaze::gfx::Arena::QueueTextureCommand(), and yaze::gfx::Arena::UPDATE.

Here is the call graph for this function:

◆ LoadScratchPad()

absl::Status yaze::editor::OverworldEditor::LoadScratchPad ( )
private

◆ SaveScratchPad()

absl::Status yaze::editor::OverworldEditor::SaveScratchPad ( )
private

Definition at line 120 of file scratch_space.cc.

References yaze::editor::ScratchWorkspace::Save(), scratch_path_, and scratch_workspace_.

Referenced by FlushScratchPadIfDirty().

Here is the call graph for this function:

◆ BeginScratchEdit()

void yaze::editor::OverworldEditor::BeginScratchEdit ( )
private

Definition at line 140 of file scratch_space.cc.

References FinalizePaintOperation(), scratch_edit_before_, scratch_workspace_, and yaze::editor::ScratchWorkspace::state().

Referenced by DrawEditorMenu(), and DrawScratchSpace().

Here is the call graph for this function:

◆ FinishScratchEdit()

void yaze::editor::OverworldEditor::FinishScratchEdit ( const std::string & description)
private

◆ RestoreScratchState()

absl::Status yaze::editor::OverworldEditor::RestoreScratchState ( const ScratchWorkspaceState & state)
private

◆ FlushScratchPadIfDirty()

absl::Status yaze::editor::OverworldEditor::FlushScratchPadIfDirty ( )
private

Definition at line 126 of file scratch_space.cc.

References RETURN_IF_ERROR, SaveScratchPad(), scratch_save_status_, and scratch_space_dirty_.

Referenced by DrawScratchSpace(), PrepareProjectSave(), RestoreScratchState(), and Save().

Here is the call graph for this function:

◆ RebuildScratchBitmapFromTileData()

◆ MarkScratchSpaceDirty()

void yaze::editor::OverworldEditor::MarkScratchSpaceDirty ( )
private

◆ CreateUndoPoint()

void yaze::editor::OverworldEditor::CreateUndoPoint ( int map_id,
int world,
int x,
int y,
int old_tile_id )
private

Definition at line 1694 of file overworld_editor.cc.

References current_paint_operation_, FinalizePaintOperation(), and yaze::editor::OverworldEditor::OverworldUndoPoint::map_id.

Referenced by InitTilePaintingManager().

Here is the call graph for this function:

◆ FinalizePaintOperation()

◆ GetWorldTiles()

auto & yaze::editor::OverworldEditor::GetWorldTiles ( int world)
private

Definition at line 1683 of file overworld_editor.cc.

References yaze::zelda3::Overworld::mutable_map_tiles(), and overworld_.

Referenced by FinalizePaintOperation().

Here is the call graph for this function:

◆ CaptureItemUndoSnapshot()

◆ RestoreItemUndoSnapshot()

◆ PushItemUndoAction()

void yaze::editor::OverworldEditor::PushItemUndoAction ( OverworldItemsSnapshot before,
std::string description )
private

◆ ApplyOverworldPropertyEdit()

◆ ApplyOverworldPropertyEdits()

absl::Status yaze::editor::OverworldEditor::ApplyOverworldPropertyEdits ( const std::vector< OverworldPropertyEdit > & edits,
const std::string & description,
bool record_undo = true )
private

◆ RenameProjectResourceLabelWithUndo()

absl::Status yaze::editor::OverworldEditor::RenameProjectResourceLabelWithUndo ( const std::string & type,
int id,
const std::string & label )
private

Friends And Related Symbol Documentation

◆ OverworldCanvasRenderer

friend class OverworldCanvasRenderer
friend

Definition at line 140 of file overworld_editor.h.

◆ OverworldScratchTestPeer

friend class OverworldScratchTestPeer
friend

Definition at line 141 of file overworld_editor.h.

◆ AuthoringSaveWorkflowTestPeer

friend class AuthoringSaveWorkflowTestPeer
friend

Definition at line 593 of file overworld_editor.h.

◆ ProjectGraphicsImportSaveTestPeer

friend class ProjectGraphicsImportSaveTestPeer
friend

Definition at line 594 of file overworld_editor.h.

◆ ProjectGraphicsImportWorkflowTestPeer

friend class ProjectGraphicsImportWorkflowTestPeer
friend

Definition at line 595 of file overworld_editor.h.

Member Data Documentation

◆ jump_to_tab_

int yaze::editor::OverworldEditor::jump_to_tab_ = -1

◆ jump_to_entrance_

int yaze::editor::OverworldEditor::jump_to_entrance_ = -1

Definition at line 242 of file overworld_editor.h.

Referenced by RequestJumpToEntrance().

◆ lyra_canvas_

◆ lyra_canvas_status_

absl::Status yaze::editor::OverworldEditor::lyra_canvas_status_

◆ project_context_provider_

std::function<project::YazeProject*()> yaze::editor::OverworldEditor::project_context_provider_
private

Definition at line 592 of file overworld_editor.h.

Referenced by SetProjectContextProvider(), and TerrainProject().

◆ graphics_source_

◆ graphics_source_project_

const project::YazeProject* yaze::editor::OverworldEditor::graphics_source_project_ = nullptr
private

◆ graphics_source_open_

bool yaze::editor::OverworldEditor::graphics_source_open_ = false
private

◆ graphics_import_applied_

bool yaze::editor::OverworldEditor::graphics_import_applied_ = false
private

◆ graphics_source_tile_

int yaze::editor::OverworldEditor::graphics_source_tile_ = 0
private

Definition at line 606 of file overworld_editor.h.

Referenced by DrawProjectGraphicsSource(), and OpenProjectGraphicsSource().

◆ graphics_source_palette_

int yaze::editor::OverworldEditor::graphics_source_palette_ = 5
private

Definition at line 607 of file overworld_editor.h.

Referenced by DrawProjectGraphicsSource().

◆ graphics_source_index_

int yaze::editor::OverworldEditor::graphics_source_index_ = 1
private

Definition at line 608 of file overworld_editor.h.

Referenced by DrawProjectGraphicsSource().

◆ graphics_source_status_

absl::Status yaze::editor::OverworldEditor::graphics_source_status_
private

Definition at line 609 of file overworld_editor.h.

Referenced by DrawProjectGraphicsImport(), and DrawProjectGraphicsSource().

◆ graphics_source_message_

std::string yaze::editor::OverworldEditor::graphics_source_message_
private

Definition at line 610 of file overworld_editor.h.

Referenced by DrawProjectGraphicsSource().

◆ graphics_preview_baseline_

zelda3::OverworldGraphicsPreview yaze::editor::OverworldEditor::graphics_preview_baseline_
private

◆ graphics_import_path_

std::array<char, 1024> yaze::editor::OverworldEditor::graphics_import_path_ {}
private

Definition at line 612 of file overworld_editor.h.

Referenced by DrawProjectGraphicsImport().

◆ graphics_import_asset_

std::optional<ProjectGraphicsImportAsset> yaze::editor::OverworldEditor::graphics_import_asset_
private

Definition at line 613 of file overworld_editor.h.

Referenced by Clear(), DrawProjectGraphicsImport(), and Load().

◆ graphics_import_plan_

std::optional<ProjectGraphicsImportPlan> yaze::editor::OverworldEditor::graphics_import_plan_
private

◆ graphics_import_bindings_

ProjectGraphicsImportBindings yaze::editor::OverworldEditor::graphics_import_bindings_
private

Definition at line 615 of file overworld_editor.h.

Referenced by ApplyProjectGraphicsImport(), and DrawProjectGraphicsImport().

◆ graphics_import_applied_bindings_

ProjectGraphicsImportBindings yaze::editor::OverworldEditor::graphics_import_applied_bindings_
private

Definition at line 616 of file overworld_editor.h.

Referenced by ApplyProjectGraphicsImport(), and PlaceProjectGraphicsImport().

◆ graphics_import_pack_

std::string yaze::editor::OverworldEditor::graphics_import_pack_
private

◆ graphics_import_ranges_reviewed_

bool yaze::editor::OverworldEditor::graphics_import_ranges_reviewed_ = false
private

Definition at line 618 of file overworld_editor.h.

Referenced by ApplyProjectGraphicsImport(), and DrawProjectGraphicsImport().

◆ lyra_loaded_rom_sha1_

std::string yaze::editor::OverworldEditor::lyra_loaded_rom_sha1_
private

Definition at line 622 of file overworld_editor.h.

Referenced by CheckRomReplacement(), Clear(), Load(), and SaveLyraA0TerrainAs().

◆ lyra_terrain_brush_

int yaze::editor::OverworldEditor::lyra_terrain_brush_ = 0x2103
private

◆ graphics_preview_config_path_

std::string yaze::editor::OverworldEditor::graphics_preview_config_path_
private

Definition at line 624 of file overworld_editor.h.

Referenced by Clear(), and SyncProjectGraphicsPreview().

◆ current_mode

◆ previous_mode

EditingMode yaze::editor::OverworldEditor::previous_mode = EditingMode::DRAW_TILE
private

Definition at line 810 of file overworld_editor.h.

◆ entity_edit_mode_

◆ current_world_

◆ current_map_

◆ current_parent_

int yaze::editor::OverworldEditor::current_parent_ = 0
private

◆ hovered_map_

int yaze::editor::OverworldEditor::hovered_map_ = -1
private

◆ current_blockset_

int yaze::editor::OverworldEditor::current_blockset_ = 0
private

Definition at line 836 of file overworld_editor.h.

Referenced by InitMapRefreshCoordinator().

◆ game_state_

◆ current_tile16_

◆ selected_entrance_

int yaze::editor::OverworldEditor::selected_entrance_ = 0
private

Definition at line 839 of file overworld_editor.h.

◆ selected_usage_map_

int yaze::editor::OverworldEditor::selected_usage_map_ = 0xFFFF
private

Definition at line 840 of file overworld_editor.h.

◆ selected_tile16_ids_

std::vector<int> yaze::editor::OverworldEditor::selected_tile16_ids_
private

Definition at line 843 of file overworld_editor.h.

Referenced by BuildContextSnapshot(), and InitTilePaintingManager().

◆ all_gfx_loaded_

bool yaze::editor::OverworldEditor::all_gfx_loaded_ = false
private

◆ map_blockset_loaded_

bool yaze::editor::OverworldEditor::map_blockset_loaded_ = false
private

◆ pending_tile16_selection_after_gfx_

std::optional<int> yaze::editor::OverworldEditor::pending_tile16_selection_after_gfx_
private

Selection requested before overworld gfx/blockset init; applied in Load() after Tile16Editor::Initialize.

Definition at line 854 of file overworld_editor.h.

Referenced by Clear(), Load(), and RequestTile16Selection().

◆ overworld_canvas_fullscreen_

bool yaze::editor::OverworldEditor::overworld_canvas_fullscreen_ = false
private

Definition at line 860 of file overworld_editor.h.

Referenced by ToggleCanvasFullscreen(), and Update().

◆ is_dragging_entity_

bool yaze::editor::OverworldEditor::is_dragging_entity_ = false
private

Definition at line 861 of file overworld_editor.h.

Referenced by InitCanvasNavigationManager().

◆ drag_item_snapshot_

std::optional<OverworldItemsSnapshot> yaze::editor::OverworldEditor::drag_item_snapshot_
private

Item state before an in-progress canvas drag (drag undo).

Definition at line 863 of file overworld_editor.h.

◆ dragged_entity_free_movement_

bool yaze::editor::OverworldEditor::dragged_entity_free_movement_ = false
private

Definition at line 864 of file overworld_editor.h.

◆ current_map_lock_

◆ show_custom_bg_color_editor_

bool yaze::editor::OverworldEditor::show_custom_bg_color_editor_ = false
private

Definition at line 871 of file overworld_editor.h.

Referenced by Update().

◆ show_overlay_editor_

bool yaze::editor::OverworldEditor::show_overlay_editor_ = false
private

Definition at line 872 of file overworld_editor.h.

Referenced by Update().

◆ show_overlay_preview_

bool yaze::editor::OverworldEditor::show_overlay_preview_ = true
private

Definition at line 875 of file overworld_editor.h.

Referenced by Clear(), Initialize(), LoadGraphics(), and overlay_preview_enabled().

◆ show_entities_

bool yaze::editor::OverworldEditor::show_entities_ = true
private

◆ canvas_renderer_

std::unique_ptr<OverworldCanvasRenderer> yaze::editor::OverworldEditor::canvas_renderer_
private

◆ canvas_nav_

◆ tile_painting_

◆ upgrade_system_

std::unique_ptr<zelda3::OverworldUpgradeSystem> yaze::editor::OverworldEditor::upgrade_system_
private

Definition at line 885 of file overworld_editor.h.

Referenced by Initialize(), and Update().

◆ entity_mutation_service_

std::unique_ptr<EntityMutationService> yaze::editor::OverworldEditor::entity_mutation_service_
private

◆ interaction_coordinator_

std::unique_ptr<OverworldInteractionCoordinator> yaze::editor::OverworldEditor::interaction_coordinator_
private

Definition at line 887 of file overworld_editor.h.

Referenced by InitInteractionCoordinator(), and Update().

◆ map_refresh_

◆ map_texture_

std::unique_ptr<OverworldMapTextureCoordinator> yaze::editor::OverworldEditor::map_texture_
private

◆ map_properties_system_

std::unique_ptr<MapPropertiesSystem> yaze::editor::OverworldEditor::map_properties_system_
private

◆ sidebar_

std::unique_ptr<OverworldSidebar> yaze::editor::OverworldEditor::sidebar_
private

Definition at line 891 of file overworld_editor.h.

Referenced by Initialize(), and ~OverworldEditor().

◆ entity_renderer_

std::unique_ptr<OverworldEntityRenderer> yaze::editor::OverworldEditor::entity_renderer_
private

◆ toolbar_

std::unique_ptr<OverworldToolbar> yaze::editor::OverworldEditor::toolbar_
private

◆ scratch_workspace_

◆ scratch_bitmap_

gfx::Bitmap yaze::editor::OverworldEditor::scratch_bitmap_
private

Definition at line 900 of file overworld_editor.h.

Referenced by DrawScratchSpace(), and RebuildScratchBitmapFromTileData().

◆ scratch_edit_before_

std::optional<ScratchWorkspaceState> yaze::editor::OverworldEditor::scratch_edit_before_
private

Definition at line 901 of file overworld_editor.h.

Referenced by BeginScratchEdit(), FinishScratchEdit(), and LoadScratchPad().

◆ scratch_space_dirty_

bool yaze::editor::OverworldEditor::scratch_space_dirty_ = false
private

◆ scratch_load_status_

absl::Status yaze::editor::OverworldEditor::scratch_load_status_
private

Definition at line 903 of file overworld_editor.h.

Referenced by DrawScratchSpace(), and LoadScratchPad().

◆ scratch_action_status_

absl::Status yaze::editor::OverworldEditor::scratch_action_status_
private

Definition at line 904 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_save_status_

absl::Status yaze::editor::OverworldEditor::scratch_save_status_
private

◆ scratch_initialized_

bool yaze::editor::OverworldEditor::scratch_initialized_ = false
private

Definition at line 906 of file overworld_editor.h.

Referenced by LoadScratchPad().

◆ scratch_path_

std::filesystem::path yaze::editor::OverworldEditor::scratch_path_
private

Definition at line 907 of file overworld_editor.h.

Referenced by LoadScratchPad(), and SaveScratchPad().

◆ scratch_name_id_

uint64_t yaze::editor::OverworldEditor::scratch_name_id_ = 0
private

Definition at line 908 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_name_buffer_

std::array<char, 129> yaze::editor::OverworldEditor::scratch_name_buffer_ {}
private

Definition at line 909 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_resize_id_

uint64_t yaze::editor::OverworldEditor::scratch_resize_id_ = 0
private

Definition at line 910 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_resize_dimensions_

std::array<int, 2> yaze::editor::OverworldEditor::scratch_resize_dimensions_ {16, 16}
private

Definition at line 911 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_preview_map_

int yaze::editor::OverworldEditor::scratch_preview_map_ = -1
private

Definition at line 912 of file overworld_editor.h.

Referenced by DrawScratchSpace(), and RebuildScratchBitmapFromTileData().

◆ scratch_preview_revision_

uint64_t yaze::editor::OverworldEditor::scratch_preview_revision_ = 0
private

Definition at line 913 of file overworld_editor.h.

Referenced by DrawScratchSpace(), and RebuildScratchBitmapFromTileData().

◆ scratch_paint_gesture_owned_

bool yaze::editor::OverworldEditor::scratch_paint_gesture_owned_ = false
private

Definition at line 914 of file overworld_editor.h.

Referenced by DrawScratchSpace(), and FinishScratchEdit().

◆ scratch_select_active_

bool yaze::editor::OverworldEditor::scratch_select_active_ = false
private

Definition at line 915 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_select_min_

ImVec2 yaze::editor::OverworldEditor::scratch_select_min_ {-1, -1}
private

Definition at line 916 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_select_max_

ImVec2 yaze::editor::OverworldEditor::scratch_select_max_ {-1, -1}
private

Definition at line 917 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_selecting_

bool yaze::editor::OverworldEditor::scratch_selecting_ = false
private

Definition at line 918 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_drag_start_

ImVec2 yaze::editor::OverworldEditor::scratch_drag_start_ {-1, -1}
private

Definition at line 919 of file overworld_editor.h.

Referenced by DrawScratchSpace().

◆ scratch_scale_mode_

gui::AdaptiveSheetScaleMode yaze::editor::OverworldEditor::scratch_scale_mode_
private

◆ tile16_blockset_

◆ rom_

◆ game_data_

zelda3::GameData* yaze::editor::OverworldEditor::game_data_ = nullptr
private

◆ renderer_

gfx::IRenderer* yaze::editor::OverworldEditor::renderer_
private

◆ tile16_editor_

◆ gfx_group_editor_

◆ palette_editor_

PaletteEditor yaze::editor::OverworldEditor::palette_editor_
private

Definition at line 936 of file overworld_editor.h.

◆ palette_

gfx::SnesPalette yaze::editor::OverworldEditor::palette_
private

◆ selected_tile_bmp_

gfx::Bitmap yaze::editor::OverworldEditor::selected_tile_bmp_
private

Definition at line 943 of file overworld_editor.h.

◆ tile16_blockset_bmp_

gfx::Bitmap yaze::editor::OverworldEditor::tile16_blockset_bmp_
private

Definition at line 944 of file overworld_editor.h.

Referenced by Load(), and LoadGraphics().

◆ current_gfx_bmp_

gfx::Bitmap yaze::editor::OverworldEditor::current_gfx_bmp_
private

◆ all_gfx_bmp

gfx::Bitmap yaze::editor::OverworldEditor::all_gfx_bmp
private

Definition at line 946 of file overworld_editor.h.

◆ maps_bmp_

◆ current_graphics_set_

gfx::BitmapTable yaze::editor::OverworldEditor::current_graphics_set_
private

◆ sprite_previews_

std::vector<gfx::Bitmap> yaze::editor::OverworldEditor::sprite_previews_
private

Definition at line 949 of file overworld_editor.h.

Referenced by Initialize(), and LoadSpriteGraphics().

◆ overworld_

zelda3::Overworld yaze::editor::OverworldEditor::overworld_ {rom_}
private

Definition at line 955 of file overworld_editor.h.

Referenced by ApplyEntranceEdit(), ApplyExitEdit(), ApplyTile16Stencil(), AutomationGetTile(), AutomationSetTile(), BeginSaveTransaction(), BuildContextSnapshot(), CaptureItemUndoSnapshot(), CheckRomReplacement(), Clear(), CommitSaveTransaction(), CreateLyraTerrain(), DeleteSelectedItem(), DisplayedMapCount(), yaze::editor::OverworldCanvasRenderer::DrawOverworldCanvas(), DrawProjectGraphicsSource(), DuplicateSelectedItem(), EditProjectMapAuthoring(), FinalizePaintOperation(), GetSelectedItem(), GetWorldTiles(), GraphicsImportContext(), InitCanvasNavigationManager(), Initialize(), InitMapRefreshCoordinator(), InitMapTextureCoordinator(), InitTilePaintingManager(), is_lyra_preview(), IsProjectTerrainMap(), JumpToMap(), Load(), LoadGraphics(), LoadSpriteGraphics(), lyra_a0_terrain_writable(), NormalizeCurrentSelectionState(), OpenGraphicsForContextTile16(), OpenGraphicsForTile16Quadrant(), OpenLyraTerrain(), OpenProjectGraphicsSource(), overworld(), PaintLyraA0Terrain(), PlaceProjectGraphicsImport(), yaze::editor::OverworldCanvasRenderer::PrepareContextMenu(), PrepareProjectSave(), PreviewProjectGraphicsImport(), RefreshMapsForSheetEdits(), RefreshPendingProjectGraphics(), RestoreItemUndoSnapshot(), RollbackSaveTransaction(), SampleContextTile16(), Save(), SaveLyraA0TerrainAs(), SaveProjectTerrainAs(), SelectItemByIdentity(), SelectMapForEditing(), set_current_map(), SetGameData(), SetPreviewStoryState(), SwitchToWorld(), SyncProjectGraphicsPreview(), TryPlaceArmedItem(), and Update().

◆ map_tile_save_transaction_open_

bool yaze::editor::OverworldEditor::map_tile_save_transaction_open_ = false
private

◆ refresh_blockset_

zelda3::OverworldBlockset yaze::editor::OverworldEditor::refresh_blockset_
private

Definition at line 957 of file overworld_editor.h.

◆ entrance_tiletypes_

zelda3::OverworldEntranceTileTypes yaze::editor::OverworldEditor::entrance_tiletypes_ = {}
private

Definition at line 963 of file overworld_editor.h.

Referenced by Load().

◆ current_entity_

◆ dragged_entity_

zelda3::GameEntity* yaze::editor::OverworldEditor::dragged_entity_ = nullptr
private

Definition at line 966 of file overworld_editor.h.

◆ selected_item_identity_

◆ editing_target_

std::optional<OverworldEntityEditingTarget> yaze::editor::OverworldEditor::editing_target_
private

Definition at line 968 of file overworld_editor.h.

◆ edit_entrance_

zelda3::OverworldEntrance yaze::editor::OverworldEditor::edit_entrance_
private

Definition at line 971 of file overworld_editor.h.

Referenced by ApplyEntranceEdit(), and edit_entrance().

◆ edit_exit_

zelda3::OverworldExit yaze::editor::OverworldEditor::edit_exit_
private

Definition at line 972 of file overworld_editor.h.

Referenced by ApplyExitEdit(), and edit_exit().

◆ edit_item_

zelda3::OverworldItem yaze::editor::OverworldEditor::edit_item_
private

Definition at line 973 of file overworld_editor.h.

Referenced by edit_item().

◆ edit_sprite_

zelda3::Sprite yaze::editor::OverworldEditor::edit_sprite_
private

Definition at line 974 of file overworld_editor.h.

Referenced by edit_sprite().

◆ pending_entity_insertion_

std::optional<OverworldEntityInsertionRequest> yaze::editor::OverworldEditor::pending_entity_insertion_
private

◆ item_insert_target_

std::optional<OverworldContextTarget> yaze::editor::OverworldEditor::item_insert_target_
private

Definition at line 978 of file overworld_editor.h.

Referenced by DrawItemInsertPopup(), and RequestItemInsertPopup().

◆ item_insert_popup_requested_

bool yaze::editor::OverworldEditor::item_insert_popup_requested_ = false
private

Definition at line 979 of file overworld_editor.h.

Referenced by DrawItemInsertPopup(), and RequestItemInsertPopup().

◆ item_placement_armed_

bool yaze::editor::OverworldEditor::item_placement_armed_ = false
private

Definition at line 980 of file overworld_editor.h.

Referenced by DrawItemInsertPopup(), and TryPlaceArmedItem().

◆ armed_item_id_

uint8_t yaze::editor::OverworldEditor::armed_item_id_ = 0
private

Definition at line 981 of file overworld_editor.h.

Referenced by DrawItemInsertPopup(), and TryPlaceArmedItem().

◆ insert_error_

std::string yaze::editor::OverworldEditor::insert_error_
private

Definition at line 982 of file overworld_editor.h.

Referenced by insert_error().

◆ ow_map_canvas_

◆ current_gfx_canvas_

gui::Canvas yaze::editor::OverworldEditor::current_gfx_canvas_
private
Initial value:
{"CurrentGfx", kCurrentGfxCanvasSize,
constexpr ImVec2 kCurrentGfxCanvasSize(0x100+1, 0x10 *0x40+1)

Definition at line 990 of file overworld_editor.h.

Referenced by ~OverworldEditor().

◆ blockset_canvas_

gui::Canvas yaze::editor::OverworldEditor::blockset_canvas_
private
Initial value:
{"OwBlockset", kBlocksetCanvasSize,
constexpr ImVec2 kBlocksetCanvasSize(0x100+1, 0x4000+1)

Definition at line 992 of file overworld_editor.h.

Referenced by ~OverworldEditor().

◆ blockset_selector_

std::unique_ptr<gui::TileSelectorWidget> yaze::editor::OverworldEditor::blockset_selector_
private

Definition at line 994 of file overworld_editor.h.

Referenced by InitCanvasNavigationManager().

◆ graphics_bin_canvas_

gui::Canvas yaze::editor::OverworldEditor::graphics_bin_canvas_
private
Initial value:
{"GraphicsBin", kGraphicsBinCanvasSize,
constexpr ImVec2 kGraphicsBinCanvasSize(0x100+1, kNumSheetsToLoad *0x40+1)

Definition at line 995 of file overworld_editor.h.

Referenced by ~OverworldEditor().

◆ properties_canvas_

gui::Canvas yaze::editor::OverworldEditor::properties_canvas_
private

Definition at line 997 of file overworld_editor.h.

Referenced by ~OverworldEditor().

◆ scratch_canvas_

gui::Canvas yaze::editor::OverworldEditor::scratch_canvas_
private
Initial value:
{"ScratchSpace", ImVec2(320, 480),

Definition at line 998 of file overworld_editor.h.

Referenced by DrawScratchSpace(), DrawScratchSpaceEdits(), and ~OverworldEditor().

◆ usage_stats_card_

std::unique_ptr<UsageStatisticsCard> yaze::editor::OverworldEditor::usage_stats_card_
private

Definition at line 1005 of file overworld_editor.h.

Referenced by Initialize(), and usage_stats_card().

◆ debug_window_card_

std::unique_ptr<DebugWindowCard> yaze::editor::OverworldEditor::debug_window_card_
private

Definition at line 1006 of file overworld_editor.h.

Referenced by debug_window_card(), and Initialize().

◆ status_

◆ current_paint_operation_

std::optional<OverworldUndoPoint> yaze::editor::OverworldEditor::current_paint_operation_
private

Definition at line 1014 of file overworld_editor.h.

Referenced by CreateUndoPoint(), FinalizePaintOperation(), and Load().

◆ palette_listener_id_

int yaze::editor::OverworldEditor::palette_listener_id_ = -1
private

Definition at line 1020 of file overworld_editor.h.

Referenced by Clear(), Load(), and ~OverworldEditor().


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