-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathcommonevent.h
More file actions
64 lines (56 loc) · 1.57 KB
/
Copy pathcommonevent.h
File metadata and controls
64 lines (56 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* !!!! GENERATED FILE - DO NOT EDIT !!!!
* --------------------------------------
*
* This file is part of liblcf. Copyright (c) 2020 liblcf authors.
* https://github.com/EasyRPG/liblcf - https://easyrpg.org
*
* liblcf is Free/Libre Open Source Software, released under the MIT License.
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code.
*/
#ifndef LCF_RPG_COMMONEVENT_H
#define LCF_RPG_COMMONEVENT_H
// Headers
#include <vector>
#include "lcf/dbstring.h"
#include "lcf/enum_tags.h"
#include "lcf/rpg/eventcommand.h"
#include <ostream>
#include <type_traits>
/**
* rpg::CommonEvent class.
*/
namespace lcf {
namespace rpg {
class CommonEvent {
public:
enum Trigger {
Trigger_automatic = 3,
Trigger_parallel = 4,
Trigger_call = 5
};
int ID = 0;
DBString name;
int32_t trigger = 0;
bool switch_flag = false;
int32_t switch_id = 1;
std::vector<EventCommand> event_commands;
};
inline std::ostream& operator<<(std::ostream& os, CommonEvent::Trigger code) {
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
return os;
}
inline bool operator==(const CommonEvent& l, const CommonEvent& r) {
return l.name == r.name
&& l.trigger == r.trigger
&& l.switch_flag == r.switch_flag
&& l.switch_id == r.switch_id
&& l.event_commands == r.event_commands;
}
inline bool operator!=(const CommonEvent& l, const CommonEvent& r) {
return !(l == r);
}
std::ostream& operator<<(std::ostream& os, const CommonEvent& obj);
} // namespace rpg
} // namespace lcf
#endif