| View previous topic :: View next topic |
| Author |
Message |
karraksc How do I cheat?
Reputation: 0
Joined: 08 Feb 2016 Posts: 2 Location: US
|
Posted: Sat Jul 28, 2018 8:40 am Post subject: Pointer variable assignments |
|
|
Maybe I'm overthinking something (usually do 8^D)
Is there a way to "assign" a pointer value to a label, and then reference it later?
Example, This is the way I "assign" a fixed value to BasePTR1, like this:
BasePtr = 00400000 (4 Byte Integer)
Later, I want to reference it by the label, like this:
Ptr1 = ptr(BasePTR + $6000) + $68C
My question is this, can I now reference PTR1 by it's label?
PTR2 = ptr(PTR1 + $274) + $20C
or do I have to do it the old way, like this?
PTR2 = ptr(ptr(BasePtr + $6000) + $274) +$20C
Is this possible?
|
|
| Back to top |
|
 |
FreeER Grandmaster Cheater Supreme
Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sat Jul 28, 2018 10:16 am Post subject: |
|
|
maybe use define? eg.
define(BasePTR, 400000)
_________________
|
|
| Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sat Jul 28, 2018 12:01 pm Post subject: |
|
|
pointers:
| Code: | code:
... ; some code
name:
dd code // value of [name] equal to the address of code: label
// note use dq for 64-bit addresses |
constants:
| Code: | | define(base,$00400000) |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
| STN wrote: | | i am a sweetheart. |
|
|
| Back to top |
|
 |
|