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_EVENTCOMMAND_H
13 #define LCF_RPG_EVENTCOMMAND_H
14 
15 // Headers
16 #include <lcf/dbarray.h>
17 #include <stdint.h>
18 #include "lcf/dbstring.h"
19 #include "lcf/enum_tags.h"
20 #include "lcf/context.h"
21 #include <ostream>
22 #include <type_traits>
23 
24 /**
25  * rpg::EventCommand class.
26  */
27 namespace lcf {
28 namespace rpg {
29 	class EventCommand {
30 	public:
31 		enum class Code {
32 			END = 10,
33 			CallCommonEvent = 1005,
34 			ForceFlee = 1006,
35 			EnableCombo = 1007,
36 			ChangeClass = 1008,
37 			ChangeBattleCommands = 1009,
38 			OpenLoadMenu = 5001,
39 			ExitGame = 5002,
40 			ToggleAtbMode = 5003,
41 			ToggleFullscreen = 5004,
42 			OpenVideoOptions = 5005,
43 			ShowMessage = 10110,
44 			MessageOptions = 10120,
45 			ChangeFaceGraphic = 10130,
46 			ShowChoice = 10140,
47 			InputNumber = 10150,
48 			ControlSwitches = 10210,
49 			ControlVars = 10220,
50 			TimerOperation = 10230,
51 			ChangeGold = 10310,
52 			ChangeItems = 10320,
53 			ChangePartyMembers = 10330,
54 			ChangeExp = 10410,
55 			ChangeLevel = 10420,
56 			ChangeParameters = 10430,
57 			ChangeSkills = 10440,
58 			ChangeEquipment = 10450,
59 			ChangeHP = 10460,
60 			ChangeSP = 10470,
61 			ChangeCondition = 10480,
62 			FullHeal = 10490,
63 			SimulatedAttack = 10500,
64 			ChangeHeroName = 10610,
65 			ChangeHeroTitle = 10620,
66 			ChangeSpriteAssociation = 10630,
67 			ChangeActorFace = 10640,
68 			ChangeVehicleGraphic = 10650,
69 			ChangeSystemBGM = 10660,
70 			ChangeSystemSFX = 10670,
71 			ChangeSystemGraphics = 10680,
72 			ChangeScreenTransitions = 10690,
73 			EnemyEncounter = 10710,
74 			OpenShop = 10720,
75 			ShowInn = 10730,
76 			EnterHeroName = 10740,
77 			Teleport = 10810,
78 			MemorizeLocation = 10820,
79 			RecallToLocation = 10830,
80 			EnterExitVehicle = 10840,
81 			SetVehicleLocation = 10850,
82 			ChangeEventLocation = 10860,
83 			TradeEventLocations = 10870,
84 			StoreTerrainID = 10910,
85 			StoreEventID = 10920,
86 			EraseScreen = 11010,
87 			ShowScreen = 11020,
88 			TintScreen = 11030,
89 			FlashScreen = 11040,
90 			ShakeScreen = 11050,
91 			PanScreen = 11060,
92 			WeatherEffects = 11070,
93 			ShowPicture = 11110,
94 			MovePicture = 11120,
95 			ErasePicture = 11130,
96 			ShowBattleAnimation = 11210,
97 			SpriteTransparency = 11310,
98 			FlashSprite = 11320,
99 			MoveEvent = 11330,
100 			ProceedWithMovement = 11340,
101 			HaltAllMovement = 11350,
102 			Wait = 11410,
103 			PlayBGM = 11510,
104 			FadeOutBGM = 11520,
105 			MemorizeBGM = 11530,
106 			PlayMemorizedBGM = 11540,
107 			PlaySound = 11550,
108 			PlayMovie = 11560,
109 			KeyInputProc = 11610,
110 			ChangeMapTileset = 11710,
111 			ChangePBG = 11720,
112 			ChangeEncounterRate = 11740,
113 			TileSubstitution = 11750,
114 			TeleportTargets = 11810,
115 			ChangeTeleportAccess = 11820,
116 			EscapeTarget = 11830,
117 			ChangeEscapeAccess = 11840,
118 			OpenSaveMenu = 11910,
119 			ChangeSaveAccess = 11930,
120 			OpenMainMenu = 11950,
121 			ChangeMainMenuAccess = 11960,
122 			ConditionalBranch = 12010,
123 			Label = 12110,
124 			JumpToLabel = 12120,
125 			Loop = 12210,
126 			BreakLoop = 12220,
127 			EndEventProcessing = 12310,
128 			EraseEvent = 12320,
129 			CallEvent = 12330,
130 			Comment = 12410,
131 			GameOver = 12420,
132 			ReturntoTitleScreen = 12510,
133 			ChangeMonsterHP = 13110,
134 			ChangeMonsterMP = 13120,
135 			ChangeMonsterCondition = 13130,
136 			ShowHiddenMonster = 13150,
137 			ChangeBattleBG = 13210,
138 			ShowBattleAnimation_B = 13260,
139 			ConditionalBranch_B = 13310,
140 			TerminateBattle = 13410,
141 			ShowMessage_2 = 20110,
142 			ShowChoiceOption = 20140,
143 			ShowChoiceEnd = 20141,
144 			VictoryHandler = 20710,
145 			EscapeHandler = 20711,
146 			DefeatHandler = 20712,
147 			EndBattle = 20713,
148 			Transaction = 20720,
149 			NoTransaction = 20721,
150 			EndShop = 20722,
151 			Stay = 20730,
152 			NoStay = 20731,
153 			EndInn = 20732,
154 			ElseBranch = 22010,
155 			EndBranch = 22011,
156 			EndLoop = 22210,
157 			Comment_2 = 22410,
158 			ElseBranch_B = 23310,
159 			EndBranch_B = 23311,
160 			Maniac_GetSaveInfo = 3001,
161 			Maniac_Save = 3002,
162 			Maniac_Load = 3003,
163 			Maniac_EndLoadProcess = 3004,
164 			Maniac_GetMousePosition = 3005,
165 			Maniac_SetMousePosition = 3006,
166 			Maniac_ShowStringPicture = 3007,
167 			Maniac_GetPictureInfo = 3008,
168 			Maniac_ControlBattle = 3009,
169 			Maniac_ControlAtbGauge = 3010,
170 			Maniac_ChangeBattleCommandEx = 3011,
171 			Maniac_GetBattleInfo = 3012,
172 			Maniac_ControlVarArray = 3013,
173 			Maniac_KeyInputProcEx = 3014,
174 			Maniac_RewriteMap = 3015,
175 			Maniac_ControlGlobalSave = 3016,
176 			Maniac_ChangePictureId = 3017,
177 			Maniac_SetGameOption = 3018,
178 			Maniac_CallCommand = 3019
179 		};
180 
181 		int32_t code = 0;
182 		int32_t indent = 0;
183 		DBString string;
184 		DBArray<int32_t> parameters;
185 	};
186 	inline std::ostream& operator<<(std::ostream& os, EventCommand::Code code) {
187 		os << static_cast<std::underlying_type_t<decltype(code)>>(code);
188 		return os;
189 	}
190 
191 	inline bool operator==(const EventCommand& l, const EventCommand& r) {
192 		return l.code == r.code
193 		&& l.indent == r.indent
194 		&& l.string == r.string
195 		&& l.parameters == r.parameters;
196 	}
197 
198 	inline bool operator!=(const EventCommand& l, const EventCommand& r) {
199 		return !(l == r);
200 	}
201 
202 	std::ostream& operator<<(std::ostream& os, const EventCommand& obj);
203 
204 	template <typename F, typename ParentCtx = Context<void,void>>
205 	void ForEachString(EventCommand& obj, const F& f, const ParentCtx* parent_ctx = nullptr) {
206 		const auto ctx3 = Context<EventCommand, ParentCtx>{ "string", -1, &obj, parent_ctx };
207 		f(obj.string, ctx3);
208 		(void)obj;
209 		(void)f;
210 		(void)parent_ctx;
211 	}
212 
213 } // namespace rpg
214 } // namespace lcf
215 
216 #endif
217