diff --git a/Makefile.am b/Makefile.am index 5bd7b3d5b..e905d2056 100644 --- a/Makefile.am +++ b/Makefile.am @@ -109,10 +109,7 @@ liblcf_la_SOURCES = \ src/generated/lsd_savevehiclelocation.cpp \ src/generated/rpg_chipset.cpp \ src/generated/rpg_enums.cpp \ - src/generated/rpg_system.cpp \ - src/boost/preprocessor/cat.hpp \ - src/boost/preprocessor/stringize.hpp \ - src/boost/preprocessor/config/config.hpp + src/generated/rpg_system.cpp pkginclude_HEADERS = \ src/command_codes.h \ src/data.h \ diff --git a/README.md b/README.md index 8e13bd4c3..320ff621c 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,5 @@ See the file COPYING for copying conditions. ### 3rd party software -liblcf code includes a copy of Boost Preprocessor Cat and Stringize -(Boost Software License 1.0) and a copy of inih (New BSD license). +liblcf code includes a copy of inih (New BSD license). See the source code comment headers for license details. diff --git a/generator/generate.py b/generator/generate.py index f3049e84c..7773439f5 100755 --- a/generator/generate.py +++ b/generator/generate.py @@ -40,14 +40,14 @@ def lcf_type(field, prefix=True): if field.size == True: if re.match(r'Count<(.*)>', field.type): - return "COUNT" + return "Count" else: - return "SIZE" + return "Size" if field.type == "DatabaseVersion": - return "DATABASE_VERSION" + return "DatabaseVersion" if field.type == "EmptyBlock": - return "EMPTY" - return "TYPED" + return "Empty" + return "Typed" def cpp_type(ty, prefix=True): if ty in cpp_types: diff --git a/generator/templates/reader.tmpl b/generator/templates/reader.tmpl index 3e5730876..5922dcc16 100644 --- a/generator/templates/reader.tmpl +++ b/generator/templates/reader.tmpl @@ -5,15 +5,38 @@ #include "reader_struct.h" // Read {{ struct_name }}. +{%- set LCF_CHUNK_SUFFIX = type|upper + "_Reader" %} +{%- set LCF_CURRENT_STRUCT = struct_name %} -#define LCF_CHUNK_SUFFIX {{ type|upper }}_Reader -#define LCF_CURRENT_STRUCT {{ struct_name }} +template <> +char const* const Struct::name = "{{ LCF_CURRENT_STRUCT }}"; -LCF_STRUCT_FIELDS_BEGIN() +template <> +Field const* Struct::fields[] = { {%- for field in fields[struct_name]|field_is_written %} - LCF_STRUCT_{{ field|lcf_type }}_FIELD({{ field.type|cpp_type }}, {{ field.name }}, {{field.presentifdefault}}, {{field.is2k3}}), + {%- if field|lcf_type in ["Typed", "DatabaseVersion"] %} + new {{ field|lcf_type }}Field( + &RPG::{{ LCF_CURRENT_STRUCT }}::{{ field.name }}, + {{ LCF_CHUNK_SUFFIX }}::Chunk{{ LCF_CURRENT_STRUCT }}::{{ field.name }}, + "{{ field.name }}", + {{field.presentifdefault}}, + {{field.is2k3}} + ), + {%- elif field|lcf_type in ["Empty"] %} + new {{ field|lcf_type }}Field( + {{ LCF_CHUNK_SUFFIX }}::Chunk{{ LCF_CURRENT_STRUCT }}::{{ field.name }}, + "{{ field.name }}", + {{field.presentifdefault}}, + {{field.is2k3}} + ), + {%- elif field|lcf_type in ["Size", "Count"] %} + new {{ field|lcf_type }}Field( + &RPG::{{ LCF_CURRENT_STRUCT }}::{{ field.name }}, + {{ LCF_CHUNK_SUFFIX }}::Chunk{{ LCF_CURRENT_STRUCT }}::{{ field.name }}_size, + {{field.presentifdefault}}, + {{field.is2k3}} + ), + {%- endif %} {%- endfor %} -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX + NULL +}; diff --git a/src/boost/preprocessor/cat.hpp b/src/boost/preprocessor/cat.hpp deleted file mode 100644 index 5e52850d4..000000000 --- a/src/boost/preprocessor/cat.hpp +++ /dev/null @@ -1,35 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_CAT_HPP -# define BOOST_PREPROCESSOR_CAT_HPP -# -# include -# -# /* BOOST_PP_CAT */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) -# else -# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b)) -# define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par -# endif -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() -# define BOOST_PP_CAT_I(a, b) a ## b -# else -# define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) -# define BOOST_PP_CAT_II(p, res) res -# endif -# -# endif diff --git a/src/boost/preprocessor/config/config.hpp b/src/boost/preprocessor/config/config.hpp deleted file mode 100644 index 8be0e4754..000000000 --- a/src/boost/preprocessor/config/config.hpp +++ /dev/null @@ -1,104 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002-2011. * -# * (C) Copyright Edward Diener 2011. * -# * Distributed under the Boost Software License, Version 1.0. (See * -# * accompanying file LICENSE_1_0.txt or copy at * -# * http://www.boost.org/LICENSE_1_0.txt) * -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP -# define BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP -# -# /* BOOST_PP_CONFIG_FLAGS */ -# -# define BOOST_PP_CONFIG_STRICT() 0x0001 -# define BOOST_PP_CONFIG_IDEAL() 0x0002 -# -# define BOOST_PP_CONFIG_MSVC() 0x0004 -# define BOOST_PP_CONFIG_MWCC() 0x0008 -# define BOOST_PP_CONFIG_BCC() 0x0010 -# define BOOST_PP_CONFIG_EDG() 0x0020 -# define BOOST_PP_CONFIG_DMC() 0x0040 -# -# ifndef BOOST_PP_CONFIG_FLAGS -# if defined(__GCCXML__) -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) -# elif defined(__WAVE__) -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) -# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) -# elif defined(__EDG__) || defined(__EDG_VERSION__) -# if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) -# else -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT()) -# endif -# elif defined(__MWERKS__) -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC()) -# elif defined(__DMC__) -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_DMC()) -# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581 -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) -# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC()) -# elif defined(_MSC_VER) && !defined(__clang__) -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) -# else -# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) -# endif -# endif -# -# /* BOOST_PP_CONFIG_EXTENDED_LINE_INFO */ -# -# ifndef BOOST_PP_CONFIG_EXTENDED_LINE_INFO -# define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0 -# endif -# -# /* BOOST_PP_CONFIG_ERRORS */ -# -# ifndef BOOST_PP_CONFIG_ERRORS -# ifdef NDEBUG -# define BOOST_PP_CONFIG_ERRORS 0 -# else -# define BOOST_PP_CONFIG_ERRORS 1 -# endif -# endif -# -# /* BOOST_PP_VARIADICS */ -# -# define BOOST_PP_VARIADICS_MSVC 0 -# if !defined BOOST_PP_VARIADICS -# /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI -# define BOOST_PP_VARIADICS 0 -# /* VC++ (C/C++) */ -# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ -# define BOOST_PP_VARIADICS 1 -# undef BOOST_PP_VARIADICS_MSVC -# define BOOST_PP_VARIADICS_MSVC 1 -# /* Wave (C/C++), GCC (C++) */ -# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__ -# define BOOST_PP_VARIADICS 1 -# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */ -# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L -# define BOOST_PP_VARIADICS 1 -# else -# define BOOST_PP_VARIADICS 0 -# endif -# elif !BOOST_PP_VARIADICS + 1 < 2 -# undef BOOST_PP_VARIADICS -# define BOOST_PP_VARIADICS 1 -# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) -# undef BOOST_PP_VARIADICS_MSVC -# define BOOST_PP_VARIADICS_MSVC 1 -# endif -# else -# undef BOOST_PP_VARIADICS -# define BOOST_PP_VARIADICS 0 -# endif -# -# endif diff --git a/src/boost/preprocessor/stringize.hpp b/src/boost/preprocessor/stringize.hpp deleted file mode 100644 index 64dd5fde3..000000000 --- a/src/boost/preprocessor/stringize.hpp +++ /dev/null @@ -1,33 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP -# define BOOST_PREPROCESSOR_STRINGIZE_HPP -# -# include -# -# /* BOOST_PP_STRINGIZE */ -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() -# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text)) -# define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text)) -# define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par -# else -# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text) -# endif -# -# define BOOST_PP_STRINGIZE_I(text) #text -# -# endif diff --git a/src/generated/ldb_actor.cpp b/src/generated/ldb_actor.cpp index 89bfe229a..80c187b7a 100644 --- a/src/generated/ldb_actor.cpp +++ b/src/generated/ldb_actor.cpp @@ -16,44 +16,239 @@ // Read Actor. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Actor +template <> +char const* const Struct::name = "Actor"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, title, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, character_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, character_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, transparent, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, initial_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, final_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, critical_hit, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, critical_hit_chance, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, face_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, face_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, two_weapon, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, lock_equipment, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, auto_battle, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, super_guard, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Parameters, parameters, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp_base, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp_inflation, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp_correction, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Equipment, initial_equipment, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, unarmed_animation, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, class_id, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_x, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_y, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, battler_animation, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::vector, skills, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, rename_skill, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, skill_name, 0, 0), - LCF_STRUCT_SIZE_FIELD(uint8_t, state_ranks, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, state_ranks, 1, 0), - LCF_STRUCT_SIZE_FIELD(uint8_t, attribute_ranks, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, attribute_ranks, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, battle_commands, 1, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Actor::name, + LDB_Reader::ChunkActor::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Actor::title, + LDB_Reader::ChunkActor::title, + "title", + 0, + 0 + ), + new TypedField( + &RPG::Actor::character_name, + LDB_Reader::ChunkActor::character_name, + "character_name", + 0, + 0 + ), + new TypedField( + &RPG::Actor::character_index, + LDB_Reader::ChunkActor::character_index, + "character_index", + 0, + 0 + ), + new TypedField( + &RPG::Actor::transparent, + LDB_Reader::ChunkActor::transparent, + "transparent", + 0, + 0 + ), + new TypedField( + &RPG::Actor::initial_level, + LDB_Reader::ChunkActor::initial_level, + "initial_level", + 0, + 0 + ), + new TypedField( + &RPG::Actor::final_level, + LDB_Reader::ChunkActor::final_level, + "final_level", + 0, + 0 + ), + new TypedField( + &RPG::Actor::critical_hit, + LDB_Reader::ChunkActor::critical_hit, + "critical_hit", + 0, + 0 + ), + new TypedField( + &RPG::Actor::critical_hit_chance, + LDB_Reader::ChunkActor::critical_hit_chance, + "critical_hit_chance", + 0, + 0 + ), + new TypedField( + &RPG::Actor::face_name, + LDB_Reader::ChunkActor::face_name, + "face_name", + 0, + 0 + ), + new TypedField( + &RPG::Actor::face_index, + LDB_Reader::ChunkActor::face_index, + "face_index", + 0, + 0 + ), + new TypedField( + &RPG::Actor::two_weapon, + LDB_Reader::ChunkActor::two_weapon, + "two_weapon", + 0, + 0 + ), + new TypedField( + &RPG::Actor::lock_equipment, + LDB_Reader::ChunkActor::lock_equipment, + "lock_equipment", + 0, + 0 + ), + new TypedField( + &RPG::Actor::auto_battle, + LDB_Reader::ChunkActor::auto_battle, + "auto_battle", + 0, + 0 + ), + new TypedField( + &RPG::Actor::super_guard, + LDB_Reader::ChunkActor::super_guard, + "super_guard", + 0, + 0 + ), + new TypedField( + &RPG::Actor::parameters, + LDB_Reader::ChunkActor::parameters, + "parameters", + 0, + 0 + ), + new TypedField( + &RPG::Actor::exp_base, + LDB_Reader::ChunkActor::exp_base, + "exp_base", + 0, + 0 + ), + new TypedField( + &RPG::Actor::exp_inflation, + LDB_Reader::ChunkActor::exp_inflation, + "exp_inflation", + 0, + 0 + ), + new TypedField( + &RPG::Actor::exp_correction, + LDB_Reader::ChunkActor::exp_correction, + "exp_correction", + 0, + 0 + ), + new TypedField( + &RPG::Actor::initial_equipment, + LDB_Reader::ChunkActor::initial_equipment, + "initial_equipment", + 0, + 0 + ), + new TypedField( + &RPG::Actor::unarmed_animation, + LDB_Reader::ChunkActor::unarmed_animation, + "unarmed_animation", + 0, + 0 + ), + new TypedField( + &RPG::Actor::class_id, + LDB_Reader::ChunkActor::class_id, + "class_id", + 0, + 1 + ), + new TypedField( + &RPG::Actor::battle_x, + LDB_Reader::ChunkActor::battle_x, + "battle_x", + 0, + 1 + ), + new TypedField( + &RPG::Actor::battle_y, + LDB_Reader::ChunkActor::battle_y, + "battle_y", + 0, + 1 + ), + new TypedField( + &RPG::Actor::battler_animation, + LDB_Reader::ChunkActor::battler_animation, + "battler_animation", + 0, + 1 + ), + new TypedField>( + &RPG::Actor::skills, + LDB_Reader::ChunkActor::skills, + "skills", + 1, + 0 + ), + new TypedField( + &RPG::Actor::rename_skill, + LDB_Reader::ChunkActor::rename_skill, + "rename_skill", + 0, + 0 + ), + new TypedField( + &RPG::Actor::skill_name, + LDB_Reader::ChunkActor::skill_name, + "skill_name", + 0, + 0 + ), + new SizeField( + &RPG::Actor::state_ranks, + LDB_Reader::ChunkActor::state_ranks_size, + 0, + 0 + ), + new TypedField>( + &RPG::Actor::state_ranks, + LDB_Reader::ChunkActor::state_ranks, + "state_ranks", + 1, + 0 + ), + new SizeField( + &RPG::Actor::attribute_ranks, + LDB_Reader::ChunkActor::attribute_ranks_size, + 0, + 0 + ), + new TypedField>( + &RPG::Actor::attribute_ranks, + LDB_Reader::ChunkActor::attribute_ranks, + "attribute_ranks", + 1, + 0 + ), + new TypedField>( + &RPG::Actor::battle_commands, + LDB_Reader::ChunkActor::battle_commands, + "battle_commands", + 1, + 1 + ), + NULL +}; diff --git a/src/generated/ldb_animation.cpp b/src/generated/ldb_animation.cpp index 05642a310..8bc38e131 100644 --- a/src/generated/ldb_animation.cpp +++ b/src/generated/ldb_animation.cpp @@ -16,18 +16,59 @@ // Read Animation. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Animation +template <> +char const* const Struct::name = "Animation"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, animation_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, large, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, timings, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, scope, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, frames, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Animation::name, + LDB_Reader::ChunkAnimation::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Animation::animation_name, + LDB_Reader::ChunkAnimation::animation_name, + "animation_name", + 0, + 0 + ), + new TypedField( + &RPG::Animation::large, + LDB_Reader::ChunkAnimation::large, + "large", + 0, + 0 + ), + new TypedField>( + &RPG::Animation::timings, + LDB_Reader::ChunkAnimation::timings, + "timings", + 1, + 0 + ), + new TypedField( + &RPG::Animation::scope, + LDB_Reader::ChunkAnimation::scope, + "scope", + 1, + 0 + ), + new TypedField( + &RPG::Animation::position, + LDB_Reader::ChunkAnimation::position, + "position", + 1, + 0 + ), + new TypedField>( + &RPG::Animation::frames, + LDB_Reader::ChunkAnimation::frames, + "frames", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_animationcelldata.cpp b/src/generated/ldb_animationcelldata.cpp index 79efdf067..1a026c362 100644 --- a/src/generated/ldb_animationcelldata.cpp +++ b/src/generated/ldb_animationcelldata.cpp @@ -16,21 +16,80 @@ // Read AnimationCellData. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT AnimationCellData +template <> +char const* const Struct::name = "AnimationCellData"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, valid, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, cell_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, zoom, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tone_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tone_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tone_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tone_gray, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, transparency, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::AnimationCellData::valid, + LDB_Reader::ChunkAnimationCellData::valid, + "valid", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::cell_id, + LDB_Reader::ChunkAnimationCellData::cell_id, + "cell_id", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::x, + LDB_Reader::ChunkAnimationCellData::x, + "x", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::y, + LDB_Reader::ChunkAnimationCellData::y, + "y", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::zoom, + LDB_Reader::ChunkAnimationCellData::zoom, + "zoom", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::tone_red, + LDB_Reader::ChunkAnimationCellData::tone_red, + "tone_red", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::tone_green, + LDB_Reader::ChunkAnimationCellData::tone_green, + "tone_green", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::tone_blue, + LDB_Reader::ChunkAnimationCellData::tone_blue, + "tone_blue", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::tone_gray, + LDB_Reader::ChunkAnimationCellData::tone_gray, + "tone_gray", + 0, + 0 + ), + new TypedField( + &RPG::AnimationCellData::transparency, + LDB_Reader::ChunkAnimationCellData::transparency, + "transparency", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_animationframe.cpp b/src/generated/ldb_animationframe.cpp index 1160e4d8a..9ad219ad4 100644 --- a/src/generated/ldb_animationframe.cpp +++ b/src/generated/ldb_animationframe.cpp @@ -16,12 +16,17 @@ // Read AnimationFrame. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT AnimationFrame +template <> +char const* const Struct::name = "AnimationFrame"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::vector, cells, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField>( + &RPG::AnimationFrame::cells, + LDB_Reader::ChunkAnimationFrame::cells, + "cells", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_animationtiming.cpp b/src/generated/ldb_animationtiming.cpp index a0f065937..cdcec8e40 100644 --- a/src/generated/ldb_animationtiming.cpp +++ b/src/generated/ldb_animationtiming.cpp @@ -16,19 +16,66 @@ // Read AnimationTiming. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT AnimationTiming +template <> +char const* const Struct::name = "AnimationTiming"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, frame, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, se, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_scope, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_power, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, screen_shake, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::AnimationTiming::frame, + LDB_Reader::ChunkAnimationTiming::frame, + "frame", + 0, + 0 + ), + new TypedField( + &RPG::AnimationTiming::se, + LDB_Reader::ChunkAnimationTiming::se, + "se", + 1, + 0 + ), + new TypedField( + &RPG::AnimationTiming::flash_scope, + LDB_Reader::ChunkAnimationTiming::flash_scope, + "flash_scope", + 1, + 0 + ), + new TypedField( + &RPG::AnimationTiming::flash_red, + LDB_Reader::ChunkAnimationTiming::flash_red, + "flash_red", + 0, + 0 + ), + new TypedField( + &RPG::AnimationTiming::flash_green, + LDB_Reader::ChunkAnimationTiming::flash_green, + "flash_green", + 0, + 0 + ), + new TypedField( + &RPG::AnimationTiming::flash_blue, + LDB_Reader::ChunkAnimationTiming::flash_blue, + "flash_blue", + 0, + 0 + ), + new TypedField( + &RPG::AnimationTiming::flash_power, + LDB_Reader::ChunkAnimationTiming::flash_power, + "flash_power", + 0, + 0 + ), + new TypedField( + &RPG::AnimationTiming::screen_shake, + LDB_Reader::ChunkAnimationTiming::screen_shake, + "screen_shake", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_attribute.cpp b/src/generated/ldb_attribute.cpp index 7bb24d679..9466fae33 100644 --- a/src/generated/ldb_attribute.cpp +++ b/src/generated/ldb_attribute.cpp @@ -16,18 +16,59 @@ // Read Attribute. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Attribute +template <> +char const* const Struct::name = "Attribute"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, type, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, a_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, b_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, c_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, d_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, e_rate, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Attribute::name, + LDB_Reader::ChunkAttribute::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Attribute::type, + LDB_Reader::ChunkAttribute::type, + "type", + 1, + 0 + ), + new TypedField( + &RPG::Attribute::a_rate, + LDB_Reader::ChunkAttribute::a_rate, + "a_rate", + 0, + 0 + ), + new TypedField( + &RPG::Attribute::b_rate, + LDB_Reader::ChunkAttribute::b_rate, + "b_rate", + 0, + 0 + ), + new TypedField( + &RPG::Attribute::c_rate, + LDB_Reader::ChunkAttribute::c_rate, + "c_rate", + 0, + 0 + ), + new TypedField( + &RPG::Attribute::d_rate, + LDB_Reader::ChunkAttribute::d_rate, + "d_rate", + 0, + 0 + ), + new TypedField( + &RPG::Attribute::e_rate, + LDB_Reader::ChunkAttribute::e_rate, + "e_rate", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_battlecommand.cpp b/src/generated/ldb_battlecommand.cpp index fefbe06a3..7a24074ea 100644 --- a/src/generated/ldb_battlecommand.cpp +++ b/src/generated/ldb_battlecommand.cpp @@ -16,13 +16,24 @@ // Read BattleCommand. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT BattleCommand +template <> +char const* const Struct::name = "BattleCommand"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, type, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::BattleCommand::name, + LDB_Reader::ChunkBattleCommand::name, + "name", + 1, + 0 + ), + new TypedField( + &RPG::BattleCommand::type, + LDB_Reader::ChunkBattleCommand::type, + "type", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_battlecommands.cpp b/src/generated/ldb_battlecommands.cpp index 91468cc3c..7cf011ce5 100644 --- a/src/generated/ldb_battlecommands.cpp +++ b/src/generated/ldb_battlecommands.cpp @@ -16,26 +16,115 @@ // Read BattleCommands. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT BattleCommands +template <> +char const* const Struct::name = "BattleCommands"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, placement, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, death_handler1, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, row, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_type, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, unused_display_normal_parameters, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, commands, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, death_handler2, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, death_event, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, window_size, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, transparency, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, teleport, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, teleport_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, teleport_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, teleport_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, teleport_face, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::BattleCommands::placement, + LDB_Reader::ChunkBattleCommands::placement, + "placement", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::death_handler1, + LDB_Reader::ChunkBattleCommands::death_handler1, + "death_handler1", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::row, + LDB_Reader::ChunkBattleCommands::row, + "row", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::battle_type, + LDB_Reader::ChunkBattleCommands::battle_type, + "battle_type", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::unused_display_normal_parameters, + LDB_Reader::ChunkBattleCommands::unused_display_normal_parameters, + "unused_display_normal_parameters", + 0, + 0 + ), + new TypedField>( + &RPG::BattleCommands::commands, + LDB_Reader::ChunkBattleCommands::commands, + "commands", + 1, + 0 + ), + new TypedField( + &RPG::BattleCommands::death_handler2, + LDB_Reader::ChunkBattleCommands::death_handler2, + "death_handler2", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::death_event, + LDB_Reader::ChunkBattleCommands::death_event, + "death_event", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::window_size, + LDB_Reader::ChunkBattleCommands::window_size, + "window_size", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::transparency, + LDB_Reader::ChunkBattleCommands::transparency, + "transparency", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::teleport, + LDB_Reader::ChunkBattleCommands::teleport, + "teleport", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::teleport_id, + LDB_Reader::ChunkBattleCommands::teleport_id, + "teleport_id", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::teleport_x, + LDB_Reader::ChunkBattleCommands::teleport_x, + "teleport_x", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::teleport_y, + LDB_Reader::ChunkBattleCommands::teleport_y, + "teleport_y", + 0, + 0 + ), + new TypedField( + &RPG::BattleCommands::teleport_face, + LDB_Reader::ChunkBattleCommands::teleport_face, + "teleport_face", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_battleranimation.cpp b/src/generated/ldb_battleranimation.cpp index e3b502104..907992f10 100644 --- a/src/generated/ldb_battleranimation.cpp +++ b/src/generated/ldb_battleranimation.cpp @@ -16,15 +16,38 @@ // Read BattlerAnimation. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT BattlerAnimation +template <> +char const* const Struct::name = "BattlerAnimation"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, base_data, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, weapon_data, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::BattlerAnimation::name, + LDB_Reader::ChunkBattlerAnimation::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::BattlerAnimation::speed, + LDB_Reader::ChunkBattlerAnimation::speed, + "speed", + 0, + 0 + ), + new TypedField>( + &RPG::BattlerAnimation::base_data, + LDB_Reader::ChunkBattlerAnimation::base_data, + "base_data", + 1, + 0 + ), + new TypedField>( + &RPG::BattlerAnimation::weapon_data, + LDB_Reader::ChunkBattlerAnimation::weapon_data, + "weapon_data", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_battleranimationdata.cpp b/src/generated/ldb_battleranimationdata.cpp index 52210d06b..2e9c6dc4a 100644 --- a/src/generated/ldb_battleranimationdata.cpp +++ b/src/generated/ldb_battleranimationdata.cpp @@ -16,14 +16,31 @@ // Read BattlerAnimationData. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT BattlerAnimationData +template <> +char const* const Struct::name = "BattlerAnimationData"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, move, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, after_image, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pose, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::BattlerAnimationData::move, + LDB_Reader::ChunkBattlerAnimationData::move, + "move", + 0, + 0 + ), + new TypedField( + &RPG::BattlerAnimationData::after_image, + LDB_Reader::ChunkBattlerAnimationData::after_image, + "after_image", + 0, + 0 + ), + new TypedField( + &RPG::BattlerAnimationData::pose, + LDB_Reader::ChunkBattlerAnimationData::pose, + "pose", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_battleranimationextension.cpp b/src/generated/ldb_battleranimationextension.cpp index 214a0c0e4..a9ad2a544 100644 --- a/src/generated/ldb_battleranimationextension.cpp +++ b/src/generated/ldb_battleranimationextension.cpp @@ -16,16 +16,45 @@ // Read BattlerAnimationExtension. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT BattlerAnimationExtension +template <> +char const* const Struct::name = "BattlerAnimationExtension"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, battler_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battler_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_type, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_id, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::BattlerAnimationExtension::name, + LDB_Reader::ChunkBattlerAnimationExtension::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::BattlerAnimationExtension::battler_name, + LDB_Reader::ChunkBattlerAnimationExtension::battler_name, + "battler_name", + 0, + 0 + ), + new TypedField( + &RPG::BattlerAnimationExtension::battler_index, + LDB_Reader::ChunkBattlerAnimationExtension::battler_index, + "battler_index", + 0, + 0 + ), + new TypedField( + &RPG::BattlerAnimationExtension::animation_type, + LDB_Reader::ChunkBattlerAnimationExtension::animation_type, + "animation_type", + 0, + 0 + ), + new TypedField( + &RPG::BattlerAnimationExtension::animation_id, + LDB_Reader::ChunkBattlerAnimationExtension::animation_id, + "animation_id", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_chipset.cpp b/src/generated/ldb_chipset.cpp index 077aa7d72..fe9750fe6 100644 --- a/src/generated/ldb_chipset.cpp +++ b/src/generated/ldb_chipset.cpp @@ -16,18 +16,59 @@ // Read Chipset. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Chipset +template <> +char const* const Struct::name = "Chipset"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, chipset_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, terrain_data, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, passable_data_lower, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, passable_data_upper, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_type, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_speed, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Chipset::name, + LDB_Reader::ChunkChipset::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Chipset::chipset_name, + LDB_Reader::ChunkChipset::chipset_name, + "chipset_name", + 0, + 0 + ), + new TypedField>( + &RPG::Chipset::terrain_data, + LDB_Reader::ChunkChipset::terrain_data, + "terrain_data", + 0, + 0 + ), + new TypedField>( + &RPG::Chipset::passable_data_lower, + LDB_Reader::ChunkChipset::passable_data_lower, + "passable_data_lower", + 0, + 0 + ), + new TypedField>( + &RPG::Chipset::passable_data_upper, + LDB_Reader::ChunkChipset::passable_data_upper, + "passable_data_upper", + 0, + 0 + ), + new TypedField( + &RPG::Chipset::animation_type, + LDB_Reader::ChunkChipset::animation_type, + "animation_type", + 0, + 0 + ), + new TypedField( + &RPG::Chipset::animation_speed, + LDB_Reader::ChunkChipset::animation_speed, + "animation_speed", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_class.cpp b/src/generated/ldb_class.cpp index b8d7901f1..a0ff61749 100644 --- a/src/generated/ldb_class.cpp +++ b/src/generated/ldb_class.cpp @@ -16,27 +16,120 @@ // Read Class. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Class +template <> +char const* const Struct::name = "Class"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, two_weapon, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, lock_equipment, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, auto_battle, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, super_guard, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Parameters, parameters, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp_base, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp_inflation, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp_correction, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battler_animation, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, skills, 1, 0), - LCF_STRUCT_SIZE_FIELD(uint8_t, state_ranks, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, state_ranks, 1, 0), - LCF_STRUCT_SIZE_FIELD(uint8_t, attribute_ranks, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, attribute_ranks, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, battle_commands, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Class::name, + LDB_Reader::ChunkClass::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Class::two_weapon, + LDB_Reader::ChunkClass::two_weapon, + "two_weapon", + 0, + 0 + ), + new TypedField( + &RPG::Class::lock_equipment, + LDB_Reader::ChunkClass::lock_equipment, + "lock_equipment", + 0, + 0 + ), + new TypedField( + &RPG::Class::auto_battle, + LDB_Reader::ChunkClass::auto_battle, + "auto_battle", + 0, + 0 + ), + new TypedField( + &RPG::Class::super_guard, + LDB_Reader::ChunkClass::super_guard, + "super_guard", + 0, + 0 + ), + new TypedField( + &RPG::Class::parameters, + LDB_Reader::ChunkClass::parameters, + "parameters", + 0, + 0 + ), + new TypedField( + &RPG::Class::exp_base, + LDB_Reader::ChunkClass::exp_base, + "exp_base", + 0, + 0 + ), + new TypedField( + &RPG::Class::exp_inflation, + LDB_Reader::ChunkClass::exp_inflation, + "exp_inflation", + 0, + 0 + ), + new TypedField( + &RPG::Class::exp_correction, + LDB_Reader::ChunkClass::exp_correction, + "exp_correction", + 0, + 0 + ), + new TypedField( + &RPG::Class::battler_animation, + LDB_Reader::ChunkClass::battler_animation, + "battler_animation", + 0, + 0 + ), + new TypedField>( + &RPG::Class::skills, + LDB_Reader::ChunkClass::skills, + "skills", + 1, + 0 + ), + new SizeField( + &RPG::Class::state_ranks, + LDB_Reader::ChunkClass::state_ranks_size, + 0, + 0 + ), + new TypedField>( + &RPG::Class::state_ranks, + LDB_Reader::ChunkClass::state_ranks, + "state_ranks", + 1, + 0 + ), + new SizeField( + &RPG::Class::attribute_ranks, + LDB_Reader::ChunkClass::attribute_ranks_size, + 0, + 0 + ), + new TypedField>( + &RPG::Class::attribute_ranks, + LDB_Reader::ChunkClass::attribute_ranks, + "attribute_ranks", + 1, + 0 + ), + new TypedField>( + &RPG::Class::battle_commands, + LDB_Reader::ChunkClass::battle_commands, + "battle_commands", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_commonevent.cpp b/src/generated/ldb_commonevent.cpp index 343ef8b08..84083d380 100644 --- a/src/generated/ldb_commonevent.cpp +++ b/src/generated/ldb_commonevent.cpp @@ -16,17 +16,51 @@ // Read CommonEvent. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT CommonEvent +template <> +char const* const Struct::name = "CommonEvent"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, trigger, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, switch_flag, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_id, 0, 0), - LCF_STRUCT_SIZE_FIELD(RPG::EventCommand, event_commands, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, event_commands, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::CommonEvent::name, + LDB_Reader::ChunkCommonEvent::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::CommonEvent::trigger, + LDB_Reader::ChunkCommonEvent::trigger, + "trigger", + 0, + 0 + ), + new TypedField( + &RPG::CommonEvent::switch_flag, + LDB_Reader::ChunkCommonEvent::switch_flag, + "switch_flag", + 0, + 0 + ), + new TypedField( + &RPG::CommonEvent::switch_id, + LDB_Reader::ChunkCommonEvent::switch_id, + "switch_id", + 0, + 0 + ), + new SizeField( + &RPG::CommonEvent::event_commands, + LDB_Reader::ChunkCommonEvent::event_commands_size, + 1, + 0 + ), + new TypedField>( + &RPG::CommonEvent::event_commands, + LDB_Reader::ChunkCommonEvent::event_commands, + "event_commands", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_database.cpp b/src/generated/ldb_database.cpp index 4272d3f18..9a589e7ac 100644 --- a/src/generated/ldb_database.cpp +++ b/src/generated/ldb_database.cpp @@ -16,33 +16,161 @@ // Read Database. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Database +template <> +char const* const Struct::name = "Database"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::vector, actors, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, skills, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, items, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, enemies, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, troops, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, terrains, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, attributes, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, states, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, animations, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, chipsets, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Terms, terms, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::System, system, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, switches, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, variables, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, commonevents, 1, 0), - LCF_STRUCT_DATABASE_VERSION_FIELD(int32_t, version, 0, 0), - LCF_STRUCT_EMPTY_FIELD(void, commoneventD2, 1, 1), - LCF_STRUCT_EMPTY_FIELD(void, commoneventD3, 1, 1), - LCF_STRUCT_TYPED_FIELD(RPG::BattleCommands, battlecommands, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::vector, classes, 1, 1), - LCF_STRUCT_EMPTY_FIELD(void, classD1, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::vector, battleranimations, 1, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField>( + &RPG::Database::actors, + LDB_Reader::ChunkDatabase::actors, + "actors", + 1, + 0 + ), + new TypedField>( + &RPG::Database::skills, + LDB_Reader::ChunkDatabase::skills, + "skills", + 1, + 0 + ), + new TypedField>( + &RPG::Database::items, + LDB_Reader::ChunkDatabase::items, + "items", + 1, + 0 + ), + new TypedField>( + &RPG::Database::enemies, + LDB_Reader::ChunkDatabase::enemies, + "enemies", + 1, + 0 + ), + new TypedField>( + &RPG::Database::troops, + LDB_Reader::ChunkDatabase::troops, + "troops", + 1, + 0 + ), + new TypedField>( + &RPG::Database::terrains, + LDB_Reader::ChunkDatabase::terrains, + "terrains", + 1, + 0 + ), + new TypedField>( + &RPG::Database::attributes, + LDB_Reader::ChunkDatabase::attributes, + "attributes", + 1, + 0 + ), + new TypedField>( + &RPG::Database::states, + LDB_Reader::ChunkDatabase::states, + "states", + 1, + 0 + ), + new TypedField>( + &RPG::Database::animations, + LDB_Reader::ChunkDatabase::animations, + "animations", + 1, + 0 + ), + new TypedField>( + &RPG::Database::chipsets, + LDB_Reader::ChunkDatabase::chipsets, + "chipsets", + 1, + 0 + ), + new TypedField( + &RPG::Database::terms, + LDB_Reader::ChunkDatabase::terms, + "terms", + 1, + 0 + ), + new TypedField( + &RPG::Database::system, + LDB_Reader::ChunkDatabase::system, + "system", + 1, + 0 + ), + new TypedField>( + &RPG::Database::switches, + LDB_Reader::ChunkDatabase::switches, + "switches", + 1, + 0 + ), + new TypedField>( + &RPG::Database::variables, + LDB_Reader::ChunkDatabase::variables, + "variables", + 1, + 0 + ), + new TypedField>( + &RPG::Database::commonevents, + LDB_Reader::ChunkDatabase::commonevents, + "commonevents", + 1, + 0 + ), + new DatabaseVersionField( + &RPG::Database::version, + LDB_Reader::ChunkDatabase::version, + "version", + 0, + 0 + ), + new EmptyField( + LDB_Reader::ChunkDatabase::commoneventD2, + "commoneventD2", + 1, + 1 + ), + new EmptyField( + LDB_Reader::ChunkDatabase::commoneventD3, + "commoneventD3", + 1, + 1 + ), + new TypedField( + &RPG::Database::battlecommands, + LDB_Reader::ChunkDatabase::battlecommands, + "battlecommands", + 1, + 1 + ), + new TypedField>( + &RPG::Database::classes, + LDB_Reader::ChunkDatabase::classes, + "classes", + 1, + 1 + ), + new EmptyField( + LDB_Reader::ChunkDatabase::classD1, + "classD1", + 1, + 1 + ), + new TypedField>( + &RPG::Database::battleranimations, + LDB_Reader::ChunkDatabase::battleranimations, + "battleranimations", + 1, + 1 + ), + NULL +}; diff --git a/src/generated/ldb_enemy.cpp b/src/generated/ldb_enemy.cpp index 10e691620..f82befe49 100644 --- a/src/generated/ldb_enemy.cpp +++ b/src/generated/ldb_enemy.cpp @@ -16,34 +16,169 @@ // Read Enemy. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Enemy +template <> +char const* const Struct::name = "Enemy"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, battler_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battler_hue, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, max_hp, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, max_sp, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, attack, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, defense, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spirit, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, agility, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, transparent, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, gold, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, drop_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, drop_prob, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, critical_hit, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, critical_hit_chance, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, miss, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, levitate, 0, 0), - LCF_STRUCT_SIZE_FIELD(uint8_t, state_ranks, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, state_ranks, 1, 0), - LCF_STRUCT_SIZE_FIELD(uint8_t, attribute_ranks, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, attribute_ranks, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, actions, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Enemy::name, + LDB_Reader::ChunkEnemy::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::battler_name, + LDB_Reader::ChunkEnemy::battler_name, + "battler_name", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::battler_hue, + LDB_Reader::ChunkEnemy::battler_hue, + "battler_hue", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::max_hp, + LDB_Reader::ChunkEnemy::max_hp, + "max_hp", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::max_sp, + LDB_Reader::ChunkEnemy::max_sp, + "max_sp", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::attack, + LDB_Reader::ChunkEnemy::attack, + "attack", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::defense, + LDB_Reader::ChunkEnemy::defense, + "defense", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::spirit, + LDB_Reader::ChunkEnemy::spirit, + "spirit", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::agility, + LDB_Reader::ChunkEnemy::agility, + "agility", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::transparent, + LDB_Reader::ChunkEnemy::transparent, + "transparent", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::exp, + LDB_Reader::ChunkEnemy::exp, + "exp", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::gold, + LDB_Reader::ChunkEnemy::gold, + "gold", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::drop_id, + LDB_Reader::ChunkEnemy::drop_id, + "drop_id", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::drop_prob, + LDB_Reader::ChunkEnemy::drop_prob, + "drop_prob", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::critical_hit, + LDB_Reader::ChunkEnemy::critical_hit, + "critical_hit", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::critical_hit_chance, + LDB_Reader::ChunkEnemy::critical_hit_chance, + "critical_hit_chance", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::miss, + LDB_Reader::ChunkEnemy::miss, + "miss", + 0, + 0 + ), + new TypedField( + &RPG::Enemy::levitate, + LDB_Reader::ChunkEnemy::levitate, + "levitate", + 0, + 0 + ), + new SizeField( + &RPG::Enemy::state_ranks, + LDB_Reader::ChunkEnemy::state_ranks_size, + 0, + 0 + ), + new TypedField>( + &RPG::Enemy::state_ranks, + LDB_Reader::ChunkEnemy::state_ranks, + "state_ranks", + 1, + 0 + ), + new SizeField( + &RPG::Enemy::attribute_ranks, + LDB_Reader::ChunkEnemy::attribute_ranks_size, + 0, + 0 + ), + new TypedField>( + &RPG::Enemy::attribute_ranks, + LDB_Reader::ChunkEnemy::attribute_ranks, + "attribute_ranks", + 1, + 0 + ), + new TypedField>( + &RPG::Enemy::actions, + LDB_Reader::ChunkEnemy::actions, + "actions", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_enemyaction.cpp b/src/generated/ldb_enemyaction.cpp index 68620fe8c..0dff616a0 100644 --- a/src/generated/ldb_enemyaction.cpp +++ b/src/generated/ldb_enemyaction.cpp @@ -16,24 +16,101 @@ // Read EnemyAction. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT EnemyAction +template <> +char const* const Struct::name = "EnemyAction"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, kind, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, basic, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, skill_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, enemy_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, condition_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, condition_param1, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, condition_param2, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, switch_on, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_on_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, switch_off, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_off_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, rating, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::EnemyAction::kind, + LDB_Reader::ChunkEnemyAction::kind, + "kind", + 1, + 0 + ), + new TypedField( + &RPG::EnemyAction::basic, + LDB_Reader::ChunkEnemyAction::basic, + "basic", + 1, + 0 + ), + new TypedField( + &RPG::EnemyAction::skill_id, + LDB_Reader::ChunkEnemyAction::skill_id, + "skill_id", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::enemy_id, + LDB_Reader::ChunkEnemyAction::enemy_id, + "enemy_id", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::condition_type, + LDB_Reader::ChunkEnemyAction::condition_type, + "condition_type", + 1, + 0 + ), + new TypedField( + &RPG::EnemyAction::condition_param1, + LDB_Reader::ChunkEnemyAction::condition_param1, + "condition_param1", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::condition_param2, + LDB_Reader::ChunkEnemyAction::condition_param2, + "condition_param2", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::switch_id, + LDB_Reader::ChunkEnemyAction::switch_id, + "switch_id", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::switch_on, + LDB_Reader::ChunkEnemyAction::switch_on, + "switch_on", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::switch_on_id, + LDB_Reader::ChunkEnemyAction::switch_on_id, + "switch_on_id", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::switch_off, + LDB_Reader::ChunkEnemyAction::switch_off, + "switch_off", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::switch_off_id, + LDB_Reader::ChunkEnemyAction::switch_off_id, + "switch_off_id", + 0, + 0 + ), + new TypedField( + &RPG::EnemyAction::rating, + LDB_Reader::ChunkEnemyAction::rating, + "rating", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_item.cpp b/src/generated/ldb_item.cpp index 65e3bbfe3..d5ef3cc84 100644 --- a/src/generated/ldb_item.cpp +++ b/src/generated/ldb_item.cpp @@ -16,67 +16,398 @@ // Read Item. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Item +template <> +char const* const Struct::name = "Item"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, description, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, type, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, price, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, uses, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, atk_points1, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, def_points1, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spi_points1, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, agi_points1, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, two_handed, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_cost, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hit, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, critical_hit, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, preemptive, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, dual_attack, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, attack_all, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, ignore_evasion, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, prevent_critical, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, raise_evasion, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, half_sp_cost, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, no_terrain_damage, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, cursed, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, entire_party, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, recover_hp_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, recover_hp, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, recover_sp_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, recover_sp, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, occasion_field1, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, ko_only, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, max_hp_points, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, max_sp_points, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, atk_points2, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, def_points2, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spi_points2, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, agi_points2, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, using_message, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, skill_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, occasion_field2, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, occasion_battle, 0, 0), - LCF_STRUCT_SIZE_FIELD(bool, actor_set, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, actor_set, 1, 0), - LCF_STRUCT_SIZE_FIELD(bool, state_set, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, state_set, 1, 0), - LCF_STRUCT_SIZE_FIELD(bool, attribute_set, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, attribute_set, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, state_chance, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, state_effect, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, weapon_animation, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::vector, animation_data, 1, 1), - LCF_STRUCT_TYPED_FIELD(bool, use_skill, 0, 1), - LCF_STRUCT_SIZE_FIELD(bool, class_set, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::vector, class_set, 1, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, ranged_trajectory, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, ranged_target, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Item::name, + LDB_Reader::ChunkItem::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Item::description, + LDB_Reader::ChunkItem::description, + "description", + 0, + 0 + ), + new TypedField( + &RPG::Item::type, + LDB_Reader::ChunkItem::type, + "type", + 1, + 0 + ), + new TypedField( + &RPG::Item::price, + LDB_Reader::ChunkItem::price, + "price", + 0, + 0 + ), + new TypedField( + &RPG::Item::uses, + LDB_Reader::ChunkItem::uses, + "uses", + 0, + 0 + ), + new TypedField( + &RPG::Item::atk_points1, + LDB_Reader::ChunkItem::atk_points1, + "atk_points1", + 0, + 0 + ), + new TypedField( + &RPG::Item::def_points1, + LDB_Reader::ChunkItem::def_points1, + "def_points1", + 0, + 0 + ), + new TypedField( + &RPG::Item::spi_points1, + LDB_Reader::ChunkItem::spi_points1, + "spi_points1", + 0, + 0 + ), + new TypedField( + &RPG::Item::agi_points1, + LDB_Reader::ChunkItem::agi_points1, + "agi_points1", + 0, + 0 + ), + new TypedField( + &RPG::Item::two_handed, + LDB_Reader::ChunkItem::two_handed, + "two_handed", + 1, + 0 + ), + new TypedField( + &RPG::Item::sp_cost, + LDB_Reader::ChunkItem::sp_cost, + "sp_cost", + 0, + 0 + ), + new TypedField( + &RPG::Item::hit, + LDB_Reader::ChunkItem::hit, + "hit", + 0, + 0 + ), + new TypedField( + &RPG::Item::critical_hit, + LDB_Reader::ChunkItem::critical_hit, + "critical_hit", + 0, + 0 + ), + new TypedField( + &RPG::Item::animation_id, + LDB_Reader::ChunkItem::animation_id, + "animation_id", + 0, + 0 + ), + new TypedField( + &RPG::Item::preemptive, + LDB_Reader::ChunkItem::preemptive, + "preemptive", + 0, + 0 + ), + new TypedField( + &RPG::Item::dual_attack, + LDB_Reader::ChunkItem::dual_attack, + "dual_attack", + 0, + 0 + ), + new TypedField( + &RPG::Item::attack_all, + LDB_Reader::ChunkItem::attack_all, + "attack_all", + 0, + 0 + ), + new TypedField( + &RPG::Item::ignore_evasion, + LDB_Reader::ChunkItem::ignore_evasion, + "ignore_evasion", + 0, + 0 + ), + new TypedField( + &RPG::Item::prevent_critical, + LDB_Reader::ChunkItem::prevent_critical, + "prevent_critical", + 0, + 0 + ), + new TypedField( + &RPG::Item::raise_evasion, + LDB_Reader::ChunkItem::raise_evasion, + "raise_evasion", + 0, + 0 + ), + new TypedField( + &RPG::Item::half_sp_cost, + LDB_Reader::ChunkItem::half_sp_cost, + "half_sp_cost", + 0, + 0 + ), + new TypedField( + &RPG::Item::no_terrain_damage, + LDB_Reader::ChunkItem::no_terrain_damage, + "no_terrain_damage", + 0, + 0 + ), + new TypedField( + &RPG::Item::cursed, + LDB_Reader::ChunkItem::cursed, + "cursed", + 0, + 1 + ), + new TypedField( + &RPG::Item::entire_party, + LDB_Reader::ChunkItem::entire_party, + "entire_party", + 1, + 0 + ), + new TypedField( + &RPG::Item::recover_hp_rate, + LDB_Reader::ChunkItem::recover_hp_rate, + "recover_hp_rate", + 0, + 0 + ), + new TypedField( + &RPG::Item::recover_hp, + LDB_Reader::ChunkItem::recover_hp, + "recover_hp", + 0, + 0 + ), + new TypedField( + &RPG::Item::recover_sp_rate, + LDB_Reader::ChunkItem::recover_sp_rate, + "recover_sp_rate", + 0, + 0 + ), + new TypedField( + &RPG::Item::recover_sp, + LDB_Reader::ChunkItem::recover_sp, + "recover_sp", + 0, + 0 + ), + new TypedField( + &RPG::Item::occasion_field1, + LDB_Reader::ChunkItem::occasion_field1, + "occasion_field1", + 0, + 0 + ), + new TypedField( + &RPG::Item::ko_only, + LDB_Reader::ChunkItem::ko_only, + "ko_only", + 0, + 0 + ), + new TypedField( + &RPG::Item::max_hp_points, + LDB_Reader::ChunkItem::max_hp_points, + "max_hp_points", + 0, + 0 + ), + new TypedField( + &RPG::Item::max_sp_points, + LDB_Reader::ChunkItem::max_sp_points, + "max_sp_points", + 0, + 0 + ), + new TypedField( + &RPG::Item::atk_points2, + LDB_Reader::ChunkItem::atk_points2, + "atk_points2", + 0, + 0 + ), + new TypedField( + &RPG::Item::def_points2, + LDB_Reader::ChunkItem::def_points2, + "def_points2", + 0, + 0 + ), + new TypedField( + &RPG::Item::spi_points2, + LDB_Reader::ChunkItem::spi_points2, + "spi_points2", + 0, + 0 + ), + new TypedField( + &RPG::Item::agi_points2, + LDB_Reader::ChunkItem::agi_points2, + "agi_points2", + 0, + 0 + ), + new TypedField( + &RPG::Item::using_message, + LDB_Reader::ChunkItem::using_message, + "using_message", + 1, + 0 + ), + new TypedField( + &RPG::Item::skill_id, + LDB_Reader::ChunkItem::skill_id, + "skill_id", + 0, + 0 + ), + new TypedField( + &RPG::Item::switch_id, + LDB_Reader::ChunkItem::switch_id, + "switch_id", + 0, + 0 + ), + new TypedField( + &RPG::Item::occasion_field2, + LDB_Reader::ChunkItem::occasion_field2, + "occasion_field2", + 0, + 0 + ), + new TypedField( + &RPG::Item::occasion_battle, + LDB_Reader::ChunkItem::occasion_battle, + "occasion_battle", + 0, + 0 + ), + new SizeField( + &RPG::Item::actor_set, + LDB_Reader::ChunkItem::actor_set_size, + 0, + 0 + ), + new TypedField>( + &RPG::Item::actor_set, + LDB_Reader::ChunkItem::actor_set, + "actor_set", + 1, + 0 + ), + new SizeField( + &RPG::Item::state_set, + LDB_Reader::ChunkItem::state_set_size, + 0, + 0 + ), + new TypedField>( + &RPG::Item::state_set, + LDB_Reader::ChunkItem::state_set, + "state_set", + 1, + 0 + ), + new SizeField( + &RPG::Item::attribute_set, + LDB_Reader::ChunkItem::attribute_set_size, + 0, + 0 + ), + new TypedField>( + &RPG::Item::attribute_set, + LDB_Reader::ChunkItem::attribute_set, + "attribute_set", + 1, + 0 + ), + new TypedField( + &RPG::Item::state_chance, + LDB_Reader::ChunkItem::state_chance, + "state_chance", + 0, + 0 + ), + new TypedField( + &RPG::Item::state_effect, + LDB_Reader::ChunkItem::state_effect, + "state_effect", + 0, + 0 + ), + new TypedField( + &RPG::Item::weapon_animation, + LDB_Reader::ChunkItem::weapon_animation, + "weapon_animation", + 0, + 1 + ), + new TypedField>( + &RPG::Item::animation_data, + LDB_Reader::ChunkItem::animation_data, + "animation_data", + 1, + 1 + ), + new TypedField( + &RPG::Item::use_skill, + LDB_Reader::ChunkItem::use_skill, + "use_skill", + 0, + 1 + ), + new SizeField( + &RPG::Item::class_set, + LDB_Reader::ChunkItem::class_set_size, + 0, + 1 + ), + new TypedField>( + &RPG::Item::class_set, + LDB_Reader::ChunkItem::class_set, + "class_set", + 1, + 1 + ), + new TypedField( + &RPG::Item::ranged_trajectory, + LDB_Reader::ChunkItem::ranged_trajectory, + "ranged_trajectory", + 0, + 0 + ), + new TypedField( + &RPG::Item::ranged_target, + LDB_Reader::ChunkItem::ranged_target, + "ranged_target", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_itemanimation.cpp b/src/generated/ldb_itemanimation.cpp index 13895a79a..9d1f07dce 100644 --- a/src/generated/ldb_itemanimation.cpp +++ b/src/generated/ldb_itemanimation.cpp @@ -16,20 +16,73 @@ // Read ItemAnimation. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT ItemAnimation +template <> +char const* const Struct::name = "ItemAnimation"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, type, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, weapon_anim, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, movement, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, after_image, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, attacks, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, ranged, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, ranged_anim, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, ranged_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_anim, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::ItemAnimation::type, + LDB_Reader::ChunkItemAnimation::type, + "type", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::weapon_anim, + LDB_Reader::ChunkItemAnimation::weapon_anim, + "weapon_anim", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::movement, + LDB_Reader::ChunkItemAnimation::movement, + "movement", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::after_image, + LDB_Reader::ChunkItemAnimation::after_image, + "after_image", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::attacks, + LDB_Reader::ChunkItemAnimation::attacks, + "attacks", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::ranged, + LDB_Reader::ChunkItemAnimation::ranged, + "ranged", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::ranged_anim, + LDB_Reader::ChunkItemAnimation::ranged_anim, + "ranged_anim", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::ranged_speed, + LDB_Reader::ChunkItemAnimation::ranged_speed, + "ranged_speed", + 0, + 0 + ), + new TypedField( + &RPG::ItemAnimation::battle_anim, + LDB_Reader::ChunkItemAnimation::battle_anim, + "battle_anim", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_learning.cpp b/src/generated/ldb_learning.cpp index 5d675648f..85e1deb58 100644 --- a/src/generated/ldb_learning.cpp +++ b/src/generated/ldb_learning.cpp @@ -16,13 +16,24 @@ // Read Learning. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Learning +template <> +char const* const Struct::name = "Learning"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, skill_id, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Learning::level, + LDB_Reader::ChunkLearning::level, + "level", + 0, + 0 + ), + new TypedField( + &RPG::Learning::skill_id, + LDB_Reader::ChunkLearning::skill_id, + "skill_id", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_music.cpp b/src/generated/ldb_music.cpp index 51597c965..5a93d606a 100644 --- a/src/generated/ldb_music.cpp +++ b/src/generated/ldb_music.cpp @@ -16,16 +16,45 @@ // Read Music. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Music +template <> +char const* const Struct::name = "Music"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, fadein, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, volume, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tempo, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, balance, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Music::name, + LDB_Reader::ChunkMusic::name, + "name", + 1, + 0 + ), + new TypedField( + &RPG::Music::fadein, + LDB_Reader::ChunkMusic::fadein, + "fadein", + 0, + 0 + ), + new TypedField( + &RPG::Music::volume, + LDB_Reader::ChunkMusic::volume, + "volume", + 0, + 0 + ), + new TypedField( + &RPG::Music::tempo, + LDB_Reader::ChunkMusic::tempo, + "tempo", + 0, + 0 + ), + new TypedField( + &RPG::Music::balance, + LDB_Reader::ChunkMusic::balance, + "balance", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_skill.cpp b/src/generated/ldb_skill.cpp index fee468d1b..b56d92579 100644 --- a/src/generated/ldb_skill.cpp +++ b/src/generated/ldb_skill.cpp @@ -16,47 +16,260 @@ // Read Skill. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Skill +template <> +char const* const Struct::name = "Skill"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, description, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, using_message1, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, using_message2, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, failure_message, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, type, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_type, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_percent, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_cost, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, scope, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, sound_effect, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, occasion_field, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, occasion_battle, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, state_effect, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, physical_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, magical_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, variance, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, power, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hit, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_hp, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_sp, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_attack, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_defense, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_spirit, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_agility, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, absorb_damage, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, ignore_defense, 0, 0), - LCF_STRUCT_SIZE_FIELD(bool, state_effects, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, state_effects, 1, 0), - LCF_STRUCT_SIZE_FIELD(bool, attribute_effects, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, attribute_effects, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_attr_defence, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battler_animation, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::vector, battler_animation_data, 1, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Skill::name, + LDB_Reader::ChunkSkill::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Skill::description, + LDB_Reader::ChunkSkill::description, + "description", + 0, + 0 + ), + new TypedField( + &RPG::Skill::using_message1, + LDB_Reader::ChunkSkill::using_message1, + "using_message1", + 0, + 0 + ), + new TypedField( + &RPG::Skill::using_message2, + LDB_Reader::ChunkSkill::using_message2, + "using_message2", + 0, + 0 + ), + new TypedField( + &RPG::Skill::failure_message, + LDB_Reader::ChunkSkill::failure_message, + "failure_message", + 0, + 0 + ), + new TypedField( + &RPG::Skill::type, + LDB_Reader::ChunkSkill::type, + "type", + 1, + 0 + ), + new TypedField( + &RPG::Skill::sp_type, + LDB_Reader::ChunkSkill::sp_type, + "sp_type", + 0, + 1 + ), + new TypedField( + &RPG::Skill::sp_percent, + LDB_Reader::ChunkSkill::sp_percent, + "sp_percent", + 0, + 1 + ), + new TypedField( + &RPG::Skill::sp_cost, + LDB_Reader::ChunkSkill::sp_cost, + "sp_cost", + 0, + 0 + ), + new TypedField( + &RPG::Skill::scope, + LDB_Reader::ChunkSkill::scope, + "scope", + 1, + 0 + ), + new TypedField( + &RPG::Skill::switch_id, + LDB_Reader::ChunkSkill::switch_id, + "switch_id", + 0, + 0 + ), + new TypedField( + &RPG::Skill::animation_id, + LDB_Reader::ChunkSkill::animation_id, + "animation_id", + 0, + 0 + ), + new TypedField( + &RPG::Skill::sound_effect, + LDB_Reader::ChunkSkill::sound_effect, + "sound_effect", + 1, + 0 + ), + new TypedField( + &RPG::Skill::occasion_field, + LDB_Reader::ChunkSkill::occasion_field, + "occasion_field", + 0, + 0 + ), + new TypedField( + &RPG::Skill::occasion_battle, + LDB_Reader::ChunkSkill::occasion_battle, + "occasion_battle", + 0, + 0 + ), + new TypedField( + &RPG::Skill::state_effect, + LDB_Reader::ChunkSkill::state_effect, + "state_effect", + 0, + 1 + ), + new TypedField( + &RPG::Skill::physical_rate, + LDB_Reader::ChunkSkill::physical_rate, + "physical_rate", + 0, + 0 + ), + new TypedField( + &RPG::Skill::magical_rate, + LDB_Reader::ChunkSkill::magical_rate, + "magical_rate", + 0, + 0 + ), + new TypedField( + &RPG::Skill::variance, + LDB_Reader::ChunkSkill::variance, + "variance", + 0, + 0 + ), + new TypedField( + &RPG::Skill::power, + LDB_Reader::ChunkSkill::power, + "power", + 0, + 0 + ), + new TypedField( + &RPG::Skill::hit, + LDB_Reader::ChunkSkill::hit, + "hit", + 0, + 0 + ), + new TypedField( + &RPG::Skill::affect_hp, + LDB_Reader::ChunkSkill::affect_hp, + "affect_hp", + 0, + 0 + ), + new TypedField( + &RPG::Skill::affect_sp, + LDB_Reader::ChunkSkill::affect_sp, + "affect_sp", + 0, + 0 + ), + new TypedField( + &RPG::Skill::affect_attack, + LDB_Reader::ChunkSkill::affect_attack, + "affect_attack", + 0, + 0 + ), + new TypedField( + &RPG::Skill::affect_defense, + LDB_Reader::ChunkSkill::affect_defense, + "affect_defense", + 0, + 0 + ), + new TypedField( + &RPG::Skill::affect_spirit, + LDB_Reader::ChunkSkill::affect_spirit, + "affect_spirit", + 0, + 0 + ), + new TypedField( + &RPG::Skill::affect_agility, + LDB_Reader::ChunkSkill::affect_agility, + "affect_agility", + 0, + 0 + ), + new TypedField( + &RPG::Skill::absorb_damage, + LDB_Reader::ChunkSkill::absorb_damage, + "absorb_damage", + 0, + 0 + ), + new TypedField( + &RPG::Skill::ignore_defense, + LDB_Reader::ChunkSkill::ignore_defense, + "ignore_defense", + 0, + 0 + ), + new SizeField( + &RPG::Skill::state_effects, + LDB_Reader::ChunkSkill::state_effects_size, + 0, + 0 + ), + new TypedField>( + &RPG::Skill::state_effects, + LDB_Reader::ChunkSkill::state_effects, + "state_effects", + 1, + 0 + ), + new SizeField( + &RPG::Skill::attribute_effects, + LDB_Reader::ChunkSkill::attribute_effects_size, + 0, + 0 + ), + new TypedField>( + &RPG::Skill::attribute_effects, + LDB_Reader::ChunkSkill::attribute_effects, + "attribute_effects", + 1, + 0 + ), + new TypedField( + &RPG::Skill::affect_attr_defence, + LDB_Reader::ChunkSkill::affect_attr_defence, + "affect_attr_defence", + 0, + 0 + ), + new TypedField( + &RPG::Skill::battler_animation, + LDB_Reader::ChunkSkill::battler_animation, + "battler_animation", + 0, + 1 + ), + new TypedField>( + &RPG::Skill::battler_animation_data, + LDB_Reader::ChunkSkill::battler_animation_data, + "battler_animation_data", + 1, + 1 + ), + NULL +}; diff --git a/src/generated/ldb_sound.cpp b/src/generated/ldb_sound.cpp index 819bef1f8..48f1db02f 100644 --- a/src/generated/ldb_sound.cpp +++ b/src/generated/ldb_sound.cpp @@ -16,15 +16,38 @@ // Read Sound. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Sound +template <> +char const* const Struct::name = "Sound"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, volume, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tempo, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, balance, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Sound::name, + LDB_Reader::ChunkSound::name, + "name", + 1, + 0 + ), + new TypedField( + &RPG::Sound::volume, + LDB_Reader::ChunkSound::volume, + "volume", + 0, + 0 + ), + new TypedField( + &RPG::Sound::tempo, + LDB_Reader::ChunkSound::tempo, + "tempo", + 0, + 0 + ), + new TypedField( + &RPG::Sound::balance, + LDB_Reader::ChunkSound::balance, + "balance", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_state.cpp b/src/generated/ldb_state.cpp index a80bd8015..35c72258e 100644 --- a/src/generated/ldb_state.cpp +++ b/src/generated/ldb_state.cpp @@ -16,53 +16,304 @@ // Read State. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT State +template <> +char const* const Struct::name = "State"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, type, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, color, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, priority, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, restriction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, a_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, b_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, c_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, d_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, e_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hold_turn, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, auto_release_prob, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, release_by_damage, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, affect_type, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, affect_attack, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_defense, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_spirit, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, affect_agility, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, reduce_hit_ratio, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, avoid_attacks, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, reflect_magic, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, cursed, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, battler_animation_id, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, restrict_skill, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, restrict_skill_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, restrict_magic, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, restrict_magic_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hp_change_type, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_change_type, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, message_actor, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, message_enemy, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, message_already, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, message_affected, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, message_recovery, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hp_change_max, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hp_change_val, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hp_change_map_steps, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hp_change_map_val, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_change_max, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_change_val, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_change_map_steps, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_change_map_val, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::State::name, + LDB_Reader::ChunkState::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::State::type, + LDB_Reader::ChunkState::type, + "type", + 1, + 0 + ), + new TypedField( + &RPG::State::color, + LDB_Reader::ChunkState::color, + "color", + 0, + 0 + ), + new TypedField( + &RPG::State::priority, + LDB_Reader::ChunkState::priority, + "priority", + 0, + 0 + ), + new TypedField( + &RPG::State::restriction, + LDB_Reader::ChunkState::restriction, + "restriction", + 1, + 0 + ), + new TypedField( + &RPG::State::a_rate, + LDB_Reader::ChunkState::a_rate, + "a_rate", + 0, + 0 + ), + new TypedField( + &RPG::State::b_rate, + LDB_Reader::ChunkState::b_rate, + "b_rate", + 0, + 0 + ), + new TypedField( + &RPG::State::c_rate, + LDB_Reader::ChunkState::c_rate, + "c_rate", + 0, + 0 + ), + new TypedField( + &RPG::State::d_rate, + LDB_Reader::ChunkState::d_rate, + "d_rate", + 0, + 0 + ), + new TypedField( + &RPG::State::e_rate, + LDB_Reader::ChunkState::e_rate, + "e_rate", + 0, + 0 + ), + new TypedField( + &RPG::State::hold_turn, + LDB_Reader::ChunkState::hold_turn, + "hold_turn", + 0, + 0 + ), + new TypedField( + &RPG::State::auto_release_prob, + LDB_Reader::ChunkState::auto_release_prob, + "auto_release_prob", + 0, + 0 + ), + new TypedField( + &RPG::State::release_by_damage, + LDB_Reader::ChunkState::release_by_damage, + "release_by_damage", + 0, + 0 + ), + new TypedField( + &RPG::State::affect_type, + LDB_Reader::ChunkState::affect_type, + "affect_type", + 0, + 1 + ), + new TypedField( + &RPG::State::affect_attack, + LDB_Reader::ChunkState::affect_attack, + "affect_attack", + 0, + 0 + ), + new TypedField( + &RPG::State::affect_defense, + LDB_Reader::ChunkState::affect_defense, + "affect_defense", + 0, + 0 + ), + new TypedField( + &RPG::State::affect_spirit, + LDB_Reader::ChunkState::affect_spirit, + "affect_spirit", + 0, + 0 + ), + new TypedField( + &RPG::State::affect_agility, + LDB_Reader::ChunkState::affect_agility, + "affect_agility", + 0, + 0 + ), + new TypedField( + &RPG::State::reduce_hit_ratio, + LDB_Reader::ChunkState::reduce_hit_ratio, + "reduce_hit_ratio", + 0, + 0 + ), + new TypedField( + &RPG::State::avoid_attacks, + LDB_Reader::ChunkState::avoid_attacks, + "avoid_attacks", + 0, + 1 + ), + new TypedField( + &RPG::State::reflect_magic, + LDB_Reader::ChunkState::reflect_magic, + "reflect_magic", + 0, + 1 + ), + new TypedField( + &RPG::State::cursed, + LDB_Reader::ChunkState::cursed, + "cursed", + 0, + 1 + ), + new TypedField( + &RPG::State::battler_animation_id, + LDB_Reader::ChunkState::battler_animation_id, + "battler_animation_id", + 0, + 1 + ), + new TypedField( + &RPG::State::restrict_skill, + LDB_Reader::ChunkState::restrict_skill, + "restrict_skill", + 0, + 0 + ), + new TypedField( + &RPG::State::restrict_skill_level, + LDB_Reader::ChunkState::restrict_skill_level, + "restrict_skill_level", + 0, + 0 + ), + new TypedField( + &RPG::State::restrict_magic, + LDB_Reader::ChunkState::restrict_magic, + "restrict_magic", + 0, + 0 + ), + new TypedField( + &RPG::State::restrict_magic_level, + LDB_Reader::ChunkState::restrict_magic_level, + "restrict_magic_level", + 0, + 0 + ), + new TypedField( + &RPG::State::hp_change_type, + LDB_Reader::ChunkState::hp_change_type, + "hp_change_type", + 0, + 0 + ), + new TypedField( + &RPG::State::sp_change_type, + LDB_Reader::ChunkState::sp_change_type, + "sp_change_type", + 0, + 0 + ), + new TypedField( + &RPG::State::message_actor, + LDB_Reader::ChunkState::message_actor, + "message_actor", + 0, + 0 + ), + new TypedField( + &RPG::State::message_enemy, + LDB_Reader::ChunkState::message_enemy, + "message_enemy", + 0, + 0 + ), + new TypedField( + &RPG::State::message_already, + LDB_Reader::ChunkState::message_already, + "message_already", + 0, + 0 + ), + new TypedField( + &RPG::State::message_affected, + LDB_Reader::ChunkState::message_affected, + "message_affected", + 0, + 0 + ), + new TypedField( + &RPG::State::message_recovery, + LDB_Reader::ChunkState::message_recovery, + "message_recovery", + 0, + 0 + ), + new TypedField( + &RPG::State::hp_change_max, + LDB_Reader::ChunkState::hp_change_max, + "hp_change_max", + 0, + 0 + ), + new TypedField( + &RPG::State::hp_change_val, + LDB_Reader::ChunkState::hp_change_val, + "hp_change_val", + 0, + 0 + ), + new TypedField( + &RPG::State::hp_change_map_steps, + LDB_Reader::ChunkState::hp_change_map_steps, + "hp_change_map_steps", + 0, + 0 + ), + new TypedField( + &RPG::State::hp_change_map_val, + LDB_Reader::ChunkState::hp_change_map_val, + "hp_change_map_val", + 0, + 0 + ), + new TypedField( + &RPG::State::sp_change_max, + LDB_Reader::ChunkState::sp_change_max, + "sp_change_max", + 0, + 0 + ), + new TypedField( + &RPG::State::sp_change_val, + LDB_Reader::ChunkState::sp_change_val, + "sp_change_val", + 0, + 0 + ), + new TypedField( + &RPG::State::sp_change_map_steps, + LDB_Reader::ChunkState::sp_change_map_steps, + "sp_change_map_steps", + 0, + 0 + ), + new TypedField( + &RPG::State::sp_change_map_val, + LDB_Reader::ChunkState::sp_change_map_val, + "sp_change_map_val", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_switch.cpp b/src/generated/ldb_switch.cpp index 8cbcec878..d75a81f49 100644 --- a/src/generated/ldb_switch.cpp +++ b/src/generated/ldb_switch.cpp @@ -16,12 +16,17 @@ // Read Switch. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Switch +template <> +char const* const Struct::name = "Switch"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Switch::name, + LDB_Reader::ChunkSwitch::name, + "name", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_system.cpp b/src/generated/ldb_system.cpp index db8948984..1ddda0de2 100644 --- a/src/generated/ldb_system.cpp +++ b/src/generated/ldb_system.cpp @@ -16,68 +16,407 @@ // Read System. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT System +template <> +char const* const Struct::name = "System"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, ldb_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, boat_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, ship_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, airship_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, boat_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, ship_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, airship_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, title_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, gameover_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, system_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, system2_name, 0, 1), - LCF_STRUCT_COUNT_FIELD(int16_t, party, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, party, 1, 0), - LCF_STRUCT_COUNT_FIELD(int16_t, menu_commands, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::vector, menu_commands, 1, 1), - LCF_STRUCT_TYPED_FIELD(RPG::Music, title_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, battle_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, battle_end_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, inn_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, boat_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, ship_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, airship_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, gameover_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, cursor_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, decision_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, cancel_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, buzzer_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, battle_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, escape_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, enemy_attack_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, enemy_damaged_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, actor_damaged_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, dodge_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, enemy_death_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, item_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, transition_out, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, transition_in, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_start_fadeout, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_start_fadein, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_end_fadeout, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_end_fadein, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, message_stretch, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, font_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, selected_condition, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, selected_hero, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, battletest_background, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, battletest_data, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, save_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battletest_terrain, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battletest_formation, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battletest_condition, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, equipment_setting, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, battletest_alt_terrain, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, show_frame, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::string, frame_name, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, invert_animations, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, show_title, 0, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::System::ldb_id, + LDB_Reader::ChunkSystem::ldb_id, + "ldb_id", + 0, + 0 + ), + new TypedField( + &RPG::System::boat_name, + LDB_Reader::ChunkSystem::boat_name, + "boat_name", + 0, + 0 + ), + new TypedField( + &RPG::System::ship_name, + LDB_Reader::ChunkSystem::ship_name, + "ship_name", + 0, + 0 + ), + new TypedField( + &RPG::System::airship_name, + LDB_Reader::ChunkSystem::airship_name, + "airship_name", + 0, + 0 + ), + new TypedField( + &RPG::System::boat_index, + LDB_Reader::ChunkSystem::boat_index, + "boat_index", + 0, + 0 + ), + new TypedField( + &RPG::System::ship_index, + LDB_Reader::ChunkSystem::ship_index, + "ship_index", + 0, + 0 + ), + new TypedField( + &RPG::System::airship_index, + LDB_Reader::ChunkSystem::airship_index, + "airship_index", + 0, + 0 + ), + new TypedField( + &RPG::System::title_name, + LDB_Reader::ChunkSystem::title_name, + "title_name", + 0, + 0 + ), + new TypedField( + &RPG::System::gameover_name, + LDB_Reader::ChunkSystem::gameover_name, + "gameover_name", + 0, + 0 + ), + new TypedField( + &RPG::System::system_name, + LDB_Reader::ChunkSystem::system_name, + "system_name", + 0, + 0 + ), + new TypedField( + &RPG::System::system2_name, + LDB_Reader::ChunkSystem::system2_name, + "system2_name", + 0, + 1 + ), + new CountField( + &RPG::System::party, + LDB_Reader::ChunkSystem::party_size, + 0, + 0 + ), + new TypedField>( + &RPG::System::party, + LDB_Reader::ChunkSystem::party, + "party", + 1, + 0 + ), + new CountField( + &RPG::System::menu_commands, + LDB_Reader::ChunkSystem::menu_commands_size, + 0, + 1 + ), + new TypedField>( + &RPG::System::menu_commands, + LDB_Reader::ChunkSystem::menu_commands, + "menu_commands", + 1, + 1 + ), + new TypedField( + &RPG::System::title_music, + LDB_Reader::ChunkSystem::title_music, + "title_music", + 1, + 0 + ), + new TypedField( + &RPG::System::battle_music, + LDB_Reader::ChunkSystem::battle_music, + "battle_music", + 1, + 0 + ), + new TypedField( + &RPG::System::battle_end_music, + LDB_Reader::ChunkSystem::battle_end_music, + "battle_end_music", + 1, + 0 + ), + new TypedField( + &RPG::System::inn_music, + LDB_Reader::ChunkSystem::inn_music, + "inn_music", + 1, + 0 + ), + new TypedField( + &RPG::System::boat_music, + LDB_Reader::ChunkSystem::boat_music, + "boat_music", + 1, + 0 + ), + new TypedField( + &RPG::System::ship_music, + LDB_Reader::ChunkSystem::ship_music, + "ship_music", + 1, + 0 + ), + new TypedField( + &RPG::System::airship_music, + LDB_Reader::ChunkSystem::airship_music, + "airship_music", + 1, + 0 + ), + new TypedField( + &RPG::System::gameover_music, + LDB_Reader::ChunkSystem::gameover_music, + "gameover_music", + 1, + 0 + ), + new TypedField( + &RPG::System::cursor_se, + LDB_Reader::ChunkSystem::cursor_se, + "cursor_se", + 1, + 0 + ), + new TypedField( + &RPG::System::decision_se, + LDB_Reader::ChunkSystem::decision_se, + "decision_se", + 1, + 0 + ), + new TypedField( + &RPG::System::cancel_se, + LDB_Reader::ChunkSystem::cancel_se, + "cancel_se", + 1, + 0 + ), + new TypedField( + &RPG::System::buzzer_se, + LDB_Reader::ChunkSystem::buzzer_se, + "buzzer_se", + 1, + 0 + ), + new TypedField( + &RPG::System::battle_se, + LDB_Reader::ChunkSystem::battle_se, + "battle_se", + 1, + 0 + ), + new TypedField( + &RPG::System::escape_se, + LDB_Reader::ChunkSystem::escape_se, + "escape_se", + 1, + 0 + ), + new TypedField( + &RPG::System::enemy_attack_se, + LDB_Reader::ChunkSystem::enemy_attack_se, + "enemy_attack_se", + 1, + 0 + ), + new TypedField( + &RPG::System::enemy_damaged_se, + LDB_Reader::ChunkSystem::enemy_damaged_se, + "enemy_damaged_se", + 1, + 0 + ), + new TypedField( + &RPG::System::actor_damaged_se, + LDB_Reader::ChunkSystem::actor_damaged_se, + "actor_damaged_se", + 1, + 0 + ), + new TypedField( + &RPG::System::dodge_se, + LDB_Reader::ChunkSystem::dodge_se, + "dodge_se", + 1, + 0 + ), + new TypedField( + &RPG::System::enemy_death_se, + LDB_Reader::ChunkSystem::enemy_death_se, + "enemy_death_se", + 1, + 0 + ), + new TypedField( + &RPG::System::item_se, + LDB_Reader::ChunkSystem::item_se, + "item_se", + 1, + 0 + ), + new TypedField( + &RPG::System::transition_out, + LDB_Reader::ChunkSystem::transition_out, + "transition_out", + 1, + 0 + ), + new TypedField( + &RPG::System::transition_in, + LDB_Reader::ChunkSystem::transition_in, + "transition_in", + 1, + 0 + ), + new TypedField( + &RPG::System::battle_start_fadeout, + LDB_Reader::ChunkSystem::battle_start_fadeout, + "battle_start_fadeout", + 1, + 0 + ), + new TypedField( + &RPG::System::battle_start_fadein, + LDB_Reader::ChunkSystem::battle_start_fadein, + "battle_start_fadein", + 1, + 0 + ), + new TypedField( + &RPG::System::battle_end_fadeout, + LDB_Reader::ChunkSystem::battle_end_fadeout, + "battle_end_fadeout", + 1, + 0 + ), + new TypedField( + &RPG::System::battle_end_fadein, + LDB_Reader::ChunkSystem::battle_end_fadein, + "battle_end_fadein", + 1, + 0 + ), + new TypedField( + &RPG::System::message_stretch, + LDB_Reader::ChunkSystem::message_stretch, + "message_stretch", + 0, + 0 + ), + new TypedField( + &RPG::System::font_id, + LDB_Reader::ChunkSystem::font_id, + "font_id", + 0, + 0 + ), + new TypedField( + &RPG::System::selected_condition, + LDB_Reader::ChunkSystem::selected_condition, + "selected_condition", + 0, + 0 + ), + new TypedField( + &RPG::System::selected_hero, + LDB_Reader::ChunkSystem::selected_hero, + "selected_hero", + 1, + 0 + ), + new TypedField( + &RPG::System::battletest_background, + LDB_Reader::ChunkSystem::battletest_background, + "battletest_background", + 0, + 0 + ), + new TypedField>( + &RPG::System::battletest_data, + LDB_Reader::ChunkSystem::battletest_data, + "battletest_data", + 1, + 0 + ), + new TypedField( + &RPG::System::save_count, + LDB_Reader::ChunkSystem::save_count, + "save_count", + 0, + 0 + ), + new TypedField( + &RPG::System::battletest_terrain, + LDB_Reader::ChunkSystem::battletest_terrain, + "battletest_terrain", + 0, + 0 + ), + new TypedField( + &RPG::System::battletest_formation, + LDB_Reader::ChunkSystem::battletest_formation, + "battletest_formation", + 0, + 0 + ), + new TypedField( + &RPG::System::battletest_condition, + LDB_Reader::ChunkSystem::battletest_condition, + "battletest_condition", + 0, + 0 + ), + new TypedField( + &RPG::System::equipment_setting, + LDB_Reader::ChunkSystem::equipment_setting, + "equipment_setting", + 0, + 1 + ), + new TypedField( + &RPG::System::battletest_alt_terrain, + LDB_Reader::ChunkSystem::battletest_alt_terrain, + "battletest_alt_terrain", + 0, + 1 + ), + new TypedField( + &RPG::System::show_frame, + LDB_Reader::ChunkSystem::show_frame, + "show_frame", + 0, + 1 + ), + new TypedField( + &RPG::System::frame_name, + LDB_Reader::ChunkSystem::frame_name, + "frame_name", + 0, + 1 + ), + new TypedField( + &RPG::System::invert_animations, + LDB_Reader::ChunkSystem::invert_animations, + "invert_animations", + 0, + 1 + ), + new TypedField( + &RPG::System::show_title, + LDB_Reader::ChunkSystem::show_title, + "show_title", + 0, + 1 + ), + NULL +}; diff --git a/src/generated/ldb_terms.cpp b/src/generated/ldb_terms.cpp index 59479e6ad..5909aa77c 100644 --- a/src/generated/ldb_terms.cpp +++ b/src/generated/ldb_terms.cpp @@ -16,138 +16,899 @@ // Read Terms. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Terms +template <> +char const* const Struct::name = "Terms"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, encounter, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, special_combat, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, escape_success, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, escape_failure, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, victory, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, defeat, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, exp_received, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, gold_recieved_a, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, gold_recieved_b, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, item_recieved, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, attacking, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, enemy_critical, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, actor_critical, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, defending, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, observing, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, focus, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, autodestruction, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, enemy_escape, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, enemy_transform, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, enemy_damaged, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, enemy_undamaged, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, actor_damaged, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, actor_undamaged, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, skill_failure_a, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, skill_failure_b, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, skill_failure_c, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, dodge, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, use_item, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, hp_recovery, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, parameter_increase, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, parameter_decrease, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, enemy_hp_absorbed, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, actor_hp_absorbed, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, resistance_increase, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, resistance_decrease, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, level_up, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, skill_learned, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, battle_start, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::string, miss, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::string, shop_greeting1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_regreeting1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_leave1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy_select1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy_number1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_purchased1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell_select1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell_number1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sold1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_greeting2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_regreeting2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_leave2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy_select2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy_number2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_purchased2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell_select2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell_number2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sold2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_greeting3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_regreeting3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_leave3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy_select3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_buy_number3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_purchased3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell_select3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sell_number3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shop_sold3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_a_greeting_1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_a_greeting_2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_a_greeting_3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_a_accept, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_a_cancel, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_b_greeting_1, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_b_greeting_2, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_b_greeting_3, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_b_accept, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, inn_b_cancel, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, possessed_items, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, equipped_items, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, gold, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, battle_fight, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, battle_auto, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, battle_escape, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, command_attack, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, command_defend, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, command_item, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, command_skill, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, menu_equipment, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, menu_save, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, menu_quit, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, new_game, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, load_game, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, exit_game, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, status, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::string, row, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::string, order, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::string, wait_on, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::string, wait_off, 1, 1), - LCF_STRUCT_TYPED_FIELD(std::string, level, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, health_points, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, spirit_points, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, normal_status, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, exp_short, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, lvl_short, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, hp_short, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, sp_short, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, sp_cost, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, attack, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, defense, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, spirit, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, agility, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, weapon, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, shield, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, armor, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, helmet, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, accessory, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, save_game_message, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, load_game_message, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, file, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, exit_game_message, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, yes, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, no, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Terms::encounter, + LDB_Reader::ChunkTerms::encounter, + "encounter", + 1, + 0 + ), + new TypedField( + &RPG::Terms::special_combat, + LDB_Reader::ChunkTerms::special_combat, + "special_combat", + 1, + 0 + ), + new TypedField( + &RPG::Terms::escape_success, + LDB_Reader::ChunkTerms::escape_success, + "escape_success", + 1, + 0 + ), + new TypedField( + &RPG::Terms::escape_failure, + LDB_Reader::ChunkTerms::escape_failure, + "escape_failure", + 1, + 0 + ), + new TypedField( + &RPG::Terms::victory, + LDB_Reader::ChunkTerms::victory, + "victory", + 1, + 0 + ), + new TypedField( + &RPG::Terms::defeat, + LDB_Reader::ChunkTerms::defeat, + "defeat", + 1, + 0 + ), + new TypedField( + &RPG::Terms::exp_received, + LDB_Reader::ChunkTerms::exp_received, + "exp_received", + 1, + 0 + ), + new TypedField( + &RPG::Terms::gold_recieved_a, + LDB_Reader::ChunkTerms::gold_recieved_a, + "gold_recieved_a", + 1, + 0 + ), + new TypedField( + &RPG::Terms::gold_recieved_b, + LDB_Reader::ChunkTerms::gold_recieved_b, + "gold_recieved_b", + 1, + 0 + ), + new TypedField( + &RPG::Terms::item_recieved, + LDB_Reader::ChunkTerms::item_recieved, + "item_recieved", + 1, + 0 + ), + new TypedField( + &RPG::Terms::attacking, + LDB_Reader::ChunkTerms::attacking, + "attacking", + 1, + 0 + ), + new TypedField( + &RPG::Terms::enemy_critical, + LDB_Reader::ChunkTerms::enemy_critical, + "enemy_critical", + 1, + 0 + ), + new TypedField( + &RPG::Terms::actor_critical, + LDB_Reader::ChunkTerms::actor_critical, + "actor_critical", + 1, + 0 + ), + new TypedField( + &RPG::Terms::defending, + LDB_Reader::ChunkTerms::defending, + "defending", + 1, + 0 + ), + new TypedField( + &RPG::Terms::observing, + LDB_Reader::ChunkTerms::observing, + "observing", + 1, + 0 + ), + new TypedField( + &RPG::Terms::focus, + LDB_Reader::ChunkTerms::focus, + "focus", + 1, + 0 + ), + new TypedField( + &RPG::Terms::autodestruction, + LDB_Reader::ChunkTerms::autodestruction, + "autodestruction", + 1, + 0 + ), + new TypedField( + &RPG::Terms::enemy_escape, + LDB_Reader::ChunkTerms::enemy_escape, + "enemy_escape", + 1, + 0 + ), + new TypedField( + &RPG::Terms::enemy_transform, + LDB_Reader::ChunkTerms::enemy_transform, + "enemy_transform", + 1, + 0 + ), + new TypedField( + &RPG::Terms::enemy_damaged, + LDB_Reader::ChunkTerms::enemy_damaged, + "enemy_damaged", + 1, + 0 + ), + new TypedField( + &RPG::Terms::enemy_undamaged, + LDB_Reader::ChunkTerms::enemy_undamaged, + "enemy_undamaged", + 1, + 0 + ), + new TypedField( + &RPG::Terms::actor_damaged, + LDB_Reader::ChunkTerms::actor_damaged, + "actor_damaged", + 1, + 0 + ), + new TypedField( + &RPG::Terms::actor_undamaged, + LDB_Reader::ChunkTerms::actor_undamaged, + "actor_undamaged", + 1, + 0 + ), + new TypedField( + &RPG::Terms::skill_failure_a, + LDB_Reader::ChunkTerms::skill_failure_a, + "skill_failure_a", + 1, + 0 + ), + new TypedField( + &RPG::Terms::skill_failure_b, + LDB_Reader::ChunkTerms::skill_failure_b, + "skill_failure_b", + 1, + 0 + ), + new TypedField( + &RPG::Terms::skill_failure_c, + LDB_Reader::ChunkTerms::skill_failure_c, + "skill_failure_c", + 1, + 0 + ), + new TypedField( + &RPG::Terms::dodge, + LDB_Reader::ChunkTerms::dodge, + "dodge", + 1, + 0 + ), + new TypedField( + &RPG::Terms::use_item, + LDB_Reader::ChunkTerms::use_item, + "use_item", + 1, + 0 + ), + new TypedField( + &RPG::Terms::hp_recovery, + LDB_Reader::ChunkTerms::hp_recovery, + "hp_recovery", + 1, + 0 + ), + new TypedField( + &RPG::Terms::parameter_increase, + LDB_Reader::ChunkTerms::parameter_increase, + "parameter_increase", + 1, + 0 + ), + new TypedField( + &RPG::Terms::parameter_decrease, + LDB_Reader::ChunkTerms::parameter_decrease, + "parameter_decrease", + 1, + 0 + ), + new TypedField( + &RPG::Terms::enemy_hp_absorbed, + LDB_Reader::ChunkTerms::enemy_hp_absorbed, + "enemy_hp_absorbed", + 1, + 0 + ), + new TypedField( + &RPG::Terms::actor_hp_absorbed, + LDB_Reader::ChunkTerms::actor_hp_absorbed, + "actor_hp_absorbed", + 1, + 0 + ), + new TypedField( + &RPG::Terms::resistance_increase, + LDB_Reader::ChunkTerms::resistance_increase, + "resistance_increase", + 1, + 0 + ), + new TypedField( + &RPG::Terms::resistance_decrease, + LDB_Reader::ChunkTerms::resistance_decrease, + "resistance_decrease", + 1, + 0 + ), + new TypedField( + &RPG::Terms::level_up, + LDB_Reader::ChunkTerms::level_up, + "level_up", + 1, + 0 + ), + new TypedField( + &RPG::Terms::skill_learned, + LDB_Reader::ChunkTerms::skill_learned, + "skill_learned", + 1, + 0 + ), + new TypedField( + &RPG::Terms::battle_start, + LDB_Reader::ChunkTerms::battle_start, + "battle_start", + 1, + 1 + ), + new TypedField( + &RPG::Terms::miss, + LDB_Reader::ChunkTerms::miss, + "miss", + 1, + 1 + ), + new TypedField( + &RPG::Terms::shop_greeting1, + LDB_Reader::ChunkTerms::shop_greeting1, + "shop_greeting1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_regreeting1, + LDB_Reader::ChunkTerms::shop_regreeting1, + "shop_regreeting1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy1, + LDB_Reader::ChunkTerms::shop_buy1, + "shop_buy1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell1, + LDB_Reader::ChunkTerms::shop_sell1, + "shop_sell1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_leave1, + LDB_Reader::ChunkTerms::shop_leave1, + "shop_leave1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy_select1, + LDB_Reader::ChunkTerms::shop_buy_select1, + "shop_buy_select1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy_number1, + LDB_Reader::ChunkTerms::shop_buy_number1, + "shop_buy_number1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_purchased1, + LDB_Reader::ChunkTerms::shop_purchased1, + "shop_purchased1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell_select1, + LDB_Reader::ChunkTerms::shop_sell_select1, + "shop_sell_select1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell_number1, + LDB_Reader::ChunkTerms::shop_sell_number1, + "shop_sell_number1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sold1, + LDB_Reader::ChunkTerms::shop_sold1, + "shop_sold1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_greeting2, + LDB_Reader::ChunkTerms::shop_greeting2, + "shop_greeting2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_regreeting2, + LDB_Reader::ChunkTerms::shop_regreeting2, + "shop_regreeting2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy2, + LDB_Reader::ChunkTerms::shop_buy2, + "shop_buy2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell2, + LDB_Reader::ChunkTerms::shop_sell2, + "shop_sell2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_leave2, + LDB_Reader::ChunkTerms::shop_leave2, + "shop_leave2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy_select2, + LDB_Reader::ChunkTerms::shop_buy_select2, + "shop_buy_select2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy_number2, + LDB_Reader::ChunkTerms::shop_buy_number2, + "shop_buy_number2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_purchased2, + LDB_Reader::ChunkTerms::shop_purchased2, + "shop_purchased2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell_select2, + LDB_Reader::ChunkTerms::shop_sell_select2, + "shop_sell_select2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell_number2, + LDB_Reader::ChunkTerms::shop_sell_number2, + "shop_sell_number2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sold2, + LDB_Reader::ChunkTerms::shop_sold2, + "shop_sold2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_greeting3, + LDB_Reader::ChunkTerms::shop_greeting3, + "shop_greeting3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_regreeting3, + LDB_Reader::ChunkTerms::shop_regreeting3, + "shop_regreeting3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy3, + LDB_Reader::ChunkTerms::shop_buy3, + "shop_buy3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell3, + LDB_Reader::ChunkTerms::shop_sell3, + "shop_sell3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_leave3, + LDB_Reader::ChunkTerms::shop_leave3, + "shop_leave3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy_select3, + LDB_Reader::ChunkTerms::shop_buy_select3, + "shop_buy_select3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_buy_number3, + LDB_Reader::ChunkTerms::shop_buy_number3, + "shop_buy_number3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_purchased3, + LDB_Reader::ChunkTerms::shop_purchased3, + "shop_purchased3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell_select3, + LDB_Reader::ChunkTerms::shop_sell_select3, + "shop_sell_select3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sell_number3, + LDB_Reader::ChunkTerms::shop_sell_number3, + "shop_sell_number3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shop_sold3, + LDB_Reader::ChunkTerms::shop_sold3, + "shop_sold3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_a_greeting_1, + LDB_Reader::ChunkTerms::inn_a_greeting_1, + "inn_a_greeting_1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_a_greeting_2, + LDB_Reader::ChunkTerms::inn_a_greeting_2, + "inn_a_greeting_2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_a_greeting_3, + LDB_Reader::ChunkTerms::inn_a_greeting_3, + "inn_a_greeting_3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_a_accept, + LDB_Reader::ChunkTerms::inn_a_accept, + "inn_a_accept", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_a_cancel, + LDB_Reader::ChunkTerms::inn_a_cancel, + "inn_a_cancel", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_b_greeting_1, + LDB_Reader::ChunkTerms::inn_b_greeting_1, + "inn_b_greeting_1", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_b_greeting_2, + LDB_Reader::ChunkTerms::inn_b_greeting_2, + "inn_b_greeting_2", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_b_greeting_3, + LDB_Reader::ChunkTerms::inn_b_greeting_3, + "inn_b_greeting_3", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_b_accept, + LDB_Reader::ChunkTerms::inn_b_accept, + "inn_b_accept", + 1, + 0 + ), + new TypedField( + &RPG::Terms::inn_b_cancel, + LDB_Reader::ChunkTerms::inn_b_cancel, + "inn_b_cancel", + 1, + 0 + ), + new TypedField( + &RPG::Terms::possessed_items, + LDB_Reader::ChunkTerms::possessed_items, + "possessed_items", + 1, + 0 + ), + new TypedField( + &RPG::Terms::equipped_items, + LDB_Reader::ChunkTerms::equipped_items, + "equipped_items", + 1, + 0 + ), + new TypedField( + &RPG::Terms::gold, + LDB_Reader::ChunkTerms::gold, + "gold", + 1, + 0 + ), + new TypedField( + &RPG::Terms::battle_fight, + LDB_Reader::ChunkTerms::battle_fight, + "battle_fight", + 1, + 0 + ), + new TypedField( + &RPG::Terms::battle_auto, + LDB_Reader::ChunkTerms::battle_auto, + "battle_auto", + 1, + 0 + ), + new TypedField( + &RPG::Terms::battle_escape, + LDB_Reader::ChunkTerms::battle_escape, + "battle_escape", + 1, + 0 + ), + new TypedField( + &RPG::Terms::command_attack, + LDB_Reader::ChunkTerms::command_attack, + "command_attack", + 1, + 0 + ), + new TypedField( + &RPG::Terms::command_defend, + LDB_Reader::ChunkTerms::command_defend, + "command_defend", + 1, + 0 + ), + new TypedField( + &RPG::Terms::command_item, + LDB_Reader::ChunkTerms::command_item, + "command_item", + 1, + 0 + ), + new TypedField( + &RPG::Terms::command_skill, + LDB_Reader::ChunkTerms::command_skill, + "command_skill", + 1, + 0 + ), + new TypedField( + &RPG::Terms::menu_equipment, + LDB_Reader::ChunkTerms::menu_equipment, + "menu_equipment", + 1, + 0 + ), + new TypedField( + &RPG::Terms::menu_save, + LDB_Reader::ChunkTerms::menu_save, + "menu_save", + 1, + 0 + ), + new TypedField( + &RPG::Terms::menu_quit, + LDB_Reader::ChunkTerms::menu_quit, + "menu_quit", + 1, + 0 + ), + new TypedField( + &RPG::Terms::new_game, + LDB_Reader::ChunkTerms::new_game, + "new_game", + 1, + 0 + ), + new TypedField( + &RPG::Terms::load_game, + LDB_Reader::ChunkTerms::load_game, + "load_game", + 1, + 0 + ), + new TypedField( + &RPG::Terms::exit_game, + LDB_Reader::ChunkTerms::exit_game, + "exit_game", + 1, + 0 + ), + new TypedField( + &RPG::Terms::status, + LDB_Reader::ChunkTerms::status, + "status", + 1, + 1 + ), + new TypedField( + &RPG::Terms::row, + LDB_Reader::ChunkTerms::row, + "row", + 1, + 1 + ), + new TypedField( + &RPG::Terms::order, + LDB_Reader::ChunkTerms::order, + "order", + 1, + 1 + ), + new TypedField( + &RPG::Terms::wait_on, + LDB_Reader::ChunkTerms::wait_on, + "wait_on", + 1, + 1 + ), + new TypedField( + &RPG::Terms::wait_off, + LDB_Reader::ChunkTerms::wait_off, + "wait_off", + 1, + 1 + ), + new TypedField( + &RPG::Terms::level, + LDB_Reader::ChunkTerms::level, + "level", + 1, + 0 + ), + new TypedField( + &RPG::Terms::health_points, + LDB_Reader::ChunkTerms::health_points, + "health_points", + 1, + 0 + ), + new TypedField( + &RPG::Terms::spirit_points, + LDB_Reader::ChunkTerms::spirit_points, + "spirit_points", + 1, + 0 + ), + new TypedField( + &RPG::Terms::normal_status, + LDB_Reader::ChunkTerms::normal_status, + "normal_status", + 1, + 0 + ), + new TypedField( + &RPG::Terms::exp_short, + LDB_Reader::ChunkTerms::exp_short, + "exp_short", + 1, + 0 + ), + new TypedField( + &RPG::Terms::lvl_short, + LDB_Reader::ChunkTerms::lvl_short, + "lvl_short", + 1, + 0 + ), + new TypedField( + &RPG::Terms::hp_short, + LDB_Reader::ChunkTerms::hp_short, + "hp_short", + 1, + 0 + ), + new TypedField( + &RPG::Terms::sp_short, + LDB_Reader::ChunkTerms::sp_short, + "sp_short", + 1, + 0 + ), + new TypedField( + &RPG::Terms::sp_cost, + LDB_Reader::ChunkTerms::sp_cost, + "sp_cost", + 1, + 0 + ), + new TypedField( + &RPG::Terms::attack, + LDB_Reader::ChunkTerms::attack, + "attack", + 1, + 0 + ), + new TypedField( + &RPG::Terms::defense, + LDB_Reader::ChunkTerms::defense, + "defense", + 1, + 0 + ), + new TypedField( + &RPG::Terms::spirit, + LDB_Reader::ChunkTerms::spirit, + "spirit", + 1, + 0 + ), + new TypedField( + &RPG::Terms::agility, + LDB_Reader::ChunkTerms::agility, + "agility", + 1, + 0 + ), + new TypedField( + &RPG::Terms::weapon, + LDB_Reader::ChunkTerms::weapon, + "weapon", + 1, + 0 + ), + new TypedField( + &RPG::Terms::shield, + LDB_Reader::ChunkTerms::shield, + "shield", + 1, + 0 + ), + new TypedField( + &RPG::Terms::armor, + LDB_Reader::ChunkTerms::armor, + "armor", + 1, + 0 + ), + new TypedField( + &RPG::Terms::helmet, + LDB_Reader::ChunkTerms::helmet, + "helmet", + 1, + 0 + ), + new TypedField( + &RPG::Terms::accessory, + LDB_Reader::ChunkTerms::accessory, + "accessory", + 1, + 0 + ), + new TypedField( + &RPG::Terms::save_game_message, + LDB_Reader::ChunkTerms::save_game_message, + "save_game_message", + 1, + 0 + ), + new TypedField( + &RPG::Terms::load_game_message, + LDB_Reader::ChunkTerms::load_game_message, + "load_game_message", + 1, + 0 + ), + new TypedField( + &RPG::Terms::file, + LDB_Reader::ChunkTerms::file, + "file", + 1, + 0 + ), + new TypedField( + &RPG::Terms::exit_game_message, + LDB_Reader::ChunkTerms::exit_game_message, + "exit_game_message", + 1, + 0 + ), + new TypedField( + &RPG::Terms::yes, + LDB_Reader::ChunkTerms::yes, + "yes", + 1, + 0 + ), + new TypedField( + &RPG::Terms::no, + LDB_Reader::ChunkTerms::no, + "no", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_terrain.cpp b/src/generated/ldb_terrain.cpp index 05c610070..910041057 100644 --- a/src/generated/ldb_terrain.cpp +++ b/src/generated/ldb_terrain.cpp @@ -16,43 +16,234 @@ // Read Terrain. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Terrain +template <> +char const* const Struct::name = "Terrain"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, damage, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, encounter_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, background_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, boat_pass, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, ship_pass, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, airship_pass, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, airship_land, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, bush_depth, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, footstep, 1, 1), - LCF_STRUCT_TYPED_FIELD(bool, on_damage_se, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, background_type, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::string, background_a_name, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, background_a_scrollh, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, background_a_scrollv, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, background_a_scrollh_speed, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, background_a_scrollv_speed, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, background_b, 0, 1), - LCF_STRUCT_TYPED_FIELD(std::string, background_b_name, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, background_b_scrollh, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, background_b_scrollv, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, background_b_scrollh_speed, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, background_b_scrollv_speed, 0, 1), - LCF_STRUCT_TYPED_FIELD(RPG::Terrain::Flags, special_flags, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, special_back_party, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, special_back_enemies, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, special_lateral_party, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, special_lateral_enemies, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, grid_location, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, grid_a, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, grid_b, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, grid_c, 0, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Terrain::name, + LDB_Reader::ChunkTerrain::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::damage, + LDB_Reader::ChunkTerrain::damage, + "damage", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::encounter_rate, + LDB_Reader::ChunkTerrain::encounter_rate, + "encounter_rate", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::background_name, + LDB_Reader::ChunkTerrain::background_name, + "background_name", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::boat_pass, + LDB_Reader::ChunkTerrain::boat_pass, + "boat_pass", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::ship_pass, + LDB_Reader::ChunkTerrain::ship_pass, + "ship_pass", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::airship_pass, + LDB_Reader::ChunkTerrain::airship_pass, + "airship_pass", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::airship_land, + LDB_Reader::ChunkTerrain::airship_land, + "airship_land", + 0, + 0 + ), + new TypedField( + &RPG::Terrain::bush_depth, + LDB_Reader::ChunkTerrain::bush_depth, + "bush_depth", + 1, + 0 + ), + new TypedField( + &RPG::Terrain::footstep, + LDB_Reader::ChunkTerrain::footstep, + "footstep", + 1, + 1 + ), + new TypedField( + &RPG::Terrain::on_damage_se, + LDB_Reader::ChunkTerrain::on_damage_se, + "on_damage_se", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_type, + LDB_Reader::ChunkTerrain::background_type, + "background_type", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_a_name, + LDB_Reader::ChunkTerrain::background_a_name, + "background_a_name", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_a_scrollh, + LDB_Reader::ChunkTerrain::background_a_scrollh, + "background_a_scrollh", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_a_scrollv, + LDB_Reader::ChunkTerrain::background_a_scrollv, + "background_a_scrollv", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_a_scrollh_speed, + LDB_Reader::ChunkTerrain::background_a_scrollh_speed, + "background_a_scrollh_speed", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_a_scrollv_speed, + LDB_Reader::ChunkTerrain::background_a_scrollv_speed, + "background_a_scrollv_speed", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_b, + LDB_Reader::ChunkTerrain::background_b, + "background_b", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_b_name, + LDB_Reader::ChunkTerrain::background_b_name, + "background_b_name", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_b_scrollh, + LDB_Reader::ChunkTerrain::background_b_scrollh, + "background_b_scrollh", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_b_scrollv, + LDB_Reader::ChunkTerrain::background_b_scrollv, + "background_b_scrollv", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_b_scrollh_speed, + LDB_Reader::ChunkTerrain::background_b_scrollh_speed, + "background_b_scrollh_speed", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::background_b_scrollv_speed, + LDB_Reader::ChunkTerrain::background_b_scrollv_speed, + "background_b_scrollv_speed", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::special_flags, + LDB_Reader::ChunkTerrain::special_flags, + "special_flags", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::special_back_party, + LDB_Reader::ChunkTerrain::special_back_party, + "special_back_party", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::special_back_enemies, + LDB_Reader::ChunkTerrain::special_back_enemies, + "special_back_enemies", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::special_lateral_party, + LDB_Reader::ChunkTerrain::special_lateral_party, + "special_lateral_party", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::special_lateral_enemies, + LDB_Reader::ChunkTerrain::special_lateral_enemies, + "special_lateral_enemies", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::grid_location, + LDB_Reader::ChunkTerrain::grid_location, + "grid_location", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::grid_a, + LDB_Reader::ChunkTerrain::grid_a, + "grid_a", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::grid_b, + LDB_Reader::ChunkTerrain::grid_b, + "grid_b", + 0, + 1 + ), + new TypedField( + &RPG::Terrain::grid_c, + LDB_Reader::ChunkTerrain::grid_c, + "grid_c", + 0, + 1 + ), + NULL +}; diff --git a/src/generated/ldb_testbattler.cpp b/src/generated/ldb_testbattler.cpp index f08e094e3..76c0f0abb 100644 --- a/src/generated/ldb_testbattler.cpp +++ b/src/generated/ldb_testbattler.cpp @@ -16,18 +16,59 @@ // Read TestBattler. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT TestBattler +template <> +char const* const Struct::name = "TestBattler"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, actor_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, weapon_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, shield_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, armor_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, helmet_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, accessory_id, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::TestBattler::actor_id, + LDB_Reader::ChunkTestBattler::actor_id, + "actor_id", + 0, + 0 + ), + new TypedField( + &RPG::TestBattler::level, + LDB_Reader::ChunkTestBattler::level, + "level", + 0, + 0 + ), + new TypedField( + &RPG::TestBattler::weapon_id, + LDB_Reader::ChunkTestBattler::weapon_id, + "weapon_id", + 0, + 0 + ), + new TypedField( + &RPG::TestBattler::shield_id, + LDB_Reader::ChunkTestBattler::shield_id, + "shield_id", + 0, + 0 + ), + new TypedField( + &RPG::TestBattler::armor_id, + LDB_Reader::ChunkTestBattler::armor_id, + "armor_id", + 0, + 0 + ), + new TypedField( + &RPG::TestBattler::helmet_id, + LDB_Reader::ChunkTestBattler::helmet_id, + "helmet_id", + 0, + 0 + ), + new TypedField( + &RPG::TestBattler::accessory_id, + LDB_Reader::ChunkTestBattler::accessory_id, + "accessory_id", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_troop.cpp b/src/generated/ldb_troop.cpp index b4f9925aa..ddb1cfcf6 100644 --- a/src/generated/ldb_troop.cpp +++ b/src/generated/ldb_troop.cpp @@ -16,18 +16,58 @@ // Read Troop. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Troop +template <> +char const* const Struct::name = "Troop"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, members, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, auto_alignment, 0, 0), - LCF_STRUCT_SIZE_FIELD(bool, terrain_set, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, terrain_set, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, appear_randomly, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, pages, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Troop::name, + LDB_Reader::ChunkTroop::name, + "name", + 0, + 0 + ), + new TypedField>( + &RPG::Troop::members, + LDB_Reader::ChunkTroop::members, + "members", + 1, + 0 + ), + new TypedField( + &RPG::Troop::auto_alignment, + LDB_Reader::ChunkTroop::auto_alignment, + "auto_alignment", + 0, + 0 + ), + new SizeField( + &RPG::Troop::terrain_set, + LDB_Reader::ChunkTroop::terrain_set_size, + 0, + 0 + ), + new TypedField>( + &RPG::Troop::terrain_set, + LDB_Reader::ChunkTroop::terrain_set, + "terrain_set", + 1, + 0 + ), + new TypedField( + &RPG::Troop::appear_randomly, + LDB_Reader::ChunkTroop::appear_randomly, + "appear_randomly", + 0, + 0 + ), + new TypedField>( + &RPG::Troop::pages, + LDB_Reader::ChunkTroop::pages, + "pages", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_troopmember.cpp b/src/generated/ldb_troopmember.cpp index edb62b6b4..0f88a4168 100644 --- a/src/generated/ldb_troopmember.cpp +++ b/src/generated/ldb_troopmember.cpp @@ -16,15 +16,38 @@ // Read TroopMember. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT TroopMember +template <> +char const* const Struct::name = "TroopMember"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, enemy_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, invisible, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::TroopMember::enemy_id, + LDB_Reader::ChunkTroopMember::enemy_id, + "enemy_id", + 0, + 0 + ), + new TypedField( + &RPG::TroopMember::x, + LDB_Reader::ChunkTroopMember::x, + "x", + 0, + 0 + ), + new TypedField( + &RPG::TroopMember::y, + LDB_Reader::ChunkTroopMember::y, + "y", + 0, + 0 + ), + new TypedField( + &RPG::TroopMember::invisible, + LDB_Reader::ChunkTroopMember::invisible, + "invisible", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_trooppage.cpp b/src/generated/ldb_trooppage.cpp index bbfa98338..e616b1db8 100644 --- a/src/generated/ldb_trooppage.cpp +++ b/src/generated/ldb_trooppage.cpp @@ -16,14 +16,30 @@ // Read TroopPage. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT TroopPage +template <> +char const* const Struct::name = "TroopPage"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(RPG::TroopPageCondition, condition, 0, 0), - LCF_STRUCT_SIZE_FIELD(RPG::EventCommand, event_commands, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, event_commands, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::TroopPage::condition, + LDB_Reader::ChunkTroopPage::condition, + "condition", + 0, + 0 + ), + new SizeField( + &RPG::TroopPage::event_commands, + LDB_Reader::ChunkTroopPage::event_commands_size, + 1, + 0 + ), + new TypedField>( + &RPG::TroopPage::event_commands, + LDB_Reader::ChunkTroopPage::event_commands, + "event_commands", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/ldb_trooppagecondition.cpp b/src/generated/ldb_trooppagecondition.cpp index e47984a1a..855c78f35 100644 --- a/src/generated/ldb_trooppagecondition.cpp +++ b/src/generated/ldb_trooppagecondition.cpp @@ -16,34 +16,171 @@ // Read TroopPageCondition. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT TroopPageCondition +template <> +char const* const Struct::name = "TroopPageCondition"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(RPG::TroopPageCondition::Flags, flags, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_a_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_b_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, variable_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, variable_value, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_a, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_b, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, fatigue_min, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, fatigue_max, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, enemy_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, enemy_hp_min, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, enemy_hp_max, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, actor_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, actor_hp_min, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, actor_hp_max, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_enemy_id, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_enemy_a, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_enemy_b, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_actor_id, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_actor_a, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, turn_actor_b, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, command_actor_id, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, command_id, 0, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::TroopPageCondition::flags, + LDB_Reader::ChunkTroopPageCondition::flags, + "flags", + 1, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::switch_a_id, + LDB_Reader::ChunkTroopPageCondition::switch_a_id, + "switch_a_id", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::switch_b_id, + LDB_Reader::ChunkTroopPageCondition::switch_b_id, + "switch_b_id", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::variable_id, + LDB_Reader::ChunkTroopPageCondition::variable_id, + "variable_id", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::variable_value, + LDB_Reader::ChunkTroopPageCondition::variable_value, + "variable_value", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::turn_a, + LDB_Reader::ChunkTroopPageCondition::turn_a, + "turn_a", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::turn_b, + LDB_Reader::ChunkTroopPageCondition::turn_b, + "turn_b", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::fatigue_min, + LDB_Reader::ChunkTroopPageCondition::fatigue_min, + "fatigue_min", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::fatigue_max, + LDB_Reader::ChunkTroopPageCondition::fatigue_max, + "fatigue_max", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::enemy_id, + LDB_Reader::ChunkTroopPageCondition::enemy_id, + "enemy_id", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::enemy_hp_min, + LDB_Reader::ChunkTroopPageCondition::enemy_hp_min, + "enemy_hp_min", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::enemy_hp_max, + LDB_Reader::ChunkTroopPageCondition::enemy_hp_max, + "enemy_hp_max", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::actor_id, + LDB_Reader::ChunkTroopPageCondition::actor_id, + "actor_id", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::actor_hp_min, + LDB_Reader::ChunkTroopPageCondition::actor_hp_min, + "actor_hp_min", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::actor_hp_max, + LDB_Reader::ChunkTroopPageCondition::actor_hp_max, + "actor_hp_max", + 0, + 0 + ), + new TypedField( + &RPG::TroopPageCondition::turn_enemy_id, + LDB_Reader::ChunkTroopPageCondition::turn_enemy_id, + "turn_enemy_id", + 0, + 1 + ), + new TypedField( + &RPG::TroopPageCondition::turn_enemy_a, + LDB_Reader::ChunkTroopPageCondition::turn_enemy_a, + "turn_enemy_a", + 0, + 1 + ), + new TypedField( + &RPG::TroopPageCondition::turn_enemy_b, + LDB_Reader::ChunkTroopPageCondition::turn_enemy_b, + "turn_enemy_b", + 0, + 1 + ), + new TypedField( + &RPG::TroopPageCondition::turn_actor_id, + LDB_Reader::ChunkTroopPageCondition::turn_actor_id, + "turn_actor_id", + 0, + 1 + ), + new TypedField( + &RPG::TroopPageCondition::turn_actor_a, + LDB_Reader::ChunkTroopPageCondition::turn_actor_a, + "turn_actor_a", + 0, + 1 + ), + new TypedField( + &RPG::TroopPageCondition::turn_actor_b, + LDB_Reader::ChunkTroopPageCondition::turn_actor_b, + "turn_actor_b", + 0, + 1 + ), + new TypedField( + &RPG::TroopPageCondition::command_actor_id, + LDB_Reader::ChunkTroopPageCondition::command_actor_id, + "command_actor_id", + 0, + 1 + ), + new TypedField( + &RPG::TroopPageCondition::command_id, + LDB_Reader::ChunkTroopPageCondition::command_id, + "command_id", + 0, + 1 + ), + NULL +}; diff --git a/src/generated/ldb_variable.cpp b/src/generated/ldb_variable.cpp index da72c64fc..7e3a8e177 100644 --- a/src/generated/ldb_variable.cpp +++ b/src/generated/ldb_variable.cpp @@ -16,12 +16,17 @@ // Read Variable. -#define LCF_CHUNK_SUFFIX LDB_Reader -#define LCF_CURRENT_STRUCT Variable +template <> +char const* const Struct::name = "Variable"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Variable::name, + LDB_Reader::ChunkVariable::name, + "name", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lmt_encounter.cpp b/src/generated/lmt_encounter.cpp index 3bee7807c..7f7583f70 100644 --- a/src/generated/lmt_encounter.cpp +++ b/src/generated/lmt_encounter.cpp @@ -16,12 +16,17 @@ // Read Encounter. -#define LCF_CHUNK_SUFFIX LMT_Reader -#define LCF_CURRENT_STRUCT Encounter +template <> +char const* const Struct::name = "Encounter"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, troop_id, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Encounter::troop_id, + LMT_Reader::ChunkEncounter::troop_id, + "troop_id", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lmt_mapinfo.cpp b/src/generated/lmt_mapinfo.cpp index b08a1349c..4e78e117a 100644 --- a/src/generated/lmt_mapinfo.cpp +++ b/src/generated/lmt_mapinfo.cpp @@ -16,28 +16,129 @@ // Read MapInfo. -#define LCF_CHUNK_SUFFIX LMT_Reader -#define LCF_CURRENT_STRUCT MapInfo +template <> +char const* const Struct::name = "MapInfo"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, parent_map, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, indentation, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, type, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, scrollbar_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, scrollbar_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, expanded_node, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, music_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, music, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, background_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, background_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, teleport, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, escape, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, save, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, encounters, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, encounter_steps, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Rect, area_rect, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::MapInfo::name, + LMT_Reader::ChunkMapInfo::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::parent_map, + LMT_Reader::ChunkMapInfo::parent_map, + "parent_map", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::indentation, + LMT_Reader::ChunkMapInfo::indentation, + "indentation", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::type, + LMT_Reader::ChunkMapInfo::type, + "type", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::scrollbar_x, + LMT_Reader::ChunkMapInfo::scrollbar_x, + "scrollbar_x", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::scrollbar_y, + LMT_Reader::ChunkMapInfo::scrollbar_y, + "scrollbar_y", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::expanded_node, + LMT_Reader::ChunkMapInfo::expanded_node, + "expanded_node", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::music_type, + LMT_Reader::ChunkMapInfo::music_type, + "music_type", + 1, + 0 + ), + new TypedField( + &RPG::MapInfo::music, + LMT_Reader::ChunkMapInfo::music, + "music", + 1, + 0 + ), + new TypedField( + &RPG::MapInfo::background_type, + LMT_Reader::ChunkMapInfo::background_type, + "background_type", + 1, + 0 + ), + new TypedField( + &RPG::MapInfo::background_name, + LMT_Reader::ChunkMapInfo::background_name, + "background_name", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::teleport, + LMT_Reader::ChunkMapInfo::teleport, + "teleport", + 1, + 0 + ), + new TypedField( + &RPG::MapInfo::escape, + LMT_Reader::ChunkMapInfo::escape, + "escape", + 1, + 0 + ), + new TypedField( + &RPG::MapInfo::save, + LMT_Reader::ChunkMapInfo::save, + "save", + 1, + 0 + ), + new TypedField>( + &RPG::MapInfo::encounters, + LMT_Reader::ChunkMapInfo::encounters, + "encounters", + 1, + 0 + ), + new TypedField( + &RPG::MapInfo::encounter_steps, + LMT_Reader::ChunkMapInfo::encounter_steps, + "encounter_steps", + 0, + 0 + ), + new TypedField( + &RPG::MapInfo::area_rect, + LMT_Reader::ChunkMapInfo::area_rect, + "area_rect", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lmt_start.cpp b/src/generated/lmt_start.cpp index de642f90f..c1857a332 100644 --- a/src/generated/lmt_start.cpp +++ b/src/generated/lmt_start.cpp @@ -16,23 +16,94 @@ // Read Start. -#define LCF_CHUNK_SUFFIX LMT_Reader -#define LCF_CURRENT_STRUCT Start +template <> +char const* const Struct::name = "Start"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, party_map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, party_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, party_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, boat_map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, boat_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, boat_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, ship_map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, ship_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, ship_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, airship_map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, airship_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, airship_y, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Start::party_map_id, + LMT_Reader::ChunkStart::party_map_id, + "party_map_id", + 0, + 0 + ), + new TypedField( + &RPG::Start::party_x, + LMT_Reader::ChunkStart::party_x, + "party_x", + 0, + 0 + ), + new TypedField( + &RPG::Start::party_y, + LMT_Reader::ChunkStart::party_y, + "party_y", + 0, + 0 + ), + new TypedField( + &RPG::Start::boat_map_id, + LMT_Reader::ChunkStart::boat_map_id, + "boat_map_id", + 0, + 0 + ), + new TypedField( + &RPG::Start::boat_x, + LMT_Reader::ChunkStart::boat_x, + "boat_x", + 0, + 0 + ), + new TypedField( + &RPG::Start::boat_y, + LMT_Reader::ChunkStart::boat_y, + "boat_y", + 0, + 0 + ), + new TypedField( + &RPG::Start::ship_map_id, + LMT_Reader::ChunkStart::ship_map_id, + "ship_map_id", + 0, + 0 + ), + new TypedField( + &RPG::Start::ship_x, + LMT_Reader::ChunkStart::ship_x, + "ship_x", + 0, + 0 + ), + new TypedField( + &RPG::Start::ship_y, + LMT_Reader::ChunkStart::ship_y, + "ship_y", + 0, + 0 + ), + new TypedField( + &RPG::Start::airship_map_id, + LMT_Reader::ChunkStart::airship_map_id, + "airship_map_id", + 0, + 0 + ), + new TypedField( + &RPG::Start::airship_x, + LMT_Reader::ChunkStart::airship_x, + "airship_x", + 0, + 0 + ), + new TypedField( + &RPG::Start::airship_y, + LMT_Reader::ChunkStart::airship_y, + "airship_y", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lmu_event.cpp b/src/generated/lmu_event.cpp index 202cd04d3..b59a029d3 100644 --- a/src/generated/lmu_event.cpp +++ b/src/generated/lmu_event.cpp @@ -16,15 +16,38 @@ // Read Event. -#define LCF_CHUNK_SUFFIX LMU_Reader -#define LCF_CURRENT_STRUCT Event +template <> +char const* const Struct::name = "Event"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, y, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, pages, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Event::name, + LMU_Reader::ChunkEvent::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::Event::x, + LMU_Reader::ChunkEvent::x, + "x", + 0, + 0 + ), + new TypedField( + &RPG::Event::y, + LMU_Reader::ChunkEvent::y, + "y", + 0, + 0 + ), + new TypedField>( + &RPG::Event::pages, + LMU_Reader::ChunkEvent::pages, + "pages", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/lmu_eventpage.cpp b/src/generated/lmu_eventpage.cpp index 542aa23e5..f3cf28a04 100644 --- a/src/generated/lmu_eventpage.cpp +++ b/src/generated/lmu_eventpage.cpp @@ -16,27 +16,121 @@ // Read EventPage. -#define LCF_CHUNK_SUFFIX LMU_Reader -#define LCF_CURRENT_STRUCT EventPage +template <> +char const* const Struct::name = "EventPage"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(RPG::EventPageCondition, condition, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, character_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, character_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, character_direction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, character_pattern, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, translucent, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_frequency, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, trigger, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, layer, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, overlap_forbidden, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::MoveRoute, move_route, 0, 0), - LCF_STRUCT_SIZE_FIELD(RPG::EventCommand, event_commands, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, event_commands, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::EventPage::condition, + LMU_Reader::ChunkEventPage::condition, + "condition", + 0, + 0 + ), + new TypedField( + &RPG::EventPage::character_name, + LMU_Reader::ChunkEventPage::character_name, + "character_name", + 0, + 0 + ), + new TypedField( + &RPG::EventPage::character_index, + LMU_Reader::ChunkEventPage::character_index, + "character_index", + 0, + 0 + ), + new TypedField( + &RPG::EventPage::character_direction, + LMU_Reader::ChunkEventPage::character_direction, + "character_direction", + 1, + 0 + ), + new TypedField( + &RPG::EventPage::character_pattern, + LMU_Reader::ChunkEventPage::character_pattern, + "character_pattern", + 0, + 0 + ), + new TypedField( + &RPG::EventPage::translucent, + LMU_Reader::ChunkEventPage::translucent, + "translucent", + 1, + 0 + ), + new TypedField( + &RPG::EventPage::move_type, + LMU_Reader::ChunkEventPage::move_type, + "move_type", + 1, + 0 + ), + new TypedField( + &RPG::EventPage::move_frequency, + LMU_Reader::ChunkEventPage::move_frequency, + "move_frequency", + 0, + 0 + ), + new TypedField( + &RPG::EventPage::trigger, + LMU_Reader::ChunkEventPage::trigger, + "trigger", + 1, + 0 + ), + new TypedField( + &RPG::EventPage::layer, + LMU_Reader::ChunkEventPage::layer, + "layer", + 1, + 0 + ), + new TypedField( + &RPG::EventPage::overlap_forbidden, + LMU_Reader::ChunkEventPage::overlap_forbidden, + "overlap_forbidden", + 1, + 0 + ), + new TypedField( + &RPG::EventPage::animation_type, + LMU_Reader::ChunkEventPage::animation_type, + "animation_type", + 1, + 0 + ), + new TypedField( + &RPG::EventPage::move_speed, + LMU_Reader::ChunkEventPage::move_speed, + "move_speed", + 0, + 0 + ), + new TypedField( + &RPG::EventPage::move_route, + LMU_Reader::ChunkEventPage::move_route, + "move_route", + 0, + 0 + ), + new SizeField( + &RPG::EventPage::event_commands, + LMU_Reader::ChunkEventPage::event_commands_size, + 1, + 0 + ), + new TypedField>( + &RPG::EventPage::event_commands, + LMU_Reader::ChunkEventPage::event_commands, + "event_commands", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/lmu_eventpagecondition.cpp b/src/generated/lmu_eventpagecondition.cpp index b8089516b..7cf8672da 100644 --- a/src/generated/lmu_eventpagecondition.cpp +++ b/src/generated/lmu_eventpagecondition.cpp @@ -16,21 +16,80 @@ // Read EventPageCondition. -#define LCF_CHUNK_SUFFIX LMU_Reader -#define LCF_CURRENT_STRUCT EventPageCondition +template <> +char const* const Struct::name = "EventPageCondition"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(RPG::EventPageCondition::Flags, flags, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_a_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_b_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, variable_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, variable_value, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, item_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, actor_id, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, timer_sec, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, timer2_sec, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, compare_operator, 0, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::EventPageCondition::flags, + LMU_Reader::ChunkEventPageCondition::flags, + "flags", + 1, + 0 + ), + new TypedField( + &RPG::EventPageCondition::switch_a_id, + LMU_Reader::ChunkEventPageCondition::switch_a_id, + "switch_a_id", + 0, + 0 + ), + new TypedField( + &RPG::EventPageCondition::switch_b_id, + LMU_Reader::ChunkEventPageCondition::switch_b_id, + "switch_b_id", + 0, + 0 + ), + new TypedField( + &RPG::EventPageCondition::variable_id, + LMU_Reader::ChunkEventPageCondition::variable_id, + "variable_id", + 0, + 0 + ), + new TypedField( + &RPG::EventPageCondition::variable_value, + LMU_Reader::ChunkEventPageCondition::variable_value, + "variable_value", + 0, + 0 + ), + new TypedField( + &RPG::EventPageCondition::item_id, + LMU_Reader::ChunkEventPageCondition::item_id, + "item_id", + 0, + 0 + ), + new TypedField( + &RPG::EventPageCondition::actor_id, + LMU_Reader::ChunkEventPageCondition::actor_id, + "actor_id", + 1, + 0 + ), + new TypedField( + &RPG::EventPageCondition::timer_sec, + LMU_Reader::ChunkEventPageCondition::timer_sec, + "timer_sec", + 0, + 0 + ), + new TypedField( + &RPG::EventPageCondition::timer2_sec, + LMU_Reader::ChunkEventPageCondition::timer2_sec, + "timer2_sec", + 0, + 1 + ), + new TypedField( + &RPG::EventPageCondition::compare_operator, + LMU_Reader::ChunkEventPageCondition::compare_operator, + "compare_operator", + 0, + 1 + ), + NULL +}; diff --git a/src/generated/lmu_map.cpp b/src/generated/lmu_map.cpp index 2e0581125..b09f4272b 100644 --- a/src/generated/lmu_map.cpp +++ b/src/generated/lmu_map.cpp @@ -16,43 +16,234 @@ // Read Map. -#define LCF_CHUNK_SUFFIX LMU_Reader -#define LCF_CURRENT_STRUCT Map +template <> +char const* const Struct::name = "Map"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, chipset_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, width, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, height, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, scroll_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_flag, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, parallax_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_loop_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_loop_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_auto_loop_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, parallax_sx, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_auto_loop_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, parallax_sy, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, generator_flag, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, generator_mode, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, top_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, generator_tiles, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, generator_width, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, generator_height, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, generator_surround, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, generator_upper_wall, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, generator_floor_b, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, generator_floor_c, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, generator_extra_b, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, generator_extra_c, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, generator_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, generator_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, generator_tile_ids, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, lower_layer, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, upper_layer, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, events, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, save_count_2k3e, 0, 1), - LCF_STRUCT_TYPED_FIELD(int32_t, save_count, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Map::chipset_id, + LMU_Reader::ChunkMap::chipset_id, + "chipset_id", + 0, + 0 + ), + new TypedField( + &RPG::Map::width, + LMU_Reader::ChunkMap::width, + "width", + 0, + 0 + ), + new TypedField( + &RPG::Map::height, + LMU_Reader::ChunkMap::height, + "height", + 0, + 0 + ), + new TypedField( + &RPG::Map::scroll_type, + LMU_Reader::ChunkMap::scroll_type, + "scroll_type", + 1, + 0 + ), + new TypedField( + &RPG::Map::parallax_flag, + LMU_Reader::ChunkMap::parallax_flag, + "parallax_flag", + 0, + 0 + ), + new TypedField( + &RPG::Map::parallax_name, + LMU_Reader::ChunkMap::parallax_name, + "parallax_name", + 0, + 0 + ), + new TypedField( + &RPG::Map::parallax_loop_x, + LMU_Reader::ChunkMap::parallax_loop_x, + "parallax_loop_x", + 0, + 0 + ), + new TypedField( + &RPG::Map::parallax_loop_y, + LMU_Reader::ChunkMap::parallax_loop_y, + "parallax_loop_y", + 0, + 0 + ), + new TypedField( + &RPG::Map::parallax_auto_loop_x, + LMU_Reader::ChunkMap::parallax_auto_loop_x, + "parallax_auto_loop_x", + 0, + 0 + ), + new TypedField( + &RPG::Map::parallax_sx, + LMU_Reader::ChunkMap::parallax_sx, + "parallax_sx", + 0, + 0 + ), + new TypedField( + &RPG::Map::parallax_auto_loop_y, + LMU_Reader::ChunkMap::parallax_auto_loop_y, + "parallax_auto_loop_y", + 0, + 0 + ), + new TypedField( + &RPG::Map::parallax_sy, + LMU_Reader::ChunkMap::parallax_sy, + "parallax_sy", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_flag, + LMU_Reader::ChunkMap::generator_flag, + "generator_flag", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_mode, + LMU_Reader::ChunkMap::generator_mode, + "generator_mode", + 0, + 0 + ), + new TypedField( + &RPG::Map::top_level, + LMU_Reader::ChunkMap::top_level, + "top_level", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_tiles, + LMU_Reader::ChunkMap::generator_tiles, + "generator_tiles", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_width, + LMU_Reader::ChunkMap::generator_width, + "generator_width", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_height, + LMU_Reader::ChunkMap::generator_height, + "generator_height", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_surround, + LMU_Reader::ChunkMap::generator_surround, + "generator_surround", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_upper_wall, + LMU_Reader::ChunkMap::generator_upper_wall, + "generator_upper_wall", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_floor_b, + LMU_Reader::ChunkMap::generator_floor_b, + "generator_floor_b", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_floor_c, + LMU_Reader::ChunkMap::generator_floor_c, + "generator_floor_c", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_extra_b, + LMU_Reader::ChunkMap::generator_extra_b, + "generator_extra_b", + 0, + 0 + ), + new TypedField( + &RPG::Map::generator_extra_c, + LMU_Reader::ChunkMap::generator_extra_c, + "generator_extra_c", + 0, + 0 + ), + new TypedField>( + &RPG::Map::generator_x, + LMU_Reader::ChunkMap::generator_x, + "generator_x", + 0, + 0 + ), + new TypedField>( + &RPG::Map::generator_y, + LMU_Reader::ChunkMap::generator_y, + "generator_y", + 0, + 0 + ), + new TypedField>( + &RPG::Map::generator_tile_ids, + LMU_Reader::ChunkMap::generator_tile_ids, + "generator_tile_ids", + 0, + 0 + ), + new TypedField>( + &RPG::Map::lower_layer, + LMU_Reader::ChunkMap::lower_layer, + "lower_layer", + 1, + 0 + ), + new TypedField>( + &RPG::Map::upper_layer, + LMU_Reader::ChunkMap::upper_layer, + "upper_layer", + 1, + 0 + ), + new TypedField>( + &RPG::Map::events, + LMU_Reader::ChunkMap::events, + "events", + 1, + 0 + ), + new TypedField( + &RPG::Map::save_count_2k3e, + LMU_Reader::ChunkMap::save_count_2k3e, + "save_count_2k3e", + 0, + 1 + ), + new TypedField( + &RPG::Map::save_count, + LMU_Reader::ChunkMap::save_count, + "save_count", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lmu_moveroute.cpp b/src/generated/lmu_moveroute.cpp index 3d227d6c2..ea38f5198 100644 --- a/src/generated/lmu_moveroute.cpp +++ b/src/generated/lmu_moveroute.cpp @@ -16,15 +16,37 @@ // Read MoveRoute. -#define LCF_CHUNK_SUFFIX LMU_Reader -#define LCF_CURRENT_STRUCT MoveRoute +template <> +char const* const Struct::name = "MoveRoute"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_SIZE_FIELD(RPG::MoveCommand, move_commands, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, move_commands, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, repeat, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, skippable, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new SizeField( + &RPG::MoveRoute::move_commands, + LMU_Reader::ChunkMoveRoute::move_commands_size, + 0, + 0 + ), + new TypedField>( + &RPG::MoveRoute::move_commands, + LMU_Reader::ChunkMoveRoute::move_commands, + "move_commands", + 1, + 0 + ), + new TypedField( + &RPG::MoveRoute::repeat, + LMU_Reader::ChunkMoveRoute::repeat, + "repeat", + 0, + 0 + ), + new TypedField( + &RPG::MoveRoute::skippable, + LMU_Reader::ChunkMoveRoute::skippable, + "skippable", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_save.cpp b/src/generated/lsd_save.cpp index fd5443ff4..efc686e85 100644 --- a/src/generated/lsd_save.cpp +++ b/src/generated/lsd_save.cpp @@ -16,26 +16,115 @@ // Read Save. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT Save +template <> +char const* const Struct::name = "Save"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(RPG::SaveTitle, title, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveSystem, system, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveScreen, screen, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, pictures, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SavePartyLocation, party_location, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveVehicleLocation, boat_location, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveVehicleLocation, ship_location, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveVehicleLocation, airship_location, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, actors, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveInventory, inventory, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, targets, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveMapInfo, map_info, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SavePanorama, panorama, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveEventData, events, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, common_events, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::Save::title, + LSD_Reader::ChunkSave::title, + "title", + 0, + 0 + ), + new TypedField( + &RPG::Save::system, + LSD_Reader::ChunkSave::system, + "system", + 0, + 0 + ), + new TypedField( + &RPG::Save::screen, + LSD_Reader::ChunkSave::screen, + "screen", + 0, + 0 + ), + new TypedField>( + &RPG::Save::pictures, + LSD_Reader::ChunkSave::pictures, + "pictures", + 1, + 0 + ), + new TypedField( + &RPG::Save::party_location, + LSD_Reader::ChunkSave::party_location, + "party_location", + 0, + 0 + ), + new TypedField( + &RPG::Save::boat_location, + LSD_Reader::ChunkSave::boat_location, + "boat_location", + 0, + 0 + ), + new TypedField( + &RPG::Save::ship_location, + LSD_Reader::ChunkSave::ship_location, + "ship_location", + 0, + 0 + ), + new TypedField( + &RPG::Save::airship_location, + LSD_Reader::ChunkSave::airship_location, + "airship_location", + 0, + 0 + ), + new TypedField>( + &RPG::Save::actors, + LSD_Reader::ChunkSave::actors, + "actors", + 1, + 0 + ), + new TypedField( + &RPG::Save::inventory, + LSD_Reader::ChunkSave::inventory, + "inventory", + 0, + 0 + ), + new TypedField>( + &RPG::Save::targets, + LSD_Reader::ChunkSave::targets, + "targets", + 1, + 0 + ), + new TypedField( + &RPG::Save::map_info, + LSD_Reader::ChunkSave::map_info, + "map_info", + 0, + 0 + ), + new TypedField( + &RPG::Save::panorama, + LSD_Reader::ChunkSave::panorama, + "panorama", + 1, + 0 + ), + new TypedField( + &RPG::Save::events, + LSD_Reader::ChunkSave::events, + "events", + 0, + 0 + ), + new TypedField>( + &RPG::Save::common_events, + LSD_Reader::ChunkSave::common_events, + "common_events", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_saveactor.cpp b/src/generated/lsd_saveactor.cpp index 2bc71ae43..9649d0308 100644 --- a/src/generated/lsd_saveactor.cpp +++ b/src/generated/lsd_saveactor.cpp @@ -16,42 +16,226 @@ // Read SaveActor. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveActor +template <> +char const* const Struct::name = "SaveActor"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, title, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, sprite_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_flags, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, face_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, face_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, exp, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hp_mod, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sp_mod, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, attack_mod, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, defense_mod, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spirit_mod, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, agility_mod, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, skills_size, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, skills, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, equipped, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, current_hp, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, current_sp, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, battle_commands, 0, 1), - LCF_STRUCT_COUNT_FIELD(int16_t, status, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, status, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, changed_battle_commands, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, class_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, row, 0, 1), - LCF_STRUCT_TYPED_FIELD(bool, two_weapon, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, lock_equipment, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, auto_battle, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, super_guard, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battler_animation, 0, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveActor::name, + LSD_Reader::ChunkSaveActor::name, + "name", + 1, + 0 + ), + new TypedField( + &RPG::SaveActor::title, + LSD_Reader::ChunkSaveActor::title, + "title", + 1, + 0 + ), + new TypedField( + &RPG::SaveActor::sprite_name, + LSD_Reader::ChunkSaveActor::sprite_name, + "sprite_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::sprite_id, + LSD_Reader::ChunkSaveActor::sprite_id, + "sprite_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::sprite_flags, + LSD_Reader::ChunkSaveActor::sprite_flags, + "sprite_flags", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::face_name, + LSD_Reader::ChunkSaveActor::face_name, + "face_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::face_id, + LSD_Reader::ChunkSaveActor::face_id, + "face_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::level, + LSD_Reader::ChunkSaveActor::level, + "level", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::exp, + LSD_Reader::ChunkSaveActor::exp, + "exp", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::hp_mod, + LSD_Reader::ChunkSaveActor::hp_mod, + "hp_mod", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::sp_mod, + LSD_Reader::ChunkSaveActor::sp_mod, + "sp_mod", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::attack_mod, + LSD_Reader::ChunkSaveActor::attack_mod, + "attack_mod", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::defense_mod, + LSD_Reader::ChunkSaveActor::defense_mod, + "defense_mod", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::spirit_mod, + LSD_Reader::ChunkSaveActor::spirit_mod, + "spirit_mod", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::agility_mod, + LSD_Reader::ChunkSaveActor::agility_mod, + "agility_mod", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::skills_size, + LSD_Reader::ChunkSaveActor::skills_size, + "skills_size", + 0, + 0 + ), + new TypedField>( + &RPG::SaveActor::skills, + LSD_Reader::ChunkSaveActor::skills, + "skills", + 1, + 0 + ), + new TypedField>( + &RPG::SaveActor::equipped, + LSD_Reader::ChunkSaveActor::equipped, + "equipped", + 1, + 0 + ), + new TypedField( + &RPG::SaveActor::current_hp, + LSD_Reader::ChunkSaveActor::current_hp, + "current_hp", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::current_sp, + LSD_Reader::ChunkSaveActor::current_sp, + "current_sp", + 0, + 0 + ), + new TypedField>( + &RPG::SaveActor::battle_commands, + LSD_Reader::ChunkSaveActor::battle_commands, + "battle_commands", + 0, + 1 + ), + new CountField( + &RPG::SaveActor::status, + LSD_Reader::ChunkSaveActor::status_size, + 0, + 0 + ), + new TypedField>( + &RPG::SaveActor::status, + LSD_Reader::ChunkSaveActor::status, + "status", + 1, + 0 + ), + new TypedField( + &RPG::SaveActor::changed_battle_commands, + LSD_Reader::ChunkSaveActor::changed_battle_commands, + "changed_battle_commands", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::class_id, + LSD_Reader::ChunkSaveActor::class_id, + "class_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::row, + LSD_Reader::ChunkSaveActor::row, + "row", + 0, + 1 + ), + new TypedField( + &RPG::SaveActor::two_weapon, + LSD_Reader::ChunkSaveActor::two_weapon, + "two_weapon", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::lock_equipment, + LSD_Reader::ChunkSaveActor::lock_equipment, + "lock_equipment", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::auto_battle, + LSD_Reader::ChunkSaveActor::auto_battle, + "auto_battle", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::super_guard, + LSD_Reader::ChunkSaveActor::super_guard, + "super_guard", + 0, + 0 + ), + new TypedField( + &RPG::SaveActor::battler_animation, + LSD_Reader::ChunkSaveActor::battler_animation, + "battler_animation", + 0, + 1 + ), + NULL +}; diff --git a/src/generated/lsd_savecommonevent.cpp b/src/generated/lsd_savecommonevent.cpp index bb115ae61..72e051420 100644 --- a/src/generated/lsd_savecommonevent.cpp +++ b/src/generated/lsd_savecommonevent.cpp @@ -16,12 +16,17 @@ // Read SaveCommonEvent. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveCommonEvent +template <> +char const* const Struct::name = "SaveCommonEvent"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(RPG::SaveEventData, event_data, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveCommonEvent::event_data, + LSD_Reader::ChunkSaveCommonEvent::event_data, + "event_data", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_saveeventcommands.cpp b/src/generated/lsd_saveeventcommands.cpp index 357257022..023a6c90a 100644 --- a/src/generated/lsd_saveeventcommands.cpp +++ b/src/generated/lsd_saveeventcommands.cpp @@ -16,18 +16,58 @@ // Read SaveEventCommands. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveEventCommands +template <> +char const* const Struct::name = "SaveEventCommands"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, commands_size, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, commands, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, current_command, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, event_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, actioned, 0, 0), - LCF_STRUCT_SIZE_FIELD(uint8_t, subcommand_path, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, subcommand_path, 1, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveEventCommands::commands_size, + LSD_Reader::ChunkSaveEventCommands::commands_size, + "commands_size", + 0, + 0 + ), + new TypedField>( + &RPG::SaveEventCommands::commands, + LSD_Reader::ChunkSaveEventCommands::commands, + "commands", + 1, + 0 + ), + new TypedField( + &RPG::SaveEventCommands::current_command, + LSD_Reader::ChunkSaveEventCommands::current_command, + "current_command", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventCommands::event_id, + LSD_Reader::ChunkSaveEventCommands::event_id, + "event_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventCommands::actioned, + LSD_Reader::ChunkSaveEventCommands::actioned, + "actioned", + 0, + 0 + ), + new SizeField( + &RPG::SaveEventCommands::subcommand_path, + LSD_Reader::ChunkSaveEventCommands::subcommand_path_size, + 0, + 0 + ), + new TypedField>( + &RPG::SaveEventCommands::subcommand_path, + LSD_Reader::ChunkSaveEventCommands::subcommand_path, + "subcommand_path", + 1, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_saveeventdata.cpp b/src/generated/lsd_saveeventdata.cpp index 52f4a9708..3456cfd7a 100644 --- a/src/generated/lsd_saveeventdata.cpp +++ b/src/generated/lsd_saveeventdata.cpp @@ -16,33 +16,164 @@ // Read SaveEventData. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveEventData +template <> +char const* const Struct::name = "SaveEventData"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::vector, commands, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, show_message, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, abort_on_escape, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, wait_movement, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_wait, 0, 0), - LCF_STRUCT_TYPED_FIELD(uint8_t, keyinput_variable, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_all_directions, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_decision, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_cancel, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_numbers, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_operators, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_shift, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_value_right, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_value_up, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, wait_time, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, keyinput_time_variable, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_down, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_right, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_up, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, keyinput_timed, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, unused_wait_for_key_or_enter, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField>( + &RPG::SaveEventData::commands, + LSD_Reader::ChunkSaveEventData::commands, + "commands", + 1, + 0 + ), + new TypedField( + &RPG::SaveEventData::show_message, + LSD_Reader::ChunkSaveEventData::show_message, + "show_message", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::abort_on_escape, + LSD_Reader::ChunkSaveEventData::abort_on_escape, + "abort_on_escape", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::wait_movement, + LSD_Reader::ChunkSaveEventData::wait_movement, + "wait_movement", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_wait, + LSD_Reader::ChunkSaveEventData::keyinput_wait, + "keyinput_wait", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_variable, + LSD_Reader::ChunkSaveEventData::keyinput_variable, + "keyinput_variable", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_all_directions, + LSD_Reader::ChunkSaveEventData::keyinput_all_directions, + "keyinput_all_directions", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_decision, + LSD_Reader::ChunkSaveEventData::keyinput_decision, + "keyinput_decision", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_cancel, + LSD_Reader::ChunkSaveEventData::keyinput_cancel, + "keyinput_cancel", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_numbers, + LSD_Reader::ChunkSaveEventData::keyinput_numbers, + "keyinput_numbers", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_operators, + LSD_Reader::ChunkSaveEventData::keyinput_operators, + "keyinput_operators", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_shift, + LSD_Reader::ChunkSaveEventData::keyinput_shift, + "keyinput_shift", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_value_right, + LSD_Reader::ChunkSaveEventData::keyinput_value_right, + "keyinput_value_right", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_value_up, + LSD_Reader::ChunkSaveEventData::keyinput_value_up, + "keyinput_value_up", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::wait_time, + LSD_Reader::ChunkSaveEventData::wait_time, + "wait_time", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_time_variable, + LSD_Reader::ChunkSaveEventData::keyinput_time_variable, + "keyinput_time_variable", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_down, + LSD_Reader::ChunkSaveEventData::keyinput_down, + "keyinput_down", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_left, + LSD_Reader::ChunkSaveEventData::keyinput_left, + "keyinput_left", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_right, + LSD_Reader::ChunkSaveEventData::keyinput_right, + "keyinput_right", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_up, + LSD_Reader::ChunkSaveEventData::keyinput_up, + "keyinput_up", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::keyinput_timed, + LSD_Reader::ChunkSaveEventData::keyinput_timed, + "keyinput_timed", + 0, + 0 + ), + new TypedField( + &RPG::SaveEventData::unused_wait_for_key_or_enter, + LSD_Reader::ChunkSaveEventData::unused_wait_for_key_or_enter, + "unused_wait_for_key_or_enter", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_saveinventory.cpp b/src/generated/lsd_saveinventory.cpp index b93d17b24..8214987e8 100644 --- a/src/generated/lsd_saveinventory.cpp +++ b/src/generated/lsd_saveinventory.cpp @@ -16,32 +16,157 @@ // Read SaveInventory. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveInventory +template <> +char const* const Struct::name = "SaveInventory"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, party_size, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, party, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, items_size, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, item_ids, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, item_counts, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, item_usage, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, gold, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, timer1_secs, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, timer1_active, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, timer1_visible, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, timer1_battle, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, timer2_secs, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, timer2_active, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, timer2_visible, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, timer2_battle, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battles, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, defeats, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, escapes, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, victories, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, turns, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, steps, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveInventory::party_size, + LSD_Reader::ChunkSaveInventory::party_size, + "party_size", + 0, + 0 + ), + new TypedField>( + &RPG::SaveInventory::party, + LSD_Reader::ChunkSaveInventory::party, + "party", + 1, + 0 + ), + new TypedField( + &RPG::SaveInventory::items_size, + LSD_Reader::ChunkSaveInventory::items_size, + "items_size", + 0, + 0 + ), + new TypedField>( + &RPG::SaveInventory::item_ids, + LSD_Reader::ChunkSaveInventory::item_ids, + "item_ids", + 1, + 0 + ), + new TypedField>( + &RPG::SaveInventory::item_counts, + LSD_Reader::ChunkSaveInventory::item_counts, + "item_counts", + 1, + 0 + ), + new TypedField>( + &RPG::SaveInventory::item_usage, + LSD_Reader::ChunkSaveInventory::item_usage, + "item_usage", + 1, + 0 + ), + new TypedField( + &RPG::SaveInventory::gold, + LSD_Reader::ChunkSaveInventory::gold, + "gold", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer1_secs, + LSD_Reader::ChunkSaveInventory::timer1_secs, + "timer1_secs", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer1_active, + LSD_Reader::ChunkSaveInventory::timer1_active, + "timer1_active", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer1_visible, + LSD_Reader::ChunkSaveInventory::timer1_visible, + "timer1_visible", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer1_battle, + LSD_Reader::ChunkSaveInventory::timer1_battle, + "timer1_battle", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer2_secs, + LSD_Reader::ChunkSaveInventory::timer2_secs, + "timer2_secs", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer2_active, + LSD_Reader::ChunkSaveInventory::timer2_active, + "timer2_active", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer2_visible, + LSD_Reader::ChunkSaveInventory::timer2_visible, + "timer2_visible", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::timer2_battle, + LSD_Reader::ChunkSaveInventory::timer2_battle, + "timer2_battle", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::battles, + LSD_Reader::ChunkSaveInventory::battles, + "battles", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::defeats, + LSD_Reader::ChunkSaveInventory::defeats, + "defeats", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::escapes, + LSD_Reader::ChunkSaveInventory::escapes, + "escapes", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::victories, + LSD_Reader::ChunkSaveInventory::victories, + "victories", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::turns, + LSD_Reader::ChunkSaveInventory::turns, + "turns", + 0, + 0 + ), + new TypedField( + &RPG::SaveInventory::steps, + LSD_Reader::ChunkSaveInventory::steps, + "steps", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savemapevent.cpp b/src/generated/lsd_savemapevent.cpp index efd9d4fc6..ff9f6ffe8 100644 --- a/src/generated/lsd_savemapevent.cpp +++ b/src/generated/lsd_savemapevent.cpp @@ -16,53 +16,304 @@ // Read SaveMapEvent. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveMapEvent +template <> +char const* const Struct::name = "SaveMapEvent"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(bool, active, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, direction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_direction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_frame, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, transparency, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, remaining_step, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_frequency, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, layer, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, overlap_forbidden, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, lock_facing, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::MoveRoute, move_route, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, move_route_overwrite, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_route_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, move_route_repeated, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, route_through, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_paused, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, through, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, stop_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, max_stop_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, jumping, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, begin_jump_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, begin_jump_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, pause, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, flying, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, sprite_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, processed, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, flash_current_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_time_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, running, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, original_move_route_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, pending, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SaveEventData, event_data, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveMapEvent::active, + LSD_Reader::ChunkSaveMapEvent::active, + "active", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::map_id, + LSD_Reader::ChunkSaveMapEvent::map_id, + "map_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::position_x, + LSD_Reader::ChunkSaveMapEvent::position_x, + "position_x", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::position_y, + LSD_Reader::ChunkSaveMapEvent::position_y, + "position_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::direction, + LSD_Reader::ChunkSaveMapEvent::direction, + "direction", + 1, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::sprite_direction, + LSD_Reader::ChunkSaveMapEvent::sprite_direction, + "sprite_direction", + 1, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::anim_frame, + LSD_Reader::ChunkSaveMapEvent::anim_frame, + "anim_frame", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::transparency, + LSD_Reader::ChunkSaveMapEvent::transparency, + "transparency", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::remaining_step, + LSD_Reader::ChunkSaveMapEvent::remaining_step, + "remaining_step", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::move_frequency, + LSD_Reader::ChunkSaveMapEvent::move_frequency, + "move_frequency", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::layer, + LSD_Reader::ChunkSaveMapEvent::layer, + "layer", + 1, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::overlap_forbidden, + LSD_Reader::ChunkSaveMapEvent::overlap_forbidden, + "overlap_forbidden", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::animation_type, + LSD_Reader::ChunkSaveMapEvent::animation_type, + "animation_type", + 1, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::lock_facing, + LSD_Reader::ChunkSaveMapEvent::lock_facing, + "lock_facing", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::move_speed, + LSD_Reader::ChunkSaveMapEvent::move_speed, + "move_speed", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::move_route, + LSD_Reader::ChunkSaveMapEvent::move_route, + "move_route", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::move_route_overwrite, + LSD_Reader::ChunkSaveMapEvent::move_route_overwrite, + "move_route_overwrite", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::move_route_index, + LSD_Reader::ChunkSaveMapEvent::move_route_index, + "move_route_index", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::move_route_repeated, + LSD_Reader::ChunkSaveMapEvent::move_route_repeated, + "move_route_repeated", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::route_through, + LSD_Reader::ChunkSaveMapEvent::route_through, + "route_through", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::anim_paused, + LSD_Reader::ChunkSaveMapEvent::anim_paused, + "anim_paused", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::through, + LSD_Reader::ChunkSaveMapEvent::through, + "through", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::stop_count, + LSD_Reader::ChunkSaveMapEvent::stop_count, + "stop_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::anim_count, + LSD_Reader::ChunkSaveMapEvent::anim_count, + "anim_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::max_stop_count, + LSD_Reader::ChunkSaveMapEvent::max_stop_count, + "max_stop_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::jumping, + LSD_Reader::ChunkSaveMapEvent::jumping, + "jumping", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::begin_jump_x, + LSD_Reader::ChunkSaveMapEvent::begin_jump_x, + "begin_jump_x", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::begin_jump_y, + LSD_Reader::ChunkSaveMapEvent::begin_jump_y, + "begin_jump_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::pause, + LSD_Reader::ChunkSaveMapEvent::pause, + "pause", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::flying, + LSD_Reader::ChunkSaveMapEvent::flying, + "flying", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::sprite_name, + LSD_Reader::ChunkSaveMapEvent::sprite_name, + "sprite_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::sprite_id, + LSD_Reader::ChunkSaveMapEvent::sprite_id, + "sprite_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::processed, + LSD_Reader::ChunkSaveMapEvent::processed, + "processed", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::flash_red, + LSD_Reader::ChunkSaveMapEvent::flash_red, + "flash_red", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::flash_green, + LSD_Reader::ChunkSaveMapEvent::flash_green, + "flash_green", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::flash_blue, + LSD_Reader::ChunkSaveMapEvent::flash_blue, + "flash_blue", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::flash_current_level, + LSD_Reader::ChunkSaveMapEvent::flash_current_level, + "flash_current_level", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::flash_time_left, + LSD_Reader::ChunkSaveMapEvent::flash_time_left, + "flash_time_left", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::running, + LSD_Reader::ChunkSaveMapEvent::running, + "running", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::original_move_route_index, + LSD_Reader::ChunkSaveMapEvent::original_move_route_index, + "original_move_route_index", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::pending, + LSD_Reader::ChunkSaveMapEvent::pending, + "pending", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapEvent::event_data, + LSD_Reader::ChunkSaveMapEvent::event_data, + "event_data", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savemapinfo.cpp b/src/generated/lsd_savemapinfo.cpp index 4451291bb..ccb8989ce 100644 --- a/src/generated/lsd_savemapinfo.cpp +++ b/src/generated/lsd_savemapinfo.cpp @@ -16,25 +16,108 @@ // Read SaveMapInfo. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveMapInfo +template <> +char const* const Struct::name = "SaveMapInfo"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, position_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, encounter_rate, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, chipset_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, events, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, lower_tiles, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, upper_tiles, 1, 0), - LCF_STRUCT_TYPED_FIELD(std::string, parallax_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_horz, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_vert, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_horz_auto, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, parallax_horz_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, parallax_vert_auto, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, parallax_vert_speed, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveMapInfo::position_x, + LSD_Reader::ChunkSaveMapInfo::position_x, + "position_x", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::position_y, + LSD_Reader::ChunkSaveMapInfo::position_y, + "position_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::encounter_rate, + LSD_Reader::ChunkSaveMapInfo::encounter_rate, + "encounter_rate", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::chipset_id, + LSD_Reader::ChunkSaveMapInfo::chipset_id, + "chipset_id", + 0, + 0 + ), + new TypedField>( + &RPG::SaveMapInfo::events, + LSD_Reader::ChunkSaveMapInfo::events, + "events", + 1, + 0 + ), + new TypedField>( + &RPG::SaveMapInfo::lower_tiles, + LSD_Reader::ChunkSaveMapInfo::lower_tiles, + "lower_tiles", + 1, + 0 + ), + new TypedField>( + &RPG::SaveMapInfo::upper_tiles, + LSD_Reader::ChunkSaveMapInfo::upper_tiles, + "upper_tiles", + 1, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::parallax_name, + LSD_Reader::ChunkSaveMapInfo::parallax_name, + "parallax_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::parallax_horz, + LSD_Reader::ChunkSaveMapInfo::parallax_horz, + "parallax_horz", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::parallax_vert, + LSD_Reader::ChunkSaveMapInfo::parallax_vert, + "parallax_vert", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::parallax_horz_auto, + LSD_Reader::ChunkSaveMapInfo::parallax_horz_auto, + "parallax_horz_auto", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::parallax_horz_speed, + LSD_Reader::ChunkSaveMapInfo::parallax_horz_speed, + "parallax_horz_speed", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::parallax_vert_auto, + LSD_Reader::ChunkSaveMapInfo::parallax_vert_auto, + "parallax_vert_auto", + 0, + 0 + ), + new TypedField( + &RPG::SaveMapInfo::parallax_vert_speed, + LSD_Reader::ChunkSaveMapInfo::parallax_vert_speed, + "parallax_vert_speed", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savepanorama.cpp b/src/generated/lsd_savepanorama.cpp index d78a4ea6d..c13669185 100644 --- a/src/generated/lsd_savepanorama.cpp +++ b/src/generated/lsd_savepanorama.cpp @@ -16,13 +16,24 @@ // Read SavePanorama. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SavePanorama +template <> +char const* const Struct::name = "SavePanorama"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, pan_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_y, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SavePanorama::pan_x, + LSD_Reader::ChunkSavePanorama::pan_x, + "pan_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePanorama::pan_y, + LSD_Reader::ChunkSavePanorama::pan_y, + "pan_y", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savepartylocation.cpp b/src/generated/lsd_savepartylocation.cpp index 2f2726e97..81cc62c19 100644 --- a/src/generated/lsd_savepartylocation.cpp +++ b/src/generated/lsd_savepartylocation.cpp @@ -16,66 +16,395 @@ // Read SavePartyLocation. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SavePartyLocation +template <> +char const* const Struct::name = "SavePartyLocation"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(bool, active, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, direction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_direction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_frame, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, transparency, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, remaining_step, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_frequency, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, layer, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, overlap_forbidden, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, lock_facing, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_speed, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::MoveRoute, move_route, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, move_route_overwrite, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_route_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, move_route_repeated, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, sprite_transparent, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, route_through, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_paused, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, through, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, stop_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, max_stop_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, jumping, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, begin_jump_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, begin_jump_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, pause, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, flying, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, sprite_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, processed, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, flash_current_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_time_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, boarding, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, aboard, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, vehicle, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, unboarding, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, preboard_move_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, menu_calling, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_state, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_current_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_current_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_finish_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_finish_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, encounter_steps, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, encounter_calling, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, map_save_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, database_save_count, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SavePartyLocation::active, + LSD_Reader::ChunkSavePartyLocation::active, + "active", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::map_id, + LSD_Reader::ChunkSavePartyLocation::map_id, + "map_id", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::position_x, + LSD_Reader::ChunkSavePartyLocation::position_x, + "position_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::position_y, + LSD_Reader::ChunkSavePartyLocation::position_y, + "position_y", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::direction, + LSD_Reader::ChunkSavePartyLocation::direction, + "direction", + 1, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::sprite_direction, + LSD_Reader::ChunkSavePartyLocation::sprite_direction, + "sprite_direction", + 1, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::anim_frame, + LSD_Reader::ChunkSavePartyLocation::anim_frame, + "anim_frame", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::transparency, + LSD_Reader::ChunkSavePartyLocation::transparency, + "transparency", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::remaining_step, + LSD_Reader::ChunkSavePartyLocation::remaining_step, + "remaining_step", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::move_frequency, + LSD_Reader::ChunkSavePartyLocation::move_frequency, + "move_frequency", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::layer, + LSD_Reader::ChunkSavePartyLocation::layer, + "layer", + 1, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::overlap_forbidden, + LSD_Reader::ChunkSavePartyLocation::overlap_forbidden, + "overlap_forbidden", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::animation_type, + LSD_Reader::ChunkSavePartyLocation::animation_type, + "animation_type", + 1, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::lock_facing, + LSD_Reader::ChunkSavePartyLocation::lock_facing, + "lock_facing", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::move_speed, + LSD_Reader::ChunkSavePartyLocation::move_speed, + "move_speed", + 1, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::move_route, + LSD_Reader::ChunkSavePartyLocation::move_route, + "move_route", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::move_route_overwrite, + LSD_Reader::ChunkSavePartyLocation::move_route_overwrite, + "move_route_overwrite", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::move_route_index, + LSD_Reader::ChunkSavePartyLocation::move_route_index, + "move_route_index", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::move_route_repeated, + LSD_Reader::ChunkSavePartyLocation::move_route_repeated, + "move_route_repeated", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::sprite_transparent, + LSD_Reader::ChunkSavePartyLocation::sprite_transparent, + "sprite_transparent", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::route_through, + LSD_Reader::ChunkSavePartyLocation::route_through, + "route_through", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::anim_paused, + LSD_Reader::ChunkSavePartyLocation::anim_paused, + "anim_paused", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::through, + LSD_Reader::ChunkSavePartyLocation::through, + "through", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::stop_count, + LSD_Reader::ChunkSavePartyLocation::stop_count, + "stop_count", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::anim_count, + LSD_Reader::ChunkSavePartyLocation::anim_count, + "anim_count", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::max_stop_count, + LSD_Reader::ChunkSavePartyLocation::max_stop_count, + "max_stop_count", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::jumping, + LSD_Reader::ChunkSavePartyLocation::jumping, + "jumping", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::begin_jump_x, + LSD_Reader::ChunkSavePartyLocation::begin_jump_x, + "begin_jump_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::begin_jump_y, + LSD_Reader::ChunkSavePartyLocation::begin_jump_y, + "begin_jump_y", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::pause, + LSD_Reader::ChunkSavePartyLocation::pause, + "pause", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::flying, + LSD_Reader::ChunkSavePartyLocation::flying, + "flying", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::sprite_name, + LSD_Reader::ChunkSavePartyLocation::sprite_name, + "sprite_name", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::sprite_id, + LSD_Reader::ChunkSavePartyLocation::sprite_id, + "sprite_id", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::processed, + LSD_Reader::ChunkSavePartyLocation::processed, + "processed", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::flash_red, + LSD_Reader::ChunkSavePartyLocation::flash_red, + "flash_red", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::flash_green, + LSD_Reader::ChunkSavePartyLocation::flash_green, + "flash_green", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::flash_blue, + LSD_Reader::ChunkSavePartyLocation::flash_blue, + "flash_blue", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::flash_current_level, + LSD_Reader::ChunkSavePartyLocation::flash_current_level, + "flash_current_level", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::flash_time_left, + LSD_Reader::ChunkSavePartyLocation::flash_time_left, + "flash_time_left", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::boarding, + LSD_Reader::ChunkSavePartyLocation::boarding, + "boarding", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::aboard, + LSD_Reader::ChunkSavePartyLocation::aboard, + "aboard", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::vehicle, + LSD_Reader::ChunkSavePartyLocation::vehicle, + "vehicle", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::unboarding, + LSD_Reader::ChunkSavePartyLocation::unboarding, + "unboarding", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::preboard_move_speed, + LSD_Reader::ChunkSavePartyLocation::preboard_move_speed, + "preboard_move_speed", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::menu_calling, + LSD_Reader::ChunkSavePartyLocation::menu_calling, + "menu_calling", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::pan_state, + LSD_Reader::ChunkSavePartyLocation::pan_state, + "pan_state", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::pan_current_x, + LSD_Reader::ChunkSavePartyLocation::pan_current_x, + "pan_current_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::pan_current_y, + LSD_Reader::ChunkSavePartyLocation::pan_current_y, + "pan_current_y", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::pan_finish_x, + LSD_Reader::ChunkSavePartyLocation::pan_finish_x, + "pan_finish_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::pan_finish_y, + LSD_Reader::ChunkSavePartyLocation::pan_finish_y, + "pan_finish_y", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::pan_speed, + LSD_Reader::ChunkSavePartyLocation::pan_speed, + "pan_speed", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::encounter_steps, + LSD_Reader::ChunkSavePartyLocation::encounter_steps, + "encounter_steps", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::encounter_calling, + LSD_Reader::ChunkSavePartyLocation::encounter_calling, + "encounter_calling", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::map_save_count, + LSD_Reader::ChunkSavePartyLocation::map_save_count, + "map_save_count", + 0, + 0 + ), + new TypedField( + &RPG::SavePartyLocation::database_save_count, + LSD_Reader::ChunkSavePartyLocation::database_save_count, + "database_save_count", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savepicture.cpp b/src/generated/lsd_savepicture.cpp index 430f924a5..7d3aadedf 100644 --- a/src/generated/lsd_savepicture.cpp +++ b/src/generated/lsd_savepicture.cpp @@ -16,49 +16,276 @@ // Read SavePicture. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SavePicture +template <> +char const* const Struct::name = "SavePicture"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(std::string, name, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, start_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, start_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, fixed_to_map, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_magnify, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_top_trans, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, transparency, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_sat, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, effect_mode, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_effect, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_bot_trans, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spritesheet_cols, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spritesheet_rows, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spritesheet_frame, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, spritesheet_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, frames, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, spritesheet_play_once, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, map_layer, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battle_layer, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::SavePicture::Flags, flags, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, finish_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, finish_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_magnify, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_top_trans, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_bot_trans, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_sat, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, finish_effect, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, time_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, current_rotation, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, current_waver, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SavePicture::name, + LSD_Reader::ChunkSavePicture::name, + "name", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::start_x, + LSD_Reader::ChunkSavePicture::start_x, + "start_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::start_y, + LSD_Reader::ChunkSavePicture::start_y, + "start_y", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_x, + LSD_Reader::ChunkSavePicture::current_x, + "current_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_y, + LSD_Reader::ChunkSavePicture::current_y, + "current_y", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::fixed_to_map, + LSD_Reader::ChunkSavePicture::fixed_to_map, + "fixed_to_map", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_magnify, + LSD_Reader::ChunkSavePicture::current_magnify, + "current_magnify", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_top_trans, + LSD_Reader::ChunkSavePicture::current_top_trans, + "current_top_trans", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::transparency, + LSD_Reader::ChunkSavePicture::transparency, + "transparency", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_red, + LSD_Reader::ChunkSavePicture::current_red, + "current_red", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_green, + LSD_Reader::ChunkSavePicture::current_green, + "current_green", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_blue, + LSD_Reader::ChunkSavePicture::current_blue, + "current_blue", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_sat, + LSD_Reader::ChunkSavePicture::current_sat, + "current_sat", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::effect_mode, + LSD_Reader::ChunkSavePicture::effect_mode, + "effect_mode", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_effect, + LSD_Reader::ChunkSavePicture::current_effect, + "current_effect", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_bot_trans, + LSD_Reader::ChunkSavePicture::current_bot_trans, + "current_bot_trans", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::spritesheet_cols, + LSD_Reader::ChunkSavePicture::spritesheet_cols, + "spritesheet_cols", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::spritesheet_rows, + LSD_Reader::ChunkSavePicture::spritesheet_rows, + "spritesheet_rows", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::spritesheet_frame, + LSD_Reader::ChunkSavePicture::spritesheet_frame, + "spritesheet_frame", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::spritesheet_speed, + LSD_Reader::ChunkSavePicture::spritesheet_speed, + "spritesheet_speed", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::frames, + LSD_Reader::ChunkSavePicture::frames, + "frames", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::spritesheet_play_once, + LSD_Reader::ChunkSavePicture::spritesheet_play_once, + "spritesheet_play_once", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::map_layer, + LSD_Reader::ChunkSavePicture::map_layer, + "map_layer", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::battle_layer, + LSD_Reader::ChunkSavePicture::battle_layer, + "battle_layer", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::flags, + LSD_Reader::ChunkSavePicture::flags, + "flags", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_x, + LSD_Reader::ChunkSavePicture::finish_x, + "finish_x", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_y, + LSD_Reader::ChunkSavePicture::finish_y, + "finish_y", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_magnify, + LSD_Reader::ChunkSavePicture::finish_magnify, + "finish_magnify", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_top_trans, + LSD_Reader::ChunkSavePicture::finish_top_trans, + "finish_top_trans", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_bot_trans, + LSD_Reader::ChunkSavePicture::finish_bot_trans, + "finish_bot_trans", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_red, + LSD_Reader::ChunkSavePicture::finish_red, + "finish_red", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_green, + LSD_Reader::ChunkSavePicture::finish_green, + "finish_green", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_blue, + LSD_Reader::ChunkSavePicture::finish_blue, + "finish_blue", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_sat, + LSD_Reader::ChunkSavePicture::finish_sat, + "finish_sat", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::finish_effect, + LSD_Reader::ChunkSavePicture::finish_effect, + "finish_effect", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::time_left, + LSD_Reader::ChunkSavePicture::time_left, + "time_left", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_rotation, + LSD_Reader::ChunkSavePicture::current_rotation, + "current_rotation", + 0, + 0 + ), + new TypedField( + &RPG::SavePicture::current_waver, + LSD_Reader::ChunkSavePicture::current_waver, + "current_waver", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savescreen.cpp b/src/generated/lsd_savescreen.cpp index 61008b327..afff4c54e 100644 --- a/src/generated/lsd_savescreen.cpp +++ b/src/generated/lsd_savescreen.cpp @@ -16,41 +16,220 @@ // Read SaveScreen. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveScreen +template <> +char const* const Struct::name = "SaveScreen"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, tint_finish_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tint_finish_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tint_finish_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tint_finish_sat, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, tint_current_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, tint_current_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, tint_current_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, tint_current_sat, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, tint_time_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, flash_continuous, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, flash_current_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_time_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, shake_continuous, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, shake_strength, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, shake_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, shake_position, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, shake_position_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, shake_time_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, pan_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battleanim_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battleanim_target, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, battleanim_frame, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, battleanim_active, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, battleanim_global, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, weather, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, weather_strength, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveScreen::tint_finish_red, + LSD_Reader::ChunkSaveScreen::tint_finish_red, + "tint_finish_red", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_finish_green, + LSD_Reader::ChunkSaveScreen::tint_finish_green, + "tint_finish_green", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_finish_blue, + LSD_Reader::ChunkSaveScreen::tint_finish_blue, + "tint_finish_blue", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_finish_sat, + LSD_Reader::ChunkSaveScreen::tint_finish_sat, + "tint_finish_sat", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_current_red, + LSD_Reader::ChunkSaveScreen::tint_current_red, + "tint_current_red", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_current_green, + LSD_Reader::ChunkSaveScreen::tint_current_green, + "tint_current_green", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_current_blue, + LSD_Reader::ChunkSaveScreen::tint_current_blue, + "tint_current_blue", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_current_sat, + LSD_Reader::ChunkSaveScreen::tint_current_sat, + "tint_current_sat", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::tint_time_left, + LSD_Reader::ChunkSaveScreen::tint_time_left, + "tint_time_left", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::flash_continuous, + LSD_Reader::ChunkSaveScreen::flash_continuous, + "flash_continuous", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::flash_red, + LSD_Reader::ChunkSaveScreen::flash_red, + "flash_red", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::flash_green, + LSD_Reader::ChunkSaveScreen::flash_green, + "flash_green", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::flash_blue, + LSD_Reader::ChunkSaveScreen::flash_blue, + "flash_blue", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::flash_current_level, + LSD_Reader::ChunkSaveScreen::flash_current_level, + "flash_current_level", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::flash_time_left, + LSD_Reader::ChunkSaveScreen::flash_time_left, + "flash_time_left", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::shake_continuous, + LSD_Reader::ChunkSaveScreen::shake_continuous, + "shake_continuous", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::shake_strength, + LSD_Reader::ChunkSaveScreen::shake_strength, + "shake_strength", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::shake_speed, + LSD_Reader::ChunkSaveScreen::shake_speed, + "shake_speed", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::shake_position, + LSD_Reader::ChunkSaveScreen::shake_position, + "shake_position", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::shake_position_y, + LSD_Reader::ChunkSaveScreen::shake_position_y, + "shake_position_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::shake_time_left, + LSD_Reader::ChunkSaveScreen::shake_time_left, + "shake_time_left", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::pan_x, + LSD_Reader::ChunkSaveScreen::pan_x, + "pan_x", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::pan_y, + LSD_Reader::ChunkSaveScreen::pan_y, + "pan_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::battleanim_id, + LSD_Reader::ChunkSaveScreen::battleanim_id, + "battleanim_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::battleanim_target, + LSD_Reader::ChunkSaveScreen::battleanim_target, + "battleanim_target", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::battleanim_frame, + LSD_Reader::ChunkSaveScreen::battleanim_frame, + "battleanim_frame", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::battleanim_active, + LSD_Reader::ChunkSaveScreen::battleanim_active, + "battleanim_active", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::battleanim_global, + LSD_Reader::ChunkSaveScreen::battleanim_global, + "battleanim_global", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::weather, + LSD_Reader::ChunkSaveScreen::weather, + "weather", + 0, + 0 + ), + new TypedField( + &RPG::SaveScreen::weather_strength, + LSD_Reader::ChunkSaveScreen::weather_strength, + "weather_strength", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savesystem.cpp b/src/generated/lsd_savesystem.cpp index 20438433f..7b9cb915f 100644 --- a/src/generated/lsd_savesystem.cpp +++ b/src/generated/lsd_savesystem.cpp @@ -16,68 +16,407 @@ // Read SaveSystem. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveSystem +template <> +char const* const Struct::name = "SaveSystem"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, scene, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, frame_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, graphics_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, message_stretch, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, font_id, 0, 0), - LCF_STRUCT_COUNT_FIELD(bool, switches, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, switches, 1, 0), - LCF_STRUCT_COUNT_FIELD(int32_t, variables, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::vector, variables, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, message_transparent, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, message_position, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, message_prevent_overlap, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, message_continue_events, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, face_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, face_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, face_right, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, face_flip, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, transparent, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, music_stopping, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, title_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, battle_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, battle_end_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, inn_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, current_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, before_vehicle_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, before_battle_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, stored_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, boat_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, ship_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, airship_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Music, gameover_music, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, cursor_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, decision_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, cancel_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, buzzer_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, battle_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, escape_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, enemy_attack_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, enemy_damaged_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, actor_damaged_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, dodge_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, enemy_death_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(RPG::Sound, item_se, 1, 0), - LCF_STRUCT_TYPED_FIELD(int8_t, transition_out, 1, 0), - LCF_STRUCT_TYPED_FIELD(int8_t, transition_in, 1, 0), - LCF_STRUCT_TYPED_FIELD(int8_t, battle_start_fadeout, 0, 0), - LCF_STRUCT_TYPED_FIELD(int8_t, battle_start_fadein, 0, 0), - LCF_STRUCT_TYPED_FIELD(int8_t, battle_end_fadeout, 0, 0), - LCF_STRUCT_TYPED_FIELD(int8_t, battle_end_fadein, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, teleport_allowed, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, escape_allowed, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, save_allowed, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, menu_allowed, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, background, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, save_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, save_slot, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, atb_mode, 0, 1), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveSystem::scene, + LSD_Reader::ChunkSaveSystem::scene, + "scene", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::frame_count, + LSD_Reader::ChunkSaveSystem::frame_count, + "frame_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::graphics_name, + LSD_Reader::ChunkSaveSystem::graphics_name, + "graphics_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::message_stretch, + LSD_Reader::ChunkSaveSystem::message_stretch, + "message_stretch", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::font_id, + LSD_Reader::ChunkSaveSystem::font_id, + "font_id", + 0, + 0 + ), + new CountField( + &RPG::SaveSystem::switches, + LSD_Reader::ChunkSaveSystem::switches_size, + 0, + 0 + ), + new TypedField>( + &RPG::SaveSystem::switches, + LSD_Reader::ChunkSaveSystem::switches, + "switches", + 1, + 0 + ), + new CountField( + &RPG::SaveSystem::variables, + LSD_Reader::ChunkSaveSystem::variables_size, + 0, + 0 + ), + new TypedField>( + &RPG::SaveSystem::variables, + LSD_Reader::ChunkSaveSystem::variables, + "variables", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::message_transparent, + LSD_Reader::ChunkSaveSystem::message_transparent, + "message_transparent", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::message_position, + LSD_Reader::ChunkSaveSystem::message_position, + "message_position", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::message_prevent_overlap, + LSD_Reader::ChunkSaveSystem::message_prevent_overlap, + "message_prevent_overlap", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::message_continue_events, + LSD_Reader::ChunkSaveSystem::message_continue_events, + "message_continue_events", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::face_name, + LSD_Reader::ChunkSaveSystem::face_name, + "face_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::face_id, + LSD_Reader::ChunkSaveSystem::face_id, + "face_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::face_right, + LSD_Reader::ChunkSaveSystem::face_right, + "face_right", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::face_flip, + LSD_Reader::ChunkSaveSystem::face_flip, + "face_flip", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::transparent, + LSD_Reader::ChunkSaveSystem::transparent, + "transparent", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::music_stopping, + LSD_Reader::ChunkSaveSystem::music_stopping, + "music_stopping", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::title_music, + LSD_Reader::ChunkSaveSystem::title_music, + "title_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::battle_music, + LSD_Reader::ChunkSaveSystem::battle_music, + "battle_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::battle_end_music, + LSD_Reader::ChunkSaveSystem::battle_end_music, + "battle_end_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::inn_music, + LSD_Reader::ChunkSaveSystem::inn_music, + "inn_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::current_music, + LSD_Reader::ChunkSaveSystem::current_music, + "current_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::before_vehicle_music, + LSD_Reader::ChunkSaveSystem::before_vehicle_music, + "before_vehicle_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::before_battle_music, + LSD_Reader::ChunkSaveSystem::before_battle_music, + "before_battle_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::stored_music, + LSD_Reader::ChunkSaveSystem::stored_music, + "stored_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::boat_music, + LSD_Reader::ChunkSaveSystem::boat_music, + "boat_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::ship_music, + LSD_Reader::ChunkSaveSystem::ship_music, + "ship_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::airship_music, + LSD_Reader::ChunkSaveSystem::airship_music, + "airship_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::gameover_music, + LSD_Reader::ChunkSaveSystem::gameover_music, + "gameover_music", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::cursor_se, + LSD_Reader::ChunkSaveSystem::cursor_se, + "cursor_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::decision_se, + LSD_Reader::ChunkSaveSystem::decision_se, + "decision_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::cancel_se, + LSD_Reader::ChunkSaveSystem::cancel_se, + "cancel_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::buzzer_se, + LSD_Reader::ChunkSaveSystem::buzzer_se, + "buzzer_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::battle_se, + LSD_Reader::ChunkSaveSystem::battle_se, + "battle_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::escape_se, + LSD_Reader::ChunkSaveSystem::escape_se, + "escape_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::enemy_attack_se, + LSD_Reader::ChunkSaveSystem::enemy_attack_se, + "enemy_attack_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::enemy_damaged_se, + LSD_Reader::ChunkSaveSystem::enemy_damaged_se, + "enemy_damaged_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::actor_damaged_se, + LSD_Reader::ChunkSaveSystem::actor_damaged_se, + "actor_damaged_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::dodge_se, + LSD_Reader::ChunkSaveSystem::dodge_se, + "dodge_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::enemy_death_se, + LSD_Reader::ChunkSaveSystem::enemy_death_se, + "enemy_death_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::item_se, + LSD_Reader::ChunkSaveSystem::item_se, + "item_se", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::transition_out, + LSD_Reader::ChunkSaveSystem::transition_out, + "transition_out", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::transition_in, + LSD_Reader::ChunkSaveSystem::transition_in, + "transition_in", + 1, + 0 + ), + new TypedField( + &RPG::SaveSystem::battle_start_fadeout, + LSD_Reader::ChunkSaveSystem::battle_start_fadeout, + "battle_start_fadeout", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::battle_start_fadein, + LSD_Reader::ChunkSaveSystem::battle_start_fadein, + "battle_start_fadein", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::battle_end_fadeout, + LSD_Reader::ChunkSaveSystem::battle_end_fadeout, + "battle_end_fadeout", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::battle_end_fadein, + LSD_Reader::ChunkSaveSystem::battle_end_fadein, + "battle_end_fadein", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::teleport_allowed, + LSD_Reader::ChunkSaveSystem::teleport_allowed, + "teleport_allowed", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::escape_allowed, + LSD_Reader::ChunkSaveSystem::escape_allowed, + "escape_allowed", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::save_allowed, + LSD_Reader::ChunkSaveSystem::save_allowed, + "save_allowed", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::menu_allowed, + LSD_Reader::ChunkSaveSystem::menu_allowed, + "menu_allowed", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::background, + LSD_Reader::ChunkSaveSystem::background, + "background", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::save_count, + LSD_Reader::ChunkSaveSystem::save_count, + "save_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::save_slot, + LSD_Reader::ChunkSaveSystem::save_slot, + "save_slot", + 0, + 0 + ), + new TypedField( + &RPG::SaveSystem::atb_mode, + LSD_Reader::ChunkSaveSystem::atb_mode, + "atb_mode", + 0, + 1 + ), + NULL +}; diff --git a/src/generated/lsd_savetarget.cpp b/src/generated/lsd_savetarget.cpp index 5d6f4464b..b163a6a8b 100644 --- a/src/generated/lsd_savetarget.cpp +++ b/src/generated/lsd_savetarget.cpp @@ -16,16 +16,45 @@ // Read SaveTarget. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveTarget +template <> +char const* const Struct::name = "SaveTarget"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(int32_t, map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, map_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, map_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, switch_on, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, switch_id, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveTarget::map_id, + LSD_Reader::ChunkSaveTarget::map_id, + "map_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveTarget::map_x, + LSD_Reader::ChunkSaveTarget::map_x, + "map_x", + 0, + 0 + ), + new TypedField( + &RPG::SaveTarget::map_y, + LSD_Reader::ChunkSaveTarget::map_y, + "map_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveTarget::switch_on, + LSD_Reader::ChunkSaveTarget::switch_on, + "switch_on", + 0, + 0 + ), + new TypedField( + &RPG::SaveTarget::switch_id, + LSD_Reader::ChunkSaveTarget::switch_id, + "switch_id", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savetitle.cpp b/src/generated/lsd_savetitle.cpp index 5a06cf5e5..e890c47fe 100644 --- a/src/generated/lsd_savetitle.cpp +++ b/src/generated/lsd_savetitle.cpp @@ -16,23 +16,94 @@ // Read SaveTitle. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveTitle +template <> +char const* const Struct::name = "SaveTitle"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(double, timestamp, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, hero_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hero_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, hero_hp, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, face1_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, face1_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, face2_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, face2_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, face3_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, face3_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, face4_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, face4_id, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveTitle::timestamp, + LSD_Reader::ChunkSaveTitle::timestamp, + "timestamp", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::hero_name, + LSD_Reader::ChunkSaveTitle::hero_name, + "hero_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::hero_level, + LSD_Reader::ChunkSaveTitle::hero_level, + "hero_level", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::hero_hp, + LSD_Reader::ChunkSaveTitle::hero_hp, + "hero_hp", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face1_name, + LSD_Reader::ChunkSaveTitle::face1_name, + "face1_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face1_id, + LSD_Reader::ChunkSaveTitle::face1_id, + "face1_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face2_name, + LSD_Reader::ChunkSaveTitle::face2_name, + "face2_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face2_id, + LSD_Reader::ChunkSaveTitle::face2_id, + "face2_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face3_name, + LSD_Reader::ChunkSaveTitle::face3_name, + "face3_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face3_id, + LSD_Reader::ChunkSaveTitle::face3_id, + "face3_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face4_name, + LSD_Reader::ChunkSaveTitle::face4_name, + "face4_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveTitle::face4_id, + LSD_Reader::ChunkSaveTitle::face4_id, + "face4_id", + 0, + 0 + ), + NULL +}; diff --git a/src/generated/lsd_savevehiclelocation.cpp b/src/generated/lsd_savevehiclelocation.cpp index 53c972665..194d0ff47 100644 --- a/src/generated/lsd_savevehiclelocation.cpp +++ b/src/generated/lsd_savevehiclelocation.cpp @@ -16,54 +16,311 @@ // Read SaveVehicleLocation. -#define LCF_CHUNK_SUFFIX LSD_Reader -#define LCF_CURRENT_STRUCT SaveVehicleLocation +template <> +char const* const Struct::name = "SaveVehicleLocation"; -LCF_STRUCT_FIELDS_BEGIN() - LCF_STRUCT_TYPED_FIELD(bool, active, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, map_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, position_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, direction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_direction, 1, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_frame, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, transparency, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, remaining_step, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_frequency, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, layer, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, overlap_forbidden, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, animation_type, 1, 0), - LCF_STRUCT_TYPED_FIELD(bool, lock_facing, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_speed, 0, 0), - LCF_STRUCT_TYPED_FIELD(RPG::MoveRoute, move_route, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, move_route_overwrite, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, move_route_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, move_route_repeated, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_paused, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, through, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, stop_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, anim_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, max_stop_count, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, jumping, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, begin_jump_x, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, begin_jump_y, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, pause, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, flying, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, sprite_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite_id, 0, 0), - LCF_STRUCT_TYPED_FIELD(bool, processed, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_red, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_green, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_blue, 0, 0), - LCF_STRUCT_TYPED_FIELD(double, flash_current_level, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, flash_time_left, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, vehicle, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, original_move_route_index, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, remaining_ascent, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, remaining_descent, 0, 0), - LCF_STRUCT_TYPED_FIELD(std::string, sprite2_name, 0, 0), - LCF_STRUCT_TYPED_FIELD(int32_t, sprite2_id, 0, 0), -LCF_STRUCT_FIELDS_END() - -#undef LCF_CURRENT_STRUCT -#undef LCF_CHUNK_SUFFIX +template <> +Field const* Struct::fields[] = { + new TypedField( + &RPG::SaveVehicleLocation::active, + LSD_Reader::ChunkSaveVehicleLocation::active, + "active", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::map_id, + LSD_Reader::ChunkSaveVehicleLocation::map_id, + "map_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::position_x, + LSD_Reader::ChunkSaveVehicleLocation::position_x, + "position_x", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::position_y, + LSD_Reader::ChunkSaveVehicleLocation::position_y, + "position_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::direction, + LSD_Reader::ChunkSaveVehicleLocation::direction, + "direction", + 1, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::sprite_direction, + LSD_Reader::ChunkSaveVehicleLocation::sprite_direction, + "sprite_direction", + 1, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::anim_frame, + LSD_Reader::ChunkSaveVehicleLocation::anim_frame, + "anim_frame", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::transparency, + LSD_Reader::ChunkSaveVehicleLocation::transparency, + "transparency", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::remaining_step, + LSD_Reader::ChunkSaveVehicleLocation::remaining_step, + "remaining_step", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::move_frequency, + LSD_Reader::ChunkSaveVehicleLocation::move_frequency, + "move_frequency", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::layer, + LSD_Reader::ChunkSaveVehicleLocation::layer, + "layer", + 1, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::overlap_forbidden, + LSD_Reader::ChunkSaveVehicleLocation::overlap_forbidden, + "overlap_forbidden", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::animation_type, + LSD_Reader::ChunkSaveVehicleLocation::animation_type, + "animation_type", + 1, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::lock_facing, + LSD_Reader::ChunkSaveVehicleLocation::lock_facing, + "lock_facing", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::move_speed, + LSD_Reader::ChunkSaveVehicleLocation::move_speed, + "move_speed", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::move_route, + LSD_Reader::ChunkSaveVehicleLocation::move_route, + "move_route", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::move_route_overwrite, + LSD_Reader::ChunkSaveVehicleLocation::move_route_overwrite, + "move_route_overwrite", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::move_route_index, + LSD_Reader::ChunkSaveVehicleLocation::move_route_index, + "move_route_index", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::move_route_repeated, + LSD_Reader::ChunkSaveVehicleLocation::move_route_repeated, + "move_route_repeated", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::anim_paused, + LSD_Reader::ChunkSaveVehicleLocation::anim_paused, + "anim_paused", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::through, + LSD_Reader::ChunkSaveVehicleLocation::through, + "through", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::stop_count, + LSD_Reader::ChunkSaveVehicleLocation::stop_count, + "stop_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::anim_count, + LSD_Reader::ChunkSaveVehicleLocation::anim_count, + "anim_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::max_stop_count, + LSD_Reader::ChunkSaveVehicleLocation::max_stop_count, + "max_stop_count", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::jumping, + LSD_Reader::ChunkSaveVehicleLocation::jumping, + "jumping", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::begin_jump_x, + LSD_Reader::ChunkSaveVehicleLocation::begin_jump_x, + "begin_jump_x", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::begin_jump_y, + LSD_Reader::ChunkSaveVehicleLocation::begin_jump_y, + "begin_jump_y", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::pause, + LSD_Reader::ChunkSaveVehicleLocation::pause, + "pause", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::flying, + LSD_Reader::ChunkSaveVehicleLocation::flying, + "flying", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::sprite_name, + LSD_Reader::ChunkSaveVehicleLocation::sprite_name, + "sprite_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::sprite_id, + LSD_Reader::ChunkSaveVehicleLocation::sprite_id, + "sprite_id", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::processed, + LSD_Reader::ChunkSaveVehicleLocation::processed, + "processed", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::flash_red, + LSD_Reader::ChunkSaveVehicleLocation::flash_red, + "flash_red", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::flash_green, + LSD_Reader::ChunkSaveVehicleLocation::flash_green, + "flash_green", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::flash_blue, + LSD_Reader::ChunkSaveVehicleLocation::flash_blue, + "flash_blue", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::flash_current_level, + LSD_Reader::ChunkSaveVehicleLocation::flash_current_level, + "flash_current_level", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::flash_time_left, + LSD_Reader::ChunkSaveVehicleLocation::flash_time_left, + "flash_time_left", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::vehicle, + LSD_Reader::ChunkSaveVehicleLocation::vehicle, + "vehicle", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::original_move_route_index, + LSD_Reader::ChunkSaveVehicleLocation::original_move_route_index, + "original_move_route_index", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::remaining_ascent, + LSD_Reader::ChunkSaveVehicleLocation::remaining_ascent, + "remaining_ascent", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::remaining_descent, + LSD_Reader::ChunkSaveVehicleLocation::remaining_descent, + "remaining_descent", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::sprite2_name, + LSD_Reader::ChunkSaveVehicleLocation::sprite2_name, + "sprite2_name", + 0, + 0 + ), + new TypedField( + &RPG::SaveVehicleLocation::sprite2_id, + LSD_Reader::ChunkSaveVehicleLocation::sprite2_id, + "sprite2_id", + 0, + 0 + ), + NULL +}; diff --git a/src/reader_struct.h b/src/reader_struct.h index 3c38bdf1a..17e4dc690 100644 --- a/src/reader_struct.h +++ b/src/reader_struct.h @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include "reader_lcf.h" #include "writer_lcf.h" #include "reader_xml.h" @@ -799,61 +797,4 @@ class RootXmlHandler : public XmlHandler { }; -// Macros - -// needs define of -// - LCF_CHUNK_SUFFIX -// - LCF_CURRENT_STRUCT - -#define LCF_STRUCT_FIELDS_BEGIN() \ - template <> \ - char const* const Struct::name = BOOST_PP_STRINGIZE(LCF_CURRENT_STRUCT); \ - template <> \ - Field const* Struct::fields[] = { \ - -#define LCF_STRUCT_FIELDS_END() \ - NULL }; \ - -#define LCF_STRUCT_TYPED_FIELD(T, REF, PRESENTIFDEFAULT, IS2K3) \ - new TypedField( \ - &RPG::LCF_CURRENT_STRUCT::REF \ - , LCF_CHUNK_SUFFIX::BOOST_PP_CAT(Chunk, LCF_CURRENT_STRUCT)::REF \ - , BOOST_PP_STRINGIZE(REF) \ - , PRESENTIFDEFAULT \ - , IS2K3 \ - ) \ - -#define LCF_STRUCT_DATABASE_VERSION_FIELD(T, REF, PRESENTIFDEFAULT, IS2K3) \ - new DatabaseVersionField( \ - &RPG::LCF_CURRENT_STRUCT::REF \ - , LCF_CHUNK_SUFFIX::BOOST_PP_CAT(Chunk, LCF_CURRENT_STRUCT)::REF \ - , BOOST_PP_STRINGIZE(REF) \ - , PRESENTIFDEFAULT \ - , IS2K3 \ - ) \ - -#define LCF_STRUCT_EMPTY_FIELD(T, REF, PRESENTIFDEFAULT, IS2K3) \ - new EmptyField( \ - LCF_CHUNK_SUFFIX::BOOST_PP_CAT(Chunk, LCF_CURRENT_STRUCT)::REF \ - , BOOST_PP_STRINGIZE(REF) \ - , PRESENTIFDEFAULT \ - , IS2K3 \ - ) \ - -#define LCF_STRUCT_SIZE_FIELD(T, REF, PRESENTIFDEFAULT, IS2K3) \ - new SizeField( \ - &RPG::LCF_CURRENT_STRUCT::REF \ - , LCF_CHUNK_SUFFIX::BOOST_PP_CAT(Chunk, LCF_CURRENT_STRUCT)::BOOST_PP_CAT(REF, _size) \ - , PRESENTIFDEFAULT \ - , IS2K3 \ - ) \ - -#define LCF_STRUCT_COUNT_FIELD(T, REF, PRESENTIFDEFAULT, IS2K3) \ - new CountField( \ - &RPG::LCF_CURRENT_STRUCT::REF \ - , LCF_CHUNK_SUFFIX::BOOST_PP_CAT(Chunk, LCF_CURRENT_STRUCT)::BOOST_PP_CAT(REF, _size) \ - , PRESENTIFDEFAULT \ - , IS2K3 \ - ) \ - #endif