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
16
26 public:
28 std::vector<gfx::Bitmap>* sprite_previews)
29 : overworld_(overworld),
30 canvas_(canvas),
31 sprite_previews_(sprite_previews) {}
32
33 // ==========================================================================
34 // Modern CanvasRuntime-based rendering methods (Phase 2)
35 // ==========================================================================
36 // These methods accept a CanvasRuntime reference and use stateless helpers.
37
38 void DrawEntrances(const gui::CanvasRuntime& rt, int current_world);
39 void DrawExits(const gui::CanvasRuntime& rt, int current_world);
40 void DrawItems(const gui::CanvasRuntime& rt, int current_world);
41 void DrawSprites(const gui::CanvasRuntime& rt, int current_world,
42 int game_state);
43
44 // ==========================================================================
45 // Legacy rendering methods (kept for backward compatibility)
46 // ==========================================================================
47 void DrawEntrances(ImVec2 canvas_p0, ImVec2 scrolling, int current_world,
48 int current_mode);
49 void DrawExits(ImVec2 canvas_p0, ImVec2 scrolling, int current_world,
50 int current_mode);
51 void DrawItems(int current_world, int current_mode);
52 void DrawSprites(int current_world, int game_state, int current_mode);
53
63 void DrawDiggableTileHighlights(int current_world, int current_map);
64
65 auto hovered_entity() const { return hovered_entity_; }
66 void ResetHoveredEntity() { hovered_entity_ = nullptr; }
69
70 private:
74 std::vector<gfx::Bitmap>* sprite_previews_;
76};
77
78} // namespace editor
79} // namespace yaze
80
81#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:150
Base class for all overworld and dungeon entities.
Definition common.h:31
Represents the full Overworld data, light and dark world.
Definition overworld.h:217