Skip to content

Commit

Permalink
Committing generated code for new "easyrpg_runtime_flags" fields & th…
Browse files Browse the repository at this point in the history
…e corresponding enumeration
  • Loading branch information
florianessl committed Jan 24, 2025
1 parent d70a100 commit 1f2e686
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 4 deletions.
14 changes: 13 additions & 1 deletion src/generated/lcf/lsd/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** */
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** */
Expand Down Expand Up @@ -528,6 +530,8 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** */
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** Which vehicle */
Expand Down Expand Up @@ -693,7 +697,9 @@ namespace LSD_Reader {
/** Amount of loop info groups */
maniac_loop_info_size = 0x11,
/** One group of (Current loop count, end loop value) for each identation */
maniac_loop_info = 0x12
maniac_loop_info = 0x12,
/** */
easyrpg_runtime_flags = 0xC8
};
};
struct ChunkSaveEventExecState {
Expand Down Expand Up @@ -742,6 +748,8 @@ namespace LSD_Reader {
keyinput_timed = 0x29,
/** Used for a wait command WaitForKeyInput rm2k3 feature to wait for decision key press. */
wait_key_enter = 0x2A,
/** */
easyrpg_runtime_flags = 0xC8,
/** When true state of an event is preserved in easyrpg_string and easyrpg_parameters */
easyrpg_active = 0xC9,
/** Preserved string data of an event */
Expand Down Expand Up @@ -830,6 +838,8 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** */
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9
};
Expand Down Expand Up @@ -914,6 +924,8 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** */
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** If true; this event is waiting for foreground execution. */
Expand Down
4 changes: 3 additions & 1 deletion src/generated/lcf/rpg/saveeventexecframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ namespace rpg {
int32_t maniac_event_page_id = 0;
int32_t maniac_loop_info_size = 0;
std::vector<int32_t> maniac_loop_info;
uint32_t easyrpg_runtime_flags = 0;
};

inline bool operator==(const SaveEventExecFrame& l, const SaveEventExecFrame& r) {
Expand All @@ -50,7 +51,8 @@ namespace rpg {
&& l.maniac_event_id == r.maniac_event_id
&& l.maniac_event_page_id == r.maniac_event_page_id
&& l.maniac_loop_info_size == r.maniac_loop_info_size
&& l.maniac_loop_info == r.maniac_loop_info;
&& l.maniac_loop_info == r.maniac_loop_info
&& l.easyrpg_runtime_flags == r.easyrpg_runtime_flags;
}

inline bool operator!=(const SaveEventExecFrame& l, const SaveEventExecFrame& r) {
Expand Down
49 changes: 47 additions & 2 deletions src/generated/lcf/rpg/saveeventexecstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,45 @@ namespace lcf {
namespace rpg {
class SaveEventExecState {
public:
enum class RuntimeFlags {
conf_override_active = 0x01,
patch_destiny_on = 0x10,
patch_destiny_off = 0x20,
patch_dynrpg_on = 0x40,
patch_dynrpg_off = 0x80,
patch_maniac_on = 0x100,
patch_maniac_of = 0x200,
patch_common_this_event_on = 0x400,
patch_common_this_event_off = 0x800,
patch_unlock_pics_on = 0x1000,
patch_unlock_pics_off = 0x2000,
patch_keypatch_on = 0x4000,
patch_keypatch_off = 0x8000,
patch_rpg2k3_cmds_on = 0x10000,
patch_rpg2k3_cmds_off = 0x20000,
use_rpg2k_battle_system_on = 0x40000,
use_rpg2k_battle_system_off = 0x80000
};
static constexpr auto kRuntimeFlagsTags = lcf::EnumTags{
RuntimeFlags::conf_override_active, "conf_override_active",
RuntimeFlags::patch_destiny_on, "patch_destiny_on",
RuntimeFlags::patch_destiny_off, "patch_destiny_off",
RuntimeFlags::patch_dynrpg_on, "patch_dynrpg_on",
RuntimeFlags::patch_dynrpg_off, "patch_dynrpg_off",
RuntimeFlags::patch_maniac_on, "patch_maniac_on",
RuntimeFlags::patch_maniac_of, "patch_maniac_of",
RuntimeFlags::patch_common_this_event_on, "patch_common_this_event_on",
RuntimeFlags::patch_common_this_event_off, "patch_common_this_event_off",
RuntimeFlags::patch_unlock_pics_on, "patch_unlock_pics_on",
RuntimeFlags::patch_unlock_pics_off, "patch_unlock_pics_off",
RuntimeFlags::patch_keypatch_on, "patch_keypatch_on",
RuntimeFlags::patch_keypatch_off, "patch_keypatch_off",
RuntimeFlags::patch_rpg2k3_cmds_on, "patch_rpg2k3_cmds_on",
RuntimeFlags::patch_rpg2k3_cmds_off, "patch_rpg2k3_cmds_off",
RuntimeFlags::use_rpg2k_battle_system_on, "use_rpg2k_battle_system_on",
RuntimeFlags::use_rpg2k_battle_system_off, "use_rpg2k_battle_system_off"
};

std::vector<SaveEventExecFrame> stack;
bool show_message = false;
bool abort_on_escape = false;
Expand All @@ -50,10 +89,15 @@ namespace rpg {
int32_t keyinput_2k3up = 0;
bool keyinput_timed = false;
bool wait_key_enter = false;
uint32_t easyrpg_runtime_flags = 0;
bool easyrpg_active = false;
DBString easyrpg_string;
std::vector<int32_t> easyrpg_parameters;
};
inline std::ostream& operator<<(std::ostream& os, SaveEventExecState::RuntimeFlags code) {
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
return os;
}

inline bool operator==(const SaveEventExecState& l, const SaveEventExecState& r) {
return l.stack == r.stack
Expand All @@ -78,6 +122,7 @@ namespace rpg {
&& l.keyinput_2k3up == r.keyinput_2k3up
&& l.keyinput_timed == r.keyinput_timed
&& l.wait_key_enter == r.wait_key_enter
&& l.easyrpg_runtime_flags == r.easyrpg_runtime_flags
&& l.easyrpg_active == r.easyrpg_active
&& l.easyrpg_string == r.easyrpg_string
&& l.easyrpg_parameters == r.easyrpg_parameters;
Expand All @@ -95,8 +140,8 @@ namespace rpg {
const auto ctx1 = Context<SaveEventExecState, ParentCtx>{ "stack", i, &obj, parent_ctx };
ForEachString(obj.stack[i], f, &ctx1);
}
const auto ctx24 = Context<SaveEventExecState, ParentCtx>{ "easyrpg_string", -1, &obj, parent_ctx };
f(obj.easyrpg_string, ctx24);
const auto ctx25 = Context<SaveEventExecState, ParentCtx>{ "easyrpg_string", -1, &obj, parent_ctx };
f(obj.easyrpg_string, ctx25);
(void)obj;
(void)f;
(void)parent_ctx;
Expand Down
2 changes: 2 additions & 0 deletions src/generated/lcf/rpg/savemapeventbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace rpg {
int32_t flash_blue = -1;
double flash_current_level = 0.0;
int32_t flash_time_left = 0;
uint32_t easyrpg_runtime_flags = 0;
int32_t easyrpg_move_failure_count = 0;
};

Expand Down Expand Up @@ -110,6 +111,7 @@ namespace rpg {
&& l.flash_blue == r.flash_blue
&& l.flash_current_level == r.flash_current_level
&& l.flash_time_left == r.flash_time_left
&& l.easyrpg_runtime_flags == r.easyrpg_runtime_flags
&& l.easyrpg_move_failure_count == r.easyrpg_move_failure_count;
}

Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_saveeventexecframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ static TypedField<rpg::SaveEventExecFrame, std::vector<int32_t>> static_maniac_l
0,
0
);
static TypedField<rpg::SaveEventExecFrame, uint32_t> static_easyrpg_runtime_flags(
&rpg::SaveEventExecFrame::easyrpg_runtime_flags,
LSD_Reader::ChunkSaveEventExecFrame::easyrpg_runtime_flags,
"easyrpg_runtime_flags",
0,
0
);


template <>
Expand All @@ -118,6 +125,7 @@ Field<rpg::SaveEventExecFrame> const* Struct<rpg::SaveEventExecFrame>::fields[]
&static_maniac_event_page_id,
&static_maniac_loop_info_size,
&static_maniac_loop_info,
&static_easyrpg_runtime_flags,
NULL
};

Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_saveeventexecstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ static TypedField<rpg::SaveEventExecState, bool> static_wait_key_enter(
0,
0
);
static TypedField<rpg::SaveEventExecState, uint32_t> static_easyrpg_runtime_flags(
&rpg::SaveEventExecState::easyrpg_runtime_flags,
LSD_Reader::ChunkSaveEventExecState::easyrpg_runtime_flags,
"easyrpg_runtime_flags",
0,
0
);
static TypedField<rpg::SaveEventExecState, bool> static_easyrpg_active(
&rpg::SaveEventExecState::easyrpg_active,
LSD_Reader::ChunkSaveEventExecState::easyrpg_active,
Expand Down Expand Up @@ -221,6 +228,7 @@ Field<rpg::SaveEventExecState> const* Struct<rpg::SaveEventExecState>::fields[]
&static_keyinput_2k3up,
&static_keyinput_timed,
&static_wait_key_enter,
&static_easyrpg_runtime_flags,
&static_easyrpg_active,
&static_easyrpg_string,
&static_easyrpg_parameters,
Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savemapevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SaveMapEvent, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SaveMapEvent, uint32_t> static_easyrpg_runtime_flags(
&rpg::SaveMapEvent::easyrpg_runtime_flags,
LSD_Reader::ChunkSaveMapEvent::easyrpg_runtime_flags,
"easyrpg_runtime_flags",
0,
0
);
static TypedField<rpg::SaveMapEvent, int32_t> static_easyrpg_move_failure_count(
&rpg::SaveMapEvent::easyrpg_move_failure_count,
LSD_Reader::ChunkSaveMapEvent::easyrpg_move_failure_count,
Expand Down Expand Up @@ -371,6 +378,7 @@ Field<rpg::SaveMapEvent> const* Struct<rpg::SaveMapEvent>::fields[] = {
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
&static_waiting_execution,
&static_original_move_route_index,
Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savemapeventbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SaveMapEventBase, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SaveMapEventBase, uint32_t> static_easyrpg_runtime_flags(
&rpg::SaveMapEventBase::easyrpg_runtime_flags,
LSD_Reader::ChunkSaveMapEventBase::easyrpg_runtime_flags,
"easyrpg_runtime_flags",
0,
0
);
static TypedField<rpg::SaveMapEventBase, int32_t> static_easyrpg_move_failure_count(
&rpg::SaveMapEventBase::easyrpg_move_failure_count,
LSD_Reader::ChunkSaveMapEventBase::easyrpg_move_failure_count,
Expand Down Expand Up @@ -343,6 +350,7 @@ Field<rpg::SaveMapEventBase> const* Struct<rpg::SaveMapEventBase>::fields[] = {
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
NULL
};
Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savepartylocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SavePartyLocation, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SavePartyLocation, uint32_t> static_easyrpg_runtime_flags(
&rpg::SavePartyLocation::easyrpg_runtime_flags,
LSD_Reader::ChunkSavePartyLocation::easyrpg_runtime_flags,
"easyrpg_runtime_flags",
0,
0
);
static TypedField<rpg::SavePartyLocation, int32_t> static_easyrpg_move_failure_count(
&rpg::SavePartyLocation::easyrpg_move_failure_count,
LSD_Reader::ChunkSavePartyLocation::easyrpg_move_failure_count,
Expand Down Expand Up @@ -469,6 +476,7 @@ Field<rpg::SavePartyLocation> const* Struct<rpg::SavePartyLocation>::fields[] =
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
&static_boarding,
&static_aboard,
Expand Down
8 changes: 8 additions & 0 deletions src/generated/lsd_savevehiclelocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ static TypedField<rpg::SaveVehicleLocation, int32_t> static_flash_time_left(
0,
0
);
static TypedField<rpg::SaveVehicleLocation, uint32_t> static_easyrpg_runtime_flags(
&rpg::SaveVehicleLocation::easyrpg_runtime_flags,
LSD_Reader::ChunkSaveVehicleLocation::easyrpg_runtime_flags,
"easyrpg_runtime_flags",
0,
0
);
static TypedField<rpg::SaveVehicleLocation, int32_t> static_easyrpg_move_failure_count(
&rpg::SaveVehicleLocation::easyrpg_move_failure_count,
LSD_Reader::ChunkSaveVehicleLocation::easyrpg_move_failure_count,
Expand Down Expand Up @@ -378,6 +385,7 @@ Field<rpg::SaveVehicleLocation> const* Struct<rpg::SaveVehicleLocation>::fields[
&static_flash_blue,
&static_flash_current_level,
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
&static_vehicle,
&static_remaining_ascent,
Expand Down
1 change: 1 addition & 0 deletions src/generated/rpg_saveeventexecframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ std::ostream& operator<<(std::ostream& os, const SaveEventExecFrame& obj) {
os << (i == 0 ? "[" : ", ") << obj.maniac_loop_info[i];
}
os << "]";
os << ", easyrpg_runtime_flags="<< obj.easyrpg_runtime_flags;
os << "}";
return os;
}
Expand Down
1 change: 1 addition & 0 deletions src/generated/rpg_saveeventexecstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ std::ostream& operator<<(std::ostream& os, const SaveEventExecState& obj) {
os << ", keyinput_2k3up="<< obj.keyinput_2k3up;
os << ", keyinput_timed="<< obj.keyinput_timed;
os << ", wait_key_enter="<< obj.wait_key_enter;
os << ", easyrpg_runtime_flags="<< obj.easyrpg_runtime_flags;
os << ", easyrpg_active="<< obj.easyrpg_active;
os << ", easyrpg_string="<< obj.easyrpg_string;
os << ", easyrpg_parameters=";
Expand Down
1 change: 1 addition & 0 deletions src/generated/rpg_savemapeventbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ std::ostream& operator<<(std::ostream& os, const SaveMapEventBase& obj) {
os << ", flash_blue="<< obj.flash_blue;
os << ", flash_current_level="<< obj.flash_current_level;
os << ", flash_time_left="<< obj.flash_time_left;
os << ", easyrpg_runtime_flags="<< obj.easyrpg_runtime_flags;
os << ", easyrpg_move_failure_count="<< obj.easyrpg_move_failure_count;
os << "}";
return os;
Expand Down

0 comments on commit 1f2e686

Please sign in to comment.