Update overworld map properties and overlay functionality

- Changed the included assembly file for custom overworld to version 3 for improved features.
- Enhanced documentation in the overworld loading guide to clarify overlay effects and configurations.
- Refactored MapPropertiesSystem to support overlay previews and improved mosaic controls.
- Added functionality for loading vanilla overlays and displaying overlay descriptions in the editor.
- Updated UI components in OverworldEditor to integrate new overlay settings and preview options.
This commit is contained in:
scawful
2025-09-24 20:16:53 -04:00
parent b633e57ae7
commit 912cc3fb56
8 changed files with 860 additions and 526 deletions

View File

@@ -4,20 +4,22 @@
#include "app/zelda3/overworld/overworld.h"
#include "app/rom.h"
#include "app/gui/canvas.h"
#include "imgui/imgui.h"
namespace yaze {
namespace editor {
class MapPropertiesSystem {
public:
explicit MapPropertiesSystem(zelda3::Overworld* overworld, Rom* rom)
: overworld_(overworld), rom_(rom) {}
explicit MapPropertiesSystem(zelda3::Overworld* overworld, Rom* rom,
std::array<gfx::Bitmap, zelda3::kNumOverworldMaps>* maps_bmp = nullptr,
gui::Canvas* canvas = nullptr)
: overworld_(overworld), rom_(rom), maps_bmp_(maps_bmp), canvas_(canvas) {}
// Main interface methods
void 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_custom_bg_color_editor, bool& show_overlay_editor,
bool& show_overlay_preview, int& game_state);
void DrawMapPropertiesPanel(int current_map, bool& show_map_properties_panel);
@@ -25,6 +27,9 @@ class MapPropertiesSystem {
void DrawOverlayEditor(int current_map, bool& show_overlay_editor);
// Overlay preview functionality
void DrawOverlayPreviewOnMap(int current_map, int current_world, bool show_overlay_preview);
// Context menu integration
void SetupCanvasContextMenu(gui::Canvas& canvas, int current_map, bool current_map_lock,
bool& show_map_properties_panel, bool& show_custom_bg_color_editor,
@@ -34,8 +39,13 @@ class MapPropertiesSystem {
// Property category drawers
void DrawGraphicsPopup(int current_map);
void DrawPalettesPopup(int current_map, bool& show_custom_bg_color_editor);
void DrawOverlaysPopup(int current_map, bool& show_overlay_editor);
void DrawPropertiesPopup(int current_map, bool& show_map_properties_panel);
void DrawPropertiesPopup(int current_map, bool& show_map_properties_panel,
bool& show_overlay_preview, int& game_state);
// Overlay and mosaic functionality
void DrawMosaicControls(int current_map);
void DrawOverlayControls(int current_map, bool& show_overlay_preview);
std::string GetOverlayDescription(uint16_t overlay_id);
// Tab content drawers
void DrawBasicPropertiesTab(int current_map);
@@ -50,6 +60,8 @@ class MapPropertiesSystem {
zelda3::Overworld* overworld_;
Rom* rom_;
std::array<gfx::Bitmap, zelda3::kNumOverworldMaps>* maps_bmp_;
gui::Canvas* canvas_;
// Static constants
static constexpr float kInputFieldSize = 30.f;