liblcf
rpg_map.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_MAP_H
13 #define LCF_RPG_MAP_H
14 
15 // Headers
16 #include <stdint.h>
17 #include <string>
18 #include <vector>
19 #include "enum_tags.h"
20 #include "rpg_event.h"
21 
25 namespace RPG {
26  class Map {
27  public:
28  std::string lmu_header;
29  enum ScrollType {
34  };
35  static constexpr auto kScrollTypeTags = makeEnumTags<ScrollType>(
36  "none",
37  "vertical",
38  "horizontal",
39  "both"
40  );
46  };
47  static constexpr auto kGeneratorModeTags = makeEnumTags<GeneratorMode>(
48  "single_passage",
49  "linked_rooms",
50  "maze_passage",
51  "open_room"
52  );
56  };
57  static constexpr auto kGeneratorTilesTags = makeEnumTags<GeneratorTiles>(
58  "one",
59  "two"
60  );
61 
62  int32_t chipset_id = 1;
63  int32_t width = 20;
64  int32_t height = 15;
65  int32_t scroll_type = 0;
66  bool parallax_flag = false;
67  std::string parallax_name;
68  bool parallax_loop_x = false;
69  bool parallax_loop_y = false;
70  bool parallax_auto_loop_x = false;
71  int32_t parallax_sx = 0;
72  bool parallax_auto_loop_y = false;
73  int32_t parallax_sy = 0;
74  bool generator_flag = false;
75  int32_t generator_mode = 0;
76  bool top_level = false;
77  int32_t generator_tiles = 0;
78  int32_t generator_width = 4;
79  int32_t generator_height = 1;
80  bool generator_surround = true;
81  bool generator_upper_wall = true;
82  bool generator_floor_b = true;
83  bool generator_floor_c = true;
84  bool generator_extra_b = true;
85  bool generator_extra_c = true;
86  std::vector<uint32_t> generator_x;
87  std::vector<uint32_t> generator_y;
88  std::vector<int16_t> generator_tile_ids;
89  std::vector<int16_t> lower_layer;
90  std::vector<int16_t> upper_layer;
91  std::vector<Event> events;
92  int32_t save_count_2k3e = 0;
93  int32_t save_count = 0;
94  };
95 
96  inline bool operator==(const Map& l, const Map& r) {
97  return l.chipset_id == r.chipset_id
98  && l.width == r.width
99  && l.height == r.height
100  && l.scroll_type == r.scroll_type
101  && l.parallax_flag == r.parallax_flag
102  && l.parallax_name == r.parallax_name
106  && l.parallax_sx == r.parallax_sx
108  && l.parallax_sy == r.parallax_sy
111  && l.top_level == r.top_level
121  && l.generator_x == r.generator_x
122  && l.generator_y == r.generator_y
124  && l.lower_layer == r.lower_layer
125  && l.upper_layer == r.upper_layer
126  && l.events == r.events
128  && l.save_count == r.save_count;
129  }
130 
131  inline bool operator!=(const Map& l, const Map& r) {
132  return !(l == r);
133  }
134 }
135 
136 #endif
bool generator_extra_c
Definition: rpg_map.h:85
std::vector< int16_t > generator_tile_ids
Definition: rpg_map.h:88
int32_t height
Definition: rpg_map.h:64
bool parallax_auto_loop_x
Definition: rpg_map.h:70
GeneratorTiles
Definition: rpg_map.h:53
ScrollType
Definition: rpg_map.h:29
bool parallax_loop_x
Definition: rpg_map.h:68
bool generator_flag
Definition: rpg_map.h:74
int32_t parallax_sy
Definition: rpg_map.h:73
std::string lmu_header
Definition: rpg_map.h:28
static constexpr auto kGeneratorModeTags
Definition: rpg_map.h:47
bool parallax_loop_y
Definition: rpg_map.h:69
int32_t generator_height
Definition: rpg_map.h:79
int32_t width
Definition: rpg_map.h:63
int32_t generator_tiles
Definition: rpg_map.h:77
int32_t scroll_type
Definition: rpg_map.h:65
std::vector< uint32_t > generator_y
Definition: rpg_map.h:87
int32_t save_count
Definition: rpg_map.h:93
int32_t chipset_id
Definition: rpg_map.h:62
int32_t save_count_2k3e
Definition: rpg_map.h:92
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
bool top_level
Definition: rpg_map.h:76
bool parallax_auto_loop_y
Definition: rpg_map.h:72
static constexpr auto kScrollTypeTags
Definition: rpg_map.h:35
std::vector< int16_t > upper_layer
Definition: rpg_map.h:90
std::string parallax_name
Definition: rpg_map.h:67
int32_t generator_width
Definition: rpg_map.h:78
bool parallax_flag
Definition: rpg_map.h:66
static constexpr auto kGeneratorTilesTags
Definition: rpg_map.h:57
Definition: rpg_actor.h:26
std::vector< uint32_t > generator_x
Definition: rpg_map.h:86
bool generator_upper_wall
Definition: rpg_map.h:81
bool generator_surround
Definition: rpg_map.h:80
GeneratorMode
Definition: rpg_map.h:41
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98
int32_t parallax_sx
Definition: rpg_map.h:71
bool generator_extra_b
Definition: rpg_map.h:84
std::vector< Event > events
Definition: rpg_map.h:91
bool generator_floor_b
Definition: rpg_map.h:82
int32_t generator_mode
Definition: rpg_map.h:75
bool generator_floor_c
Definition: rpg_map.h:83
std::vector< int16_t > lower_layer
Definition: rpg_map.h:89