Skip to content

Commit 9dc943b

Browse files
committed
Adding separate camera pan speeds from Maniac Patch
Maniac Patch has a was for scrolling screen with pixel precision. It uses two doubles, stored inside SavePartyLocation at 0x8D and 0x8E respectively.
1 parent 54dff22 commit 9dc943b

File tree

5 files changed

+30
-2
lines changed

5 files changed

+30
-2
lines changed

generator/csv/fields_easyrpg.csv

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ SaveEasyRpgText,font_size,f,Int32,0x05,12,0,0,Font size
2727
SaveEasyRpgText,letter_spacing,f,Int32,0x06,0,0,0,Additional spacing between letters
2828
SaveEasyRpgText,line_spacing,f,Int32,0x07,4,0,0,Additional spacing between lines
2929
SaveEasyRpgText,flags,f,SaveEasyRpgText_Flags,0x08,3,0,0,Various text settings
30+
SavePartyLocation,maniac_horizontal_pan_speed,f,Double,0x8D,0,0,0,horizontal speed in the scrolls of the screen.
31+
SavePartyLocation,maniac_vertical_pan_speed,f,Double,0x8E,0,0,0,vertical speed in the scrolls of the screen.
3032
SaveSystem,maniac_strings,f,Vector<DBString>,0x24,,0,0,rpg::Strings
3133
SaveSystem,maniac_frameskip,,Int32,0x88,0,0,0,"FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2)"
3234
SaveSystem,maniac_picture_limit,,Int32,0x89,0,0,0,FatalMix Picture Limit

src/generated/lcf/lsd/chunks.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,11 @@ namespace LSD_Reader {
439439
/** Mirrors save_count of current map. On mismatch events are not continued after load. */
440440
map_save_count = 0x83,
441441
/** ? */
442-
database_save_count = 0x84
442+
database_save_count = 0x84,
443+
/** horizontal speed in the scrolls of the screen. */
444+
maniac_horizontal_pan_speed = 0x8D,
445+
/** vertical speed in the scrolls of the screen. */
446+
maniac_vertical_pan_speed = 0x8E
443447
};
444448
};
445449
struct ChunkSaveVehicleLocation {

src/generated/lcf/rpg/savepartylocation.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ namespace rpg {
7171
bool encounter_calling = false;
7272
int32_t map_save_count = 0;
7373
int32_t database_save_count = 0;
74+
double maniac_horizontal_pan_speed = 0.0;
75+
double maniac_vertical_pan_speed = 0.0;
7476
};
7577
inline std::ostream& operator<<(std::ostream& os, SavePartyLocation::VehicleType code) {
7678
os << static_cast<std::underlying_type_t<decltype(code)>>(code);
@@ -97,7 +99,9 @@ namespace rpg {
9799
&& l.total_encounter_rate == r.total_encounter_rate
98100
&& l.encounter_calling == r.encounter_calling
99101
&& l.map_save_count == r.map_save_count
100-
&& l.database_save_count == r.database_save_count;
102+
&& l.database_save_count == r.database_save_count
103+
&& l.maniac_horizontal_pan_speed == r.maniac_horizontal_pan_speed
104+
&& l.maniac_vertical_pan_speed == r.maniac_vertical_pan_speed;
101105
}
102106

103107
inline bool operator!=(const SavePartyLocation& l, const SavePartyLocation& r) {

src/generated/lsd_savepartylocation.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,20 @@ static TypedField<rpg::SavePartyLocation, int32_t> static_database_save_count(
405405
0,
406406
0
407407
);
408+
static TypedField<rpg::SavePartyLocation, double> static_maniac_horizontal_pan_speed(
409+
&rpg::SavePartyLocation::maniac_horizontal_pan_speed,
410+
LSD_Reader::ChunkSavePartyLocation::maniac_horizontal_pan_speed,
411+
"maniac_horizontal_pan_speed",
412+
0,
413+
0
414+
);
415+
static TypedField<rpg::SavePartyLocation, double> static_maniac_vertical_pan_speed(
416+
&rpg::SavePartyLocation::maniac_vertical_pan_speed,
417+
LSD_Reader::ChunkSavePartyLocation::maniac_vertical_pan_speed,
418+
"maniac_vertical_pan_speed",
419+
0,
420+
0
421+
);
408422

409423

410424
template <>
@@ -464,6 +478,8 @@ Field<rpg::SavePartyLocation> const* Struct<rpg::SavePartyLocation>::fields[] =
464478
&static_encounter_calling,
465479
&static_map_save_count,
466480
&static_database_save_count,
481+
&static_maniac_horizontal_pan_speed,
482+
&static_maniac_vertical_pan_speed,
467483
NULL
468484
};
469485

src/generated/rpg_savepartylocation.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ std::ostream& operator<<(std::ostream& os, const SavePartyLocation& obj) {
3636
os << ", encounter_calling="<< obj.encounter_calling;
3737
os << ", map_save_count="<< obj.map_save_count;
3838
os << ", database_save_count="<< obj.database_save_count;
39+
os << ", maniac_horizontal_pan_speed="<< obj.maniac_horizontal_pan_speed;
40+
os << ", maniac_vertical_pan_speed="<< obj.maniac_vertical_pan_speed;
3941
os << "}";
4042
return os;
4143
}

0 commit comments

Comments
 (0)