diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-05-17 15:46:28 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-05-17 15:46:28 -0500 |
commit | 2250fae42d1cae329924f402b19523c771f10710 (patch) | |
tree | fd52571863bba1aeb4120b27e89d5c240f88b955 /src | |
parent | 67ecb74a9c0432af36bccdca69a1c461035a3f6d (diff) | |
download | kamek-2250fae42d1cae329924f402b19523c771f10710.tar.gz kamek-2250fae42d1cae329924f402b19523c771f10710.zip |
Submitted for Treeki's perusal
Diffstat (limited to '')
-rw-r--r-- | src/growup.s | 92 |
1 files changed, 67 insertions, 25 deletions
diff --git a/src/growup.s b/src/growup.s index 91576f9..f0c513c 100644 --- a/src/growup.s +++ b/src/growup.s @@ -19,10 +19,52 @@ -LoadFromSettings: +LoadFromSettingsS: # we can trash r10 for now, it's not supposed to be guaranteed anyway lwz r10, 4(r3) # get the sprite settings - srwi r10, r10, 20 # get the highest nybble as r10 (maps to Nyb5 in Reggie) + srwi r10, r10, 20 # get the highest nybble as r10 (maps to Nyb7 in Reggie) + andi. r10, r10, 0xF
+ + # first off, get the value from the lookup table + lis r11, LookupTable@h + ori r11, r11, LookupTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f8, r11, r10 # get it from the array + blr + + +LoadFromSettingsSF: + # we can trash r10 for now, it's not supposed to be guaranteed anyway + lwz r10, 4(r3) # get the sprite settings + srwi r10, r10, 28 # get the highest nybble as r10 (maps to Nyb5 in Reggie) + andi. r10, r10, 0xF
+ + # first off, get the value from the lookup table + lis r11, LookupTable@h + ori r11, r11, LookupTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f8, r11, r10 # get it from the array + blr + + +LoadFromSettingsC: + # we can trash r10 for now, it's not supposed to be guaranteed anyway + lwz r10, 4(r4) # get the sprite settings + srwi r10, r10, 20 # get the highest nybble as r10 (maps to Nyb7 in Reggie) + andi. r10, r10, 0xF
+ + # first off, get the value from the lookup table + lis r11, LookupTable@h + ori r11, r11, LookupTable@l + slwi r10, r10, 2 # size *= 4 (size of float) + lfsx f8, r11, r10 # get it from the array + blr + + +LoadFromSettingsCF: + # we can trash r10 for now, it's not supposed to be guaranteed anyway + lwz r10, 4(r4) # get the sprite settings + srwi r10, r10, 28 # get the highest nybble as r10 (maps to Nyb5 in Reggie) andi. r10, r10, 0xF
# first off, get the value from the lookup table @@ -33,6 +75,7 @@ LoadFromSettings: blr + ModelNoChanges: lwz r4, 0x47C(r3) lfs f0, 0xDC(r4) @@ -57,20 +100,21 @@ ModifyGlobalSizes: cmpwi r10, 0 beq ModelNoChanges - # Load 1 - lis r10, One@h - ori r10, r10, One@l - lfs f7, 0(r10) - - # Load Global + # Else, use Global lis r11, GlobalSpriteSize@h ori r11, r11, GlobalSpriteSize@l lfs f8, 0(r11) - - # If Global == 1.0, - fcmpu cr0, f7, f8 + mflr r9 - beql cr0, LoadFromSettings + + # Load from Nyb5 Settings if SizerOn is 1 + cmpwi r10, 1 + beql LoadFromSettingsSF + + # Load from Nyb7 Settings if SizerOn is 2 + cmpwi r10, 2 + beql LoadFromSettingsS + mtlr r9 # Modify the actor @@ -161,20 +205,21 @@ ModifyCollision: cmpwi r10, 0 beq CollisionNoChanges - # Load 1 - lis r10, One@h - ori r10, r10, One@l - lfs f7, 0(r10) - - # Load Global + # Else, use Global lis r11, GlobalSpriteSize@h ori r11, r11, GlobalSpriteSize@l lfs f8, 0(r11) - - # If Global == 1.0, - fcmpu cr0, f7, f8 + mflr r9 - beql cr0, LoadFromSettings + + # Load from Nyb5 Settings if SizerOn is 1 + cmpwi r10, 1 + beql LoadFromSettingsCF + + # Load from Nyb7 Settings if SizerOn is 2 + cmpwi r10, 2 + beql LoadFromSettingsC + mtlr r9 #This is the old ActivePhysics_InitWithStruct function. @@ -593,9 +638,6 @@ LakituBomb: .data -One: - .float 1.0 - .global GlobalSpriteSize GlobalSpriteSize: .float 1.0 |