diff options
Diffstat (limited to '')
-rw-r--r-- | src/spritetex.S | 317 |
1 files changed, 310 insertions, 7 deletions
diff --git a/src/spritetex.S b/src/spritetex.S index 0336a5c..bf7a02f 100644 --- a/src/spritetex.S +++ b/src/spritetex.S @@ -199,11 +199,16 @@ TEX_Gabon: srwi r5, r5, 24
andi. r5, r5, 0xF
b GetTexFilenameForR5
-
+ + +.global TEX_Gabon_Spike
+TEX_Gabon_Spike:
+ andis. r4, r4, 0xFFF0
+ blr
.global TEX_GabonRock
TEX_GabonRock:
- lwz r5, 4(r29)
+ lwz r5, 4(r28)
srwi r5, r5, 24
andi. r5, r5, 0xF
b GetTexFilenameForR5
@@ -333,13 +338,19 @@ TEX_CheepChomp: b GetTexFilenameForR5
-.global TEX_Boo
-TEX_Boo:
+.global TEX_BigBoo
+TEX_BigBoo:
lwz r5, 4(r27)
srwi r5, r5, 24
andi. r5, r5, 0xF
b GetTexFilenameForR5
+.global TEX_Boo
+TEX_Boo:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
.global TEX_Midway
TEX_Midway:
@@ -382,12 +393,91 @@ TEX_Spinner: .global TEX_Platforms
-TEX_Platforms:
+TEX_Platforms: + + li r5, 1 + b GetTexFilenameForR5
+# cmpwi r0, 9 +# blt ReplacePlatforms +# +# lwzx r5, r5, r0 +# blr + + +ReplacePlatforms: + lwz r5, 4(r29)
srwi r5, r5, 4
andi. r5, r5, 0xF
b GetTexFilenameForR5
+ +.global TEX_Platform_ShifterH
+TEX_Platform_ShifterH: + + stw r5, 0x504(r30) + lwz r5, 4(r30) + stw r5, 0x3D8(r30) + blr + +.global TEX_Platform_ShifterF
+TEX_Platform_ShifterF: + + stw r4, 0x504(r30) + lwz r4, 4(r30) + stw r4, 0x3D8(r30) + blr + +.global TEX_Platform_ShifterL
+TEX_Platform_ShifterL: + + stw r5, 0x504(r28) + lwz r5, 4(r28) + stw r5, 0x3D8(r28) + blr + +.global TEX_Platform_ShifterR
+TEX_Platform_ShifterR: + + stw r4, 0x504(r31) + lwz r4, 4(r31) + stw r4, 0x3D8(r31) + blr + +.global TEX_Platform_ShifterS
+TEX_Platform_ShifterS: + + stw r30, 0x4C4(r27) + lwz r30, 4(r27) + stw r30, 0x398(r27) + blr + +.global TEX_Platform_ShifterK
+TEX_Platform_ShifterK: + + stw r4, 0x5A4(r27) + lwz r4, 4(r27) + stw r4, 0x478(r27) + blr + +.global TEX_Platform_ShifterW
+TEX_Platform_ShifterW: + + stw r0, 0x504(r29) + lwz r0, 4(r29) + stw r0, 0x3D8(r29) + blr + +.global TEX_Platform_ShifterSL
+TEX_Platform_ShifterSL: + + stw r4, 0x504(r29) + lwz r4, 4(r29) + stw r4, 0x3D8(r29) + blr + + + .global TEX_PokeyA
TEX_PokeyA:
@@ -401,16 +491,217 @@ TEX_PokeyA: TEX_PokeyB:
lwz r5, 4(r29)
srwi r5, r5, 24
- andi. r5, r5, 0xF
+ andi. r5, r5, 0xF + b GetTexFilenameForR5
+ +.global TEX_PokeySnowman +TEX_PokeySnowman: + + lwz r10, 4(r30)
+ srwi r10, r10, 24
+ andi. r10, r10, 0xF + + cmpwi r10, 0x2 + bne SnowmanPokey + + lwz r10, 4(r30) + # r10 is the current height + andi. r10, r10, 0xF + + # Find it + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f0, r11, r10 # get it from the array + + blr + + +SnowmanPokey: + + lfs f0, 0x54(r31) + blr
+ + + + +.global TEX_PokeySnowmanPosF +TEX_PokeySnowmanPosF: + + lwz r10, 4(r31) + andi. r10, r10, 0xF + + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f2, r11, r10 # get it from the array + + fmuls f0, f0, f2 + stfs f0, 0xB0(r30) + blr + +.global TEX_PokeySnowmanPosE +TEX_PokeySnowmanPosE: + + lwz r10, 4(r31) + andi. r10, r10, 0xF + + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f2, r11, r10 # get it from the array + + fmuls f31, f31, f2 + stfs f31, 0xB0(r29) + blr + +.global TEX_PokeySnowmanPosD +TEX_PokeySnowmanPosD: + + lwz r10, 4(r31) + andi. r10, r10, 0xF + + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f2, r11, r10 # get it from the array + + fmuls f1, f1, f2 + stfs f1, 0xB0(r30) + blr + + +.global TEX_PokeySnowmanPosC +TEX_PokeySnowmanPosC: + + lwz r10, 4(r31) + andi. r10, r10, 0xF + + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f2, r11, r10 # get it from the array + + fmuls f0, f0, f2 + stfs f0, 0xB0(r31) + blr + + +.global TEX_PokeySnowmanPosB +TEX_PokeySnowmanPosB: + + lwz r10, 4(r31) + andi. r10, r10, 0xF + + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f0, r11, r10 # get it from the array + + fmuls f1, f1, f0 + stfs f1, 0x18(r1) + blr + + + +.global TEX_PokeySnowmanPosA +TEX_PokeySnowmanPosA: + + lwz r10, 4(r31) + andi. r10, r10, 0xF + + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f0, r11, r10 # get it from the array + + fmuls f3, f3, f0 + stfs f3, 0x168(r31) + blr + + +.global TEX_PokeySnowmanPos +TEX_PokeySnowmanPos: + + mr r3, r30 + + lwz r10, 4(r30) + andi. r10, r10, 0xF + + lis r11, SnowmanTable@h + ori r11, r11, SnowmanTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f0, r11, r10 # get it from the array + + lis r5, AddAmount@h + ori r5, r5, AddAmount@l + slwi r6, r6, 2 # size *= 4 (size of float) + lfsx f3, r5, r6 # get it from the array + + lfs f2, 0xB0(r30) + fmuls f3, f3, f0 + fmuls f3, f3, f0 + fmuls f3, f3, f0 + fsubs f2, f2, f3 + stfs f2, 0xB0(r30) + + blr + +SnowmanPokeyPos: + + fsubs f0, f0, f31 + fsubs f0, f0, f31 + fsubs f1, f1, f31 + fsubs f1, f1, f31 + + + lfs f2, 8(r1) + fadds f2, f2, f31 + stfs f2, 8(r1) + blr
+ .global TEX_PokeyC
TEX_PokeyC:
+ lwz r5, 4(r30) + andis. r5, r5, 0xFFF0 or r5, r5, r31
+ or r5, r5, r0
+ + lwz r0, 0x524(r30) + slwi r0, r0, 8 + or r5, r5, r0 + blr
+ + +.global TEX_PokeyNoSand
+TEX_PokeyNoSand:
+ cmpwi r3, 0x20 + blr
+ + +.global TEX_CloudBounce
+TEX_CloudBounce:
+ lwz r5, 4(r28)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+ + +.global TEX_SpikeBall
+TEX_SpikeBall:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+ + + .data
@@ -419,4 +710,16 @@ TexFilenameBuffer: TexFormatString:
.string "g3d/t%02d.brres"
-
+ +ConvertFloat: + .word 0x43300000,0x0,0x43300000,0x80000000 + +.align 4 + +SnowmanTable: + .float 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5 + +AddAmount: + .float 32.0 +
+.align 4 |