diff options
author | Treeki <treeki@gmail.com> | 2011-05-17 04:59:17 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-05-17 04:59:17 +0200 |
commit | dc60abac09195b10032ea97caf3dff5fe709fbab (patch) | |
tree | 9c526bcf21820355d61fedd9953e2971b93e2ea8 | |
parent | 351ecd543045cf719bdbe955d5ee97e5b74e4592 (diff) | |
download | kamek-dc60abac09195b10032ea97caf3dff5fe709fbab.tar.gz kamek-dc60abac09195b10032ea97caf3dff5fe709fbab.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
|