[HELP] Offset HEX Addition

Posts 18 of 8 · Page 1 of 1
[HELP] Offset HEX Addition
Basically right now I have to find the addresses for something I am working on manually each time it updates(which is kinda annoying..) however I have noticed that each address is HEX:+210 from the previous address for example..

#define Address1 (*(short*)( 0x030e5ea0 ) ) // Beginning offset
#define Address2 (*(short*)( 0x030e60b0 ) ) // Address1+HEX:210
#define Address3 (*(short*)( 0x030e62c0 ) ) // Address2+HEX:210

^ The difference in each address is the difference in HEX:+210, so I am wondering how I could do this automatically so I only need to set the first address in an array of offsets like so(pseudo..)

#define Address1 (*(short*)( 0x030e5ea0 ) ) // Beginning offset
#define Address2 (*(short*)( Address1 + h210 ) ) // Address1+HEX:210
#define Address3 (*(short*)( Address2 + h210 ) ) // Address2+HEX:210

You see if I could just figure out how to do the hex addition I could save myself a lot of time and effort but I am a little stumped as to how to accomplish this! I would appreciate any help, and thanks in advance!
Huh?

Just add it?

Numbers are numbers whether it's hex or decimal. If you want the compiler to see the number as hex just use the 0x prefix, if not just leave it how it is.
So to be clear it should look like this? ->

#define Address1 (*(short*)( 0x030e5ea0 ) )
#define Address2 (*(short*)( Address1 + 0x210 ) )
#define Address3 (*(short*)( Address2 + 0x210 ) )
Yeah, pretty much.
I must be missing something somewhere I think I have the syntax wrong or something.. Are you sure this is how it should be, because this is causing the app to crash now
Yes that's exactly what I needed, I was not defining the base offset correctly!
Thanks a ton guys!
or so:
Code:
for(int idx = 0; idx<num; idx++)
{
      adresse[idx] = addy+offset*idx;
}
Posts 18 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?