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 


array of values in assembly

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Bartorex
How do I cheat?
Reputation: 0

Joined: 11 Aug 2014
Posts: 2

PostPosted: Mon Aug 11, 2014 5:36 am    Post subject: array of values in assembly Reply with quote

I'm trying to mess with fog in a opengl game

enabling it is easy, glEnable(GL_FOG) is just:

push 00000B60 / GL_FOG
call dword ptr [xxx+54180] / glEnable

changing density is easy too, glFogf(GL_FOG_DENSITY, 0.05.f):

push 3d4ccccd / 0.05
push 00000B62 / GL_FOG_DENSITY
call dword ptr [xxx+542F4] / glFogf

you get the idea, but the problem is changing the color: glFogfv(GL_FOG_COLOR,FogCol)
FogCol is an array of 3 values, that looks like

float FogCol[3]={0.8f,0.8f,0.8f}

how do i do that in assembly?
Back to top
View user's profile Send private message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Mon Aug 11, 2014 5:50 am    Post subject: Re: array of values in assembly Reply with quote

Bartorex wrote:
I'm trying to mess with fog in a opengl game

enabling it is easy, glEnable(GL_FOG) is just:

push 00000B60 / GL_FOG
call dword ptr [xxx+54180] / glEnable

changing density is easy too, glFogf(GL_FOG_DENSITY, 0.05.f):

push 3d4ccccd / 0.05
push 00000B62 / GL_FOG_DENSITY
call dword ptr [xxx+542F4] / glFogf

you get the idea, but the problem is changing the color: glFogfv(GL_FOG_COLOR,FogCol)
FogCol is an array of 3 values, that looks like

float FogCol[3]={0.8f,0.8f,0.8f}

how do i do that in assembly?


Try this,I don't know if it will work,but you push a pointer to the array:
Code:
alloc(array,16)
array:
dd (float)14 // Value #1
dd (float)16 // Value #2
dd (float)11 // Value #3
injectedcode: // The address where you do the call
push array
push GL_FOG_COLOR // of course,modify this
call glFogfv

Here is an article about Arrays in asm:
http://www.tutorialspoint.com/assembly_programming/assembly_arrays.htm
Back to top
View user's profile Send private message
Bartorex
How do I cheat?
Reputation: 0

Joined: 11 Aug 2014
Posts: 2

PostPosted: Mon Aug 11, 2014 6:17 am    Post subject: Reply with quote

Hmm, crashes every time.
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