yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
object_layer_semantics.h
Go to the documentation of this file.
1#ifndef YAZE_ZELDA3_DUNGEON_OBJECT_LAYER_SEMANTICS_H_
2#define YAZE_ZELDA3_DUNGEON_OBJECT_LAYER_SEMANTICS_H_
3
4#include <cstdint>
5
8
9namespace yaze {
10namespace zelda3 {
11
12enum class EffectiveBgLayer {
13 kBg1,
14 kBg2,
16};
17
23
26
28 const bool routine_both =
29 (out.routine_id >= 0) &&
31 out.draws_to_both_bgs = object.all_bgs_ || routine_both;
32
33 if (out.draws_to_both_bgs) {
35 return out;
36 }
37
41 return out;
42}
43
44inline const char* EffectiveBgLayerLabel(EffectiveBgLayer layer) {
45 switch (layer) {
47 return "BG1";
49 return "BG2";
51 return "Both BGs";
52 }
53 return "Unknown";
54}
55
56} // namespace zelda3
57} // namespace yaze
58
59#endif // YAZE_ZELDA3_DUNGEON_OBJECT_LAYER_SEMANTICS_H_
60
bool RoutineDrawsToBothBGs(int routine_id) const
int GetRoutineIdForObject(int16_t object_id) const
static DrawRoutineRegistry & Get()
ObjectLayerSemantics GetObjectLayerSemantics(const RoomObject &object)
const char * EffectiveBgLayerLabel(EffectiveBgLayer layer)