liblcf
rpg_animation.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_ANIMATION_H
13 #define LCF_RPG_ANIMATION_H
14 
15 // Headers
16 #include <string>
17 #include <vector>
18 #include "enum_tags.h"
19 #include "rpg_animationframe.h"
20 #include "rpg_animationtiming.h"
21 
25 namespace RPG {
26  class Animation {
27  public:
28  enum Scope {
31  };
32  static constexpr auto kScopeTags = makeEnumTags<Scope>(
33  "target",
34  "screen"
35  );
36  enum Position {
40  };
41  static constexpr auto kPositionTags = makeEnumTags<Position>(
42  "up",
43  "middle",
44  "down"
45  );
46 
47  int ID = 0;
48  std::string name;
49  std::string animation_name;
50  bool large = false;
51  std::vector<AnimationTiming> timings;
52  int32_t scope = 0;
53  int32_t position = 2;
54  std::vector<AnimationFrame> frames;
55  };
56 
57  inline bool operator==(const Animation& l, const Animation& r) {
58  return l.name == r.name
60  && l.large == r.large
61  && l.timings == r.timings
62  && l.scope == r.scope
63  && l.position == r.position
64  && l.frames == r.frames;
65  }
66 
67  inline bool operator!=(const Animation& l, const Animation& r) {
68  return !(l == r);
69  }
70 }
71 
72 #endif
std::string animation_name
Definition: rpg_animation.h:49
static constexpr auto kPositionTags
Definition: rpg_animation.h:41
std::vector< AnimationFrame > frames
Definition: rpg_animation.h:54
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
std::vector< AnimationTiming > timings
Definition: rpg_animation.h:51
Definition: rpg_actor.h:26
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98
static constexpr auto kScopeTags
Definition: rpg_animation.h:32
std::string name
Definition: rpg_animation.h:48
int32_t position
Definition: rpg_animation.h:53