liblcf
rpg_movecommand.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_MOVECOMMAND_H
13 #define LCF_RPG_MOVECOMMAND_H
14 
15 // Headers
16 #include <stdint.h>
17 #include <string>
18 #include "enum_tags.h"
19 
23 namespace RPG {
24  class MoveCommand {
25  public:
26  struct Code {
27  enum Index {
28  move_up = 0,
30  move_down = 2,
31  move_left = 3,
40  face_up = 12,
41  face_right = 13,
42  face_down = 14,
43  face_left = 15,
49  face_hero = 21,
51  wait = 23,
52  begin_jump = 24,
53  end_jump = 25,
60  switch_on = 32,
61  switch_off = 33,
69  decrease_transp = 41
70  };
71  };
72  static constexpr auto kCodeTags = makeEnumTags<Code::Index>(
73  "move_up",
74  "move_right",
75  "move_down",
76  "move_left",
77  "move_upright",
78  "move_downright",
79  "move_downleft",
80  "move_upleft",
81  "move_random",
82  "move_towards_hero",
83  "move_away_from_hero",
84  "move_forward",
85  "face_up",
86  "face_right",
87  "face_down",
88  "face_left",
89  "turn_90_degree_right",
90  "turn_90_degree_left",
91  "turn_180_degree",
92  "turn_90_degree_random",
93  "face_random_direction",
94  "face_hero",
95  "face_away_from_hero",
96  "wait",
97  "begin_jump",
98  "end_jump",
99  "lock_facing",
100  "unlock_facing",
101  "increase_movement_speed",
102  "decrease_movement_speed",
103  "increase_movement_frequence",
104  "decrease_movement_frequence",
105  "switch_on",
106  "switch_off",
107  "change_graphic",
108  "play_sound_effect",
109  "walk_everywhere_on",
110  "walk_everywhere_off",
111  "stop_animation",
112  "start_animation",
113  "increase_transp",
114  "decrease_transp"
115  );
116 
117  int32_t command_id = 0;
118  std::string parameter_string;
119  int32_t parameter_a = 0;
120  int32_t parameter_b = 0;
121  int32_t parameter_c = 0;
122  };
123 
124  inline bool operator==(const MoveCommand& l, const MoveCommand& r) {
125  return l.command_id == r.command_id
127  && l.parameter_a == r.parameter_a
128  && l.parameter_b == r.parameter_b
129  && l.parameter_c == r.parameter_c;
130  }
131 
132  inline bool operator!=(const MoveCommand& l, const MoveCommand& r) {
133  return !(l == r);
134  }
135 }
136 
137 #endif
RPG::MoveCommand::Code::decrease_transp
@ decrease_transp
Definition: rpg_movecommand.h:69
RPG::MoveCommand::Code::move_random
@ move_random
Definition: rpg_movecommand.h:36
RPG::operator==
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
RPG::MoveCommand::Code::move_left
@ move_left
Definition: rpg_movecommand.h:31
RPG::MoveCommand::Code::move_downright
@ move_downright
Definition: rpg_movecommand.h:33
RPG::MoveCommand::Code::face_right
@ face_right
Definition: rpg_movecommand.h:41
RPG::MoveCommand::Code::move_away_from_hero
@ move_away_from_hero
Definition: rpg_movecommand.h:38
RPG::MoveCommand::Code::stop_animation
@ stop_animation
Definition: rpg_movecommand.h:66
RPG::MoveCommand::Code::turn_180_degree
@ turn_180_degree
Definition: rpg_movecommand.h:46
RPG::MoveCommand::Code::increase_movement_frequence
@ increase_movement_frequence
Definition: rpg_movecommand.h:58
RPG
Definition: rpg_actor.h:26
RPG::MoveCommand::Code::move_up
@ move_up
Definition: rpg_movecommand.h:28
RPG::MoveCommand::Code::face_down
@ face_down
Definition: rpg_movecommand.h:42
RPG::MoveCommand::Code::decrease_movement_speed
@ decrease_movement_speed
Definition: rpg_movecommand.h:57
RPG::MoveCommand::Code::change_graphic
@ change_graphic
Definition: rpg_movecommand.h:62
RPG::MoveCommand::Code::move_downleft
@ move_downleft
Definition: rpg_movecommand.h:34
RPG::MoveCommand::parameter_string
std::string parameter_string
Definition: rpg_movecommand.h:118
RPG::MoveCommand::Code::face_left
@ face_left
Definition: rpg_movecommand.h:43
RPG::MoveCommand::Code::face_random_direction
@ face_random_direction
Definition: rpg_movecommand.h:48
RPG::MoveCommand::Code::walk_everywhere_on
@ walk_everywhere_on
Definition: rpg_movecommand.h:64
RPG::MoveCommand::kCodeTags
static constexpr auto kCodeTags
Definition: rpg_movecommand.h:72
RPG::MoveCommand::Code::increase_movement_speed
@ increase_movement_speed
Definition: rpg_movecommand.h:56
RPG::MoveCommand::Code::play_sound_effect
@ play_sound_effect
Definition: rpg_movecommand.h:63
RPG::MoveCommand::Code::turn_90_degree_right
@ turn_90_degree_right
Definition: rpg_movecommand.h:44
RPG::MoveCommand::Code::move_upright
@ move_upright
Definition: rpg_movecommand.h:32
RPG::MoveCommand::Code::walk_everywhere_off
@ walk_everywhere_off
Definition: rpg_movecommand.h:65
RPG::MoveCommand::Code::move_towards_hero
@ move_towards_hero
Definition: rpg_movecommand.h:37
RPG::MoveCommand::Code::begin_jump
@ begin_jump
Definition: rpg_movecommand.h:52
RPG::MoveCommand::parameter_c
int32_t parameter_c
Definition: rpg_movecommand.h:121
RPG::MoveCommand::Code::unlock_facing
@ unlock_facing
Definition: rpg_movecommand.h:55
RPG::operator!=
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98
RPG::MoveCommand::parameter_a
int32_t parameter_a
Definition: rpg_movecommand.h:119
RPG::MoveCommand::Code::Index
Index
Definition: rpg_movecommand.h:27
RPG::MoveCommand
Definition: rpg_movecommand.h:24
RPG::MoveCommand::Code::turn_90_degree_random
@ turn_90_degree_random
Definition: rpg_movecommand.h:47
RPG::MoveCommand::Code::turn_90_degree_left
@ turn_90_degree_left
Definition: rpg_movecommand.h:45
RPG::MoveCommand::Code
Definition: rpg_movecommand.h:26
RPG::MoveCommand::Code::end_jump
@ end_jump
Definition: rpg_movecommand.h:53
RPG::MoveCommand::Code::increase_transp
@ increase_transp
Definition: rpg_movecommand.h:68
RPG::MoveCommand::Code::wait
@ wait
Definition: rpg_movecommand.h:51
RPG::MoveCommand::Code::switch_off
@ switch_off
Definition: rpg_movecommand.h:61
RPG::MoveCommand::Code::face_away_from_hero
@ face_away_from_hero
Definition: rpg_movecommand.h:50
RPG::MoveCommand::Code::decrease_movement_frequence
@ decrease_movement_frequence
Definition: rpg_movecommand.h:59
RPG::MoveCommand::Code::start_animation
@ start_animation
Definition: rpg_movecommand.h:67
RPG::MoveCommand::Code::switch_on
@ switch_on
Definition: rpg_movecommand.h:60
RPG::MoveCommand::Code::face_hero
@ face_hero
Definition: rpg_movecommand.h:49
RPG::MoveCommand::Code::lock_facing
@ lock_facing
Definition: rpg_movecommand.h:54
RPG::MoveCommand::Code::face_up
@ face_up
Definition: rpg_movecommand.h:40
RPG::MoveCommand::Code::move_right
@ move_right
Definition: rpg_movecommand.h:29
RPG::MoveCommand::Code::move_forward
@ move_forward
Definition: rpg_movecommand.h:39
RPG::MoveCommand::Code::move_upleft
@ move_upleft
Definition: rpg_movecommand.h:35
RPG::MoveCommand::Code::move_down
@ move_down
Definition: rpg_movecommand.h:30
RPG::MoveCommand::parameter_b
int32_t parameter_b
Definition: rpg_movecommand.h:120
enum_tags.h
RPG::MoveCommand::command_id
int32_t command_id
Definition: rpg_movecommand.h:117