summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/spritetex.S96
1 files changed, 94 insertions, 2 deletions
diff --git a/src/spritetex.S b/src/spritetex.S
index 75e0256..48c6a64 100755
--- a/src/spritetex.S
+++ b/src/spritetex.S
@@ -1,5 +1,6 @@
.extern sprintf
.extern GenerateRandomNumber
+.extern BombExplodeState
#ifndef __MWERKS__
.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
@@ -838,6 +839,12 @@ TEX_HuckitBalls:
+.global HammerColour
+HammerColour:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
.global HammerTime
@@ -956,6 +963,9 @@ HammerLaunch:
cmpwi r5, 5
beq LemmyLaunch
+# cmpwi r5, 1
+# beq BombLaunch
+
li r6, 1
slwi r6, r6, 2 # size *= 4 (size of float)
@@ -979,8 +989,11 @@ FacingLeft:
lfsx f0, r7, r6 # get it from the array
stfs f0, 0xE8(r31)
- li r7, 270
- sth r7, 0x102(r31)
+ li r7, 90
+ sth r7, 0x100(r31)
+
+ li r7, 90
+ sth r7, 0x106(r31)
blr
@@ -1000,6 +1013,85 @@ LemmyLaunch:
blr
+BombLaunch:
+
+ stwu sp, -0x40(sp)
+ mflr r0
+ stw r31, 0x2C(sp)
+ stw r30, 0x28(sp)
+ stw r0, 0x24(sp)
+ stw r3, 0x20(sp)
+ stw r4, 0x1C(sp)
+ stw r5, 0x18(sp)
+ stw r6, 0x10(sp)
+ stw r7, 0x8(sp)
+ stw r8, 0x34(sp)
+ stw r9, 0x30(sp)
+
+ mr r3, r31
+
+ lwz r12, 0x60(r31)
+ lwz r12, 0xD4(r12)
+ mtctr r12
+ lis r4, BombExplodeState@h
+ ori r4, r4, BombExplodeState@l
+
+ lwz r5, 4(r30)
+ srwi r5, r5, 28
+
+ mulli r5, r5, 0x40
+
+ add r4, r4, r5
+ bctrl
+
+
+ lwz r31, 0x2C(sp)
+ lwz r30, 0x28(sp)
+ lwz r0, 0x24(sp)
+ lwz r3, 0x20(sp)
+ lwz r4, 0x1C(sp)
+ lwz r5, 0x18(sp)
+ lwz r6, 0x10(sp)
+ lwz r7, 0x8(sp)
+ lwz r8, 0x34(sp)
+ lwz r9, 0x30(sp)
+ mr r3, r30
+
+ lis r7, LaunchAngle@h
+ ori r7, r7, LaunchAngle@l
+
+ li r6, 0
+ slwi r6, r6, 2 # size *= 4 (size of float)
+
+ lwz r8, 0x348(r30)
+ cmpwi r8, 0
+ bne BombFacingLeft
+
+ lfsx f0, r7, r6
+ stfs f0, 0xE8(r31)
+
+ mtlr r0
+ addi sp, sp, 0x40
+ blr
+
+BombFacingLeft:
+
+ lis r7, LaunchAngleLeft@h
+ ori r7, r7, LaunchAngleLeft@l
+
+ lfsx f0, r7, r6
+ stfs f0, 0xE8(r31)
+
+ li r7, 180
+ sth r7, 0x102(r31)
+
+ mtlr r0
+ addi sp, sp, 0x40
+ blr
+
+
+
+
.global HammerSpin
HammerSpin:
# sth r3, 0x100(r31)