diff options
author | Treeki <treeki@gmail.com> | 2011-05-17 04:58:43 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-05-17 04:58:43 +0200 |
commit | 5495ac81a284b7c9b91f9dbc8452827b32f73212 (patch) | |
tree | b7231bba792d604215b3fd48be853dba87e25f6d | |
parent | 5a419da6d4b948375b4e9ff1c5175460128840f4 (diff) | |
download | kamek-5495ac81a284b7c9b91f9dbc8452827b32f73212.tar.gz kamek-5495ac81a284b7c9b91f9dbc8452827b32f73212.zip |
sprite texture name generation no longer clobbers r6..9
-rw-r--r-- | src/spritetex.S | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/spritetex.S b/src/spritetex.S index 7464820..0f89cd5 100644 --- a/src/spritetex.S +++ b/src/spritetex.S @@ -21,11 +21,15 @@ GetTexFilenameForR5: # returned filename is in r5
# this makes it easy to use with dRes_c::GetResource
- stwu sp, -0x10(sp)
+ stwu sp, -0x20(sp)
mflr r0
- stw r0, 0x14(sp)
- stw r3, 0xC(sp)
- stw r4, 0x8(sp)
+ stw r0, 0x24(sp)
+ stw r3, 0x1C(sp)
+ stw r4, 0x18(sp)
+ stw r6, 0x14(sp) + stw r7, 0x10(sp) + stw r8, 0xC(sp) + stw r9, 0x8(sp) lis r3, TexFilenameBuffer@h
ori r3, r3, TexFilenameBuffer@l
@@ -39,11 +43,15 @@ GetTexFilenameForR5: lis r5, TexFilenameBuffer@h
ori r5, r5, TexFilenameBuffer@l
- lwz r0, 0x14(sp)
- lwz r3, 0xC(sp)
- lwz r4, 0x8(sp)
+ lwz r0, 0x24(sp)
+ lwz r3, 0x1C(sp)
+ lwz r4, 0x18(sp)
+ lwz r6, 0x14(sp) + lwz r7, 0x10(sp) + lwz r8, 0xC(sp) + lwz r9, 0x8(sp) mtlr r0
- addi sp, sp, 0x10
+ addi sp, sp, 0x20
blr
|