diff options
author | Treeki <treeki@gmail.com> | 2011-03-23 21:39:58 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-03-23 21:39:58 +0100 |
commit | f7e7a1eea2e66ea507fc5a2b0813ec02493133a9 (patch) | |
tree | ea7fba70961c0969d0b59d5ff280662dbecd57df /src/scene.S | |
parent | a830e87d71ffece4b0a6285d4bd0336686e7f446 (diff) | |
download | kamek-f7e7a1eea2e66ea507fc5a2b0813ec02493133a9.tar.gz kamek-f7e7a1eea2e66ea507fc5a2b0813ec02493133a9.zip |
added HUD support and some more debug stuff
Diffstat (limited to '')
-rw-r--r-- | src/scene.S | 68 |
1 files changed, 66 insertions, 2 deletions
diff --git a/src/scene.S b/src/scene.S index 8a8404c..d4e1ac8 100644 --- a/src/scene.S +++ b/src/scene.S @@ -8,6 +8,7 @@ .extern AssignAnmScnToLightInfo .extern LoadBlight .extern LoadBlmap +.extern OSReport .text @@ -22,8 +23,16 @@ LoadMapScene: stw r0, 0x34(sp) stw r31, 0x2C(sp) + stw r30, 0x28(sp) + stw r29, 0x24(sp) + lis r30, m_str@h + ori r30, r30, m_str@l + mr r3, r30 + li r4, 1 + crclr 4*cr1+eq + bl OSReport lis r3, currentHeap@h ori r3, r3, currentHeap@l @@ -37,6 +46,10 @@ LoadMapScene: bl MakeScene + mr r3, r30 + li r4, 2 + crclr 4*cr1+eq + bl OSReport # Now make the actual scene! # Get light info @@ -44,9 +57,15 @@ LoadMapScene: bl GetSceneLightInfo mr r31, r3 + mr r3, r30 + li r4, 3 + crclr 4*cr1+eq + bl OSReport + # Get scene/scene.brres lis r3, DVDClass@h ori r3, r3, DVDClass@l + lwz r3, 0(r3) addi r3, r3, 4 lis r4, EnvWorld@h @@ -60,17 +79,32 @@ LoadMapScene: # Got that, now get the AnmScn we want (MainSelect) stw r3, 0x0C(sp) #ResFile + mr r3, r30 + li r4, 4 + crclr 4*cr1+eq + bl OSReport + addi r3, sp, 0xC lis r4, MainSelect@h ori r4, r4, MainSelect@l bl GetAnmScn stw r3, 0x10(sp) + mr r3, r30 + li r4, 5 + crclr 4*cr1+eq + bl OSReport + # Bind it addi r3, sp, 0x10 addi r4, sp, 0x10 bl BindAnmScn + mr r3, r30 + li r4, 6 + crclr 4*cr1+eq + bl OSReport + # Add it to lightinfo mr r3, r31 #This addi r4, sp, 0x10 #AnmScn pointer @@ -83,11 +117,16 @@ LoadMapScene: bl AssignAnmScnToLightInfo + mr r3, r30 + li r4, 7 + crclr 4*cr1+eq + bl OSReport # Now set up the rest of the scene # Get blight lis r3, DVDClass@h ori r3, r3, DVDClass@l + lwz r3, 0(r3) addi r3, r3, 4 lis r4, EnvWorld@h @@ -97,17 +136,28 @@ LoadMapScene: ori r5, r5, BlightW1@l bl GetRes + mr r29, r3 + + mr r3, r30 + li r4, 8 + crclr 4*cr1+eq + bl OSReport # Load it into lightinfo - mr r4, r3 mr r3, r31 + mr r4, r29 bl LoadBlight + mr r3, r30 + li r4, 9 + crclr 4*cr1+eq + bl OSReport # Do the same for blmap lis r3, DVDClass@h ori r3, r3, DVDClass@l + lwz r3, 0(r3) addi r3, r3, 4 lis r4, EnvWorld@h @@ -117,14 +167,26 @@ LoadMapScene: ori r5, r5, BlmapW1@l bl GetRes + mr r29, r3 + + mr r3, r30 + li r4, 10 + crclr 4*cr1+eq + bl OSReport # Load it into its class - mr r4, r3 lwz r3, 0x14(r31) + mr r4, r29 bl LoadBlmap + mr r3, r30 + li r4, 11 + crclr 4*cr1+eq + bl OSReport # DONE!! + lwz r29, 0x24(sp) + lwz r30, 0x28(sp) lwz r31, 0x2C(sp) lwz r0, 0x34(sp) @@ -145,5 +207,7 @@ Zero: .float 0.0 BlightW1: .string "light/W8.blight" BlmapW1: .string "light/W8.blmap" +m_str: .string "LMS:%d\n" + .align 4 |