Punkline
Dr. Frankenstack
- Joined
- May 15, 2015
- Messages
- 423
This code allows GObj gx_link callback pointers to be temporarily disabled by toggling the sign bit in the pointer addresses kept in offset 0x1C of every GObj that uses a display function.
Unobscured Hitbox Display works by disabling the initialization of these pointers in various GFX created by the action state sytem -- causing them to remain null, and not display anything. With this code, ANY displayed GObj can be hidden in a similar way that can be reversed with a simple bitwise operation performed on the gx_link pointer address.
Hiding a GObj display routine like this is practical and efficient, because it stops the display before it is even called and can be toggled without requiring its own variable in RAM. It may serve as a useful means of disabling the display of certain stage elements, HUD elements, players, items, and other drawn entities without relying on any external data.
For those of you who might find yourself reverse-engineering unknown GObj classes, this may be a useful way to visually identify a GObj in debug dolphin, or another memory editor. SinsOfApathy UnclePunch DRGN
DOL Mod:
Gecko Code:
Unobscured Hitbox Display works by disabling the initialization of these pointers in various GFX created by the action state sytem -- causing them to remain null, and not display anything. With this code, ANY displayed GObj can be hidden in a similar way that can be reversed with a simple bitwise operation performed on the gx_link pointer address.
Hiding a GObj display routine like this is practical and efficient, because it stops the display before it is even called and can be toggled without requiring its own variable in RAM. It may serve as a useful means of disabling the display of certain stage elements, HUD elements, players, items, and other drawn entities without relying on any external data.
For those of you who might find yourself reverse-engineering unknown GObj classes, this may be a useful way to visually identify a GObj in debug dolphin, or another memory editor. SinsOfApathy UnclePunch DRGN
DOL Mod:
Code:
-==-
Toggleable GObj Displays
Allows GObj GX callback event pointers to be toggled by XORing the sign bit in the address.
[Punkline]
1.02 ------ 80390ff8 --- 2800000041820024 -> 2C000000 40800024
1.02 ------ 80390f38 --- 2800000041820024 -> 2C000000 40800024
#
Code:
$Toggleable GObj Displays [Punkline]
04390ff8 2C000000
04390ffC 40800024
04390f38 2C000000
04390f3C 40800024
Last edited: