|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Bartorex How do I cheat? Reputation: 0
Joined: 11 Aug 2014 Posts: 2
|
Posted: Mon Aug 11, 2014 5:36 am Post subject: array of values in assembly |
|
|
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 |
|
|
Redouane Master Cheater Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Mon Aug 11, 2014 5:50 am Post subject: Re: array of values in assembly |
|
|
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 |
|
|
Bartorex How do I cheat? Reputation: 0
Joined: 11 Aug 2014 Posts: 2
|
Posted: Mon Aug 11, 2014 6:17 am Post subject: |
|
|
Hmm, crashes every time.
|
|
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
|
|