#@8006b7f4: lwz r12, 0x219C (r31) (loading IASA blrl)
#r0, r3-12, cr0, lr are presumed safe
#--adds a check to the playerThinkController update that checks the current move
#--if it's within move ID range of 11-14, it's considered a B-special
#--run jump interrupt based on air/ground/grab situation
#--on a successful interrupt, apply fake IASA function pointer to resulting kneebend state
b codeStart
getFakeIASAPointer:
blrl
mflr r0 #reconstruction the prolog of kneebend IASA function
stw r0, 0x4(sp) #!this is not run from the hook, it runs from the IASA blrl
stwu sp, -0x20(sp)
stw r31, 0x1C(sp)
mr r31, r3 #put passed player data pointer in r31, so the code works right
lis r12, 0x800c
ori r12, r12, 0xb63c
mtctr r12
bctr
codeStart: #from our hook, we're checking if the move is a grounded B-special
lbz r3, 0x2073(r31) #load move ID
cmplwi r3, 0x11
blt+ default
cmplwi r3, 0x14 #if move ID is between 0x11 and 0x14, it's a special move
bgt+ default
specialMove:
lwz r3, 0xE0(r31) #check if on ground or in air
cmplwi r3, 0
bne- default
lwz r3, 0x1A58(r31) #grabbing player? (0 if no, pointer if yes)
cmplwi r3, 0 #check if holding a player
bne- default
interrupt:
mr r3, r30 #pass external player data pointer
lis r12, 0x800c #if on ground, load jump interrupt check
ori r12, r12, 0xaed0
mtlr r12
blrl
cmplwi r3, 0
beq+ default
bl getFakeIASAPointer
mflr r12 #if interrupt is successful, override the IASA pointer with our fake one
stw r12, 0x219C(r31)
b return
default:
lwz r12, 0x219C(r31)
return: