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

#include <map_properties.h>

Collaboration diagram for yaze::editor::MapPropertiesSystem:

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 SetTile16EditCallback (std::function< void()> callback)
 
void DrawCanvasToolbar (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, EditingMode &current_mode, EntityEditMode &entity_edit_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)
 
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 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 &current_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)
 

Private Attributes

zelda3::Overworldoverworld_
 
Romrom_
 
std::array< gfx::Bitmap, zelda3::kNumOverworldMaps > * maps_bmp_
 
gui::Canvascanvas_
 
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_ )
 
std::function< void()> edit_tile16_callback_
 

Detailed Description

Definition at line 21 of file map_properties.h.

Member Typedef Documentation

◆ RefreshCallback

Definition at line 24 of file map_properties.h.

◆ RefreshPaletteCallback

using yaze::editor::MapPropertiesSystem::RefreshPaletteCallback = std::function<absl::Status()>

Definition at line 25 of file map_properties.h.

◆ ForceRefreshGraphicsCallback

Definition at line 26 of file map_properties.h.

Constructor & Destructor Documentation

◆ MapPropertiesSystem()

yaze::editor::MapPropertiesSystem::MapPropertiesSystem ( zelda3::Overworld * overworld,
Rom * rom,
std::array< gfx::Bitmap, zelda3::kNumOverworldMaps > * maps_bmp = nullptr,
gui::Canvas * canvas = nullptr )
inlineexplicit

Definition at line 28 of file map_properties.h.

Member Function Documentation

◆ SetRefreshCallbacks()

void yaze::editor::MapPropertiesSystem::SetRefreshCallbacks ( RefreshCallback refresh_map_properties,
RefreshCallback refresh_overworld_map,
RefreshPaletteCallback refresh_map_palette,
RefreshPaletteCallback refresh_tile16_blockset = nullptr,
ForceRefreshGraphicsCallback force_refresh_graphics = nullptr )
inline

◆ SetEntityCallbacks()

void yaze::editor::MapPropertiesSystem::SetEntityCallbacks ( std::function< void(const std::string &)> insert_callback)
inline

Definition at line 52 of file map_properties.h.

References entity_insert_callback_.

◆ SetTile16EditCallback()

void yaze::editor::MapPropertiesSystem::SetTile16EditCallback ( std::function< void()> callback)
inline

Definition at line 58 of file map_properties.h.

References edit_tile16_callback_.

◆ DrawCanvasToolbar()

void yaze::editor::MapPropertiesSystem::DrawCanvasToolbar ( 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,
EditingMode & current_mode,
EntityEditMode & entity_edit_mode )

◆ DrawMapPropertiesPanel()

void yaze::editor::MapPropertiesSystem::DrawMapPropertiesPanel ( int current_map,
bool & show_map_properties_panel )

◆ DrawCustomBackgroundColorEditor()

◆ DrawOverlayEditor()

◆ DrawOverlayPreviewOnMap()

void yaze::editor::MapPropertiesSystem::DrawOverlayPreviewOnMap ( int current_map,
int current_world,
bool show_overlay_preview )

◆ SetupCanvasContextMenu()

◆ RefreshMapProperties()

◆ RefreshOverworldMap()

◆ RefreshMapPalette()

absl::Status yaze::editor::MapPropertiesSystem::RefreshMapPalette ( )

◆ RefreshTile16Blockset()

absl::Status yaze::editor::MapPropertiesSystem::RefreshTile16Blockset ( )

◆ ForceRefreshGraphics()

void yaze::editor::MapPropertiesSystem::ForceRefreshGraphics ( int map_index)

◆ RefreshSiblingMapGraphics()

◆ DrawGraphicsPopup()

◆ DrawPalettesPopup()

◆ DrawPropertiesPopup()

◆ DrawMosaicControls()

◆ DrawOverlayControls()

◆ GetOverlayDescription()

std::string yaze::editor::MapPropertiesSystem::GetOverlayDescription ( uint16_t overlay_id)
private

Definition at line 1572 of file map_properties.cc.

Referenced by DrawOverlayControls(), and DrawOverlayEditor().

◆ DrawToolsPopup()

void yaze::editor::MapPropertiesSystem::DrawToolsPopup ( int & current_mode)
private

◆ DrawViewPopup()

◆ DrawQuickAccessPopup()

◆ DrawBasicPropertiesTab()

◆ DrawSpritePropertiesTab()

void yaze::editor::MapPropertiesSystem::DrawSpritePropertiesTab ( int current_map)
private

◆ DrawCustomFeaturesTab()

◆ DrawTileGraphicsTab()

◆ DrawMusicTab()

Member Data Documentation

◆ overworld_

◆ rom_

◆ maps_bmp_

std::array<gfx::Bitmap, zelda3::kNumOverworldMaps>* yaze::editor::MapPropertiesSystem::maps_bmp_
private

Definition at line 126 of file map_properties.h.

Referenced by DrawOverlayPreviewOnMap(), and RefreshSiblingMapGraphics().

◆ canvas_

gui::Canvas* yaze::editor::MapPropertiesSystem::canvas_
private

Definition at line 127 of file map_properties.h.

Referenced by DrawCanvasToolbar(), DrawOverlayPreviewOnMap(), and DrawViewPopup().

◆ refresh_map_properties_

RefreshCallback yaze::editor::MapPropertiesSystem::refresh_map_properties_
private

Definition at line 130 of file map_properties.h.

Referenced by RefreshMapProperties(), and SetRefreshCallbacks().

◆ refresh_overworld_map_

RefreshCallback yaze::editor::MapPropertiesSystem::refresh_overworld_map_
private

Definition at line 131 of file map_properties.h.

Referenced by RefreshOverworldMap(), and SetRefreshCallbacks().

◆ refresh_map_palette_

RefreshPaletteCallback yaze::editor::MapPropertiesSystem::refresh_map_palette_
private

Definition at line 132 of file map_properties.h.

Referenced by RefreshMapPalette(), and SetRefreshCallbacks().

◆ refresh_tile16_blockset_

RefreshPaletteCallback yaze::editor::MapPropertiesSystem::refresh_tile16_blockset_
private

Definition at line 133 of file map_properties.h.

Referenced by RefreshTile16Blockset(), and SetRefreshCallbacks().

◆ force_refresh_graphics_

ForceRefreshGraphicsCallback yaze::editor::MapPropertiesSystem::force_refresh_graphics_
private

Definition at line 134 of file map_properties.h.

Referenced by ForceRefreshGraphics(), and SetRefreshCallbacks().

◆ entity_insert_callback_

std::function<void(const std::string&) yaze::editor::MapPropertiesSystem::entity_insert_callback_)
private

Definition at line 137 of file map_properties.h.

Referenced by SetEntityCallbacks(), and SetupCanvasContextMenu().

◆ edit_tile16_callback_

std::function<void()> yaze::editor::MapPropertiesSystem::edit_tile16_callback_
private

Definition at line 140 of file map_properties.h.

Referenced by SetTile16EditCallback(), and SetupCanvasContextMenu().


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