diff options
-rwxr-xr-x | src/spritetex.S | 50 |
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: |