Skip to content

Commit 5ac40a5

Browse files
committed
mark path as modified when its room is changed
1 parent 0348c29 commit 5ac40a5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,17 @@ unsafe extern "C" fn update_sprite_mask_timestamp() {
994994
);
995995
}
996996

997+
#[unsafe(naked)]
998+
unsafe extern "C" fn update_path_timestamp_and_draw_form() {
999+
naked_asm!(
1000+
"mov eax, [eax + 0x458]",
1001+
"mov edx, 0x7229e8", // update path timestamp
1002+
"mov eax, ebx",
1003+
"mov edx, 0x720560", // draw path from
1004+
"jmp edx",
1005+
);
1006+
}
1007+
9971008
#[unsafe(naked)]
9981009
unsafe extern "C" fn gm82_file_association_inj() {
9991010
naked_asm!(
@@ -2904,6 +2915,9 @@ unsafe fn injector() {
29042915
patch_timestamp_mask(0x6f34e8);
29052916
patch_timestamp_mask(0x6f3555);
29062917

2918+
// update path timestamp when changing room (important for gm82room)
2919+
patch_call(0x7211ff, update_path_timestamp_and_draw_form as _);
2920+
29072921
// check for time going backwards
29082922
patch(0x4199fb, &[0xe9]);
29092923
patch_call(0x4199fb, reset_if_time_went_backwards as _);

0 commit comments

Comments
 (0)