diff options
author | Treeki <treeki@gmail.com> | 2012-09-16 17:32:09 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-16 17:32:09 +0200 |
commit | eb4b6edcbef13c80b0051abe9dc89c93e7a960d0 (patch) | |
tree | 1a3ecca3aa9db834249dacf58ba60e127a910dca | |
parent | 7404c596e96bf18f458f10fb8f23ca6e1a25ca7d (diff) | |
download | kamek-file-select.tar.gz kamek-file-select.zip |
a bugfix, and some debug codefile-select
-rw-r--r-- | fileselect.yaml | 2 | ||||
-rw-r--r-- | src/fileselect.S | 35 |
2 files changed, 37 insertions, 0 deletions
diff --git a/fileselect.yaml b/fileselect.yaml index 5b2ac2c..a432a13 100644 --- a/fileselect.yaml +++ b/fileselect.yaml @@ -147,4 +147,6 @@ hooks: - {name: DFNiceTitle, type: branch_insn, branch_type: bl, src_addr_pal: 0x8077D044, target_func: 'DFNiceTitle'} - {name: DFNiceWorldName, type: branch_insn, branch_type: bl, src_addr_pal: 0x8077DA10, target_func: 'DFNiceWorldName'} + - {name: FSDebugStates, type: add_func_pointer, src_addr_pal: 0x80943E38, target_func: 'FSDebugStates'} + diff --git a/src/fileselect.S b/src/fileselect.S index 0c1590c..faa6f48 100644 --- a/src/fileselect.S +++ b/src/fileselect.S @@ -2,6 +2,8 @@ .set rtoc,2 .text +.extern OSReport + .extern enableNonLoopAnim__Q23m2d13EmbedLayout_cFib .global FSShowCD, FSHideCD FSShowCD: @@ -66,6 +68,7 @@ DFNiceWorldName: lis r7, NewerWorldNames@h ori r7, r7, NewerWorldNames@l lwzx r4, r7, r6 + li r5, 0 mr r3, r20 lwz r12, 0(r3) @@ -79,9 +82,41 @@ DFNiceWorldName: addi r1, r1, 0x10 blr +.global FSDebugStates +FSDebugStates: + stwu r1, -0x10(r1) + mflr r0 + stw r0, 0x14(r1) + stw r31, 0xC(r1) + stw r30, 0x8(r1) + mr r31, r3 + mr r30, r4 + + lis r3, FSStateDebugStr@h + ori r3, r3, FSStateDebugStr@l + crclr 4*cr1+eq + lwz r4, 4(r4) + bl OSReport + + mr r3, r31 + mr r4, r30 + lwzu r12, 0x18(r3) + lwz r12, 0x18(r12) + mtctr r12 + bctrl + + lwz r31, 0xC(r1) + lwz r30, 0x8(r1) + lwz r0, 0x14(r1) + mtlr r0 + addi r1, r1, 0x10 + blr + .align 4 .data +FSStateDebugStr: .string "State: %s\n" + .global FSDummyBrlanName, FSDummyGroup, FSDummyPane FSDummyBrlanName: .string "fileSelectBase_18_DummyAnim.brlan" FSDummyGroup: .string "DummyGroup" |