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
7
namespace
yaze
{
8
namespace
editor {
9
10
struct
Tile16NumericShortcutResult
{
11
std::optional<int>
quadrant_focus
;
12
std::optional<uint8_t>
palette_id
;
13
};
14
15
inline
Tile16NumericShortcutResult
ResolveTile16NumericShortcut
(
16
bool
ctrl_held,
int
number_index) {
17
Tile16NumericShortcutResult
result;
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
yaze::editor::ResolveTile16NumericShortcut
Tile16NumericShortcutResult ResolveTile16NumericShortcut(bool ctrl_held, int number_index)
Definition
tile16_editor_shortcuts.h:15
yaze
Definition
patch_export_usage.cc:8
yaze::editor::Tile16NumericShortcutResult
Definition
tile16_editor_shortcuts.h:10
yaze::editor::Tile16NumericShortcutResult::quadrant_focus
std::optional< int > quadrant_focus
Definition
tile16_editor_shortcuts.h:11
yaze::editor::Tile16NumericShortcutResult::palette_id
std::optional< uint8_t > palette_id
Definition
tile16_editor_shortcuts.h:12
src
app
editor
overworld
tile16_editor_shortcuts.h
Generated by
1.10.0