summaryrefslogtreecommitdiff
path: root/src/spritetex.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/spritetex.S')
-rwxr-xr-xsrc/spritetex.S305
1 files changed, 236 insertions, 69 deletions
diff --git a/src/spritetex.S b/src/spritetex.S
index a5e810d..31bc410 100755
--- a/src/spritetex.S
+++ b/src/spritetex.S
@@ -980,117 +980,242 @@ TEX_BlackFlakes:
srwi r6, r6, 24
andi. r6, r6, 0xF
+ cmpwi r6, 0
+ beql FlakeySnow
+
cmpwi r6, 1
- beq FlakeyLeaves
+ beql FlakeyLeavesRed
cmpwi r6, 2
- beq FlakeySakura
+ beql FlakeyLeavesScarlet
cmpwi r6, 3
- beq FlakeyStardust
+ beql FlakeyLeavesBrown
- stb r5, 0x5BB(r23)
- blr
+ cmpwi r6, 4
+ beql FlakeyLeavesGold
-# 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)
+ cmpwi r6, 5
+ beql FlakeyLeavesChestnut
+
+ cmpwi r6, 6
+ beql FlakeySakura
+
+ cmpwi r6, 7
+ beql FlakeyStardustWhite
+ cmpwi r6, 8
+ beql FlakeyStardustGold
-FlakeyLeaves:
+ cmpwi r6, 9
+ beql FlakeyStardustPurple
+
+ cmpwi r6, 10
+ beql FlakeyStardustMauve
- 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
-
+FlakeySnow:
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 r4, 0xFF
+ li r3, 0xFF
+ li r0, 0xFF
+ blr
- li r0, 0xD0
- stb r0, 0x5B7(r23)
- stb r0, 0x5BB(r23)
+FlakeyLeavesRed:
+ li r5, 0xCC
+ li r4, 0x0
+ li r3, 0x0
+ li r0, 0xFF
+ blr
- mtlr r9
+FlakeyLeavesScarlet:
+ li r5, 0x66
+ li r4, 0x0
+ li r3, 0x0
+ li r0, 0xFF
blr
-
-FlakeyStardust:
+FlakeyLeavesBrown:
+ li r5, 0x99
+ li r4, 0x66
+ li r3, 0x0
+ li r0, 0xFF
+ blr
+FlakeyLeavesGold:
li r5, 0xFF
- stb r5, 0x5B4(r23)
- stb r5, 0x5B8(r23)
-
- li r4, 0xF8
- stb r4, 0x5B5(r23)
- stb r4, 0x5B9(r23)
+ li r4, 0x80
+ li r3, 0x0
+ li r0, 0xFF
+ blr
- li r3, 0xD8
- stb r3, 0x5B6(r23)
- stb r3, 0x5BA(r23)
+FlakeyLeavesChestnut:
+ li r5, 0x66
+ li r4, 0x33
+ li r3, 0x0
+ li r0, 0xFF
+ blr
+FlakeySakura:
+ li r5, 0xFF
+ li r4, 0x99
+ li r3, 0xCC
+ li r0, 0xFF
+ blr
+
+FlakeyStardustWhite:
+ li r5, 0xFF
+ li r4, 0xFF
+ li r3, 0xD0
+ bl GenerateRandomNumber
+ mr r0, r3
li r3, 0xFF
+ blr
+
+FlakeyStardustGold:
+ li r5, 0xFF
+ li r4, 0x80
+ li r3, 0xD0
bl GenerateRandomNumber
mr r0, r3
- stb r0, 0x5B7(r23)
- stb r0, 0x5BB(r23)
-
- mtlr r9
+ li r3, 0x0
+ blr
+
+FlakeyStardustPurple:
+ li r5, 0x66
+ li r4, 0x00
+ li r3, 0xD0
+ bl GenerateRandomNumber
+ mr r0, r3
+ li r3, 0x99
+ blr
+
+FlakeyStardustMauve:
+ li r5, 0xCC
+ li r4, 0x99
+ li r3, 0xD0
+ bl GenerateRandomNumber
+ mr r0, r3
+ li r3, 0xCC
blr
.global TEX_Flakes
TEX_Flakes:
- lis r5, snowstring@h
- ori r5, r5, snowstring@l
+ stwu sp, -0x20(sp)
+ mflr r0
+ stw r0, 0x24(sp)
+ stw r3, 0x1C(sp)
+ stw r5, 0x18(sp)
+ stw r6, 0x14(sp)
+ stw r7, 0x10(sp)
+ stw r8, 0xC(sp)
+ stw r9, 0x8(sp)
+
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+
+ cmpwi r5, 5
+ blel LeafString
+
+ cmpwi r5, 0
+ beql SnowString
+
+ cmpwi r5, 6
+ beql PetalString
+
+ cmpwi r5, 7
+ bgel StardustString
+
+ lwz r0, 0x24(sp)
+ lwz r3, 0x1C(sp)
+ lwz r5, 0x18(sp)
+ lwz r6, 0x14(sp)
+ lwz r7, 0x10(sp)
+ lwz r8, 0xC(sp)
+ lwz r9, 0x8(sp)
+ mtlr r0
+ addi sp, sp, 0x20
blr
+SnowString:
+ lis r4, stringsnow@h
+ ori r4, r4, stringsnow@l
+ blr
+
+LeafString:
+ lis r4, stringleaf@h
+ ori r4, r4, stringleaf@l
+ blr
+
+PetalString:
+ lis r4, stringpetal@h
+ ori r4, r4, stringpetal@l
+ blr
+
+StardustString:
+ lis r4, stringstardust@h
+ ori r4, r4, stringstardust@l
+ blr
+
+
+.global TEX_CrabBallBurst
+TEX_CrabBallBurst:
+ lwz r3, 4(r29)
+ srwi r3, r3, 24
+ andi. r3, r3, 0xF
+
+ cmpwi r3, 0
+ beq huckitRockBallEffectsA
+
+ lis r3, snoweffectA@h
+ ori r3, r3, snoweffectA@l
+ blr
+
+
+huckitRockBallEffectsA:
+ lis r3, rockeffectA@h
+ ori r3, r3, rockeffectA@l
+ blr
+
+
+.global TEX_CrabBallSmoke
+TEX_CrabBallSmoke:
+ lwz r3, 4(r29)
+ srwi r3, r3, 24
+ andi. r3, r3, 0xF
+
+ cmpwi r3, 0
+ beq huckitRockBallEffectsB
+
+ lis r3, snoweffectB@h
+ ori r3, r3, snoweffectB@l
+ blr
+
+huckitRockBallEffectsB:
+ lis r3, rockeffectB@h
+ ori r3, r3, rockeffectB@l
+ blr
+
+
+
.data
BomombDir:
.word 0x0400FC00
@@ -1101,14 +1226,56 @@ TexFilenameBuffer:
TexFormatString:
.string "g3d/t%02d.brres"
-snowstring:
- .string "g3d/t00.brres"
+
+.global TEX_FlakeArcs
+TEX_FlakeArcs:
+ .long stringsnow
+ .long stringleaf
+ .long stringpetal
+ .long stringstardust
+ .long 0
+
+stringsnow:
+ .string "env_snow"
+.align 4
+
+stringleaf:
+ .string "env_leaf"
+.align 4
+
+stringpetal:
+ .string "env_petal"
+.align 4
+
+stringstardust:
+ .string "env_stardust"
+.align 4
+
+
+snoweffectA:
+ .string "Wm_en_blockcloud"
+.align 4
+
+snoweffectB:
+ .string "Wm_ob_iceattack"
+.align 4
+
+rockeffectA:
+ .string "Wm_ob_cmnboxsmoke"
+.align 4
+
+rockeffectB:
+ .string "Wm_ob_cmnrockpiece"
+.align 4
+
+
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
@@ -1121,10 +1288,10 @@ LaunchAngle:
LaunchAngleLeft:
.float -4.0, -2.5, -1.5
-
-
.align 4
+
+
YoshiArc:
.string "Y_TexGreen"
.align 4