#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 | 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) |
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) |
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_.
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 24 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 193 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 248 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 303 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 1515 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 | ||
) |
Definition at line 410 of file map_properties.cc.
References yaze::gui::Canvas::AddContextMenuItem(), yaze::gui::Canvas::ContextMenuItem::callback, yaze::gui::Canvas::ClearContextMenuItems(), yaze::gui::Canvas::global_scale(), ICON_MD_FORMAT_COLOR_FILL, ICON_MD_LAYERS, ICON_MD_RESTORE, ICON_MD_TUNE, ICON_MD_ZOOM_IN, ICON_MD_ZOOM_OUT, yaze::gui::Canvas::ContextMenuItem::label, yaze::zelda3::OverworldCustomASMHasBeenApplied, yaze::gui::Canvas::set_global_scale(), and yaze::gui::Canvas::set_scrolling().
|
private |
Definition at line 485 of file map_properties.cc.
References ForceRefreshGraphics(), 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::kCompactFramePadding, yaze::editor::kCompactItemSpacing, 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 589 of file map_properties.cc.
References HOVER_HINT, ICON_MD_COLOR_LENS, ICON_MD_COLORIZE, ICON_MD_FORMAT_COLOR_FILL, ICON_MD_PALETTE, yaze::gui::InputHexByte(), yaze::editor::kCompactFramePadding, yaze::editor::kCompactItemSpacing, 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 649 of file map_properties.cc.
References yaze::zelda3::Overworld::ConfigureMultiAreaMap(), DrawMosaicControls(), DrawOverlayControls(), 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::kCompactFramePadding, yaze::editor::kCompactItemSpacing, 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 1284 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 1312 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 1489 of file map_properties.cc.
Referenced by DrawOverlayControls(), and DrawOverlayEditor().
|
private |
|
private |
Definition at line 1591 of file map_properties.cc.
References HOVER_HINT, ICON_MD_OPEN_IN_FULL, ICON_MD_ZOOM_IN, ICON_MD_ZOOM_OUT, yaze::editor::kCompactFramePadding, yaze::editor::kCompactItemSpacing, and yaze::editor::kIconButtonWidth.
Referenced by DrawSimplifiedMapSettings().
|
private |
Definition at line 1625 of file map_properties.cc.
References HOVER_HINT, ICON_MD_CONTENT_COPY, ICON_MD_GRID_VIEW, ICON_MD_LOCK, yaze::editor::kCompactFramePadding, yaze::editor::kCompactItemSpacing, and yaze::editor::kIconButtonWidth.
Referenced by DrawSimplifiedMapSettings().
|
private |
Definition at line 759 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 883 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 962 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 1065 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 1117 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 1201 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 1207 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 1213 of file map_properties.cc.
References refresh_map_palette_.
Referenced by DrawBasicPropertiesTab(), DrawCustomFeaturesTab(), and DrawPalettesPopup().
|
private |
Definition at line 1220 of file map_properties.cc.
References refresh_tile16_blockset_.
Referenced by DrawBasicPropertiesTab(), DrawGraphicsPopup(), and DrawTileGraphicsTab().
|
private |
Definition at line 1227 of file map_properties.cc.
References force_refresh_graphics_.
Referenced by DrawGraphicsPopup(), DrawTileGraphicsTab(), and RefreshSiblingMapGraphics().
|
private |
Definition at line 1233 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 99 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 100 of file map_properties.h.
|
private |
Definition at line 101 of file map_properties.h.
Referenced by DrawOverlayPreviewOnMap(), and RefreshSiblingMapGraphics().
|
private |
Definition at line 102 of file map_properties.h.
Referenced by DrawOverlayPreviewOnMap().
|
private |
Definition at line 105 of file map_properties.h.
Referenced by RefreshMapProperties(), and SetRefreshCallbacks().
|
private |
Definition at line 106 of file map_properties.h.
Referenced by RefreshOverworldMap(), and SetRefreshCallbacks().
|
private |
Definition at line 107 of file map_properties.h.
Referenced by RefreshMapPalette(), and SetRefreshCallbacks().
|
private |
Definition at line 108 of file map_properties.h.
Referenced by RefreshTile16Blockset(), and SetRefreshCallbacks().
|
private |
Definition at line 109 of file map_properties.h.
Referenced by ForceRefreshGraphics(), and SetRefreshCallbacks().