summaryrefslogtreecommitdiff
path: root/src/creditsMgr.S
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-04-08 00:34:00 +0200
committerTreeki <treeki@gmail.com>2013-04-08 00:34:36 +0200
commit07ad92c380bdd6b3fd89c2fc159351908ec10f37 (patch)
tree96589206207a192a7fbd437727b7b985fe5f4a79 /src/creditsMgr.S
parent83efa14988407c6bb0a05815d27eaf5c20b4d379 (diff)
downloadkamek-07ad92c380bdd6b3fd89c2fc159351908ec10f37.tar.gz
kamek-07ad92c380bdd6b3fd89c2fc159351908ec10f37.zip
add Credits Manager sprite
Diffstat (limited to '')
-rw-r--r--src/creditsMgr.S60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/creditsMgr.S b/src/creditsMgr.S
new file mode 100644
index 0000000..cf5e809
--- /dev/null
+++ b/src/creditsMgr.S
@@ -0,0 +1,60 @@
+.text
+.extern StaffCreditsAddCoin
+.extern CreditsModeActive
+.extern continueAddToCoinCount
+.global StaffCreditsAddAllCoins
+StaffCreditsAddAllCoins:
+ lis r4, CreditsModeActive@h
+ ori r4, r4, CreditsModeActive@l
+ lbz r4, 0(r4)
+ cmpwi r4, 1
+ beq isCredits
+ stwu r1, -0x40(r1)
+ b continueAddToCoinCount
+isCredits:
+ b StaffCreditsAddCoin
+
+
+.extern continueAddToScore
+.global StaffCreditsNoScore
+StaffCreditsNoScore:
+ lis r9, CreditsModeActive@h
+ ori r9, r9, CreditsModeActive@l
+ lbz r9, 0(r9)
+ cmpwi r9, 1
+ beqlr
+ cmpwi r5, -1
+ b continueAddToScore
+
+
+.global AutoScrollInjector
+.extern BG_GM_ptr
+AutoScrollInjector:
+ lis r3, CameraLockEnabled@h
+ ori r3, r3, CameraLockEnabled@l
+ lbz r3, 0(r3)
+ cmpwi r3, 1
+ bnelr
+
+ lis r3, BG_GM_ptr@h
+ ori r3, r3, BG_GM_ptr@l
+ lwz r3, 0(r3)
+
+ lis r4, CameraLockPosition@h
+ ori r4, r4, CameraLockPosition@l
+
+ addis r3, r3, 9
+ lfs f1, 0(r4)
+ stfs f1, -0x178(r3)
+ lfs f1, 4(r4)
+ stfs f1, -0x174(r3)
+ blr
+
+
+
+.data
+.global CameraLockEnabled
+.global CameraLockPosition
+CameraLockEnabled: .byte 0
+.align 4
+CameraLockPosition: .float 0.0, 0.0 \ No newline at end of file