[Yoshi] use game builtin functions instead
This commit is contained in:
parent
657b4ee6c4
commit
aa866d640f
2 changed files with 32 additions and 42 deletions
|
@ -1,16 +1,11 @@
|
||||||
$ Spwan Yoshi (2022/08/29) [sup39]
|
$ Spwan Yoshi (2022/08/29) [sup39]
|
||||||
28400D50 000F0800
|
C21604C4 00000009
|
||||||
C0000000 0000000C
|
807F03F0 3C808040
|
||||||
818D98B8 7D8C6379
|
A0840D50 54800436
|
||||||
4D820020 806C03F0
|
2C000800 40820030
|
||||||
7C631B79 4D820020
|
54840EFD 41820028
|
||||||
3CA08040 A0A50D50
|
3C006300 5C0027BE
|
||||||
54A50EFD 4D820020
|
980300D0 80030008
|
||||||
812C03E4 7D294B79
|
9003000C 3D808016
|
||||||
4182000C 38000000
|
618C0640 7D8803A6
|
||||||
98091C84 3C006300
|
|
||||||
5C002FBE 980300D0
|
|
||||||
38000008 98030000
|
|
||||||
80030008 9003000C
|
|
||||||
4E800020 00000000
|
4E800020 00000000
|
||||||
E0000000 00000000
|
|
||||||
|
|
|
@ -1,39 +1,34 @@
|
||||||
.set rMario, 12
|
.set rYoshi, 3 # required to be r3
|
||||||
.set rFLUDD, 9
|
.set rInput, 4
|
||||||
.set rYoshi, 3
|
.set aInput, 0x80400D50
|
||||||
.set rInput, 5
|
.set aRideYoshi, 0x80160640
|
||||||
|
|
||||||
## make sure Mario is not NULL
|
_C2_801604c4:
|
||||||
lwz rMario, -0x6748(r13)
|
lwz rYoshi, 0x3f0(r31)
|
||||||
mr. rMario, rMario
|
|
||||||
beqlr-
|
|
||||||
|
|
||||||
## make sure Yoshi is not NULL
|
## check input
|
||||||
lwz rYoshi, 0x3F0(rMario)
|
lis rInput, aInput@ha
|
||||||
mr. rYoshi, rYoshi
|
lhz rInput, aInput@l(rInput)
|
||||||
beqlr-
|
### Y
|
||||||
|
rlwinm r0, rInput, 0, 0xFFF0
|
||||||
## make sure any D-Pad key is pressed (not only Y)
|
cmpwi r0, 0x0800
|
||||||
lis rInput, 0x8040
|
bne .L.end
|
||||||
lhz rInput, 0x0D50(rInput)
|
### D-Pad
|
||||||
rlwinm. rInput, rInput, 1, 30-3, 30
|
rlwinm. rInput, rInput, 1, 30-3, 30
|
||||||
beqlr-
|
beq .L.end
|
||||||
|
|
||||||
## set to spray nozzle
|
|
||||||
lwz rFLUDD, 0x3E4(rMario)
|
|
||||||
mr. rFLUDD, rFLUDD
|
|
||||||
beq- .L1
|
|
||||||
li r0, 0
|
|
||||||
stb r0, 0x1C84(rFLUDD)
|
|
||||||
.L1:
|
|
||||||
|
|
||||||
## color
|
## color
|
||||||
lis r0, 0x6300
|
lis r0, 0x6300
|
||||||
rlwnm r0, r0, rInput, 0x3
|
rlwnm r0, r0, rInput, 0x3
|
||||||
stb r0, 0xD0(rYoshi)
|
stb r0, 0xD0(rYoshi)
|
||||||
## ride state
|
|
||||||
li r0, 8
|
|
||||||
stb r0, 0(rYoshi)
|
|
||||||
## juice
|
## juice
|
||||||
lwz r0, 8(rYoshi)
|
lwz r0, 8(rYoshi)
|
||||||
stw r0, 0xC(rYoshi)
|
stw r0, 0xC(rYoshi)
|
||||||
|
|
||||||
|
## goto ride Yoshi
|
||||||
|
lis r12, aRideYoshi@h
|
||||||
|
ori r12, r12, aRideYoshi@l
|
||||||
|
mtlr r12
|
||||||
|
blr
|
||||||
|
|
||||||
|
.L.end:
|
||||||
|
|
Loading…
Reference in a new issue