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 


Convert a Decimal to Double Value?

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

Joined: 10 Feb 2011
Posts: 43

PostPosted: Sun Jan 01, 2012 10:55 am    Post subject: Convert a Decimal to Double Value? Reply with quote

Evening is long time ago Embarassed

How i can again Convert a Decimal to Double value? Shocked

Like 100?
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Sun Jan 01, 2012 7:05 pm    Post subject: Reply with quote

With CVTSI2SD (if you mean integer).
Eg.

CVTSI2SD xmm0,[ebx+00000458]

will convert the value on [ebx+00000458] to double and save it on xmm0.

It is up to you to save and restore xmm0 before you use it. Eg.

globalalloc(tempstore,8)
globalalloc(tempstore2,8)

newmem: //this is allocated memory, you have read,write,execute access
movss [tempstore],xmm0 //save original value of xmm0
CVTSI2SD xmm0,[ebx+00000458] //convert value
movsd [tempstore2],xmm0 //save the converted double value
movss xmm0,[tempstore] //restore xmm0

Maybe you have to use movsd to save/restore xmm0 but maybe it is not even used at the point where you use it so it depends on the process.

originalcode:
sub [ebx+00000458],eax



But if you just want to define a static value as double, then

tempstore2:
(double) 100

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
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