chodness Newbie cheater Reputation: 0
Joined: 27 Feb 2015 Posts: 23
|
Posted: Tue Nov 08, 2016 4:04 am Post subject: Finding out what writes to a multi-level pointer |
|
|
Hey guys, I'm trying to use an auto-assembler script to globally allocate a space for me to store a specific address in, which my other scripts can then use that address. Except the address is based on a multi-level pointer.
So I've already got the pointer. The basic structure of it is: (the IDKs just mean I don't know exactly what that tier of the pointer is storing, but I also don't think I need to know)
Code: |
[static address] = battle -> offset +648
[battle+648] = IDK1 -> offset +1C0
[IDK1+1C0] = IDK2 -> offset +C4
[IDK2+C4] = IDK3 -> offset +C4
[IDK3+C4] = character -> offset +130
[character+130] = statistic
[statistic] = whatever value
|
Each address in each tier of the pointer is set when a battle begins, then remains until the battle ends, when it's wiped. As far as I know, it's set from the bottom up (i.e. the statistics are created and then assigned to the character, which is then assigned to IDK3, etc), which means that by the time the top level of my pointer is pointing at the second level, the third level has already been set, so a "Find out what writes to this" wouldn't work, as far as I can tell.
My question is: How do I find out where each specific tier of the pointer is set? (I want to put a cave at the opcode that sets my "character" address in IDK3 so that I can also store that in a global variable that my other scripts can use)
Sorry if I didn't explain that well, and thanks in advance for any help.
|
|