| View previous topic :: View next topic |
| Author |
Message |
mStorm Expert Cheater
Reputation: 0
Joined: 21 Feb 2009 Posts: 107
|
Posted: Sun May 10, 2009 6:16 am Post subject: how to store a float into xmm# |
|
|
So I want to add a small decimal to xmm0, I know i'd use:
addss xmm0,xmm4
but how do I set a small decimal value into xmm4?
Been browsing the web and can't come up with it.
|
|
| Back to top |
|
 |
Recifense I post too much
Reputation: 166
Joined: 17 Mar 2008 Posts: 3688 Location: Pernambuco - Brazil
|
Posted: Mon May 11, 2009 10:55 am Post subject: |
|
|
Hi mStorm,
I see 2 ways you can do that. In both, you have to create a variable where you will store the value to be added:
1) Creating a variable in CEA:
VarName:
dd <float value in hex>
Exemple:
fValue:
dd 3dcccccd // ~ 0.1
2) You can add directly form the variable:
addss xmm0,[VarName]
3) You can move the variable to xmm4 and add it to xmm0:
movss xmm4,[VarName]
addss amm0,xmm4
The steps above are for Single--Precision Floating-Point Values.
I hope I have helped.
Cheers.
|
|
| Back to top |
|
 |
mStorm Expert Cheater
Reputation: 0
Joined: 21 Feb 2009 Posts: 107
|
Posted: Mon May 11, 2009 2:38 pm Post subject: |
|
|
I want to be able to do it modifying the code in the game without injecting using cheat engine.
I'm writing it in a c++ injected dll, so I need to know how to do it without CheatEngine.
What exactly does CheatEngine do to create a float variable?
|
|
| Back to top |
|
 |
Recifense I post too much
Reputation: 166
Joined: 17 Mar 2008 Posts: 3688 Location: Pernambuco - Brazil
|
Posted: Tue May 12, 2009 6:12 am Post subject: |
|
|
Hi mStorm,
Just remember that you can use inline in assembly inside C program.
I believe CE just change the way it sees the value in memory (by using casting or sometihing alike). But DB can give you a better explanation in how it can be done in Pascal (and maybe it can be applied to C).
Cheers!
|
|
| Back to top |
|
 |
|