Fix sized fields being written twice bug
Any chunks with size or count fields were being written twice.
MODIFY
generator/templates/reader.tmpl
generator/templates/reader.tmpl
@@ -41,7 +41,7 @@ static {{ field|lcf_type }}Field<RPG::{{ LCF_CURRENT_STRUCT }}, {{ field.type|cp
template <>
Field<RPG::{{ LCF_CURRENT_STRUCT }}> const* Struct<RPG::{{ LCF_CURRENT_STRUCT }}>::fields[] = {
{%- for field in fields[struct_base]|field_is_written|list + fields[struct_name]|field_is_written|list %}
- {%- if field|lcf_type in ["Typed", "DatabaseVersion", "Empty", "Size", "Count"] %}
+ {%- if field|lcf_type in ["Typed", "DatabaseVersion", "Empty"] %}
&static_{{ field.name }},
{%- elif field|lcf_type in ["Size", "Count"] %}
&static_size_{{ field.name }},

MODIFY
src/generated/ldb_actor.cpp
src/generated/ldb_actor.cpp
Binary files a/src/generated/ldb_actor.cpp and b/src/generated/ldb_actor.cpp differ

MODIFY
src/generated/ldb_class.cpp
src/generated/ldb_class.cpp
Binary files a/src/generated/ldb_class.cpp and b/src/generated/ldb_class.cpp differ

MODIFY
src/generated/ldb_commonevent.cpp
src/generated/ldb_commonevent.cpp
Binary files a/src/generated/ldb_commonevent.cpp and b/src/generated/ldb_commonevent.cpp differ

MODIFY
src/generated/ldb_enemy.cpp
src/generated/ldb_enemy.cpp
Binary files a/src/generated/ldb_enemy.cpp and b/src/generated/ldb_enemy.cpp differ

MODIFY
src/generated/ldb_item.cpp
src/generated/ldb_item.cpp
Binary files a/src/generated/ldb_item.cpp and b/src/generated/ldb_item.cpp differ

MODIFY
src/generated/ldb_skill.cpp
src/generated/ldb_skill.cpp
Binary files a/src/generated/ldb_skill.cpp and b/src/generated/ldb_skill.cpp differ

MODIFY
src/generated/ldb_system.cpp
src/generated/ldb_system.cpp
Binary files a/src/generated/ldb_system.cpp and b/src/generated/ldb_system.cpp differ

MODIFY
src/generated/ldb_troop.cpp
src/generated/ldb_troop.cpp
Binary files a/src/generated/ldb_troop.cpp and b/src/generated/ldb_troop.cpp differ

MODIFY
src/generated/ldb_trooppage.cpp
src/generated/ldb_trooppage.cpp
Binary files a/src/generated/ldb_trooppage.cpp and b/src/generated/ldb_trooppage.cpp differ

MODIFY
src/generated/lmu_eventpage.cpp
src/generated/lmu_eventpage.cpp
Binary files a/src/generated/lmu_eventpage.cpp and b/src/generated/lmu_eventpage.cpp differ

MODIFY
src/generated/lmu_moveroute.cpp
src/generated/lmu_moveroute.cpp
Binary files a/src/generated/lmu_moveroute.cpp and b/src/generated/lmu_moveroute.cpp differ

MODIFY
src/generated/lsd_saveactor.cpp
src/generated/lsd_saveactor.cpp
Binary files a/src/generated/lsd_saveactor.cpp and b/src/generated/lsd_saveactor.cpp differ

MODIFY
src/generated/lsd_saveeventexecframe.cpp
src/generated/lsd_saveeventexecframe.cpp
Binary files a/src/generated/lsd_saveeventexecframe.cpp and b/src/generated/lsd_saveeventexecframe.cpp differ

MODIFY
src/generated/lsd_saveinventory.cpp
src/generated/lsd_saveinventory.cpp
Binary files a/src/generated/lsd_saveinventory.cpp and b/src/generated/lsd_saveinventory.cpp differ

MODIFY
src/generated/lsd_savesystem.cpp
src/generated/lsd_savesystem.cpp
Binary files a/src/generated/lsd_savesystem.cpp and b/src/generated/lsd_savesystem.cpp differ

Fix sized fields being written twice bug

Any chunks with size or count fields were being written twice.