yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_render_context.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_DUNGEON_RENDER_CONTEXT_H_
2#define YAZE_APP_EDITOR_DUNGEON_DUNGEON_RENDER_CONTEXT_H_
3
4#include <cstdint>
5#include <span>
6#include <string>
7#include <vector>
8
11
12namespace yaze::core {
13struct DungeonEntry;
14}
15
16namespace yaze::editor {
17
25
27 int slot = -1;
28 int room_id = -1;
29 uint8_t main_gfx = 0xFF;
30};
31
53
54std::string DungeonEntrancePreviewLabel(int slot);
55
57// Includes the loader's fallback provenance when no owner entrance resolves.
58const char* DungeonRenderContextSourceName(const DungeonRenderContext& context);
59
60// Resolves the graphics owner for a room without mutating either the census or
61// entrance records. A selected entrance wins for every previewed room until the user
62// chooses another. Without a selection, an owner entrance is inferred only
63// when every candidate agrees on main GFX.
64DungeonRenderContext ResolveDungeonRenderContext(
65 int room_id, int selected_entrance_slot, uint8_t room_header_blockset,
66 const zelda3::RoomCensus* census,
67 std::span<const DungeonRenderEntranceCandidate> entrances,
68 zelda3::RoomDefaultEntrance default_entrance = {},
69 const core::DungeonEntry* project_dungeon = nullptr);
70
71} // namespace yaze::editor
72
73#endif // YAZE_APP_EDITOR_DUNGEON_DUNGEON_RENDER_CONTEXT_H_
Editors are the view controllers for the application.
std::string DungeonEntrancePreviewLabel(int slot)
const char * DungeonRenderContextSourceName(DungeonRenderContextSource source)
DungeonRenderContext ResolveDungeonRenderContext(int room_id, int selected_entrance_slot, uint8_t room_header_blockset, const zelda3::RoomCensus *census, std::span< const DungeonRenderEntranceCandidate > entrances, zelda3::RoomDefaultEntrance default_entrance, const core::DungeonEntry *project_dungeon)
A complete dungeon entry with rooms and connections.
zelda3::RoomDefaultEntrance default_entrance