summaryrefslogtreecommitdiff
path: root/src/growup.s
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/growup.s52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/growup.s b/src/growup.s
index f9b06c9..29302f1 100755
--- a/src/growup.s
+++ b/src/growup.s
@@ -464,6 +464,32 @@ TooBigToBurn:
cmpwi r10, 0
beq NotTooBigToBurn
+ cmpwi r10, 3
+ b B_GlobalCompare
+
+ cmpwi r10, 1
+ bne B_UseNyb7
+ # use nyb 5
+ lwz r6, 4(r31)
+ srwi r6, r6, 28
+ b B_GotNyb
+B_UseNyb7:
+ # use nyb 7
+ extrwi r6, r6, 4, 8
+B_GotNyb:
+ cmpwi r6, 7
+ bge B_Dont
+ b NotTooBigToBurn
+
+B_GlobalCompare:
+ lis r6, GlobalSpriteSize@h
+ ori r6, r6, GlobalSpriteSize@l
+ lwz r6, 0(r6)
+ lis r7, 0x3F80
+ cmpw r6, r7
+ beq NotTooBigToBurn
+
+B_Dont:
stb r30, 0x34(r1)
lwz r31, 0x4C(r1)
stb r29, 0x35(r1)
@@ -498,6 +524,32 @@ TooBigToFreeze:
cmpwi r10, 0
beq NotTooBigToFreeze
+ cmpwi r10, 3
+ b F_GlobalCompare
+
+ cmpwi r10, 1
+ bne F_UseNyb7
+ # use nyb 5
+ lwz r6, 4(r28)
+ srwi r6, r6, 28
+ b F_GotNyb
+F_UseNyb7:
+ # use nyb 7
+ extrwi r6, r6, 4, 8
+F_GotNyb:
+ cmpwi r6, 7
+ bge F_Dont
+ b NotTooBigToFreeze
+
+F_GlobalCompare:
+ lis r6, GlobalSpriteSize@h
+ ori r6, r6, GlobalSpriteSize@l
+ lwz r6, 0(r6)
+ lis r7, 0x3F80
+ cmpw r6, r7
+ beq NotTooBigToFreeze
+
+F_Dont:
lwz r31, 0x1C(r1)
li r3, 1
lwz r30, 0x18(r1)