liblcf
rpg_mapinfo.h
Go to the documentation of this file.
1 /* !!!! GENERATED FILE - DO NOT EDIT !!!!
2  * --------------------------------------
3  *
4  * This file is part of liblcf. Copyright (c) 2020 liblcf authors.
5  * https://github.com/EasyRPG/liblcf - https://easyrpg.org
6  *
7  * liblcf is Free/Libre Open Source Software, released under the MIT License.
8  * For the full copyright and license information, please view the COPYING
9  * file that was distributed with this source code.
10  */
11 
12 #ifndef LCF_RPG_MAPINFO_H
13 #define LCF_RPG_MAPINFO_H
14 
15 // Headers
16 #include <stdint.h>
17 #include <string>
18 #include <vector>
19 #include "enum_tags.h"
20 #include "rpg_encounter.h"
21 #include "rpg_music.h"
22 #include "rpg_rect.h"
23 
27 namespace RPG {
28  class MapInfo {
29  public:
30  enum MusicType {
34  };
35  static constexpr auto kMusicTypeTags = makeEnumTags<MusicType>(
36  "parent",
37  "event",
38  "specific"
39  );
40  enum BGMType {
44  };
45  static constexpr auto kBGMTypeTags = makeEnumTags<BGMType>(
46  "parent",
47  "terrain",
48  "specific"
49  );
50  enum TriState {
53  TriState_forbid = 2
54  };
55  static constexpr auto kTriStateTags = makeEnumTags<TriState>(
56  "parent",
57  "allow",
58  "forbid"
59  );
60 
61  int ID = 0;
62  std::string name;
63  int32_t parent_map = 0;
64  int32_t indentation = 0;
65  int32_t type = -1;
66  int32_t scrollbar_x = 0;
67  int32_t scrollbar_y = 0;
68  bool expanded_node = false;
69  int32_t music_type = 0;
71  int32_t background_type = 0;
72  std::string background_name;
73  int32_t teleport = 0;
74  int32_t escape = 0;
75  int32_t save = 0;
76  std::vector<Encounter> encounters;
77  int32_t encounter_steps = 25;
79  };
80 
81  inline bool operator==(const MapInfo& l, const MapInfo& r) {
82  return l.name == r.name
83  && l.parent_map == r.parent_map
84  && l.indentation == r.indentation
85  && l.type == r.type
86  && l.scrollbar_x == r.scrollbar_x
87  && l.scrollbar_y == r.scrollbar_y
89  && l.music_type == r.music_type
90  && l.music == r.music
93  && l.teleport == r.teleport
94  && l.escape == r.escape
95  && l.save == r.save
96  && l.encounters == r.encounters
98  && l.area_rect == r.area_rect;
99  }
100 
101  inline bool operator!=(const MapInfo& l, const MapInfo& r) {
102  return !(l == r);
103  }
104 }
105 
106 #endif
RPG::MapInfo::parent_map
int32_t parent_map
Definition: rpg_mapinfo.h:63
RPG::MapInfo::kTriStateTags
static constexpr auto kTriStateTags
Definition: rpg_mapinfo.h:55
RPG::MapInfo::scrollbar_x
int32_t scrollbar_x
Definition: rpg_mapinfo.h:66
RPG::operator==
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
RPG::MapInfo::MusicType_specific
@ MusicType_specific
Definition: rpg_mapinfo.h:33
rpg_music.h
rpg_rect.h
RPG::MapInfo::BGMType_parent
@ BGMType_parent
Definition: rpg_mapinfo.h:41
RPG::MapInfo::indentation
int32_t indentation
Definition: rpg_mapinfo.h:64
RPG::MapInfo::TriState
TriState
Definition: rpg_mapinfo.h:50
RPG
Definition: rpg_actor.h:26
RPG::MapInfo::type
int32_t type
Definition: rpg_mapinfo.h:65
RPG::MapInfo::MusicType
MusicType
Definition: rpg_mapinfo.h:30
RPG::MapInfo::BGMType_specific
@ BGMType_specific
Definition: rpg_mapinfo.h:43
RPG::MapInfo::kMusicTypeTags
static constexpr auto kMusicTypeTags
Definition: rpg_mapinfo.h:35
RPG::MapInfo::scrollbar_y
int32_t scrollbar_y
Definition: rpg_mapinfo.h:67
RPG::MapInfo::BGMType_terrain
@ BGMType_terrain
Definition: rpg_mapinfo.h:42
rpg_encounter.h
RPG::Rect
Definition: rpg_rect.h:22
RPG::MapInfo::area_rect
Rect area_rect
Definition: rpg_mapinfo.h:78
RPG::Music
Definition: rpg_music.h:23
RPG::MapInfo::music
Music music
Definition: rpg_mapinfo.h:70
RPG::MapInfo::TriState_allow
@ TriState_allow
Definition: rpg_mapinfo.h:52
RPG::MapInfo::encounters
std::vector< Encounter > encounters
Definition: rpg_mapinfo.h:76
RPG::MapInfo::TriState_parent
@ TriState_parent
Definition: rpg_mapinfo.h:51
RPG::MapInfo::ID
int ID
Definition: rpg_mapinfo.h:61
RPG::MapInfo::BGMType
BGMType
Definition: rpg_mapinfo.h:40
RPG::MapInfo::background_type
int32_t background_type
Definition: rpg_mapinfo.h:71
RPG::MapInfo::background_name
std::string background_name
Definition: rpg_mapinfo.h:72
RPG::MapInfo::MusicType_event
@ MusicType_event
Definition: rpg_mapinfo.h:32
RPG::MapInfo::kBGMTypeTags
static constexpr auto kBGMTypeTags
Definition: rpg_mapinfo.h:45
RPG::MapInfo::teleport
int32_t teleport
Definition: rpg_mapinfo.h:73
RPG::operator!=
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98
RPG::MapInfo::escape
int32_t escape
Definition: rpg_mapinfo.h:74
RPG::MapInfo::music_type
int32_t music_type
Definition: rpg_mapinfo.h:69
RPG::MapInfo::expanded_node
bool expanded_node
Definition: rpg_mapinfo.h:68
RPG::MapInfo::encounter_steps
int32_t encounter_steps
Definition: rpg_mapinfo.h:77
RPG::MapInfo::MusicType_parent
@ MusicType_parent
Definition: rpg_mapinfo.h:31
RPG::MapInfo::save
int32_t save
Definition: rpg_mapinfo.h:75
RPG::MapInfo::name
std::string name
Definition: rpg_mapinfo.h:62
RPG::MapInfo
Definition: rpg_mapinfo.h:28
RPG::MapInfo::TriState_forbid
@ TriState_forbid
Definition: rpg_mapinfo.h:53
enum_tags.h