Skip to content

Commit f603467

Browse files
committed
Add generated code
1 parent cc01677 commit f603467

8 files changed

Lines changed: 243 additions & 4 deletions

File tree

src/generated/fwd_flags_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "lcf/rpg/trooppagecondition.h"
1313
#include "lcf/rpg/terrain.h"
1414
#include "lcf/rpg/eventpagecondition.h"
15+
#include "lcf/rpg/savesystem.h"
1516
#include "lcf/rpg/savepicture.h"
1617
#include "lcf/rpg/saveeventexecframe.h"
1718
#include "lcf/rpg/saveeventexecstate.h"
@@ -21,6 +22,7 @@
2122
template <> struct lcf::TypeCategory<lcf::rpg::TroopPageCondition::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
2223
template <> struct lcf::TypeCategory<lcf::rpg::Terrain::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
2324
template <> struct lcf::TypeCategory<lcf::rpg::EventPageCondition::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
25+
template <> struct lcf::TypeCategory<lcf::rpg::SaveSystem::ManiacMessageHookTarget_Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
2426
template <> struct lcf::TypeCategory<lcf::rpg::SavePicture::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
2527
template <> struct lcf::TypeCategory<lcf::rpg::SaveEventExecFrame::EasyRpgFrameRuntime_Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
2628
template <> struct lcf::TypeCategory<lcf::rpg::SaveEventExecState::EasyRpgStateRuntime_Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };

src/generated/fwd_flags_instance.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "ldb_trooppagecondition_flags.h"
1313
#include "ldb_terrain_special_flags.h"
1414
#include "lmu_eventpagecondition_flags.h"
15+
#include "lsd_savesystem_maniac_message_hook_target.h"
1516
#include "lsd_savepicture_flags.h"
1617
#include "lsd_saveeventexecframe_easyrpg_runtime_flags.h"
1718
#include "lsd_saveeventexecstate_easyrpg_runtime_flags.h"
@@ -23,6 +24,7 @@ namespace lcf {
2324
template class Flags<rpg::TroopPageCondition::Flags>;
2425
template class Flags<rpg::Terrain::Flags>;
2526
template class Flags<rpg::EventPageCondition::Flags>;
27+
template class Flags<rpg::SaveSystem::ManiacMessageHookTarget_Flags>;
2628
template class Flags<rpg::SavePicture::Flags>;
2729
template class Flags<rpg::SaveEventExecFrame::EasyRpgFrameRuntime_Flags>;
2830
template class Flags<rpg::SaveEventExecState::EasyRpgStateRuntime_Flags>;

src/generated/lcf/lsd/chunks.h

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,38 @@ namespace LSD_Reader {
164164
atb_mode = 0x8C,
165165
/** rpg::Strings */
166166
maniac_strings = 0x24,
167+
/** Width of the message window in pixels */
168+
maniac_message_window_width = 0x2D,
169+
/** Height of the message window in pixels */
170+
maniac_message_window_height = 0x2E,
171+
/** Font to use in the message window */
172+
maniac_message_font_name = 0x2F,
173+
/** Size of the font in the message window */
174+
maniac_message_font_size = 0x30,
175+
/** Situations when to invoke the callbacks */
176+
maniac_message_hook_target = 0x32,
177+
/** Common Event to call for a hook */
178+
maniac_message_hook_common_event_id = 0x42,
179+
/** Variable (starting range) populated when hook is invoked */
180+
maniac_message_hook_callback_system_variable = 0x43,
181+
/** String Variable populated when hook is invoked */
182+
maniac_message_hook_callback_system_string_variable = 0x44,
183+
/** Variable (starting range) populated when hook is invoked */
184+
maniac_message_hook_callback_user_variable = 0x45,
185+
/** String Variable populated when hook is invoked (TODO: Difference between System and User callback) */
186+
maniac_message_hook_callback_user_string_variable = 0x46,
167187
/** FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2) */
168188
maniac_frameskip = 0x88,
169189
/** FatalMix Picture Limit */
170190
maniac_picture_limit = 0x89,
171191
/** Various FatalMix options (XX XA XB XC). A: MsgSkip OFF/RShift (0/4) B: TestPlay Keep/ON/OFF (0/2/4), C: Pause focus lost Wait/Run (0/1) */
172192
maniac_options = 0x8A,
173193
/** JoyLeft, JoyRight, JoyUp, JoyDown, Joy1, ... Joy12 */
174-
maniac_joypad_bindings = 0x8B
194+
maniac_joypad_bindings = 0x8B,
195+
/** Additional spacing between characters in the message window (Editor value - 1) */
196+
maniac_message_spacing_char = 0x8E,
197+
/** Additional spacing between lines in the message window (Editor value - 1) */
198+
maniac_message_spacing_line = 0x8F
175199
};
176200
};
177201
struct ChunkSaveScreen {

src/generated/lcf/rpg/commonevent.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ namespace rpg {
3232
enum Trigger {
3333
Trigger_automatic = 3,
3434
Trigger_parallel = 4,
35-
Trigger_call = 5
35+
Trigger_call = 5,
36+
Trigger_maniac_battle_start = 6,
37+
Trigger_maniac_battle_parallel = 7
3638
};
3739
static constexpr auto kTriggerTags = lcf::EnumTags{
3840
Trigger_automatic, "automatic",
3941
Trigger_parallel, "parallel",
40-
Trigger_call, "call"
42+
Trigger_call, "call",
43+
Trigger_maniac_battle_start, "maniac_battle_start",
44+
Trigger_maniac_battle_parallel, "maniac_battle_parallel"
4145
};
4246

4347
int ID = 0;

src/generated/lcf/rpg/savesystem.h

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define LCF_RPG_SAVESYSTEM_H
1414

1515
// Headers
16+
#include <array>
1617
#include <stdint.h>
1718
#include <string>
1819
#include <vector>
@@ -118,10 +119,34 @@ namespace rpg {
118119
int32_t save_slot = 1;
119120
int32_t atb_mode = 0;
120121
std::vector<DBString> maniac_strings;
122+
int32_t maniac_message_window_width = 0;
123+
int32_t maniac_message_window_height = 0;
124+
DBString maniac_message_font_name;
125+
int32_t maniac_message_font_size = 0;
126+
struct ManiacMessageHookTarget_Flags {
127+
union {
128+
struct {
129+
bool user_event;
130+
bool create_window;
131+
bool destroy_window;
132+
bool text_rendering;
133+
};
134+
std::array<bool, 4> flags;
135+
};
136+
ManiacMessageHookTarget_Flags() noexcept: user_event(false), create_window(false), destroy_window(false), text_rendering(false)
137+
{}
138+
} maniac_message_hook_target;
139+
int32_t maniac_message_hook_common_event_id = 0;
140+
int32_t maniac_message_hook_callback_system_variable = 0;
141+
int32_t maniac_message_hook_callback_system_string_variable = 0;
142+
int32_t maniac_message_hook_callback_user_variable = 0;
143+
int32_t maniac_message_hook_callback_user_string_variable = 0;
121144
int32_t maniac_frameskip = 0;
122145
int32_t maniac_picture_limit = 0;
123146
std::vector<uint8_t> maniac_options;
124147
std::vector<uint8_t> maniac_joypad_bindings;
148+
int32_t maniac_message_spacing_char = 0;
149+
int32_t maniac_message_spacing_line = 0;
125150
};
126151
inline std::ostream& operator<<(std::ostream& os, SaveSystem::Scene code) {
127152
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -132,6 +157,16 @@ namespace rpg {
132157
return os;
133158
}
134159

160+
inline bool operator==(const SaveSystem::ManiacMessageHookTarget_Flags& l, const SaveSystem::ManiacMessageHookTarget_Flags& r) {
161+
return l.flags == r.flags;
162+
}
163+
164+
inline bool operator!=(const SaveSystem::ManiacMessageHookTarget_Flags& l, const SaveSystem::ManiacMessageHookTarget_Flags& r) {
165+
return !(l == r);
166+
}
167+
168+
std::ostream& operator<<(std::ostream& os, const SaveSystem::ManiacMessageHookTarget_Flags& obj);
169+
135170
inline bool operator==(const SaveSystem& l, const SaveSystem& r) {
136171
return l.scene == r.scene
137172
&& l.frame_count == r.frame_count
@@ -189,10 +224,22 @@ namespace rpg {
189224
&& l.save_slot == r.save_slot
190225
&& l.atb_mode == r.atb_mode
191226
&& l.maniac_strings == r.maniac_strings
227+
&& l.maniac_message_window_width == r.maniac_message_window_width
228+
&& l.maniac_message_window_height == r.maniac_message_window_height
229+
&& l.maniac_message_font_name == r.maniac_message_font_name
230+
&& l.maniac_message_font_size == r.maniac_message_font_size
231+
&& l.maniac_message_hook_target == r.maniac_message_hook_target
232+
&& l.maniac_message_hook_common_event_id == r.maniac_message_hook_common_event_id
233+
&& l.maniac_message_hook_callback_system_variable == r.maniac_message_hook_callback_system_variable
234+
&& l.maniac_message_hook_callback_system_string_variable == r.maniac_message_hook_callback_system_string_variable
235+
&& l.maniac_message_hook_callback_user_variable == r.maniac_message_hook_callback_user_variable
236+
&& l.maniac_message_hook_callback_user_string_variable == r.maniac_message_hook_callback_user_string_variable
192237
&& l.maniac_frameskip == r.maniac_frameskip
193238
&& l.maniac_picture_limit == r.maniac_picture_limit
194239
&& l.maniac_options == r.maniac_options
195-
&& l.maniac_joypad_bindings == r.maniac_joypad_bindings;
240+
&& l.maniac_joypad_bindings == r.maniac_joypad_bindings
241+
&& l.maniac_message_spacing_char == r.maniac_message_spacing_char
242+
&& l.maniac_message_spacing_line == r.maniac_message_spacing_line;
196243
}
197244

198245
inline bool operator!=(const SaveSystem& l, const SaveSystem& r) {
@@ -251,6 +298,8 @@ namespace rpg {
251298
ForEachString(obj.enemy_death_se, f, &ctx40);
252299
const auto ctx41 = Context<SaveSystem, ParentCtx>{ "item_se", -1, &obj, parent_ctx };
253300
ForEachString(obj.item_se, f, &ctx41);
301+
const auto ctx59 = Context<SaveSystem, ParentCtx>{ "maniac_message_font_name", -1, &obj, parent_ctx };
302+
f(obj.maniac_message_font_name, ctx59);
254303
(void)obj;
255304
(void)f;
256305
(void)parent_ctx;

src/generated/lsd_savesystem.cpp

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,76 @@ static TypedField<rpg::SaveSystem, std::vector<DBString>> static_maniac_strings(
424424
0,
425425
0
426426
);
427+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_window_width(
428+
&rpg::SaveSystem::maniac_message_window_width,
429+
LSD_Reader::ChunkSaveSystem::maniac_message_window_width,
430+
"maniac_message_window_width",
431+
0,
432+
0
433+
);
434+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_window_height(
435+
&rpg::SaveSystem::maniac_message_window_height,
436+
LSD_Reader::ChunkSaveSystem::maniac_message_window_height,
437+
"maniac_message_window_height",
438+
0,
439+
0
440+
);
441+
static TypedField<rpg::SaveSystem, DBString> static_maniac_message_font_name(
442+
&rpg::SaveSystem::maniac_message_font_name,
443+
LSD_Reader::ChunkSaveSystem::maniac_message_font_name,
444+
"maniac_message_font_name",
445+
0,
446+
0
447+
);
448+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_font_size(
449+
&rpg::SaveSystem::maniac_message_font_size,
450+
LSD_Reader::ChunkSaveSystem::maniac_message_font_size,
451+
"maniac_message_font_size",
452+
0,
453+
0
454+
);
455+
static TypedField<rpg::SaveSystem, rpg::SaveSystem::ManiacMessageHookTarget_Flags> static_maniac_message_hook_target(
456+
&rpg::SaveSystem::maniac_message_hook_target,
457+
LSD_Reader::ChunkSaveSystem::maniac_message_hook_target,
458+
"maniac_message_hook_target",
459+
0,
460+
0
461+
);
462+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_hook_common_event_id(
463+
&rpg::SaveSystem::maniac_message_hook_common_event_id,
464+
LSD_Reader::ChunkSaveSystem::maniac_message_hook_common_event_id,
465+
"maniac_message_hook_common_event_id",
466+
0,
467+
0
468+
);
469+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_hook_callback_system_variable(
470+
&rpg::SaveSystem::maniac_message_hook_callback_system_variable,
471+
LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_system_variable,
472+
"maniac_message_hook_callback_system_variable",
473+
0,
474+
0
475+
);
476+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_hook_callback_system_string_variable(
477+
&rpg::SaveSystem::maniac_message_hook_callback_system_string_variable,
478+
LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_system_string_variable,
479+
"maniac_message_hook_callback_system_string_variable",
480+
0,
481+
0
482+
);
483+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_hook_callback_user_variable(
484+
&rpg::SaveSystem::maniac_message_hook_callback_user_variable,
485+
LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_user_variable,
486+
"maniac_message_hook_callback_user_variable",
487+
0,
488+
0
489+
);
490+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_hook_callback_user_string_variable(
491+
&rpg::SaveSystem::maniac_message_hook_callback_user_string_variable,
492+
LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_user_string_variable,
493+
"maniac_message_hook_callback_user_string_variable",
494+
0,
495+
0
496+
);
427497
static TypedField<rpg::SaveSystem, int32_t> static_maniac_frameskip(
428498
&rpg::SaveSystem::maniac_frameskip,
429499
LSD_Reader::ChunkSaveSystem::maniac_frameskip,
@@ -452,6 +522,20 @@ static TypedField<rpg::SaveSystem, std::vector<uint8_t>> static_maniac_joypad_bi
452522
0,
453523
0
454524
);
525+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_spacing_char(
526+
&rpg::SaveSystem::maniac_message_spacing_char,
527+
LSD_Reader::ChunkSaveSystem::maniac_message_spacing_char,
528+
"maniac_message_spacing_char",
529+
0,
530+
0
531+
);
532+
static TypedField<rpg::SaveSystem, int32_t> static_maniac_message_spacing_line(
533+
&rpg::SaveSystem::maniac_message_spacing_line,
534+
LSD_Reader::ChunkSaveSystem::maniac_message_spacing_line,
535+
"maniac_message_spacing_line",
536+
0,
537+
0
538+
);
455539

456540

457541
template <>
@@ -514,10 +598,22 @@ Field<rpg::SaveSystem> const* Struct<rpg::SaveSystem>::fields[] = {
514598
&static_save_slot,
515599
&static_atb_mode,
516600
&static_maniac_strings,
601+
&static_maniac_message_window_width,
602+
&static_maniac_message_window_height,
603+
&static_maniac_message_font_name,
604+
&static_maniac_message_font_size,
605+
&static_maniac_message_hook_target,
606+
&static_maniac_message_hook_common_event_id,
607+
&static_maniac_message_hook_callback_system_variable,
608+
&static_maniac_message_hook_callback_system_string_variable,
609+
&static_maniac_message_hook_callback_user_variable,
610+
&static_maniac_message_hook_callback_user_string_variable,
517611
&static_maniac_frameskip,
518612
&static_maniac_picture_limit,
519613
&static_maniac_options,
520614
&static_maniac_joypad_bindings,
615+
&static_maniac_message_spacing_char,
616+
&static_maniac_message_spacing_line,
521617
NULL
522618
};
523619

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* !!!! GENERATED FILE - DO NOT EDIT !!!!
2+
* --------------------------------------
3+
*
4+
* This file is part of liblcf. Copyright (c) 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+
/*
13+
* Headers
14+
*/
15+
#include "lcf/lsd/reader.h"
16+
#include "lcf/lsd/chunks.h"
17+
#include "reader_struct.h"
18+
19+
namespace lcf {
20+
21+
// Read SaveSystem.
22+
23+
template <>
24+
char const* const Flags<rpg::SaveSystem::ManiacMessageHookTarget_Flags>::name = "SaveSystem_ManiacMessageHookTarget_Flags";
25+
26+
template <>
27+
decltype(Flags<rpg::SaveSystem::ManiacMessageHookTarget_Flags>::flag_names) Flags<rpg::SaveSystem::ManiacMessageHookTarget_Flags>::flag_names = {
28+
"user_event",
29+
"create_window",
30+
"destroy_window",
31+
"text_rendering"
32+
};
33+
34+
template <>
35+
decltype(Flags<rpg::SaveSystem::ManiacMessageHookTarget_Flags>::flags_is2k3) Flags<rpg::SaveSystem::ManiacMessageHookTarget_Flags>::flags_is2k3 = {
36+
0,
37+
0,
38+
0,
39+
0
40+
};
41+
42+
} //namespace lcf

src/generated/rpg_savesystem.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
namespace lcf {
1616
namespace rpg {
1717

18+
std::ostream& operator<<(std::ostream& os, const SaveSystem::ManiacMessageHookTarget_Flags& obj) {
19+
for (size_t i = 0; i < obj.flags.size(); ++i) {
20+
os << (i == 0 ? "[" : ", ") << obj.flags[i];
21+
}
22+
os << "]";
23+
return os;
24+
}
25+
1826
std::ostream& operator<<(std::ostream& os, const SaveSystem& obj) {
1927
os << "SaveSystem{";
2028
os << "scene="<< obj.scene;
@@ -85,6 +93,16 @@ std::ostream& operator<<(std::ostream& os, const SaveSystem& obj) {
8593
os << (i == 0 ? "[" : ", ") << obj.maniac_strings[i];
8694
}
8795
os << "]";
96+
os << ", maniac_message_window_width="<< obj.maniac_message_window_width;
97+
os << ", maniac_message_window_height="<< obj.maniac_message_window_height;
98+
os << ", maniac_message_font_name="<< obj.maniac_message_font_name;
99+
os << ", maniac_message_font_size="<< obj.maniac_message_font_size;
100+
os << ", maniac_message_hook_target="<< obj.maniac_message_hook_target;
101+
os << ", maniac_message_hook_common_event_id="<< obj.maniac_message_hook_common_event_id;
102+
os << ", maniac_message_hook_callback_system_variable="<< obj.maniac_message_hook_callback_system_variable;
103+
os << ", maniac_message_hook_callback_system_string_variable="<< obj.maniac_message_hook_callback_system_string_variable;
104+
os << ", maniac_message_hook_callback_user_variable="<< obj.maniac_message_hook_callback_user_variable;
105+
os << ", maniac_message_hook_callback_user_string_variable="<< obj.maniac_message_hook_callback_user_string_variable;
88106
os << ", maniac_frameskip="<< obj.maniac_frameskip;
89107
os << ", maniac_picture_limit="<< obj.maniac_picture_limit;
90108
os << ", maniac_options=";
@@ -97,6 +115,8 @@ std::ostream& operator<<(std::ostream& os, const SaveSystem& obj) {
97115
os << (i == 0 ? "[" : ", ") << obj.maniac_joypad_bindings[i];
98116
}
99117
os << "]";
118+
os << ", maniac_message_spacing_char="<< obj.maniac_message_spacing_char;
119+
os << ", maniac_message_spacing_line="<< obj.maniac_message_spacing_line;
100120
os << "}";
101121
return os;
102122
}

0 commit comments

Comments
 (0)