yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_chest_editor.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_INSPECTORS_DUNGEON_CHEST_EDITOR_H_
2#define YAZE_APP_EDITOR_DUNGEON_INSPECTORS_DUNGEON_CHEST_EDITOR_H_
3
4#include <array>
5#include <cstddef>
6#include <cstdint>
7#include <optional>
8#include <string>
9#include <vector>
10
11namespace yaze::zelda3 {
12class Room;
13}
14
15namespace yaze::project {
16struct YazeProject;
17}
18
19namespace yaze::editor {
20
21class DungeonCanvasViewer;
22
24 int room_id = -1;
26 std::optional<size_t> last_canvas_selection;
27 std::array<char, 64> search{};
28 std::string error;
29};
30
32 bool open = false;
33 bool request_open = false;
34 int room_id = -1;
35 size_t index = 0;
36 uintptr_t room_identity = 0;
37 uintptr_t rom_identity = 0;
38 std::vector<uint64_t> source_objects;
39 std::vector<uint16_t> source_chests;
40 int item_id = 0;
41 bool big_chest = false;
42 bool mapping_valid = false;
43 std::array<char, 64> search{};
44 std::string error;
45 bool show_diagnostics = false;
48};
49
50// Chest item IDs are receipt-table indices, not inventory slot values. Unknown
51// bytes retain their numeric identity; project item_receipt labels override defaults.
52std::string GetDungeonChestItemLabel(uint8_t item_id);
53std::string GetDungeonChestItemLabel(uint8_t item_id,
54 const project::YazeProject* project);
55
56// Shared chest authoring controls. Placement uses the canvas tool, and structural
57// edits keep the visual chest and its contents in one undoable operation.
58void DrawDungeonChestEditor(int room_id, zelda3::Room& room,
59 DungeonCanvasViewer& viewer);
60
61} // namespace yaze::editor
62
63#endif // YAZE_APP_EDITOR_DUNGEON_INSPECTORS_DUNGEON_CHEST_EDITOR_H_
Editors are the view controllers for the application.
std::string GetDungeonChestItemLabel(uint8_t item_id)
void DrawDungeonChestEditor(int room_id, zelda3::Room &room, DungeonCanvasViewer &viewer)
Zelda 3 specific classes and functions.
Modern project structure with comprehensive settings consolidation.
Definition project.h:290