1
0
Fork 0
supSMS-MiscCode/src/QFTFreezeEX.s

37 lines
670 B
ArmAsm
Raw Normal View History

2022-11-02 18:29:58 +09:00
.set state.LedgeGrab, 0x3800034B
.set state.PickUp, 0x383
.set state.Put, 0x80000387
.set state.Throw, 0x80000588
.macro liDX reg val
.if -0x8000 <= \val && \val < 0x8000 || 0xffff8000 <= \val
li \reg, \val@l
.else
lis \reg, \val@h
.if \val&0xffff != 0
ori \reg, \reg, \val@l
.endif
.endif
.endm
.onTake:
lwz r0, 0x384(r31)
b freezeQFT
.onDrop:
li r0, 0
b freezeQFT
.onChangeStatus:
## orig
li r0, 0
## checkstatus
## TODO is checking lower 16 bit enough?
#liDX r12, state.LedgeGrab
#cmplw r29, r12
rlwinm r3, r29, 0, 16, 31
cmplwi r3, state.LedgeGrab@l
beq- freezeQFT
cmplwi r3, state.Put@l
beq- freezeQFT
blr