yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld_canvas_renderer.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_CANVAS_RENDERER_H
2#define YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_CANVAS_RENDERER_H
3
4#include <cstdint>
5#include <unordered_map>
6
7#include "absl/status/status.h"
10#include "imgui/imgui.h"
11
12namespace yaze {
13namespace editor {
14
15class OverworldEditor;
16
33 public:
35
36 // =========================================================================
37 // Main Canvas Drawing
38 // =========================================================================
39
43
44 // =========================================================================
45 // Panel Drawing Methods
46 // =========================================================================
47
49 absl::Status DrawTile16Selector();
50
52 void DrawTile8Selector();
53
55 absl::Status DrawAreaGraphics();
56
58 void DrawV3Settings();
59
61 void DrawMapProperties();
62
65
66 private:
67 // =========================================================================
68 // Internal Canvas Drawing Helpers
69 // =========================================================================
70
72 void DrawOverworldMaps();
73 void DrawMapWithAreaLayers(int map_index, int map_x, int map_y, float scale);
74
75 // Subscreen overlay layer per map (sky, fog, lava, canopy, rain), built in
76 // the map's palette and refreshed when the map's pixels change.
77 struct OverlayLayer {
79 uint64_t bitmap_serial = 0;
80 bool background = false;
81 bool has_overlay = false;
82 };
83 OverlayLayer* EnsureOverlayLayer(int map_index);
84 std::unordered_map<int, OverlayLayer> overlay_layers_;
85 bool PrepareContextMenu(const ImVec2& screen_position);
88
89 // =========================================================================
90 // Data
91 // =========================================================================
92
98};
99
100} // namespace editor
101} // namespace yaze
102
103#endif // YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_CANVAS_RENDERER_H
Handles all canvas drawing and panel rendering for the overworld editor.
absl::Status DrawTile16Selector()
Draw the tile16 selector panel.
gui::AdaptiveSheetScaleMode area_graphics_scale_mode_
absl::Status DrawAreaGraphics()
Draw the area graphics panel.
void DrawMapProperties()
Draw the map properties panel (sidebar-based)
void DrawOverworldProperties()
Draw the overworld properties grid (debug/info view)
void FilterHoveredEntityByMode()
In an entity mode only that entity type responds to hover/drag/menu.
OverworldEditor * editor_
Non-owning pointer to the parent editor.
void DrawOverworldCanvas()
Draw the main overworld canvas with toolbar, maps, and entities. This is the primary entry point call...
bool PrepareContextMenu(const ImVec2 &screen_position)
void DrawV3Settings()
Draw the v3 settings panel.
void DrawMapWithAreaLayers(int map_index, int map_x, int map_y, float scale)
std::unordered_map< int, OverlayLayer > overlay_layers_
void DrawTile8Selector()
Draw the tile8 selector panel (graphics bin)
void DrawOverworldMaps()
Render the 64 overworld map bitmaps to the canvas.
Main UI class for editing overworld maps in A Link to the Past.
Represents a bitmap image optimized for SNES ROM hacking.
Definition bitmap.h:70