Skip to content

Commit 685580b

Browse files
committed
Flags: Initialise flags correctly when the Flag has a different name than the struct
oversight from the refactor Thanks @florianessl
1 parent df49a63 commit 685580b

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

generator/templates/rpg_header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ namespace rpg {
8888
std::array<bool, {{ field.type|flags_for|length }}> flags;
8989
};
9090
{{ field.type }}() noexcept
91-
{%- for flag in flags[struct_name] %}
91+
{%- for flag in field.type|flags_for %}
9292
{%- if loop.first %}:{%- else %},{%- endif %} {{ flag.field }}({{ field|flag_set(loop.index) }})
9393
{%- endfor %}
9494
{}

src/generated/lcf/rpg/saveeventexecframe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace rpg {
4646
};
4747
std::array<bool, 1> flags;
4848
};
49-
EasyRpgFrameRuntime_Flags() noexcept
49+
EasyRpgFrameRuntime_Flags() noexcept: reserved_1(false)
5050
{}
5151
} easyrpg_runtime_flags;
5252
};

src/generated/lcf/rpg/saveeventexecstate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ namespace rpg {
8080
};
8181
std::array<bool, 20> flags;
8282
};
83-
EasyRpgStateRuntime_Flags() noexcept
83+
EasyRpgStateRuntime_Flags() noexcept: conf_override_active(false), reserved_1(false), reserved_2(false), reserved_3(false), patch_destiny_on(false), patch_destiny_off(false), patch_dynrpg_on(false), patch_dynrpg_off(false), patch_maniac_on(false), patch_maniac_off(false), patch_common_this_event_on(false), patch_common_this_event_off(false), patch_unlock_pics_on(false), patch_unlock_pics_off(false), patch_keypatch_on(false), patch_keypatch_off(false), patch_rpg2k3_cmds_on(false), patch_rpg2k3_cmds_off(false), use_rpg2k_battle_system_on(false), use_rpg2k_battle_system_off(false)
8484
{}
8585
} easyrpg_runtime_flags;
8686
};

src/generated/lcf/rpg/savemapeventbase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ namespace rpg {
7878
};
7979
std::array<bool, 1> flags;
8080
};
81-
EasyRpgEventRuntime_Flags() noexcept
81+
EasyRpgEventRuntime_Flags() noexcept: reserved_1(false)
8282
{}
8383
} easyrpg_runtime_flags;
8484
};

0 commit comments

Comments
 (0)