From 5495ac81a284b7c9b91f9dbc8452827b32f73212 Mon Sep 17 00:00:00 2001 From: Treeki Date: Tue, 17 May 2011 04:58:43 +0200 Subject: sprite texture name generation no longer clobbers r6..9 --- src/spritetex.S | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src') 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 -- cgit v1.2.3