summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-02 19:02:23 +0100
committerTreeki <treeki@gmail.com>2013-02-02 19:02:23 +0100
commit510b3784f5f108151a64167a4a79686dba99efab (patch)
treebbf7fbcb4acb704cd3c44be642abb6cddd5912b8 /src
parent6b12a531091c032c9299a1a260a22eacf226c598 (diff)
downloadkamek-510b3784f5f108151a64167a4a79686dba99efab.tar.gz
kamek-510b3784f5f108151a64167a4a79686dba99efab.zip
boo Z order thing
Diffstat (limited to '')
-rwxr-xr-xsrc/spritetex.S20
1 files changed, 19 insertions, 1 deletions
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
+