Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how to store a float into xmm#

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
mStorm
Expert Cheater
Reputation: 0

Joined: 21 Feb 2009
Posts: 107

PostPosted: Sun May 10, 2009 6:16 am    Post subject: how to store a float into xmm# Reply with quote

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
View user's profile Send private message
Recifense
I post too much
Reputation: 166

Joined: 17 Mar 2008
Posts: 3688
Location: Pernambuco - Brazil

PostPosted: Mon May 11, 2009 10:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mStorm
Expert Cheater
Reputation: 0

Joined: 21 Feb 2009
Posts: 107

PostPosted: Mon May 11, 2009 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Recifense
I post too much
Reputation: 166

Joined: 17 Mar 2008
Posts: 3688
Location: Pernambuco - Brazil

PostPosted: Tue May 12, 2009 6:12 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites