1 /* !!!! GENERATED FILE - DO NOT EDIT !!!!
2  * --------------------------------------
3  *
4  * This file is part of liblcf. Copyright (c) 2021 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_SAVEPARTYLOCATION_H
13 #define LCF_RPG_SAVEPARTYLOCATION_H
14 
15 // Headers
16 #include "lcf/rpg/savemapeventbase.h"
17 #include <stdint.h>
18 #include "lcf/enum_tags.h"
19 #include "lcf/context.h"
20 #include <ostream>
21 #include <type_traits>
22 
23 /**
24  * rpg::SavePartyLocation class.
25  */
26 namespace lcf {
27 namespace rpg {
28 	class SavePartyLocation : public SaveMapEventBase {
29 	public:
30 		// Equal to 9 tiles in 1/16th pixels
31 		static constexpr int kPanXDefault = 9 * 256;
32 		// Equal to 7 tiles in 1/16th pixels
33 		static constexpr int kPanYDefault = 7 * 256;
34 		// Frame speed in 1/16th pixels
35 		static constexpr int kPanSpeedDefault = 2 << 3;
36 
37 		enum VehicleType {
38 			VehicleType_none = 0,
39 			VehicleType_skiff = 1,
40 			VehicleType_ship = 2,
41 			VehicleType_airship = 3
42 		};
43 		static constexpr auto kVehicleTypeTags = lcf::makeEnumTags<VehicleType>(
44 			"none",
45 			"skiff",
46 			"ship",
47 			"airship"
48 		);
49 		enum PanState {
50 			PanState_fixed = 0,
51 			PanState_follow = 1
52 		};
53 		static constexpr auto kPanStateTags = lcf::makeEnumTags<PanState>(
54 			"fixed",
55 			"follow"
56 		);
57 
58 		bool boarding = false;
59 		bool aboard = false;
60 		int32_t vehicle = 0;
61 		bool unboarding = false;
62 		int32_t preboard_move_speed = 4;
63 		bool menu_calling = false;
64 		int32_t pan_state = 1;
65 		int32_t pan_current_x = kPanXDefault;
66 		int32_t pan_current_y = kPanYDefault;
67 		int32_t pan_finish_x = kPanXDefault;
68 		int32_t pan_finish_y = kPanYDefault;
69 		int32_t pan_speed = kPanSpeedDefault;
70 		int32_t encounter_steps = 0;
71 		bool encounter_calling = false;
72 		int32_t map_save_count = 0;
73 		int32_t database_save_count = 0;
74 	};
75 	inline std::ostream& operator<<(std::ostream& os, SavePartyLocation::VehicleType code) {
76 		os << static_cast<std::underlying_type_t<decltype(code)>>(code);
77 		return os;
78 	}
79 	inline std::ostream& operator<<(std::ostream& os, SavePartyLocation::PanState code) {
80 		os << static_cast<std::underlying_type_t<decltype(code)>>(code);
81 		return os;
82 	}
83 
84 	inline bool operator==(const SavePartyLocation& l, const SavePartyLocation& r) {
85 		return l.boarding == r.boarding
86 		&& l.aboard == r.aboard
87 		&& l.vehicle == r.vehicle
88 		&& l.unboarding == r.unboarding
89 		&& l.preboard_move_speed == r.preboard_move_speed
90 		&& l.menu_calling == r.menu_calling
91 		&& l.pan_state == r.pan_state
92 		&& l.pan_current_x == r.pan_current_x
93 		&& l.pan_current_y == r.pan_current_y
94 		&& l.pan_finish_x == r.pan_finish_x
95 		&& l.pan_finish_y == r.pan_finish_y
96 		&& l.pan_speed == r.pan_speed
97 		&& l.encounter_steps == r.encounter_steps
98 		&& l.encounter_calling == r.encounter_calling
99 		&& l.map_save_count == r.map_save_count
100 		&& l.database_save_count == r.database_save_count;
101 	}
102 
103 	inline bool operator!=(const SavePartyLocation& l, const SavePartyLocation& r) {
104 		return !(l == r);
105 	}
106 
107 	std::ostream& operator<<(std::ostream& os, const SavePartyLocation& obj);
108 
109 	template <typename F, typename ParentCtx = Context<void,void>>
110 	void ForEachString(SavePartyLocation& obj, const F& f, const ParentCtx* parent_ctx = nullptr) {
111 		(void)obj;
112 		(void)f;
113 		(void)parent_ctx;
114 	}
115 
116 } // namespace rpg
117 } // namespace lcf
118 
119 #endif
120