diff options
author | Treeki <treeki@gmail.com> | 2013-02-28 05:49:03 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-28 05:49:03 +0100 |
commit | b8848b5f806addd48c20c0aa8606d281ec00d23f (patch) | |
tree | 7d766e1ab14b4c32f23fb7cbaaa785895133a3e2 | |
parent | 88db26c73cbd537fa98072cbc2c6eed185282b6d (diff) | |
download | kamek-b8848b5f806addd48c20c0aa8606d281ec00d23f.tar.gz kamek-b8848b5f806addd48c20c0aa8606d281ec00d23f.zip |
stuff for the big renga block
Diffstat (limited to '')
-rw-r--r-- | spritetex.yaml | 15 | ||||
-rwxr-xr-x | src/spritetex.S | 41 |
2 files changed, 56 insertions, 0 deletions
diff --git a/spritetex.yaml b/spritetex.yaml index a2139f2..c4d7e0d 100644 --- a/spritetex.yaml +++ b/spritetex.yaml @@ -1,6 +1,21 @@ --- source_files: [../src/spritetex.S] hooks: + - name: BigBlockSound1 + type: branch_insn + branch_type: bl + src_addr_pal: 0x809B8EBC + target_func: 'BigBlockSound' + - name: BigBlockSound2 + type: branch_insn + branch_type: bl + src_addr_pal: 0x809B9040 + target_func: 'BigBlockSound' + - name: BigBlockLeapingItem + type: branch_insn + branch_type: bl + src_addr_pal: 0x809B91A4 + target_func: 'BigBlockLeapingItem' # - name: BlackClouds # type: patch diff --git a/src/spritetex.S b/src/spritetex.S index f5d5ee5..7c342d8 100755 --- a/src/spritetex.S +++ b/src/spritetex.S @@ -21,6 +21,47 @@ .set sp, 1 +.global BigBlockSound +.extern Delete__7fBase_cFv +.extern PlaySoundWithFunctionB4 +.extern SoundRelatedClass +.extern DetachSound__Q34nw4r3snd11SoundHandleFv +BigBlockSound: + stwu r1, -0x10(r1) + mflr r0 + stw r0, 0x14(r1) + stw r31, 8(r1) + mr r31, r3 + + # create a SoundHandle + li r3, 0 + stw r3, 0xC(r1) + + # call PSWFB4 + lis r3, SoundRelatedClass@h + ori r3, r3, SoundRelatedClass@l + lwz r3, 0(r3) + addi r4, r1, 0xC + li r5, 510 + li r6, 1 + bl PlaySoundWithFunctionB4 + + # destroy SoundHandle + addi r3, r1, 0xC + bl DetachSound__Q34nw4r3snd11SoundHandleFv + + mr r3, r31 + lwz r31, 8(r1) + lwz r0, 0x14(r1) + mtlr r0 + addi r1, r1, 0x10 + b Delete__7fBase_cFv + +.global BigBlockLeapingItem +BigBlockLeapingItem: + oris r0, r0, 0xD00 + blr + .global BooZOrder BooZOrder: mr r3, r30 |