liblcf
rpg_trooppagecondition.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_TROOPPAGECONDITION_H
13 #define LCF_RPG_TROOPPAGECONDITION_H
14 
15 // Headers
16 #include <array>
17 #include <stdint.h>
18 
22 namespace RPG {
24  public:
25  struct Flags {
26  union {
27  struct {
28  bool switch_a;
29  bool switch_b;
30  bool variable;
31  bool turn;
32  bool fatigue;
33  bool enemy_hp;
34  bool actor_hp;
35  bool turn_enemy;
36  bool turn_actor;
38  };
39  std::array<bool, 10> flags;
40  };
41  //TODO: Should try to switch to member initializers when we upgrade to VS2017.
42  Flags() noexcept: switch_a(false), switch_b(false), variable(false), turn(false), fatigue(false), enemy_hp(false), actor_hp(false), turn_enemy(false), turn_actor(false), command_actor(false)
43  {}
44  } flags;
45  int32_t switch_a_id = 1;
46  int32_t switch_b_id = 1;
47  int32_t variable_id = 1;
48  int32_t variable_value = 0;
49  int32_t turn_a = 0;
50  int32_t turn_b = 0;
51  int32_t fatigue_min = 0;
52  int32_t fatigue_max = 100;
53  int32_t enemy_id = 0;
54  int32_t enemy_hp_min = 0;
55  int32_t enemy_hp_max = 100;
56  int32_t actor_id = 1;
57  int32_t actor_hp_min = 0;
58  int32_t actor_hp_max = 100;
59  int32_t turn_enemy_id = 0;
60  int32_t turn_enemy_a = 0;
61  int32_t turn_enemy_b = 0;
62  int32_t turn_actor_id = 1;
63  int32_t turn_actor_a = 0;
64  int32_t turn_actor_b = 0;
65  int32_t command_actor_id = 1;
66  int32_t command_id = 1;
67  };
68 
70  return l.flags == r.flags;
71  }
72 
74  return !(l == r);
75  }
76 
77  inline bool operator==(const TroopPageCondition& l, const TroopPageCondition& r) {
78  return l.flags == r.flags
79  && l.switch_a_id == r.switch_a_id
80  && l.switch_b_id == r.switch_b_id
81  && l.variable_id == r.variable_id
83  && l.turn_a == r.turn_a
84  && l.turn_b == r.turn_b
85  && l.fatigue_min == r.fatigue_min
86  && l.fatigue_max == r.fatigue_max
87  && l.enemy_id == r.enemy_id
88  && l.enemy_hp_min == r.enemy_hp_min
89  && l.enemy_hp_max == r.enemy_hp_max
90  && l.actor_id == r.actor_id
91  && l.actor_hp_min == r.actor_hp_min
92  && l.actor_hp_max == r.actor_hp_max
94  && l.turn_enemy_a == r.turn_enemy_a
95  && l.turn_enemy_b == r.turn_enemy_b
97  && l.turn_actor_a == r.turn_actor_a
98  && l.turn_actor_b == r.turn_actor_b
100  && l.command_id == r.command_id;
101  }
102 
103  inline bool operator!=(const TroopPageCondition& l, const TroopPageCondition& r) {
104  return !(l == r);
105  }
106 }
107 
108 #endif
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
struct RPG::TroopPageCondition::Flags flags
Definition: rpg_actor.h:26
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98