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
std::string name
Definition: rpg_mapinfo.h:62
std::vector< Encounter > encounters
Definition: rpg_mapinfo.h:76
static constexpr auto kTriStateTags
Definition: rpg_mapinfo.h:55
int32_t parent_map
Definition: rpg_mapinfo.h:63
Rect area_rect
Definition: rpg_mapinfo.h:78
int32_t music_type
Definition: rpg_mapinfo.h:69
bool expanded_node
Definition: rpg_mapinfo.h:68
@ MusicType_specific
Definition: rpg_mapinfo.h:33
std::string background_name
Definition: rpg_mapinfo.h:72
int32_t encounter_steps
Definition: rpg_mapinfo.h:77
int32_t scrollbar_y
Definition: rpg_mapinfo.h:67
int32_t save
Definition: rpg_mapinfo.h:75
static constexpr auto kMusicTypeTags
Definition: rpg_mapinfo.h:35
int32_t type
Definition: rpg_mapinfo.h:65
static constexpr auto kBGMTypeTags
Definition: rpg_mapinfo.h:45
int32_t teleport
Definition: rpg_mapinfo.h:73
int32_t escape
Definition: rpg_mapinfo.h:74
int32_t background_type
Definition: rpg_mapinfo.h:71
int32_t indentation
Definition: rpg_mapinfo.h:64
int32_t scrollbar_x
Definition: rpg_mapinfo.h:66
Definition: rpg_actor.h:26
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98