diff --git a/generator/csv/enums_easyrpg.csv b/generator/csv/enums_easyrpg.csv index 67ae15a6..7f42c73c 100644 --- a/generator/csv/enums_easyrpg.csv +++ b/generator/csv/enums_easyrpg.csv @@ -1,4 +1,15 @@ Structure,Entry,Value,Index +EventCommand,Code,EasyRpg_TriggerEventAt,2002 +EventCommand,Code,EasyRpg_SmartMoveRoute,2003 +EventCommand,Code,EasyRpg_SmartStepToward,2004 +EventCommand,Code,EasyRpg_CallMovementAction,2050 +EventCommand,Code,EasyRpg_WaitForSingleMovement,2051 +EventCommand,Code,EasyRpg_AnimateVariable,2052 +EventCommand,Code,EasyRpg_SetInterpreterFlag,2053 +EventCommand,Code,EasyRpg_ProcessJson,2055 +EventCommand,Code,EasyRpg_CloneMapEvent,2056 +EventCommand,Code,EasyRpg_DestroyMapEvent,2057 +EventCommand,Code,EasyRpg_StringPictureMenu,2058 EventCommand,Code,Maniac_GetSaveInfo,3001 EventCommand,Code,Maniac_Save,3002 EventCommand,Code,Maniac_Load,3003 diff --git a/generator/csv/fields_easyrpg.csv b/generator/csv/fields_easyrpg.csv index 2b1b1f6e..e943ffba 100644 --- a/generator/csv/fields_easyrpg.csv +++ b/generator/csv/fields_easyrpg.csv @@ -8,6 +8,9 @@ SaveEventExecFrame,maniac_event_id,f,Int32,0x0F,0,0,0,Event ID SaveEventExecFrame,maniac_event_page_id,f,Int32,0x10,0,0,0,Page ID when it is a map event SaveEventExecFrame,maniac_loop_info_size,f,Int32,0x11,0,0,0,Amount of loop info groups SaveEventExecFrame,maniac_loop_info,f,Vector,0x12,,0,0,"One group of (Current loop count, end loop value) for each identation" +SaveEventExecState,easyrpg_active,f,Boolean,0xC9,False,0,0,When true state of an event is preserved in easyrpg_string and easyrpg_parameters +SaveEventExecState,easyrpg_string,f,DBString,0xCA,,0,0,Preserved string data of an event +SaveEventExecState,easyrpg_parameters,f,Vector,0xCB,,0,0,Preserved int parameter of an event SavePicture,easyrpg_flip,f,Enum,0xC8,0,0,1,How to flip the picture SavePicture,easyrpg_blend_mode,f,Int32,0xC9,0,0,1,Blend mode to use for blit. See Bitmap::BlendMode SavePicture,easyrpg_type,f,Enum,0xCA,0,0,1,Type of this picture @@ -27,6 +30,7 @@ SaveEasyRpgText,font_size,f,Int32,0x05,12,0,0,Font size SaveEasyRpgText,letter_spacing,f,Int32,0x06,0,0,0,Additional spacing between letters SaveEasyRpgText,line_spacing,f,Int32,0x07,4,0,0,Additional spacing between lines SaveEasyRpgText,flags,f,SaveEasyRpgText_Flags,0x08,3,0,0,Various text settings +SaveMapEventBase,easyrpg_move_failure_count,f,Int32,0xC9,0,0,0,Tracks how often the current move operation in a move route failed SaveSystem,maniac_strings,f,Vector,0x24,,0,0,rpg::Strings SaveSystem,maniac_frameskip,,Int32,0x88,0,0,0,"FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2)" SaveSystem,maniac_picture_limit,,Int32,0x89,0,0,0,FatalMix Picture Limit diff --git a/src/generated/lcf/lsd/chunks.h b/src/generated/lcf/lsd/chunks.h index 443aa2c1..0e7c53ef 100644 --- a/src/generated/lcf/lsd/chunks.h +++ b/src/generated/lcf/lsd/chunks.h @@ -408,6 +408,8 @@ namespace LSD_Reader { flash_current_level = 0x54, /** int */ flash_time_left = 0x55, + /** Tracks how often the current move operation in a move route failed */ + easyrpg_move_failure_count = 0xC9, /** */ boarding = 0x65, /** */ @@ -522,6 +524,8 @@ namespace LSD_Reader { flash_current_level = 0x54, /** int */ flash_time_left = 0x55, + /** Tracks how often the current move operation in a move route failed */ + easyrpg_move_failure_count = 0xC9, /** Which vehicle */ vehicle = 0x65, /** From 0 to 255 - In flying vehicles; remaining distance to ascend */ @@ -733,7 +737,13 @@ namespace LSD_Reader { /** */ keyinput_timed = 0x29, /** Used for a wait command WaitForKeyInput rm2k3 feature to wait for decision key press. */ - wait_key_enter = 0x2A + wait_key_enter = 0x2A, + /** When true state of an event is preserved in easyrpg_string and easyrpg_parameters */ + easyrpg_active = 0xC9, + /** Preserved string data of an event */ + easyrpg_string = 0xCA, + /** Preserved int parameter of an event */ + easyrpg_parameters = 0xCB }; }; struct ChunkSaveMapEventBase { @@ -815,7 +825,9 @@ namespace LSD_Reader { /** double */ flash_current_level = 0x54, /** int */ - flash_time_left = 0x55 + flash_time_left = 0x55, + /** Tracks how often the current move operation in a move route failed */ + easyrpg_move_failure_count = 0xC9 }; }; struct ChunkSaveMapEvent { @@ -898,6 +910,8 @@ namespace LSD_Reader { flash_current_level = 0x54, /** int */ flash_time_left = 0x55, + /** 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. */ waiting_execution = 0x65, /** Index of custom move route */ diff --git a/src/generated/lcf/rpg/eventcommand.h b/src/generated/lcf/rpg/eventcommand.h index f54c9f05..2ff1e08d 100644 --- a/src/generated/lcf/rpg/eventcommand.h +++ b/src/generated/lcf/rpg/eventcommand.h @@ -157,6 +157,17 @@ namespace rpg { Comment_2 = 22410, ElseBranch_B = 23310, EndBranch_B = 23311, + EasyRpg_TriggerEventAt = 2002, + EasyRpg_SmartMoveRoute = 2003, + EasyRpg_SmartStepToward = 2004, + EasyRpg_CallMovementAction = 2050, + EasyRpg_WaitForSingleMovement = 2051, + EasyRpg_AnimateVariable = 2052, + EasyRpg_SetInterpreterFlag = 2053, + EasyRpg_ProcessJson = 2055, + EasyRpg_CloneMapEvent = 2056, + EasyRpg_DestroyMapEvent = 2057, + EasyRpg_StringPictureMenu = 2058, Maniac_GetSaveInfo = 3001, Maniac_Save = 3002, Maniac_Load = 3003, @@ -313,6 +324,17 @@ namespace rpg { Code::Comment_2, "Comment_2", Code::ElseBranch_B, "ElseBranch_B", Code::EndBranch_B, "EndBranch_B", + Code::EasyRpg_TriggerEventAt, "EasyRpg_TriggerEventAt", + Code::EasyRpg_SmartMoveRoute, "EasyRpg_SmartMoveRoute", + Code::EasyRpg_SmartStepToward, "EasyRpg_SmartStepToward", + Code::EasyRpg_CallMovementAction, "EasyRpg_CallMovementAction", + Code::EasyRpg_WaitForSingleMovement, "EasyRpg_WaitForSingleMovement", + Code::EasyRpg_AnimateVariable, "EasyRpg_AnimateVariable", + Code::EasyRpg_SetInterpreterFlag, "EasyRpg_SetInterpreterFlag", + Code::EasyRpg_ProcessJson, "EasyRpg_ProcessJson", + Code::EasyRpg_CloneMapEvent, "EasyRpg_CloneMapEvent", + Code::EasyRpg_DestroyMapEvent, "EasyRpg_DestroyMapEvent", + Code::EasyRpg_StringPictureMenu, "EasyRpg_StringPictureMenu", Code::Maniac_GetSaveInfo, "Maniac_GetSaveInfo", Code::Maniac_Save, "Maniac_Save", Code::Maniac_Load, "Maniac_Load", diff --git a/src/generated/lcf/rpg/saveeventexecstate.h b/src/generated/lcf/rpg/saveeventexecstate.h index 607ef3f9..d49d0104 100644 --- a/src/generated/lcf/rpg/saveeventexecstate.h +++ b/src/generated/lcf/rpg/saveeventexecstate.h @@ -15,6 +15,7 @@ // Headers #include #include +#include "lcf/dbstring.h" #include "lcf/rpg/saveeventexecframe.h" #include "lcf/context.h" #include @@ -49,6 +50,9 @@ namespace rpg { int32_t keyinput_2k3up = 0; bool keyinput_timed = false; bool wait_key_enter = false; + bool easyrpg_active = false; + DBString easyrpg_string; + std::vector easyrpg_parameters; }; inline bool operator==(const SaveEventExecState& l, const SaveEventExecState& r) { @@ -73,7 +77,10 @@ namespace rpg { && l.keyinput_2k3right == r.keyinput_2k3right && l.keyinput_2k3up == r.keyinput_2k3up && l.keyinput_timed == r.keyinput_timed - && l.wait_key_enter == r.wait_key_enter; + && l.wait_key_enter == r.wait_key_enter + && l.easyrpg_active == r.easyrpg_active + && l.easyrpg_string == r.easyrpg_string + && l.easyrpg_parameters == r.easyrpg_parameters; } inline bool operator!=(const SaveEventExecState& l, const SaveEventExecState& r) { @@ -88,6 +95,8 @@ namespace rpg { const auto ctx1 = Context{ "stack", i, &obj, parent_ctx }; ForEachString(obj.stack[i], f, &ctx1); } + const auto ctx24 = Context{ "easyrpg_string", -1, &obj, parent_ctx }; + f(obj.easyrpg_string, ctx24); (void)obj; (void)f; (void)parent_ctx; diff --git a/src/generated/lcf/rpg/savemapeventbase.h b/src/generated/lcf/rpg/savemapeventbase.h index 0c773eb2..6bff9dce 100644 --- a/src/generated/lcf/rpg/savemapeventbase.h +++ b/src/generated/lcf/rpg/savemapeventbase.h @@ -67,6 +67,7 @@ namespace rpg { int32_t flash_blue = -1; double flash_current_level = 0.0; int32_t flash_time_left = 0; + int32_t easyrpg_move_failure_count = 0; }; inline bool operator==(const SaveMapEventBase& l, const SaveMapEventBase& r) { @@ -108,7 +109,8 @@ namespace rpg { && l.flash_green == r.flash_green && l.flash_blue == r.flash_blue && l.flash_current_level == r.flash_current_level - && l.flash_time_left == r.flash_time_left; + && l.flash_time_left == r.flash_time_left + && l.easyrpg_move_failure_count == r.easyrpg_move_failure_count; } inline bool operator!=(const SaveMapEventBase& l, const SaveMapEventBase& r) { diff --git a/src/generated/lsd_saveeventexecstate.cpp b/src/generated/lsd_saveeventexecstate.cpp index 9d542982..e8f68469 100644 --- a/src/generated/lsd_saveeventexecstate.cpp +++ b/src/generated/lsd_saveeventexecstate.cpp @@ -174,6 +174,27 @@ static TypedField static_wait_key_enter( 0, 0 ); +static TypedField static_easyrpg_active( + &rpg::SaveEventExecState::easyrpg_active, + LSD_Reader::ChunkSaveEventExecState::easyrpg_active, + "easyrpg_active", + 0, + 0 +); +static TypedField static_easyrpg_string( + &rpg::SaveEventExecState::easyrpg_string, + LSD_Reader::ChunkSaveEventExecState::easyrpg_string, + "easyrpg_string", + 0, + 0 +); +static TypedField> static_easyrpg_parameters( + &rpg::SaveEventExecState::easyrpg_parameters, + LSD_Reader::ChunkSaveEventExecState::easyrpg_parameters, + "easyrpg_parameters", + 0, + 0 +); template <> @@ -200,6 +221,9 @@ Field const* Struct::fields[] &static_keyinput_2k3up, &static_keyinput_timed, &static_wait_key_enter, + &static_easyrpg_active, + &static_easyrpg_string, + &static_easyrpg_parameters, NULL }; diff --git a/src/generated/lsd_savemapevent.cpp b/src/generated/lsd_savemapevent.cpp index 541afa1e..bf14bf83 100644 --- a/src/generated/lsd_savemapevent.cpp +++ b/src/generated/lsd_savemapevent.cpp @@ -293,6 +293,13 @@ static TypedField static_flash_time_left( 0, 0 ); +static TypedField static_easyrpg_move_failure_count( + &rpg::SaveMapEvent::easyrpg_move_failure_count, + LSD_Reader::ChunkSaveMapEvent::easyrpg_move_failure_count, + "easyrpg_move_failure_count", + 0, + 0 +); static TypedField static_waiting_execution( &rpg::SaveMapEvent::waiting_execution, LSD_Reader::ChunkSaveMapEvent::waiting_execution, @@ -364,6 +371,7 @@ Field const* Struct::fields[] = { &static_flash_blue, &static_flash_current_level, &static_flash_time_left, + &static_easyrpg_move_failure_count, &static_waiting_execution, &static_original_move_route_index, &static_triggered_by_decision_key, diff --git a/src/generated/lsd_savemapeventbase.cpp b/src/generated/lsd_savemapeventbase.cpp index 1796177b..db8e6080 100644 --- a/src/generated/lsd_savemapeventbase.cpp +++ b/src/generated/lsd_savemapeventbase.cpp @@ -293,6 +293,13 @@ static TypedField static_flash_time_left( 0, 0 ); +static TypedField static_easyrpg_move_failure_count( + &rpg::SaveMapEventBase::easyrpg_move_failure_count, + LSD_Reader::ChunkSaveMapEventBase::easyrpg_move_failure_count, + "easyrpg_move_failure_count", + 0, + 0 +); template <> @@ -336,6 +343,7 @@ Field const* Struct::fields[] = { &static_flash_blue, &static_flash_current_level, &static_flash_time_left, + &static_easyrpg_move_failure_count, NULL }; diff --git a/src/generated/lsd_savepartylocation.cpp b/src/generated/lsd_savepartylocation.cpp index fd8d572b..b2af5410 100644 --- a/src/generated/lsd_savepartylocation.cpp +++ b/src/generated/lsd_savepartylocation.cpp @@ -293,6 +293,13 @@ static TypedField static_flash_time_left( 0, 0 ); +static TypedField static_easyrpg_move_failure_count( + &rpg::SavePartyLocation::easyrpg_move_failure_count, + LSD_Reader::ChunkSavePartyLocation::easyrpg_move_failure_count, + "easyrpg_move_failure_count", + 0, + 0 +); static TypedField static_boarding( &rpg::SavePartyLocation::boarding, LSD_Reader::ChunkSavePartyLocation::boarding, @@ -448,6 +455,7 @@ Field const* Struct::fields[] = &static_flash_blue, &static_flash_current_level, &static_flash_time_left, + &static_easyrpg_move_failure_count, &static_boarding, &static_aboard, &static_vehicle, diff --git a/src/generated/lsd_savevehiclelocation.cpp b/src/generated/lsd_savevehiclelocation.cpp index 88d19274..9868b82e 100644 --- a/src/generated/lsd_savevehiclelocation.cpp +++ b/src/generated/lsd_savevehiclelocation.cpp @@ -293,6 +293,13 @@ static TypedField static_flash_time_left( 0, 0 ); +static TypedField static_easyrpg_move_failure_count( + &rpg::SaveVehicleLocation::easyrpg_move_failure_count, + LSD_Reader::ChunkSaveVehicleLocation::easyrpg_move_failure_count, + "easyrpg_move_failure_count", + 0, + 0 +); static TypedField static_vehicle( &rpg::SaveVehicleLocation::vehicle, LSD_Reader::ChunkSaveVehicleLocation::vehicle, @@ -371,6 +378,7 @@ Field const* Struct::fields[ &static_flash_blue, &static_flash_current_level, &static_flash_time_left, + &static_easyrpg_move_failure_count, &static_vehicle, &static_remaining_ascent, &static_remaining_descent, diff --git a/src/generated/rpg_saveeventexecstate.cpp b/src/generated/rpg_saveeventexecstate.cpp index b81be624..4c58ae4b 100644 --- a/src/generated/rpg_saveeventexecstate.cpp +++ b/src/generated/rpg_saveeventexecstate.cpp @@ -43,6 +43,13 @@ 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_active="<< obj.easyrpg_active; + os << ", easyrpg_string="<< obj.easyrpg_string; + os << ", easyrpg_parameters="; + for (size_t i = 0; i < obj.easyrpg_parameters.size(); ++i) { + os << (i == 0 ? "[" : ", ") << obj.easyrpg_parameters[i]; + } + os << "]"; os << "}"; return os; } diff --git a/src/generated/rpg_savemapeventbase.cpp b/src/generated/rpg_savemapeventbase.cpp index 3906e2c1..03b76554 100644 --- a/src/generated/rpg_savemapeventbase.cpp +++ b/src/generated/rpg_savemapeventbase.cpp @@ -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_move_failure_count="<< obj.easyrpg_move_failure_count; os << "}"; return os; }