-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for multi-level indirect code notes in address tooltips #1129
Support for multi-level indirect code notes in address tooltips #1129
Conversation
Wondering it it'd be reasonable to add parent lines to the note text for clarity. Such as if you have a pointer to party members which then have pointers to their skills... [32-Bit Pointer] Party Members Resulting Note: Maybe as an eventual improvement |
I have often used -- to indicate specific values at an offset (example from SaGa 3 being worked on right this moment):
Will this treat those as nested offsets or will they be treated like part of the note for the prior offset? |
As long as a
So:
would all represent an indented offset following a line containing "pointer" (though not of the same pointer because they differ from each other). This prefix is captured, and each following line that matches the prefix (up through the I know the first three exist in the database. The others are made up and may or may not exist (though I'm pretty confident the last doesn't). |
Ah, that's reasonable. I was more thinking for indirect notes in the inspector rather than for tooltips in the asset editor in any case. |
Given this code note:
This tooltip will now appear:
Similarly, for a much deeper code note:
This tooltip will appear (note that the address is off because there's a NULL in the pointer chain)
For this to work, each pointer must be annotated as a pointer (i.e.
[32-bit pointer]
). Items under a pointer may have any prefix (typically+
,.
, or-
, but more complex things are allowed. The code will find the first "+digit" on the next line and anything preceding that will be considered the prefix. All following lines starting with the prefix are assumed to be nested notes for the pointer.i.e.
Note: I've updated the code to use hex offsets even when less than 10 (so the final result differs slightly from the above screenshots).