liblcf
rpg_savepicture.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_SAVEPICTURE_H
13 #define LCF_RPG_SAVEPICTURE_H
14 
15 // Headers
16 #include <array>
17 #include <stdint.h>
18 #include <string>
19 #include "enum_tags.h"
20 
24 namespace RPG {
25  class SavePicture {
26  public:
27  enum Effect {
31  };
32  static constexpr auto kEffectTags = makeEnumTags<Effect>(
33  "none",
34  "rotation",
35  "wave"
36  );
37  enum MapLayer {
49  };
50  static constexpr auto kMapLayerTags = makeEnumTags<MapLayer>(
51  "none",
52  "parallax",
53  "tilemap_below",
54  "events_below",
55  "events_same_as_player",
56  "tilemap_above",
57  "events_above",
58  "weather",
59  "animations",
60  "windows",
61  "timers"
62  );
63  enum BattleLayer {
70  };
71  static constexpr auto kBattleLayerTags = makeEnumTags<BattleLayer>(
72  "none",
73  "background",
74  "battlers_and_animations",
75  "weather",
76  "windows_and_status",
77  "timers"
78  );
79 
80  int ID = 0;
81  std::string name;
82  double start_x = 0.0;
83  double start_y = 0.0;
84  double current_x = 0.0;
85  double current_y = 0.0;
86  bool fixed_to_map = false;
87  double current_magnify = 100.0;
88  double current_top_trans = 0.0;
89  bool use_transparent_color = false;
90  double current_red = 100.0;
91  double current_green = 100.0;
92  double current_blue = 100.0;
93  double current_sat = 100.0;
94  int32_t effect_mode = 0;
95  double current_effect_power = 0.0;
96  double current_bot_trans = 0.0;
97  int32_t spritesheet_cols = 1;
98  int32_t spritesheet_rows = 1;
99  int32_t spritesheet_frame = 0;
100  int32_t spritesheet_speed = 0;
101  int32_t frames = 0;
102  bool spritesheet_play_once = false;
103  int32_t map_layer = 7;
104  int32_t battle_layer = 0;
105  struct Flags {
106  union {
107  struct {
115  };
116  std::array<bool, 7> flags;
117  };
118  //TODO: Should try to switch to member initializers when we upgrade to VS2017.
120  {}
121  } flags;
122  double finish_x = 0.0;
123  double finish_y = 0.0;
124  int32_t finish_magnify = 100;
125  int32_t finish_top_trans = 0;
126  int32_t finish_bot_trans = 0;
127  int32_t finish_red = 100;
128  int32_t finish_green = 100;
129  int32_t finish_blue = 100;
130  int32_t finish_sat = 100;
131  int32_t finish_effect_power = 0;
132  int32_t time_left = 0;
133  double current_rotation = 0.0;
134  int32_t current_waver = 0;
135  };
136 
137  inline bool operator==(const SavePicture::Flags& l, const SavePicture::Flags& r) {
138  return l.flags == r.flags;
139  }
140 
141  inline bool operator!=(const SavePicture::Flags& l, const SavePicture::Flags& r) {
142  return !(l == r);
143  }
144 
145  inline bool operator==(const SavePicture& l, const SavePicture& r) {
146  return l.name == r.name
147  && l.start_x == r.start_x
148  && l.start_y == r.start_y
149  && l.current_x == r.current_x
150  && l.current_y == r.current_y
151  && l.fixed_to_map == r.fixed_to_map
155  && l.current_red == r.current_red
156  && l.current_green == r.current_green
157  && l.current_blue == r.current_blue
158  && l.current_sat == r.current_sat
159  && l.effect_mode == r.effect_mode
166  && l.frames == r.frames
168  && l.map_layer == r.map_layer
169  && l.battle_layer == r.battle_layer
170  && l.flags == r.flags
171  && l.finish_x == r.finish_x
172  && l.finish_y == r.finish_y
176  && l.finish_red == r.finish_red
177  && l.finish_green == r.finish_green
178  && l.finish_blue == r.finish_blue
179  && l.finish_sat == r.finish_sat
181  && l.time_left == r.time_left
183  && l.current_waver == r.current_waver;
184  }
185 
186  inline bool operator!=(const SavePicture& l, const SavePicture& r) {
187  return !(l == r);
188  }
189 }
190 
191 #endif
double current_effect_power
struct RPG::SavePicture::Flags flags
static constexpr auto kBattleLayerTags
static constexpr auto kEffectTags
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
std::string name
int32_t finish_effect_power
static constexpr auto kMapLayerTags
Definition: rpg_actor.h:26
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98
int32_t spritesheet_cols
int32_t spritesheet_frame
std::array< bool, 7 > flags
int32_t spritesheet_rows