 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Y.A.K.E Advanced Cheater
Reputation: 0
Joined: 15 Jul 2019 Posts: 56
|
Posted: Sat Apr 22, 2023 3:47 am Post subject: how to use fmul |
|
|
realPlayer_X = miniMap_X * 16
realPlayer_Y = miniMap_Y * 16
how to get realPlayer_X & realPlayer_Y
| Code: |
label(realPlayer_X)
label(realPlayer_Y)
registersymbol(realPlayer_X)
registersymbol(realPlayer_Y)
realPlayer_X:
dd 0
realPlayer_Y:
dd 0
|
| Code: |
[64-bit]
push RAX
push RBX
xor rax,rax
xor rbx,rbx
movq rax,xmm1 // miniMap_X
movq rbx,xmm0 // miniMap_Y
.....
pop RBX
pop RAX
[/64-bit]
|
| Code: |
[32-bit]
push eax
push ebx
mov eax,[ebp+08] //minimap_X
mov ebx,[ebp+0C] //minimap_Y
....
pop ebx
pop eax
[/32-bit]
|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25810 Location: The netherlands
|
Posted: Sat Apr 22, 2023 4:59 am Post subject: |
|
|
don't use fmul, that's for the obsolete FP register set, use mulss instead (https://www.felixcloutier.com/x86/mulss )
or use ccode
| Code: |
alloc(realPlayer_X,4)
alloc(realPlayer_Y,4)
registersymbol(realPlayer_X,realPlayer_Y)
...
//your code where XMM0 and XMM1 are set
{$ccode miniMap_X=XMM1.0F miniMap_Y=XMM0.0F}
extern float realPlayer_X;
extern float realPlayer_Y;
realPlayer_X=miniMap_X*16;
realPlayer_Y=miniMap_Y*16;
{$asm}
//the usual code injection where you return to the original code
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|