From 41f992823cd855326befca00553a8efdae42bb3e Mon Sep 17 00:00:00 2001 From: Ghabry Date: Tue, 18 Mar 2025 17:35:33 +0100 Subject: [PATCH 1/7] Maniacs: Document more chunks Mostly related to Message Options See #493 Co-Authored-By: florianessl --- generator/csv/enums_easyrpg.csv | 2 ++ generator/csv/fields_easyrpg.csv | 12 ++++++++++++ generator/csv/flags_easyrpg.csv | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/generator/csv/enums_easyrpg.csv b/generator/csv/enums_easyrpg.csv index 7125767d..c3f269fe 100644 --- a/generator/csv/enums_easyrpg.csv +++ b/generator/csv/enums_easyrpg.csv @@ -1,4 +1,6 @@ Structure,Entry,Value,Index +CommonEvent,Trigger,maniac_battle_start,6 +CommonEvent,Trigger,maniac_battle_parallel,7 EventCommand,Code,EasyRpg_TriggerEventAt,2002 EventCommand,Code,EasyRpg_Pathfinder,2003 EventCommand,Code,EasyRpg_CallMovementAction,2050 diff --git a/generator/csv/fields_easyrpg.csv b/generator/csv/fields_easyrpg.csv index 408fd0b8..5958b4d6 100644 --- a/generator/csv/fields_easyrpg.csv +++ b/generator/csv/fields_easyrpg.csv @@ -39,10 +39,22 @@ SaveMapEventBase,easyrpg_runtime_flags,f,EasyRpgEventRuntime_Flags,0xCC,0,0,0,Ru SavePartyLocation,maniac_horizontal_pan_speed,f,Double,0x8D,0,0,0,horizontal speed in the scrolls of the screen SavePartyLocation,maniac_vertical_pan_speed,f,Double,0x8E,0,0,0,vertical speed in the scrolls of the screen SaveSystem,maniac_strings,f,Vector,0x24,,0,0,rpg::Strings +SaveSystem,maniac_message_window_width,f,Int32,0x2D,0,0,0,Width of the message window in pixels +SaveSystem,maniac_message_window_height,f,Int32,0x2E,0,0,0,Height of the message window in pixels +SaveSystem,maniac_message_font_name,f,DBString,0x2F,,0,0,Font to use in the message window +SaveSystem,maniac_message_font_size,f,Int32,0x30,0,0,0,Size of the font in the message window +SaveSystem,maniac_message_hook_flags,f,ManiacMessageHook_Flags,0x32,0,0,0,Situations when to invoke the callbacks +SaveSystem,maniac_message_hook_common_event_id,f,Int32,0x42,0,0,0,Common Event to call for a hook +SaveSystem,maniac_message_hook_callback_system_variable,f,Int32,0x43,0,0,0,Variable (starting range) populated when hook is invoked +SaveSystem,maniac_message_hook_callback_system_string_variable,f,Int32,0x44,0,0,0,String Variable populated when hook is invoked +SaveSystem,maniac_message_hook_callback_user_variable,f,Int32,0x45,0,0,0,Variable (starting range) populated when hook is invoked +SaveSystem,maniac_message_hook_callback_user_string_variable,f,Int32,0x46,0,0,0,String Variable populated when hook is invoked (TODO: Difference between System and User callback) SaveSystem,maniac_frameskip,,Int32,0x88,0,0,0,"FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2)" SaveSystem,maniac_picture_limit,,Int32,0x89,0,0,0,FatalMix Picture Limit SaveSystem,maniac_options,,Vector,0x8A,,0,0,"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)" SaveSystem,maniac_joypad_bindings,,Vector,0x8B,,0,0,"JoyLeft, JoyRight, JoyUp, JoyDown, Joy1, ... Joy12" +SaveSystem,maniac_message_spacing_char,f,Int32,0x8E,0,0,0,Additional spacing between characters in the message window (Editor value - 1) +SaveSystem,maniac_message_spacing_line,f,Int32,0x8F,0,0,0,Additional spacing between lines in the message window (Editor value - 1) BattleCommands,easyrpg_default_atb_mode,f,Enum,0xC8,0,0,1,Default ATB mode of RPG 2003 battle system BattleCommands,easyrpg_enable_battle_row_command,f,Boolean,0xC9,True,0,1,If the row command should be enabled in RPG Maker 2003 battles BattleCommands,easyrpg_sequential_order,f,Boolean,0xCA,False,0,1,If alternative and gauge style battles should behave like traditional style battles diff --git a/generator/csv/flags_easyrpg.csv b/generator/csv/flags_easyrpg.csv index 892b94dc..d0353a5f 100644 --- a/generator/csv/flags_easyrpg.csv +++ b/generator/csv/flags_easyrpg.csv @@ -27,3 +27,7 @@ EasyRpgStateRuntime,patch_rpg2k3_cmds_on,0 EasyRpgStateRuntime,patch_rpg2k3_cmds_off,0 EasyRpgStateRuntime,use_rpg2k_battle_system_on,0 EasyRpgStateRuntime,use_rpg2k_battle_system_off,0 +ManiacMessageHook,user_event,0 +ManiacMessageHook,create_window,0 +ManiacMessageHook,destroy_window,0 +ManiacMessageHook,text_rendering,0 From 04f99363e28f63e40048c7d8781c7b39cdbaa94a Mon Sep 17 00:00:00 2001 From: Ghabry Date: Tue, 18 Mar 2025 17:57:51 +0100 Subject: [PATCH 2/7] Make enum tags compile on older clang compilers std::array ist not constexpr Co-Authored-By: mgambrell --- src/lcf/enum_tags.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lcf/enum_tags.h b/src/lcf/enum_tags.h index 25a17ad1..0a3b3f3c 100644 --- a/src/lcf/enum_tags.h +++ b/src/lcf/enum_tags.h @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -68,12 +67,10 @@ class EnumTags { bool etag(const char* tag, E& result) const; E etagOr(const char* tag, E other) const; - const std::array& tags() const { return _tags; } - constexpr bool is_monotonic_from_zero() const { return monotonic_from_zero; } - constexpr iterator begin() const { return iterator(_tags.data()); } - constexpr iterator end() const { return iterator(_tags.data() + size()); } + constexpr iterator begin() const { return iterator(std::data(_tags)); } + constexpr iterator end() const { return iterator(std::data(_tags) + size()); } constexpr iterator cbegin() const { return begin(); } constexpr iterator cend() const { return end(); } @@ -102,7 +99,8 @@ class EnumTags { } } - std::array _tags; + // std::array is not constexpr on some older C++17 compilers + EnumItem _tags[num_tags]{}; bool monotonic_from_zero = true; }; @@ -150,7 +148,7 @@ inline constexpr const char* EnumTags::operator[](int_type value) const { template inline bool EnumTags::has_etag(const char* tag) const { - for (size_t i = 0; i < _tags.size(); ++i) { + for (size_t i = 0; i < std::size(_tags); ++i) { if (std::strcmp(_tags[i].name, tag) == 0) { return true; } @@ -161,7 +159,7 @@ inline bool EnumTags::has_etag(const char* tag) const { template inline bool EnumTags::etag(const char* tag, E& result) const { - for (size_t i = 0; i < _tags.size(); ++i) { + for (size_t i = 0; i < std::size(_tags); ++i) { if (std::strcmp(_tags[i].name, tag) == 0) { result = E(_tags[i].value); return true; @@ -173,7 +171,7 @@ inline bool EnumTags::etag(const char* tag, E& result) const { template inline E EnumTags::etagOr(const char* tag, E other) const { - for (size_t i = 0; i < _tags.size(); ++i) { + for (size_t i = 0; i < std::size(_tags); ++i) { if (std::strcmp(_tags[i].name, tag) == 0) { return E(_tags[i].value); } From 3dd0a31dfe3576b58cbc8fe88e7bc67e17398c07 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Wed, 19 Mar 2025 17:09:34 +0100 Subject: [PATCH 3/7] Add String Variables Chunks Co-Authored-By: florianessl --- generator/csv/fields_easyrpg.csv | 2 ++ generator/csv/structs_easyrpg.csv | 1 + 2 files changed, 3 insertions(+) diff --git a/generator/csv/fields_easyrpg.csv b/generator/csv/fields_easyrpg.csv index 5958b4d6..e720e85f 100644 --- a/generator/csv/fields_easyrpg.csv +++ b/generator/csv/fields_easyrpg.csv @@ -147,3 +147,5 @@ System,easyrpg_battle_use_rpg2ke_strings,f,Boolean,0xD8,False,0,1,If RPG Maker 2 System,easyrpg_use_rpg2k_battle_commands,f,Boolean,0xD9,False,0,1,If the RPG Maker 2000 battle commands should be used in RPG Maker 2003 games System,easyrpg_default_actorai,f,Int32,0xDA,-1,0,0,System default actor AI System,easyrpg_default_enemyai,f,Int32,0xDB,-1,0,0,System default enemy AI +Database,maniac_string_variables,f,Array,0x21,,0,0, +StringVariable,name,f,DBString,0x01,,0,0,String diff --git a/generator/csv/structs_easyrpg.csv b/generator/csv/structs_easyrpg.csv index 72c0d588..2f4738c6 100644 --- a/generator/csv/structs_easyrpg.csv +++ b/generator/csv/structs_easyrpg.csv @@ -1,4 +1,5 @@ Type,Structure,Base,Index available? +ldb,StringVariable,,1 lsd,SaveEasyRpgData,,0 lsd,SaveEasyRpgWindow,,1 lsd,SaveEasyRpgText,,0 From 2e412be2f5159e573ed84e3e52ec81d155d6b6ef Mon Sep 17 00:00:00 2001 From: Ghabry Date: Wed, 19 Mar 2025 17:40:02 +0100 Subject: [PATCH 4/7] Fix memory corruption (lcf2xml) and memory leak (XmlReader) --- src/reader_xml.cpp | 4 ++++ tools/lcf2xml.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/reader_xml.cpp b/src/reader_xml.cpp index 6eb2a2ad..fe6a18a1 100644 --- a/src/reader_xml.cpp +++ b/src/reader_xml.cpp @@ -53,6 +53,10 @@ XmlReader::~XmlReader() { if (parser != NULL) XML_ParserFree(parser); parser = NULL; + + if (!handlers.empty()) { + delete(handlers.back()); + } #endif } diff --git a/tools/lcf2xml.cpp b/tools/lcf2xml.cpp index e3caf091..426d1126 100644 --- a/tools/lcf2xml.cpp +++ b/tools/lcf2xml.cpp @@ -208,7 +208,7 @@ FileTypes GetFiletype(const std::string& in_file, std::string& out_extension) return FileType_LCF_MapUnit; } else if (input == "?xml versi") { in.read(buf, 128); - std::string in(buf); + std::string in(std::begin(buf), std::end(buf)); size_t pos = in.find('<'); if (pos != std::string::npos) From 5ee49095efe8a40a8693fc15b7833afb68694311 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Wed, 19 Mar 2025 18:16:06 +0100 Subject: [PATCH 5/7] Bit perfect reading/writing: CommonEvent Trigger is always written even if defaulted --- generator/csv/fields.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/csv/fields.csv b/generator/csv/fields.csv index 810b4855..2e82eafd 100644 --- a/generator/csv/fields.csv +++ b/generator/csv/fields.csv @@ -135,7 +135,7 @@ Class,attribute_ranks,t,Vector,0x49,,0,0,Integer Class,attribute_ranks,f,Vector,0x4A,,1,0,Array - Short Class,battle_commands,f,Vector>,0x50,,1,0,Array - Uint32 CommonEvent,name,f,DBString,0x01,,0,0,String -CommonEvent,trigger,f,Enum,0x0B,5,0,0,Integer +CommonEvent,trigger,f,Enum,0x0B,5,1,0,Integer CommonEvent,switch_flag,f,Boolean,0x0C,False,0,0,Flag CommonEvent,switch_id,f,Ref,0x0D,1,0,0,Integer CommonEvent,event_commands,t,Vector,0x15,,1,0,Integer From 63b3c9d04c3227f3611d24c4d0fd8dcaa2cfdd17 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Wed, 19 Mar 2025 18:16:48 +0100 Subject: [PATCH 6/7] Add generated files --- CMakeLists.txt | 4 + Makefile.am | 4 + src/generated/fwd_flags_impl.h | 2 + src/generated/fwd_flags_instance.h | 2 + src/generated/fwd_struct_impl.h | 5 + src/generated/lcf/ldb/chunks.h | 10 +- src/generated/lcf/lsd/chunks.h | 26 ++++- src/generated/lcf/rpg/commonevent.h | 8 +- src/generated/lcf/rpg/database.h | 9 +- src/generated/lcf/rpg/fwd.h | 1 + src/generated/lcf/rpg/savesystem.h | 51 +++++++++- src/generated/lcf/rpg/stringvariable.h | 54 +++++++++++ src/generated/ldb_commonevent.cpp | 2 +- src/generated/ldb_database.cpp | 8 ++ src/generated/ldb_stringvariable.cpp | 40 ++++++++ src/generated/lsd_savesystem.cpp | 96 +++++++++++++++++++ ...lsd_savesystem_maniac_message_hook_flags.h | 42 ++++++++ src/generated/rpg_database.cpp | 5 + src/generated/rpg_savesystem.cpp | 20 ++++ src/generated/rpg_stringvariable.cpp | 26 +++++ 20 files changed, 408 insertions(+), 7 deletions(-) create mode 100644 src/generated/lcf/rpg/stringvariable.h create mode 100644 src/generated/ldb_stringvariable.cpp create mode 100644 src/generated/lsd_savesystem_maniac_message_hook_flags.h create mode 100644 src/generated/rpg_stringvariable.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 30a30559..7dd3f695 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ set(LCF_SOURCES src/generated/ldb_skill.cpp src/generated/ldb_sound.cpp src/generated/ldb_state.cpp + src/generated/ldb_stringvariable.cpp src/generated/ldb_switch.cpp src/generated/ldb_system.cpp src/generated/ldb_terms.cpp @@ -125,6 +126,7 @@ set(LCF_SOURCES src/generated/lsd_savepicture_flags.h src/generated/lsd_savescreen.cpp src/generated/lsd_savesystem.cpp + src/generated/lsd_savesystem_maniac_message_hook_flags.h src/generated/lsd_savetarget.cpp src/generated/lsd_savetitle.cpp src/generated/lsd_savevehiclelocation.cpp @@ -185,6 +187,7 @@ set(LCF_SOURCES src/generated/rpg_sound.cpp src/generated/rpg_start.cpp src/generated/rpg_state.cpp + src/generated/rpg_stringvariable.cpp src/generated/rpg_switch.cpp src/generated/rpg_system.cpp src/generated/rpg_terms.cpp @@ -283,6 +286,7 @@ set(LCF_HEADERS src/generated/lcf/rpg/sound.h src/generated/lcf/rpg/start.h src/generated/lcf/rpg/state.h + src/generated/lcf/rpg/stringvariable.h src/generated/lcf/rpg/switch.h src/generated/lcf/rpg/system.h src/generated/lcf/rpg/terms.h diff --git a/Makefile.am b/Makefile.am index b6585257..2220f0f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -98,6 +98,7 @@ liblcf_la_SOURCES = \ src/generated/ldb_skill.cpp \ src/generated/ldb_sound.cpp \ src/generated/ldb_state.cpp \ + src/generated/ldb_stringvariable.cpp \ src/generated/ldb_switch.cpp \ src/generated/ldb_system.cpp \ src/generated/ldb_terms.cpp \ @@ -142,6 +143,7 @@ liblcf_la_SOURCES = \ src/generated/lsd_savepicture_flags.h \ src/generated/lsd_savescreen.cpp \ src/generated/lsd_savesystem.cpp \ + src/generated/lsd_savesystem_maniac_message_hook_flags.h \ src/generated/lsd_savetarget.cpp \ src/generated/lsd_savetitle.cpp \ src/generated/lsd_savevehiclelocation.cpp \ @@ -202,6 +204,7 @@ liblcf_la_SOURCES = \ src/generated/rpg_sound.cpp \ src/generated/rpg_start.cpp \ src/generated/rpg_state.cpp \ + src/generated/rpg_stringvariable.cpp \ src/generated/rpg_switch.cpp \ src/generated/rpg_system.cpp \ src/generated/rpg_terms.cpp \ @@ -314,6 +317,7 @@ lcfrpginclude_HEADERS = \ src/generated/lcf/rpg/sound.h \ src/generated/lcf/rpg/start.h \ src/generated/lcf/rpg/state.h \ + src/generated/lcf/rpg/stringvariable.h \ src/generated/lcf/rpg/switch.h \ src/generated/lcf/rpg/system.h \ src/generated/lcf/rpg/terms.h \ diff --git a/src/generated/fwd_flags_impl.h b/src/generated/fwd_flags_impl.h index 6883f7ae..f2e0ef77 100644 --- a/src/generated/fwd_flags_impl.h +++ b/src/generated/fwd_flags_impl.h @@ -12,6 +12,7 @@ #include "lcf/rpg/trooppagecondition.h" #include "lcf/rpg/terrain.h" #include "lcf/rpg/eventpagecondition.h" +#include "lcf/rpg/savesystem.h" #include "lcf/rpg/savepicture.h" #include "lcf/rpg/saveeventexecframe.h" #include "lcf/rpg/saveeventexecstate.h" @@ -21,6 +22,7 @@ template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; +template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; diff --git a/src/generated/fwd_flags_instance.h b/src/generated/fwd_flags_instance.h index 829ddd2d..d4620df3 100644 --- a/src/generated/fwd_flags_instance.h +++ b/src/generated/fwd_flags_instance.h @@ -12,6 +12,7 @@ #include "ldb_trooppagecondition_flags.h" #include "ldb_terrain_special_flags.h" #include "lmu_eventpagecondition_flags.h" +#include "lsd_savesystem_maniac_message_hook_flags.h" #include "lsd_savepicture_flags.h" #include "lsd_saveeventexecframe_easyrpg_runtime_flags.h" #include "lsd_saveeventexecstate_easyrpg_runtime_flags.h" @@ -23,6 +24,7 @@ namespace lcf { template class Flags; template class Flags; template class Flags; +template class Flags; template class Flags; template class Flags; template class Flags; diff --git a/src/generated/fwd_struct_impl.h b/src/generated/fwd_struct_impl.h index 51479244..c37a9b6e 100644 --- a/src/generated/fwd_struct_impl.h +++ b/src/generated/fwd_struct_impl.h @@ -297,6 +297,11 @@ const char* const Struct::name; template <> Field const* Struct::fields[]; +template <> +const char* const Struct::name; +template <> +Field const* Struct::fields[]; + template <> const char* const Struct::name; template <> diff --git a/src/generated/lcf/ldb/chunks.h b/src/generated/lcf/ldb/chunks.h index 758ef9a6..21449bcc 100644 --- a/src/generated/lcf/ldb/chunks.h +++ b/src/generated/lcf/ldb/chunks.h @@ -1535,7 +1535,15 @@ namespace LDB_Reader { /** Duplicated? - Not used - RPG2003 */ classD1 = 0x1F, /** rpg::BattlerAnimation - RPG2003 */ - battleranimations = 0x20 + battleranimations = 0x20, + /** */ + maniac_string_variables = 0x21 + }; + }; + struct ChunkStringVariable { + enum Index { + /** String */ + name = 0x01 }; }; } diff --git a/src/generated/lcf/lsd/chunks.h b/src/generated/lcf/lsd/chunks.h index 1453bea9..ab4e6c04 100644 --- a/src/generated/lcf/lsd/chunks.h +++ b/src/generated/lcf/lsd/chunks.h @@ -164,6 +164,26 @@ namespace LSD_Reader { atb_mode = 0x8C, /** rpg::Strings */ maniac_strings = 0x24, + /** Width of the message window in pixels */ + maniac_message_window_width = 0x2D, + /** Height of the message window in pixels */ + maniac_message_window_height = 0x2E, + /** Font to use in the message window */ + maniac_message_font_name = 0x2F, + /** Size of the font in the message window */ + maniac_message_font_size = 0x30, + /** Situations when to invoke the callbacks */ + maniac_message_hook_flags = 0x32, + /** Common Event to call for a hook */ + maniac_message_hook_common_event_id = 0x42, + /** Variable (starting range) populated when hook is invoked */ + maniac_message_hook_callback_system_variable = 0x43, + /** String Variable populated when hook is invoked */ + maniac_message_hook_callback_system_string_variable = 0x44, + /** Variable (starting range) populated when hook is invoked */ + maniac_message_hook_callback_user_variable = 0x45, + /** String Variable populated when hook is invoked (TODO: Difference between System and User callback) */ + maniac_message_hook_callback_user_string_variable = 0x46, /** FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2) */ maniac_frameskip = 0x88, /** FatalMix Picture Limit */ @@ -171,7 +191,11 @@ namespace LSD_Reader { /** 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) */ maniac_options = 0x8A, /** JoyLeft, JoyRight, JoyUp, JoyDown, Joy1, ... Joy12 */ - maniac_joypad_bindings = 0x8B + maniac_joypad_bindings = 0x8B, + /** Additional spacing between characters in the message window (Editor value - 1) */ + maniac_message_spacing_char = 0x8E, + /** Additional spacing between lines in the message window (Editor value - 1) */ + maniac_message_spacing_line = 0x8F }; }; struct ChunkSaveScreen { diff --git a/src/generated/lcf/rpg/commonevent.h b/src/generated/lcf/rpg/commonevent.h index 6e76d823..287c7967 100644 --- a/src/generated/lcf/rpg/commonevent.h +++ b/src/generated/lcf/rpg/commonevent.h @@ -32,12 +32,16 @@ namespace rpg { enum Trigger { Trigger_automatic = 3, Trigger_parallel = 4, - Trigger_call = 5 + Trigger_call = 5, + Trigger_maniac_battle_start = 6, + Trigger_maniac_battle_parallel = 7 }; static constexpr auto kTriggerTags = lcf::EnumTags{ Trigger_automatic, "automatic", Trigger_parallel, "parallel", - Trigger_call, "call" + Trigger_call, "call", + Trigger_maniac_battle_start, "maniac_battle_start", + Trigger_maniac_battle_parallel, "maniac_battle_parallel" }; int ID = 0; diff --git a/src/generated/lcf/rpg/database.h b/src/generated/lcf/rpg/database.h index ef746d61..fca946fd 100644 --- a/src/generated/lcf/rpg/database.h +++ b/src/generated/lcf/rpg/database.h @@ -27,6 +27,7 @@ #include "lcf/rpg/item.h" #include "lcf/rpg/skill.h" #include "lcf/rpg/state.h" +#include "lcf/rpg/stringvariable.h" #include "lcf/rpg/switch.h" #include "lcf/rpg/system.h" #include "lcf/rpg/terms.h" @@ -64,6 +65,7 @@ namespace rpg { BattleCommands battlecommands; std::vector classes; std::vector battleranimations; + std::vector maniac_string_variables; }; inline bool operator==(const Database& l, const Database& r) { @@ -85,7 +87,8 @@ namespace rpg { && l.version == r.version && l.battlecommands == r.battlecommands && l.classes == r.classes - && l.battleranimations == r.battleranimations; + && l.battleranimations == r.battleranimations + && l.maniac_string_variables == r.maniac_string_variables; } inline bool operator!=(const Database& l, const Database& r) { @@ -162,6 +165,10 @@ namespace rpg { const auto ctx19 = Context{ "battleranimations", i, &obj, parent_ctx }; ForEachString(obj.battleranimations[i], f, &ctx19); } + for (int i = 0; i < static_cast(obj.maniac_string_variables.size()); ++i) { + const auto ctx20 = Context{ "maniac_string_variables", i, &obj, parent_ctx }; + ForEachString(obj.maniac_string_variables[i], f, &ctx20); + } (void)obj; (void)f; (void)parent_ctx; diff --git a/src/generated/lcf/rpg/fwd.h b/src/generated/lcf/rpg/fwd.h index 6495658b..b1c56671 100644 --- a/src/generated/lcf/rpg/fwd.h +++ b/src/generated/lcf/rpg/fwd.h @@ -71,6 +71,7 @@ namespace rpg { class Sound; class Start; class State; + class StringVariable; class Switch; class System; class Terms; diff --git a/src/generated/lcf/rpg/savesystem.h b/src/generated/lcf/rpg/savesystem.h index 22575b4e..8afd2101 100644 --- a/src/generated/lcf/rpg/savesystem.h +++ b/src/generated/lcf/rpg/savesystem.h @@ -13,6 +13,7 @@ #define LCF_RPG_SAVESYSTEM_H // Headers +#include #include #include #include @@ -118,10 +119,34 @@ namespace rpg { int32_t save_slot = 1; int32_t atb_mode = 0; std::vector maniac_strings; + int32_t maniac_message_window_width = 0; + int32_t maniac_message_window_height = 0; + DBString maniac_message_font_name; + int32_t maniac_message_font_size = 0; + struct ManiacMessageHook_Flags { + union { + struct { + bool user_event; + bool create_window; + bool destroy_window; + bool text_rendering; + }; + std::array flags; + }; + ManiacMessageHook_Flags() noexcept: user_event(false), create_window(false), destroy_window(false), text_rendering(false) + {} + } maniac_message_hook_flags; + int32_t maniac_message_hook_common_event_id = 0; + int32_t maniac_message_hook_callback_system_variable = 0; + int32_t maniac_message_hook_callback_system_string_variable = 0; + int32_t maniac_message_hook_callback_user_variable = 0; + int32_t maniac_message_hook_callback_user_string_variable = 0; int32_t maniac_frameskip = 0; int32_t maniac_picture_limit = 0; std::vector maniac_options; std::vector maniac_joypad_bindings; + int32_t maniac_message_spacing_char = 0; + int32_t maniac_message_spacing_line = 0; }; inline std::ostream& operator<<(std::ostream& os, SaveSystem::Scene code) { os << static_cast>(code); @@ -132,6 +157,16 @@ namespace rpg { return os; } + inline bool operator==(const SaveSystem::ManiacMessageHook_Flags& l, const SaveSystem::ManiacMessageHook_Flags& r) { + return l.flags == r.flags; + } + + inline bool operator!=(const SaveSystem::ManiacMessageHook_Flags& l, const SaveSystem::ManiacMessageHook_Flags& r) { + return !(l == r); + } + + std::ostream& operator<<(std::ostream& os, const SaveSystem::ManiacMessageHook_Flags& obj); + inline bool operator==(const SaveSystem& l, const SaveSystem& r) { return l.scene == r.scene && l.frame_count == r.frame_count @@ -189,10 +224,22 @@ namespace rpg { && l.save_slot == r.save_slot && l.atb_mode == r.atb_mode && l.maniac_strings == r.maniac_strings + && l.maniac_message_window_width == r.maniac_message_window_width + && l.maniac_message_window_height == r.maniac_message_window_height + && l.maniac_message_font_name == r.maniac_message_font_name + && l.maniac_message_font_size == r.maniac_message_font_size + && l.maniac_message_hook_flags == r.maniac_message_hook_flags + && l.maniac_message_hook_common_event_id == r.maniac_message_hook_common_event_id + && l.maniac_message_hook_callback_system_variable == r.maniac_message_hook_callback_system_variable + && l.maniac_message_hook_callback_system_string_variable == r.maniac_message_hook_callback_system_string_variable + && l.maniac_message_hook_callback_user_variable == r.maniac_message_hook_callback_user_variable + && l.maniac_message_hook_callback_user_string_variable == r.maniac_message_hook_callback_user_string_variable && l.maniac_frameskip == r.maniac_frameskip && l.maniac_picture_limit == r.maniac_picture_limit && l.maniac_options == r.maniac_options - && l.maniac_joypad_bindings == r.maniac_joypad_bindings; + && l.maniac_joypad_bindings == r.maniac_joypad_bindings + && l.maniac_message_spacing_char == r.maniac_message_spacing_char + && l.maniac_message_spacing_line == r.maniac_message_spacing_line; } inline bool operator!=(const SaveSystem& l, const SaveSystem& r) { @@ -251,6 +298,8 @@ namespace rpg { ForEachString(obj.enemy_death_se, f, &ctx40); const auto ctx41 = Context{ "item_se", -1, &obj, parent_ctx }; ForEachString(obj.item_se, f, &ctx41); + const auto ctx59 = Context{ "maniac_message_font_name", -1, &obj, parent_ctx }; + f(obj.maniac_message_font_name, ctx59); (void)obj; (void)f; (void)parent_ctx; diff --git a/src/generated/lcf/rpg/stringvariable.h b/src/generated/lcf/rpg/stringvariable.h new file mode 100644 index 00000000..b82e0577 --- /dev/null +++ b/src/generated/lcf/rpg/stringvariable.h @@ -0,0 +1,54 @@ +/* !!!! GENERATED FILE - DO NOT EDIT !!!! + * -------------------------------------- + * + * This file is part of liblcf. Copyright (c) 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_STRINGVARIABLE_H +#define LCF_RPG_STRINGVARIABLE_H + +// Headers +#include "lcf/dbstring.h" +#include "lcf/context.h" +#include +#include + +/** + * rpg::StringVariable class. + */ +namespace lcf { +namespace rpg { + class StringVariable { + public: + int ID = 0; + DBString name; + }; + + inline bool operator==(const StringVariable& l, const StringVariable& r) { + return l.name == r.name; + } + + inline bool operator!=(const StringVariable& l, const StringVariable& r) { + return !(l == r); + } + + std::ostream& operator<<(std::ostream& os, const StringVariable& obj); + + template > + void ForEachString(StringVariable& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { + const auto ctx1 = Context{ "name", -1, &obj, parent_ctx }; + f(obj.name, ctx1); + (void)obj; + (void)f; + (void)parent_ctx; + } + +} // namespace rpg +} // namespace lcf + +#endif diff --git a/src/generated/ldb_commonevent.cpp b/src/generated/ldb_commonevent.cpp index 2a8eda3c..2283031a 100644 --- a/src/generated/ldb_commonevent.cpp +++ b/src/generated/ldb_commonevent.cpp @@ -31,7 +31,7 @@ static TypedField static_trigger( &rpg::CommonEvent::trigger, LDB_Reader::ChunkCommonEvent::trigger, "trigger", - 0, + 1, 0 ); static TypedField static_switch_flag( diff --git a/src/generated/ldb_database.cpp b/src/generated/ldb_database.cpp index 1aa31db6..dea1c55c 100644 --- a/src/generated/ldb_database.cpp +++ b/src/generated/ldb_database.cpp @@ -171,6 +171,13 @@ static TypedField> static_batt 1, 1 ); +static TypedField> static_maniac_string_variables( + &rpg::Database::maniac_string_variables, + LDB_Reader::ChunkDatabase::maniac_string_variables, + "maniac_string_variables", + 0, + 0 +); template <> @@ -197,6 +204,7 @@ Field const* Struct::fields[] = { &static_classes, &static_classD1, &static_battleranimations, + &static_maniac_string_variables, NULL }; diff --git a/src/generated/ldb_stringvariable.cpp b/src/generated/ldb_stringvariable.cpp new file mode 100644 index 00000000..5e684ad4 --- /dev/null +++ b/src/generated/ldb_stringvariable.cpp @@ -0,0 +1,40 @@ +/* !!!! GENERATED FILE - DO NOT EDIT !!!! + * -------------------------------------- + * + * This file is part of liblcf. Copyright (c) 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. + */ + +// Headers +#include "lcf/ldb/reader.h" +#include "lcf/ldb/chunks.h" +#include "reader_struct_impl.h" + +namespace lcf { + +// Read StringVariable. + +template <> +char const* const Struct::name = "StringVariable"; +static TypedField static_name( + &rpg::StringVariable::name, + LDB_Reader::ChunkStringVariable::name, + "name", + 0, + 0 +); + + +template <> +Field const* Struct::fields[] = { + &static_name, + NULL +}; + +template class Struct; + +} //namespace lcf diff --git a/src/generated/lsd_savesystem.cpp b/src/generated/lsd_savesystem.cpp index c7464417..b53ea34d 100644 --- a/src/generated/lsd_savesystem.cpp +++ b/src/generated/lsd_savesystem.cpp @@ -424,6 +424,76 @@ static TypedField> static_maniac_strings( 0, 0 ); +static TypedField static_maniac_message_window_width( + &rpg::SaveSystem::maniac_message_window_width, + LSD_Reader::ChunkSaveSystem::maniac_message_window_width, + "maniac_message_window_width", + 0, + 0 +); +static TypedField static_maniac_message_window_height( + &rpg::SaveSystem::maniac_message_window_height, + LSD_Reader::ChunkSaveSystem::maniac_message_window_height, + "maniac_message_window_height", + 0, + 0 +); +static TypedField static_maniac_message_font_name( + &rpg::SaveSystem::maniac_message_font_name, + LSD_Reader::ChunkSaveSystem::maniac_message_font_name, + "maniac_message_font_name", + 0, + 0 +); +static TypedField static_maniac_message_font_size( + &rpg::SaveSystem::maniac_message_font_size, + LSD_Reader::ChunkSaveSystem::maniac_message_font_size, + "maniac_message_font_size", + 0, + 0 +); +static TypedField static_maniac_message_hook_flags( + &rpg::SaveSystem::maniac_message_hook_flags, + LSD_Reader::ChunkSaveSystem::maniac_message_hook_flags, + "maniac_message_hook_flags", + 0, + 0 +); +static TypedField static_maniac_message_hook_common_event_id( + &rpg::SaveSystem::maniac_message_hook_common_event_id, + LSD_Reader::ChunkSaveSystem::maniac_message_hook_common_event_id, + "maniac_message_hook_common_event_id", + 0, + 0 +); +static TypedField static_maniac_message_hook_callback_system_variable( + &rpg::SaveSystem::maniac_message_hook_callback_system_variable, + LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_system_variable, + "maniac_message_hook_callback_system_variable", + 0, + 0 +); +static TypedField static_maniac_message_hook_callback_system_string_variable( + &rpg::SaveSystem::maniac_message_hook_callback_system_string_variable, + LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_system_string_variable, + "maniac_message_hook_callback_system_string_variable", + 0, + 0 +); +static TypedField static_maniac_message_hook_callback_user_variable( + &rpg::SaveSystem::maniac_message_hook_callback_user_variable, + LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_user_variable, + "maniac_message_hook_callback_user_variable", + 0, + 0 +); +static TypedField static_maniac_message_hook_callback_user_string_variable( + &rpg::SaveSystem::maniac_message_hook_callback_user_string_variable, + LSD_Reader::ChunkSaveSystem::maniac_message_hook_callback_user_string_variable, + "maniac_message_hook_callback_user_string_variable", + 0, + 0 +); static TypedField static_maniac_frameskip( &rpg::SaveSystem::maniac_frameskip, LSD_Reader::ChunkSaveSystem::maniac_frameskip, @@ -452,6 +522,20 @@ static TypedField> static_maniac_joypad_bi 0, 0 ); +static TypedField static_maniac_message_spacing_char( + &rpg::SaveSystem::maniac_message_spacing_char, + LSD_Reader::ChunkSaveSystem::maniac_message_spacing_char, + "maniac_message_spacing_char", + 0, + 0 +); +static TypedField static_maniac_message_spacing_line( + &rpg::SaveSystem::maniac_message_spacing_line, + LSD_Reader::ChunkSaveSystem::maniac_message_spacing_line, + "maniac_message_spacing_line", + 0, + 0 +); template <> @@ -514,10 +598,22 @@ Field const* Struct::fields[] = { &static_save_slot, &static_atb_mode, &static_maniac_strings, + &static_maniac_message_window_width, + &static_maniac_message_window_height, + &static_maniac_message_font_name, + &static_maniac_message_font_size, + &static_maniac_message_hook_flags, + &static_maniac_message_hook_common_event_id, + &static_maniac_message_hook_callback_system_variable, + &static_maniac_message_hook_callback_system_string_variable, + &static_maniac_message_hook_callback_user_variable, + &static_maniac_message_hook_callback_user_string_variable, &static_maniac_frameskip, &static_maniac_picture_limit, &static_maniac_options, &static_maniac_joypad_bindings, + &static_maniac_message_spacing_char, + &static_maniac_message_spacing_line, NULL }; diff --git a/src/generated/lsd_savesystem_maniac_message_hook_flags.h b/src/generated/lsd_savesystem_maniac_message_hook_flags.h new file mode 100644 index 00000000..9814167a --- /dev/null +++ b/src/generated/lsd_savesystem_maniac_message_hook_flags.h @@ -0,0 +1,42 @@ +/* !!!! GENERATED FILE - DO NOT EDIT !!!! + * -------------------------------------- + * + * This file is part of liblcf. Copyright (c) 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. + */ + +/* + * Headers + */ +#include "lcf/lsd/reader.h" +#include "lcf/lsd/chunks.h" +#include "reader_struct.h" + +namespace lcf { + +// Read SaveSystem. + +template <> +char const* const Flags::name = "SaveSystem_ManiacMessageHook_Flags"; + +template <> +decltype(Flags::flag_names) Flags::flag_names = { + "user_event", + "create_window", + "destroy_window", + "text_rendering" +}; + +template <> +decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { + 0, + 0, + 0, + 0 +}; + +} //namespace lcf diff --git a/src/generated/rpg_database.cpp b/src/generated/rpg_database.cpp index 068be5e4..874b6af3 100644 --- a/src/generated/rpg_database.cpp +++ b/src/generated/rpg_database.cpp @@ -96,6 +96,11 @@ std::ostream& operator<<(std::ostream& os, const Database& obj) { os << (i == 0 ? "[" : ", ") << obj.battleranimations[i]; } os << "]"; + os << ", maniac_string_variables="; + for (size_t i = 0; i < obj.maniac_string_variables.size(); ++i) { + os << (i == 0 ? "[" : ", ") << obj.maniac_string_variables[i]; + } + os << "]"; os << "}"; return os; } diff --git a/src/generated/rpg_savesystem.cpp b/src/generated/rpg_savesystem.cpp index 65d27cd3..18e0f5ba 100644 --- a/src/generated/rpg_savesystem.cpp +++ b/src/generated/rpg_savesystem.cpp @@ -15,6 +15,14 @@ namespace lcf { namespace rpg { +std::ostream& operator<<(std::ostream& os, const SaveSystem::ManiacMessageHook_Flags& obj) { + for (size_t i = 0; i < obj.flags.size(); ++i) { + os << (i == 0 ? "[" : ", ") << obj.flags[i]; + } + os << "]"; + return os; +} + std::ostream& operator<<(std::ostream& os, const SaveSystem& obj) { os << "SaveSystem{"; os << "scene="<< obj.scene; @@ -85,6 +93,16 @@ std::ostream& operator<<(std::ostream& os, const SaveSystem& obj) { os << (i == 0 ? "[" : ", ") << obj.maniac_strings[i]; } os << "]"; + os << ", maniac_message_window_width="<< obj.maniac_message_window_width; + os << ", maniac_message_window_height="<< obj.maniac_message_window_height; + os << ", maniac_message_font_name="<< obj.maniac_message_font_name; + os << ", maniac_message_font_size="<< obj.maniac_message_font_size; + os << ", maniac_message_hook_flags="<< obj.maniac_message_hook_flags; + os << ", maniac_message_hook_common_event_id="<< obj.maniac_message_hook_common_event_id; + os << ", maniac_message_hook_callback_system_variable="<< obj.maniac_message_hook_callback_system_variable; + os << ", maniac_message_hook_callback_system_string_variable="<< obj.maniac_message_hook_callback_system_string_variable; + os << ", maniac_message_hook_callback_user_variable="<< obj.maniac_message_hook_callback_user_variable; + os << ", maniac_message_hook_callback_user_string_variable="<< obj.maniac_message_hook_callback_user_string_variable; os << ", maniac_frameskip="<< obj.maniac_frameskip; os << ", maniac_picture_limit="<< obj.maniac_picture_limit; os << ", maniac_options="; @@ -97,6 +115,8 @@ std::ostream& operator<<(std::ostream& os, const SaveSystem& obj) { os << (i == 0 ? "[" : ", ") << obj.maniac_joypad_bindings[i]; } os << "]"; + os << ", maniac_message_spacing_char="<< obj.maniac_message_spacing_char; + os << ", maniac_message_spacing_line="<< obj.maniac_message_spacing_line; os << "}"; return os; } diff --git a/src/generated/rpg_stringvariable.cpp b/src/generated/rpg_stringvariable.cpp new file mode 100644 index 00000000..509c52f2 --- /dev/null +++ b/src/generated/rpg_stringvariable.cpp @@ -0,0 +1,26 @@ +/* !!!! GENERATED FILE - DO NOT EDIT !!!! + * -------------------------------------- + * + * This file is part of liblcf. Copyright (c) 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. + */ + +// Headers +#include "lcf/rpg/stringvariable.h" + +namespace lcf { +namespace rpg { + +std::ostream& operator<<(std::ostream& os, const StringVariable& obj) { + os << "StringVariable{"; + os << "name="<< obj.name; + os << "}"; + return os; +} + +} // namespace rpg +} // namespace lcf From f6457e5ad419d82f7c68eccf2d435948774b7a05 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Fri, 28 Mar 2025 20:52:00 +0100 Subject: [PATCH 7/7] Add Maniac terms which are only needed because the superior RPG Maker 2000 placeholder feature was not ported :( --- generator/csv/fields_easyrpg.csv | 6 ++ src/generated/lcf/ldb/chunks.h | 12 ++++ src/generated/lcf/rpg/terms.h | 104 +++++++++++++++++++------------ src/generated/ldb_terms.cpp | 48 ++++++++++++++ src/generated/rpg_terms.cpp | 6 ++ 5 files changed, 136 insertions(+), 40 deletions(-) diff --git a/generator/csv/fields_easyrpg.csv b/generator/csv/fields_easyrpg.csv index e720e85f..98f8d278 100644 --- a/generator/csv/fields_easyrpg.csv +++ b/generator/csv/fields_easyrpg.csv @@ -107,6 +107,12 @@ State,easyrpg_immune_states,t,DBBitArray,0xC8,,0,0,States cleared on infliction State,easyrpg_immune_states,f,DBBitArray,0xC9,,0,0,States cleared on infliction by this state Terrain,easyrpg_damage_in_percent,f,Boolean,0xC8,False,0,0,If the terrain damage is a percentage Terrain,easyrpg_damage_can_kill,f,Boolean,0xC9,False,0,0,If the terrain damage can kill the actors +Terms,maniac_item_received_a,f,DBString,0xA1,,0,0,Part 1 of item received message (item_received is part 2) +Terms,maniac_level_up_a,f,DBString,0xA2,,0,0,Part 1 of level up message +Terms,maniac_level_up_b,f,DBString,0xA3,,0,0,Part 3 of level up message (level_up is part 2) +Terms,maniac_level_up_c,f,DBString,0xA4,,0,0,Part 4 of level up message +Terms,maniac_exp_received_a,f,DBString,0xA5,,0,0,Part 1 of exp message (exp_received is part 2) +Terms,maniac_skill_learned_a,f,DBString,0xA6,,0,0,Part 1 of skill learning message (skill_learned is part 2) Terms,easyrpg_item_number_separator,f,DBString,0xC8,DBString(kDefaultTerm),0,0,Item number separator Terms,easyrpg_skill_cost_separator,f,DBString,0xC9,DBString(kDefaultTerm),0,0,Skill cost separator Terms,easyrpg_equipment_arrow,f,DBString,0xCA,DBString(kDefaultTerm),0,0,Equipment window arrow diff --git a/src/generated/lcf/ldb/chunks.h b/src/generated/lcf/ldb/chunks.h index 21449bcc..2dbccca8 100644 --- a/src/generated/lcf/ldb/chunks.h +++ b/src/generated/lcf/ldb/chunks.h @@ -1246,6 +1246,18 @@ namespace LDB_Reader { yes = 0x98, /** String */ no = 0x99, + /** Part 1 of item received message (item_received is part 2) */ + maniac_item_received_a = 0xA1, + /** Part 1 of level up message */ + maniac_level_up_a = 0xA2, + /** Part 3 of level up message (level_up is part 2) */ + maniac_level_up_b = 0xA3, + /** Part 4 of level up message */ + maniac_level_up_c = 0xA4, + /** Part 1 of exp message (exp_received is part 2) */ + maniac_exp_received_a = 0xA5, + /** Part 1 of skill learning message (skill_learned is part 2) */ + maniac_skill_learned_a = 0xA6, /** Item number separator */ easyrpg_item_number_separator = 0xC8, /** Skill cost separator */ diff --git a/src/generated/lcf/rpg/terms.h b/src/generated/lcf/rpg/terms.h index ea815f53..b0ca1fe8 100644 --- a/src/generated/lcf/rpg/terms.h +++ b/src/generated/lcf/rpg/terms.h @@ -156,6 +156,12 @@ namespace rpg { DBString exit_game_message; DBString yes; DBString no; + DBString maniac_item_received_a; + DBString maniac_level_up_a; + DBString maniac_level_up_b; + DBString maniac_level_up_c; + DBString maniac_exp_received_a; + DBString maniac_skill_learned_a; DBString easyrpg_item_number_separator = DBString(kDefaultTerm); DBString easyrpg_skill_cost_separator = DBString(kDefaultTerm); DBString easyrpg_equipment_arrow = DBString(kDefaultTerm); @@ -306,6 +312,12 @@ namespace rpg { && l.exit_game_message == r.exit_game_message && l.yes == r.yes && l.no == r.no + && l.maniac_item_received_a == r.maniac_item_received_a + && l.maniac_level_up_a == r.maniac_level_up_a + && l.maniac_level_up_b == r.maniac_level_up_b + && l.maniac_level_up_c == r.maniac_level_up_c + && l.maniac_exp_received_a == r.maniac_exp_received_a + && l.maniac_skill_learned_a == r.maniac_skill_learned_a && l.easyrpg_item_number_separator == r.easyrpg_item_number_separator && l.easyrpg_skill_cost_separator == r.easyrpg_skill_cost_separator && l.easyrpg_equipment_arrow == r.easyrpg_equipment_arrow @@ -590,46 +602,58 @@ namespace rpg { f(obj.yes, ctx126); const auto ctx127 = Context{ "no", -1, &obj, parent_ctx }; f(obj.no, ctx127); - const auto ctx128 = Context{ "easyrpg_item_number_separator", -1, &obj, parent_ctx }; - f(obj.easyrpg_item_number_separator, ctx128); - const auto ctx129 = Context{ "easyrpg_skill_cost_separator", -1, &obj, parent_ctx }; - f(obj.easyrpg_skill_cost_separator, ctx129); - const auto ctx130 = Context{ "easyrpg_equipment_arrow", -1, &obj, parent_ctx }; - f(obj.easyrpg_equipment_arrow, ctx130); - const auto ctx131 = Context{ "easyrpg_status_scene_name", -1, &obj, parent_ctx }; - f(obj.easyrpg_status_scene_name, ctx131); - const auto ctx132 = Context{ "easyrpg_status_scene_class", -1, &obj, parent_ctx }; - f(obj.easyrpg_status_scene_class, ctx132); - const auto ctx133 = Context{ "easyrpg_status_scene_title", -1, &obj, parent_ctx }; - f(obj.easyrpg_status_scene_title, ctx133); - const auto ctx134 = Context{ "easyrpg_status_scene_condition", -1, &obj, parent_ctx }; - f(obj.easyrpg_status_scene_condition, ctx134); - const auto ctx135 = Context{ "easyrpg_status_scene_front", -1, &obj, parent_ctx }; - f(obj.easyrpg_status_scene_front, ctx135); - const auto ctx136 = Context{ "easyrpg_status_scene_back", -1, &obj, parent_ctx }; - f(obj.easyrpg_status_scene_back, ctx136); - const auto ctx137 = Context{ "easyrpg_order_scene_confirm", -1, &obj, parent_ctx }; - f(obj.easyrpg_order_scene_confirm, ctx137); - const auto ctx138 = Context{ "easyrpg_order_scene_redo", -1, &obj, parent_ctx }; - f(obj.easyrpg_order_scene_redo, ctx138); - const auto ctx139 = Context{ "easyrpg_battle2k3_double_attack", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_double_attack, ctx139); - const auto ctx140 = Context{ "easyrpg_battle2k3_defend", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_defend, ctx140); - const auto ctx141 = Context{ "easyrpg_battle2k3_observe", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_observe, ctx141); - const auto ctx142 = Context{ "easyrpg_battle2k3_charge", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_charge, ctx142); - const auto ctx143 = Context{ "easyrpg_battle2k3_selfdestruct", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_selfdestruct, ctx143); - const auto ctx144 = Context{ "easyrpg_battle2k3_escape", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_escape, ctx144); - const auto ctx145 = Context{ "easyrpg_battle2k3_special_combat_back", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_special_combat_back, ctx145); - const auto ctx146 = Context{ "easyrpg_battle2k3_skill", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_skill, ctx146); - const auto ctx147 = Context{ "easyrpg_battle2k3_item", -1, &obj, parent_ctx }; - f(obj.easyrpg_battle2k3_item, ctx147); + const auto ctx128 = Context{ "maniac_item_received_a", -1, &obj, parent_ctx }; + f(obj.maniac_item_received_a, ctx128); + const auto ctx129 = Context{ "maniac_level_up_a", -1, &obj, parent_ctx }; + f(obj.maniac_level_up_a, ctx129); + const auto ctx130 = Context{ "maniac_level_up_b", -1, &obj, parent_ctx }; + f(obj.maniac_level_up_b, ctx130); + const auto ctx131 = Context{ "maniac_level_up_c", -1, &obj, parent_ctx }; + f(obj.maniac_level_up_c, ctx131); + const auto ctx132 = Context{ "maniac_exp_received_a", -1, &obj, parent_ctx }; + f(obj.maniac_exp_received_a, ctx132); + const auto ctx133 = Context{ "maniac_skill_learned_a", -1, &obj, parent_ctx }; + f(obj.maniac_skill_learned_a, ctx133); + const auto ctx134 = Context{ "easyrpg_item_number_separator", -1, &obj, parent_ctx }; + f(obj.easyrpg_item_number_separator, ctx134); + const auto ctx135 = Context{ "easyrpg_skill_cost_separator", -1, &obj, parent_ctx }; + f(obj.easyrpg_skill_cost_separator, ctx135); + const auto ctx136 = Context{ "easyrpg_equipment_arrow", -1, &obj, parent_ctx }; + f(obj.easyrpg_equipment_arrow, ctx136); + const auto ctx137 = Context{ "easyrpg_status_scene_name", -1, &obj, parent_ctx }; + f(obj.easyrpg_status_scene_name, ctx137); + const auto ctx138 = Context{ "easyrpg_status_scene_class", -1, &obj, parent_ctx }; + f(obj.easyrpg_status_scene_class, ctx138); + const auto ctx139 = Context{ "easyrpg_status_scene_title", -1, &obj, parent_ctx }; + f(obj.easyrpg_status_scene_title, ctx139); + const auto ctx140 = Context{ "easyrpg_status_scene_condition", -1, &obj, parent_ctx }; + f(obj.easyrpg_status_scene_condition, ctx140); + const auto ctx141 = Context{ "easyrpg_status_scene_front", -1, &obj, parent_ctx }; + f(obj.easyrpg_status_scene_front, ctx141); + const auto ctx142 = Context{ "easyrpg_status_scene_back", -1, &obj, parent_ctx }; + f(obj.easyrpg_status_scene_back, ctx142); + const auto ctx143 = Context{ "easyrpg_order_scene_confirm", -1, &obj, parent_ctx }; + f(obj.easyrpg_order_scene_confirm, ctx143); + const auto ctx144 = Context{ "easyrpg_order_scene_redo", -1, &obj, parent_ctx }; + f(obj.easyrpg_order_scene_redo, ctx144); + const auto ctx145 = Context{ "easyrpg_battle2k3_double_attack", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_double_attack, ctx145); + const auto ctx146 = Context{ "easyrpg_battle2k3_defend", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_defend, ctx146); + const auto ctx147 = Context{ "easyrpg_battle2k3_observe", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_observe, ctx147); + const auto ctx148 = Context{ "easyrpg_battle2k3_charge", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_charge, ctx148); + const auto ctx149 = Context{ "easyrpg_battle2k3_selfdestruct", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_selfdestruct, ctx149); + const auto ctx150 = Context{ "easyrpg_battle2k3_escape", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_escape, ctx150); + const auto ctx151 = Context{ "easyrpg_battle2k3_special_combat_back", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_special_combat_back, ctx151); + const auto ctx152 = Context{ "easyrpg_battle2k3_skill", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_skill, ctx152); + const auto ctx153 = Context{ "easyrpg_battle2k3_item", -1, &obj, parent_ctx }; + f(obj.easyrpg_battle2k3_item, ctx153); (void)obj; (void)f; (void)parent_ctx; diff --git a/src/generated/ldb_terms.cpp b/src/generated/ldb_terms.cpp index 64614d31..3656cd19 100644 --- a/src/generated/ldb_terms.cpp +++ b/src/generated/ldb_terms.cpp @@ -909,6 +909,48 @@ static TypedField static_no( 1, 0 ); +static TypedField static_maniac_item_received_a( + &rpg::Terms::maniac_item_received_a, + LDB_Reader::ChunkTerms::maniac_item_received_a, + "maniac_item_received_a", + 0, + 0 +); +static TypedField static_maniac_level_up_a( + &rpg::Terms::maniac_level_up_a, + LDB_Reader::ChunkTerms::maniac_level_up_a, + "maniac_level_up_a", + 0, + 0 +); +static TypedField static_maniac_level_up_b( + &rpg::Terms::maniac_level_up_b, + LDB_Reader::ChunkTerms::maniac_level_up_b, + "maniac_level_up_b", + 0, + 0 +); +static TypedField static_maniac_level_up_c( + &rpg::Terms::maniac_level_up_c, + LDB_Reader::ChunkTerms::maniac_level_up_c, + "maniac_level_up_c", + 0, + 0 +); +static TypedField static_maniac_exp_received_a( + &rpg::Terms::maniac_exp_received_a, + LDB_Reader::ChunkTerms::maniac_exp_received_a, + "maniac_exp_received_a", + 0, + 0 +); +static TypedField static_maniac_skill_learned_a( + &rpg::Terms::maniac_skill_learned_a, + LDB_Reader::ChunkTerms::maniac_skill_learned_a, + "maniac_skill_learned_a", + 0, + 0 +); static TypedField static_easyrpg_item_number_separator( &rpg::Terms::easyrpg_item_number_separator, LDB_Reader::ChunkTerms::easyrpg_item_number_separator, @@ -1180,6 +1222,12 @@ Field const* Struct::fields[] = { &static_exit_game_message, &static_yes, &static_no, + &static_maniac_item_received_a, + &static_maniac_level_up_a, + &static_maniac_level_up_b, + &static_maniac_level_up_c, + &static_maniac_exp_received_a, + &static_maniac_skill_learned_a, &static_easyrpg_item_number_separator, &static_easyrpg_skill_cost_separator, &static_easyrpg_equipment_arrow, diff --git a/src/generated/rpg_terms.cpp b/src/generated/rpg_terms.cpp index d85b8ff9..b945e7e5 100644 --- a/src/generated/rpg_terms.cpp +++ b/src/generated/rpg_terms.cpp @@ -144,6 +144,12 @@ std::ostream& operator<<(std::ostream& os, const Terms& obj) { os << ", exit_game_message="<< obj.exit_game_message; os << ", yes="<< obj.yes; os << ", no="<< obj.no; + os << ", maniac_item_received_a="<< obj.maniac_item_received_a; + os << ", maniac_level_up_a="<< obj.maniac_level_up_a; + os << ", maniac_level_up_b="<< obj.maniac_level_up_b; + os << ", maniac_level_up_c="<< obj.maniac_level_up_c; + os << ", maniac_exp_received_a="<< obj.maniac_exp_received_a; + os << ", maniac_skill_learned_a="<< obj.maniac_skill_learned_a; os << ", easyrpg_item_number_separator="<< obj.easyrpg_item_number_separator; os << ", easyrpg_skill_cost_separator="<< obj.easyrpg_skill_cost_separator; os << ", easyrpg_equipment_arrow="<< obj.easyrpg_equipment_arrow;