yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
story_event_graph_navigation.h
Go to the documentation of this file.
1
#ifndef YAZE_APP_EDITOR_ORACLE_STORY_EVENT_GRAPH_NAVIGATION_H
2
#define YAZE_APP_EDITOR_ORACLE_STORY_EVENT_GRAPH_NAVIGATION_H
3
4
#include <optional>
5
6
#include "
zelda3/common.h
"
7
8
namespace
yaze::editor
{
9
10
inline
bool
IsValidOverworldMapJumpTarget
(
int
map_id) {
11
return
map_id >= 0 && map_id <
zelda3::kNumOverworldMaps
;
12
}
13
14
inline
std::optional<int>
ResolveStoryLocationMapJumpTarget
(
15
const
std::optional<int>& overworld_id,
16
const
std::optional<int>& special_world_id) {
17
if
(overworld_id.has_value() &&
18
IsValidOverworldMapJumpTarget
(*overworld_id)) {
19
return
overworld_id;
20
}
21
if
(special_world_id.has_value() &&
22
IsValidOverworldMapJumpTarget
(*special_world_id)) {
23
return
special_world_id;
24
}
25
return
std::nullopt;
26
}
27
28
}
// namespace yaze::editor
29
30
#endif
// YAZE_APP_EDITOR_ORACLE_STORY_EVENT_GRAPH_NAVIGATION_H
yaze::editor
Editors are the view controllers for the application.
Definition
patch_export_usage.cc:9
yaze::editor::IsValidOverworldMapJumpTarget
bool IsValidOverworldMapJumpTarget(int map_id)
Definition
story_event_graph_navigation.h:10
yaze::editor::ResolveStoryLocationMapJumpTarget
std::optional< int > ResolveStoryLocationMapJumpTarget(const std::optional< int > &overworld_id, const std::optional< int > &special_world_id)
Definition
story_event_graph_navigation.h:14
yaze::zelda3::kNumOverworldMaps
constexpr int kNumOverworldMaps
Definition
common.h:85
common.h
src
app
editor
oracle
story_event_graph_navigation.h
Generated by
1.10.0