summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Noga <Tempus@Spectrum-Song.local>2011-08-14 13:36:51 -0500
committerColin Noga <Tempus@Spectrum-Song.local>2011-08-14 13:36:51 -0500
commitead037af2d2665e94ed8d804a1e220c47ba54db9 (patch)
tree73a9b2ade2494b17caf3d1e1cd7f3bffca72c917 /src
parent16ddd9a408d1a02f99b9a9851d412dcebf2a8483 (diff)
downloadkamek-ead037af2d2665e94ed8d804a1e220c47ba54db9.tar.gz
kamek-ead037af2d2665e94ed8d804a1e220c47ba54db9.zip
Bobomb bros, colour snow, pipe spawner, and other fixes.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/growup.s6
-rwxr-xr-xsrc/spritetex.S171
2 files changed, 165 insertions, 12 deletions
diff --git a/src/growup.s b/src/growup.s
index 11fa5b4..0576ebe 100755
--- a/src/growup.s
+++ b/src/growup.s
@@ -868,7 +868,6 @@ ModifyRiderInitD:
blr # Off we go!
-
.global InheritSettings
InheritSettings:
@@ -881,6 +880,7 @@ InheritSettings:
InheritSettings_B:
lwz r5, 4(r3)
+ andis. r5, r5, 0x0FF0
blr
@@ -894,7 +894,9 @@ InheritSettings_C:
.global InheritSettings_D
InheritSettings_D:
- ori r4, r4, 0x2
+ lwz r0, 4(r3)
+ andis. r0, r0, 0xFFF0
+ or r4, r4, r0
blr
diff --git a/src/spritetex.S b/src/spritetex.S
index 48c6a64..fa4d6e8 100755
--- a/src/spritetex.S
+++ b/src/spritetex.S
@@ -1,6 +1,7 @@
.extern sprintf
.extern GenerateRandomNumber
.extern BombExplodeState
+.extern AbsValue
#ifndef __MWERKS__
.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
@@ -838,6 +839,15 @@ TEX_HuckitBalls:
b GetTexFilenameForR5
+.global TEX_HuckitBallsInherit
+TEX_HuckitBallsInherit:
+ lwz r10, 4(r9)
+ andis. r10, r10, 0xF00
+ or r4, r4, r0
+ or r4, r4, r10
+ blr
+
+
.global HammerColour
HammerColour:
@@ -933,11 +943,12 @@ ThrowLemmyBall:
.global HammerLaunch
HammerLaunch:
mr r3, r30
+ mr r10, r30
# r31 is the new actor currently
# r30 is self, all others are volatile
lwz r5, 4(r30)
- lwz r8, 0x348(r30)
+ lbz r8, 0x348(r30)
srwi r5, r5, 8
andi. r5, r5, 0xF
@@ -989,12 +1000,6 @@ FacingLeft:
lfsx f0, r7, r6 # get it from the array
stfs f0, 0xE8(r31)
- li r7, 90
- sth r7, 0x100(r31)
-
- li r7, 90
- sth r7, 0x106(r31)
-
blr
@@ -1082,9 +1087,6 @@ BombFacingLeft:
lfsx f0, r7, r6
stfs f0, 0xE8(r31)
- li r7, 180
- sth r7, 0x102(r31)
-
mtlr r0
addi sp, sp, 0x40
blr
@@ -1098,9 +1100,158 @@ HammerSpin:
blr
+.global HammerLeft
+HammerLeft:
+
+ lbz r8, 0x348(r10)
+ lha r7, 0x102(r31)
+
+ cmpwi r8, 0
+ bne GoingLeft
+ blr
+
+
+GoingLeft:
+
+ li r8, 1
+ stb r8, 0x348(r31)
+
+ li r6, 0xFD00
+ add r7, r6, r7
+ sth r7, 0x102(r31)
+ sth r7, 0x108(r31)
+ sth r7, 0xC(r1)
+ blr
+
+
+
+
+.global TEX_BlackFlakes
+TEX_BlackFlakes:
+
+ mflr r9
+
+ lwz r6, 4(r23)
+ srwi r6, r6, 24
+ andi. r6, r6, 0xF
+
+ cmpwi r6, 1
+ beq FlakeyLeaves
+
+ cmpwi r6, 2
+ beq FlakeySakura
+
+ cmpwi r6, 3
+ beq FlakeyStardust
+
+ stb r5, 0x5BB(r23)
+ blr
+
+# li r5, 0xFF
+# li r4, 0
+# li r3, 0
+# li r0, 0xFF
+#
+# stb r5, 0x5B4(r23)
+# stb r4, 0x5B5(r23)
+# stb r3, 0x5B6(r23)
+# stb r0, 0x5B7(r23)
+# stb r5, 0x5B8(r23)
+# stb r4, 0x5B9(r23)
+# stb r3, 0x5BA(r23)
+# stb r0, 0x5BB(r23)
+
+
+FlakeyLeaves:
+
+ li r5, 0xB4
+ stb r5, 0x5B4(r23)
+ stb r5, 0x5B8(r23)
+
+ li r3, 0x40
+ bl GenerateRandomNumber
+ mr r4, r3
+ stb r4, 0x5B5(r23)
+ stb r4, 0x5B9(r23)
+
+ li r3, 0x0
+ stb r3, 0x5B6(r23)
+ stb r3, 0x5BA(r23)
+
+ li r0, 0xFF
+ stb r0, 0x5B7(r23)
+ stb r0, 0x5BB(r23)
+
+ mtlr r9
+ blr
+
+
+FlakeySakura:
+
+ li r3, 0x20
+ bl GenerateRandomNumber
+
+ li r5, 0xFF
+ sub r5, r5, r3
+ stb r5, 0x5B4(r23)
+ stb r5, 0x5B8(r23)
+
+ li r4, 0xC8
+ sub r4, r4, r3
+ stb r4, 0x5B5(r23)
+ stb r4, 0x5B9(r23)
+
+ li r4, 0xF8
+ sub r3, r4, r3
+ stb r3, 0x5B6(r23)
+ stb r3, 0x5BA(r23)
+
+ li r0, 0xD0
+ stb r0, 0x5B7(r23)
+ stb r0, 0x5BB(r23)
+
+ mtlr r9
+ blr
+
+
+FlakeyStardust:
+
+ li r5, 0xFF
+ stb r5, 0x5B4(r23)
+ stb r5, 0x5B8(r23)
+
+ li r4, 0xF8
+ stb r4, 0x5B5(r23)
+ stb r4, 0x5B9(r23)
+
+ li r3, 0xD8
+ stb r3, 0x5B6(r23)
+ stb r3, 0x5BA(r23)
+
+ li r3, 0xFF
+ bl GenerateRandomNumber
+ mr r0, r3
+ stb r0, 0x5B7(r23)
+ stb r0, 0x5BB(r23)
+
+ mtlr r9
+ blr
+
+
+
+.global TEX_Flakes
+TEX_Flakes:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
.data
+BomombDir:
+ .word 0x0400FC00
+
TexFilenameBuffer:
.long 0,0,0,0