diff options
-rw-r--r-- | spritetex.yaml | 7 | ||||
-rwxr-xr-x | src/spritetex.S | 20 |
2 files changed, 26 insertions, 1 deletions
diff --git a/spritetex.yaml b/spritetex.yaml index 0e0a1b0..5207f39 100644 --- a/spritetex.yaml +++ b/spritetex.yaml @@ -770,3 +770,10 @@ hooks: type: add_func_pointer src_addr_pal: 0x80AE1868 target_func: 'CloudLT_Execute' + + - name: BooZOrder + type: branch_insn + branch_type: bl + src_addr_pal: 0x80AAE8E0 + target_func: 'BooZOrder' + diff --git a/src/spritetex.S b/src/spritetex.S index 883ea7b..8a19aed 100755 --- a/src/spritetex.S +++ b/src/spritetex.S @@ -18,10 +18,26 @@ .text .align 4 -.global GetTexFilenameForR5, TexFilenameBuffer, TexFormatString .set sp, 1 +.global BooZOrder +BooZOrder: + mr r3, r30 + lwz r4, 4(r30) + extrwi. r4, r4, 4,4 + beqlr + + lis r4, Float_5000@h + ori r4, r4, Float_5000@l + lfs f1, 0xB4(r30) + lfs f2, 0(r4) + fadds f1, f1, f2 + stfs f1, 0xB4(r30) + beqlr + +.global GetTexFilenameForR5, TexFilenameBuffer, TexFormatString + GetTexFilenameForR5: # obj number should be put into r5 # returned filename is in r5 @@ -1574,3 +1590,5 @@ CloudC: .string "wny_mist.2" .align 4 +Float_5000: .float 5000.0 + |