yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
tile16_editor_shortcuts.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_OVERWORLD_TILE16_EDITOR_SHORTCUTS_H
2#define YAZE_APP_EDITOR_OVERWORLD_TILE16_EDITOR_SHORTCUTS_H
3
4#include <cstdint>
5#include <optional>
6
7namespace yaze {
8namespace editor {
9
11 std::optional<int> quadrant_focus;
12 std::optional<uint8_t> palette_id;
13};
14
16 bool ctrl_held, int number_index) {
18 if (number_index < 0 || number_index > 7) {
19 return result;
20 }
21
22 if (ctrl_held) {
23 result.palette_id = static_cast<uint8_t>(number_index);
24 return result;
25 }
26
27 if (number_index <= 3) {
28 result.quadrant_focus = number_index;
29 }
30 return result;
31}
32
33} // namespace editor
34} // namespace yaze
35
36#endif // YAZE_APP_EDITOR_OVERWORLD_TILE16_EDITOR_SHORTCUTS_H
Tile16NumericShortcutResult ResolveTile16NumericShortcut(bool ctrl_held, int number_index)