From 44307014cd429b295c8e96d0d9f361f6eea6aa24 Mon Sep 17 00:00:00 2001 From: BroGamer <64546358+BroGamer4256@users.noreply.github.com> Date: Fri, 14 Oct 2022 13:33:46 +1300 Subject: [PATCH] Test --- plugins/8.18-song-limit/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/8.18-song-limit/src/lib.rs b/plugins/8.18-song-limit/src/lib.rs index 7ba027c..14eee20 100644 --- a/plugins/8.18-song-limit/src/lib.rs +++ b/plugins/8.18-song-limit/src/lib.rs @@ -37,16 +37,16 @@ macro_rules! set_crown_data { asm!( "add rsp, 0x28", "mov rax, qword ptr [rsp + 0x40]", + "push rcx", "add rax, r14", "lea rcx, [rax + rax * 8]", concat!("cmp dword ptr [rdx + rcx * 8 + 0x300], ", $value), "jge 1f", concat!("mov dword ptr [rdx + rcx * 8 + 0x300], ", $value), "1:", - in("rdx") SONG_DATA.unwrap(), - ); - asm!( + "pop rcx", "jmp rcx", + in("rdx") SONG_DATA.unwrap(), in("rcx") HANDLE.unwrap() + $offset, ) }; @@ -68,6 +68,7 @@ macro_rules! set_score_rank { ($offset:literal, $value:literal) => { asm!( "add rsp, 0x28", + "push rcx", "lea rcx, [0xB + RBX * 4]", "add rcx, rsi", "add rcx, rbx", @@ -76,11 +77,10 @@ macro_rules! set_score_rank { "jge 1f", concat!("mov dword ptr [rdx + rax * 8], ", $value), "1:", - in("rdx") SONG_DATA.unwrap(), - ); - asm!( + "pop rcx", "jmp rcx", in("rcx") HANDLE.unwrap() + $offset, + in("rdx") SONG_DATA.unwrap(), ); }; }