Skip to content

Commit

Permalink
Add new field "easyrpg_clone_map_id" to determine if an event has bee…
Browse files Browse the repository at this point in the history
…n created by EasyRPGs new "CloneMapEvent" command
  • Loading branch information
florianessl committed Feb 4, 2025
1 parent 1f2e686 commit 3a27d9a
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions generator/csv/fields_easyrpg.csv
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ 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_runtime_flags,f,UInt32,0xC8,0,0,0,
SaveMapEventBase,easyrpg_move_failure_count,f,Int32,0xC9,0,0,0,Tracks how often the current move operation in a move route failed
SaveMapEventBase,easyrpg_clone_map_id,f,UInt32,0xCA,0,0,0,The original map id of a cloned event
SavePartyLocation,maniac_horizontal_pan_speed,f,Double,0x8D,0,0,0,horizontal speed in the scrolls of the screen
SavePartyLocation,maniac_vertical_pan_speed,f,Double,0x8E,0,0,0,vertical speed in the scrolls of the screen
SaveSystem,maniac_strings,f,Vector<DBString>,0x24,,0,0,rpg::Strings
Expand Down
10 changes: 9 additions & 1 deletion src/generated/lcf/lsd/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ namespace LSD_Reader {
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** The original map id of a cloned event */
easyrpg_clone_map_id = 0xCA,
/** */
boarding = 0x65,
/** */
Expand Down Expand Up @@ -534,6 +536,8 @@ namespace LSD_Reader {
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** The original map id of a cloned event */
easyrpg_clone_map_id = 0xCA,
/** Which vehicle */
vehicle = 0x65,
/** From 0 to 255 - In flying vehicles; remaining distance to ascend */
Expand Down Expand Up @@ -841,7 +845,9 @@ namespace LSD_Reader {
/** */
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9
easyrpg_move_failure_count = 0xC9,
/** The original map id of a cloned event */
easyrpg_clone_map_id = 0xCA
};
};
struct ChunkSaveMapEvent {
Expand Down Expand Up @@ -928,6 +934,8 @@ namespace LSD_Reader {
easyrpg_runtime_flags = 0xC8,
/** Tracks how often the current move operation in a move route failed */
easyrpg_move_failure_count = 0xC9,
/** The original map id of a cloned event */
easyrpg_clone_map_id = 0xCA,
/** If true; this event is waiting for foreground execution. */
waiting_execution = 0x65,
/** Index of custom move route */
Expand Down
4 changes: 3 additions & 1 deletion src/generated/lcf/rpg/savemapeventbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ namespace rpg {
int32_t flash_time_left = 0;
uint32_t easyrpg_runtime_flags = 0;
int32_t easyrpg_move_failure_count = 0;
uint32_t easyrpg_clone_map_id = 0;
};

inline bool operator==(const SaveMapEventBase& l, const SaveMapEventBase& r) {
Expand Down Expand Up @@ -112,7 +113,8 @@ namespace rpg {
&& 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;
&& l.easyrpg_move_failure_count == r.easyrpg_move_failure_count
&& l.easyrpg_clone_map_id == r.easyrpg_clone_map_id;
}

inline bool operator!=(const SaveMapEventBase& l, const SaveMapEventBase& r) {
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 @@ -307,6 +307,13 @@ static TypedField<rpg::SaveMapEvent, int32_t> static_easyrpg_move_failure_count(
0,
0
);
static TypedField<rpg::SaveMapEvent, uint32_t> static_easyrpg_clone_map_id(
&rpg::SaveMapEvent::easyrpg_clone_map_id,
LSD_Reader::ChunkSaveMapEvent::easyrpg_clone_map_id,
"easyrpg_clone_map_id",
0,
0
);
static TypedField<rpg::SaveMapEvent, bool> static_waiting_execution(
&rpg::SaveMapEvent::waiting_execution,
LSD_Reader::ChunkSaveMapEvent::waiting_execution,
Expand Down Expand Up @@ -380,6 +387,7 @@ Field<rpg::SaveMapEvent> const* Struct<rpg::SaveMapEvent>::fields[] = {
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
&static_easyrpg_clone_map_id,
&static_waiting_execution,
&static_original_move_route_index,
&static_triggered_by_decision_key,
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 @@ -307,6 +307,13 @@ static TypedField<rpg::SaveMapEventBase, int32_t> static_easyrpg_move_failure_co
0,
0
);
static TypedField<rpg::SaveMapEventBase, uint32_t> static_easyrpg_clone_map_id(
&rpg::SaveMapEventBase::easyrpg_clone_map_id,
LSD_Reader::ChunkSaveMapEventBase::easyrpg_clone_map_id,
"easyrpg_clone_map_id",
0,
0
);


template <>
Expand Down Expand Up @@ -352,6 +359,7 @@ Field<rpg::SaveMapEventBase> const* Struct<rpg::SaveMapEventBase>::fields[] = {
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
&static_easyrpg_clone_map_id,
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 @@ -307,6 +307,13 @@ static TypedField<rpg::SavePartyLocation, int32_t> static_easyrpg_move_failure_c
0,
0
);
static TypedField<rpg::SavePartyLocation, uint32_t> static_easyrpg_clone_map_id(
&rpg::SavePartyLocation::easyrpg_clone_map_id,
LSD_Reader::ChunkSavePartyLocation::easyrpg_clone_map_id,
"easyrpg_clone_map_id",
0,
0
);
static TypedField<rpg::SavePartyLocation, bool> static_boarding(
&rpg::SavePartyLocation::boarding,
LSD_Reader::ChunkSavePartyLocation::boarding,
Expand Down Expand Up @@ -478,6 +485,7 @@ Field<rpg::SavePartyLocation> const* Struct<rpg::SavePartyLocation>::fields[] =
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
&static_easyrpg_clone_map_id,
&static_boarding,
&static_aboard,
&static_vehicle,
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 @@ -307,6 +307,13 @@ static TypedField<rpg::SaveVehicleLocation, int32_t> static_easyrpg_move_failure
0,
0
);
static TypedField<rpg::SaveVehicleLocation, uint32_t> static_easyrpg_clone_map_id(
&rpg::SaveVehicleLocation::easyrpg_clone_map_id,
LSD_Reader::ChunkSaveVehicleLocation::easyrpg_clone_map_id,
"easyrpg_clone_map_id",
0,
0
);
static TypedField<rpg::SaveVehicleLocation, int32_t> static_vehicle(
&rpg::SaveVehicleLocation::vehicle,
LSD_Reader::ChunkSaveVehicleLocation::vehicle,
Expand Down Expand Up @@ -387,6 +394,7 @@ Field<rpg::SaveVehicleLocation> const* Struct<rpg::SaveVehicleLocation>::fields[
&static_flash_time_left,
&static_easyrpg_runtime_flags,
&static_easyrpg_move_failure_count,
&static_easyrpg_clone_map_id,
&static_vehicle,
&static_remaining_ascent,
&static_remaining_descent,
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 @@ -58,6 +58,7 @@ std::ostream& operator<<(std::ostream& os, const SaveMapEventBase& obj) {
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 << ", easyrpg_clone_map_id="<< obj.easyrpg_clone_map_id;
os << "}";
return os;
}
Expand Down

0 comments on commit 3a27d9a

Please sign in to comment.