summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-12-16 02:59:06 +0100
committerTreeki <treeki@gmail.com>2012-12-16 02:59:06 +0100
commit50acd34af6fa6760c0953b877238fe789c63e760 (patch)
treed844993ef0fac7dbfb1aae153c99f9a8afc64ba6 /src
parent639434feba546d683ee1e7255652a1caa20ea154 (diff)
downloadkamek-50acd34af6fa6760c0953b877238fe789c63e760.tar.gz
kamek-50acd34af6fa6760c0953b877238fe789c63e760.zip
hopefully this works
Diffstat (limited to 'src')
-rwxr-xr-xsrc/spritetex.S50
1 files changed, 30 insertions, 20 deletions
diff --git a/src/spritetex.S b/src/spritetex.S
index 850ebb7..883ea7b 100755
--- a/src/spritetex.S
+++ b/src/spritetex.S
@@ -1349,33 +1349,43 @@ GLOW_LightBlock:
.global CloudLT_Execute
CloudLT_Execute:
-
- # li r9, 0xFF
- # li r8, 0
-
- # stb r9, 0x934(r31)
- # stb r8, 0x935(r31)
- # stb r8, 0x936(r31)
- # stb r9, 0x937(r31)
+ stwu r1, -0x10(r1)
+ mflr r0
+ stw r0, 0x14(r1)
+ stw r31, 0xC(r1)
- # stb r9, 0xa60(r31)
- # stb r8, 0xa61(r31)
- # stb r8, 0xa62(r31)
- # stb r9, 0xa63(r31)
+ mr r31, r3
+ bl Cloud_execute
lwz r8, 4(r31)
-
srwi r8, r8, 28
cmpwi r8, 1
- beq CloudD_Execute
-
- b Cloud_execute
+ bne dontChangeMyColour
+
+ li r9, 0xFF
+ li r8, 0
+ mr r4, r31
+ li r5, 75
+ mtctr r5
+colourLoop:
+ stb r9, 0x934(r4)
+ stb r8, 0x935(r4)
+ stb r8, 0x936(r4)
+
+ stb r9, 0xA60(r4)
+ stb r8, 0xA61(r4)
+ stb r8, 0xA62(r4)
+
+ addi r4, r4, 4
+ bdnz colourLoop
+
+dontChangeMyColour:
+ lwz r31, 0xC(r1)
+ lwz r0, 0x14(r1)
+ mtlr r0
+ addi r1, r1, 0x10
blr
-CloudD_Execute:
- b Cloud_death_execute
- blr
-
.global TEX_CloudLT_A
TEX_CloudLT_A: