yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld_entity_renderer.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_ENTITY_RENDERER_H
2#define YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_ENTITY_RENDERER_H
3
4#include <vector>
5
8#include "imgui/imgui.h"
9#include "zelda3/common.h"
11
12namespace yaze {
13namespace editor {
14
15class OverworldEditor; // Forward declaration
16struct AgentUITheme;
17
25ImVec4 EntityMarkerColor(const AgentUITheme& theme,
27 bool is_hole = false);
28
38 public:
40 std::vector<gfx::Bitmap>* sprite_previews)
41 : overworld_(overworld),
42 canvas_(canvas),
43 sprite_previews_(sprite_previews) {}
44
45 // ==========================================================================
46 // Modern CanvasRuntime-based rendering methods (Phase 2)
47 // ==========================================================================
48 // These methods accept a CanvasRuntime reference and use stateless helpers.
49
50 void DrawEntrances(const gui::CanvasRuntime& rt, int current_world);
51 void DrawExits(const gui::CanvasRuntime& rt, int current_world);
52 void DrawItems(const gui::CanvasRuntime& rt, int current_world);
53 void DrawSprites(const gui::CanvasRuntime& rt, int current_world,
54 int game_state);
55
56 // ==========================================================================
57 // Legacy rendering methods (kept for backward compatibility)
58 // ==========================================================================
59 void DrawEntrances(ImVec2 canvas_p0, ImVec2 scrolling, int current_world,
60 int current_mode);
61 void DrawExits(ImVec2 canvas_p0, ImVec2 scrolling, int current_world,
62 int current_mode);
63 void DrawItems(int current_world, int current_mode);
64 void DrawSprites(int current_world, int game_state, int current_mode);
65
75 void DrawDiggableTileHighlights(int current_world, int current_map);
76
77 auto hovered_entity() const { return hovered_entity_; }
78 void ResetHoveredEntity() { hovered_entity_ = nullptr; }
81
82 private:
86 std::vector<gfx::Bitmap>* sprite_previews_;
88};
89
90} // namespace editor
91} // namespace yaze
92
93#endif // YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_ENTITY_RENDERER_H
Handles visualization of all overworld entities (entrances, exits, items, sprites)
void DrawDiggableTileHighlights(int current_world, int current_map)
Draw highlights for all diggable tiles on the current map.
void DrawItems(const gui::CanvasRuntime &rt, int current_world)
void DrawExits(const gui::CanvasRuntime &rt, int current_world)
void DrawSprites(const gui::CanvasRuntime &rt, int current_world, int game_state)
void DrawEntrances(const gui::CanvasRuntime &rt, int current_world)
OverworldEntityRenderer(zelda3::Overworld *overworld, gui::Canvas *canvas, std::vector< gfx::Bitmap > *sprite_previews)
Modern, robust canvas for drawing and manipulating graphics.
Definition canvas.h:64
Base class for all overworld and dungeon entities.
Definition common.h:31
ImVec4 EntityMarkerColor(const AgentUITheme &theme, EntityType type, bool is_hole)
Centralized theme colors for Agent UI components.
Definition agent_theme.h:19