#include <map_properties.h>

Public Types | |
| using | RefreshCallback = std::function< void()> |
| using | RefreshPaletteCallback = std::function< absl::Status()> |
| using | ForceRefreshGraphicsCallback = std::function< void(int)> |
Public Member Functions | |
| MapPropertiesSystem (zelda3::Overworld *overworld, Rom *rom, std::array< gfx::Bitmap, zelda3::kNumOverworldMaps > *maps_bmp=nullptr, gui::Canvas *canvas=nullptr) | |
| void | SetRefreshCallbacks (RefreshCallback refresh_map_properties, RefreshCallback refresh_overworld_map, RefreshPaletteCallback refresh_map_palette, RefreshPaletteCallback refresh_tile16_blockset=nullptr, ForceRefreshGraphicsCallback force_refresh_graphics=nullptr) |
| void | SetEntityCallbacks (std::function< void(const std::string &)> insert_callback) |
| void | DrawSimplifiedMapSettings (int ¤t_world, int ¤t_map, bool ¤t_map_lock, bool &show_map_properties_panel, bool &show_custom_bg_color_editor, bool &show_overlay_editor, bool &show_overlay_preview, int &game_state, int ¤t_mode) |
| void | DrawMapPropertiesPanel (int current_map, bool &show_map_properties_panel) |
| void | DrawCustomBackgroundColorEditor (int current_map, bool &show_custom_bg_color_editor) |
| void | DrawOverlayEditor (int current_map, bool &show_overlay_editor) |
| void | DrawOverlayPreviewOnMap (int current_map, int current_world, bool show_overlay_preview) |
| void | SetupCanvasContextMenu (gui::Canvas &canvas, int current_map, bool current_map_lock, bool &show_map_properties_panel, bool &show_custom_bg_color_editor, bool &show_overlay_editor, int current_mode=0) |
Private Member Functions | |
| void | DrawGraphicsPopup (int current_map, int game_state) |
| void | DrawPalettesPopup (int current_map, int game_state, bool &show_custom_bg_color_editor) |
| void | DrawPropertiesPopup (int current_map, bool &show_map_properties_panel, bool &show_overlay_preview, int &game_state) |
| void | DrawMosaicControls (int current_map) |
| void | DrawOverlayControls (int current_map, bool &show_overlay_preview) |
| std::string | GetOverlayDescription (uint16_t overlay_id) |
| void | DrawToolsPopup (int ¤t_mode) |
| void | DrawViewPopup () |
| void | DrawQuickAccessPopup () |
| void | DrawBasicPropertiesTab (int current_map) |
| void | DrawSpritePropertiesTab (int current_map) |
| void | DrawCustomFeaturesTab (int current_map) |
| void | DrawTileGraphicsTab (int current_map) |
| void | DrawMusicTab (int current_map) |
| void | RefreshMapProperties () |
| void | RefreshOverworldMap () |
| absl::Status | RefreshMapPalette () |
| absl::Status | RefreshTile16Blockset () |
| void | ForceRefreshGraphics (int map_index) |
| void | RefreshSiblingMapGraphics (int map_index, bool include_self=false) |
Private Attributes | |
| zelda3::Overworld * | overworld_ |
| Rom * | rom_ |
| std::array< gfx::Bitmap, zelda3::kNumOverworldMaps > * | maps_bmp_ |
| gui::Canvas * | canvas_ |
| RefreshCallback | refresh_map_properties_ |
| RefreshCallback | refresh_overworld_map_ |
| RefreshPaletteCallback | refresh_map_palette_ |
| RefreshPaletteCallback | refresh_tile16_blockset_ |
| ForceRefreshGraphicsCallback | force_refresh_graphics_ |
| std::function< void(const std::string &)> | entity_insert_callback_ |
Definition at line 20 of file map_properties.h.
| using yaze::editor::MapPropertiesSystem::RefreshCallback = std::function<void()> |
Definition at line 23 of file map_properties.h.
| using yaze::editor::MapPropertiesSystem::RefreshPaletteCallback = std::function<absl::Status()> |
Definition at line 24 of file map_properties.h.
| using yaze::editor::MapPropertiesSystem::ForceRefreshGraphicsCallback = std::function<void(int)> |
Definition at line 25 of file map_properties.h.
|
inlineexplicit |
Definition at line 27 of file map_properties.h.
|
inline |
Definition at line 33 of file map_properties.h.
References force_refresh_graphics_, refresh_map_palette_, refresh_map_properties_, refresh_overworld_map_, and refresh_tile16_blockset_.
|
inline |
Definition at line 46 of file map_properties.h.
References entity_insert_callback_.
| void yaze::editor::MapPropertiesSystem::DrawSimplifiedMapSettings | ( | int & | current_world, |
| int & | current_map, | ||
| bool & | current_map_lock, | ||
| bool & | show_map_properties_panel, | ||
| bool & | show_custom_bg_color_editor, | ||
| bool & | show_overlay_editor, | ||
| bool & | show_overlay_preview, | ||
| int & | game_state, | ||
| int & | current_mode | ||
| ) |
Definition at line 25 of file map_properties.cc.
References yaze::zelda3::Overworld::ConfigureMultiAreaMap(), DrawGraphicsPopup(), DrawPalettesPopup(), DrawPropertiesPopup(), DrawQuickAccessPopup(), DrawViewPopup(), HOVER_HINT, ICON_MD_BOLT, ICON_MD_IMAGE, ICON_MD_LOCK, ICON_MD_LOCK_OPEN, ICON_MD_PALETTE, ICON_MD_TUNE, ICON_MD_VISIBILITY, yaze::editor::kAreaSizeNames, yaze::editor::kComboAreaSizeWidth, yaze::editor::kComboWorldWidth, yaze::editor::kTableButtonGraphics, yaze::editor::kTableButtonPalettes, yaze::editor::kTableButtonProperties, yaze::editor::kTableButtonQuick, yaze::editor::kTableButtonView, yaze::editor::kTableColumnAreaSize, yaze::editor::kTableColumnGraphics, yaze::editor::kTableColumnLock, yaze::editor::kTableColumnMap, yaze::editor::kTableColumnPalettes, yaze::editor::kTableColumnProperties, yaze::editor::kTableColumnQuick, yaze::editor::kTableColumnView, yaze::editor::kTableColumnWorld, yaze::editor::kWorldNames, yaze::zelda3::LargeArea, overworld_, yaze::zelda3::Overworld::overworld_map(), yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshOverworldMap(), RefreshSiblingMapGraphics(), and yaze::zelda3::SmallArea.
| void yaze::editor::MapPropertiesSystem::DrawMapPropertiesPanel | ( | int | current_map, |
| bool & | show_map_properties_panel | ||
| ) |
Definition at line 194 of file map_properties.cc.
References DrawBasicPropertiesTab(), DrawCustomFeaturesTab(), DrawMusicTab(), DrawSpritePropertiesTab(), DrawTileGraphicsTab(), yaze::zelda3::Overworld::is_loaded(), overworld_, and yaze::zelda3::OverworldCustomASMHasBeenApplied.
| void yaze::editor::MapPropertiesSystem::DrawCustomBackgroundColorEditor | ( | int | current_map, |
| bool & | show_custom_bg_color_editor | ||
| ) |
Definition at line 249 of file map_properties.cc.
References yaze::gui::ConvertImVec4ToSnesColor(), yaze::gui::ConvertSnesColorToImVec4(), yaze::zelda3::Overworld::is_loaded(), yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::Overworld::overworld_map(), yaze::zelda3::OverworldCustomAreaSpecificBGEnabled, yaze::zelda3::OverworldCustomAreaSpecificBGPalette, yaze::zelda3::OverworldCustomASMHasBeenApplied, and yaze::gfx::SnesColor::snes().
| void yaze::editor::MapPropertiesSystem::DrawOverlayEditor | ( | int | current_map, |
| bool & | show_overlay_editor | ||
| ) |
Definition at line 304 of file map_properties.cc.
References GetOverlayDescription(), ICON_MD_BLOCK, ICON_MD_HELP_OUTLINE, ICON_MD_INFO, ICON_MD_LAYERS, ICON_MD_LIGHTBULB, ICON_MD_PHOTO, ICON_MD_VISIBILITY, ICON_MD_WARNING, yaze::gui::InputHexWord(), yaze::zelda3::Overworld::is_loaded(), yaze::editor::kInputFieldSize, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::Overworld::overworld_map(), yaze::zelda3::OverworldCustomASMHasBeenApplied, yaze::zelda3::OverworldCustomSubscreenOverlayArray, and yaze::zelda3::OverworldCustomSubscreenOverlayEnabled.
| void yaze::editor::MapPropertiesSystem::DrawOverlayPreviewOnMap | ( | int | current_map, |
| int | current_world, | ||
| bool | show_overlay_preview | ||
| ) |
Definition at line 1583 of file map_properties.cc.
References canvas_, yaze::gui::Canvas::draw_list(), yaze::gui::Canvas::global_scale(), yaze::zelda3::kNumOverworldMaps, yaze::editor::kOverworldMapSize, maps_bmp_, overworld_, yaze::zelda3::Overworld::overworld_map(), and yaze::zelda3::OverworldCustomASMHasBeenApplied.

| void yaze::editor::MapPropertiesSystem::SetupCanvasContextMenu | ( | gui::Canvas & | canvas, |
| int | current_map, | ||
| bool | current_map_lock, | ||
| bool & | show_map_properties_panel, | ||
| bool & | show_custom_bg_color_editor, | ||
| bool & | show_overlay_editor, | ||
| int | current_mode = 0 |
||
| ) |
Definition at line 411 of file map_properties.cc.
References yaze::gui::Canvas::AddContextMenuItem(), yaze::gui::CanvasMenuItem::callback, yaze::gui::Canvas::ClearContextMenuItems(), entity_insert_callback_, yaze::gui::Canvas::global_scale(), ICON_MD_ADD_LOCATION, ICON_MD_CYCLONE, ICON_MD_DOOR_BACK, ICON_MD_DOOR_FRONT, ICON_MD_FORMAT_COLOR_FILL, ICON_MD_GRASS, ICON_MD_LAYERS, ICON_MD_PEST_CONTROL_RODENT, ICON_MD_RESTORE, ICON_MD_TUNE, ICON_MD_ZOOM_IN, ICON_MD_ZOOM_OUT, yaze::gui::CanvasMenuItem::label, yaze::zelda3::OverworldCustomASMHasBeenApplied, yaze::gui::Canvas::set_global_scale(), yaze::gui::Canvas::set_scrolling(), and yaze::gui::CanvasMenuItem::subitems.
|
private |
Definition at line 541 of file map_properties.cc.
References ForceRefreshGraphics(), yaze::gui::LayoutHelpers::GetButtonPadding(), yaze::gui::LayoutHelpers::GetStandardSpacing(), HOVER_HINT, ICON_MD_ANIMATION, ICON_MD_GRID_VIEW, ICON_MD_IMAGE, ICON_MD_INFO, ICON_MD_LAYERS, ICON_MD_PETS, yaze::gui::InputHexByte(), yaze::editor::kGameStateNames, yaze::editor::kHexByteInputWidth, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshMapProperties(), RefreshOverworldMap(), RefreshSiblingMapGraphics(), and RefreshTile16Blockset().
Referenced by DrawSimplifiedMapSettings().
|
private |
Definition at line 649 of file map_properties.cc.
References yaze::gui::LayoutHelpers::GetButtonPadding(), yaze::gui::LayoutHelpers::GetStandardSpacing(), HOVER_HINT, ICON_MD_COLOR_LENS, ICON_MD_COLORIZE, ICON_MD_FORMAT_COLOR_FILL, ICON_MD_PALETTE, yaze::gui::InputHexByte(), yaze::editor::kGameStateNames, yaze::editor::kHexByteInputWidth, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshMapPalette(), RefreshMapProperties(), and RefreshOverworldMap().
Referenced by DrawSimplifiedMapSettings().
|
private |
Definition at line 713 of file map_properties.cc.
References yaze::zelda3::Overworld::ConfigureMultiAreaMap(), DrawMosaicControls(), DrawOverlayControls(), yaze::gui::LayoutHelpers::GetButtonPadding(), yaze::gui::LayoutHelpers::GetStandardSpacing(), HOVER_HINT, ICON_MD_ASPECT_RATIO, ICON_MD_AUTO_FIX_HIGH, ICON_MD_GAMEPAD, ICON_MD_MESSAGE, ICON_MD_OPEN_IN_NEW, ICON_MD_PHOTO_SIZE_SELECT_LARGE, ICON_MD_TUNE, yaze::gui::InputHexWordCustom(), yaze::editor::kAreaSizeNames, yaze::editor::kComboAreaSizeWidth, yaze::editor::kComboGameStateWidth, yaze::editor::kGameStateNames, yaze::editor::kHexWordInputWidth, yaze::zelda3::LargeArea, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::Overworld::overworld_map(), yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshMapProperties(), RefreshOverworldMap(), RefreshSiblingMapGraphics(), and yaze::zelda3::SmallArea.
Referenced by DrawSimplifiedMapSettings().
|
private |
Definition at line 1352 of file map_properties.cc.
References yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshMapProperties(), and RefreshOverworldMap().
Referenced by DrawPropertiesPopup().

|
private |
Definition at line 1380 of file map_properties.cc.
References GetOverlayDescription(), ICON_MD_BLOCK, ICON_MD_CHECK, ICON_MD_EDIT_NOTE, ICON_MD_HELP, ICON_MD_HELP_OUTLINE, ICON_MD_INFO, ICON_MD_LAYERS, ICON_MD_PREVIEW, ICON_MD_STORAGE, ICON_MD_UPGRADE, ICON_MD_VISIBILITY, yaze::gui::InputHexWord(), yaze::editor::kInputFieldSize, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::Overworld::overworld_map(), yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshMapProperties(), and RefreshOverworldMap().
Referenced by DrawPropertiesPopup().
|
private |
Definition at line 1557 of file map_properties.cc.
Referenced by DrawOverlayControls(), and DrawOverlayEditor().
|
private |
|
private |
Definition at line 1659 of file map_properties.cc.
References yaze::gui::LayoutHelpers::GetButtonPadding(), yaze::gui::LayoutHelpers::GetStandardSpacing(), HOVER_HINT, ICON_MD_OPEN_IN_FULL, ICON_MD_ZOOM_IN, ICON_MD_ZOOM_OUT, and yaze::editor::kIconButtonWidth.
Referenced by DrawSimplifiedMapSettings().

|
private |
Definition at line 1697 of file map_properties.cc.
References yaze::gui::LayoutHelpers::GetButtonPadding(), yaze::gui::LayoutHelpers::GetStandardSpacing(), HOVER_HINT, ICON_MD_CONTENT_COPY, ICON_MD_GRID_VIEW, ICON_MD_LOCK, and yaze::editor::kIconButtonWidth.
Referenced by DrawSimplifiedMapSettings().

|
private |
Definition at line 827 of file map_properties.cc.
References ICON_MD_BLUR_ON, ICON_MD_IMAGE, ICON_MD_MESSAGE, ICON_MD_MUSIC_NOTE, ICON_MD_PALETTE, yaze::gui::InputHexByte(), yaze::gui::InputHexWord(), yaze::editor::kInputFieldSize, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, RefreshMapPalette(), RefreshMapProperties(), RefreshOverworldMap(), RefreshSiblingMapGraphics(), and RefreshTile16Blockset().
Referenced by DrawMapPropertiesPanel().
|
private |
Definition at line 951 of file map_properties.cc.
References ICON_MD_COLORIZE, ICON_MD_GAMEPAD, ICON_MD_PETS, yaze::gui::InputHexByte(), yaze::editor::kGameStateNames, yaze::editor::kInputFieldSize, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, RefreshMapProperties(), and RefreshOverworldMap().
Referenced by DrawMapPropertiesPanel().

|
private |
Definition at line 1030 of file map_properties.cc.
References yaze::zelda3::Overworld::ConfigureMultiAreaMap(), ICON_MD_ANIMATION, ICON_MD_COLOR_LENS, ICON_MD_LAYERS, ICON_MD_PHOTO_SIZE_SELECT_LARGE, yaze::gui::InputHexByte(), yaze::gui::InputHexWord(), yaze::editor::kInputFieldSize, yaze::zelda3::LargeArea, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::Overworld::overworld_map(), yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshMapPalette(), RefreshMapProperties(), RefreshOverworldMap(), RefreshSiblingMapGraphics(), and yaze::zelda3::SmallArea.
Referenced by DrawMapPropertiesPanel().
|
private |
Definition at line 1133 of file map_properties.cc.
References ForceRefreshGraphics(), ICON_MD_GRID_VIEW, ICON_MD_INFO, ICON_MD_LAYERS, yaze::gui::InputHexByte(), yaze::editor::kInputFieldSize, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, yaze::zelda3::OverworldCustomASMHasBeenApplied, RefreshMapProperties(), RefreshOverworldMap(), RefreshSiblingMapGraphics(), and RefreshTile16Blockset().
Referenced by DrawMapPropertiesPanel().
|
private |
Definition at line 1185 of file map_properties.cc.
References ICON_MD_CASTLE, ICON_MD_FAVORITE, ICON_MD_HELP_OUTLINE, ICON_MD_MUSIC_NOTE, ICON_MD_OFFLINE_BOLT, ICON_MD_PLAY_ARROW, yaze::gui::InputHexByte(), yaze::editor::kInputFieldSize, yaze::zelda3::kOverworldMusicAgahnim, yaze::zelda3::kOverworldMusicBeginning, yaze::zelda3::kOverworldMusicMasterSword, yaze::zelda3::kOverworldMusicZelda, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, and RefreshMapProperties().
Referenced by DrawMapPropertiesPanel().

|
private |
Definition at line 1269 of file map_properties.cc.
References refresh_map_properties_.
Referenced by DrawBasicPropertiesTab(), DrawCustomFeaturesTab(), DrawGraphicsPopup(), DrawMosaicControls(), DrawMusicTab(), DrawOverlayControls(), DrawPalettesPopup(), DrawPropertiesPopup(), DrawSpritePropertiesTab(), and DrawTileGraphicsTab().
|
private |
Definition at line 1275 of file map_properties.cc.
References refresh_overworld_map_.
Referenced by DrawBasicPropertiesTab(), DrawCustomFeaturesTab(), DrawGraphicsPopup(), DrawMosaicControls(), DrawOverlayControls(), DrawPalettesPopup(), DrawPropertiesPopup(), DrawSimplifiedMapSettings(), DrawSpritePropertiesTab(), DrawTileGraphicsTab(), and RefreshSiblingMapGraphics().
|
private |
Definition at line 1281 of file map_properties.cc.
References refresh_map_palette_.
Referenced by DrawBasicPropertiesTab(), DrawCustomFeaturesTab(), and DrawPalettesPopup().
|
private |
Definition at line 1288 of file map_properties.cc.
References refresh_tile16_blockset_.
Referenced by DrawBasicPropertiesTab(), DrawGraphicsPopup(), and DrawTileGraphicsTab().
|
private |
Definition at line 1295 of file map_properties.cc.
References force_refresh_graphics_.
Referenced by DrawGraphicsPopup(), DrawTileGraphicsTab(), and RefreshSiblingMapGraphics().
|
private |
Definition at line 1301 of file map_properties.cc.
References ForceRefreshGraphics(), yaze::zelda3::kNumOverworldMaps, yaze::zelda3::LargeArea, maps_bmp_, yaze::zelda3::Overworld::mutable_overworld_map(), overworld_, RefreshOverworldMap(), yaze::zelda3::SmallArea, yaze::zelda3::TallArea, and yaze::zelda3::WideArea.
Referenced by DrawBasicPropertiesTab(), DrawCustomFeaturesTab(), DrawGraphicsPopup(), DrawPropertiesPopup(), DrawSimplifiedMapSettings(), and DrawTileGraphicsTab().

|
private |
Definition at line 105 of file map_properties.h.
Referenced by DrawBasicPropertiesTab(), DrawCustomBackgroundColorEditor(), DrawCustomFeaturesTab(), DrawGraphicsPopup(), DrawMapPropertiesPanel(), DrawMosaicControls(), DrawMusicTab(), DrawOverlayControls(), DrawOverlayEditor(), DrawOverlayPreviewOnMap(), DrawPalettesPopup(), DrawPropertiesPopup(), DrawSimplifiedMapSettings(), DrawSpritePropertiesTab(), DrawTileGraphicsTab(), and RefreshSiblingMapGraphics().
|
private |
Definition at line 106 of file map_properties.h.
|
private |
Definition at line 107 of file map_properties.h.
Referenced by DrawOverlayPreviewOnMap(), and RefreshSiblingMapGraphics().
|
private |
Definition at line 108 of file map_properties.h.
Referenced by DrawOverlayPreviewOnMap().
|
private |
Definition at line 111 of file map_properties.h.
Referenced by RefreshMapProperties(), and SetRefreshCallbacks().
|
private |
Definition at line 112 of file map_properties.h.
Referenced by RefreshOverworldMap(), and SetRefreshCallbacks().
|
private |
Definition at line 113 of file map_properties.h.
Referenced by RefreshMapPalette(), and SetRefreshCallbacks().
|
private |
Definition at line 114 of file map_properties.h.
Referenced by RefreshTile16Blockset(), and SetRefreshCallbacks().
|
private |
Definition at line 115 of file map_properties.h.
Referenced by ForceRefreshGraphics(), and SetRefreshCallbacks().
|
private |
Definition at line 118 of file map_properties.h.
Referenced by SetEntityCallbacks(), and SetupCanvasContextMenu().