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_SAVEINVENTORY_H
13 #define LCF_RPG_SAVEINVENTORY_H
14 
15 // Headers
16 #include <stdint.h>
17 #include <vector>
18 #include "lcf/context.h"
19 #include <ostream>
20 #include <type_traits>
21 
22 /**
23  * rpg::SaveInventory class.
24  */
25 namespace lcf {
26 namespace rpg {
27 	class SaveInventory {
28 	public:
29 		std::vector<int16_t> party;
30 		std::vector<int16_t> item_ids;
31 		std::vector<uint8_t> item_counts;
32 		std::vector<uint8_t> item_usage;
33 		int32_t gold = 0;
34 		int32_t timer1_frames = 0;
35 		bool timer1_active = false;
36 		bool timer1_visible = false;
37 		bool timer1_battle = false;
38 		int32_t timer2_frames = 0;
39 		bool timer2_active = false;
40 		bool timer2_visible = false;
41 		bool timer2_battle = false;
42 		int32_t battles = 0;
43 		int32_t defeats = 0;
44 		int32_t escapes = 0;
45 		int32_t victories = 0;
46 		int32_t turns = 0;
47 		int32_t steps = 0;
48 	};
49 
50 	inline bool operator==(const SaveInventory& l, const SaveInventory& r) {
51 		return l.party == r.party
52 		&& l.item_ids == r.item_ids
53 		&& l.item_counts == r.item_counts
54 		&& l.item_usage == r.item_usage
55 		&& l.gold == r.gold
56 		&& l.timer1_frames == r.timer1_frames
57 		&& l.timer1_active == r.timer1_active
58 		&& l.timer1_visible == r.timer1_visible
59 		&& l.timer1_battle == r.timer1_battle
60 		&& l.timer2_frames == r.timer2_frames
61 		&& l.timer2_active == r.timer2_active
62 		&& l.timer2_visible == r.timer2_visible
63 		&& l.timer2_battle == r.timer2_battle
64 		&& l.battles == r.battles
65 		&& l.defeats == r.defeats
66 		&& l.escapes == r.escapes
67 		&& l.victories == r.victories
68 		&& l.turns == r.turns
69 		&& l.steps == r.steps;
70 	}
71 
72 	inline bool operator!=(const SaveInventory& l, const SaveInventory& r) {
73 		return !(l == r);
74 	}
75 
76 	std::ostream& operator<<(std::ostream& os, const SaveInventory& obj);
77 
78 	template <typename F, typename ParentCtx = Context<void,void>>
79 	void ForEachString(SaveInventory& obj, const F& f, const ParentCtx* parent_ctx = nullptr) {
80 		(void)obj;
81 		(void)f;
82 		(void)parent_ctx;
83 	}
84 
85 } // namespace rpg
86 } // namespace lcf
87 
88 #endif
89