From f3e607a3af679bc19048fdc65c5f632e72641b9b Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 15 Aug 2022 22:14:28 -0400 Subject: [PATCH] Renaming & more CActor progress Former-commit-id: bcfefcc34ae220e5d4f7707c569473819f9f53a4 --- asm/GuiSys/CAuiEnergyBarT01.s | 6 +- asm/GuiSys/CAuiImagePane.s | 12 +- asm/GuiSys/CGuiGroup.s | 4 +- asm/GuiSys/CGuiPane.s | 2 +- asm/GuiSys/CGuiTextSupport.s | 4 +- asm/Kyoto/Animation/DolphinCSkinnedModel.s | 8 +- asm/Kyoto/Graphics/CCubeMaterial.s | 48 +- asm/Kyoto/Graphics/CCubeModel.s | 2 +- asm/Kyoto/Graphics/CCubeMoviePlayer.s | 2 +- asm/Kyoto/Graphics/CTevCombiners.s | 19 +- asm/Kyoto/Graphics/DolphinCGraphics.s | 1221 ++++++++--------- asm/Kyoto/Particles/CElementGen.s | 58 +- asm/Kyoto/Particles/CParticleSwoosh.s | 12 +- asm/MetaRender/CCubeRenderer.s | 128 +- asm/MetroidPrime/CActor.s | 10 +- asm/MetroidPrime/CActorParticles.s | 4 +- asm/MetroidPrime/CAnimData.s | 2 +- asm/MetroidPrime/CArtifactDoll.s | 4 +- asm/MetroidPrime/CAutoMapper.s | 12 +- asm/MetroidPrime/CCredits.s | 12 +- asm/MetroidPrime/CErrorOutputWindow.s | 6 +- asm/MetroidPrime/CFluidPlaneCPU.s | 18 +- asm/MetroidPrime/CFrontEndUI.s | 6 +- asm/MetroidPrime/CGameCubeDoll.s | 4 +- asm/MetroidPrime/CInGameGuiManager.s | 22 +- asm/MetroidPrime/CMappableObject.s | 4 +- asm/MetroidPrime/CNESEmulator.s | 12 +- asm/MetroidPrime/CProjectedShadow.s | 16 +- asm/MetroidPrime/CRainSplashGenerator.s | 4 +- asm/MetroidPrime/CSamusDoll.s | 4 +- asm/MetroidPrime/CSimpleShadow.s | 6 +- asm/MetroidPrime/CSlideShow.s | 34 +- asm/MetroidPrime/CSplashScreen.s | 14 +- asm/MetroidPrime/CStateManager.s | 24 +- asm/MetroidPrime/CTargetReticles.s | 12 +- asm/MetroidPrime/CVisorFlare.s | 10 +- asm/MetroidPrime/CWorldShadow.s | 22 +- asm/MetroidPrime/CWorldTransManager.s | 8 +- asm/MetroidPrime/Cameras/CCameraFilter.s | 42 +- asm/MetroidPrime/Cameras/CCameraManager.s | 4 +- asm/MetroidPrime/Enemies/CDrone.s | 2 +- asm/MetroidPrime/Enemies/COmegaPirate.s | 10 +- asm/MetroidPrime/Enemies/CThardus.s | 10 +- asm/MetroidPrime/Enemies/CWallCrawlerSwarm.s | 2 +- asm/MetroidPrime/HUD/CHudDecoInterface.s | 4 +- asm/MetroidPrime/Player/CGameOptions.s | 2 +- asm/MetroidPrime/Player/CGrappleArm.s | 4 +- asm/MetroidPrime/Player/CMorphBallShadow.s | 20 +- asm/MetroidPrime/Player/CPlayerGun.s | 14 +- asm/MetroidPrime/Player/CPlayerOrbit.s | 16 +- asm/MetroidPrime/Player/CPlayerVisor.s | 14 +- asm/MetroidPrime/Player/CScanDisplay.s | 8 +- .../ScriptObjects/CScriptDamageableTrigger.s | 2 +- .../ScriptObjects/CScriptPlayerActor.s | 2 +- .../ScriptObjects/CScriptVisorFlare.s | 2 +- asm/MetroidPrime/Weapons/CBomb.s | 4 +- asm/MetroidPrime/Weapons/CFlameThrower.s | 2 +- asm/MetroidPrime/Weapons/CIceProjectile.s | 4 +- asm/MetroidPrime/Weapons/CNewFlameThrower.s | 2 +- asm/MetroidPrime/Weapons/CPhazonBeam.s | 6 +- asm/MetroidPrime/Weapons/CPlasmaProjectile.s | 14 +- asm/MetroidPrime/Weapons/CPowerBeam.s | 4 +- asm/MetroidPrime/Weapons/CWaveBuster.s | 6 +- asm/MetroidPrime/main.s | 4 +- asm/Weapons/CDecal.s | 10 +- include/Kyoto/Graphics/CGraphics.hpp | 6 + include/Kyoto/Math/CAABox.hpp | 3 + include/Kyoto/Math/CFrustumPlanes.hpp | 33 + include/MetaRender/CCubeRenderer.hpp | 12 +- include/MetroidPrime/CActor.hpp | 66 +- include/MetroidPrime/CActorLights.hpp | 77 ++ include/MetroidPrime/CAnimData.hpp | 1 + include/MetroidPrime/CGameArea.hpp | 81 ++ include/MetroidPrime/CModelData.hpp | 18 +- include/MetroidPrime/CSimpleShadow.hpp | 22 + include/MetroidPrime/CStateManager.hpp | 24 +- include/MetroidPrime/CWorld.hpp | 111 ++ include/MetroidPrime/Player/CPlayerState.hpp | 11 + include/rstl/auto_ptr.hpp | 9 +- include/rstl/rc_ptr.hpp | 6 +- include/rstl/single_ptr.hpp | 2 +- src/MetroidPrime/CActor.cpp | 130 +- 82 files changed, 1579 insertions(+), 1043 deletions(-) create mode 100644 include/Kyoto/Math/CFrustumPlanes.hpp create mode 100644 include/MetroidPrime/CGameArea.hpp create mode 100644 include/MetroidPrime/CSimpleShadow.hpp create mode 100644 include/MetroidPrime/CWorld.hpp diff --git a/asm/GuiSys/CAuiEnergyBarT01.s b/asm/GuiSys/CAuiEnergyBarT01.s index ad1b15d1..05bf1abe 100644 --- a/asm/GuiSys/CAuiEnergyBarT01.s +++ b/asm/GuiSys/CAuiEnergyBarT01.s @@ -222,11 +222,11 @@ lbl_802CB440: lbl_802CB450: /* 802CB450 002C83B0 FC 1B E0 00 */ fcmpu cr0, f27, f28 /* 802CB454 002C83B4 41 82 01 84 */ beq lbl_802CB5D8 -/* 802CB458 002C83B8 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 802CB458 002C83B8 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 802CB45C 002C83BC 38 60 00 00 */ li r3, 0 -/* 802CB460 002C83C0 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 802CB460 002C83C0 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 802CB464 002C83C4 48 03 EE 55 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 802CB468 002C83C8 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802CB468 002C83C8 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802CB46C 002C83CC 38 60 00 01 */ li r3, 1 /* 802CB470 002C83D0 48 03 EE 49 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 802CB474 002C83D4 7F C3 F3 78 */ mr r3, r30 diff --git a/asm/GuiSys/CAuiImagePane.s b/asm/GuiSys/CAuiImagePane.s index c7ce5cbe..fa85a2aa 100644 --- a/asm/GuiSys/CAuiImagePane.s +++ b/asm/GuiSys/CAuiImagePane.s @@ -471,11 +471,11 @@ lbl_802CC2F0: lbl_802CC2F4: /* 802CC2F4 002C9254 57 C0 06 3F */ clrlwi. r0, r30, 0x18 /* 802CC2F8 002C9258 41 82 00 DC */ beq lbl_802CC3D4 -/* 802CC2FC 002C925C 3C 80 80 5A */ lis r4, lbl_805A5FEC@ha +/* 802CC2FC 002C925C 3C 80 80 5A */ lis r4, kEnvModulateAlpha__9CGraphics@ha /* 802CC300 002C9260 38 60 00 00 */ li r3, 0 -/* 802CC304 002C9264 38 84 5F EC */ addi r4, r4, lbl_805A5FEC@l +/* 802CC304 002C9264 38 84 5F EC */ addi r4, r4, kEnvModulateAlpha__9CGraphics@l /* 802CC308 002C9268 48 03 DF B1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 802CC30C 002C926C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802CC30C 002C926C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802CC310 002C9270 38 60 00 01 */ li r3, 1 /* 802CC314 002C9274 48 03 DF A5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 802CC318 002C9278 7F A3 EB 78 */ mr r3, r29 @@ -544,11 +544,11 @@ lbl_802CC3F8: /* 802CC3F8 002C9358 2C 03 00 01 */ cmpwi r3, 1 /* 802CC3FC 002C935C 40 82 00 8C */ bne lbl_802CC488 lbl_802CC400: -/* 802CC400 002C9360 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 802CC400 002C9360 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 802CC404 002C9364 38 60 00 00 */ li r3, 0 -/* 802CC408 002C9368 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 802CC408 002C9368 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 802CC40C 002C936C 48 03 DE AD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 802CC410 002C9370 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802CC410 002C9370 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802CC414 002C9374 38 60 00 01 */ li r3, 1 /* 802CC418 002C9378 48 03 DE A1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 802CC41C 002C937C 7F A3 EB 78 */ mr r3, r29 diff --git a/asm/GuiSys/CGuiGroup.s b/asm/GuiSys/CGuiGroup.s index 22579846..69dfb8c6 100644 --- a/asm/GuiSys/CGuiGroup.s +++ b/asm/GuiSys/CGuiGroup.s @@ -1690,9 +1690,9 @@ Draw__9CGuiFrameCFRC19CGuiWidgetDrawParms: /* 802C2780 002BF6E0 81 8C 00 10 */ lwz r12, 0x10(r12) /* 802C2784 002BF6E4 7D 89 03 A6 */ mtctr r12 /* 802C2788 002BF6E8 4E 80 04 21 */ bctrl -/* 802C278C 002BF6EC 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 802C278C 002BF6EC 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 802C2790 002BF6F0 38 60 00 00 */ li r3, 0 -/* 802C2794 002BF6F4 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 802C2794 002BF6F4 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 802C2798 002BF6F8 48 04 7B 21 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 802C279C 002BF6FC 38 60 00 01 */ li r3, 1 /* 802C27A0 002BF700 38 80 00 04 */ li r4, 4 diff --git a/asm/GuiSys/CGuiPane.s b/asm/GuiSys/CGuiPane.s index e7c68bab..61a86693 100644 --- a/asm/GuiSys/CGuiPane.s +++ b/asm/GuiSys/CGuiPane.s @@ -219,7 +219,7 @@ Draw__8CGuiPaneCFRC19CGuiWidgetDrawParms: /* 802C577C 002C26DC 4E 80 04 21 */ bctrl /* 802C5780 002C26E0 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 802C5784 002C26E4 41 82 00 74 */ beq lbl_802C57F8 -/* 802C5788 002C26E8 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802C5788 002C26E8 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802C578C 002C26EC 38 60 00 00 */ li r3, 0 /* 802C5790 002C26F0 48 04 4B 29 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 802C5794 002C26F4 88 7E 00 AB */ lbz r3, 0xab(r30) diff --git a/asm/GuiSys/CGuiTextSupport.s b/asm/GuiSys/CGuiTextSupport.s index 35f32534..aef1a4cf 100644 --- a/asm/GuiSys/CGuiTextSupport.s +++ b/asm/GuiSys/CGuiTextSupport.s @@ -1853,9 +1853,9 @@ Render__15CGuiTextSupportFv: /* 802C9550 002C64B0 93 E1 00 AC */ stw r31, 0xac(r1) /* 802C9554 002C64B4 7C 7F 1B 78 */ mr r31, r3 /* 802C9558 002C64B8 4B FF F5 D5 */ bl CheckAndRebuildRenderBuffer__15CGuiTextSupportFv -/* 802C955C 002C64BC 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 802C955C 002C64BC 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 802C9560 002C64C0 38 61 00 74 */ addi r3, r1, 0x74 -/* 802C9564 002C64C4 38 84 62 04 */ addi r4, r4, lbl_805A6204@l +/* 802C9564 002C64C4 38 84 62 04 */ addi r4, r4, mModelMatrix__9CGraphics@l /* 802C9568 002C64C8 48 04 96 0D */ bl __ct__12CTransform4fFRC12CTransform4f /* 802C956C 002C64CC C0 22 C3 F0 */ lfs f1, lbl_805AE110@sda21(r2) /* 802C9570 002C64D0 38 61 00 14 */ addi r3, r1, 0x14 diff --git a/asm/Kyoto/Animation/DolphinCSkinnedModel.s b/asm/Kyoto/Animation/DolphinCSkinnedModel.s index e5e162ed..6735c1d5 100644 --- a/asm/Kyoto/Animation/DolphinCSkinnedModel.s +++ b/asm/Kyoto/Animation/DolphinCSkinnedModel.s @@ -701,9 +701,9 @@ DoDrawCallback__13CSkinnedModelF14FCustomDrawCPv: /* 80352F48 0034FEA8 88 03 00 39 */ lbz r0, 0x39(r3) /* 80352F4C 0034FEAC 28 00 00 00 */ cmplwi r0, 0 /* 80352F50 0034FEB0 41 82 00 68 */ beq lbl_80352FB8 -/* 80352F54 0034FEB4 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 80352F54 0034FEB4 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 80352F58 0034FEB8 38 61 00 38 */ addi r3, r1, 0x38 -/* 80352F5C 0034FEBC 38 84 62 04 */ addi r4, r4, lbl_805A6204@l +/* 80352F5C 0034FEBC 38 84 62 04 */ addi r4, r4, mModelMatrix__9CGraphics@l /* 80352F60 0034FEC0 4B FB FC 15 */ bl __ct__12CTransform4fFRC12CTransform4f /* 80352F64 0034FEC4 80 BF 00 18 */ lwz r5, 0x18(r31) /* 80352F68 0034FEC8 38 61 00 08 */ addi r3, r1, 8 @@ -785,9 +785,9 @@ sub_80353064: /* 80353080 0034FFE0 88 03 00 39 */ lbz r0, 0x39(r3) /* 80353084 0034FFE4 28 00 00 00 */ cmplwi r0, 0 /* 80353088 0034FFE8 41 82 00 4C */ beq lbl_803530D4 -/* 8035308C 0034FFEC 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 8035308C 0034FFEC 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 80353090 0034FFF0 38 61 00 38 */ addi r3, r1, 0x38 -/* 80353094 0034FFF4 38 84 62 04 */ addi r4, r4, lbl_805A6204@l +/* 80353094 0034FFF4 38 84 62 04 */ addi r4, r4, mModelMatrix__9CGraphics@l /* 80353098 0034FFF8 4B FB FA DD */ bl __ct__12CTransform4fFRC12CTransform4f /* 8035309C 0034FFFC 80 BE 00 18 */ lwz r5, 0x18(r30) /* 803530A0 00350000 38 61 00 08 */ addi r3, r1, 8 diff --git a/asm/Kyoto/Graphics/CCubeMaterial.s b/asm/Kyoto/Graphics/CCubeMaterial.s index f31e751a..46dcdf81 100644 --- a/asm/Kyoto/Graphics/CCubeMaterial.s +++ b/asm/Kyoto/Graphics/CCubeMaterial.s @@ -283,8 +283,8 @@ lbl_80345990: /* 8034599C 003428FC 48 00 04 90 */ b lbl_80345E2C lbl_803459A0: /* 803459A0 00342900 3C A0 80 4C */ lis r5, lbl_804BFF50@ha -/* 803459A4 00342904 3C 60 80 5A */ lis r3, lbl_805A6204@ha -/* 803459A8 00342908 38 83 62 04 */ addi r4, r3, lbl_805A6204@l +/* 803459A4 00342904 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha +/* 803459A8 00342908 38 83 62 04 */ addi r4, r3, mModelMatrix__9CGraphics@l /* 803459AC 0034290C 3B E5 FF 50 */ addi r31, r5, lbl_804BFF50@l /* 803459B0 00342910 C0 04 00 0C */ lfs f0, 0xc(r4) /* 803459B4 00342914 C0 3F 00 00 */ lfs f1, 0(r31) @@ -460,15 +460,15 @@ lbl_80345BE0: /* 80345C4C 00342BAC 48 00 01 E0 */ b lbl_80345E2C lbl_80345C50: /* 80345C50 00342BB0 EC 01 F8 28 */ fsubs f0, f1, f31 -/* 80345C54 00342BB4 3C 60 80 5A */ lis r3, lbl_805A61D4@ha -/* 80345C58 00342BB8 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 80345C54 00342BB4 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha +/* 80345C58 00342BB8 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 80345C5C 00342BBC 38 61 00 88 */ addi r3, r1, 0x88 /* 80345C60 00342BC0 EC 00 08 24 */ fdivs f0, f0, f1 /* 80345C64 00342BC4 D0 0D A9 90 */ stfs f0, lbl_805A9550@sda21(r13) /* 80345C68 00342BC8 4B FC D0 35 */ bl GetQuickInverse__12CTransform4fCFv -/* 80345C6C 00342BCC 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 80345C6C 00342BCC 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 80345C70 00342BD0 38 61 00 B8 */ addi r3, r1, 0xb8 -/* 80345C74 00342BD4 38 A4 62 04 */ addi r5, r4, lbl_805A6204@l +/* 80345C74 00342BD4 38 A4 62 04 */ addi r5, r4, mModelMatrix__9CGraphics@l /* 80345C78 00342BD8 38 81 00 88 */ addi r4, r1, 0x88 /* 80345C7C 00342BDC 4B FC CC D5 */ bl __ml__12CTransform4fCFRC12CTransform4f /* 80345C80 00342BE0 38 61 01 18 */ addi r3, r1, 0x118 @@ -1299,7 +1299,7 @@ lbl_80346810: /* 8034682C 0034378C 38 00 00 00 */ li r0, 0 lbl_80346830: /* 80346830 00343790 54 05 07 FE */ clrlwi r5, r0, 0x1f -/* 80346834 00343794 88 6D A8 16 */ lbz r3, lbl_805A93D6@sda21(r13) +/* 80346834 00343794 88 6D A8 16 */ lbz r3, mLightActive__9CGraphics@sda21(r13) /* 80346838 00343798 88 0D A9 A0 */ lbz r0, lbl_805A9560@sda21(r13) /* 8034683C 0034379C 51 25 1D 78 */ rlwimi r5, r9, 3, 0x15, 0x1c /* 80346840 003437A0 3C 80 80 5A */ lis r4, lbl_805A53EC@ha @@ -1397,7 +1397,7 @@ lbl_8034696C: lbl_80346998: /* 80346998 003438F8 28 1E 00 01 */ cmplwi r30, 1 /* 8034699C 003438FC 41 80 00 A8 */ blt lbl_80346A44 -/* 803469A0 00343900 88 8D A8 16 */ lbz r4, lbl_805A93D6@sda21(r13) +/* 803469A0 00343900 88 8D A8 16 */ lbz r4, mLightActive__9CGraphics@sda21(r13) /* 803469A4 00343904 3C 60 80 5A */ lis r3, lbl_805A53EC@ha /* 803469A8 00343908 39 03 53 EC */ addi r8, r3, lbl_805A53EC@l /* 803469AC 0034390C 57 E7 00 3C */ rlwinm r7, r31, 0, 0, 0x1e @@ -2569,13 +2569,13 @@ HandleAnimatedUV__FPCUi9_GXTexMtx11_GXPTTexMtx: /* 80347A58 003449B8 4E 80 04 20 */ bctr .global lbl_80347A5C lbl_80347A5C: -/* 80347A5C 003449BC 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 80347A5C 003449BC 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 80347A60 003449C0 38 61 00 CC */ addi r3, r1, 0xcc -/* 80347A64 003449C4 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 80347A64 003449C4 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 80347A68 003449C8 4B FC B2 35 */ bl GetQuickInverse__12CTransform4fCFv -/* 80347A6C 003449CC 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 80347A6C 003449CC 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 80347A70 003449D0 38 61 00 FC */ addi r3, r1, 0xfc -/* 80347A74 003449D4 38 A4 62 04 */ addi r5, r4, lbl_805A6204@l +/* 80347A74 003449D4 38 A4 62 04 */ addi r5, r4, mModelMatrix__9CGraphics@l /* 80347A78 003449D8 38 81 00 CC */ addi r4, r1, 0xcc /* 80347A7C 003449DC 4B FC B4 B5 */ bl MultiplyIgnoreTranslation__12CTransform4fCFRC12CTransform4f /* 80347A80 003449E0 38 61 02 4C */ addi r3, r1, 0x24c @@ -2601,13 +2601,13 @@ lbl_80347A5C: /* 80347AD0 00344A30 48 00 05 14 */ b lbl_80347FE4 .global lbl_80347AD4 lbl_80347AD4: -/* 80347AD4 00344A34 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 80347AD4 00344A34 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 80347AD8 00344A38 38 61 00 6C */ addi r3, r1, 0x6c -/* 80347ADC 00344A3C 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 80347ADC 00344A3C 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 80347AE0 00344A40 4B FC B1 BD */ bl GetQuickInverse__12CTransform4fCFv -/* 80347AE4 00344A44 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 80347AE4 00344A44 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 80347AE8 00344A48 38 61 00 9C */ addi r3, r1, 0x9c -/* 80347AEC 00344A4C 38 A4 62 04 */ addi r5, r4, lbl_805A6204@l +/* 80347AEC 00344A4C 38 A4 62 04 */ addi r5, r4, mModelMatrix__9CGraphics@l /* 80347AF0 00344A50 38 81 00 6C */ addi r4, r1, 0x6c /* 80347AF4 00344A54 4B FC AE 5D */ bl __ml__12CTransform4fCFRC12CTransform4f /* 80347AF8 00344A58 38 61 02 1C */ addi r3, r1, 0x21c @@ -2753,9 +2753,9 @@ lbl_80347CF0: /* 80347D08 00344C68 48 00 02 DC */ b lbl_80347FE4 .global lbl_80347D0C lbl_80347D0C: -/* 80347D0C 00344C6C 3C 60 80 5A */ lis r3, lbl_805A6204@ha +/* 80347D0C 00344C6C 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha /* 80347D10 00344C70 83 9F 00 60 */ lwz r28, 0x60(r31) -/* 80347D14 00344C74 3B 63 62 04 */ addi r27, r3, lbl_805A6204@l +/* 80347D14 00344C74 3B 63 62 04 */ addi r27, r3, mModelMatrix__9CGraphics@l /* 80347D18 00344C78 83 BF 00 64 */ lwz r29, 0x64(r31) /* 80347D1C 00344C7C C0 42 CB D8 */ lfs f2, lbl_805AE8F8@sda21(r2) /* 80347D20 00344C80 38 61 01 BC */ addi r3, r1, 0x1bc @@ -2839,21 +2839,21 @@ lbl_80347D0C: /* 80347E58 00344DB8 48 00 01 8C */ b lbl_80347FE4 .global lbl_80347E5C lbl_80347E5C: -/* 80347E5C 00344DBC 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 80347E5C 00344DBC 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 80347E60 00344DC0 38 61 00 0C */ addi r3, r1, 0xc -/* 80347E64 00344DC4 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 80347E64 00344DC4 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 80347E68 00344DC8 4B FC AE 35 */ bl GetQuickInverse__12CTransform4fCFv -/* 80347E6C 00344DCC 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 80347E6C 00344DCC 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 80347E70 00344DD0 38 61 00 3C */ addi r3, r1, 0x3c -/* 80347E74 00344DD4 38 A4 62 04 */ addi r5, r4, lbl_805A6204@l +/* 80347E74 00344DD4 38 A4 62 04 */ addi r5, r4, mModelMatrix__9CGraphics@l /* 80347E78 00344DD8 38 81 00 0C */ addi r4, r1, 0xc /* 80347E7C 00344DDC 4B FC B0 B5 */ bl MultiplyIgnoreTranslation__12CTransform4fCFRC12CTransform4f /* 80347E80 00344DE0 38 61 01 5C */ addi r3, r1, 0x15c /* 80347E84 00344DE4 38 81 00 3C */ addi r4, r1, 0x3c /* 80347E88 00344DE8 4B FC AC ED */ bl __ct__12CTransform4fFRC12CTransform4f -/* 80347E8C 00344DEC 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 80347E8C 00344DEC 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 80347E90 00344DF0 3C C0 43 30 */ lis r6, 0x4330 -/* 80347E94 00344DF4 38 A3 61 D4 */ addi r5, r3, lbl_805A61D4@l +/* 80347E94 00344DF4 38 A3 61 D4 */ addi r5, r3, mViewMatrix__9CGraphics@l /* 80347E98 00344DF8 81 1F 00 C0 */ lwz r8, 0xc0(r31) /* 80347E9C 00344DFC C0 25 00 0C */ lfs f1, 0xc(r5) /* 80347EA0 00344E00 3C 60 80 5A */ lis r3, sZeroVector__9CVector3f@ha diff --git a/asm/Kyoto/Graphics/CCubeModel.s b/asm/Kyoto/Graphics/CCubeModel.s index 37c54747..ba742dc6 100644 --- a/asm/Kyoto/Graphics/CCubeModel.s +++ b/asm/Kyoto/Graphics/CCubeModel.s @@ -1179,7 +1179,7 @@ SetSkinningArraysCurrent__10CCubeModelCFPCfPCf: /* 803075EC 0030454C 90 01 00 14 */ stw r0, 0x14(r1) /* 803075F0 00304550 93 E1 00 0C */ stw r31, 0xc(r1) /* 803075F4 00304554 7C 7F 1B 78 */ mr r31, r3 -/* 803075F8 00304558 38 6D A7 B8 */ addi r3, r13, lbl_805A9378@sda21 +/* 803075F8 00304558 38 6D A7 B8 */ addi r3, r13, sRenderState__9CGraphics@sda21 /* 803075FC 0030455C 80 DF 00 10 */ lwz r6, 0x10(r31) /* 80307600 00304560 48 00 1D 69 */ bl SetVtxState__Q29CGraphics12CRenderStateFPCfPCfPCUi /* 80307604 00304564 7F E3 FB 78 */ mr r3, r31 diff --git a/asm/Kyoto/Graphics/CCubeMoviePlayer.s b/asm/Kyoto/Graphics/CCubeMoviePlayer.s index 11cb05c6..2d3c2bad 100644 --- a/asm/Kyoto/Graphics/CCubeMoviePlayer.s +++ b/asm/Kyoto/Graphics/CCubeMoviePlayer.s @@ -550,7 +550,7 @@ DrawFrame__12CMoviePlayerFRC9CVector3fRC9CVector3fRC9CVector3fRC9CVector3f: /* 8035BC38 00358B98 88 1B 00 F4 */ lbz r0, 0xf4(r27) /* 8035BC3C 00358B9C 1C A3 00 28 */ mulli r5, r3, 0x28 /* 8035BC40 00358BA0 80 DB 00 8C */ lwz r6, 0x8c(r27) -/* 8035BC44 00358BA4 8B 2D A8 14 */ lbz r25, lbl_805A93D4@sda21(r13) +/* 8035BC44 00358BA4 8B 2D A8 14 */ lbz r25, mLastFrameUsedAbove__9CGraphics@sda21(r13) /* 8035BC48 00358BA8 54 04 D7 FE */ rlwinm r4, r0, 0x1a, 0x1f, 0x1f /* 8035BC4C 00358BAC 7F 23 CB 78 */ mr r3, r25 /* 8035BC50 00358BB0 7F 46 2A 14 */ add r26, r6, r5 diff --git a/asm/Kyoto/Graphics/CTevCombiners.s b/asm/Kyoto/Graphics/CTevCombiners.s index 4d2297d8..1b1fda7a 100644 --- a/asm/Kyoto/Graphics/CTevCombiners.s +++ b/asm/Kyoto/Graphics/CTevCombiners.s @@ -1,6 +1,7 @@ .include "macros.inc" -.comm lbl_805A564C, 0x4C, 4 +# Moved from kEnvPassthru__9CGraphics in retail +.comm kEnvPassthru__13CTevCombiners, 0x4C, 4 .section .ctors, "wa" lbl_ctor: @@ -38,11 +39,11 @@ lbl_805A9360: ResetStates__13CTevCombinersFv: /* 80308EA8 00305E08 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80308EAC 00305E0C 7C 08 02 A6 */ mflr r0 -/* 80308EB0 00305E10 3C 60 80 5A */ lis r3, lbl_805A564C@ha +/* 80308EB0 00305E10 3C 60 80 5A */ lis r3, kEnvPassthru__13CTevCombiners@ha /* 80308EB4 00305E14 38 AD 9C 60 */ addi r5, r13, lbl_805A8820@sda21 /* 80308EB8 00305E18 90 01 00 14 */ stw r0, 0x14(r1) /* 80308EBC 00305E1C 38 00 00 00 */ li r0, 0 -/* 80308EC0 00305E20 38 63 56 4C */ addi r3, r3, lbl_805A564C@l +/* 80308EC0 00305E20 38 63 56 4C */ addi r3, r3, kEnvPassthru__13CTevCombiners@l /* 80308EC4 00305E24 38 80 00 00 */ li r4, 0 /* 80308EC8 00305E28 98 0D 9C 60 */ stb r0, lbl_805A8820@sda21(r13) /* 80308ECC 00305E2C 98 05 00 01 */ stb r0, 1(r5) @@ -123,9 +124,9 @@ SetPassCombiners__13CTevCombinersFiRCQ213CTevCombiners8CTevPass: SetupPass__13CTevCombinersFiRCQ213CTevCombiners8CTevPass: /* 80308FD8 00305F38 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80308FDC 00305F3C 7C 08 02 A6 */ mflr r0 -/* 80308FE0 00305F40 3C A0 80 5A */ lis r5, lbl_805A564C@ha +/* 80308FE0 00305F40 3C A0 80 5A */ lis r5, kEnvPassthru__13CTevCombiners@ha /* 80308FE4 00305F44 90 01 00 14 */ stw r0, 0x14(r1) -/* 80308FE8 00305F48 38 05 56 4C */ addi r0, r5, lbl_805A564C@l +/* 80308FE8 00305F48 38 05 56 4C */ addi r0, r5, kEnvPassthru__13CTevCombiners@l /* 80308FEC 00305F4C 7C 04 00 40 */ cmplw r4, r0 /* 80308FF0 00305F50 93 E1 00 0C */ stw r31, 0xc(r1) /* 80308FF4 00305F54 7C 7F 1B 78 */ mr r31, r3 @@ -151,9 +152,9 @@ lbl_80309020: DeletePass__13CTevCombinersFi: /* 80309034 00305F94 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80309038 00305F98 7C 08 02 A6 */ mflr r0 -/* 8030903C 00305F9C 3C 80 80 5A */ lis r4, lbl_805A564C@ha +/* 8030903C 00305F9C 3C 80 80 5A */ lis r4, kEnvPassthru__13CTevCombiners@ha /* 80309040 00305FA0 90 01 00 14 */ stw r0, 0x14(r1) -/* 80309044 00305FA4 38 84 56 4C */ addi r4, r4, lbl_805A564C@l +/* 80309044 00305FA4 38 84 56 4C */ addi r4, r4, kEnvPassthru__13CTevCombiners@l /* 80309048 00305FA8 93 E1 00 0C */ stw r31, 0xc(r1) /* 8030904C 00305FAC 7C 7F 1B 78 */ mr r31, r3 /* 80309050 00305FB0 4B FF FF 59 */ bl SetPassCombiners__13CTevCombinersFiRCQ213CTevCombiners8CTevPass @@ -283,9 +284,9 @@ __sinit_CTevCombiners_cpp: /* 80309200 00306160 38 80 00 0F */ li r4, 0xf /* 80309204 00306164 4B FF FF 21 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 80309208 00306168 80 A1 00 24 */ lwz r5, 0x24(r1) -/* 8030920C 0030616C 3C 60 80 5A */ lis r3, lbl_805A564C@ha +/* 8030920C 0030616C 3C 60 80 5A */ lis r3, kEnvPassthru__13CTevCombiners@ha /* 80309210 00306170 81 21 00 20 */ lwz r9, 0x20(r1) -/* 80309214 00306174 38 63 56 4C */ addi r3, r3, lbl_805A564C@l +/* 80309214 00306174 38 63 56 4C */ addi r3, r3, kEnvPassthru__13CTevCombiners@l /* 80309218 00306178 81 01 00 1C */ lwz r8, 0x1c(r1) /* 8030921C 0030617C 38 81 00 38 */ addi r4, r1, 0x38 /* 80309220 00306180 80 01 00 18 */ lwz r0, 0x18(r1) diff --git a/asm/Kyoto/Graphics/DolphinCGraphics.s b/asm/Kyoto/Graphics/DolphinCGraphics.s index 4b1703af..aab544c5 100644 --- a/asm/Kyoto/Graphics/DolphinCGraphics.s +++ b/asm/Kyoto/Graphics/DolphinCGraphics.s @@ -7,9 +7,8 @@ lbl_ctor: .section .data .balign 8 -.global lbl_803ED910 -lbl_803ED910: - # ROM: 0x3EA910 +.global mViewport__9CGraphics +mViewport__9CGraphics: .4byte 0 .4byte 0 .4byte 0x00000280 @@ -17,9 +16,8 @@ lbl_803ED910: .4byte 0x43A00000 .4byte 0x43700000 -.global lbl_803ED928 -lbl_803ED928: - # ROM: 0x3EA928 +.global mLightTypes__9CGraphics +mLightTypes__9CGraphics: .4byte 0x00000002 .4byte 0x00000002 .4byte 0x00000002 @@ -31,7 +29,6 @@ lbl_803ED928: .global lbl_803ED948 lbl_803ED948: - # ROM: 0x3EA948 .4byte lbl_8030A4CC .4byte lbl_8030A614 .4byte lbl_8030A754 @@ -44,222 +41,212 @@ lbl_803ED948: .section .sdata .balign 8 -.global lbl_805A8828 -lbl_805A8828: - # ROM: 0x3F61C8 - .4byte 0x805A564C +.global kEnvPassthru__9CGraphics +kEnvPassthru__9CGraphics: + .4byte kEnvPassthru__13CTevCombiners -.global lbl_805A882C -lbl_805A882C: - # ROM: 0x3F61CC - .4byte 0x01000000 +.global mIsBeginSceneClearFb__9CGraphics +mIsBeginSceneClearFb__9CGraphics: + .byte 0x01 + .balign 4 -.global lbl_805A8830 -lbl_805A8830: - # ROM: 0x3F61D0 +.global mDepthFunc__9CGraphics +mDepthFunc__9CGraphics: .4byte 0x00000003 -.global lbl_805A8834 -lbl_805A8834: - # ROM: 0x3F61D4 +.global mCurrentPrimitive__9CGraphics +mCurrentPrimitive__9CGraphics: .4byte 0x000000B8 -.global lbl_805A8838 -lbl_805A8838: - # ROM: 0x3F61D8 +.global mDepthFar__9CGraphics +mDepthFar__9CGraphics: .float 1.0 -.global lbl_805A883C -lbl_805A883C: - # ROM: 0x3F61DC +.global mClearDepthValue__9CGraphics +mClearDepthValue__9CGraphics: .4byte 0x00FFFFFF -.global lbl_805A8840 -lbl_805A8840: - # ROM: 0x3F61E0 +.global mIsGXModelMatrixIdentity__9CGraphics +mIsGXModelMatrixIdentity__9CGraphics: .byte 0x01 -.global lbl_805A8841 -lbl_805A8841: - # ROM: 0x3F61E1 +.global mFirstFrame__9CGraphics +mFirstFrame__9CGraphics: .byte 0x01 -.global lbl_805A8842 -lbl_805A8842: - # ROM: 0x3F61E2 +.global mUseVideoFilter__9CGraphics +mUseVideoFilter__9CGraphics: .2byte 0x00000100 -.global lbl_805A8844 -lbl_805A8844: - # ROM: 0x3F61E4 +.global mBrightness__9CGraphics +mBrightness__9CGraphics: .float 1.0 -.global lbl_805A8848 -lbl_805A8848: - # ROM: 0x3F61E8 - .4byte 0 +.global mBrightnessMin__9CGraphics +mBrightnessMin__9CGraphics: + .float 0.0 -.global lbl_805A884C -lbl_805A884C: - # ROM: 0x3F61EC +.global mBrightnessMax__9CGraphics +mBrightnessMax__9CGraphics: .float 2.0 .section .bss .balign 8 -.lcomm lbl_80479CC0, 0x46000, 4 -.lcomm lbl_804BFCC0, 0x50, 4 -.comm lbl_805A5698, 0x7D8, 4 -.comm lbl_805A5E70, 0x4C, 4 -.comm lbl_805A5EBC, 0x4C, 4 -.comm lbl_805A5F08, 0x4C, 4 -.comm lbl_805A5F54, 0x4C, 4 -.comm lbl_805A5FA0, 0x4C, 4 -.comm lbl_805A5FEC, 0x4C, 4 -.comm lbl_805A6038, 0x4C, 4 -.comm lbl_805A6084, 0x4C, 4 -.comm lbl_805A60D0, 0xA0, 4 -.comm lbl_805A6170, 0x30, 4 -.comm lbl_805A61A0, 0xC, 4 -.comm lbl_805A61AC, 0xC, 4 -.comm lbl_805A61B8, 0x1C, 4 -.comm lbl_805A61D4, 0x30, 4 -.comm lbl_805A6204, 0x30, 4 -.comm lbl_805A6234, 0xC, 4 -.comm lbl_805A6240, 0x200, 4 -.comm lbl_805A6440, 0x80, 4 -.comm lbl_805A64C0, 0x40, 4 -.comm lbl_805A6500, 0x3C, 4 -.comm lbl_805A653C, 0x30, 4 -.comm lbl_805A656C, 0x30, 4 -.comm lbl_805A659C, 0x30, 4 -.comm lbl_805A65CC, 0x30, 4 +.lcomm sSpareFrameBuffer, 0x46000, 4 +.lcomm kEnvBlendCTandCConCF, 0x50, 4 +.comm kEnvModulateConstColor__9CGraphics, 0x4C, 4 +.comm lbl_805A56E4, 0x78C, 4 # ??? +.comm kEnvConstColor__9CGraphics, 0x4C, 4 +.comm kEnvModulate__9CGraphics, 0x4C, 4 +.comm kEnvDecal__9CGraphics, 0x4C, 4 +.comm kEnvBlend__9CGraphics, 0x4C, 4 +.comm kEnvReplace__9CGraphics, 0x4C, 4 +.comm kEnvModulateAlpha__9CGraphics, 0x4C, 4 +.comm kEnvModulateColor__9CGraphics, 0x4C, 4 +.comm kEnvModulateColorByAlpha__9CGraphics, 0x4C, 4 +.comm mLightParams, 0xA0, 4 +.comm vtxDescr, 0x30, 4 +.comm kDefaultPositionVector__9CGraphics, 0xC, 4 +.comm kDefaultDirectionVector__9CGraphics, 0xC, 4 +.comm mProj__9CGraphics, 0x1C, 4 +.comm mViewMatrix__9CGraphics, 0x30, 4 +.comm mModelMatrix__9CGraphics, 0x30, 4 +.comm mViewPoint__9CGraphics, 0xC, 4 +.comm mLightObj__9CGraphics, 0x200, 4 +.comm mTexRegions__9CGraphics, 0x80, 4 +.comm mTexRegionsCI__9CGraphics, 0x40, 4 +.comm mRenderModeObj__9CGraphics, 0x3C, 4 +.comm mGXViewPointMatrix__9CGraphics, 0x30, 4 +.comm mGXModelMatrix__9CGraphics, 0x30, 4 +.comm mGxModelView__9CGraphics, 0x30, 4 +.comm mCameraMtx__9CGraphics, 0x30, 4 .section .sbss, "wa" .balign 8 -.global lbl_805A9368 -lbl_805A9368: +.global mGraphicsInitialized__12CGraphicsSys +mGraphicsInitialized__12CGraphicsSys: .skip 0x8 -.global lbl_805A9370 -lbl_805A9370: +.global sFPSTimer +sFPSTimer: .skip 0x4 .global lbl_805A9374 lbl_805A9374: .skip 0x4 -.global lbl_805A9378 -lbl_805A9378: +.global sRenderState__9CGraphics +sRenderState__9CGraphics: .skip 0x8 -.global lbl_805A9380 -lbl_805A9380: +.global vtxBuffer__9CGraphics +vtxBuffer__9CGraphics: .skip 0x4 -.global lbl_805A9384 -lbl_805A9384: +.global nrmBuffer__9CGraphics +nrmBuffer__9CGraphics: .skip 0x4 -.global lbl_805A9388 -lbl_805A9388: +.global txtBuffer0__9CGraphics +txtBuffer0__9CGraphics: .skip 0x4 -.global lbl_805A938C -lbl_805A938C: +.global txtBuffer1__9CGraphics +txtBuffer1__9CGraphics: .skip 0x4 -.global lbl_805A9390 -lbl_805A9390: +.global clrBuffer__9CGraphics +clrBuffer__9CGraphics: .skip 0x4 -.global lbl_805A9394 -lbl_805A9394: +.global mJustReset__9CGraphics +mJustReset__9CGraphics: .skip 0x4 -.global lbl_805A9398 -lbl_805A9398: +.global mCullMode__9CGraphics +mCullMode__9CGraphics: .skip 0x4 -.global lbl_805A939C -lbl_805A939C: +.global mNumLightsActive__9CGraphics +mNumLightsActive__9CGraphics: .skip 0x4 -.global lbl_805A93A0 -lbl_805A93A0: +.global mDepthNear__9CGraphics +mDepthNear__9CGraphics: .skip 0x4 -.global lbl_805A93A4 -lbl_805A93A4: +.global mpVtxBuffer__9CGraphics +mpVtxBuffer__9CGraphics: .skip 0x4 -.global lbl_805A93A8 -lbl_805A93A8: +.global mpNrmBuffer__9CGraphics +mpNrmBuffer__9CGraphics: .skip 0x4 -.global lbl_805A93AC -lbl_805A93AC: +.global mpTxtBuffer0__9CGraphics +mpTxtBuffer0__9CGraphics: .skip 0x4 -.global lbl_805A93B0 -lbl_805A93B0: +.global mpTxtBuffer1__9CGraphics +mpTxtBuffer1__9CGraphics: .skip 0x4 -.global lbl_805A93B4 -lbl_805A93B4: +.global mpClrBuffer__9CGraphics +mpClrBuffer__9CGraphics: .skip 0x4 -.global lbl_805A93B8 -lbl_805A93B8: +.global mClearColor__9CGraphics +mClearColor__9CGraphics: .skip 0x4 -.global lbl_805A93BC -lbl_805A93BC: +.global mNumPrimitives__9CGraphics +mNumPrimitives__9CGraphics: .skip 0x4 -.global lbl_805A93C0 -lbl_805A93C0: +.global mFrameCounter__9CGraphics +mFrameCounter__9CGraphics: .skip 0x4 -.global lbl_805A93C4 -lbl_805A93C4: +.global mFramesPerSecond__9CGraphics +mFramesPerSecond__9CGraphics: .skip 0x4 -.global lbl_805A93C8 -lbl_805A93C8: +.global mLastFramesPerSecond__9CGraphics +mLastFramesPerSecond__9CGraphics: .skip 0x4 -.global lbl_805A93CC -lbl_805A93CC: +.global mNumBreakpointsWaiting__9CGraphics +mNumBreakpointsWaiting__9CGraphics: .skip 0x4 -.global lbl_805A93D0 -lbl_805A93D0: +.global mFlippingState__9CGraphics +mFlippingState__9CGraphics: .skip 0x4 -.global lbl_805A93D4 -lbl_805A93D4: +.global mLastFrameUsedAbove__9CGraphics +mLastFrameUsedAbove__9CGraphics: .skip 0x1 -.global lbl_805A93D5 -lbl_805A93D5: +.global mInterruptLastFrameUsedAbove__9CGraphics +mInterruptLastFrameUsedAbove__9CGraphics: .skip 0x1 -.global lbl_805A93D6 -lbl_805A93D6: +.global mLightActive__9CGraphics +mLightActive__9CGraphics: .skip 0x1 -.global lbl_805A93D7 -lbl_805A93D7: +.global mLightsWereOn__9CGraphics +mLightsWereOn__9CGraphics: .skip 0x1 -.global lbl_805A93D8 -lbl_805A93D8: +.global mpFrameBuf1__9CGraphics +mpFrameBuf1__9CGraphics: .skip 0x4 -.global lbl_805A93DC -lbl_805A93DC: +.global mpFrameBuf2__9CGraphics +mpFrameBuf2__9CGraphics: .skip 0x4 -.global lbl_805A93E0 -lbl_805A93E0: +.global mpCurrenFrameBuf__9CGraphics +mpCurrenFrameBuf__9CGraphics: .skip 0x4 -.global lbl_805A93E4 -lbl_805A93E4: +.global mSpareBufferSize__9CGraphics +mSpareBufferSize__9CGraphics: .skip 0x4 -.global lbl_805A93E8 -lbl_805A93E8: +.global mpSpareBuffer__9CGraphics +mpSpareBuffer__9CGraphics: .skip 0x4 -.global lbl_805A93EC -lbl_805A93EC: +.global mSpareBufferTexCacheSize__9CGraphics +mSpareBufferTexCacheSize__9CGraphics: .skip 0x4 -.global lbl_805A93F0 -lbl_805A93F0: +.global mGXDefaultTexRegionCallback__9CGraphics +mGXDefaultTexRegionCallback__9CGraphics: .skip 0x4 -.global lbl_805A93F4 -lbl_805A93F4: +.global mpFifo__9CGraphics +mpFifo__9CGraphics: .skip 0x4 -.global lbl_805A93F8 -lbl_805A93F8: +.global mpFifoObj__9CGraphics +mpFifoObj__9CGraphics: .skip 0x4 -.global lbl_805A93FC -lbl_805A93FC: +.global mRenderTimings__9CGraphics +mRenderTimings__9CGraphics: .skip 0x4 -.global lbl_805A9400 -lbl_805A9400: +.global mSecondsMod900__9CGraphics +mSecondsMod900__9CGraphics: .skip 0x4 -.global lbl_805A9404 -lbl_805A9404: +.global mpExternalTimeProvider__9CGraphics +mpExternalTimeProvider__9CGraphics: .skip 0x4 .global lbl_805A9408 lbl_805A9408: @@ -418,12 +405,12 @@ __dt__12CGraphicsSysFv: /* 8030940C 0030636C 93 C1 00 08 */ stw r30, 8(r1) /* 80309410 00306370 7C 7E 1B 79 */ or. r30, r3, r3 /* 80309414 00306374 41 82 00 2C */ beq lbl_80309440 -/* 80309418 00306378 88 0D A7 A8 */ lbz r0, lbl_805A9368@sda21(r13) +/* 80309418 00306378 88 0D A7 A8 */ lbz r0, mGraphicsInitialized__12CGraphicsSys@sda21(r13) /* 8030941C 0030637C 28 00 00 01 */ cmplwi r0, 1 /* 80309420 00306380 40 82 00 10 */ bne lbl_80309430 /* 80309424 00306384 48 00 3C 3D */ bl Shutdown__9CGraphicsFv /* 80309428 00306388 38 00 00 00 */ li r0, 0 -/* 8030942C 0030638C 98 0D A7 A8 */ stb r0, lbl_805A9368@sda21(r13) +/* 8030942C 0030638C 98 0D A7 A8 */ stb r0, mGraphicsInitialized__12CGraphicsSys@sda21(r13) lbl_80309430: /* 80309430 00306390 7F E0 07 35 */ extsh. r0, r31 /* 80309434 00306394 40 81 00 0C */ ble lbl_80309440 @@ -445,14 +432,14 @@ __ct__12CGraphicsSysFRC10COsContextRC10CMemorySysUiPv: /* 80309464 003063C4 90 01 00 14 */ stw r0, 0x14(r1) /* 80309468 003063C8 93 E1 00 0C */ stw r31, 0xc(r1) /* 8030946C 003063CC 7C 7F 1B 78 */ mr r31, r3 -/* 80309470 003063D0 88 0D A7 A8 */ lbz r0, lbl_805A9368@sda21(r13) +/* 80309470 003063D0 88 0D A7 A8 */ lbz r0, mGraphicsInitialized__12CGraphicsSys@sda21(r13) /* 80309474 003063D4 28 00 00 01 */ cmplwi r0, 1 /* 80309478 003063D8 41 82 00 18 */ beq lbl_80309490 /* 8030947C 003063DC 7C 83 23 78 */ mr r3, r4 /* 80309480 003063E0 7C C4 33 78 */ mr r4, r6 /* 80309484 003063E4 7C E5 3B 78 */ mr r5, r7 /* 80309488 003063E8 48 00 3E 05 */ bl Startup__9CGraphicsFRC10COsContextUiPv -/* 8030948C 003063EC 98 6D A7 A8 */ stb r3, lbl_805A9368@sda21(r13) +/* 8030948C 003063EC 98 6D A7 A8 */ stb r3, mGraphicsInitialized__12CGraphicsSys@sda21(r13) lbl_80309490: /* 80309490 003063F0 80 01 00 14 */ lwz r0, 0x14(r1) /* 80309494 003063F4 7F E3 FB 78 */ mr r3, r31 @@ -463,7 +450,7 @@ lbl_80309490: .global SetIsBeginSceneClearFb__9CGraphicsFb SetIsBeginSceneClearFb__9CGraphicsFb: -/* 803094A8 00306408 98 6D 9C 6C */ stb r3, lbl_805A882C@sda21(r13) +/* 803094A8 00306408 98 6D 9C 6C */ stb r3, mIsBeginSceneClearFb__9CGraphics@sda21(r13) /* 803094AC 0030640C 4E 80 00 20 */ blr .global sub_803094b0 @@ -489,9 +476,9 @@ sub_803094b0: /* 803094F8 00306458 2C 07 00 00 */ cmpwi r7, 0 /* 803094FC 0030645C 41 82 00 4C */ beq lbl_80309548 lbl_80309500: -/* 80309500 00306460 3C 60 80 5A */ lis r3, lbl_805A6500@ha +/* 80309500 00306460 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha /* 80309504 00306464 54 80 08 3C */ slwi r0, r4, 1 -/* 80309508 00306468 38 63 65 00 */ addi r3, r3, lbl_805A6500@l +/* 80309508 00306468 38 63 65 00 */ addi r3, r3, mRenderModeObj__9CGraphics@l /* 8030950C 0030646C 7C 84 28 50 */ subf r4, r4, r5 /* 80309510 00306470 A0 C3 00 0E */ lhz r6, 0xe(r3) /* 80309514 00306474 A0 A3 00 0A */ lhz r5, 0xa(r3) @@ -564,8 +551,8 @@ CanSetProgressiveMode__9CGraphicsFv: .global GetProgressiveMode__9CGraphicsFv GetProgressiveMode__9CGraphicsFv: -/* 803095F0 00306550 3C 60 80 5A */ lis r3, lbl_805A6500@ha -/* 803095F4 00306554 80 03 65 00 */ lwz r0, lbl_805A6500@l(r3) +/* 803095F0 00306550 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha +/* 803095F4 00306554 80 03 65 00 */ lwz r0, mRenderModeObj__9CGraphics@l(r3) /* 803095F8 00306558 20 00 00 02 */ subfic r0, r0, 2 /* 803095FC 0030655C 7C 00 00 34 */ cntlzw r0, r0 /* 80309600 00306560 54 03 D9 7E */ srwi r3, r0, 5 @@ -603,9 +590,9 @@ lbl_80309660: /* 80309670 003065D0 57 C0 06 3F */ clrlwi. r0, r30, 0x18 /* 80309674 003065D4 41 82 00 48 */ beq lbl_803096BC /* 80309678 003065D8 80 E2 C7 E0 */ lwz r7, lbl_805AE500@sda21(r2) -/* 8030967C 003065DC 3C 60 80 5A */ lis r3, lbl_805A6500@ha +/* 8030967C 003065DC 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha /* 80309680 003065E0 A0 C2 C7 E4 */ lhz r6, lbl_805AE504@sda21(r2) -/* 80309684 003065E4 39 03 65 00 */ addi r8, r3, lbl_805A6500@l +/* 80309684 003065E4 39 03 65 00 */ addi r8, r3, mRenderModeObj__9CGraphics@l /* 80309688 003065E8 88 02 C7 E6 */ lbz r0, lbl_805AE506@sda21(r2) /* 8030968C 003065EC 38 60 00 02 */ li r3, 2 /* 80309690 003065F0 38 A0 00 00 */ li r5, 0 @@ -620,9 +607,9 @@ lbl_80309660: /* 803096B4 00306614 4B CF 9D DD */ bl memcpy /* 803096B8 00306618 48 00 00 34 */ b lbl_803096EC lbl_803096BC: -/* 803096BC 0030661C 3C 80 80 5A */ lis r4, lbl_805A6500@ha +/* 803096BC 0030661C 3C 80 80 5A */ lis r4, mRenderModeObj__9CGraphics@ha /* 803096C0 00306620 3C 60 80 3F */ lis r3, lbl_803F08E0@ha -/* 803096C4 00306624 38 C4 65 00 */ addi r6, r4, lbl_805A6500@l +/* 803096C4 00306624 38 C4 65 00 */ addi r6, r4, mRenderModeObj__9CGraphics@l /* 803096C8 00306628 38 A0 00 00 */ li r5, 0 /* 803096CC 0030662C 38 00 00 01 */ li r0, 1 /* 803096D0 00306630 38 83 08 E0 */ addi r4, r3, lbl_803F08E0@l @@ -633,15 +620,15 @@ lbl_803096BC: /* 803096E4 00306644 90 06 00 14 */ stw r0, 0x14(r6) /* 803096E8 00306648 4B CF 9D A9 */ bl memcpy lbl_803096EC: -/* 803096EC 0030664C 3C 60 80 5A */ lis r3, lbl_805A6500@ha +/* 803096EC 0030664C 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha /* 803096F0 00306650 38 A0 00 01 */ li r5, 1 -/* 803096F4 00306654 38 C3 65 00 */ addi r6, r3, lbl_805A6500@l +/* 803096F4 00306654 38 C3 65 00 */ addi r6, r3, mRenderModeObj__9CGraphics@l /* 803096F8 00306658 88 66 00 19 */ lbz r3, 0x19(r6) /* 803096FC 0030665C 38 86 00 1A */ addi r4, r6, 0x1a /* 80309700 00306660 38 C6 00 32 */ addi r6, r6, 0x32 /* 80309704 00306664 48 06 FA 91 */ bl GXSetCopyFilter -/* 80309708 00306668 3C 60 80 5A */ lis r3, lbl_805A6500@ha -/* 8030970C 0030666C 38 63 65 00 */ addi r3, r3, lbl_805A6500@l +/* 80309708 00306668 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha +/* 8030970C 0030666C 38 63 65 00 */ addi r3, r3, mRenderModeObj__9CGraphics@l /* 80309710 00306670 48 07 EE 45 */ bl VIConfigure /* 80309714 00306674 38 60 00 01 */ li r3, 1 /* 80309718 00306678 48 07 FB 95 */ bl VISetBlack @@ -685,8 +672,8 @@ ProjectPoint__9CGraphicsFRC9CVector3f: /* 80309798 003066F8 38 81 00 14 */ addi r4, r1, 0x14 /* 8030979C 003066FC 48 00 6F B5 */ bl MultiplyOneOverW__9CMatrix4fCFRC9CVector3f /* 803097A0 00306700 C0 01 00 0C */ lfs f0, 0xc(r1) -/* 803097A4 00306704 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 803097A8 00306708 38 63 D9 10 */ addi r3, r3, lbl_803ED910@l +/* 803097A4 00306704 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 803097A8 00306708 38 63 D9 10 */ addi r3, r3, mViewport__9CGraphics@l /* 803097AC 0030670C C0 21 00 08 */ lfs f1, 8(r1) /* 803097B0 00306710 FC 00 00 50 */ fneg f0, f0 /* 803097B4 00306714 C0 43 00 10 */ lfs f2, 0x10(r3) @@ -710,24 +697,24 @@ ProjectPoint__9CGraphicsFRC9CVector3f: .global GetFrameCounter__9CGraphicsFv GetFrameCounter__9CGraphicsFv: -/* 803097FC 0030675C 80 6D A8 00 */ lwz r3, lbl_805A93C0@sda21(r13) +/* 803097FC 0030675C 80 6D A8 00 */ lwz r3, mFrameCounter__9CGraphics@sda21(r13) /* 80309800 00306760 4E 80 00 20 */ blr .global GetUseVideoFilter__9CGraphicsFv GetUseVideoFilter__9CGraphicsFv: -/* 80309804 00306764 88 6D 9C 82 */ lbz r3, lbl_805A8842@sda21(r13) +/* 80309804 00306764 88 6D 9C 82 */ lbz r3, mUseVideoFilter__9CGraphics@sda21(r13) /* 80309808 00306768 4E 80 00 20 */ blr .global SetUseVideoFilter__9CGraphicsFb SetUseVideoFilter__9CGraphicsFb: /* 8030980C 0030676C 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80309810 00306770 7C 08 02 A6 */ mflr r0 -/* 80309814 00306774 3C 80 80 5A */ lis r4, lbl_805A6500@ha +/* 80309814 00306774 3C 80 80 5A */ lis r4, mRenderModeObj__9CGraphics@ha /* 80309818 00306778 54 65 06 3E */ clrlwi r5, r3, 0x18 /* 8030981C 0030677C 90 01 00 14 */ stw r0, 0x14(r1) -/* 80309820 00306780 38 C4 65 00 */ addi r6, r4, lbl_805A6500@l +/* 80309820 00306780 38 C4 65 00 */ addi r6, r4, mRenderModeObj__9CGraphics@l /* 80309824 00306784 7C 05 00 D0 */ neg r0, r5 -/* 80309828 00306788 98 6D 9C 82 */ stb r3, lbl_805A8842@sda21(r13) +/* 80309828 00306788 98 6D 9C 82 */ stb r3, mUseVideoFilter__9CGraphics@sda21(r13) /* 8030982C 0030678C 7C 00 2B 78 */ or r0, r0, r5 /* 80309830 00306790 88 66 00 19 */ lbz r3, 0x19(r6) /* 80309834 00306794 38 86 00 1A */ addi r4, r6, 0x1a @@ -747,14 +734,14 @@ GetFPS__9CGraphicsFv: /* 80309860 003067C0 DB E1 00 10 */ stfd f31, 0x10(r1) /* 80309864 003067C4 F3 E1 00 18 */ psq_st f31, 24(r1), 0, qr0 /* 80309868 003067C8 48 07 7D F9 */ bl OSDisableInterrupts -/* 8030986C 003067CC C0 2D A8 08 */ lfs f1, lbl_805A93C8@sda21(r13) -/* 80309870 003067D0 C0 0D A8 04 */ lfs f0, lbl_805A93C4@sda21(r13) +/* 8030986C 003067CC C0 2D A8 08 */ lfs f1, mLastFramesPerSecond__9CGraphics@sda21(r13) +/* 80309870 003067D0 C0 0D A8 04 */ lfs f0, mFramesPerSecond__9CGraphics@sda21(r13) /* 80309874 003067D4 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 80309878 003067D8 40 80 00 0C */ bge lbl_80309884 -/* 8030987C 003067DC 38 8D A8 08 */ addi r4, r13, lbl_805A93C8@sda21 +/* 8030987C 003067DC 38 8D A8 08 */ addi r4, r13, mLastFramesPerSecond__9CGraphics@sda21 /* 80309880 003067E0 48 00 00 08 */ b lbl_80309888 lbl_80309884: -/* 80309884 003067E4 38 8D A8 04 */ addi r4, r13, lbl_805A93C4@sda21 +/* 80309884 003067E4 38 8D A8 04 */ addi r4, r13, mFramesPerSecond__9CGraphics@sda21 lbl_80309888: /* 80309888 003067E8 C3 E4 00 00 */ lfs f31, 0(r4) /* 8030988C 003067EC 48 07 7D FD */ bl OSRestoreInterrupts @@ -770,9 +757,9 @@ lbl_80309888: ClipScreenRectFromMS__9CGraphicsFRC9CVector3fRC9CVector3f12ETexelFormat: /* 803098AC 0030680C 94 21 FF A0 */ stwu r1, -0x60(r1) /* 803098B0 00306810 7C 08 02 A6 */ mflr r0 -/* 803098B4 00306814 3C E0 80 5A */ lis r7, lbl_805A6204@ha +/* 803098B4 00306814 3C E0 80 5A */ lis r7, mModelMatrix__9CGraphics@ha /* 803098B8 00306818 90 01 00 64 */ stw r0, 0x64(r1) -/* 803098BC 0030681C 38 07 62 04 */ addi r0, r7, lbl_805A6204@l +/* 803098BC 0030681C 38 07 62 04 */ addi r0, r7, mModelMatrix__9CGraphics@l /* 803098C0 00306820 93 E1 00 5C */ stw r31, 0x5c(r1) /* 803098C4 00306824 93 C1 00 58 */ stw r30, 0x58(r1) /* 803098C8 00306828 7C DE 33 78 */ mr r30, r6 @@ -783,9 +770,9 @@ ClipScreenRectFromMS__9CGraphicsFRC9CVector3fRC9CVector3f12ETexelFormat: /* 803098DC 0030683C 7C 7C 1B 78 */ mr r28, r3 /* 803098E0 00306840 38 61 00 20 */ addi r3, r1, 0x20 /* 803098E4 00306844 48 00 92 05 */ bl __ml__12CTransform4fCFRC9CVector3f -/* 803098E8 00306848 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 803098E8 00306848 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 803098EC 0030684C C0 21 00 20 */ lfs f1, 0x20(r1) -/* 803098F0 00306850 3B E3 61 D4 */ addi r31, r3, lbl_805A61D4@l +/* 803098F0 00306850 3B E3 61 D4 */ addi r31, r3, mViewMatrix__9CGraphics@l /* 803098F4 00306854 C0 61 00 24 */ lfs f3, 0x24(r1) /* 803098F8 00306858 C0 1F 00 0C */ lfs f0, 0xc(r31) /* 803098FC 0030685C 7F E4 FB 78 */ mr r4, r31 @@ -801,15 +788,15 @@ ClipScreenRectFromMS__9CGraphicsFRC9CVector3fRC9CVector3f12ETexelFormat: /* 80309924 00306884 D0 41 00 0C */ stfs f2, 0xc(r1) /* 80309928 00306888 D0 01 00 10 */ stfs f0, 0x10(r1) /* 8030992C 0030688C 48 00 90 F9 */ bl TransposeRotate__12CTransform4fCFRC9CVector3f -/* 80309930 00306890 3C 60 80 5A */ lis r3, lbl_805A6204@ha +/* 80309930 00306890 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha /* 80309934 00306894 7F A5 EB 78 */ mr r5, r29 -/* 80309938 00306898 38 83 62 04 */ addi r4, r3, lbl_805A6204@l +/* 80309938 00306898 38 83 62 04 */ addi r4, r3, mModelMatrix__9CGraphics@l /* 8030993C 0030689C 38 61 00 38 */ addi r3, r1, 0x38 /* 80309940 003068A0 48 00 91 A9 */ bl __ml__12CTransform4fCFRC9CVector3f /* 80309944 003068A4 C0 21 00 38 */ lfs f1, 0x38(r1) -/* 80309948 003068A8 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 80309948 003068A8 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 8030994C 003068AC C0 1F 00 0C */ lfs f0, 0xc(r31) -/* 80309950 003068B0 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 80309950 003068B0 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 80309954 003068B4 C0 61 00 3C */ lfs f3, 0x3c(r1) /* 80309958 003068B8 38 61 00 44 */ addi r3, r1, 0x44 /* 8030995C 003068BC EC 81 00 28 */ fsubs f4, f1, f0 @@ -942,9 +929,9 @@ lbl_80309B0C: /* 80309B20 00306A80 40 80 00 08 */ bge lbl_80309B28 /* 80309B24 00306A84 39 61 00 10 */ addi r11, r1, 0x10 lbl_80309B28: -/* 80309B28 00306A88 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80309B28 00306A88 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 80309B2C 00306A8C 7C 84 E8 50 */ subf r4, r4, r29 -/* 80309B30 00306A90 39 03 D9 10 */ addi r8, r3, lbl_803ED910@l +/* 80309B30 00306A90 39 03 D9 10 */ addi r8, r3, mViewport__9CGraphics@l /* 80309B34 00306A94 7C A5 E0 50 */ subf r5, r5, r28 /* 80309B38 00306A98 81 88 00 00 */ lwz r12, 0(r8) /* 80309B3C 00306A9C 7C 8A FE 70 */ srawi r10, r4, 0x1f @@ -988,9 +975,9 @@ lbl_80309BB0: /* 80309BC8 00306B28 40 80 00 08 */ bge lbl_80309BD0 /* 80309BCC 00306B2C 38 E1 00 0C */ addi r7, r1, 0xc lbl_80309BD0: -/* 80309BD0 00306B30 3C C0 80 3F */ lis r6, lbl_803ED910@ha +/* 80309BD0 00306B30 3C C0 80 3F */ lis r6, mViewport__9CGraphics@ha /* 80309BD4 00306B34 81 07 00 00 */ lwz r8, 0(r7) -/* 80309BD8 00306B38 38 C6 D9 10 */ addi r6, r6, lbl_803ED910@l +/* 80309BD8 00306B38 38 C6 D9 10 */ addi r6, r6, mViewport__9CGraphics@l /* 80309BDC 00306B3C 54 67 00 3C */ rlwinm r7, r3, 0, 0, 0x1e /* 80309BE0 00306B40 39 46 00 04 */ addi r10, r6, 4 /* 80309BE4 00306B44 39 08 00 01 */ addi r8, r8, 1 @@ -1144,11 +1131,11 @@ lbl_80309DE0: SetProjectionState__9CGraphicsFRCQ29CGraphics16CProjectionState: /* 80309E00 00306D60 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80309E04 00306D64 7C 08 02 A6 */ mflr r0 -/* 80309E08 00306D68 3C 80 80 5A */ lis r4, lbl_805A61B8@ha +/* 80309E08 00306D68 3C 80 80 5A */ lis r4, mProj__9CGraphics@ha /* 80309E0C 00306D6C 90 01 00 14 */ stw r0, 0x14(r1) /* 80309E10 00306D70 88 03 00 00 */ lbz r0, 0(r3) /* 80309E14 00306D74 C0 A3 00 04 */ lfs f5, 4(r3) -/* 80309E18 00306D78 9C 04 61 B8 */ stbu r0, lbl_805A61B8@l(r4) +/* 80309E18 00306D78 9C 04 61 B8 */ stbu r0, mProj__9CGraphics@l(r4) /* 80309E1C 00306D7C C0 83 00 08 */ lfs f4, 8(r3) /* 80309E20 00306D80 C0 63 00 0C */ lfs f3, 0xc(r3) /* 80309E24 00306D84 C0 43 00 10 */ lfs f2, 0x10(r3) @@ -1168,17 +1155,17 @@ SetProjectionState__9CGraphicsFRCQ29CGraphics16CProjectionState: .global GetProjectionState__9CGraphicsFv GetProjectionState__9CGraphicsFv: -/* 80309E5C 00306DBC 3C 60 80 5A */ lis r3, lbl_805A61B8@ha -/* 80309E60 00306DC0 38 63 61 B8 */ addi r3, r3, lbl_805A61B8@l +/* 80309E5C 00306DBC 3C 60 80 5A */ lis r3, mProj__9CGraphics@ha +/* 80309E60 00306DC0 38 63 61 B8 */ addi r3, r3, mProj__9CGraphics@l /* 80309E64 00306DC4 4E 80 00 20 */ blr .global FlushProjection__9CGraphicsFv FlushProjection__9CGraphicsFv: /* 80309E68 00306DC8 94 21 FF 70 */ stwu r1, -0x90(r1) /* 80309E6C 00306DCC 7C 08 02 A6 */ mflr r0 -/* 80309E70 00306DD0 3C 60 80 5A */ lis r3, lbl_805A61B8@ha +/* 80309E70 00306DD0 3C 60 80 5A */ lis r3, mProj__9CGraphics@ha /* 80309E74 00306DD4 90 01 00 94 */ stw r0, 0x94(r1) -/* 80309E78 00306DD8 8C 03 61 B8 */ lbzu r0, lbl_805A61B8@l(r3) +/* 80309E78 00306DD8 8C 03 61 B8 */ lbzu r0, mProj__9CGraphics@l(r3) /* 80309E7C 00306DDC 28 00 00 00 */ cmplwi r0, 0 /* 80309E80 00306DE0 C0 83 00 08 */ lfs f4, 8(r3) /* 80309E84 00306DE4 C0 63 00 04 */ lfs f3, 4(r3) @@ -1207,19 +1194,19 @@ lbl_80309EC8: .global SetExternalTimeProvider__9CGraphicsFP13CTimeProvider SetExternalTimeProvider__9CGraphicsFP13CTimeProvider: -/* 80309ED8 00306E38 90 6D A8 44 */ stw r3, lbl_805A9404@sda21(r13) +/* 80309ED8 00306E38 90 6D A8 44 */ stw r3, mpExternalTimeProvider__9CGraphics@sda21(r13) /* 80309EDC 00306E3C 4E 80 00 20 */ blr .global GetSecondsMod900__9CGraphicsFv GetSecondsMod900__9CGraphicsFv: -/* 80309EE0 00306E40 80 6D A8 44 */ lwz r3, lbl_805A9404@sda21(r13) +/* 80309EE0 00306E40 80 6D A8 44 */ lwz r3, mpExternalTimeProvider__9CGraphics@sda21(r13) /* 80309EE4 00306E44 28 03 00 00 */ cmplwi r3, 0 /* 80309EE8 00306E48 41 82 00 10 */ beq lbl_80309EF8 /* 80309EEC 00306E4C 80 63 00 00 */ lwz r3, 0(r3) /* 80309EF0 00306E50 C0 23 00 00 */ lfs f1, 0(r3) /* 80309EF4 00306E54 4E 80 00 20 */ blr lbl_80309EF8: -/* 80309EF8 00306E58 C0 2D A8 40 */ lfs f1, lbl_805A9400@sda21(r13) +/* 80309EF8 00306E58 C0 2D A8 40 */ lfs f1, mSecondsMod900__9CGraphics@sda21(r13) /* 80309EFC 00306E5C 4E 80 00 20 */ blr .global TickRenderTimings__9CGraphicsFv @@ -1228,7 +1215,7 @@ TickRenderTimings__9CGraphicsFv: /* 80309F04 00306E64 3C 80 36 B0 */ lis r4, 0x36B06E71@ha /* 80309F08 00306E68 3C 00 43 30 */ lis r0, 0x4330 /* 80309F0C 00306E6C 3C 60 00 01 */ lis r3, 0x0000D2F0@ha -/* 80309F10 00306E70 80 AD A8 3C */ lwz r5, lbl_805A93FC@sda21(r13) +/* 80309F10 00306E70 80 AD A8 3C */ lwz r5, mRenderTimings__9CGraphics@sda21(r13) /* 80309F14 00306E74 38 84 6E 71 */ addi r4, r4, 0x36B06E71@l /* 80309F18 00306E78 90 01 00 08 */ stw r0, 8(r1) /* 80309F1C 00306E7C 38 63 D2 F0 */ addi r3, r3, 0x0000D2F0@l @@ -1244,10 +1231,10 @@ TickRenderTimings__9CGraphicsFv: /* 80309F44 00306EA4 7C 00 28 50 */ subf r0, r0, r5 /* 80309F48 00306EA8 90 01 00 0C */ stw r0, 0xc(r1) /* 80309F4C 00306EAC C8 21 00 08 */ lfd f1, 8(r1) -/* 80309F50 00306EB0 90 0D A8 3C */ stw r0, lbl_805A93FC@sda21(r13) +/* 80309F50 00306EB0 90 0D A8 3C */ stw r0, mRenderTimings__9CGraphics@sda21(r13) /* 80309F54 00306EB4 EC 21 10 28 */ fsubs f1, f1, f2 /* 80309F58 00306EB8 EC 01 00 24 */ fdivs f0, f1, f0 -/* 80309F5C 00306EBC D0 0D A8 40 */ stfs f0, lbl_805A9400@sda21(r13) +/* 80309F5C 00306EBC D0 0D A8 40 */ stfs f0, mSecondsMod900__9CGraphics@sda21(r13) /* 80309F60 00306EC0 38 21 00 10 */ addi r1, r1, 0x10 /* 80309F64 00306EC4 4E 80 00 20 */ blr @@ -1267,7 +1254,7 @@ LoadDolphinSpareTexture__9CGraphicsFii11_GXCITexFmt7_GXTlutPv11_GXTexMapID: /* 80309F94 00306EF4 7C E4 3B 78 */ mr r4, r7 /* 80309F98 00306EF8 48 00 00 08 */ b lbl_80309FA0 lbl_80309F9C: -/* 80309F9C 00306EFC 80 8D A8 28 */ lwz r4, lbl_805A93E8@sda21(r13) +/* 80309F9C 00306EFC 80 8D A8 28 */ lwz r4, mpSpareBuffer__9CGraphics@sda21(r13) lbl_80309FA0: /* 80309FA0 00306F00 7C A7 2B 78 */ mr r7, r5 /* 80309FA4 00306F04 55 25 04 3E */ clrlwi r5, r9, 0x10 @@ -1293,8 +1280,8 @@ lbl_80309FA0: /* 80309FF4 00306F54 48 00 41 55 */ bl InvalidateTexmap__8CTextureF11_GXTexMapID /* 80309FF8 00306F58 2C 1F 00 07 */ cmpwi r31, 7 /* 80309FFC 00306F5C 40 82 00 10 */ bne lbl_8030A00C -/* 8030A000 00306F60 3C 60 80 5A */ lis r3, lbl_805A6440@ha -/* 8030A004 00306F64 38 63 64 40 */ addi r3, r3, lbl_805A6440@l +/* 8030A000 00306F60 3C 60 80 5A */ lis r3, mTexRegions__9CGraphics@ha +/* 8030A004 00306F64 38 63 64 40 */ addi r3, r3, mTexRegions__9CGraphics@l /* 8030A008 00306F68 48 07 07 2D */ bl GXInvalidateTexRegion lbl_8030A00C: /* 8030A00C 00306F6C 80 01 00 44 */ lwz r0, 0x44(r1) @@ -1318,7 +1305,7 @@ LoadDolphinSpareTexture__9CGraphicsFii9_GXTexFmtPv11_GXTexMapID: /* 8030A048 00306FA8 7C C4 33 78 */ mr r4, r6 /* 8030A04C 00306FAC 48 00 00 08 */ b lbl_8030A054 lbl_8030A050: -/* 8030A050 00306FB0 80 8D A8 28 */ lwz r4, lbl_805A93E8@sda21(r13) +/* 8030A050 00306FB0 80 8D A8 28 */ lwz r4, mpSpareBuffer__9CGraphics@sda21(r13) lbl_8030A054: /* 8030A054 00306FB4 7C A7 2B 78 */ mr r7, r5 /* 8030A058 00306FB8 55 05 04 3E */ clrlwi r5, r8, 0x10 @@ -1344,8 +1331,8 @@ lbl_8030A054: /* 8030A0A8 00307008 48 00 40 A1 */ bl InvalidateTexmap__8CTextureF11_GXTexMapID /* 8030A0AC 0030700C 2C 1F 00 07 */ cmpwi r31, 7 /* 8030A0B0 00307010 40 82 00 10 */ bne lbl_8030A0C0 -/* 8030A0B4 00307014 3C 60 80 5A */ lis r3, lbl_805A6440@ha -/* 8030A0B8 00307018 38 63 64 40 */ addi r3, r3, lbl_805A6440@l +/* 8030A0B4 00307014 3C 60 80 5A */ lis r3, mTexRegions__9CGraphics@ha +/* 8030A0B8 00307018 38 63 64 40 */ addi r3, r3, mTexRegions__9CGraphics@l /* 8030A0BC 0030701C 48 07 06 79 */ bl GXInvalidateTexRegion lbl_8030A0C0: /* 8030A0C0 00307020 80 01 00 34 */ lwz r0, 0x34(r1) @@ -1467,16 +1454,16 @@ lbl_8030A20C: .global ResetGfxStates__9CGraphicsFv ResetGfxStates__9CGraphicsFv: /* 8030A27C 003071DC 38 00 00 00 */ li r0, 0 -/* 8030A280 003071E0 90 0D A7 B8 */ stw r0, lbl_805A9378@sda21(r13) +/* 8030A280 003071E0 90 0D A7 B8 */ stw r0, sRenderState__9CGraphics@sda21(r13) /* 8030A284 003071E4 4E 80 00 20 */ blr .global SetFog__9CGraphicsF11ERglFogModeffRC6CColor SetFog__9CGraphicsF11ERglFogModeffRC6CColor: /* 8030A288 003071E8 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030A28C 003071EC 7C 08 02 A6 */ mflr r0 -/* 8030A290 003071F0 3C A0 80 5A */ lis r5, lbl_805A61B8@ha +/* 8030A290 003071F0 3C A0 80 5A */ lis r5, mProj__9CGraphics@ha /* 8030A294 003071F4 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030A298 003071F8 38 A5 61 B8 */ addi r5, r5, lbl_805A61B8@l +/* 8030A298 003071F8 38 A5 61 B8 */ addi r5, r5, mProj__9CGraphics@l /* 8030A29C 003071FC C0 65 00 14 */ lfs f3, 0x14(r5) /* 8030A2A0 00307200 C0 85 00 18 */ lfs f4, 0x18(r5) /* 8030A2A4 00307204 4B FF E2 59 */ bl SetFog__3CGXF10_GXFogTypeffffRC8_GXColor @@ -1583,9 +1570,9 @@ SetDepthRange__9CGraphicsFff: /* 8030A3E0 00307340 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8030A3E4 00307344 7C 08 02 A6 */ mflr r0 /* 8030A3E8 00307348 3C A0 43 30 */ lis r5, 0x4330 -/* 8030A3EC 0030734C 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8030A3EC 0030734C 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8030A3F0 00307350 90 01 00 34 */ stw r0, 0x34(r1) -/* 8030A3F4 00307354 38 E3 D9 10 */ addi r7, r3, lbl_803ED910@l +/* 8030A3F4 00307354 38 E3 D9 10 */ addi r7, r3, mViewport__9CGraphics@l /* 8030A3F8 00307358 FC A0 08 90 */ fmr f5, f1 /* 8030A3FC 0030735C C8 82 C7 E8 */ lfd f4, lbl_805AE508@sda21(r2) /* 8030A400 00307360 80 07 00 00 */ lwz r0, 0(r7) @@ -1612,9 +1599,9 @@ SetDepthRange__9CGraphicsFff: /* 8030A454 003073B4 EC 60 20 28 */ fsubs f3, f0, f4 /* 8030A458 003073B8 90 A1 00 20 */ stw r5, 0x20(r1) /* 8030A45C 003073BC C8 01 00 20 */ lfd f0, 0x20(r1) -/* 8030A460 003073C0 D0 AD A7 E0 */ stfs f5, lbl_805A93A0@sda21(r13) +/* 8030A460 003073C0 D0 AD A7 E0 */ stfs f5, mDepthNear__9CGraphics@sda21(r13) /* 8030A464 003073C4 EC 80 20 28 */ fsubs f4, f0, f4 -/* 8030A468 003073C8 D0 CD 9C 78 */ stfs f6, lbl_805A8838@sda21(r13) +/* 8030A468 003073C8 D0 CD 9C 78 */ stfs f6, mDepthFar__9CGraphics@sda21(r13) /* 8030A46C 003073CC 48 07 21 DD */ bl GXSetViewport /* 8030A470 003073D0 80 01 00 34 */ lwz r0, 0x34(r1) /* 8030A474 003073D4 7C 08 03 A6 */ mtlr r0 @@ -1627,12 +1614,12 @@ FullRender__9CGraphicsFv: /* 8030A484 003073E4 7C 08 02 A6 */ mflr r0 /* 8030A488 003073E8 38 80 00 00 */ li r4, 0 /* 8030A48C 003073EC 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030A490 003073F0 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) -/* 8030A494 003073F4 80 6D 9C 74 */ lwz r3, lbl_805A8834@sda21(r13) +/* 8030A490 003073F0 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) +/* 8030A494 003073F4 80 6D 9C 74 */ lwz r3, mCurrentPrimitive__9CGraphics@sda21(r13) /* 8030A498 003073F8 54 05 04 3E */ clrlwi r5, r0, 0x10 /* 8030A49C 003073FC 4B FF E0 E9 */ bl Begin__3CGXF12_GXPrimitive9_GXVtxFmtUs -/* 8030A4A0 00307400 3C 60 80 5A */ lis r3, lbl_805A6170@ha -/* 8030A4A4 00307404 38 63 61 70 */ addi r3, r3, lbl_805A6170@l +/* 8030A4A0 00307400 3C 60 80 5A */ lis r3, vtxDescr@ha +/* 8030A4A4 00307404 38 63 61 70 */ addi r3, r3, vtxDescr@l /* 8030A4A8 00307408 88 03 00 2E */ lbz r0, 0x2e(r3) /* 8030A4AC 0030740C 28 00 00 07 */ cmplwi r0, 7 /* 8030A4B0 00307410 41 81 0A 0C */ bgt lbl_8030AEBC @@ -1644,7 +1631,7 @@ FullRender__9CGraphicsFv: /* 8030A4C8 00307428 4E 80 04 20 */ bctr .global lbl_8030A4CC lbl_8030A4CC: -/* 8030A4CC 0030742C 80 CD A7 FC */ lwz r6, lbl_805A93BC@sda21(r13) +/* 8030A4CC 0030742C 80 CD A7 FC */ lwz r6, mNumPrimitives__9CGraphics@sda21(r13) /* 8030A4D0 00307430 38 E0 00 00 */ li r7, 0 /* 8030A4D4 00307434 2C 06 00 00 */ cmpwi r6, 0 /* 8030A4D8 00307438 40 81 09 E4 */ ble lbl_8030AEBC @@ -1652,7 +1639,7 @@ lbl_8030A4CC: /* 8030A4E0 00307440 38 86 FF F8 */ addi r4, r6, -8 /* 8030A4E4 00307444 40 81 00 EC */ ble lbl_8030A5D0 /* 8030A4E8 00307448 38 04 00 07 */ addi r0, r4, 7 -/* 8030A4EC 0030744C 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030A4EC 0030744C 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030A4F0 00307450 54 00 E8 FE */ srwi r0, r0, 3 /* 8030A4F4 00307454 3C 60 CC 01 */ lis r3, 0xcc01 /* 8030A4F8 00307458 7C 09 03 A6 */ mtctr r0 @@ -1712,7 +1699,7 @@ lbl_8030A504: /* 8030A5CC 0030752C 42 00 FF 38 */ bdnz lbl_8030A504 lbl_8030A5D0: /* 8030A5D0 00307530 1C 87 00 0C */ mulli r4, r7, 0xc -/* 8030A5D4 00307534 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030A5D4 00307534 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030A5D8 00307538 7C 07 30 50 */ subf r0, r7, r6 /* 8030A5DC 0030753C 3C 60 CC 01 */ lis r3, 0xcc01 /* 8030A5E0 00307540 7C 85 22 14 */ add r4, r5, r4 @@ -1731,11 +1718,11 @@ lbl_8030A5F0: /* 8030A610 00307570 48 00 08 AC */ b lbl_8030AEBC .global lbl_8030A614 lbl_8030A614: -/* 8030A614 00307574 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030A614 00307574 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030A618 00307578 3C 80 CC 01 */ lis r4, 0xcc01 -/* 8030A61C 0030757C 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030A61C 0030757C 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030A620 00307580 2C 00 00 00 */ cmpwi r0, 0 -/* 8030A624 00307584 80 CD A7 C4 */ lwz r6, lbl_805A9384@sda21(r13) +/* 8030A624 00307584 80 CD A7 C4 */ lwz r6, nrmBuffer__9CGraphics@sda21(r13) /* 8030A628 00307588 7C 03 03 78 */ mr r3, r0 /* 8030A62C 0030758C 40 81 08 90 */ ble lbl_8030AEBC /* 8030A630 00307590 54 00 F0 BF */ rlwinm. r0, r0, 0x1e, 2, 0x1f @@ -1816,7 +1803,7 @@ lbl_8030A714: /* 8030A750 003076B0 48 00 07 6C */ b lbl_8030AEBC .global lbl_8030A754 lbl_8030A754: -/* 8030A754 003076B4 80 ED A7 FC */ lwz r7, lbl_805A93BC@sda21(r13) +/* 8030A754 003076B4 80 ED A7 FC */ lwz r7, mNumPrimitives__9CGraphics@sda21(r13) /* 8030A758 003076B8 39 00 00 00 */ li r8, 0 /* 8030A75C 003076BC 2C 07 00 00 */ cmpwi r7, 0 /* 8030A760 003076C0 40 81 07 5C */ ble lbl_8030AEBC @@ -1824,9 +1811,9 @@ lbl_8030A754: /* 8030A768 003076C8 38 87 FF F8 */ addi r4, r7, -8 /* 8030A76C 003076CC 40 81 01 34 */ ble lbl_8030A8A0 /* 8030A770 003076D0 38 04 00 07 */ addi r0, r4, 7 -/* 8030A774 003076D4 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030A774 003076D4 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030A778 003076D8 54 00 E8 FE */ srwi r0, r0, 3 -/* 8030A77C 003076DC 80 CD A7 D0 */ lwz r6, lbl_805A9390@sda21(r13) +/* 8030A77C 003076DC 80 CD A7 D0 */ lwz r6, clrBuffer__9CGraphics@sda21(r13) /* 8030A780 003076E0 3C 60 CC 01 */ lis r3, 0xcc01 /* 8030A784 003076E4 7C 09 03 A6 */ mtctr r0 /* 8030A788 003076E8 2C 04 00 00 */ cmpwi r4, 0 @@ -1902,8 +1889,8 @@ lbl_8030A790: /* 8030A89C 003077FC 42 00 FE F4 */ bdnz lbl_8030A790 lbl_8030A8A0: /* 8030A8A0 00307800 1C A8 00 0C */ mulli r5, r8, 0xc -/* 8030A8A4 00307804 80 CD A7 C0 */ lwz r6, lbl_805A9380@sda21(r13) -/* 8030A8A8 00307808 80 8D A7 D0 */ lwz r4, lbl_805A9390@sda21(r13) +/* 8030A8A4 00307804 80 CD A7 C0 */ lwz r6, vtxBuffer__9CGraphics@sda21(r13) +/* 8030A8A8 00307808 80 8D A7 D0 */ lwz r4, clrBuffer__9CGraphics@sda21(r13) /* 8030A8AC 0030780C 55 03 10 3A */ slwi r3, r8, 2 /* 8030A8B0 00307810 7C 08 38 50 */ subf r0, r8, r7 /* 8030A8B4 00307814 7C A6 2A 14 */ add r5, r6, r5 @@ -1927,11 +1914,11 @@ lbl_8030A8CC: /* 8030A8F8 00307858 48 00 05 C4 */ b lbl_8030AEBC .global lbl_8030A8FC lbl_8030A8FC: -/* 8030A8FC 0030785C 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030A8FC 0030785C 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030A900 00307860 3C 80 CC 01 */ lis r4, 0xcc01 -/* 8030A904 00307864 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030A904 00307864 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030A908 00307868 2C 00 00 00 */ cmpwi r0, 0 -/* 8030A90C 0030786C 80 CD A7 C8 */ lwz r6, lbl_805A9388@sda21(r13) +/* 8030A90C 0030786C 80 CD A7 C8 */ lwz r6, txtBuffer0__9CGraphics@sda21(r13) /* 8030A910 00307870 7C 03 03 78 */ mr r3, r0 /* 8030A914 00307874 40 81 05 A8 */ ble lbl_8030AEBC /* 8030A918 00307878 54 00 F0 BF */ rlwinm. r0, r0, 0x1e, 2, 0x1f @@ -2002,12 +1989,12 @@ lbl_8030A9DC: /* 8030AA10 00307970 48 00 04 AC */ b lbl_8030AEBC .global lbl_8030AA14 lbl_8030AA14: -/* 8030AA14 00307974 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030AA14 00307974 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030AA18 00307978 3C 80 CC 01 */ lis r4, 0xcc01 -/* 8030AA1C 0030797C 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030AA1C 0030797C 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030AA20 00307980 2C 00 00 00 */ cmpwi r0, 0 -/* 8030AA24 00307984 80 CD A7 C4 */ lwz r6, lbl_805A9384@sda21(r13) -/* 8030AA28 00307988 80 ED A7 C8 */ lwz r7, lbl_805A9388@sda21(r13) +/* 8030AA24 00307984 80 CD A7 C4 */ lwz r6, nrmBuffer__9CGraphics@sda21(r13) +/* 8030AA28 00307988 80 ED A7 C8 */ lwz r7, txtBuffer0__9CGraphics@sda21(r13) /* 8030AA2C 0030798C 7C 03 03 78 */ mr r3, r0 /* 8030AA30 00307990 40 81 04 8C */ ble lbl_8030AEBC /* 8030AA34 00307994 54 00 F8 7F */ rlwinm. r0, r0, 0x1f, 1, 0x1f @@ -2078,12 +2065,12 @@ lbl_8030AADC: /* 8030AB2C 00307A8C 48 00 03 90 */ b lbl_8030AEBC .global lbl_8030AB30 lbl_8030AB30: -/* 8030AB30 00307A90 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030AB30 00307A90 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030AB34 00307A94 3C 80 CC 01 */ lis r4, 0xcc01 -/* 8030AB38 00307A98 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030AB38 00307A98 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030AB3C 00307A9C 2C 00 00 00 */ cmpwi r0, 0 -/* 8030AB40 00307AA0 80 CD A7 C4 */ lwz r6, lbl_805A9384@sda21(r13) -/* 8030AB44 00307AA4 80 ED A7 D0 */ lwz r7, lbl_805A9390@sda21(r13) +/* 8030AB40 00307AA0 80 CD A7 C4 */ lwz r6, nrmBuffer__9CGraphics@sda21(r13) +/* 8030AB44 00307AA4 80 ED A7 D0 */ lwz r7, clrBuffer__9CGraphics@sda21(r13) /* 8030AB48 00307AA8 7C 03 03 78 */ mr r3, r0 /* 8030AB4C 00307AAC 40 81 03 70 */ ble lbl_8030AEBC /* 8030AB50 00307AB0 54 00 F8 7F */ rlwinm. r0, r0, 0x1f, 1, 0x1f @@ -2148,12 +2135,12 @@ lbl_8030ABE8: /* 8030AC30 00307B90 48 00 02 8C */ b lbl_8030AEBC .global lbl_8030AC34 lbl_8030AC34: -/* 8030AC34 00307B94 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030AC34 00307B94 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030AC38 00307B98 3C 80 CC 01 */ lis r4, 0xcc01 -/* 8030AC3C 00307B9C 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030AC3C 00307B9C 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030AC40 00307BA0 2C 00 00 00 */ cmpwi r0, 0 -/* 8030AC44 00307BA4 80 CD A7 D0 */ lwz r6, lbl_805A9390@sda21(r13) -/* 8030AC48 00307BA8 80 ED A7 C8 */ lwz r7, lbl_805A9388@sda21(r13) +/* 8030AC44 00307BA4 80 CD A7 D0 */ lwz r6, clrBuffer__9CGraphics@sda21(r13) +/* 8030AC48 00307BA8 80 ED A7 C8 */ lwz r7, txtBuffer0__9CGraphics@sda21(r13) /* 8030AC4C 00307BAC 7C 03 03 78 */ mr r3, r0 /* 8030AC50 00307BB0 40 81 02 6C */ ble lbl_8030AEBC /* 8030AC54 00307BB4 54 00 F0 BF */ rlwinm. r0, r0, 0x1e, 2, 0x1f @@ -2236,14 +2223,14 @@ lbl_8030AD3C: /* 8030AD7C 00307CDC 48 00 01 40 */ b lbl_8030AEBC .global lbl_8030AD80 lbl_8030AD80: -/* 8030AD80 00307CE0 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030AD80 00307CE0 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030AD84 00307CE4 3C 80 CC 01 */ lis r4, 0xcc01 -/* 8030AD88 00307CE8 80 AD A7 C0 */ lwz r5, lbl_805A9380@sda21(r13) +/* 8030AD88 00307CE8 80 AD A7 C0 */ lwz r5, vtxBuffer__9CGraphics@sda21(r13) /* 8030AD8C 00307CEC 2C 00 00 00 */ cmpwi r0, 0 -/* 8030AD90 00307CF0 80 CD A7 C4 */ lwz r6, lbl_805A9384@sda21(r13) -/* 8030AD94 00307CF4 80 ED A7 D0 */ lwz r7, lbl_805A9390@sda21(r13) +/* 8030AD90 00307CF0 80 CD A7 C4 */ lwz r6, nrmBuffer__9CGraphics@sda21(r13) +/* 8030AD94 00307CF4 80 ED A7 D0 */ lwz r7, clrBuffer__9CGraphics@sda21(r13) /* 8030AD98 00307CF8 7C 03 03 78 */ mr r3, r0 -/* 8030AD9C 00307CFC 81 0D A7 C8 */ lwz r8, lbl_805A9388@sda21(r13) +/* 8030AD9C 00307CFC 81 0D A7 C8 */ lwz r8, txtBuffer0__9CGraphics@sda21(r13) /* 8030ADA0 00307D00 40 81 01 1C */ ble lbl_8030AEBC /* 8030ADA4 00307D04 54 00 F8 7F */ rlwinm. r0, r0, 0x1f, 1, 0x1f /* 8030ADA8 00307D08 7C 09 03 A6 */ mtctr r0 @@ -2362,8 +2349,8 @@ lbl_8030AF04: lbl_8030AF48: /* 8030AF48 00307EA8 38 60 00 01 */ li r3, 1 /* 8030AF4C 00307EAC 4B FF DF 05 */ bl SetNumChans__3CGXFUc -/* 8030AF50 00307EB0 3C 60 80 5A */ lis r3, lbl_805A6170@ha -/* 8030AF54 00307EB4 38 63 61 70 */ addi r3, r3, lbl_805A6170@l +/* 8030AF50 00307EB0 3C 60 80 5A */ lis r3, vtxDescr@ha +/* 8030AF54 00307EB4 38 63 61 70 */ addi r3, r3, vtxDescr@l /* 8030AF58 00307EB8 A0 03 00 2C */ lhz r0, 0x2c(r3) /* 8030AF5C 00307EBC 54 00 07 BF */ clrlwi. r0, r0, 0x1e /* 8030AF60 00307EC0 41 82 00 10 */ beq lbl_8030AF70 @@ -2401,7 +2388,7 @@ lbl_8030AFA0: /* 8030AFD4 00307F34 38 E0 00 00 */ li r7, 0 /* 8030AFD8 00307F38 39 00 00 7D */ li r8, 0x7d /* 8030AFDC 00307F3C 4B FF D6 F1 */ bl SetTexCoordGen__3CGXF13_GXTexCoordID13_GXTexGenType12_GXTexGenSrc9_GXTexMtxUc11_GXPTTexMtx -/* 8030AFE0 00307F40 88 ED A8 16 */ lbz r7, lbl_805A93D6@sda21(r13) +/* 8030AFE0 00307F40 88 ED A8 16 */ lbz r7, mLightActive__9CGraphics@sda21(r13) /* 8030AFE4 00307F44 39 20 00 02 */ li r9, 2 /* 8030AFE8 00307F48 28 07 00 00 */ cmplwi r7, 0 /* 8030AFEC 00307F4C 41 82 00 08 */ beq lbl_8030AFF4 @@ -2429,11 +2416,11 @@ lbl_8030B004: FlushStream__9CGraphicsFv: /* 8030B034 00307F94 94 21 FF 70 */ stwu r1, -0x90(r1) /* 8030B038 00307F98 7C 08 02 A6 */ mflr r0 -/* 8030B03C 00307F9C 3C 60 80 5A */ lis r3, lbl_805A6170@ha +/* 8030B03C 00307F9C 3C 60 80 5A */ lis r3, vtxDescr@ha /* 8030B040 00307FA0 90 01 00 94 */ stw r0, 0x94(r1) /* 8030B044 00307FA4 38 A1 00 38 */ addi r5, r1, 0x38 /* 8030B048 00307FA8 93 E1 00 8C */ stw r31, 0x8c(r1) -/* 8030B04C 00307FAC 3B E3 61 70 */ addi r31, r3, lbl_805A6170@l +/* 8030B04C 00307FAC 3B E3 61 70 */ addi r31, r3, vtxDescr@l /* 8030B050 00307FB0 88 1F 00 2E */ lbz r0, 0x2e(r31) /* 8030B054 00307FB4 80 82 C7 B8 */ lwz r4, lbl_805AE4D8@sda21(r2) /* 8030B058 00307FB8 80 62 C7 BC */ lwz r3, lbl_805AE4DC@sda21(r2) @@ -2498,93 +2485,93 @@ ResetVertexDataStream__9CGraphicsFb: /* 8030B12C 0030808C 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8030B130 00308090 38 60 00 00 */ li r3, 0 /* 8030B134 00308094 93 E1 00 0C */ stw r31, 0xc(r1) -/* 8030B138 00308098 80 ED A7 C0 */ lwz r7, lbl_805A9380@sda21(r13) -/* 8030B13C 0030809C 80 CD A7 C4 */ lwz r6, lbl_805A9384@sda21(r13) -/* 8030B140 003080A0 80 AD A7 C8 */ lwz r5, lbl_805A9388@sda21(r13) -/* 8030B144 003080A4 80 8D A7 CC */ lwz r4, lbl_805A938C@sda21(r13) -/* 8030B148 003080A8 80 0D A7 D0 */ lwz r0, lbl_805A9390@sda21(r13) -/* 8030B14C 003080AC 90 ED A7 E4 */ stw r7, lbl_805A93A4@sda21(r13) -/* 8030B150 003080B0 90 CD A7 E8 */ stw r6, lbl_805A93A8@sda21(r13) -/* 8030B154 003080B4 90 AD A7 EC */ stw r5, lbl_805A93AC@sda21(r13) -/* 8030B158 003080B8 90 8D A7 F0 */ stw r4, lbl_805A93B0@sda21(r13) -/* 8030B15C 003080BC 90 0D A7 F4 */ stw r0, lbl_805A93B4@sda21(r13) -/* 8030B160 003080C0 90 6D A7 FC */ stw r3, lbl_805A93BC@sda21(r13) +/* 8030B138 00308098 80 ED A7 C0 */ lwz r7, vtxBuffer__9CGraphics@sda21(r13) +/* 8030B13C 0030809C 80 CD A7 C4 */ lwz r6, nrmBuffer__9CGraphics@sda21(r13) +/* 8030B140 003080A0 80 AD A7 C8 */ lwz r5, txtBuffer0__9CGraphics@sda21(r13) +/* 8030B144 003080A4 80 8D A7 CC */ lwz r4, txtBuffer1__9CGraphics@sda21(r13) +/* 8030B148 003080A8 80 0D A7 D0 */ lwz r0, clrBuffer__9CGraphics@sda21(r13) +/* 8030B14C 003080AC 90 ED A7 E4 */ stw r7, mpVtxBuffer__9CGraphics@sda21(r13) +/* 8030B150 003080B0 90 CD A7 E8 */ stw r6, mpNrmBuffer__9CGraphics@sda21(r13) +/* 8030B154 003080B4 90 AD A7 EC */ stw r5, mpTxtBuffer0__9CGraphics@sda21(r13) +/* 8030B158 003080B8 90 8D A7 F0 */ stw r4, mpTxtBuffer1__9CGraphics@sda21(r13) +/* 8030B15C 003080BC 90 0D A7 F4 */ stw r0, mpClrBuffer__9CGraphics@sda21(r13) +/* 8030B160 003080C0 90 6D A7 FC */ stw r3, mNumPrimitives__9CGraphics@sda21(r13) /* 8030B164 003080C4 40 82 01 1C */ bne lbl_8030B280 -/* 8030B168 003080C8 80 0D 9C 74 */ lwz r0, lbl_805A8834@sda21(r13) +/* 8030B168 003080C8 80 0D 9C 74 */ lwz r0, mCurrentPrimitive__9CGraphics@sda21(r13) /* 8030B16C 003080CC 2C 00 00 A0 */ cmpwi r0, 0xa0 /* 8030B170 003080D0 41 82 00 08 */ beq lbl_8030B178 /* 8030B174 003080D4 48 00 01 04 */ b lbl_8030B278 lbl_8030B178: /* 8030B178 003080D8 38 67 00 0C */ addi r3, r7, 0xc -/* 8030B17C 003080DC 3C 80 80 5A */ lis r4, lbl_805A6170@ha -/* 8030B180 003080E0 90 6D A7 E4 */ stw r3, lbl_805A93A4@sda21(r13) -/* 8030B184 003080E4 38 84 61 70 */ addi r4, r4, lbl_805A6170@l +/* 8030B17C 003080DC 3C 80 80 5A */ lis r4, vtxDescr@ha +/* 8030B180 003080E0 90 6D A7 E4 */ stw r3, mpVtxBuffer__9CGraphics@sda21(r13) +/* 8030B184 003080E4 38 84 61 70 */ addi r4, r4, vtxDescr@l /* 8030B188 003080E8 38 A0 00 0C */ li r5, 0xc /* 8030B18C 003080EC 4B CF 83 05 */ bl memcpy -/* 8030B190 003080F0 3C 60 80 5A */ lis r3, lbl_805A6170@ha -/* 8030B194 003080F4 80 8D A7 E4 */ lwz r4, lbl_805A93A4@sda21(r13) -/* 8030B198 003080F8 3B E3 61 70 */ addi r31, r3, lbl_805A6170@l +/* 8030B190 003080F0 3C 60 80 5A */ lis r3, vtxDescr@ha +/* 8030B194 003080F4 80 8D A7 E4 */ lwz r4, mpVtxBuffer__9CGraphics@sda21(r13) +/* 8030B198 003080F8 3B E3 61 70 */ addi r31, r3, vtxDescr@l /* 8030B19C 003080FC 88 1F 00 2E */ lbz r0, 0x2e(r31) /* 8030B1A0 00308100 38 64 00 0C */ addi r3, r4, 0xc -/* 8030B1A4 00308104 90 6D A7 E4 */ stw r3, lbl_805A93A4@sda21(r13) +/* 8030B1A4 00308104 90 6D A7 E4 */ stw r3, mpVtxBuffer__9CGraphics@sda21(r13) /* 8030B1A8 00308108 54 00 07 FF */ clrlwi. r0, r0, 0x1f /* 8030B1AC 0030810C 41 82 00 28 */ beq lbl_8030B1D4 -/* 8030B1B0 00308110 80 6D A7 E8 */ lwz r3, lbl_805A93A8@sda21(r13) +/* 8030B1B0 00308110 80 6D A7 E8 */ lwz r3, mpNrmBuffer__9CGraphics@sda21(r13) /* 8030B1B4 00308114 38 9F 00 0C */ addi r4, r31, 0xc /* 8030B1B8 00308118 38 A0 00 0C */ li r5, 0xc /* 8030B1BC 0030811C 38 63 00 0C */ addi r3, r3, 0xc -/* 8030B1C0 00308120 90 6D A7 E8 */ stw r3, lbl_805A93A8@sda21(r13) +/* 8030B1C0 00308120 90 6D A7 E8 */ stw r3, mpNrmBuffer__9CGraphics@sda21(r13) /* 8030B1C4 00308124 4B CF 82 CD */ bl memcpy -/* 8030B1C8 00308128 80 6D A7 E8 */ lwz r3, lbl_805A93A8@sda21(r13) +/* 8030B1C8 00308128 80 6D A7 E8 */ lwz r3, mpNrmBuffer__9CGraphics@sda21(r13) /* 8030B1CC 0030812C 38 03 00 0C */ addi r0, r3, 0xc -/* 8030B1D0 00308130 90 0D A7 E8 */ stw r0, lbl_805A93A8@sda21(r13) +/* 8030B1D0 00308130 90 0D A7 E8 */ stw r0, mpNrmBuffer__9CGraphics@sda21(r13) lbl_8030B1D4: /* 8030B1D4 00308134 88 1F 00 2E */ lbz r0, 0x2e(r31) /* 8030B1D8 00308138 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d /* 8030B1DC 0030813C 41 82 00 5C */ beq lbl_8030B238 -/* 8030B1E0 00308140 80 CD A7 EC */ lwz r6, lbl_805A93AC@sda21(r13) -/* 8030B1E4 00308144 3C 60 80 5A */ lis r3, lbl_805A6170@ha -/* 8030B1E8 00308148 38 83 61 70 */ addi r4, r3, lbl_805A6170@l +/* 8030B1E0 00308140 80 CD A7 EC */ lwz r6, mpTxtBuffer0__9CGraphics@sda21(r13) +/* 8030B1E4 00308144 3C 60 80 5A */ lis r3, vtxDescr@ha +/* 8030B1E8 00308148 38 83 61 70 */ addi r4, r3, vtxDescr@l /* 8030B1EC 0030814C 38 A0 00 08 */ li r5, 8 /* 8030B1F0 00308150 38 66 00 08 */ addi r3, r6, 8 -/* 8030B1F4 00308154 90 6D A7 EC */ stw r3, lbl_805A93AC@sda21(r13) +/* 8030B1F4 00308154 90 6D A7 EC */ stw r3, mpTxtBuffer0__9CGraphics@sda21(r13) /* 8030B1F8 00308158 38 84 00 18 */ addi r4, r4, 0x18 /* 8030B1FC 0030815C 4B CF 82 95 */ bl memcpy -/* 8030B200 00308160 80 AD A7 EC */ lwz r5, lbl_805A93AC@sda21(r13) -/* 8030B204 00308164 3C 60 80 5A */ lis r3, lbl_805A6170@ha -/* 8030B208 00308168 80 CD A7 F0 */ lwz r6, lbl_805A93B0@sda21(r13) -/* 8030B20C 0030816C 38 83 61 70 */ addi r4, r3, lbl_805A6170@l +/* 8030B200 00308160 80 AD A7 EC */ lwz r5, mpTxtBuffer0__9CGraphics@sda21(r13) +/* 8030B204 00308164 3C 60 80 5A */ lis r3, vtxDescr@ha +/* 8030B208 00308168 80 CD A7 F0 */ lwz r6, mpTxtBuffer1__9CGraphics@sda21(r13) +/* 8030B20C 0030816C 38 83 61 70 */ addi r4, r3, vtxDescr@l /* 8030B210 00308170 38 05 00 08 */ addi r0, r5, 8 /* 8030B214 00308174 38 A0 00 08 */ li r5, 8 /* 8030B218 00308178 38 66 00 08 */ addi r3, r6, 8 -/* 8030B21C 0030817C 90 0D A7 EC */ stw r0, lbl_805A93AC@sda21(r13) +/* 8030B21C 0030817C 90 0D A7 EC */ stw r0, mpTxtBuffer0__9CGraphics@sda21(r13) /* 8030B220 00308180 38 84 00 20 */ addi r4, r4, 0x20 -/* 8030B224 00308184 90 6D A7 F0 */ stw r3, lbl_805A93B0@sda21(r13) +/* 8030B224 00308184 90 6D A7 F0 */ stw r3, mpTxtBuffer1__9CGraphics@sda21(r13) /* 8030B228 00308188 4B CF 82 69 */ bl memcpy -/* 8030B22C 0030818C 80 6D A7 F0 */ lwz r3, lbl_805A93B0@sda21(r13) +/* 8030B22C 0030818C 80 6D A7 F0 */ lwz r3, mpTxtBuffer1__9CGraphics@sda21(r13) /* 8030B230 00308190 38 03 00 08 */ addi r0, r3, 8 -/* 8030B234 00308194 90 0D A7 F0 */ stw r0, lbl_805A93B0@sda21(r13) +/* 8030B234 00308194 90 0D A7 F0 */ stw r0, mpTxtBuffer1__9CGraphics@sda21(r13) lbl_8030B238: /* 8030B238 00308198 88 1F 00 2E */ lbz r0, 0x2e(r31) /* 8030B23C 0030819C 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e /* 8030B240 003081A0 41 82 00 2C */ beq lbl_8030B26C -/* 8030B244 003081A4 80 8D A7 F4 */ lwz r4, lbl_805A93B4@sda21(r13) -/* 8030B248 003081A8 3C 60 80 5A */ lis r3, lbl_805A6170@ha -/* 8030B24C 003081AC 38 63 61 70 */ addi r3, r3, lbl_805A6170@l +/* 8030B244 003081A4 80 8D A7 F4 */ lwz r4, mpClrBuffer__9CGraphics@sda21(r13) +/* 8030B248 003081A8 3C 60 80 5A */ lis r3, vtxDescr@ha +/* 8030B24C 003081AC 38 63 61 70 */ addi r3, r3, vtxDescr@l /* 8030B250 003081B0 38 84 00 04 */ addi r4, r4, 4 /* 8030B254 003081B4 80 03 00 28 */ lwz r0, 0x28(r3) -/* 8030B258 003081B8 90 8D A7 F4 */ stw r4, lbl_805A93B4@sda21(r13) +/* 8030B258 003081B8 90 8D A7 F4 */ stw r4, mpClrBuffer__9CGraphics@sda21(r13) /* 8030B25C 003081BC 90 04 00 00 */ stw r0, 0(r4) -/* 8030B260 003081C0 80 6D A7 F4 */ lwz r3, lbl_805A93B4@sda21(r13) +/* 8030B260 003081C0 80 6D A7 F4 */ lwz r3, mpClrBuffer__9CGraphics@sda21(r13) /* 8030B264 003081C4 38 03 00 04 */ addi r0, r3, 4 -/* 8030B268 003081C8 90 0D A7 F4 */ stw r0, lbl_805A93B4@sda21(r13) +/* 8030B268 003081C8 90 0D A7 F4 */ stw r0, mpClrBuffer__9CGraphics@sda21(r13) lbl_8030B26C: -/* 8030B26C 003081CC 80 6D A7 FC */ lwz r3, lbl_805A93BC@sda21(r13) +/* 8030B26C 003081CC 80 6D A7 FC */ lwz r3, mNumPrimitives__9CGraphics@sda21(r13) /* 8030B270 003081D0 38 03 00 02 */ addi r0, r3, 2 -/* 8030B274 003081D4 90 0D A7 FC */ stw r0, lbl_805A93BC@sda21(r13) +/* 8030B274 003081D4 90 0D A7 FC */ stw r0, mNumPrimitives__9CGraphics@sda21(r13) lbl_8030B278: /* 8030B278 003081D8 38 00 00 01 */ li r0, 1 -/* 8030B27C 003081DC 98 0D A7 D4 */ stb r0, lbl_805A9394@sda21(r13) +/* 8030B27C 003081DC 98 0D A7 D4 */ stb r0, mJustReset__9CGraphics@sda21(r13) lbl_8030B280: /* 8030B280 003081E0 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030B284 003081E4 83 E1 00 0C */ lwz r31, 0xc(r1) @@ -2596,79 +2583,79 @@ lbl_8030B280: UpdateVertexDataStream__9CGraphicsFv: /* 8030B294 003081F4 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030B298 003081F8 7C 08 02 A6 */ mflr r0 -/* 8030B29C 003081FC 3C 60 80 5A */ lis r3, lbl_805A6170@ha +/* 8030B29C 003081FC 3C 60 80 5A */ lis r3, vtxDescr@ha /* 8030B2A0 00308200 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030B2A4 00308204 38 A3 61 70 */ addi r5, r3, lbl_805A6170@l -/* 8030B2A8 00308208 80 8D A7 FC */ lwz r4, lbl_805A93BC@sda21(r13) -/* 8030B2AC 0030820C 80 6D A7 E4 */ lwz r3, lbl_805A93A4@sda21(r13) +/* 8030B2A4 00308204 38 A3 61 70 */ addi r5, r3, vtxDescr@l +/* 8030B2A8 00308208 80 8D A7 FC */ lwz r4, mNumPrimitives__9CGraphics@sda21(r13) +/* 8030B2AC 0030820C 80 6D A7 E4 */ lwz r3, mpVtxBuffer__9CGraphics@sda21(r13) /* 8030B2B0 00308210 38 04 00 01 */ addi r0, r4, 1 /* 8030B2B4 00308214 C0 05 00 00 */ lfs f0, 0(r5) -/* 8030B2B8 00308218 90 0D A7 FC */ stw r0, lbl_805A93BC@sda21(r13) +/* 8030B2B8 00308218 90 0D A7 FC */ stw r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030B2BC 0030821C D0 03 00 00 */ stfs f0, 0(r3) /* 8030B2C0 00308220 C0 05 00 04 */ lfs f0, 4(r5) -/* 8030B2C4 00308224 80 6D A7 E4 */ lwz r3, lbl_805A93A4@sda21(r13) +/* 8030B2C4 00308224 80 6D A7 E4 */ lwz r3, mpVtxBuffer__9CGraphics@sda21(r13) /* 8030B2C8 00308228 D0 03 00 04 */ stfs f0, 4(r3) /* 8030B2CC 0030822C C0 05 00 08 */ lfs f0, 8(r5) -/* 8030B2D0 00308230 80 6D A7 E4 */ lwz r3, lbl_805A93A4@sda21(r13) +/* 8030B2D0 00308230 80 6D A7 E4 */ lwz r3, mpVtxBuffer__9CGraphics@sda21(r13) /* 8030B2D4 00308234 D0 03 00 08 */ stfs f0, 8(r3) /* 8030B2D8 00308238 88 05 00 2E */ lbz r0, 0x2e(r5) -/* 8030B2DC 0030823C 80 6D A7 E4 */ lwz r3, lbl_805A93A4@sda21(r13) +/* 8030B2DC 0030823C 80 6D A7 E4 */ lwz r3, mpVtxBuffer__9CGraphics@sda21(r13) /* 8030B2E0 00308240 54 00 07 FF */ clrlwi. r0, r0, 0x1f /* 8030B2E4 00308244 38 63 00 0C */ addi r3, r3, 0xc -/* 8030B2E8 00308248 90 6D A7 E4 */ stw r3, lbl_805A93A4@sda21(r13) +/* 8030B2E8 00308248 90 6D A7 E4 */ stw r3, mpVtxBuffer__9CGraphics@sda21(r13) /* 8030B2EC 0030824C 41 82 00 34 */ beq lbl_8030B320 /* 8030B2F0 00308250 C0 05 00 0C */ lfs f0, 0xc(r5) -/* 8030B2F4 00308254 80 6D A7 E8 */ lwz r3, lbl_805A93A8@sda21(r13) +/* 8030B2F4 00308254 80 6D A7 E8 */ lwz r3, mpNrmBuffer__9CGraphics@sda21(r13) /* 8030B2F8 00308258 D0 03 00 00 */ stfs f0, 0(r3) /* 8030B2FC 0030825C C0 05 00 10 */ lfs f0, 0x10(r5) -/* 8030B300 00308260 80 6D A7 E8 */ lwz r3, lbl_805A93A8@sda21(r13) +/* 8030B300 00308260 80 6D A7 E8 */ lwz r3, mpNrmBuffer__9CGraphics@sda21(r13) /* 8030B304 00308264 D0 03 00 04 */ stfs f0, 4(r3) /* 8030B308 00308268 C0 05 00 14 */ lfs f0, 0x14(r5) -/* 8030B30C 0030826C 80 6D A7 E8 */ lwz r3, lbl_805A93A8@sda21(r13) +/* 8030B30C 0030826C 80 6D A7 E8 */ lwz r3, mpNrmBuffer__9CGraphics@sda21(r13) /* 8030B310 00308270 D0 03 00 08 */ stfs f0, 8(r3) -/* 8030B314 00308274 80 6D A7 E8 */ lwz r3, lbl_805A93A8@sda21(r13) +/* 8030B314 00308274 80 6D A7 E8 */ lwz r3, mpNrmBuffer__9CGraphics@sda21(r13) /* 8030B318 00308278 38 03 00 0C */ addi r0, r3, 0xc -/* 8030B31C 0030827C 90 0D A7 E8 */ stw r0, lbl_805A93A8@sda21(r13) +/* 8030B31C 0030827C 90 0D A7 E8 */ stw r0, mpNrmBuffer__9CGraphics@sda21(r13) lbl_8030B320: /* 8030B320 00308280 88 05 00 2E */ lbz r0, 0x2e(r5) /* 8030B324 00308284 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d /* 8030B328 00308288 41 82 00 54 */ beq lbl_8030B37C -/* 8030B32C 0030828C 3C 80 80 5A */ lis r4, lbl_805A6170@ha -/* 8030B330 00308290 80 6D A7 EC */ lwz r3, lbl_805A93AC@sda21(r13) -/* 8030B334 00308294 38 84 61 70 */ addi r4, r4, lbl_805A6170@l +/* 8030B32C 0030828C 3C 80 80 5A */ lis r4, vtxDescr@ha +/* 8030B330 00308290 80 6D A7 EC */ lwz r3, mpTxtBuffer0__9CGraphics@sda21(r13) +/* 8030B334 00308294 38 84 61 70 */ addi r4, r4, vtxDescr@l /* 8030B338 00308298 C0 04 00 18 */ lfs f0, 0x18(r4) /* 8030B33C 0030829C D0 03 00 00 */ stfs f0, 0(r3) /* 8030B340 003082A0 C0 04 00 1C */ lfs f0, 0x1c(r4) -/* 8030B344 003082A4 80 6D A7 EC */ lwz r3, lbl_805A93AC@sda21(r13) +/* 8030B344 003082A4 80 6D A7 EC */ lwz r3, mpTxtBuffer0__9CGraphics@sda21(r13) /* 8030B348 003082A8 D0 03 00 04 */ stfs f0, 4(r3) -/* 8030B34C 003082AC 80 6D A7 EC */ lwz r3, lbl_805A93AC@sda21(r13) +/* 8030B34C 003082AC 80 6D A7 EC */ lwz r3, mpTxtBuffer0__9CGraphics@sda21(r13) /* 8030B350 003082B0 C0 04 00 20 */ lfs f0, 0x20(r4) /* 8030B354 003082B4 38 03 00 08 */ addi r0, r3, 8 -/* 8030B358 003082B8 80 6D A7 F0 */ lwz r3, lbl_805A93B0@sda21(r13) -/* 8030B35C 003082BC 90 0D A7 EC */ stw r0, lbl_805A93AC@sda21(r13) +/* 8030B358 003082B8 80 6D A7 F0 */ lwz r3, mpTxtBuffer1__9CGraphics@sda21(r13) +/* 8030B35C 003082BC 90 0D A7 EC */ stw r0, mpTxtBuffer0__9CGraphics@sda21(r13) /* 8030B360 003082C0 D0 03 00 00 */ stfs f0, 0(r3) /* 8030B364 003082C4 C0 04 00 24 */ lfs f0, 0x24(r4) -/* 8030B368 003082C8 80 6D A7 F0 */ lwz r3, lbl_805A93B0@sda21(r13) +/* 8030B368 003082C8 80 6D A7 F0 */ lwz r3, mpTxtBuffer1__9CGraphics@sda21(r13) /* 8030B36C 003082CC D0 03 00 04 */ stfs f0, 4(r3) -/* 8030B370 003082D0 80 6D A7 F0 */ lwz r3, lbl_805A93B0@sda21(r13) +/* 8030B370 003082D0 80 6D A7 F0 */ lwz r3, mpTxtBuffer1__9CGraphics@sda21(r13) /* 8030B374 003082D4 38 03 00 08 */ addi r0, r3, 8 -/* 8030B378 003082D8 90 0D A7 F0 */ stw r0, lbl_805A93B0@sda21(r13) +/* 8030B378 003082D8 90 0D A7 F0 */ stw r0, mpTxtBuffer1__9CGraphics@sda21(r13) lbl_8030B37C: /* 8030B37C 003082DC 88 05 00 2E */ lbz r0, 0x2e(r5) /* 8030B380 003082E0 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e /* 8030B384 003082E4 41 82 00 24 */ beq lbl_8030B3A8 -/* 8030B388 003082E8 3C 80 80 5A */ lis r4, lbl_805A6170@ha -/* 8030B38C 003082EC 80 6D A7 F4 */ lwz r3, lbl_805A93B4@sda21(r13) -/* 8030B390 003082F0 38 84 61 70 */ addi r4, r4, lbl_805A6170@l +/* 8030B388 003082E8 3C 80 80 5A */ lis r4, vtxDescr@ha +/* 8030B38C 003082EC 80 6D A7 F4 */ lwz r3, mpClrBuffer__9CGraphics@sda21(r13) +/* 8030B390 003082F0 38 84 61 70 */ addi r4, r4, vtxDescr@l /* 8030B394 003082F4 80 04 00 28 */ lwz r0, 0x28(r4) /* 8030B398 003082F8 90 03 00 00 */ stw r0, 0(r3) -/* 8030B39C 003082FC 80 6D A7 F4 */ lwz r3, lbl_805A93B4@sda21(r13) +/* 8030B39C 003082FC 80 6D A7 F4 */ lwz r3, mpClrBuffer__9CGraphics@sda21(r13) /* 8030B3A0 00308300 38 03 00 04 */ addi r0, r3, 4 -/* 8030B3A4 00308304 90 0D A7 F4 */ stw r0, lbl_805A93B4@sda21(r13) +/* 8030B3A4 00308304 90 0D A7 F4 */ stw r0, mpClrBuffer__9CGraphics@sda21(r13) lbl_8030B3A8: -/* 8030B3A8 00308308 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030B3A8 00308308 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030B3AC 0030830C 38 60 00 00 */ li r3, 0 -/* 8030B3B0 00308310 98 6D A7 D4 */ stb r3, lbl_805A9394@sda21(r13) +/* 8030B3B0 00308310 98 6D A7 D4 */ stb r3, mJustReset__9CGraphics@sda21(r13) /* 8030B3B4 00308314 2C 00 00 F0 */ cmpwi r0, 0xf0 /* 8030B3B8 00308318 40 82 00 10 */ bne lbl_8030B3C8 /* 8030B3BC 0030831C 4B FF FC 79 */ bl FlushStream__9CGraphicsFv @@ -2702,21 +2689,21 @@ StreamEnd__9CGraphicsFv: /* 8030B410 00308370 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030B414 00308374 7C 08 02 A6 */ mflr r0 /* 8030B418 00308378 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030B41C 0030837C 80 0D A7 FC */ lwz r0, lbl_805A93BC@sda21(r13) +/* 8030B41C 0030837C 80 0D A7 FC */ lwz r0, mNumPrimitives__9CGraphics@sda21(r13) /* 8030B420 00308380 2C 00 00 00 */ cmpwi r0, 0 /* 8030B424 00308384 41 82 00 08 */ beq lbl_8030B42C /* 8030B428 00308388 4B FF FC 0D */ bl FlushStream__9CGraphicsFv lbl_8030B42C: -/* 8030B42C 0030838C 3C 60 80 5A */ lis r3, lbl_805A6170@ha +/* 8030B42C 0030838C 3C 60 80 5A */ lis r3, vtxDescr@ha /* 8030B430 00308390 38 00 00 00 */ li r0, 0 -/* 8030B434 00308394 38 63 61 70 */ addi r3, r3, lbl_805A6170@l -/* 8030B438 00308398 90 0D A7 C0 */ stw r0, lbl_805A9380@sda21(r13) +/* 8030B434 00308394 38 63 61 70 */ addi r3, r3, vtxDescr@l +/* 8030B438 00308398 90 0D A7 C0 */ stw r0, vtxBuffer__9CGraphics@sda21(r13) /* 8030B43C 0030839C 98 03 00 2E */ stb r0, 0x2e(r3) /* 8030B440 003083A0 B0 03 00 2C */ sth r0, 0x2c(r3) -/* 8030B444 003083A4 90 0D A7 C4 */ stw r0, lbl_805A9384@sda21(r13) -/* 8030B448 003083A8 90 0D A7 C8 */ stw r0, lbl_805A9388@sda21(r13) -/* 8030B44C 003083AC 90 0D A7 CC */ stw r0, lbl_805A938C@sda21(r13) -/* 8030B450 003083B0 90 0D A7 D0 */ stw r0, lbl_805A9390@sda21(r13) +/* 8030B444 003083A4 90 0D A7 C4 */ stw r0, nrmBuffer__9CGraphics@sda21(r13) +/* 8030B448 003083A8 90 0D A7 C8 */ stw r0, txtBuffer0__9CGraphics@sda21(r13) +/* 8030B44C 003083AC 90 0D A7 CC */ stw r0, txtBuffer1__9CGraphics@sda21(r13) +/* 8030B450 003083B0 90 0D A7 D0 */ stw r0, clrBuffer__9CGraphics@sda21(r13) /* 8030B454 003083B4 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030B458 003083B8 7C 08 03 A6 */ mtlr r0 /* 8030B45C 003083BC 38 21 00 10 */ addi r1, r1, 0x10 @@ -2724,9 +2711,9 @@ lbl_8030B42C: .global StreamTexcoord__9CGraphicsFff StreamTexcoord__9CGraphicsFff: -/* 8030B464 003083C4 3C 80 80 5A */ lis r4, lbl_805A6170@ha +/* 8030B464 003083C4 3C 80 80 5A */ lis r4, vtxDescr@ha /* 8030B468 003083C8 88 62 C8 04 */ lbz r3, lbl_805AE524@sda21(r2) -/* 8030B46C 003083CC 38 A4 61 70 */ addi r5, r4, lbl_805A6170@l +/* 8030B46C 003083CC 38 A4 61 70 */ addi r5, r4, vtxDescr@l /* 8030B470 003083D0 88 85 00 2E */ lbz r4, 0x2e(r5) /* 8030B474 003083D4 A0 05 00 2C */ lhz r0, 0x2c(r5) /* 8030B478 003083D8 7C 83 1B 78 */ or r3, r4, r3 @@ -2739,9 +2726,9 @@ StreamTexcoord__9CGraphicsFff: .global StreamTexcoord__9CGraphicsFRC9CVector2f StreamTexcoord__9CGraphicsFRC9CVector2f: -/* 8030B494 003083F4 3C A0 80 5A */ lis r5, lbl_805A6170@ha +/* 8030B494 003083F4 3C A0 80 5A */ lis r5, vtxDescr@ha /* 8030B498 003083F8 88 82 C8 04 */ lbz r4, lbl_805AE524@sda21(r2) -/* 8030B49C 003083FC 38 C5 61 70 */ addi r6, r5, lbl_805A6170@l +/* 8030B49C 003083FC 38 C5 61 70 */ addi r6, r5, vtxDescr@l /* 8030B4A0 00308400 C0 23 00 00 */ lfs f1, 0(r3) /* 8030B4A4 00308404 A0 06 00 2C */ lhz r0, 0x2c(r6) /* 8030B4A8 00308408 C0 03 00 04 */ lfs f0, 4(r3) @@ -2757,9 +2744,9 @@ StreamTexcoord__9CGraphicsFRC9CVector2f: .global StreamColor__9CGraphicsFffff StreamColor__9CGraphicsFffff: /* 8030B4CC 0030842C C0 A2 C8 08 */ lfs f5, lbl_805AE528@sda21(r2) -/* 8030B4D0 00308430 3C 60 80 5A */ lis r3, lbl_805A6170@ha +/* 8030B4D0 00308430 3C 60 80 5A */ lis r3, vtxDescr@ha /* 8030B4D4 00308434 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 8030B4D8 00308438 38 83 61 70 */ addi r4, r3, lbl_805A6170@l +/* 8030B4D8 00308438 38 83 61 70 */ addi r4, r3, vtxDescr@l /* 8030B4DC 0030843C EC 05 00 B2 */ fmuls f0, f5, f2 /* 8030B4E0 00308440 88 02 C8 05 */ lbz r0, lbl_805AE525@sda21(r2) /* 8030B4E4 00308444 EC 25 00 72 */ fmuls f1, f5, f1 @@ -2790,9 +2777,9 @@ StreamColor__9CGraphicsFffff: .global StreamColor__9CGraphicsFRC6CColor StreamColor__9CGraphicsFRC6CColor: -/* 8030B548 003084A8 3C 80 80 5A */ lis r4, lbl_805A6170@ha +/* 8030B548 003084A8 3C 80 80 5A */ lis r4, vtxDescr@ha /* 8030B54C 003084AC 88 02 C8 05 */ lbz r0, lbl_805AE525@sda21(r2) -/* 8030B550 003084B0 38 84 61 70 */ addi r4, r4, lbl_805A6170@l +/* 8030B550 003084B0 38 84 61 70 */ addi r4, r4, vtxDescr@l /* 8030B554 003084B4 80 A3 00 00 */ lwz r5, 0(r3) /* 8030B558 003084B8 88 64 00 2E */ lbz r3, 0x2e(r4) /* 8030B55C 003084BC 90 A4 00 28 */ stw r5, 0x28(r4) @@ -2802,9 +2789,9 @@ StreamColor__9CGraphicsFRC6CColor: .global StreamColor__9CGraphicsFUi StreamColor__9CGraphicsFUi: -/* 8030B56C 003084CC 3C 80 80 5A */ lis r4, lbl_805A6170@ha +/* 8030B56C 003084CC 3C 80 80 5A */ lis r4, vtxDescr@ha /* 8030B570 003084D0 88 02 C8 05 */ lbz r0, lbl_805AE525@sda21(r2) -/* 8030B574 003084D4 38 A4 61 70 */ addi r5, r4, lbl_805A6170@l +/* 8030B574 003084D4 38 A4 61 70 */ addi r5, r4, vtxDescr@l /* 8030B578 003084D8 88 85 00 2E */ lbz r4, 0x2e(r5) /* 8030B57C 003084DC 90 65 00 28 */ stw r3, 0x28(r5) /* 8030B580 003084E0 7C 80 03 78 */ or r0, r4, r0 @@ -2813,9 +2800,9 @@ StreamColor__9CGraphicsFUi: .global StreamNormal__9CGraphicsFPCf StreamNormal__9CGraphicsFPCf: -/* 8030B58C 003084EC 3C 80 80 5A */ lis r4, lbl_805A6170@ha +/* 8030B58C 003084EC 3C 80 80 5A */ lis r4, vtxDescr@ha /* 8030B590 003084F0 88 02 C8 0C */ lbz r0, lbl_805AE52C@sda21(r2) -/* 8030B594 003084F4 38 A4 61 70 */ addi r5, r4, lbl_805A6170@l +/* 8030B594 003084F4 38 A4 61 70 */ addi r5, r4, vtxDescr@l /* 8030B598 003084F8 C0 43 00 00 */ lfs f2, 0(r3) /* 8030B59C 003084FC 88 85 00 2E */ lbz r4, 0x2e(r5) /* 8030B5A0 00308500 C0 23 00 04 */ lfs f1, 4(r3) @@ -2831,11 +2818,11 @@ StreamNormal__9CGraphicsFPCf: StreamVertex__9CGraphicsFRC9CVector3f: /* 8030B5C0 00308520 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030B5C4 00308524 7C 08 02 A6 */ mflr r0 -/* 8030B5C8 00308528 3C 80 80 5A */ lis r4, lbl_805A6170@ha +/* 8030B5C8 00308528 3C 80 80 5A */ lis r4, vtxDescr@ha /* 8030B5CC 0030852C 90 01 00 14 */ stw r0, 0x14(r1) /* 8030B5D0 00308530 C0 43 00 00 */ lfs f2, 0(r3) /* 8030B5D4 00308534 C0 23 00 04 */ lfs f1, 4(r3) -/* 8030B5D8 00308538 D4 44 61 70 */ stfsu f2, lbl_805A6170@l(r4) +/* 8030B5D8 00308538 D4 44 61 70 */ stfsu f2, vtxDescr@l(r4) /* 8030B5DC 0030853C C0 03 00 08 */ lfs f0, 8(r3) /* 8030B5E0 00308540 D0 24 00 04 */ stfs f1, 4(r4) /* 8030B5E4 00308544 D0 04 00 08 */ stfs f0, 8(r4) @@ -2849,11 +2836,11 @@ StreamVertex__9CGraphicsFRC9CVector3f: StreamVertex__9CGraphicsFPCf: /* 8030B5FC 0030855C 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030B600 00308560 7C 08 02 A6 */ mflr r0 -/* 8030B604 00308564 3C 80 80 5A */ lis r4, lbl_805A6170@ha +/* 8030B604 00308564 3C 80 80 5A */ lis r4, vtxDescr@ha /* 8030B608 00308568 90 01 00 14 */ stw r0, 0x14(r1) /* 8030B60C 0030856C C0 43 00 00 */ lfs f2, 0(r3) /* 8030B610 00308570 C0 23 00 04 */ lfs f1, 4(r3) -/* 8030B614 00308574 D4 44 61 70 */ stfsu f2, lbl_805A6170@l(r4) +/* 8030B614 00308574 D4 44 61 70 */ stfsu f2, vtxDescr@l(r4) /* 8030B618 00308578 C0 03 00 08 */ lfs f0, 8(r3) /* 8030B61C 0030857C D0 24 00 04 */ stfs f1, 4(r4) /* 8030B620 00308580 D0 04 00 08 */ stfs f0, 8(r4) @@ -2867,9 +2854,9 @@ StreamVertex__9CGraphicsFPCf: StreamVertex__9CGraphicsFfff: /* 8030B638 00308598 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030B63C 0030859C 7C 08 02 A6 */ mflr r0 -/* 8030B640 003085A0 3C 60 80 5A */ lis r3, lbl_805A6170@ha +/* 8030B640 003085A0 3C 60 80 5A */ lis r3, vtxDescr@ha /* 8030B644 003085A4 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030B648 003085A8 D4 23 61 70 */ stfsu f1, lbl_805A6170@l(r3) +/* 8030B648 003085A8 D4 23 61 70 */ stfsu f1, vtxDescr@l(r3) /* 8030B64C 003085AC D0 43 00 04 */ stfs f2, 4(r3) /* 8030B650 003085B0 D0 63 00 08 */ stfs f3, 8(r3) /* 8030B654 003085B4 4B FF FC 41 */ bl UpdateVertexDataStream__9CGraphicsFv @@ -2890,17 +2877,17 @@ StreamBegin__9CGraphicsF13ERglPrimitive: /* 8030B684 003085E4 93 E1 00 0C */ stw r31, 0xc(r1) /* 8030B688 003085E8 7C 7F 1B 78 */ mr r31, r3 /* 8030B68C 003085EC 38 66 03 C4 */ addi r3, r6, 0x3c4 -/* 8030B690 003085F0 90 6D A7 C4 */ stw r3, lbl_805A9384@sda21(r13) +/* 8030B690 003085F0 90 6D A7 C4 */ stw r3, nrmBuffer__9CGraphics@sda21(r13) /* 8030B694 003085F4 38 60 00 01 */ li r3, 1 -/* 8030B698 003085F8 90 CD A7 C0 */ stw r6, lbl_805A9380@sda21(r13) -/* 8030B69C 003085FC 90 AD A7 C8 */ stw r5, lbl_805A9388@sda21(r13) -/* 8030B6A0 00308600 90 8D A7 CC */ stw r4, lbl_805A938C@sda21(r13) -/* 8030B6A4 00308604 90 0D A7 D0 */ stw r0, lbl_805A9390@sda21(r13) +/* 8030B698 003085F8 90 CD A7 C0 */ stw r6, vtxBuffer__9CGraphics@sda21(r13) +/* 8030B69C 003085FC 90 AD A7 C8 */ stw r5, txtBuffer0__9CGraphics@sda21(r13) +/* 8030B6A0 00308600 90 8D A7 CC */ stw r4, txtBuffer1__9CGraphics@sda21(r13) +/* 8030B6A4 00308604 90 0D A7 D0 */ stw r0, clrBuffer__9CGraphics@sda21(r13) /* 8030B6A8 00308608 4B FF FA 79 */ bl ResetVertexDataStream__9CGraphicsFb -/* 8030B6AC 0030860C 3C 60 80 5A */ lis r3, lbl_805A6170@ha +/* 8030B6AC 0030860C 3C 60 80 5A */ lis r3, vtxDescr@ha /* 8030B6B0 00308610 38 00 00 02 */ li r0, 2 -/* 8030B6B4 00308614 38 63 61 70 */ addi r3, r3, lbl_805A6170@l -/* 8030B6B8 00308618 93 ED 9C 74 */ stw r31, lbl_805A8834@sda21(r13) +/* 8030B6B4 00308614 38 63 61 70 */ addi r3, r3, vtxDescr@l +/* 8030B6B8 00308618 93 ED 9C 74 */ stw r31, mCurrentPrimitive__9CGraphics@sda21(r13) /* 8030B6BC 0030861C 98 03 00 2E */ stb r0, 0x2e(r3) /* 8030B6C0 00308620 83 E1 00 0C */ lwz r31, 0xc(r1) /* 8030B6C4 00308624 80 01 00 14 */ lwz r0, 0x14(r1) @@ -2961,9 +2948,9 @@ Render2D__9CGraphicsFRC8CTextureiiiiRC6CColor: /* 8030B780 003086E0 DB 81 00 E0 */ stfd f28, 0xe0(r1) /* 8030B784 003086E4 F3 81 00 E8 */ psq_st f28, 232(r1), 0, qr0 /* 8030B788 003086E8 BF 21 00 C4 */ stmw r25, 0xc4(r1) -/* 8030B78C 003086EC 3D 20 80 3F */ lis r9, lbl_803ED910@ha +/* 8030B78C 003086EC 3D 20 80 3F */ lis r9, mViewport__9CGraphics@ha /* 8030B790 003086F0 3D 40 43 30 */ lis r10, 0x4330 -/* 8030B794 003086F4 3B E9 D9 10 */ addi r31, r9, lbl_803ED910@l +/* 8030B794 003086F4 3B E9 D9 10 */ addi r31, r9, mViewport__9CGraphics@l /* 8030B798 003086F8 7C 7B 1B 78 */ mr r27, r3 /* 8030B79C 003086FC 80 7F 00 0C */ lwz r3, 0xc(r31) /* 8030B7A0 00308700 7C 9C 23 78 */ mr r28, r4 @@ -3059,13 +3046,13 @@ Render2D__9CGraphicsFRC8CTextureiiiiRC6CColor: /* 8030B908 00308868 4B FF C5 21 */ bl SetVtxDescv__3CGXFPC14_GXVtxDescList /* 8030B90C 0030886C 38 60 00 06 */ li r3, 6 /* 8030B910 00308870 4B FF F5 C1 */ bl SetTevStates__9CGraphicsFUc -/* 8030B914 00308874 88 0D A8 16 */ lbz r0, lbl_805A93D6@sda21(r13) +/* 8030B914 00308874 88 0D A8 16 */ lbz r0, mLightActive__9CGraphics@sda21(r13) /* 8030B918 00308878 28 00 00 00 */ cmplwi r0, 0 -/* 8030B91C 0030887C 98 0D A8 17 */ stb r0, lbl_805A93D7@sda21(r13) +/* 8030B91C 0030887C 98 0D A8 17 */ stb r0, mLightsWereOn__9CGraphics@sda21(r13) /* 8030B920 00308880 41 82 00 08 */ beq lbl_8030B928 /* 8030B924 00308884 48 00 10 59 */ bl DisableAllLights__9CGraphicsFv lbl_8030B928: -/* 8030B928 00308888 83 8D A7 D8 */ lwz r28, lbl_805A9398@sda21(r13) +/* 8030B928 00308888 83 8D A7 D8 */ lwz r28, mCullMode__9CGraphics@sda21(r13) /* 8030B92C 0030888C 38 60 00 00 */ li r3, 0 /* 8030B930 00308890 48 00 01 41 */ bl SetCullMode__9CGraphicsF12ERglCullMode /* 8030B934 00308894 7F 63 DB 78 */ mr r3, r27 @@ -3104,16 +3091,16 @@ lbl_8030B928: /* 8030B9B8 00308918 D0 23 80 00 */ stfs f1, 0xCC008000@l(r3) /* 8030B9BC 0030891C D0 23 80 00 */ stfs f1, 0xCC008000@l(r3) /* 8030B9C0 00308920 4B FF CB C1 */ bl End__3CGXFv -/* 8030B9C4 00308924 88 6D A8 17 */ lbz r3, lbl_805A93D7@sda21(r13) +/* 8030B9C4 00308924 88 6D A8 17 */ lbz r3, mLightsWereOn__9CGraphics@sda21(r13) /* 8030B9C8 00308928 28 03 00 00 */ cmplwi r3, 0 /* 8030B9CC 0030892C 41 82 00 08 */ beq lbl_8030B9D4 /* 8030B9D0 00308930 48 00 0F 01 */ bl SetLightState__9CGraphicsFUc lbl_8030B9D4: /* 8030B9D4 00308934 4B FF E4 95 */ bl FlushProjection__9CGraphicsFv /* 8030B9D8 00308938 38 00 00 00 */ li r0, 0 -/* 8030B9DC 0030893C 3C 60 80 5A */ lis r3, lbl_805A6204@ha -/* 8030B9E0 00308940 98 0D 9C 80 */ stb r0, lbl_805A8840@sda21(r13) -/* 8030B9E4 00308944 38 63 62 04 */ addi r3, r3, lbl_805A6204@l +/* 8030B9DC 0030893C 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha +/* 8030B9E0 00308940 98 0D 9C 80 */ stb r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) +/* 8030B9E4 00308944 38 63 62 04 */ addi r3, r3, mModelMatrix__9CGraphics@l /* 8030B9E8 00308948 48 00 0B F9 */ bl SetModelMatrix__9CGraphicsFRC12CTransform4f /* 8030B9EC 0030894C 7F 83 E3 78 */ mr r3, r28 /* 8030B9F0 00308950 48 00 00 81 */ bl SetCullMode__9CGraphicsF12ERglCullMode @@ -3160,7 +3147,7 @@ SetCullMode__9CGraphicsF12ERglCullMode: /* 8030BA70 003089D0 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030BA74 003089D4 7C 08 02 A6 */ mflr r0 /* 8030BA78 003089D8 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030BA7C 003089DC 90 6D A7 D8 */ stw r3, lbl_805A9398@sda21(r13) +/* 8030BA7C 003089DC 90 6D A7 D8 */ stw r3, mCullMode__9CGraphics@sda21(r13) /* 8030BA80 003089E0 48 06 D0 D9 */ bl GXSetCullMode /* 8030BA84 003089E4 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030BA88 003089E8 7C 08 03 A6 */ mtlr r0 @@ -3174,7 +3161,7 @@ SetDepthWriteMode__9CGraphicsFb8ERglEnumb: /* 8030BA9C 003089FC 54 63 06 3E */ clrlwi r3, r3, 0x18 /* 8030BAA0 00308A00 54 A5 06 3E */ clrlwi r5, r5, 0x18 /* 8030BAA4 00308A04 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030BAA8 00308A08 90 8D 9C 70 */ stw r4, lbl_805A8830@sda21(r13) +/* 8030BAA8 00308A08 90 8D 9C 70 */ stw r4, mDepthFunc__9CGraphics@sda21(r13) /* 8030BAAC 00308A0C 4B FF CD D1 */ bl SetZMode__3CGXFb10_GXCompareb /* 8030BAB0 00308A10 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030BAB4 00308A14 7C 08 03 A6 */ mtlr r0 @@ -3193,7 +3180,7 @@ EndScene__9CGraphicsFv: /* 8030BADC 00308A3C 93 C1 00 98 */ stw r30, 0x98(r1) /* 8030BAE0 00308A40 93 A1 00 94 */ stw r29, 0x94(r1) /* 8030BAE4 00308A44 4B FF CD 99 */ bl SetZMode__3CGXFb10_GXCompareb -/* 8030BAE8 00308A48 3B AD A8 0C */ addi r29, r13, lbl_805A93CC@sda21 +/* 8030BAE8 00308A48 3B AD A8 0C */ addi r29, r13, mNumBreakpointsWaiting__9CGraphics@sda21 /* 8030BAEC 00308A4C 48 00 00 08 */ b lbl_8030BAF4 lbl_8030BAF0: /* 8030BAF0 00308A50 48 07 90 2D */ bl OSYieldThread @@ -3201,28 +3188,28 @@ lbl_8030BAF4: /* 8030BAF4 00308A54 80 1D 00 00 */ lwz r0, 0(r29) /* 8030BAF8 00308A58 2C 00 00 00 */ cmpwi r0, 0 /* 8030BAFC 00308A5C 41 81 FF F4 */ bgt lbl_8030BAF0 -/* 8030BB00 00308A60 80 AD A8 0C */ lwz r5, lbl_805A93CC@sda21(r13) -/* 8030BB04 00308A64 3B CD A8 20 */ addi r30, r13, lbl_805A93E0@sda21 -/* 8030BB08 00308A68 38 6D 9C 88 */ addi r3, r13, lbl_805A8848@sda21 -/* 8030BB0C 00308A6C 38 8D 9C 84 */ addi r4, r13, lbl_805A8844@sda21 +/* 8030BB00 00308A60 80 AD A8 0C */ lwz r5, mNumBreakpointsWaiting__9CGraphics@sda21(r13) +/* 8030BB04 00308A64 3B CD A8 20 */ addi r30, r13, mpCurrenFrameBuf__9CGraphics@sda21 +/* 8030BB08 00308A68 38 6D 9C 88 */ addi r3, r13, mBrightnessMin__9CGraphics@sda21 +/* 8030BB0C 00308A6C 38 8D 9C 84 */ addi r4, r13, mBrightness__9CGraphics@sda21 /* 8030BB10 00308A70 38 05 00 01 */ addi r0, r5, 1 -/* 8030BB14 00308A74 38 AD 9C 8C */ addi r5, r13, lbl_805A884C@sda21 -/* 8030BB18 00308A78 90 0D A8 0C */ stw r0, lbl_805A93CC@sda21(r13) +/* 8030BB14 00308A74 38 AD 9C 8C */ addi r5, r13, mBrightnessMax__9CGraphics@sda21 +/* 8030BB18 00308A78 90 0D A8 0C */ stw r0, mNumBreakpointsWaiting__9CGraphics@sda21(r13) /* 8030BB1C 00308A7C 4B D0 07 99 */ bl "Clamp__5CMathFRCfRCfRCf" -/* 8030BB20 00308A80 88 0D 9C 82 */ lbz r0, lbl_805A8842@sda21(r13) +/* 8030BB20 00308A80 88 0D 9C 82 */ lbz r0, mUseVideoFilter__9CGraphics@sda21(r13) /* 8030BB24 00308A84 39 02 C7 B0 */ addi r8, r2, lbl_805AE4D0@sda21 /* 8030BB28 00308A88 C0 43 00 00 */ lfs f2, 0(r3) /* 8030BB2C 00308A8C 28 00 00 00 */ cmplwi r0, 0 /* 8030BB30 00308A90 41 82 00 10 */ beq lbl_8030BB40 -/* 8030BB34 00308A94 3C 60 80 5A */ lis r3, lbl_805A6500@ha -/* 8030BB38 00308A98 38 63 65 00 */ addi r3, r3, lbl_805A6500@l +/* 8030BB34 00308A94 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha +/* 8030BB38 00308A98 38 63 65 00 */ addi r3, r3, mRenderModeObj__9CGraphics@l /* 8030BB3C 00308A9C 39 03 00 32 */ addi r8, r3, 0x32 lbl_8030BB40: /* 8030BB40 00308AA0 88 08 00 00 */ lbz r0, 0(r8) /* 8030BB44 00308AA4 3C E0 43 30 */ lis r7, 0x4330 -/* 8030BB48 00308AA8 3C 60 80 5A */ lis r3, lbl_805A6500@ha +/* 8030BB48 00308AA8 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha /* 8030BB4C 00308AAC 90 E1 00 18 */ stw r7, 0x18(r1) -/* 8030BB50 00308AB0 3B A3 65 00 */ addi r29, r3, lbl_805A6500@l +/* 8030BB50 00308AB0 3B A3 65 00 */ addi r29, r3, mRenderModeObj__9CGraphics@l /* 8030BB54 00308AB4 C8 22 C7 F8 */ lfd f1, lbl_805AE518@sda21(r2) /* 8030BB58 00308AB8 90 01 00 1C */ stw r0, 0x1c(r1) /* 8030BB5C 00308ABC 3B FD 00 1A */ addi r31, r29, 0x1a @@ -3298,15 +3285,15 @@ lbl_8030BB40: /* 8030BC74 00308BD4 80 01 00 84 */ lwz r0, 0x84(r1) /* 8030BC78 00308BD8 98 01 00 16 */ stb r0, 0x16(r1) /* 8030BC7C 00308BDC 48 06 D5 19 */ bl GXSetCopyFilter -/* 8030BC80 00308BE0 88 8D 9C 6C */ lbz r4, lbl_805A882C@sda21(r13) +/* 8030BC80 00308BE0 88 8D 9C 6C */ lbz r4, mIsBeginSceneClearFb__9CGraphics@sda21(r13) /* 8030BC84 00308BE4 80 7E 00 00 */ lwz r3, 0(r30) /* 8030BC88 00308BE8 7C 04 00 D0 */ neg r0, r4 /* 8030BC8C 00308BEC 7C 00 23 78 */ or r0, r0, r4 /* 8030BC90 00308BF0 54 04 0F FE */ srwi r4, r0, 0x1f /* 8030BC94 00308BF4 48 06 D7 45 */ bl GXCopyDisp -/* 8030BC98 00308BF8 88 CD 9C 82 */ lbz r6, lbl_805A8842@sda21(r13) -/* 8030BC9C 00308BFC 3C 60 80 5A */ lis r3, lbl_805A6500@ha -/* 8030BCA0 00308C00 38 A3 65 00 */ addi r5, r3, lbl_805A6500@l +/* 8030BC98 00308BF8 88 CD 9C 82 */ lbz r6, mUseVideoFilter__9CGraphics@sda21(r13) +/* 8030BC9C 00308BFC 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha +/* 8030BCA0 00308C00 38 A3 65 00 */ addi r5, r3, mRenderModeObj__9CGraphics@l /* 8030BCA4 00308C04 88 7D 00 19 */ lbz r3, 0x19(r29) /* 8030BCA8 00308C08 7C 06 00 D0 */ neg r0, r6 /* 8030BCAC 00308C0C 7F E4 FB 78 */ mr r4, r31 @@ -3330,11 +3317,11 @@ lbl_8030BB40: /* 8030BCF4 00308C54 48 06 AA 2D */ bl __GXSaveCPUFifoAux /* 8030BCF8 00308C58 80 61 00 08 */ lwz r3, 8(r1) /* 8030BCFC 00308C5C 48 06 AB 01 */ bl GXEnableBreakPt -/* 8030BD00 00308C60 80 6D A8 00 */ lwz r3, lbl_805A93C0@sda21(r13) -/* 8030BD04 00308C64 88 8D A8 15 */ lbz r4, lbl_805A93D5@sda21(r13) +/* 8030BD00 00308C60 80 6D A8 00 */ lwz r3, mFrameCounter__9CGraphics@sda21(r13) +/* 8030BD04 00308C64 88 8D A8 15 */ lbz r4, mInterruptLastFrameUsedAbove__9CGraphics@sda21(r13) /* 8030BD08 00308C68 38 03 00 01 */ addi r0, r3, 1 -/* 8030BD0C 00308C6C 98 8D A8 14 */ stb r4, lbl_805A93D4@sda21(r13) -/* 8030BD10 00308C70 90 0D A8 00 */ stw r0, lbl_805A93C0@sda21(r13) +/* 8030BD0C 00308C6C 98 8D A8 14 */ stb r4, mLastFrameUsedAbove__9CGraphics@sda21(r13) +/* 8030BD10 00308C70 90 0D A8 00 */ stw r0, mFrameCounter__9CGraphics@sda21(r13) /* 8030BD14 00308C74 48 06 0E 7D */ bl sub_8036cb90 /* 8030BD18 00308C78 80 01 00 A4 */ lwz r0, 0xa4(r1) /* 8030BD1C 00308C7C 83 E1 00 9C */ lwz r31, 0x9c(r1) @@ -3350,23 +3337,23 @@ VideoPostCallback__9CGraphicsFUl: /* 8030BD38 00308C98 7C 08 02 A6 */ mflr r0 /* 8030BD3C 00308C9C 90 01 00 14 */ stw r0, 0x14(r1) /* 8030BD40 00308CA0 93 E1 00 0C */ stw r31, 0xc(r1) -/* 8030BD44 00308CA4 80 6D A8 0C */ lwz r3, lbl_805A93CC@sda21(r13) +/* 8030BD44 00308CA4 80 6D A8 0C */ lwz r3, mNumBreakpointsWaiting__9CGraphics@sda21(r13) /* 8030BD48 00308CA8 2C 03 00 00 */ cmpwi r3, 0 /* 8030BD4C 00308CAC 41 82 00 A0 */ beq lbl_8030BDEC -/* 8030BD50 00308CB0 80 0D A8 10 */ lwz r0, lbl_805A93D0@sda21(r13) +/* 8030BD50 00308CB0 80 0D A8 10 */ lwz r0, mFlippingState__9CGraphics@sda21(r13) /* 8030BD54 00308CB4 2C 00 00 02 */ cmpwi r0, 2 /* 8030BD58 00308CB8 40 82 00 94 */ bne lbl_8030BDEC /* 8030BD5C 00308CBC 38 63 FF FF */ addi r3, r3, -1 /* 8030BD60 00308CC0 38 00 00 00 */ li r0, 0 -/* 8030BD64 00308CC4 90 6D A8 0C */ stw r3, lbl_805A93CC@sda21(r13) -/* 8030BD68 00308CC8 3B ED A7 B0 */ addi r31, r13, lbl_805A9370@sda21 -/* 8030BD6C 00308CCC 90 0D A8 10 */ stw r0, lbl_805A93D0@sda21(r13) +/* 8030BD64 00308CC4 90 6D A8 0C */ stw r3, mNumBreakpointsWaiting__9CGraphics@sda21(r13) +/* 8030BD68 00308CC8 3B ED A7 B0 */ addi r31, r13, sFPSTimer@sda21 +/* 8030BD6C 00308CCC 90 0D A8 10 */ stw r0, mFlippingState__9CGraphics@sda21(r13) /* 8030BD70 00308CD0 48 07 96 39 */ bl OSGetTime /* 8030BD74 00308CD4 80 0D A7 B4 */ lwz r0, lbl_805A9374@sda21(r13) -/* 8030BD78 00308CD8 C0 0D A8 04 */ lfs f0, lbl_805A93C4@sda21(r13) +/* 8030BD78 00308CD8 C0 0D A8 04 */ lfs f0, mFramesPerSecond__9CGraphics@sda21(r13) /* 8030BD7C 00308CDC 7C 80 20 10 */ subfc r4, r0, r4 -/* 8030BD80 00308CE0 80 0D A7 B0 */ lwz r0, lbl_805A9370@sda21(r13) -/* 8030BD84 00308CE4 D0 0D A8 08 */ stfs f0, lbl_805A93C8@sda21(r13) +/* 8030BD80 00308CE0 80 0D A7 B0 */ lwz r0, sFPSTimer@sda21(r13) +/* 8030BD84 00308CE4 D0 0D A8 08 */ stfs f0, mLastFramesPerSecond__9CGraphics@sda21(r13) /* 8030BD88 00308CE8 7C 60 19 10 */ subfe r3, r0, r3 /* 8030BD8C 00308CEC 48 07 E1 D9 */ bl __cvt_sll_flt /* 8030BD90 00308CF0 3C 60 80 5A */ lis r3, mData__10CStopwatch@ha @@ -3381,7 +3368,7 @@ VideoPostCallback__9CGraphicsFUl: /* 8030BDB4 00308D14 7C A4 22 78 */ xor r4, r5, r4 /* 8030BDB8 00308D18 EC 00 08 24 */ fdivs f0, f0, f1 /* 8030BDBC 00308D1C 7C 80 03 79 */ or. r0, r4, r0 -/* 8030BDC0 00308D20 D0 0D A8 04 */ stfs f0, lbl_805A93C4@sda21(r13) +/* 8030BDC0 00308D20 D0 0D A8 04 */ stfs f0, mFramesPerSecond__9CGraphics@sda21(r13) /* 8030BDC4 00308D24 40 82 00 08 */ bne lbl_8030BDCC /* 8030BDC8 00308D28 4B FC A9 55 */ bl Initialize__Q210CStopwatch7CSWDataFv lbl_8030BDCC: @@ -3392,7 +3379,7 @@ lbl_8030BDCC: /* 8030BDDC 00308D3C 20 03 00 01 */ subfic r0, r3, 1 /* 8030BDE0 00308D40 7C 00 00 34 */ cntlzw r0, r0 /* 8030BDE4 00308D44 54 00 D9 7E */ srwi r0, r0, 5 -/* 8030BDE8 00308D48 98 0D A8 15 */ stb r0, lbl_805A93D5@sda21(r13) +/* 8030BDE8 00308D48 98 0D A8 15 */ stb r0, mInterruptLastFrameUsedAbove__9CGraphics@sda21(r13) lbl_8030BDEC: /* 8030BDEC 00308D4C 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030BDF0 00308D50 83 E1 00 0C */ lwz r31, 0xc(r1) @@ -3405,32 +3392,32 @@ VideoPreCallback__9CGraphicsFUl: /* 8030BE00 00308D60 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030BE04 00308D64 7C 08 02 A6 */ mflr r0 /* 8030BE08 00308D68 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030BE0C 00308D6C 80 0D A8 0C */ lwz r0, lbl_805A93CC@sda21(r13) +/* 8030BE0C 00308D6C 80 0D A8 0C */ lwz r0, mNumBreakpointsWaiting__9CGraphics@sda21(r13) /* 8030BE10 00308D70 2C 00 00 00 */ cmpwi r0, 0 /* 8030BE14 00308D74 41 82 00 58 */ beq lbl_8030BE6C -/* 8030BE18 00308D78 80 0D A8 10 */ lwz r0, lbl_805A93D0@sda21(r13) +/* 8030BE18 00308D78 80 0D A8 10 */ lwz r0, mFlippingState__9CGraphics@sda21(r13) /* 8030BE1C 00308D7C 2C 00 00 01 */ cmpwi r0, 1 /* 8030BE20 00308D80 40 82 00 4C */ bne lbl_8030BE6C -/* 8030BE24 00308D84 88 0D 9C 81 */ lbz r0, lbl_805A8841@sda21(r13) +/* 8030BE24 00308D84 88 0D 9C 81 */ lbz r0, mFirstFrame__9CGraphics@sda21(r13) /* 8030BE28 00308D88 28 00 00 00 */ cmplwi r0, 0 /* 8030BE2C 00308D8C 41 82 00 14 */ beq lbl_8030BE40 /* 8030BE30 00308D90 38 60 00 00 */ li r3, 0 /* 8030BE34 00308D94 48 07 D4 79 */ bl VISetBlack /* 8030BE38 00308D98 38 00 00 00 */ li r0, 0 -/* 8030BE3C 00308D9C 98 0D 9C 81 */ stb r0, lbl_805A8841@sda21(r13) +/* 8030BE3C 00308D9C 98 0D 9C 81 */ stb r0, mFirstFrame__9CGraphics@sda21(r13) lbl_8030BE40: -/* 8030BE40 00308DA0 80 6D A8 20 */ lwz r3, lbl_805A93E0@sda21(r13) +/* 8030BE40 00308DA0 80 6D A8 20 */ lwz r3, mpCurrenFrameBuf__9CGraphics@sda21(r13) /* 8030BE44 00308DA4 48 07 D3 FD */ bl VISetNextFrameBuffer /* 8030BE48 00308DA8 48 07 D2 C9 */ bl VIFlush -/* 8030BE4C 00308DAC 80 0D A8 20 */ lwz r0, lbl_805A93E0@sda21(r13) -/* 8030BE50 00308DB0 80 6D A8 18 */ lwz r3, lbl_805A93D8@sda21(r13) +/* 8030BE4C 00308DAC 80 0D A8 20 */ lwz r0, mpCurrenFrameBuf__9CGraphics@sda21(r13) +/* 8030BE50 00308DB0 80 6D A8 18 */ lwz r3, mpFrameBuf1__9CGraphics@sda21(r13) /* 8030BE54 00308DB4 7C 00 18 40 */ cmplw r0, r3 /* 8030BE58 00308DB8 40 82 00 08 */ bne lbl_8030BE60 -/* 8030BE5C 00308DBC 80 6D A8 1C */ lwz r3, lbl_805A93DC@sda21(r13) +/* 8030BE5C 00308DBC 80 6D A8 1C */ lwz r3, mpFrameBuf2__9CGraphics@sda21(r13) lbl_8030BE60: /* 8030BE60 00308DC0 38 00 00 02 */ li r0, 2 -/* 8030BE64 00308DC4 90 6D A8 20 */ stw r3, lbl_805A93E0@sda21(r13) -/* 8030BE68 00308DC8 90 0D A8 10 */ stw r0, lbl_805A93D0@sda21(r13) +/* 8030BE64 00308DC4 90 6D A8 20 */ stw r3, mpCurrenFrameBuf__9CGraphics@sda21(r13) +/* 8030BE68 00308DC8 90 0D A8 10 */ stw r0, mFlippingState__9CGraphics@sda21(r13) lbl_8030BE6C: /* 8030BE6C 00308DCC 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030BE70 00308DD0 7C 08 03 A6 */ mtlr r0 @@ -3444,7 +3431,7 @@ SwapBuffers__9CGraphicsFv: /* 8030BE84 00308DE4 90 01 00 14 */ stw r0, 0x14(r1) /* 8030BE88 00308DE8 48 06 AA 05 */ bl GXDisableBreakPt /* 8030BE8C 00308DEC 38 00 00 01 */ li r0, 1 -/* 8030BE90 00308DF0 90 0D A8 10 */ stw r0, lbl_805A93D0@sda21(r13) +/* 8030BE90 00308DF0 90 0D A8 10 */ stw r0, mFlippingState__9CGraphics@sda21(r13) /* 8030BE94 00308DF4 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030BE98 00308DF8 7C 08 03 A6 */ mtlr r0 /* 8030BE9C 00308DFC 38 21 00 10 */ addi r1, r1, 0x10 @@ -3467,15 +3454,15 @@ ClearBackAndDepthBuffers__9CGraphicsFv: /* 8030BEC8 00308E28 7C 08 02 A6 */ mflr r0 /* 8030BECC 00308E2C 90 01 00 24 */ stw r0, 0x24(r1) /* 8030BED0 00308E30 48 06 E9 71 */ bl GXInvalidateTexAll -/* 8030BED4 00308E34 3C 60 80 5A */ lis r3, lbl_805A6500@ha -/* 8030BED8 00308E38 38 A3 65 00 */ addi r5, r3, lbl_805A6500@l +/* 8030BED4 00308E34 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha +/* 8030BED8 00308E38 38 A3 65 00 */ addi r5, r3, mRenderModeObj__9CGraphics@l /* 8030BEDC 00308E3C 88 05 00 18 */ lbz r0, 0x18(r5) /* 8030BEE0 00308E40 28 00 00 00 */ cmplwi r0, 0 /* 8030BEE4 00308E44 41 82 00 58 */ beq lbl_8030BF3C /* 8030BEE8 00308E48 48 07 D4 B1 */ bl VIGetNextField -/* 8030BEEC 00308E4C 3C A0 80 5A */ lis r5, lbl_805A6500@ha +/* 8030BEEC 00308E4C 3C A0 80 5A */ lis r5, mRenderModeObj__9CGraphics@ha /* 8030BEF0 00308E50 3C 80 43 30 */ lis r4, 0x4330 -/* 8030BEF4 00308E54 38 C5 65 00 */ addi r6, r5, lbl_805A6500@l +/* 8030BEF4 00308E54 38 C5 65 00 */ addi r6, r5, mRenderModeObj__9CGraphics@l /* 8030BEF8 00308E58 C0 22 C7 F0 */ lfs f1, lbl_805AE510@sda21(r2) /* 8030BEFC 00308E5C A0 A6 00 04 */ lhz r5, 4(r6) /* 8030BF00 00308E60 A0 06 00 08 */ lhz r0, 8(r6) @@ -3525,8 +3512,8 @@ SetClearColor__9CGraphicsFRC6CColor: /* 8030BF9C 00308EFC 90 01 00 14 */ stw r0, 0x14(r1) /* 8030BFA0 00308F00 80 03 00 00 */ lwz r0, 0(r3) /* 8030BFA4 00308F04 38 61 00 08 */ addi r3, r1, 8 -/* 8030BFA8 00308F08 80 8D 9C 7C */ lwz r4, lbl_805A883C@sda21(r13) -/* 8030BFAC 00308F0C 90 0D A7 F8 */ stw r0, lbl_805A93B8@sda21(r13) +/* 8030BFA8 00308F08 80 8D 9C 7C */ lwz r4, mClearDepthValue__9CGraphics@sda21(r13) +/* 8030BFAC 00308F0C 90 0D A7 F8 */ stw r0, mClearColor__9CGraphics@sda21(r13) /* 8030BFB0 00308F10 90 01 00 08 */ stw r0, 8(r1) /* 8030BFB4 00308F14 48 06 D1 79 */ bl GXSetCopyClear /* 8030BFB8 00308F18 80 01 00 14 */ lwz r0, 0x14(r1) @@ -3544,11 +3531,11 @@ SetCopyClear__9CGraphicsFRC6CColorf: /* 8030BFDC 00308F3C 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8030BFE0 00308F40 7C 7F 1B 78 */ mr r31, r3 /* 8030BFE4 00308F44 80 03 00 00 */ lwz r0, 0(r3) -/* 8030BFE8 00308F48 90 0D A7 F8 */ stw r0, lbl_805A93B8@sda21(r13) +/* 8030BFE8 00308F48 90 0D A7 F8 */ stw r0, mClearColor__9CGraphics@sda21(r13) /* 8030BFEC 00308F4C 48 07 D9 69 */ bl __cvt_fp2unsigned /* 8030BFF0 00308F50 80 1F 00 00 */ lwz r0, 0(r31) /* 8030BFF4 00308F54 7C 64 1B 78 */ mr r4, r3 -/* 8030BFF8 00308F58 90 6D 9C 7C */ stw r3, lbl_805A883C@sda21(r13) +/* 8030BFF8 00308F58 90 6D 9C 7C */ stw r3, mClearDepthValue__9CGraphics@sda21(r13) /* 8030BFFC 00308F5C 38 61 00 08 */ addi r3, r1, 8 /* 8030C000 00308F60 90 01 00 08 */ stw r0, 8(r1) /* 8030C004 00308F64 48 06 D1 29 */ bl GXSetCopyClear @@ -3581,10 +3568,10 @@ SetAmbientColor__9CGraphicsFRC6CColor: SetScissor__9CGraphicsFiiii: /* 8030C05C 00308FBC 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030C060 00308FC0 7C 08 02 A6 */ mflr r0 -/* 8030C064 00308FC4 3C E0 80 5A */ lis r7, lbl_805A6500@ha +/* 8030C064 00308FC4 3C E0 80 5A */ lis r7, mRenderModeObj__9CGraphics@ha /* 8030C068 00308FC8 7D 04 32 14 */ add r8, r4, r6 /* 8030C06C 00308FCC 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030C070 00308FD0 38 87 65 00 */ addi r4, r7, lbl_805A6500@l +/* 8030C070 00308FD0 38 87 65 00 */ addi r4, r7, mRenderModeObj__9CGraphics@l /* 8030C074 00308FD4 A0 04 00 06 */ lhz r0, 6(r4) /* 8030C078 00308FD8 7C 88 00 50 */ subf r4, r8, r0 /* 8030C07C 00308FDC 48 07 05 F1 */ bl GXSetScissor @@ -3598,7 +3585,7 @@ SetViewport__9CGraphicsFiiii: /* 8030C090 00308FF0 94 21 FF C0 */ stwu r1, -0x40(r1) /* 8030C094 00308FF4 7C 08 02 A6 */ mflr r0 /* 8030C098 00308FF8 3D 40 43 30 */ lis r10, 0x4330 -/* 8030C09C 00308FFC 3D 20 80 5A */ lis r9, lbl_805A6500@ha +/* 8030C09C 00308FFC 3D 20 80 5A */ lis r9, mRenderModeObj__9CGraphics@ha /* 8030C0A0 00309000 90 01 00 44 */ stw r0, 0x44(r1) /* 8030C0A4 00309004 54 A0 0F FE */ srwi r0, r5, 0x1f /* 8030C0A8 00309008 7C E0 2A 14 */ add r7, r0, r5 @@ -3606,7 +3593,7 @@ SetViewport__9CGraphicsFiiii: /* 8030C0B0 00309010 54 C0 0F FE */ srwi r0, r6, 0x1f /* 8030C0B4 00309014 93 E1 00 3C */ stw r31, 0x3c(r1) /* 8030C0B8 00309018 7C E7 0E 70 */ srawi r7, r7, 1 -/* 8030C0BC 0030901C 39 29 65 00 */ addi r9, r9, lbl_805A6500@l +/* 8030C0BC 0030901C 39 29 65 00 */ addi r9, r9, mRenderModeObj__9CGraphics@l /* 8030C0C0 00309020 7C 00 32 14 */ add r0, r0, r6 /* 8030C0C4 00309024 91 41 00 08 */ stw r10, 8(r1) /* 8030C0C8 00309028 6C EB 80 00 */ xoris r11, r7, 0x8000 @@ -3624,13 +3611,13 @@ SetViewport__9CGraphicsFiiii: /* 8030C0F8 00309058 ED 00 20 28 */ fsubs f8, f0, f4 /* 8030C0FC 0030905C 6C C0 80 00 */ xoris r0, r6, 0x8000 /* 8030C100 00309060 91 41 00 10 */ stw r10, 0x10(r1) -/* 8030C104 00309064 3D 60 80 3F */ lis r11, lbl_803ED910@ha -/* 8030C108 00309068 C0 AD A7 E0 */ lfs f5, lbl_805A93A0@sda21(r13) +/* 8030C104 00309064 3D 60 80 3F */ lis r11, mViewport__9CGraphics@ha +/* 8030C108 00309068 C0 AD A7 E0 */ lfs f5, mDepthNear__9CGraphics@sda21(r13) /* 8030C10C 0030906C C8 01 00 10 */ lfd f0, 0x10(r1) /* 8030C110 00309070 91 01 00 1C */ stw r8, 0x1c(r1) /* 8030C114 00309074 EC E0 20 28 */ fsubs f7, f0, f4 -/* 8030C118 00309078 C0 CD 9C 78 */ lfs f6, lbl_805A8838@sda21(r13) -/* 8030C11C 0030907C 94 6B D9 10 */ stwu r3, lbl_803ED910@l(r11) +/* 8030C118 00309078 C0 CD 9C 78 */ lfs f6, mDepthFar__9CGraphics@sda21(r13) +/* 8030C11C 0030907C 94 6B D9 10 */ stwu r3, mViewport__9CGraphics@l(r11) /* 8030C120 00309080 91 41 00 18 */ stw r10, 0x18(r1) /* 8030C124 00309084 C8 01 00 18 */ lfd f0, 0x18(r1) /* 8030C128 00309088 90 E1 00 24 */ stw r7, 0x24(r1) @@ -3775,9 +3762,9 @@ GetPerspectiveProjectionMatrix__9CGraphicsFv: /* 8030C33C 0030929C DB E1 00 70 */ stfd f31, 0x70(r1) /* 8030C340 003092A0 F3 E1 00 78 */ psq_st f31, 120(r1), 0, qr0 /* 8030C344 003092A4 93 E1 00 6C */ stw r31, 0x6c(r1) -/* 8030C348 003092A8 3C 80 80 5A */ lis r4, lbl_805A61B8@ha +/* 8030C348 003092A8 3C 80 80 5A */ lis r4, mProj__9CGraphics@ha /* 8030C34C 003092AC C0 62 C7 F0 */ lfs f3, lbl_805AE510@sda21(r2) -/* 8030C350 003092B0 38 84 61 B8 */ addi r4, r4, lbl_805A61B8@l +/* 8030C350 003092B0 38 84 61 B8 */ addi r4, r4, mProj__9CGraphics@l /* 8030C354 003092B4 7C 7F 1B 78 */ mr r31, r3 /* 8030C358 003092B8 C0 24 00 18 */ lfs f1, 0x18(r4) /* 8030C35C 003092BC FC 80 18 90 */ fmr f4, f3 @@ -3882,8 +3869,8 @@ SetPerspective__9CGraphicsFffff: /* 8030C4DC 0030943C C0 62 C8 24 */ lfs f3, lbl_805AE544@sda21(r2) /* 8030C4E0 00309440 38 00 00 01 */ li r0, 1 /* 8030C4E4 00309444 EC 40 07 72 */ fmuls f2, f0, f29 -/* 8030C4E8 00309448 3C 60 80 5A */ lis r3, lbl_805A61B8@ha -/* 8030C4EC 0030944C 9C 03 61 B8 */ stbu r0, lbl_805A61B8@l(r3) +/* 8030C4E8 00309448 3C 60 80 5A */ lis r3, mProj__9CGraphics@ha +/* 8030C4EC 0030944C 9C 03 61 B8 */ stbu r0, mProj__9CGraphics@l(r3) /* 8030C4F0 00309450 EC 00 07 B2 */ fmuls f0, f0, f30 /* 8030C4F4 00309454 EC 22 07 B2 */ fmuls f1, f2, f30 /* 8030C4F8 00309458 D3 C3 00 14 */ stfs f30, 0x14(r3) @@ -3914,10 +3901,10 @@ SetPerspective__9CGraphicsFffff: SetOrtho__9CGraphicsFffffff: /* 8030C554 003094B4 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030C558 003094B8 7C 08 02 A6 */ mflr r0 -/* 8030C55C 003094BC 3C 60 80 5A */ lis r3, lbl_805A61B8@ha +/* 8030C55C 003094BC 3C 60 80 5A */ lis r3, mProj__9CGraphics@ha /* 8030C560 003094C0 90 01 00 14 */ stw r0, 0x14(r1) /* 8030C564 003094C4 38 00 00 00 */ li r0, 0 -/* 8030C568 003094C8 9C 03 61 B8 */ stbu r0, lbl_805A61B8@l(r3) +/* 8030C568 003094C8 9C 03 61 B8 */ stbu r0, mProj__9CGraphics@l(r3) /* 8030C56C 003094CC D0 23 00 04 */ stfs f1, 4(r3) /* 8030C570 003094D0 D0 43 00 08 */ stfs f2, 8(r3) /* 8030C574 003094D4 D0 63 00 0C */ stfs f3, 0xc(r3) @@ -3935,16 +3922,16 @@ SetIdentityModelMatrix__9CGraphicsFv: /* 8030C598 003094F8 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030C59C 003094FC 7C 08 02 A6 */ mflr r0 /* 8030C5A0 00309500 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030C5A4 00309504 88 0D 9C 80 */ lbz r0, lbl_805A8840@sda21(r13) +/* 8030C5A4 00309504 88 0D 9C 80 */ lbz r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) /* 8030C5A8 00309508 28 00 00 00 */ cmplwi r0, 0 /* 8030C5AC 0030950C 40 82 00 24 */ bne lbl_8030C5D0 -/* 8030C5B0 00309510 3C 60 80 5A */ lis r3, lbl_805A6204@ha +/* 8030C5B0 00309510 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha /* 8030C5B4 00309514 3C 80 80 5A */ lis r4, sIdentity__12CTransform4f@ha -/* 8030C5B8 00309518 38 63 62 04 */ addi r3, r3, lbl_805A6204@l +/* 8030C5B8 00309518 38 63 62 04 */ addi r3, r3, mModelMatrix__9CGraphics@l /* 8030C5BC 0030951C 38 84 66 70 */ addi r4, r4, sIdentity__12CTransform4f@l /* 8030C5C0 00309520 48 00 65 81 */ bl __as__12CTransform4fFRC12CTransform4f /* 8030C5C4 00309524 38 00 00 01 */ li r0, 1 -/* 8030C5C8 00309528 98 0D 9C 80 */ stb r0, lbl_805A8840@sda21(r13) +/* 8030C5C8 00309528 98 0D 9C 80 */ stb r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) /* 8030C5CC 0030952C 48 00 02 41 */ bl SetViewMatrix__9CGraphicsFv lbl_8030C5D0: /* 8030C5D0 00309530 80 01 00 14 */ lwz r0, 0x14(r1) @@ -3963,27 +3950,27 @@ SetModelMatrix__9CGraphicsFRC12CTransform4f: /* 8030C5F8 00309558 7C 7F 1B 78 */ mr r31, r3 /* 8030C5FC 0030955C 7C 1F 00 40 */ cmplw r31, r0 /* 8030C600 00309560 40 82 00 30 */ bne lbl_8030C630 -/* 8030C604 00309564 88 0D 9C 80 */ lbz r0, lbl_805A8840@sda21(r13) +/* 8030C604 00309564 88 0D 9C 80 */ lbz r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) /* 8030C608 00309568 28 00 00 00 */ cmplwi r0, 0 /* 8030C60C 0030956C 40 82 00 A4 */ bne lbl_8030C6B0 -/* 8030C610 00309570 3C 60 80 5A */ lis r3, lbl_805A6204@ha +/* 8030C610 00309570 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha /* 8030C614 00309574 7F E4 FB 78 */ mr r4, r31 -/* 8030C618 00309578 38 63 62 04 */ addi r3, r3, lbl_805A6204@l +/* 8030C618 00309578 38 63 62 04 */ addi r3, r3, mModelMatrix__9CGraphics@l /* 8030C61C 0030957C 48 00 65 25 */ bl __as__12CTransform4fFRC12CTransform4f /* 8030C620 00309580 38 00 00 01 */ li r0, 1 -/* 8030C624 00309584 98 0D 9C 80 */ stb r0, lbl_805A8840@sda21(r13) +/* 8030C624 00309584 98 0D 9C 80 */ stb r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) /* 8030C628 00309588 48 00 01 E5 */ bl SetViewMatrix__9CGraphicsFv /* 8030C62C 0030958C 48 00 00 84 */ b lbl_8030C6B0 lbl_8030C630: -/* 8030C630 00309590 3C 60 80 5A */ lis r3, lbl_805A6204@ha +/* 8030C630 00309590 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha /* 8030C634 00309594 7F E4 FB 78 */ mr r4, r31 -/* 8030C638 00309598 38 63 62 04 */ addi r3, r3, lbl_805A6204@l +/* 8030C638 00309598 38 63 62 04 */ addi r3, r3, mModelMatrix__9CGraphics@l /* 8030C63C 0030959C 48 00 65 05 */ bl __as__12CTransform4fFRC12CTransform4f /* 8030C640 003095A0 C1 7F 00 00 */ lfs f11, 0(r31) -/* 8030C644 003095A4 3C 60 80 5A */ lis r3, lbl_805A656C@ha +/* 8030C644 003095A4 3C 60 80 5A */ lis r3, mGXModelMatrix__9CGraphics@ha /* 8030C648 003095A8 38 00 00 00 */ li r0, 0 /* 8030C64C 003095AC C1 5F 00 04 */ lfs f10, 4(r31) -/* 8030C650 003095B0 D5 63 65 6C */ stfsu f11, lbl_805A656C@l(r3) +/* 8030C650 003095B0 D5 63 65 6C */ stfsu f11, mGXModelMatrix__9CGraphics@l(r3) /* 8030C654 003095B4 C1 3F 00 08 */ lfs f9, 8(r31) /* 8030C658 003095B8 C1 1F 00 0C */ lfs f8, 0xc(r31) /* 8030C65C 003095BC C0 FF 00 10 */ lfs f7, 0x10(r31) @@ -3994,7 +3981,7 @@ lbl_8030C630: /* 8030C670 003095D0 C0 5F 00 24 */ lfs f2, 0x24(r31) /* 8030C674 003095D4 C0 3F 00 28 */ lfs f1, 0x28(r31) /* 8030C678 003095D8 C0 1F 00 2C */ lfs f0, 0x2c(r31) -/* 8030C67C 003095DC 98 0D 9C 80 */ stb r0, lbl_805A8840@sda21(r13) +/* 8030C67C 003095DC 98 0D 9C 80 */ stb r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) /* 8030C680 003095E0 D1 43 00 04 */ stfs f10, 4(r3) /* 8030C684 003095E4 D1 23 00 08 */ stfs f9, 8(r3) /* 8030C688 003095E8 D1 03 00 0C */ stfs f8, 0xc(r3) @@ -4018,26 +4005,26 @@ lbl_8030C6B0: SetIdentityViewPointMatrix__9CGraphicsFv: /* 8030C6C4 00309624 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030C6C8 00309628 7C 08 02 A6 */ mflr r0 -/* 8030C6CC 0030962C 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 8030C6CC 0030962C 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 8030C6D0 00309630 3C 80 80 5A */ lis r4, sIdentity__12CTransform4f@ha /* 8030C6D4 00309634 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030C6D8 00309638 38 63 61 D4 */ addi r3, r3, lbl_805A61D4@l +/* 8030C6D8 00309638 38 63 61 D4 */ addi r3, r3, mViewMatrix__9CGraphics@l /* 8030C6DC 0030963C 38 84 66 70 */ addi r4, r4, sIdentity__12CTransform4f@l /* 8030C6E0 00309640 48 00 64 61 */ bl __as__12CTransform4fFRC12CTransform4f -/* 8030C6E4 00309644 3C 60 80 5A */ lis r3, lbl_805A653C@ha -/* 8030C6E8 00309648 38 63 65 3C */ addi r3, r3, lbl_805A653C@l +/* 8030C6E4 00309644 3C 60 80 5A */ lis r3, mGXViewPointMatrix__9CGraphics@ha +/* 8030C6E8 00309648 38 63 65 3C */ addi r3, r3, mGXViewPointMatrix__9CGraphics@l /* 8030C6EC 0030964C 48 07 09 55 */ bl PSMTXIdentity /* 8030C6F0 00309650 3C 60 80 5A */ lis r3, sZeroVector__9CVector3f@ha -/* 8030C6F4 00309654 3C A0 80 5A */ lis r5, lbl_805A653C@ha +/* 8030C6F4 00309654 3C A0 80 5A */ lis r5, mGXViewPointMatrix__9CGraphics@ha /* 8030C6F8 00309658 38 83 66 A0 */ addi r4, r3, sZeroVector__9CVector3f@l /* 8030C6FC 0030965C C0 A2 C7 F0 */ lfs f5, lbl_805AE510@sda21(r2) /* 8030C700 00309660 C0 44 00 00 */ lfs f2, 0(r4) -/* 8030C704 00309664 38 A5 65 3C */ addi r5, r5, lbl_805A653C@l -/* 8030C708 00309668 3C 60 80 5A */ lis r3, lbl_805A6234@ha +/* 8030C704 00309664 38 A5 65 3C */ addi r5, r5, mGXViewPointMatrix__9CGraphics@l +/* 8030C708 00309668 3C 60 80 5A */ lis r3, mViewPoint__9CGraphics@ha /* 8030C70C 0030966C C0 82 C8 10 */ lfs f4, lbl_805AE530@sda21(r2) /* 8030C710 00309670 C0 62 C8 14 */ lfs f3, lbl_805AE534@sda21(r2) /* 8030C714 00309674 C0 24 00 04 */ lfs f1, 4(r4) -/* 8030C718 00309678 D4 43 62 34 */ stfsu f2, lbl_805A6234@l(r3) +/* 8030C718 00309678 D4 43 62 34 */ stfsu f2, mViewPoint__9CGraphics@l(r3) /* 8030C71C 0030967C C0 04 00 08 */ lfs f0, 8(r4) /* 8030C720 00309680 D0 A5 00 28 */ stfs f5, 0x28(r5) /* 8030C724 00309684 D0 A5 00 14 */ stfs f5, 0x14(r5) @@ -4055,22 +4042,22 @@ SetIdentityViewPointMatrix__9CGraphicsFv: SetViewPointMatrix__9CGraphicsFRC12CTransform4f: /* 8030C74C 003096AC 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030C750 003096B0 7C 08 02 A6 */ mflr r0 -/* 8030C754 003096B4 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 8030C754 003096B4 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 8030C758 003096B8 90 01 00 14 */ stw r0, 0x14(r1) /* 8030C75C 003096BC 93 E1 00 0C */ stw r31, 0xc(r1) /* 8030C760 003096C0 7C 7F 1B 78 */ mr r31, r3 -/* 8030C764 003096C4 38 64 61 D4 */ addi r3, r4, lbl_805A61D4@l +/* 8030C764 003096C4 38 64 61 D4 */ addi r3, r4, mViewMatrix__9CGraphics@l /* 8030C768 003096C8 7F E4 FB 78 */ mr r4, r31 /* 8030C76C 003096CC 48 00 63 D5 */ bl __as__12CTransform4fFRC12CTransform4f /* 8030C770 003096D0 C0 5F 00 04 */ lfs f2, 4(r31) -/* 8030C774 003096D4 3C 80 80 5A */ lis r4, lbl_805A653C@ha +/* 8030C774 003096D4 3C 80 80 5A */ lis r4, mGXViewPointMatrix__9CGraphics@ha /* 8030C778 003096D8 C0 3F 00 14 */ lfs f1, 0x14(r31) -/* 8030C77C 003096DC 3C 60 80 5A */ lis r3, lbl_805A6234@ha +/* 8030C77C 003096DC 3C 60 80 5A */ lis r3, mViewPoint__9CGraphics@ha /* 8030C780 003096E0 FC 60 10 50 */ fneg f3, f2 /* 8030C784 003096E4 C1 5F 00 00 */ lfs f10, 0(r31) /* 8030C788 003096E8 C0 1F 00 24 */ lfs f0, 0x24(r31) /* 8030C78C 003096EC FC 40 08 50 */ fneg f2, f1 -/* 8030C790 003096F0 D5 44 65 3C */ stfsu f10, lbl_805A653C@l(r4) +/* 8030C790 003096F0 D5 44 65 3C */ stfsu f10, mGXViewPointMatrix__9CGraphics@l(r4) /* 8030C794 003096F4 C0 E2 C7 F0 */ lfs f7, lbl_805AE510@sda21(r2) /* 8030C798 003096F8 FC 20 00 50 */ fneg f1, f0 /* 8030C79C 003096FC C0 1F 00 0C */ lfs f0, 0xc(r31) @@ -4080,7 +4067,7 @@ SetViewPointMatrix__9CGraphicsFRC12CTransform4f: /* 8030C7AC 0030970C C0 BF 00 18 */ lfs f5, 0x18(r31) /* 8030C7B0 00309710 C0 9F 00 28 */ lfs f4, 0x28(r31) /* 8030C7B4 00309714 C1 9F 00 2C */ lfs f12, 0x2c(r31) -/* 8030C7B8 00309718 D4 03 62 34 */ stfsu f0, lbl_805A6234@l(r3) +/* 8030C7B8 00309718 D4 03 62 34 */ stfsu f0, mViewPoint__9CGraphics@l(r3) /* 8030C7BC 0030971C C1 7F 00 1C */ lfs f11, 0x1c(r31) /* 8030C7C0 00309720 D1 24 00 04 */ stfs f9, 4(r4) /* 8030C7C4 00309724 D1 04 00 08 */ stfs f8, 8(r4) @@ -4106,47 +4093,47 @@ SetViewPointMatrix__9CGraphicsFRC12CTransform4f: SetViewMatrix__9CGraphicsFv: /* 8030C80C 0030976C 94 21 FF 90 */ stwu r1, -0x70(r1) /* 8030C810 00309770 7C 08 02 A6 */ mflr r0 -/* 8030C814 00309774 3C 80 80 5A */ lis r4, lbl_805A6234@ha +/* 8030C814 00309774 3C 80 80 5A */ lis r4, mViewPoint__9CGraphics@ha /* 8030C818 00309778 90 01 00 74 */ stw r0, 0x74(r1) /* 8030C81C 0030977C 38 61 00 38 */ addi r3, r1, 0x38 -/* 8030C820 00309780 C4 24 62 34 */ lfsu f1, lbl_805A6234@l(r4) +/* 8030C820 00309780 C4 24 62 34 */ lfsu f1, mViewPoint__9CGraphics@l(r4) /* 8030C824 00309784 C0 44 00 04 */ lfs f2, 4(r4) /* 8030C828 00309788 FC 20 08 50 */ fneg f1, f1 /* 8030C82C 0030978C C0 04 00 08 */ lfs f0, 8(r4) /* 8030C830 00309790 FC 40 10 50 */ fneg f2, f2 /* 8030C834 00309794 FC 60 00 50 */ fneg f3, f0 /* 8030C838 00309798 48 07 09 FD */ bl PSMTXTrans -/* 8030C83C 0030979C 3C 60 80 5A */ lis r3, lbl_805A653C@ha -/* 8030C840 003097A0 3C A0 80 5A */ lis r5, lbl_805A65CC@ha -/* 8030C844 003097A4 38 63 65 3C */ addi r3, r3, lbl_805A653C@l +/* 8030C83C 0030979C 3C 60 80 5A */ lis r3, mGXViewPointMatrix__9CGraphics@ha +/* 8030C840 003097A0 3C A0 80 5A */ lis r5, mCameraMtx__9CGraphics@ha +/* 8030C844 003097A4 38 63 65 3C */ addi r3, r3, mGXViewPointMatrix__9CGraphics@l /* 8030C848 003097A8 38 81 00 38 */ addi r4, r1, 0x38 -/* 8030C84C 003097AC 38 A5 65 CC */ addi r5, r5, lbl_805A65CC@l +/* 8030C84C 003097AC 38 A5 65 CC */ addi r5, r5, mCameraMtx__9CGraphics@l /* 8030C850 003097B0 48 07 08 51 */ bl PSMTXConcat -/* 8030C854 003097B4 88 0D 9C 80 */ lbz r0, lbl_805A8840@sda21(r13) +/* 8030C854 003097B4 88 0D 9C 80 */ lbz r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) /* 8030C858 003097B8 28 00 00 00 */ cmplwi r0, 0 /* 8030C85C 003097BC 41 82 00 1C */ beq lbl_8030C878 -/* 8030C860 003097C0 3C 60 80 5A */ lis r3, lbl_805A65CC@ha -/* 8030C864 003097C4 3C 80 80 5A */ lis r4, lbl_805A659C@ha -/* 8030C868 003097C8 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l -/* 8030C86C 003097CC 38 84 65 9C */ addi r4, r4, lbl_805A659C@l +/* 8030C860 003097C0 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha +/* 8030C864 003097C4 3C 80 80 5A */ lis r4, mGxModelView__9CGraphics@ha +/* 8030C868 003097C8 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l +/* 8030C86C 003097CC 38 84 65 9C */ addi r4, r4, mGxModelView__9CGraphics@l /* 8030C870 003097D0 48 07 07 FD */ bl PSMTXCopy /* 8030C874 003097D4 48 00 00 20 */ b lbl_8030C894 lbl_8030C878: -/* 8030C878 003097D8 3C 60 80 5A */ lis r3, lbl_805A65CC@ha -/* 8030C87C 003097DC 3C 80 80 5A */ lis r4, lbl_805A656C@ha -/* 8030C880 003097E0 3C A0 80 5A */ lis r5, lbl_805A659C@ha -/* 8030C884 003097E4 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l -/* 8030C888 003097E8 38 84 65 6C */ addi r4, r4, lbl_805A656C@l -/* 8030C88C 003097EC 38 A5 65 9C */ addi r5, r5, lbl_805A659C@l +/* 8030C878 003097D8 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha +/* 8030C87C 003097DC 3C 80 80 5A */ lis r4, mGXModelMatrix__9CGraphics@ha +/* 8030C880 003097E0 3C A0 80 5A */ lis r5, mGxModelView__9CGraphics@ha +/* 8030C884 003097E4 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l +/* 8030C888 003097E8 38 84 65 6C */ addi r4, r4, mGXModelMatrix__9CGraphics@l +/* 8030C88C 003097EC 38 A5 65 9C */ addi r5, r5, mGxModelView__9CGraphics@l /* 8030C890 003097F0 48 07 08 11 */ bl PSMTXConcat lbl_8030C894: -/* 8030C894 003097F4 3C 60 80 5A */ lis r3, lbl_805A659C@ha +/* 8030C894 003097F4 3C 60 80 5A */ lis r3, mGxModelView__9CGraphics@ha /* 8030C898 003097F8 38 80 00 00 */ li r4, 0 -/* 8030C89C 003097FC 38 63 65 9C */ addi r3, r3, lbl_805A659C@l +/* 8030C89C 003097FC 38 63 65 9C */ addi r3, r3, mGxModelView__9CGraphics@l /* 8030C8A0 00309800 48 06 FB 19 */ bl GXLoadPosMtxImm -/* 8030C8A4 00309804 3C 60 80 5A */ lis r3, lbl_805A659C@ha +/* 8030C8A4 00309804 3C 60 80 5A */ lis r3, mGxModelView__9CGraphics@ha /* 8030C8A8 00309808 38 81 00 08 */ addi r4, r1, 8 -/* 8030C8AC 0030980C 38 63 65 9C */ addi r3, r3, lbl_805A659C@l +/* 8030C8AC 0030980C 38 63 65 9C */ addi r3, r3, mGxModelView__9CGraphics@l /* 8030C8B0 00309810 48 07 08 BD */ bl PSMTXInvXpose /* 8030C8B4 00309814 38 61 00 08 */ addi r3, r1, 8 /* 8030C8B8 00309818 38 80 00 00 */ li r4, 0 @@ -4173,9 +4160,9 @@ lbl_8030C8F4: /* 8030C8FC 0030985C 41 82 00 08 */ beq lbl_8030C904 /* 8030C900 00309860 39 00 00 02 */ li r8, 2 lbl_8030C904: -/* 8030C904 00309864 3C 60 80 5A */ lis r3, lbl_805A6170@ha +/* 8030C904 00309864 3C 60 80 5A */ lis r3, vtxDescr@ha /* 8030C908 00309868 57 E7 06 3E */ clrlwi r7, r31, 0x18 -/* 8030C90C 0030986C 38 63 61 70 */ addi r3, r3, lbl_805A6170@l +/* 8030C90C 0030986C 38 63 61 70 */ addi r3, r3, vtxDescr@l /* 8030C910 00309870 38 A0 00 00 */ li r5, 0 /* 8030C914 00309874 88 63 00 2E */ lbz r3, 0x2e(r3) /* 8030C918 00309878 7C 07 00 D0 */ neg r0, r7 @@ -4185,7 +4172,7 @@ lbl_8030C904: /* 8030C928 00309888 54 04 0F FE */ srwi r4, r0, 0x1f /* 8030C92C 0030988C 4B FF C3 A1 */ bl SetChanCtrl__3CGXFQ23CGX10EChannelIdUc11_GXColorSrc11_GXColorSrc10_GXLightID12_GXDiffuseFn9_GXAttnFn /* 8030C930 00309890 57 E0 06 3E */ clrlwi r0, r31, 0x18 -/* 8030C934 00309894 9B ED A8 16 */ stb r31, lbl_805A93D6@sda21(r13) +/* 8030C934 00309894 9B ED A8 16 */ stb r31, mLightActive__9CGraphics@sda21(r13) /* 8030C938 00309898 70 03 00 55 */ andi. r3, r0, 0x55 /* 8030C93C 0030989C 70 00 00 AA */ andi. r0, r0, 0xaa /* 8030C940 003098A0 54 00 F8 7E */ srwi r0, r0, 1 @@ -4197,7 +4184,7 @@ lbl_8030C904: /* 8030C958 003098B8 54 03 07 3E */ clrlwi r3, r0, 0x1c /* 8030C95C 003098BC 54 00 E7 3E */ rlwinm r0, r0, 0x1c, 0x1c, 0x1f /* 8030C960 003098C0 7C 03 02 14 */ add r0, r3, r0 -/* 8030C964 003098C4 90 0D A7 DC */ stw r0, lbl_805A939C@sda21(r13) +/* 8030C964 003098C4 90 0D A7 DC */ stw r0, mNumLightsActive__9CGraphics@sda21(r13) /* 8030C968 003098C8 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030C96C 003098CC 83 E1 00 0C */ lwz r31, 0xc(r1) /* 8030C970 003098D0 7C 08 03 A6 */ mtlr r0 @@ -4214,11 +4201,11 @@ DisableAllLights__9CGraphicsFv: /* 8030C990 003098F0 38 00 00 00 */ li r0, 0 /* 8030C994 003098F4 38 A0 00 00 */ li r5, 0 /* 8030C998 003098F8 38 C0 00 00 */ li r6, 0 -/* 8030C99C 003098FC 90 0D A7 DC */ stw r0, lbl_805A939C@sda21(r13) +/* 8030C99C 003098FC 90 0D A7 DC */ stw r0, mNumLightsActive__9CGraphics@sda21(r13) /* 8030C9A0 00309900 38 E0 00 00 */ li r7, 0 /* 8030C9A4 00309904 39 00 00 00 */ li r8, 0 /* 8030C9A8 00309908 39 20 00 02 */ li r9, 2 -/* 8030C9AC 0030990C 98 0D A8 16 */ stb r0, lbl_805A93D6@sda21(r13) +/* 8030C9AC 0030990C 98 0D A8 16 */ stb r0, mLightActive__9CGraphics@sda21(r13) /* 8030C9B0 00309910 4B FF C3 1D */ bl SetChanCtrl__3CGXFQ23CGX10EChannelIdUc11_GXColorSrc11_GXColorSrc10_GXLightID12_GXDiffuseFn9_GXAttnFn /* 8030C9B4 00309914 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030C9B8 00309918 7C 08 03 A6 */ mtlr r0 @@ -4303,23 +4290,23 @@ lbl_8030CABC: /* 8030CAC4 00309A24 40 80 02 08 */ bge lbl_8030CCCC /* 8030CAC8 00309A28 48 00 00 98 */ b lbl_8030CB60 lbl_8030CACC: -/* 8030CACC 00309A2C 3C 60 80 5A */ lis r3, lbl_805A65CC@ha +/* 8030CACC 00309A2C 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha /* 8030CAD0 00309A30 38 81 00 18 */ addi r4, r1, 0x18 -/* 8030CAD4 00309A34 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l +/* 8030CAD4 00309A34 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l /* 8030CAD8 00309A38 7C 85 23 78 */ mr r5, r4 /* 8030CADC 00309A3C 48 07 09 99 */ bl PSMTXMultVec -/* 8030CAE0 00309A40 3C 60 80 5A */ lis r3, lbl_805A6240@ha +/* 8030CAE0 00309A40 3C 60 80 5A */ lis r3, mLightObj__9CGraphics@ha /* 8030CAE4 00309A44 57 A4 30 32 */ slwi r4, r29, 6 -/* 8030CAE8 00309A48 38 03 62 40 */ addi r0, r3, lbl_805A6240@l +/* 8030CAE8 00309A48 38 03 62 40 */ addi r0, r3, mLightObj__9CGraphics@l /* 8030CAEC 00309A4C C0 21 00 18 */ lfs f1, 0x18(r1) /* 8030CAF0 00309A50 7F 80 22 14 */ add r28, r0, r4 /* 8030CAF4 00309A54 C0 41 00 1C */ lfs f2, 0x1c(r1) /* 8030CAF8 00309A58 C0 61 00 20 */ lfs f3, 0x20(r1) /* 8030CAFC 00309A5C 7F 83 E3 78 */ mr r3, r28 /* 8030CB00 00309A60 48 06 CD 95 */ bl GXInitLightPos -/* 8030CB04 00309A64 3C 60 80 5A */ lis r3, lbl_805A65CC@ha +/* 8030CB04 00309A64 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha /* 8030CB08 00309A68 38 81 00 0C */ addi r4, r1, 0xc -/* 8030CB0C 00309A6C 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l +/* 8030CB0C 00309A6C 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l /* 8030CB10 00309A70 7C 85 23 78 */ mr r5, r4 /* 8030CB14 00309A74 48 07 09 B5 */ bl PSMTXMultVecSR /* 8030CB18 00309A78 C0 21 00 0C */ lfs f1, 0xc(r1) @@ -4341,14 +4328,14 @@ lbl_8030CACC: /* 8030CB58 00309AB8 48 06 CB AD */ bl GXInitLightSpot /* 8030CB5C 00309ABC 48 00 01 70 */ b lbl_8030CCCC lbl_8030CB60: -/* 8030CB60 00309AC0 3C 60 80 5A */ lis r3, lbl_805A65CC@ha +/* 8030CB60 00309AC0 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha /* 8030CB64 00309AC4 38 81 00 18 */ addi r4, r1, 0x18 -/* 8030CB68 00309AC8 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l +/* 8030CB68 00309AC8 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l /* 8030CB6C 00309ACC 7C 85 23 78 */ mr r5, r4 /* 8030CB70 00309AD0 48 07 09 05 */ bl PSMTXMultVec -/* 8030CB74 00309AD4 3C 60 80 5A */ lis r3, lbl_805A6240@ha +/* 8030CB74 00309AD4 3C 60 80 5A */ lis r3, mLightObj__9CGraphics@ha /* 8030CB78 00309AD8 57 A4 30 32 */ slwi r4, r29, 6 -/* 8030CB7C 00309ADC 38 03 62 40 */ addi r0, r3, lbl_805A6240@l +/* 8030CB7C 00309ADC 38 03 62 40 */ addi r0, r3, mLightObj__9CGraphics@l /* 8030CB80 00309AE0 C0 21 00 18 */ lfs f1, 0x18(r1) /* 8030CB84 00309AE4 7F 80 22 14 */ add r28, r0, r4 /* 8030CB88 00309AE8 C0 41 00 1C */ lfs f2, 0x1c(r1) @@ -4365,19 +4352,19 @@ lbl_8030CB60: /* 8030CBB4 00309B14 48 06 CB 35 */ bl GXInitLightAttn /* 8030CBB8 00309B18 48 00 01 14 */ b lbl_8030CCCC lbl_8030CBBC: -/* 8030CBBC 00309B1C 3C 60 80 5A */ lis r3, lbl_805A65CC@ha +/* 8030CBBC 00309B1C 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha /* 8030CBC0 00309B20 38 81 00 0C */ addi r4, r1, 0xc -/* 8030CBC4 00309B24 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l +/* 8030CBC4 00309B24 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l /* 8030CBC8 00309B28 7C 85 23 78 */ mr r5, r4 /* 8030CBCC 00309B2C 48 07 08 FD */ bl PSMTXMultVecSR /* 8030CBD0 00309B30 C0 01 00 14 */ lfs f0, 0x14(r1) -/* 8030CBD4 00309B34 3C 60 80 5A */ lis r3, lbl_805A6240@ha +/* 8030CBD4 00309B34 3C 60 80 5A */ lis r3, mLightObj__9CGraphics@ha /* 8030CBD8 00309B38 C0 21 00 10 */ lfs f1, 0x10(r1) /* 8030CBDC 00309B3C 57 A4 30 32 */ slwi r4, r29, 6 /* 8030CBE0 00309B40 FC A0 00 50 */ fneg f5, f0 /* 8030CBE4 00309B44 C0 01 00 0C */ lfs f0, 0xc(r1) /* 8030CBE8 00309B48 FC 80 08 50 */ fneg f4, f1 -/* 8030CBEC 00309B4C 38 03 62 40 */ addi r0, r3, lbl_805A6240@l +/* 8030CBEC 00309B4C 38 03 62 40 */ addi r0, r3, mLightObj__9CGraphics@l /* 8030CBF0 00309B50 FC 00 00 50 */ fneg f0, f0 /* 8030CBF4 00309B54 7F 80 22 14 */ add r28, r0, r4 /* 8030CBF8 00309B58 FC 40 20 18 */ frsp f2, f4 @@ -4402,23 +4389,23 @@ lbl_8030CBBC: /* 8030CC44 00309BA4 48 06 CA A5 */ bl GXInitLightAttn /* 8030CC48 00309BA8 48 00 00 84 */ b lbl_8030CCCC lbl_8030CC4C: -/* 8030CC4C 00309BAC 3C 60 80 5A */ lis r3, lbl_805A65CC@ha +/* 8030CC4C 00309BAC 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha /* 8030CC50 00309BB0 38 81 00 18 */ addi r4, r1, 0x18 -/* 8030CC54 00309BB4 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l +/* 8030CC54 00309BB4 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l /* 8030CC58 00309BB8 7C 85 23 78 */ mr r5, r4 /* 8030CC5C 00309BBC 48 07 08 19 */ bl PSMTXMultVec -/* 8030CC60 00309BC0 3C 60 80 5A */ lis r3, lbl_805A6240@ha +/* 8030CC60 00309BC0 3C 60 80 5A */ lis r3, mLightObj__9CGraphics@ha /* 8030CC64 00309BC4 57 A4 30 32 */ slwi r4, r29, 6 -/* 8030CC68 00309BC8 38 03 62 40 */ addi r0, r3, lbl_805A6240@l +/* 8030CC68 00309BC8 38 03 62 40 */ addi r0, r3, mLightObj__9CGraphics@l /* 8030CC6C 00309BCC C0 21 00 18 */ lfs f1, 0x18(r1) /* 8030CC70 00309BD0 7F 80 22 14 */ add r28, r0, r4 /* 8030CC74 00309BD4 C0 41 00 1C */ lfs f2, 0x1c(r1) /* 8030CC78 00309BD8 C0 61 00 20 */ lfs f3, 0x20(r1) /* 8030CC7C 00309BDC 7F 83 E3 78 */ mr r3, r28 /* 8030CC80 00309BE0 48 06 CC 15 */ bl GXInitLightPos -/* 8030CC84 00309BE4 3C 60 80 5A */ lis r3, lbl_805A65CC@ha +/* 8030CC84 00309BE4 3C 60 80 5A */ lis r3, mCameraMtx__9CGraphics@ha /* 8030CC88 00309BE8 38 81 00 0C */ addi r4, r1, 0xc -/* 8030CC8C 00309BEC 38 63 65 CC */ addi r3, r3, lbl_805A65CC@l +/* 8030CC8C 00309BEC 38 63 65 CC */ addi r3, r3, mCameraMtx__9CGraphics@l /* 8030CC90 00309BF0 7C 85 23 78 */ mr r5, r4 /* 8030CC94 00309BF4 48 07 08 35 */ bl PSMTXMultVecSR /* 8030CC98 00309BF8 C0 21 00 0C */ lfs f1, 0xc(r1) @@ -4436,10 +4423,10 @@ lbl_8030CC4C: /* 8030CCC8 00309C28 48 06 CA 21 */ bl GXInitLightAttn lbl_8030CCCC: /* 8030CCCC 00309C2C 80 DE 00 18 */ lwz r6, 0x18(r30) -/* 8030CCD0 00309C30 3C 60 80 5A */ lis r3, lbl_805A6240@ha +/* 8030CCD0 00309C30 3C 60 80 5A */ lis r3, mLightObj__9CGraphics@ha /* 8030CCD4 00309C34 57 A5 30 32 */ slwi r5, r29, 6 /* 8030CCD8 00309C38 38 81 00 08 */ addi r4, r1, 8 -/* 8030CCDC 00309C3C 38 03 62 40 */ addi r0, r3, lbl_805A6240@l +/* 8030CCDC 00309C3C 38 03 62 40 */ addi r0, r3, mLightObj__9CGraphics@l /* 8030CCE0 00309C40 90 C1 00 08 */ stw r6, 8(r1) /* 8030CCE4 00309C44 7F 80 2A 14 */ add r28, r0, r5 /* 8030CCE8 00309C48 7F 83 E3 78 */ mr r3, r28 @@ -4447,10 +4434,10 @@ lbl_8030CCCC: /* 8030CCF0 00309C50 7F 83 E3 78 */ mr r3, r28 /* 8030CCF4 00309C54 7F E4 FB 78 */ mr r4, r31 /* 8030CCF8 00309C58 48 06 CB D5 */ bl GXLoadLightObjImm -/* 8030CCFC 00309C5C 3C 60 80 3F */ lis r3, lbl_803ED928@ha +/* 8030CCFC 00309C5C 3C 60 80 3F */ lis r3, mLightTypes__9CGraphics@ha /* 8030CD00 00309C60 80 9E 00 1C */ lwz r4, 0x1c(r30) /* 8030CD04 00309C64 57 A0 10 3A */ slwi r0, r29, 2 -/* 8030CD08 00309C68 38 63 D9 28 */ addi r3, r3, lbl_803ED928@l +/* 8030CD08 00309C68 38 63 D9 28 */ addi r3, r3, mLightTypes__9CGraphics@l /* 8030CD0C 00309C6C 7C 83 01 2E */ stwx r4, r3, r0 /* 8030CD10 00309C70 83 E1 00 3C */ lwz r31, 0x3c(r1) /* 8030CD14 00309C74 83 C1 00 38 */ lwz r30, 0x38(r1) @@ -4471,13 +4458,13 @@ EnableLight__9CGraphicsF9ERglLight: /* 8030CD44 00309CA4 38 60 00 01 */ li r3, 1 /* 8030CD48 00309CA8 4B FF C1 09 */ bl SetNumChans__3CGXFUc /* 8030CD4C 00309CAC 38 00 00 01 */ li r0, 1 -/* 8030CD50 00309CB0 88 6D A8 16 */ lbz r3, lbl_805A93D6@sda21(r13) +/* 8030CD50 00309CB0 88 6D A8 16 */ lbz r3, mLightActive__9CGraphics@sda21(r13) /* 8030CD54 00309CB4 7C 04 F8 30 */ slw r4, r0, r31 /* 8030CD58 00309CB8 7C 60 20 39 */ and. r0, r3, r4 /* 8030CD5C 00309CBC 40 82 00 38 */ bne lbl_8030CD94 /* 8030CD60 00309CC0 7C 60 23 78 */ or r0, r3, r4 /* 8030CD64 00309CC4 38 60 00 00 */ li r3, 0 -/* 8030CD68 00309CC8 98 0D A8 16 */ stb r0, lbl_805A93D6@sda21(r13) +/* 8030CD68 00309CC8 98 0D A8 16 */ stb r0, mLightActive__9CGraphics@sda21(r13) /* 8030CD6C 00309CCC 54 07 06 3E */ clrlwi r7, r0, 0x18 /* 8030CD70 00309CD0 38 80 00 01 */ li r4, 1 /* 8030CD74 00309CD4 38 A0 00 00 */ li r5, 0 @@ -4485,12 +4472,12 @@ EnableLight__9CGraphicsF9ERglLight: /* 8030CD7C 00309CDC 39 00 00 02 */ li r8, 2 /* 8030CD80 00309CE0 39 20 00 01 */ li r9, 1 /* 8030CD84 00309CE4 4B FF BF 49 */ bl SetChanCtrl__3CGXFQ23CGX10EChannelIdUc11_GXColorSrc11_GXColorSrc10_GXLightID12_GXDiffuseFn9_GXAttnFn -/* 8030CD88 00309CE8 80 6D A7 DC */ lwz r3, lbl_805A939C@sda21(r13) +/* 8030CD88 00309CE8 80 6D A7 DC */ lwz r3, mNumLightsActive__9CGraphics@sda21(r13) /* 8030CD8C 00309CEC 38 03 00 01 */ addi r0, r3, 1 -/* 8030CD90 00309CF0 90 0D A7 DC */ stw r0, lbl_805A939C@sda21(r13) +/* 8030CD90 00309CF0 90 0D A7 DC */ stw r0, mNumLightsActive__9CGraphics@sda21(r13) lbl_8030CD94: -/* 8030CD94 00309CF4 88 0D A8 16 */ lbz r0, lbl_805A93D6@sda21(r13) -/* 8030CD98 00309CF8 98 0D A8 17 */ stb r0, lbl_805A93D7@sda21(r13) +/* 8030CD94 00309CF4 88 0D A8 16 */ lbz r0, mLightActive__9CGraphics@sda21(r13) +/* 8030CD98 00309CF8 98 0D A8 17 */ stb r0, mLightsWereOn__9CGraphics@sda21(r13) /* 8030CD9C 00309CFC 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030CDA0 00309D00 83 E1 00 0C */ lwz r31, 0xc(r1) /* 8030CDA4 00309D04 7C 08 03 A6 */ mtlr r0 @@ -4505,8 +4492,8 @@ ConfigureFrameBuffer__9CGraphicsFRC10COsContext: /* 8030CDBC 00309D1C 90 01 00 64 */ stw r0, 0x64(r1) /* 8030CDC0 00309D20 BE 61 00 2C */ stmw r19, 0x2c(r1) /* 8030CDC4 00309D24 7C 7C 1B 78 */ mr r28, r3 -/* 8030CDC8 00309D28 3C 60 80 5A */ lis r3, lbl_805A6500@ha -/* 8030CDCC 00309D2C 3B E3 65 00 */ addi r31, r3, lbl_805A6500@l +/* 8030CDC8 00309D28 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha +/* 8030CDCC 00309D2C 3B E3 65 00 */ addi r31, r3, mRenderModeObj__9CGraphics@l /* 8030CDD0 00309D30 38 9C 00 62 */ addi r4, r28, 0x62 /* 8030CDD4 00309D34 3B DF 00 32 */ addi r30, r31, 0x32 /* 8030CDD8 00309D38 3B BF 00 1A */ addi r29, r31, 0x1a @@ -4547,13 +4534,13 @@ ConfigureFrameBuffer__9CGraphicsFRC10COsContext: /* 8030CE64 00309DC4 90 1F 00 2E */ stw r0, 0x2e(r31) /* 8030CE68 00309DC8 48 07 C8 3D */ bl __copy /* 8030CE6C 00309DCC 80 9C 00 24 */ lwz r4, 0x24(r28) -/* 8030CE70 00309DD0 3C 60 80 5A */ lis r3, lbl_805A6500@ha +/* 8030CE70 00309DD0 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha /* 8030CE74 00309DD4 80 1C 00 28 */ lwz r0, 0x28(r28) -/* 8030CE78 00309DD8 38 63 65 00 */ addi r3, r3, lbl_805A6500@l -/* 8030CE7C 00309DDC 90 8D A8 18 */ stw r4, lbl_805A93D8@sda21(r13) -/* 8030CE80 00309DE0 90 0D A8 1C */ stw r0, lbl_805A93DC@sda21(r13) +/* 8030CE78 00309DD8 38 63 65 00 */ addi r3, r3, mRenderModeObj__9CGraphics@l +/* 8030CE7C 00309DDC 90 8D A8 18 */ stw r4, mpFrameBuf1__9CGraphics@sda21(r13) +/* 8030CE80 00309DE0 90 0D A8 1C */ stw r0, mpFrameBuf2__9CGraphics@sda21(r13) /* 8030CE84 00309DE4 48 07 B6 D1 */ bl VIConfigure -/* 8030CE88 00309DE8 80 6D A8 18 */ lwz r3, lbl_805A93D8@sda21(r13) +/* 8030CE88 00309DE8 80 6D A8 18 */ lwz r3, mpFrameBuf1__9CGraphics@sda21(r13) /* 8030CE8C 00309DEC 48 07 C3 B5 */ bl VISetNextFrameBuffer /* 8030CE90 00309DF0 A0 9F 00 04 */ lhz r4, 4(r31) /* 8030CE94 00309DF4 3C 60 43 30 */ lis r3, 0x4330 @@ -4561,7 +4548,7 @@ ConfigureFrameBuffer__9CGraphicsFRC10COsContext: /* 8030CE9C 00309DFC 90 81 00 0C */ stw r4, 0xc(r1) /* 8030CEA0 00309E00 C0 22 C7 F0 */ lfs f1, lbl_805AE510@sda21(r2) /* 8030CEA4 00309E04 90 61 00 08 */ stw r3, 8(r1) -/* 8030CEA8 00309E08 80 8D A8 1C */ lwz r4, lbl_805A93DC@sda21(r13) +/* 8030CEA8 00309E08 80 8D A8 1C */ lwz r4, mpFrameBuf2__9CGraphics@sda21(r13) /* 8030CEAC 00309E0C FC 40 08 90 */ fmr f2, f1 /* 8030CEB0 00309E10 90 01 00 14 */ stw r0, 0x14(r1) /* 8030CEB4 00309E14 FC A0 08 90 */ fmr f5, f1 @@ -4570,7 +4557,7 @@ ConfigureFrameBuffer__9CGraphicsFRC10COsContext: /* 8030CEC0 00309E20 C8 61 00 08 */ lfd f3, 8(r1) /* 8030CEC4 00309E24 C8 01 00 10 */ lfd f0, 0x10(r1) /* 8030CEC8 00309E28 EC 63 20 28 */ fsubs f3, f3, f4 -/* 8030CECC 00309E2C 90 8D A8 20 */ stw r4, lbl_805A93E0@sda21(r13) +/* 8030CECC 00309E2C 90 8D A8 20 */ stw r4, mpCurrenFrameBuf__9CGraphics@sda21(r13) /* 8030CED0 00309E30 EC 80 20 28 */ fsubs f4, f0, f4 /* 8030CED4 00309E34 C0 C2 C8 10 */ lfs f6, lbl_805AE530@sda21(r2) /* 8030CED8 00309E38 48 06 F7 71 */ bl GXSetViewport @@ -4620,15 +4607,15 @@ lbl_8030CF78: lbl_8030CF84: /* 8030CF84 00309EE4 38 60 00 00 */ li r3, 0 /* 8030CF88 00309EE8 48 06 C4 35 */ bl GXSetDispCopyGamma -/* 8030CF8C 00309EEC 80 6D A8 20 */ lwz r3, lbl_805A93E0@sda21(r13) +/* 8030CF8C 00309EEC 80 6D A8 20 */ lwz r3, mpCurrenFrameBuf__9CGraphics@sda21(r13) /* 8030CF90 00309EF0 38 80 00 01 */ li r4, 1 /* 8030CF94 00309EF4 48 06 C4 45 */ bl GXCopyDisp /* 8030CF98 00309EF8 48 07 C1 79 */ bl VIFlush /* 8030CF9C 00309EFC 48 07 B0 F1 */ bl VIWaitForRetrace /* 8030CFA0 00309F00 48 07 B0 ED */ bl VIWaitForRetrace -/* 8030CFA4 00309F04 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8030CFA4 00309F04 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8030CFA8 00309F08 A0 9F 00 04 */ lhz r4, 4(r31) -/* 8030CFAC 00309F0C 38 63 D9 10 */ addi r3, r3, lbl_803ED910@l +/* 8030CFAC 00309F0C 38 63 D9 10 */ addi r3, r3, mViewport__9CGraphics@l /* 8030CFB0 00309F10 A0 1F 00 06 */ lhz r0, 6(r31) /* 8030CFB4 00309F14 90 83 00 08 */ stw r4, 8(r3) /* 8030CFB8 00309F18 90 03 00 0C */ stw r0, 0xc(r3) @@ -4648,21 +4635,21 @@ InitGraphicsDefaults__9CGraphicsFv: /* 8030CFE4 00309F44 C0 42 C8 10 */ lfs f2, lbl_805AE530@sda21(r2) /* 8030CFE8 00309F48 4B FF D3 F9 */ bl SetDepthRange__9CGraphicsFff /* 8030CFEC 00309F4C 38 00 00 00 */ li r0, 0 -/* 8030CFF0 00309F50 3C 60 80 5A */ lis r3, lbl_805A6204@ha -/* 8030CFF4 00309F54 98 0D 9C 80 */ stb r0, lbl_805A8840@sda21(r13) -/* 8030CFF8 00309F58 38 63 62 04 */ addi r3, r3, lbl_805A6204@l +/* 8030CFF0 00309F50 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha +/* 8030CFF4 00309F54 98 0D 9C 80 */ stb r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) +/* 8030CFF8 00309F58 38 63 62 04 */ addi r3, r3, mModelMatrix__9CGraphics@l /* 8030CFFC 00309F5C 4B FF F5 E5 */ bl SetModelMatrix__9CGraphicsFRC12CTransform4f -/* 8030D000 00309F60 3C 60 80 5A */ lis r3, lbl_805A61D4@ha -/* 8030D004 00309F64 38 63 61 D4 */ addi r3, r3, lbl_805A61D4@l +/* 8030D000 00309F60 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha +/* 8030D004 00309F64 38 63 61 D4 */ addi r3, r3, mViewMatrix__9CGraphics@l /* 8030D008 00309F68 4B FF F7 45 */ bl SetViewPointMatrix__9CGraphicsFRC12CTransform4f -/* 8030D00C 00309F6C 80 8D 9C 70 */ lwz r4, lbl_805A8830@sda21(r13) +/* 8030D00C 00309F6C 80 8D 9C 70 */ lwz r4, mDepthFunc__9CGraphics@sda21(r13) /* 8030D010 00309F70 38 60 00 00 */ li r3, 0 /* 8030D014 00309F74 38 A0 00 00 */ li r5, 0 /* 8030D018 00309F78 4B FF EA 7D */ bl SetDepthWriteMode__9CGraphicsFb8ERglEnumb -/* 8030D01C 00309F7C 80 6D A7 D8 */ lwz r3, lbl_805A9398@sda21(r13) +/* 8030D01C 00309F7C 80 6D A7 D8 */ lwz r3, mCullMode__9CGraphics@sda21(r13) /* 8030D020 00309F80 4B FF EA 51 */ bl SetCullMode__9CGraphicsF12ERglCullMode -/* 8030D024 00309F84 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 8030D028 00309F88 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 8030D024 00309F84 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 8030D028 00309F88 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 8030D02C 00309F8C 80 66 00 00 */ lwz r3, 0(r6) /* 8030D030 00309F90 80 86 00 04 */ lwz r4, 4(r6) /* 8030D034 00309F94 80 A6 00 08 */ lwz r5, 8(r6) @@ -4682,7 +4669,7 @@ Shutdown__9CGraphicsFv: /* 8030D060 00309FC0 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8030D064 00309FC4 7C 08 02 A6 */ mflr r0 /* 8030D068 00309FC8 90 01 00 14 */ stw r0, 0x14(r1) -/* 8030D06C 00309FCC 80 6D A8 30 */ lwz r3, lbl_805A93F0@sda21(r13) +/* 8030D06C 00309FCC 80 6D A8 30 */ lwz r3, mGXDefaultTexRegionCallback__9CGraphics@sda21(r13) /* 8030D070 00309FD0 48 06 D8 19 */ bl GXSetTexRegionCallback /* 8030D074 00309FD4 80 01 00 14 */ lwz r0, 0x14(r1) /* 8030D078 00309FD8 7C 08 03 A6 */ mtlr r0 @@ -4693,16 +4680,16 @@ Shutdown__9CGraphicsFv: InitGraphicsVariables__9CGraphicsFv: /* 8030D084 00309FE4 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8030D088 00309FE8 7C 08 02 A6 */ mflr r0 -/* 8030D08C 00309FEC 3C 60 80 3F */ lis r3, lbl_803ED928@ha +/* 8030D08C 00309FEC 3C 60 80 3F */ lis r3, mLightTypes__9CGraphics@ha /* 8030D090 00309FF0 38 E0 00 02 */ li r7, 2 /* 8030D094 00309FF4 90 01 00 34 */ stw r0, 0x34(r1) -/* 8030D098 00309FF8 38 C3 D9 28 */ addi r6, r3, lbl_803ED928@l +/* 8030D098 00309FF8 38 C3 D9 28 */ addi r6, r3, mLightTypes__9CGraphics@l /* 8030D09C 00309FFC 38 00 00 00 */ li r0, 0 /* 8030D0A0 0030A000 38 60 00 00 */ li r3, 0 /* 8030D0A4 0030A004 93 E1 00 2C */ stw r31, 0x2c(r1) /* 8030D0A8 0030A008 38 A0 00 00 */ li r5, 0 /* 8030D0AC 0030A00C 90 E6 00 00 */ stw r7, 0(r6) -/* 8030D0B0 0030A010 80 8D 9C 70 */ lwz r4, lbl_805A8830@sda21(r13) +/* 8030D0B0 0030A010 80 8D 9C 70 */ lwz r4, mDepthFunc__9CGraphics@sda21(r13) /* 8030D0B4 0030A014 90 E6 00 04 */ stw r7, 4(r6) /* 8030D0B8 0030A018 90 E6 00 08 */ stw r7, 8(r6) /* 8030D0BC 0030A01C 90 E6 00 0C */ stw r7, 0xc(r6) @@ -4710,7 +4697,7 @@ InitGraphicsVariables__9CGraphicsFv: /* 8030D0C4 0030A024 90 E6 00 14 */ stw r7, 0x14(r6) /* 8030D0C8 0030A028 90 E6 00 18 */ stw r7, 0x18(r6) /* 8030D0CC 0030A02C 90 E6 00 1C */ stw r7, 0x1c(r6) -/* 8030D0D0 0030A030 98 0D A8 16 */ stb r0, lbl_805A93D6@sda21(r13) +/* 8030D0D0 0030A030 98 0D A8 16 */ stb r0, mLightActive__9CGraphics@sda21(r13) /* 8030D0D4 0030A034 4B FF E9 C1 */ bl SetDepthWriteMode__9CGraphicsFb8ERglEnumb /* 8030D0D8 0030A038 38 60 00 00 */ li r3, 0 /* 8030D0DC 0030A03C 4B FF E9 95 */ bl SetCullMode__9CGraphicsF12ERglCullMode @@ -4722,12 +4709,12 @@ InitGraphicsVariables__9CGraphicsFv: /* 8030D0F4 0030A054 48 05 62 F9 */ bl __ct__6CColorFffff /* 8030D0F8 0030A058 4B FF EF 25 */ bl SetAmbientColor__9CGraphicsFRC6CColor /* 8030D0FC 0030A05C 38 00 00 00 */ li r0, 0 -/* 8030D100 0030A060 98 0D 9C 80 */ stb r0, lbl_805A8840@sda21(r13) +/* 8030D100 0030A060 98 0D 9C 80 */ stb r0, mIsGXModelMatrixIdentity__9CGraphics@sda21(r13) /* 8030D104 0030A064 4B FF F5 C1 */ bl SetIdentityViewPointMatrix__9CGraphicsFv /* 8030D108 0030A068 4B FF F4 91 */ bl SetIdentityModelMatrix__9CGraphicsFv -/* 8030D10C 0030A06C 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 8030D10C 0030A06C 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 8030D110 0030A070 38 60 00 00 */ li r3, 0 -/* 8030D114 0030A074 3B E4 D9 10 */ addi r31, r4, lbl_803ED910@l +/* 8030D114 0030A074 3B E4 D9 10 */ addi r31, r4, mViewport__9CGraphics@l /* 8030D118 0030A078 38 80 00 00 */ li r4, 0 /* 8030D11C 0030A07C 80 BF 00 08 */ lwz r5, 8(r31) /* 8030D120 0030A080 80 DF 00 0C */ lwz r6, 0xc(r31) @@ -4735,11 +4722,11 @@ InitGraphicsVariables__9CGraphicsFv: /* 8030D128 0030A088 80 BF 00 08 */ lwz r5, 8(r31) /* 8030D12C 0030A08C 3C 80 43 30 */ lis r4, 0x4330 /* 8030D130 0030A090 80 1F 00 0C */ lwz r0, 0xc(r31) -/* 8030D134 0030A094 3C 60 80 5A */ lis r3, lbl_805A61B8@ha +/* 8030D134 0030A094 3C 60 80 5A */ lis r3, mProj__9CGraphics@ha /* 8030D138 0030A098 6C A5 80 00 */ xoris r5, r5, 0x8000 /* 8030D13C 0030A09C 90 81 00 10 */ stw r4, 0x10(r1) /* 8030D140 0030A0A0 6C 00 80 00 */ xoris r0, r0, 0x8000 -/* 8030D144 0030A0A4 38 63 61 B8 */ addi r3, r3, lbl_805A61B8@l +/* 8030D144 0030A0A4 38 63 61 B8 */ addi r3, r3, mProj__9CGraphics@l /* 8030D148 0030A0A8 90 A1 00 14 */ stw r5, 0x14(r1) /* 8030D14C 0030A0AC C8 A2 C7 E8 */ lfd f5, lbl_805AE508@sda21(r2) /* 8030D150 0030A0B0 C8 01 00 10 */ lfd f0, 0x10(r1) @@ -4754,14 +4741,14 @@ InitGraphicsVariables__9CGraphicsFv: /* 8030D174 0030A0D4 EC 42 00 24 */ fdivs f2, f2, f0 /* 8030D178 0030A0D8 4B FF F3 19 */ bl SetPerspective__9CGraphicsFffff /* 8030D17C 0030A0DC C0 22 C8 10 */ lfs f1, lbl_805AE530@sda21(r2) -/* 8030D180 0030A0E0 38 6D A7 F8 */ addi r3, r13, lbl_805A93B8@sda21 +/* 8030D180 0030A0E0 38 6D A7 F8 */ addi r3, r13, mClearColor__9CGraphics@sda21 /* 8030D184 0030A0E4 4B FF EE 45 */ bl SetCopyClear__9CGraphicsFRC6CColorf /* 8030D188 0030A0E8 80 02 C7 AC */ lwz r0, lbl_805AE4CC@sda21(r2) /* 8030D18C 0030A0EC 38 81 00 0C */ addi r4, r1, 0xc /* 8030D190 0030A0F0 38 60 00 00 */ li r3, 0 /* 8030D194 0030A0F4 90 01 00 0C */ stw r0, 0xc(r1) /* 8030D198 0030A0F8 4B FF BB C5 */ bl SetChanMatColor__3CGXFQ23CGX10EChannelIdRC8_GXColor -/* 8030D19C 0030A0FC 38 6D A7 B8 */ addi r3, r13, lbl_805A9378@sda21 +/* 8030D19C 0030A0FC 38 6D A7 B8 */ addi r3, r13, sRenderState__9CGraphics@sda21 /* 8030D1A0 0030A100 4B FF C1 59 */ bl ResetFlushAll__Q29CGraphics12CRenderStateFv /* 8030D1A4 0030A104 80 01 00 34 */ lwz r0, 0x34(r1) /* 8030D1A8 0030A108 83 E1 00 2C */ lwz r31, 0x2c(r1) @@ -4792,8 +4779,8 @@ lbl_8030D1E0: lbl_8030D1FC: /* 8030D1FC 0030A15C 2C 04 00 07 */ cmpwi r4, 7 /* 8030D200 0030A160 40 82 00 10 */ bne lbl_8030D210 -/* 8030D204 0030A164 3C 60 80 5A */ lis r3, lbl_805A6440@ha -/* 8030D208 0030A168 38 63 64 40 */ addi r3, r3, lbl_805A6440@l +/* 8030D204 0030A164 3C 60 80 5A */ lis r3, mTexRegions__9CGraphics@ha +/* 8030D208 0030A168 38 63 64 40 */ addi r3, r3, mTexRegions__9CGraphics@l /* 8030D20C 0030A16C 48 00 00 70 */ b lbl_8030D27C lbl_8030D210: /* 8030D210 0030A170 48 06 D0 E5 */ bl GXGetTexObjFmt @@ -4810,8 +4797,8 @@ lbl_8030D210: /* 8030D23C 0030A19C 90 0D A8 54 */ stw r0, lbl_805A9414@sda21(r13) lbl_8030D240: /* 8030D240 0030A1A0 80 AD A8 54 */ lwz r5, lbl_805A9414@sda21(r13) -/* 8030D244 0030A1A4 3C 60 80 5A */ lis r3, lbl_805A6440@ha -/* 8030D248 0030A1A8 38 03 64 40 */ addi r0, r3, lbl_805A6440@l +/* 8030D244 0030A1A4 3C 60 80 5A */ lis r3, mTexRegions__9CGraphics@ha +/* 8030D248 0030A1A8 38 03 64 40 */ addi r0, r3, mTexRegions__9CGraphics@l /* 8030D24C 0030A1AC 38 85 00 01 */ addi r4, r5, 1 /* 8030D250 0030A1B0 54 A3 26 76 */ rlwinm r3, r5, 4, 0x19, 0x1b /* 8030D254 0030A1B4 90 8D A8 54 */ stw r4, lbl_805A9414@sda21(r13) @@ -4819,8 +4806,8 @@ lbl_8030D240: /* 8030D25C 0030A1BC 48 00 00 20 */ b lbl_8030D27C lbl_8030D260: /* 8030D260 0030A1C0 80 AD A8 5C */ lwz r5, lbl_805A941C@sda21(r13) -/* 8030D264 0030A1C4 3C 60 80 5A */ lis r3, lbl_805A64C0@ha -/* 8030D268 0030A1C8 38 03 64 C0 */ addi r0, r3, lbl_805A64C0@l +/* 8030D264 0030A1C4 3C 60 80 5A */ lis r3, mTexRegionsCI__9CGraphics@ha +/* 8030D268 0030A1C8 38 03 64 C0 */ addi r0, r3, mTexRegionsCI__9CGraphics@l /* 8030D26C 0030A1CC 38 85 00 01 */ addi r4, r5, 1 /* 8030D270 0030A1D0 54 A3 26 B6 */ rlwinm r3, r5, 4, 0x1a, 0x1b /* 8030D274 0030A1D4 90 8D A8 5C */ stw r4, lbl_805A941C@sda21(r13) @@ -4844,24 +4831,24 @@ Startup__9CGraphicsFRC10COsContextUiPv: /* 8030D2AC 0030A20C 93 81 00 90 */ stw r28, 0x90(r1) /* 8030D2B0 0030A210 7C 9C 23 78 */ mr r28, r4 /* 8030D2B4 0030A214 7F 9D E3 78 */ mr r29, r28 -/* 8030D2B8 0030A218 90 AD A8 34 */ stw r5, lbl_805A93F4@sda21(r13) +/* 8030D2B8 0030A218 90 AD A8 34 */ stw r5, mpFifo__9CGraphics@sda21(r13) /* 8030D2BC 0030A21C 48 06 7E 91 */ bl GXInit -/* 8030D2C0 0030A220 90 6D A8 38 */ stw r3, lbl_805A93F8@sda21(r13) +/* 8030D2C0 0030A220 90 6D A8 38 */ stw r3, mpFifoObj__9CGraphics@sda21(r13) /* 8030D2C4 0030A224 7F A5 EB 78 */ mr r5, r29 -/* 8030D2C8 0030A228 80 8D A8 34 */ lwz r4, lbl_805A93F4@sda21(r13) +/* 8030D2C8 0030A228 80 8D A8 34 */ lwz r4, mpFifo__9CGraphics@sda21(r13) /* 8030D2CC 0030A22C 38 61 00 08 */ addi r3, r1, 8 /* 8030D2D0 0030A230 48 06 90 E1 */ bl GXInitFifoBase /* 8030D2D4 0030A234 38 61 00 08 */ addi r3, r1, 8 /* 8030D2D8 0030A238 48 06 91 C1 */ bl GXSetCPUFifo /* 8030D2DC 0030A23C 38 61 00 08 */ addi r3, r1, 8 /* 8030D2E0 0030A240 48 06 92 C9 */ bl GXSetGPFifo -/* 8030D2E4 0030A244 80 6D A8 38 */ lwz r3, lbl_805A93F8@sda21(r13) +/* 8030D2E4 0030A244 80 6D A8 38 */ lwz r3, mpFifoObj__9CGraphics@sda21(r13) /* 8030D2E8 0030A248 38 9C C0 00 */ addi r4, r28, -16384 /* 8030D2EC 0030A24C 3C BC FF FF */ addis r5, r28, 0xffff /* 8030D2F0 0030A250 48 06 91 9D */ bl GXInitFifoLimits -/* 8030D2F4 0030A254 80 6D A8 38 */ lwz r3, lbl_805A93F8@sda21(r13) +/* 8030D2F4 0030A254 80 6D A8 38 */ lwz r3, mpFifoObj__9CGraphics@sda21(r13) /* 8030D2F8 0030A258 48 06 91 A1 */ bl GXSetCPUFifo -/* 8030D2FC 0030A25C 80 6D A8 38 */ lwz r3, lbl_805A93F8@sda21(r13) +/* 8030D2FC 0030A25C 80 6D A8 38 */ lwz r3, mpFifoObj__9CGraphics@sda21(r13) /* 8030D300 0030A260 48 06 92 A9 */ bl GXSetGPFifo /* 8030D304 0030A264 38 60 00 01 */ li r3, 1 /* 8030D308 0030A268 38 80 00 08 */ li r4, 8 @@ -4872,9 +4859,9 @@ Startup__9CGraphicsFRC10COsContextUiPv: /* 8030D31C 0030A27C 4B FF FD 69 */ bl InitGraphicsVariables__9CGraphicsFv /* 8030D320 0030A280 7F C3 F3 78 */ mr r3, r30 /* 8030D324 0030A284 4B FF FA 8D */ bl ConfigureFrameBuffer__9CGraphicsFRC10COsContext -/* 8030D328 0030A288 3C 60 80 5A */ lis r3, lbl_805A6440@ha +/* 8030D328 0030A288 3C 60 80 5A */ lis r3, mTexRegions__9CGraphics@ha /* 8030D32C 0030A28C 3B 80 00 00 */ li r28, 0 -/* 8030D330 0030A290 3B A3 64 40 */ addi r29, r3, lbl_805A6440@l +/* 8030D330 0030A290 3B A3 64 40 */ addi r29, r3, mTexRegions__9CGraphics@l /* 8030D334 0030A294 3F E0 00 08 */ lis r31, 8 /* 8030D338 0030A298 3B C0 00 00 */ li r30, 0 lbl_8030D33C: @@ -4893,9 +4880,9 @@ lbl_8030D33C: /* 8030D36C 0030A2CC 3B BD 00 10 */ addi r29, r29, 0x10 /* 8030D370 0030A2D0 3B FF 80 00 */ addi r31, r31, -32768 /* 8030D374 0030A2D4 41 80 FF C8 */ blt lbl_8030D33C -/* 8030D378 0030A2D8 3C 60 80 5A */ lis r3, lbl_805A64C0@ha +/* 8030D378 0030A2D8 3C 60 80 5A */ lis r3, mTexRegionsCI__9CGraphics@ha /* 8030D37C 0030A2DC 3B 80 00 00 */ li r28, 0 -/* 8030D380 0030A2E0 3B E3 64 C0 */ addi r31, r3, lbl_805A64C0@l +/* 8030D380 0030A2E0 3B E3 64 C0 */ addi r31, r3, mTexRegionsCI__9CGraphics@l /* 8030D384 0030A2E4 3B A0 00 09 */ li r29, 9 /* 8030D388 0030A2E8 3B C0 00 08 */ li r30, 8 lbl_8030D38C: @@ -4916,15 +4903,15 @@ lbl_8030D38C: /* 8030D3C4 0030A324 38 63 D1 B8 */ addi r3, r3, TexRegionCallback__9CGraphicsFP9_GXTexObj11_GXTexMapID@l /* 8030D3C8 0030A328 48 06 D4 C1 */ bl GXSetTexRegionCallback /* 8030D3CC 0030A32C 3C A0 00 04 */ lis r5, 0x00046000@ha -/* 8030D3D0 0030A330 3C 80 80 48 */ lis r4, lbl_80479CC0@ha +/* 8030D3D0 0030A330 3C 80 80 48 */ lis r4, sSpareFrameBuffer@ha /* 8030D3D4 0030A334 38 A5 60 00 */ addi r5, r5, 0x00046000@l /* 8030D3D8 0030A338 3C 00 00 01 */ lis r0, 1 -/* 8030D3DC 0030A33C 38 84 9C C0 */ addi r4, r4, lbl_80479CC0@l -/* 8030D3E0 0030A340 90 6D A8 30 */ stw r3, lbl_805A93F0@sda21(r13) +/* 8030D3DC 0030A33C 38 84 9C C0 */ addi r4, r4, sSpareFrameBuffer@l +/* 8030D3E0 0030A340 90 6D A8 30 */ stw r3, mGXDefaultTexRegionCallback__9CGraphics@sda21(r13) /* 8030D3E4 0030A344 38 60 00 01 */ li r3, 1 -/* 8030D3E8 0030A348 90 AD A8 24 */ stw r5, lbl_805A93E4@sda21(r13) -/* 8030D3EC 0030A34C 90 8D A8 28 */ stw r4, lbl_805A93E8@sda21(r13) -/* 8030D3F0 0030A350 90 0D A8 2C */ stw r0, lbl_805A93EC@sda21(r13) +/* 8030D3E8 0030A348 90 AD A8 24 */ stw r5, mSpareBufferSize__9CGraphics@sda21(r13) +/* 8030D3EC 0030A34C 90 8D A8 28 */ stw r4, mpSpareBuffer__9CGraphics@sda21(r13) +/* 8030D3F0 0030A350 90 0D A8 2C */ stw r0, mSpareBufferTexCacheSize__9CGraphics@sda21(r13) /* 8030D3F4 0030A354 83 E1 00 9C */ lwz r31, 0x9c(r1) /* 8030D3F8 0030A358 83 C1 00 98 */ lwz r30, 0x98(r1) /* 8030D3FC 0030A35C 83 A1 00 94 */ lwz r29, 0x94(r1) @@ -4944,7 +4931,7 @@ __sinit_DolphinCGraphics_cpp: /* 8030D428 0030A388 38 A0 00 01 */ li r5, 1 /* 8030D42C 0030A38C 90 8D A7 B4 */ stw r4, lbl_805A9374@sda21(r13) /* 8030D430 0030A390 38 80 00 07 */ li r4, 7 -/* 8030D434 0030A394 90 6D A7 B0 */ stw r3, lbl_805A9370@sda21(r13) +/* 8030D434 0030A394 90 6D A7 B0 */ stw r3, sFPSTimer@sda21(r13) /* 8030D438 0030A398 38 61 01 28 */ addi r3, r1, 0x128 /* 8030D43C 0030A39C 98 A1 03 F0 */ stb r5, 0x3f0(r1) /* 8030D440 0030A3A0 90 01 03 F4 */ stw r0, 0x3f4(r1) @@ -4987,9 +4974,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030D4D4 0030A434 38 80 00 0F */ li r4, 0xf /* 8030D4D8 0030A438 4B FF BC 4D */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030D4DC 0030A43C 80 A1 01 44 */ lwz r5, 0x144(r1) -/* 8030D4E0 0030A440 3C 60 80 5A */ lis r3, lbl_805A5698@ha +/* 8030D4E0 0030A440 3C 60 80 5A */ lis r3, kEnvModulateConstColor__9CGraphics@ha /* 8030D4E4 0030A444 81 21 01 40 */ lwz r9, 0x140(r1) -/* 8030D4E8 0030A448 38 63 56 98 */ addi r3, r3, lbl_805A5698@l +/* 8030D4E8 0030A448 38 63 56 98 */ addi r3, r3, kEnvModulateConstColor__9CGraphics@l /* 8030D4EC 0030A44C 81 01 01 3C */ lwz r8, 0x13c(r1) /* 8030D4F0 0030A450 38 81 02 78 */ addi r4, r1, 0x278 /* 8030D4F4 0030A454 80 01 01 38 */ lwz r0, 0x138(r1) @@ -5046,9 +5033,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030D5C0 0030A520 38 80 00 0F */ li r4, 0xf /* 8030D5C4 0030A524 4B FF BB 61 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030D5C8 0030A528 80 A1 01 24 */ lwz r5, 0x124(r1) -/* 8030D5CC 0030A52C 3C 60 80 5A */ lis r3, lbl_805A5E70@ha +/* 8030D5CC 0030A52C 3C 60 80 5A */ lis r3, kEnvConstColor__9CGraphics@ha /* 8030D5D0 0030A530 81 21 01 20 */ lwz r9, 0x120(r1) -/* 8030D5D4 0030A534 38 63 5E 70 */ addi r3, r3, lbl_805A5E70@l +/* 8030D5D4 0030A534 38 63 5E 70 */ addi r3, r3, kEnvConstColor__9CGraphics@l /* 8030D5D8 0030A538 81 01 01 1C */ lwz r8, 0x11c(r1) /* 8030D5DC 0030A53C 38 81 02 58 */ addi r4, r1, 0x258 /* 8030D5E0 0030A540 80 01 01 18 */ lwz r0, 0x118(r1) @@ -5105,9 +5092,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030D6AC 0030A60C 38 80 00 0F */ li r4, 0xf /* 8030D6B0 0030A610 4B FF BA 75 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030D6B4 0030A614 80 A1 01 04 */ lwz r5, 0x104(r1) -/* 8030D6B8 0030A618 3C 60 80 5A */ lis r3, lbl_805A5EBC@ha +/* 8030D6B8 0030A618 3C 60 80 5A */ lis r3, kEnvModulate__9CGraphics@ha /* 8030D6BC 0030A61C 81 21 01 00 */ lwz r9, 0x100(r1) -/* 8030D6C0 0030A620 38 63 5E BC */ addi r3, r3, lbl_805A5EBC@l +/* 8030D6C0 0030A620 38 63 5E BC */ addi r3, r3, kEnvModulate__9CGraphics@l /* 8030D6C4 0030A624 81 01 00 FC */ lwz r8, 0xfc(r1) /* 8030D6C8 0030A628 38 81 02 38 */ addi r4, r1, 0x238 /* 8030D6CC 0030A62C 80 01 00 F8 */ lwz r0, 0xf8(r1) @@ -5164,9 +5151,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030D798 0030A6F8 38 80 00 0A */ li r4, 0xa /* 8030D79C 0030A6FC 4B FF B9 89 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030D7A0 0030A700 80 A1 00 E4 */ lwz r5, 0xe4(r1) -/* 8030D7A4 0030A704 3C 60 80 5A */ lis r3, lbl_805A5F08@ha +/* 8030D7A4 0030A704 3C 60 80 5A */ lis r3, kEnvDecal__9CGraphics@ha /* 8030D7A8 0030A708 81 21 00 E0 */ lwz r9, 0xe0(r1) -/* 8030D7AC 0030A70C 38 63 5F 08 */ addi r3, r3, lbl_805A5F08@l +/* 8030D7AC 0030A70C 38 63 5F 08 */ addi r3, r3, kEnvDecal__9CGraphics@l /* 8030D7B0 0030A710 81 01 00 DC */ lwz r8, 0xdc(r1) /* 8030D7B4 0030A714 38 81 02 18 */ addi r4, r1, 0x218 /* 8030D7B8 0030A718 80 01 00 D8 */ lwz r0, 0xd8(r1) @@ -5223,9 +5210,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030D884 0030A7E4 38 80 00 0A */ li r4, 0xa /* 8030D888 0030A7E8 4B FF B8 9D */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030D88C 0030A7EC 80 A1 00 C4 */ lwz r5, 0xc4(r1) -/* 8030D890 0030A7F0 3C 60 80 5A */ lis r3, lbl_805A5F54@ha +/* 8030D890 0030A7F0 3C 60 80 5A */ lis r3, kEnvBlend__9CGraphics@ha /* 8030D894 0030A7F4 81 21 00 C0 */ lwz r9, 0xc0(r1) -/* 8030D898 0030A7F8 38 63 5F 54 */ addi r3, r3, lbl_805A5F54@l +/* 8030D898 0030A7F8 38 63 5F 54 */ addi r3, r3, kEnvBlend__9CGraphics@l /* 8030D89C 0030A7FC 81 01 00 BC */ lwz r8, 0xbc(r1) /* 8030D8A0 0030A800 38 81 01 F8 */ addi r4, r1, 0x1f8 /* 8030D8A4 0030A804 80 01 00 B8 */ lwz r0, 0xb8(r1) @@ -5282,9 +5269,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030D970 0030A8D0 38 80 00 0F */ li r4, 0xf /* 8030D974 0030A8D4 4B FF B7 B1 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030D978 0030A8D8 80 A1 00 A4 */ lwz r5, 0xa4(r1) -/* 8030D97C 0030A8DC 3C 60 80 5A */ lis r3, lbl_805A5FA0@ha +/* 8030D97C 0030A8DC 3C 60 80 5A */ lis r3, kEnvReplace__9CGraphics@ha /* 8030D980 0030A8E0 81 21 00 A0 */ lwz r9, 0xa0(r1) -/* 8030D984 0030A8E4 38 63 5F A0 */ addi r3, r3, lbl_805A5FA0@l +/* 8030D984 0030A8E4 38 63 5F A0 */ addi r3, r3, kEnvReplace__9CGraphics@l /* 8030D988 0030A8E8 81 01 00 9C */ lwz r8, 0x9c(r1) /* 8030D98C 0030A8EC 38 81 01 D8 */ addi r4, r1, 0x1d8 /* 8030D990 0030A8F0 80 01 00 98 */ lwz r0, 0x98(r1) @@ -5341,9 +5328,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030DA5C 0030A9BC 38 80 00 02 */ li r4, 2 /* 8030DA60 0030A9C0 4B FF B6 C5 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030DA64 0030A9C4 80 A1 00 84 */ lwz r5, 0x84(r1) -/* 8030DA68 0030A9C8 3C 60 80 4C */ lis r3, lbl_804BFCC0@ha +/* 8030DA68 0030A9C8 3C 60 80 4C */ lis r3, kEnvBlendCTandCConCF@ha /* 8030DA6C 0030A9CC 81 21 00 80 */ lwz r9, 0x80(r1) -/* 8030DA70 0030A9D0 38 63 FC C0 */ addi r3, r3, lbl_804BFCC0@l +/* 8030DA70 0030A9D0 38 63 FC C0 */ addi r3, r3, kEnvBlendCTandCConCF@l /* 8030DA74 0030A9D4 81 01 00 7C */ lwz r8, 0x7c(r1) /* 8030DA78 0030A9D8 38 81 01 B8 */ addi r4, r1, 0x1b8 /* 8030DA7C 0030A9DC 80 01 00 78 */ lwz r0, 0x78(r1) @@ -5400,9 +5387,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030DB48 0030AAA8 38 80 00 0F */ li r4, 0xf /* 8030DB4C 0030AAAC 4B FF B5 D9 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030DB50 0030AAB0 80 A1 00 64 */ lwz r5, 0x64(r1) -/* 8030DB54 0030AAB4 3C 60 80 5A */ lis r3, lbl_805A5FEC@ha +/* 8030DB54 0030AAB4 3C 60 80 5A */ lis r3, kEnvModulateAlpha__9CGraphics@ha /* 8030DB58 0030AAB8 81 21 00 60 */ lwz r9, 0x60(r1) -/* 8030DB5C 0030AABC 38 63 5F EC */ addi r3, r3, lbl_805A5FEC@l +/* 8030DB5C 0030AABC 38 63 5F EC */ addi r3, r3, kEnvModulateAlpha__9CGraphics@l /* 8030DB60 0030AAC0 81 01 00 5C */ lwz r8, 0x5c(r1) /* 8030DB64 0030AAC4 38 81 01 98 */ addi r4, r1, 0x198 /* 8030DB68 0030AAC8 80 01 00 58 */ lwz r0, 0x58(r1) @@ -5459,9 +5446,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030DC34 0030AB94 38 80 00 0F */ li r4, 0xf /* 8030DC38 0030AB98 4B FF B4 ED */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030DC3C 0030AB9C 80 A1 00 44 */ lwz r5, 0x44(r1) -/* 8030DC40 0030ABA0 3C 60 80 5A */ lis r3, lbl_805A6038@ha +/* 8030DC40 0030ABA0 3C 60 80 5A */ lis r3, kEnvModulateColor__9CGraphics@ha /* 8030DC44 0030ABA4 81 21 00 40 */ lwz r9, 0x40(r1) -/* 8030DC48 0030ABA8 38 63 60 38 */ addi r3, r3, lbl_805A6038@l +/* 8030DC48 0030ABA8 38 63 60 38 */ addi r3, r3, kEnvModulateColor__9CGraphics@l /* 8030DC4C 0030ABAC 81 01 00 3C */ lwz r8, 0x3c(r1) /* 8030DC50 0030ABB0 38 81 01 78 */ addi r4, r1, 0x178 /* 8030DC54 0030ABB4 80 01 00 38 */ lwz r0, 0x38(r1) @@ -5518,9 +5505,9 @@ __sinit_DolphinCGraphics_cpp: /* 8030DD20 0030AC80 38 80 00 0F */ li r4, 0xf /* 8030DD24 0030AC84 4B FF B4 01 */ bl __ct__Q213CTevCombiners8ColorVarFQ213CTevCombiners9EColorSrc /* 8030DD28 0030AC88 80 A1 00 24 */ lwz r5, 0x24(r1) -/* 8030DD2C 0030AC8C 3C 60 80 5A */ lis r3, lbl_805A6084@ha +/* 8030DD2C 0030AC8C 3C 60 80 5A */ lis r3, kEnvModulateColorByAlpha__9CGraphics@ha /* 8030DD30 0030AC90 81 21 00 20 */ lwz r9, 0x20(r1) -/* 8030DD34 0030AC94 38 63 60 84 */ addi r3, r3, lbl_805A6084@l +/* 8030DD34 0030AC94 38 63 60 84 */ addi r3, r3, kEnvModulateColorByAlpha__9CGraphics@l /* 8030DD38 0030AC98 81 01 00 1C */ lwz r8, 0x1c(r1) /* 8030DD3C 0030AC9C 38 81 01 58 */ addi r4, r1, 0x158 /* 8030DD40 0030ACA0 80 01 00 18 */ lwz r0, 0x18(r1) @@ -5532,29 +5519,29 @@ __sinit_DolphinCGraphics_cpp: /* 8030DD58 0030ACB8 91 01 01 60 */ stw r8, 0x160(r1) /* 8030DD5C 0030ACBC 90 01 01 64 */ stw r0, 0x164(r1) /* 8030DD60 0030ACC0 4B FF B4 F5 */ bl sub_80309254 -/* 8030DD64 0030ACC4 38 6D A7 B8 */ addi r3, r13, lbl_805A9378@sda21 +/* 8030DD64 0030ACC4 38 6D A7 B8 */ addi r3, r13, sRenderState__9CGraphics@sda21 /* 8030DD68 0030ACC8 4B FF B6 81 */ bl __ct__Q29CGraphics12CRenderStateFv -/* 8030DD6C 0030ACCC 3C 60 80 5A */ lis r3, lbl_805A60D0@ha +/* 8030DD6C 0030ACCC 3C 60 80 5A */ lis r3, mLightParams@ha /* 8030DD70 0030ACD0 3C 80 80 31 */ lis r4, __ct__14CGXLightParamsFv@ha -/* 8030DD74 0030ACD4 38 63 60 D0 */ addi r3, r3, lbl_805A60D0@l +/* 8030DD74 0030ACD4 38 63 60 D0 */ addi r3, r3, mLightParams@l /* 8030DD78 0030ACD8 38 A0 00 00 */ li r5, 0 /* 8030DD7C 0030ACDC 38 84 DE 38 */ addi r4, r4, __ct__14CGXLightParamsFv@l /* 8030DD80 0030ACE0 38 C0 00 14 */ li r6, 0x14 /* 8030DD84 0030ACE4 38 E0 00 08 */ li r7, 8 /* 8030DD88 0030ACE8 48 07 B9 C5 */ bl __construct_array /* 8030DD8C 0030ACEC C0 62 C7 F0 */ lfs f3, lbl_805AE510@sda21(r2) -/* 8030DD90 0030ACF0 3C E0 80 5A */ lis r7, lbl_805A61A0@ha +/* 8030DD90 0030ACF0 3C E0 80 5A */ lis r7, kDefaultPositionVector__9CGraphics@ha /* 8030DD94 0030ACF4 38 00 00 01 */ li r0, 1 -/* 8030DD98 0030ACF8 3C C0 80 5A */ lis r6, lbl_805A61AC@ha -/* 8030DD9C 0030ACFC D4 67 61 A0 */ stfsu f3, lbl_805A61A0@l(r7) -/* 8030DDA0 0030AD00 3C A0 80 5A */ lis r5, lbl_805A61B8@ha +/* 8030DD98 0030ACF8 3C C0 80 5A */ lis r6, kDefaultDirectionVector__9CGraphics@ha +/* 8030DD9C 0030ACFC D4 67 61 A0 */ stfsu f3, kDefaultPositionVector__9CGraphics@l(r7) +/* 8030DDA0 0030AD00 3C A0 80 5A */ lis r5, mProj__9CGraphics@ha /* 8030DDA4 0030AD04 C0 42 C8 10 */ lfs f2, lbl_805AE530@sda21(r2) -/* 8030DDA8 0030AD08 3C 60 80 5A */ lis r3, lbl_805A61D4@ha -/* 8030DDAC 0030AD0C 9C 05 61 B8 */ stbu r0, lbl_805A61B8@l(r5) +/* 8030DDA8 0030AD08 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha +/* 8030DDAC 0030AD0C 9C 05 61 B8 */ stbu r0, mProj__9CGraphics@l(r5) /* 8030DDB0 0030AD10 3C 80 80 5A */ lis r4, sIdentity__12CTransform4f@ha /* 8030DDB4 0030AD14 C0 22 C8 14 */ lfs f1, lbl_805AE534@sda21(r2) -/* 8030DDB8 0030AD18 38 63 61 D4 */ addi r3, r3, lbl_805A61D4@l -/* 8030DDBC 0030AD1C D4 66 61 AC */ stfsu f3, lbl_805A61AC@l(r6) +/* 8030DDB8 0030AD18 38 63 61 D4 */ addi r3, r3, mViewMatrix__9CGraphics@l +/* 8030DDBC 0030AD1C D4 66 61 AC */ stfsu f3, kDefaultDirectionVector__9CGraphics@l(r6) /* 8030DDC0 0030AD20 38 84 66 70 */ addi r4, r4, sIdentity__12CTransform4f@l /* 8030DDC4 0030AD24 C0 02 C8 34 */ lfs f0, lbl_805AE554@sda21(r2) /* 8030DDC8 0030AD28 D0 67 00 04 */ stfs f3, 4(r7) @@ -5568,17 +5555,17 @@ __sinit_DolphinCGraphics_cpp: /* 8030DDE8 0030AD48 D0 45 00 14 */ stfs f2, 0x14(r5) /* 8030DDEC 0030AD4C D0 05 00 18 */ stfs f0, 0x18(r5) /* 8030DDF0 0030AD50 48 00 4D 85 */ bl __ct__12CTransform4fFRC12CTransform4f -/* 8030DDF4 0030AD54 3C 60 80 5A */ lis r3, lbl_805A6204@ha +/* 8030DDF4 0030AD54 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha /* 8030DDF8 0030AD58 3C 80 80 5A */ lis r4, sIdentity__12CTransform4f@ha -/* 8030DDFC 0030AD5C 38 63 62 04 */ addi r3, r3, lbl_805A6204@l +/* 8030DDFC 0030AD5C 38 63 62 04 */ addi r3, r3, mModelMatrix__9CGraphics@l /* 8030DE00 0030AD60 38 84 66 70 */ addi r4, r4, sIdentity__12CTransform4f@l /* 8030DE04 0030AD64 48 00 4D 71 */ bl __ct__12CTransform4fFRC12CTransform4f /* 8030DE08 0030AD68 48 03 C1 AD */ bl Black__6CColorFv /* 8030DE0C 0030AD6C 80 03 00 00 */ lwz r0, 0(r3) -/* 8030DE10 0030AD70 3C 60 80 5A */ lis r3, lbl_805A6234@ha +/* 8030DE10 0030AD70 3C 60 80 5A */ lis r3, mViewPoint__9CGraphics@ha /* 8030DE14 0030AD74 C0 02 C7 F0 */ lfs f0, lbl_805AE510@sda21(r2) -/* 8030DE18 0030AD78 90 0D A7 F8 */ stw r0, lbl_805A93B8@sda21(r13) -/* 8030DE1C 0030AD7C D4 03 62 34 */ stfsu f0, lbl_805A6234@l(r3) +/* 8030DE18 0030AD78 90 0D A7 F8 */ stw r0, mClearColor__9CGraphics@sda21(r13) +/* 8030DE1C 0030AD7C D4 03 62 34 */ stfsu f0, mViewPoint__9CGraphics@l(r3) /* 8030DE20 0030AD80 D0 03 00 04 */ stfs f0, 4(r3) /* 8030DE24 0030AD84 D0 03 00 08 */ stfs f0, 8(r3) /* 8030DE28 0030AD88 80 01 04 24 */ lwz r0, 0x424(r1) diff --git a/asm/Kyoto/Particles/CElementGen.s b/asm/Kyoto/Particles/CElementGen.s index 3649de71..b0151f79 100644 --- a/asm/Kyoto/Particles/CElementGen.s +++ b/asm/Kyoto/Particles/CElementGen.s @@ -1218,9 +1218,9 @@ lbl_80318054: /* 803180B4 00315014 38 80 00 00 */ li r4, 0 /* 803180B8 00315018 38 A0 00 01 */ li r5, 1 /* 803180BC 0031501C 4B FF 76 81 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode -/* 803180C0 00315020 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 803180C0 00315020 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 803180C4 00315024 38 60 00 00 */ li r3, 0 -/* 803180C8 00315028 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 803180C8 00315028 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 803180CC 0031502C 4B FF 21 ED */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 803180D0 00315030 56 80 06 3F */ clrlwi. r0, r20, 0x18 /* 803180D4 00315034 41 82 00 D8 */ beq lbl_803181AC @@ -1278,7 +1278,7 @@ lbl_80318054: /* 803181A4 00315104 4B FF 0C 71 */ bl SetNumTexGens__3CGXFUc /* 803181A8 00315108 48 00 00 10 */ b lbl_803181B8 lbl_803181AC: -/* 803181AC 0031510C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 803181AC 0031510C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 803181B0 00315110 38 60 00 01 */ li r3, 1 /* 803181B4 00315114 4B FF 21 05 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_803181B8: @@ -1304,10 +1304,10 @@ lbl_803181B8: /* 80318204 00315164 48 02 8C 3D */ bl __dt__6CTokenFv /* 80318208 00315168 48 00 00 1C */ b lbl_80318224 lbl_8031820C: -/* 8031820C 0031516C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8031820C 0031516C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80318210 00315170 38 60 00 00 */ li r3, 0 /* 80318214 00315174 4B FF 20 A5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80318218 00315178 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80318218 00315178 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8031821C 0031517C 38 60 00 01 */ li r3, 1 /* 80318220 00315180 4B FF 20 99 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_80318224: @@ -1925,9 +1925,9 @@ RenderLines__11CElementGenFv: /* 80318B4C 00315AAC 7C A0 03 78 */ or r0, r5, r0 /* 80318B50 00315AB0 54 1E 0F FE */ srwi r30, r0, 0x1f /* 80318B54 00315AB4 4B FF 9B 2D */ bl __ct__13CGlobalRandomFR9CRandom16 -/* 80318B58 00315AB8 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 80318B58 00315AB8 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 80318B5C 00315ABC 38 61 02 34 */ addi r3, r1, 0x234 -/* 80318B60 00315AC0 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 80318B60 00315AC0 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 80318B64 00315AC4 4B FF A0 11 */ bl __ct__12CTransform4fFRC12CTransform4f /* 80318B68 00315AC8 3C 80 80 5A */ lis r4, sZeroVector__9CVector3f@ha /* 80318B6C 00315ACC 38 61 01 A4 */ addi r3, r1, 0x1a4 @@ -2042,9 +2042,9 @@ lbl_80318CBC: /* 80318D14 00315C74 38 80 00 00 */ li r4, 0 /* 80318D18 00315C78 38 A0 00 01 */ li r5, 1 /* 80318D1C 00315C7C 4B FF 6A 21 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode -/* 80318D20 00315C80 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 80318D20 00315C80 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80318D24 00315C84 38 60 00 00 */ li r3, 0 -/* 80318D28 00315C88 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80318D28 00315C88 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80318D2C 00315C8C 4B FF 15 8D */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80318D30 00315C90 28 1E 00 00 */ cmplwi r30, 0 /* 80318D34 00315C94 41 82 01 18 */ beq lbl_80318E4C @@ -2119,7 +2119,7 @@ lbl_80318E38: /* 80318E44 00315DA4 4B FF 14 75 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80318E48 00315DA8 48 00 00 10 */ b lbl_80318E58 lbl_80318E4C: -/* 80318E4C 00315DAC 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80318E4C 00315DAC 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80318E50 00315DB0 38 60 00 01 */ li r3, 1 /* 80318E54 00315DB4 4B FF 14 65 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_80318E58: @@ -2147,10 +2147,10 @@ lbl_80318E58: /* 80318EAC 00315E0C 48 02 7F 95 */ bl __dt__6CTokenFv /* 80318EB0 00315E10 48 00 00 1C */ b lbl_80318ECC lbl_80318EB4: -/* 80318EB4 00315E14 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80318EB4 00315E14 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80318EB8 00315E18 38 60 00 00 */ li r3, 0 /* 80318EBC 00315E1C 4B FF 13 FD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80318EC0 00315E20 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80318EC0 00315E20 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80318EC4 00315E24 38 60 00 01 */ li r3, 1 /* 80318EC8 00315E28 4B FF 13 F1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_80318ECC: @@ -2454,9 +2454,9 @@ RenderParticlesIndirectTexture__11CElementGenFv: /* 8031932C 0031628C F2 C1 03 18 */ psq_st f22, 792(r1), 0, qr0 /* 80319330 00316290 BD C1 02 C8 */ stmw r14, 0x2c8(r1) /* 80319334 00316294 7C 3F 0B 78 */ mr r31, r1 -/* 80319338 00316298 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 80319338 00316298 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 8031933C 0031629C 7C 7E 1B 78 */ mr r30, r3 -/* 80319340 003162A0 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 80319340 003162A0 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 80319344 003162A4 38 7F 02 8C */ addi r3, r31, 0x28c /* 80319348 003162A8 4B FF 98 2D */ bl __ct__12CTransform4fFRC12CTransform4f /* 8031934C 003162AC 3C 80 80 5A */ lis r4, sZeroVector__9CVector3f@ha @@ -3035,7 +3035,7 @@ lbl_80319B98: /* 80319C00 00316B60 C3 7F 01 34 */ lfs f27, 0x134(r31) /* 80319C04 00316B64 C3 5F 01 38 */ lfs f26, 0x138(r31) /* 80319C08 00316B68 41 82 01 8C */ beq lbl_80319D94 -/* 80319C0C 00316B6C 81 ED A8 28 */ lwz r15, lbl_805A93E8@sda21(r13) +/* 80319C0C 00316B6C 81 ED A8 28 */ lwz r15, mpSpareBuffer__9CGraphics@sda21(r13) /* 80319C10 00316B70 54 63 04 3E */ clrlwi r3, r3, 0x10 /* 80319C14 00316B74 54 04 04 3E */ clrlwi r4, r0, 0x10 /* 80319C18 00316B78 54 A5 04 3E */ clrlwi r5, r5, 0x10 @@ -3046,7 +3046,7 @@ lbl_80319B98: /* 80319C2C 00316B8C 38 A0 00 04 */ li r5, 4 /* 80319C30 00316B90 38 C0 00 00 */ li r6, 0 /* 80319C34 00316B94 48 05 F2 4D */ bl GXSetTexCopyDst -/* 80319C38 00316B98 83 0D A8 24 */ lwz r24, lbl_805A93E4@sda21(r13) +/* 80319C38 00316B98 83 0D A8 24 */ lwz r24, mSpareBufferSize__9CGraphics@sda21(r13) /* 80319C3C 00316B9C 56 C3 04 3E */ clrlwi r3, r22, 0x10 /* 80319C40 00316BA0 56 E4 04 3E */ clrlwi r4, r23, 0x10 /* 80319C44 00316BA4 38 A0 00 04 */ li r5, 4 @@ -3195,9 +3195,9 @@ sub_80319e3c: /* 80319E6C 00316DCC F3 61 01 78 */ psq_st f27, 376(r1), 0, qr0 /* 80319E70 00316DD0 BE 01 01 30 */ stmw r16, 0x130(r1) /* 80319E74 00316DD4 7C 3F 0B 78 */ mr r31, r1 -/* 80319E78 00316DD8 3C A0 80 5A */ lis r5, lbl_805A61D4@ha +/* 80319E78 00316DD8 3C A0 80 5A */ lis r5, mViewMatrix__9CGraphics@ha /* 80319E7C 00316DDC 7C 7E 1B 78 */ mr r30, r3 -/* 80319E80 00316DE0 38 05 61 D4 */ addi r0, r5, lbl_805A61D4@l +/* 80319E80 00316DE0 38 05 61 D4 */ addi r0, r5, mViewMatrix__9CGraphics@l /* 80319E84 00316DE4 7C 93 23 78 */ mr r19, r4 /* 80319E88 00316DE8 7C 04 03 78 */ mr r4, r0 /* 80319E8C 00316DEC 38 7F 00 F4 */ addi r3, r31, 0xf4 @@ -3233,11 +3233,11 @@ sub_80319e3c: /* 80319F04 00316E64 38 C0 00 07 */ li r6, 7 /* 80319F08 00316E68 38 E0 00 00 */ li r7, 0 /* 80319F0C 00316E6C 4B FF 1B 1D */ bl SetAlphaCompare__9CGraphicsF13ERglAlphaFuncUc11ERglAlphaOp13ERglAlphaFuncUc -/* 80319F10 00316E70 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 80319F10 00316E70 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80319F14 00316E74 38 60 00 00 */ li r3, 0 -/* 80319F18 00316E78 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80319F18 00316E78 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80319F1C 00316E7C 4B FF 03 9D */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80319F20 00316E80 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80319F20 00316E80 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80319F24 00316E84 38 60 00 01 */ li r3, 1 /* 80319F28 00316E88 4B FF 03 91 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80319F2C 00316E8C 8B AD A8 B8 */ lbz r29, lbl_805A9478@sda21(r13) @@ -3736,8 +3736,8 @@ lbl_8031A688: /* 8031A688 003175E8 38 60 00 00 */ li r3, 0 /* 8031A68C 003175EC 4B FF 13 E5 */ bl SetCullMode__9CGraphicsF12ERglCullMode /* 8031A690 003175F0 80 DE 03 38 */ lwz r6, 0x338(r30) -/* 8031A694 003175F4 3C 60 80 5A */ lis r3, lbl_805A61D4@ha -/* 8031A698 003175F8 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 8031A694 003175F4 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha +/* 8031A698 003175F8 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 8031A69C 003175FC 20 A6 FF FF */ subfic r5, r6, -1 /* 8031A6A0 00317600 38 06 00 01 */ addi r0, r6, 1 /* 8031A6A4 00317604 7C A0 03 78 */ or r0, r5, r0 @@ -3877,9 +3877,9 @@ lbl_8031A858: /* 8031A8B0 00317810 38 80 00 00 */ li r4, 0 /* 8031A8B4 00317814 38 A0 00 01 */ li r5, 1 /* 8031A8B8 00317818 4B FF 4E 85 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode -/* 8031A8BC 0031781C 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 8031A8BC 0031781C 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 8031A8C0 00317820 38 60 00 00 */ li r3, 0 -/* 8031A8C4 00317824 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 8031A8C4 00317824 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 8031A8C8 00317828 4B FE F9 F1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8031A8CC 0031782C 28 14 00 00 */ cmplwi r20, 0 /* 8031A8D0 00317830 41 82 01 18 */ beq lbl_8031A9E8 @@ -3954,7 +3954,7 @@ lbl_8031A9D4: /* 8031A9E0 00317940 4B FE F8 D9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8031A9E4 00317944 48 00 00 10 */ b lbl_8031A9F4 lbl_8031A9E8: -/* 8031A9E8 00317948 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8031A9E8 00317948 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8031A9EC 0031794C 38 60 00 01 */ li r3, 1 /* 8031A9F0 00317950 4B FE F8 C9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_8031A9F4: @@ -3982,10 +3982,10 @@ lbl_8031A9F4: /* 8031AA48 003179A8 48 02 63 F9 */ bl __dt__6CTokenFv /* 8031AA4C 003179AC 48 00 00 1C */ b lbl_8031AA68 lbl_8031AA50: -/* 8031AA50 003179B0 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8031AA50 003179B0 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8031AA54 003179B4 38 60 00 00 */ li r3, 0 /* 8031AA58 003179B8 4B FE F8 61 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8031AA5C 003179BC 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8031AA5C 003179BC 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8031AA60 003179C0 38 60 00 01 */ li r3, 1 /* 8031AA64 003179C4 4B FE F8 55 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_8031AA68: @@ -5802,7 +5802,7 @@ Render__11CElementGenFv: /* 8031C564 003194C4 7C 7D 1B 78 */ mr r29, r3 /* 8031C568 003194C8 93 81 00 20 */ stw r28, 0x20(r1) /* 8031C56C 003194CC 48 06 8E 3D */ bl OSGetTime -/* 8031C570 003194D0 88 0D A8 16 */ lbz r0, lbl_805A93D6@sda21(r13) +/* 8031C570 003194D0 88 0D A8 16 */ lbz r0, mLightActive__9CGraphics@sda21(r13) /* 8031C574 003194D4 7C 9E 23 78 */ mr r30, r4 /* 8031C578 003194D8 7C 7F 1B 78 */ mr r31, r3 /* 8031C57C 003194DC 98 1D 02 74 */ stb r0, 0x274(r29) diff --git a/asm/Kyoto/Particles/CParticleSwoosh.s b/asm/Kyoto/Particles/CParticleSwoosh.s index 81d21a1a..25fc227c 100644 --- a/asm/Kyoto/Particles/CParticleSwoosh.s +++ b/asm/Kyoto/Particles/CParticleSwoosh.s @@ -3094,9 +3094,9 @@ Render2SidedNoSplineNoGaps__15CParticleSwooshFv: /* 8032D3F8 0032A358 38 61 01 F4 */ addi r3, r1, 0x1f4 /* 8032D3FC 0032A35C 38 81 01 94 */ addi r4, r1, 0x194 /* 8032D400 0032A360 4B FE 57 75 */ bl __ct__12CTransform4fFRC12CTransform4f -/* 8032D404 0032A364 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 8032D404 0032A364 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 8032D408 0032A368 38 61 00 D4 */ addi r3, r1, 0xd4 -/* 8032D40C 0032A36C 38 A4 61 D4 */ addi r5, r4, lbl_805A61D4@l +/* 8032D40C 0032A36C 38 A4 61 D4 */ addi r5, r4, mViewMatrix__9CGraphics@l /* 8032D410 0032A370 38 81 01 F4 */ addi r4, r1, 0x1f4 /* 8032D414 0032A374 4B FE 55 3D */ bl __ml__12CTransform4fCFRC12CTransform4f /* 8032D418 0032A378 38 61 01 C4 */ addi r3, r1, 0x1c4 @@ -3838,17 +3838,17 @@ lbl_8032DEE0: /* 8032DF10 0032AE70 EC 02 00 24 */ fdivs f0, f2, f0 /* 8032DF14 0032AE74 D0 1D 01 E8 */ stfs f0, 0x1e8(r29) lbl_8032DF18: -/* 8032DF18 0032AE78 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 8032DF18 0032AE78 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 8032DF1C 0032AE7C 38 60 00 00 */ li r3, 0 -/* 8032DF20 0032AE80 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 8032DF20 0032AE80 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 8032DF24 0032AE84 4B FD C3 95 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8032DF28 0032AE88 48 00 00 10 */ b lbl_8032DF38 lbl_8032DF2C: -/* 8032DF2C 0032AE8C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8032DF2C 0032AE8C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8032DF30 0032AE90 38 60 00 00 */ li r3, 0 /* 8032DF34 0032AE94 4B FD C3 85 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_8032DF38: -/* 8032DF38 0032AE98 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8032DF38 0032AE98 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8032DF3C 0032AE9C 38 60 00 01 */ li r3, 1 /* 8032DF40 0032AEA0 4B FD C3 79 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8032DF44 0032AEA4 80 1D 01 B8 */ lwz r0, 0x1b8(r29) diff --git a/asm/MetaRender/CCubeRenderer.s b/asm/MetaRender/CCubeRenderer.s index 45eac493..6314ebf3 100644 --- a/asm/MetaRender/CCubeRenderer.s +++ b/asm/MetaRender/CCubeRenderer.s @@ -447,9 +447,9 @@ AllocatePhazonSuitMaskTexture__13CCubeRendererFv: /* 802B5FB4 002B2F14 48 05 F8 B9 */ bl __nw__FUlPCcPCc /* 802B5FB8 002B2F18 7C 7F 1B 79 */ or. r31, r3, r3 /* 802B5FBC 002B2F1C 41 82 00 34 */ beq lbl_802B5FF0 -/* 802B5FC0 002B2F20 3C A0 80 3F */ lis r5, lbl_803ED910@ha +/* 802B5FC0 002B2F20 3C A0 80 3F */ lis r5, mViewport__9CGraphics@ha /* 802B5FC4 002B2F24 38 80 00 01 */ li r4, 1 -/* 802B5FC8 002B2F28 38 C5 D9 10 */ addi r6, r5, lbl_803ED910@l +/* 802B5FC8 002B2F28 38 C5 D9 10 */ addi r6, r5, mViewport__9CGraphics@l /* 802B5FCC 002B2F2C 38 E0 00 01 */ li r7, 1 /* 802B5FD0 002B2F30 80 A6 00 08 */ lwz r5, 8(r6) /* 802B5FD4 002B2F34 80 06 00 0C */ lwz r0, 0xc(r6) @@ -505,9 +505,9 @@ lbl_802B6000: /* 802B6088 002B2FE8 80 1C 03 10 */ lwz r0, 0x310(r28) /* 802B608C 002B2FEC 2C 00 00 00 */ cmpwi r0, 0 /* 802B6090 002B2FF0 41 82 01 64 */ beq lbl_802B61F4 -/* 802B6094 002B2FF4 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802B6094 002B2FF4 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802B6098 002B2FF8 38 61 00 28 */ addi r3, r1, 0x28 -/* 802B609C 002B2FFC 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802B609C 002B2FFC 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802B60A0 002B3000 48 05 CA D5 */ bl __ct__12CTransform4fFRC12CTransform4f /* 802B60A4 002B3004 48 05 3D B9 */ bl GetProjectionState__9CGraphicsFv /* 802B60A8 002B3008 88 03 00 00 */ lbz r0, 0(r3) @@ -527,9 +527,9 @@ lbl_802B6000: /* 802B60E0 002B3040 80 BC 03 14 */ lwz r5, 0x314(r28) /* 802B60E4 002B3044 28 05 00 00 */ cmplwi r5, 0 /* 802B60E8 002B3048 41 82 01 18 */ beq lbl_802B6200 -/* 802B60EC 002B304C 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 802B60EC 002B304C 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 802B60F0 002B3050 A8 85 00 04 */ lha r4, 4(r5) -/* 802B60F4 002B3054 38 63 D9 10 */ addi r3, r3, lbl_803ED910@l +/* 802B60F4 002B3054 38 63 D9 10 */ addi r3, r3, mViewport__9CGraphics@l /* 802B60F8 002B3058 80 03 00 08 */ lwz r0, 8(r3) /* 802B60FC 002B305C 7C 00 16 70 */ srawi r0, r0, 2 /* 802B6100 002B3060 7C 04 00 00 */ cmpw r4, r0 @@ -630,9 +630,9 @@ ReallyDrawPhazonSuitIndirectEffect__13CCubeRendererFRC6CColorRC8CTextureRC8CText /* 802B625C 002B31BC DB A1 01 30 */ stfd f29, 0x130(r1) /* 802B6260 002B31C0 F3 A1 01 38 */ psq_st f29, 312(r1), 0, qr0 /* 802B6264 002B31C4 BF 41 01 18 */ stmw r26, 0x118(r1) -/* 802B6268 002B31C8 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 802B6268 002B31C8 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 802B626C 002B31CC 7C 9D 23 78 */ mr r29, r4 -/* 802B6270 002B31D0 38 63 D9 10 */ addi r3, r3, lbl_803ED910@l +/* 802B6270 002B31D0 38 63 D9 10 */ addi r3, r3, mViewport__9CGraphics@l /* 802B6274 002B31D4 FF A0 08 90 */ fmr f29, f1 /* 802B6278 002B31D8 FF C0 10 90 */ fmr f30, f2 /* 802B627C 002B31DC 83 E3 00 08 */ lwz r31, 8(r3) @@ -681,7 +681,7 @@ ReallyDrawPhazonSuitIndirectEffect__13CCubeRendererFRC6CColorRC8CTextureRC8CText /* 802B6328 002B3288 41 81 00 08 */ bgt lbl_802B6330 /* 802B632C 002B328C 48 00 05 E0 */ b lbl_802B690C lbl_802B6330: -/* 802B6330 002B3290 80 CD A8 28 */ lwz r6, lbl_805A93E8@sda21(r13) +/* 802B6330 002B3290 80 CD A8 28 */ lwz r6, mpSpareBuffer__9CGraphics@sda21(r13) /* 802B6334 002B3294 38 A0 00 04 */ li r5, 4 /* 802B6338 002B3298 80 E2 C7 A8 */ lwz r7, lbl_805AE4C8@sda21(r2) /* 802B633C 002B329C 48 05 3C E5 */ bl LoadDolphinSpareTexture__9CGraphicsFii9_GXTexFmtPv11_GXTexMapID @@ -889,8 +889,8 @@ lbl_802B6568: /* 802B6654 002B35B4 48 05 17 D5 */ bl SetVtxDescv__3CGXFPC14_GXVtxDescList /* 802B6658 002B35B8 48 05 38 05 */ bl GetProjectionState__9CGraphicsFv /* 802B665C 002B35BC 88 03 00 00 */ lbz r0, 0(r3) -/* 802B6660 002B35C0 3C 80 80 5A */ lis r4, lbl_805A61D4@ha -/* 802B6664 002B35C4 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802B6660 002B35C0 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha +/* 802B6664 002B35C4 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802B6668 002B35C8 98 01 00 64 */ stb r0, 0x64(r1) /* 802B666C 002B35CC C0 03 00 04 */ lfs f0, 4(r3) /* 802B6670 002B35D0 D0 01 00 68 */ stfs f0, 0x68(r1) @@ -1240,9 +1240,9 @@ DoPhazonSuitIndirectAlphaBlur__13CCubeRendererFff: /* 802B6BB4 002B3B14 C0 22 C2 74 */ lfs f1, lbl_805ADF94@sda21(r2) /* 802B6BB8 002B3B18 FF C0 10 90 */ fmr f30, f2 /* 802B6BBC 002B3B1C C0 42 C2 70 */ lfs f2, lbl_805ADF90@sda21(r2) -/* 802B6BC0 002B3B20 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 802B6BC0 002B3B20 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 802B6BC4 002B3B24 FC 80 08 90 */ fmr f4, f1 -/* 802B6BC8 002B3B28 38 84 D9 10 */ addi r4, r4, lbl_803ED910@l +/* 802B6BC8 002B3B28 38 84 D9 10 */ addi r4, r4, mViewport__9CGraphics@l /* 802B6BCC 002B3B2C FC 60 10 90 */ fmr f3, f2 /* 802B6BD0 002B3B30 FC C0 10 90 */ fmr f6, f2 /* 802B6BD4 002B3B34 83 A4 00 08 */ lwz r29, 8(r4) @@ -1730,9 +1730,9 @@ lbl_802B7244: CopyTex__13CCubeRendererFibPv8GXTexFmtb: /* 802B734C 002B42AC 94 21 FF D0 */ stwu r1, -0x30(r1) /* 802B7350 002B42B0 7C 08 02 A6 */ mflr r0 -/* 802B7354 002B42B4 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 802B7354 002B42B4 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 802B7358 002B42B8 90 01 00 34 */ stw r0, 0x34(r1) -/* 802B735C 002B42BC 38 63 D9 10 */ addi r3, r3, lbl_803ED910@l +/* 802B735C 002B42BC 38 63 D9 10 */ addi r3, r3, mViewport__9CGraphics@l /* 802B7360 002B42C0 BF 21 00 14 */ stmw r25, 0x14(r1) /* 802B7364 002B42C4 7C 9A 23 78 */ mr r26, r4 /* 802B7368 002B42C8 7C BB 2B 78 */ mr r27, r5 @@ -1788,7 +1788,7 @@ lbl_802B73EC: /* 802B7420 002B4380 7F 83 E3 78 */ mr r3, r28 /* 802B7424 002B4384 48 00 00 08 */ b lbl_802B742C lbl_802B7428: -/* 802B7428 002B4388 80 6D A8 28 */ lwz r3, lbl_805A93E8@sda21(r13) +/* 802B7428 002B4388 80 6D A8 28 */ lwz r3, mpSpareBuffer__9CGraphics@sda21(r13) lbl_802B742C: /* 802B742C 002B438C 57 C4 06 3E */ clrlwi r4, r30, 0x18 /* 802B7430 002B4390 48 0C 21 05 */ bl GXCopyTex @@ -1803,8 +1803,8 @@ lbl_802B742C: .global GetRenderToTexBuffer__13CCubeRendererFi GetRenderToTexBuffer__13CCubeRendererFi: -/* 802B7454 002B43B4 80 0D A8 24 */ lwz r0, lbl_805A93E4@sda21(r13) -/* 802B7458 002B43B8 80 8D A8 28 */ lwz r4, lbl_805A93E8@sda21(r13) +/* 802B7454 002B43B4 80 0D A8 24 */ lwz r0, mSpareBufferSize__9CGraphics@sda21(r13) +/* 802B7458 002B43B8 80 8D A8 28 */ lwz r4, mpSpareBuffer__9CGraphics@sda21(r13) /* 802B745C 002B43BC 7C 03 01 D6 */ mullw r0, r3, r0 /* 802B7460 002B43C0 54 00 E1 3E */ srwi r0, r0, 4 /* 802B7464 002B43C4 7C 64 02 14 */ add r3, r4, r0 @@ -3070,13 +3070,13 @@ sub_802b85cc: /* 802B8628 002B5588 38 80 00 00 */ li r4, 0 /* 802B862C 002B558C 38 A0 00 00 */ li r5, 0 /* 802B8630 002B5590 48 05 71 0D */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode -/* 802B8634 002B5594 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802B8634 002B5594 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802B8638 002B5598 38 61 00 0C */ addi r3, r1, 0xc -/* 802B863C 002B559C 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802B863C 002B559C 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802B8640 002B55A0 48 05 A6 5D */ bl GetQuickInverse__12CTransform4fCFv -/* 802B8644 002B55A4 3C 80 80 5A */ lis r4, lbl_805A6204@ha +/* 802B8644 002B55A4 3C 80 80 5A */ lis r4, mModelMatrix__9CGraphics@ha /* 802B8648 002B55A8 38 61 00 3C */ addi r3, r1, 0x3c -/* 802B864C 002B55AC 38 A4 62 04 */ addi r5, r4, lbl_805A6204@l +/* 802B864C 002B55AC 38 A4 62 04 */ addi r5, r4, mModelMatrix__9CGraphics@l /* 802B8650 002B55B0 38 81 00 0C */ addi r4, r1, 0xc /* 802B8654 002B55B4 48 05 A8 DD */ bl MultiplyIgnoreTranslation__12CTransform4fCFRC12CTransform4f /* 802B8658 002B55B8 38 61 00 6C */ addi r3, r1, 0x6c @@ -3448,9 +3448,9 @@ sub_802b8b48: /* 802B8B60 002B5AC0 F3 C1 00 B8 */ psq_st f30, 184(r1), 0, qr0 /* 802B8B64 002B5AC4 93 E1 00 AC */ stw r31, 0xac(r1) /* 802B8B68 002B5AC8 93 C1 00 A8 */ stw r30, 0xa8(r1) -/* 802B8B6C 002B5ACC 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 802B8B6C 002B5ACC 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 802B8B70 002B5AD0 7C BE 2B 78 */ mr r30, r5 -/* 802B8B74 002B5AD4 3B E3 61 D4 */ addi r31, r3, lbl_805A61D4@l +/* 802B8B74 002B5AD4 3B E3 61 D4 */ addi r31, r3, mViewMatrix__9CGraphics@l /* 802B8B78 002B5AD8 7C 85 23 78 */ mr r5, r4 /* 802B8B7C 002B5ADC C3 DF 00 1C */ lfs f30, 0x1c(r31) /* 802B8B80 002B5AE0 38 61 00 5C */ addi r3, r1, 0x5c @@ -3771,9 +3771,9 @@ ReallyRenderFogVolume__13CCubeRendererFRC6CColorRC6CAABoxPC6CModelPC13CSkinnedMo /* 802B8FF4 002B5F54 DB 01 03 A0 */ stfd f24, 0x3a0(r1) /* 802B8FF8 002B5F58 F3 01 03 A8 */ psq_st f24, 936(r1), 0, qr0 /* 802B8FFC 002B5F5C BD C1 03 58 */ stmw r14, 0x358(r1) -/* 802B9000 002B5F60 80 0D A8 28 */ lwz r0, lbl_805A93E8@sda21(r13) -/* 802B9004 002B5F64 3D 00 80 3F */ lis r8, lbl_803ED910@ha -/* 802B9008 002B5F68 39 E8 D9 10 */ addi r15, r8, lbl_803ED910@l +/* 802B9000 002B5F60 80 0D A8 28 */ lwz r0, mpSpareBuffer__9CGraphics@sda21(r13) +/* 802B9004 002B5F64 3D 00 80 3F */ lis r8, mViewport__9CGraphics@ha +/* 802B9008 002B5F68 39 E8 D9 10 */ addi r15, r8, mViewport__9CGraphics@l /* 802B900C 002B5F6C C3 62 C2 74 */ lfs f27, lbl_805ADF94@sda21(r2) /* 802B9010 002B5F70 7C 08 03 78 */ mr r8, r0 /* 802B9014 002B5F74 90 01 03 2C */ stw r0, 0x32c(r1) @@ -3790,7 +3790,7 @@ ReallyRenderFogVolume__13CCubeRendererFRC6CColorRC6CAABoxPC6CModelPC13CSkinnedMo /* 802B9040 002B5FA0 80 0F 00 04 */ lwz r0, 4(r15) /* 802B9044 002B5FA4 38 A5 30 00 */ addi r5, r5, 0x3000 /* 802B9048 002B5FA8 81 8F 00 0C */ lwz r12, 0xc(r15) -/* 802B904C 002B5FAC 3D 20 80 5A */ lis r9, lbl_805A6204@ha +/* 802B904C 002B5FAC 3D 20 80 5A */ lis r9, mModelMatrix__9CGraphics@ha /* 802B9050 002B5FB0 90 01 03 34 */ stw r0, 0x334(r1) /* 802B9054 002B5FB4 38 08 65 70 */ addi r0, r8, lbl_803D6570@l /* 802B9058 002B5FB8 FF 40 D8 90 */ fmr f26, f27 @@ -3804,7 +3804,7 @@ ReallyRenderFogVolume__13CCubeRendererFRC6CColorRC6CAABoxPC6CModelPC13CSkinnedMo /* 802B9078 002B5FD8 FF 00 D8 90 */ fmr f24, f27 /* 802B907C 002B5FDC 3A 00 00 00 */ li r16, 0 /* 802B9080 002B5FE0 90 61 00 10 */ stw r3, 0x10(r1) -/* 802B9084 002B5FE4 38 69 62 04 */ addi r3, r9, lbl_805A6204@l +/* 802B9084 002B5FE4 38 69 62 04 */ addi r3, r9, mModelMatrix__9CGraphics@l /* 802B9088 002B5FE8 39 E0 01 40 */ li r15, 0x140 /* 802B908C 002B5FEC 3A 20 00 E0 */ li r17, 0xe0 /* 802B9090 002B5FF0 90 81 00 14 */ stw r4, 0x14(r1) @@ -3817,9 +3817,9 @@ ReallyRenderFogVolume__13CCubeRendererFRC6CColorRC6CAABoxPC6CModelPC13CSkinnedMo /* 802B90AC 002B600C 98 01 03 24 */ stb r0, 0x324(r1) /* 802B90B0 002B6010 90 A1 03 28 */ stw r5, 0x328(r1) /* 802B90B4 002B6014 48 05 9A C1 */ bl __ct__12CTransform4fFRC12CTransform4f -/* 802B90B8 002B6018 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802B90B8 002B6018 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802B90BC 002B601C 38 61 02 14 */ addi r3, r1, 0x214 -/* 802B90C0 002B6020 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802B90C0 002B6020 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802B90C4 002B6024 48 05 9A B1 */ bl __ct__12CTransform4fFRC12CTransform4f /* 802B90C8 002B6028 38 61 01 40 */ addi r3, r1, 0x140 /* 802B90CC 002B602C 48 05 32 65 */ bl GetPerspectiveProjectionMatrix__9CGraphicsFv @@ -4346,9 +4346,9 @@ lbl_802B973C: /* 802B9868 002B67C8 D0 21 00 A8 */ stfs f1, 0xa8(r1) /* 802B986C 002B67CC D0 01 00 AC */ stfs f0, 0xac(r1) /* 802B9870 002B67D0 48 07 EC 99 */ bl __ct__6CAABoxFRC9CVector3fRC9CVector3f -/* 802B9874 002B67D4 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802B9874 002B67D4 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802B9878 002B67D8 38 61 01 08 */ addi r3, r1, 0x108 -/* 802B987C 002B67DC 38 A4 61 D4 */ addi r5, r4, lbl_805A61D4@l +/* 802B987C 002B67DC 38 A4 61 D4 */ addi r5, r4, mViewMatrix__9CGraphics@l /* 802B9880 002B67E0 38 81 00 74 */ addi r4, r1, 0x74 /* 802B9884 002B67E4 C0 45 00 0C */ lfs f2, 0xc(r5) /* 802B9888 002B67E8 7C BF 2B 78 */ mr r31, r5 @@ -4392,12 +4392,12 @@ lbl_802B9904: /* 802B9910 002B6870 55 D8 06 3E */ clrlwi r24, r14, 0x18 /* 802B9914 002B6874 3C 60 80 5A */ lis r3, sIdentity__12CTransform4f@ha /* 802B9918 002B6878 7C 18 00 D0 */ neg r0, r24 -/* 802B991C 002B687C 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802B991C 002B687C 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802B9920 002B6880 7C 00 C3 78 */ or r0, r0, r24 /* 802B9924 002B6884 39 C3 66 70 */ addi r14, r3, sIdentity__12CTransform4f@l /* 802B9928 002B6888 54 03 0F FE */ srwi r3, r0, 0x1f /* 802B992C 002B688C CB C2 C2 A0 */ lfd f30, lbl_805ADFC0@sda21(r2) -/* 802B9930 002B6890 38 04 61 D4 */ addi r0, r4, lbl_805A61D4@l +/* 802B9930 002B6890 38 04 61 D4 */ addi r0, r4, mViewMatrix__9CGraphics@l /* 802B9934 002B6894 C3 E2 C2 80 */ lfs f31, lbl_805ADFA0@sda21(r2) /* 802B9938 002B6898 92 01 03 18 */ stw r16, 0x318(r1) /* 802B993C 002B689C 3B 23 00 01 */ addi r25, r3, 1 @@ -5035,8 +5035,8 @@ lbl_802BA240: /* 802BA2B4 002B7214 54 00 EF FF */ rlwinm. r0, r0, 0x1d, 0x1f, 0x1f /* 802BA2B8 002B7218 40 82 00 64 */ bne lbl_802BA31C /* 802BA2BC 002B721C 80 04 00 00 */ lwz r0, 0(r4) -/* 802BA2C0 002B7220 3C 60 80 5A */ lis r3, lbl_805A6204@ha -/* 802BA2C4 002B7224 38 83 62 04 */ addi r4, r3, lbl_805A6204@l +/* 802BA2C0 002B7220 3C 60 80 5A */ lis r3, mModelMatrix__9CGraphics@ha +/* 802BA2C4 002B7224 38 83 62 04 */ addi r4, r3, mModelMatrix__9CGraphics@l /* 802BA2C8 002B7228 7C A6 2B 78 */ mr r6, r5 /* 802BA2CC 002B722C 90 01 00 08 */ stw r0, 8(r1) /* 802BA2D0 002B7230 7D 27 4B 78 */ mr r7, r9 @@ -5188,9 +5188,9 @@ DoThermalBlendHot__13CCubeRendererFv: /* 802BA4D0 002B7430 38 60 00 01 */ li r3, 1 /* 802BA4D4 002B7434 38 80 00 00 */ li r4, 0 /* 802BA4D8 002B7438 48 0C 1C 09 */ bl GXSetDstAlpha -/* 802BA4DC 002B743C 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 802BA4E0 002B7440 83 6D A8 28 */ lwz r27, lbl_805A93E8@sda21(r13) -/* 802BA4E4 002B7444 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 802BA4DC 002B743C 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 802BA4E0 002B7440 83 6D A8 28 */ lwz r27, mpSpareBuffer__9CGraphics@sda21(r13) +/* 802BA4E4 002B7444 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 802BA4E8 002B7448 38 60 00 01 */ li r3, 1 /* 802BA4EC 002B744C 83 A6 00 00 */ lwz r29, 0(r6) /* 802BA4F0 002B7450 38 80 00 03 */ li r4, 3 @@ -5271,9 +5271,9 @@ DoThermalBlendHot__13CCubeRendererFv: /* 802BA61C 002B757C 38 A0 00 07 */ li r5, 7 /* 802BA620 002B7580 38 C0 00 00 */ li r6, 0 /* 802BA624 002B7584 48 04 E2 AD */ bl SetBlendMode__3CGXF12_GXBlendMode14_GXBlendFactor14_GXBlendFactor10_GXLogicOp -/* 802BA628 002B7588 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802BA628 002B7588 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802BA62C 002B758C 38 61 00 24 */ addi r3, r1, 0x24 -/* 802BA630 002B7590 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802BA630 002B7590 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802BA634 002B7594 48 05 85 41 */ bl __ct__12CTransform4fFRC12CTransform4f /* 802BA638 002B7598 48 04 F8 25 */ bl GetProjectionState__9CGraphicsFv /* 802BA63C 002B759C 88 C3 00 00 */ lbz r6, 0(r3) @@ -5409,9 +5409,9 @@ DoThermalBlendCold__13CCubeRendererFv: /* 802BA838 002B7798 38 60 00 00 */ li r3, 0 /* 802BA83C 002B779C 38 80 00 00 */ li r4, 0 /* 802BA840 002B77A0 48 0C 18 A1 */ bl GXSetDstAlpha -/* 802BA844 002B77A4 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 802BA848 002B77A8 83 4D A8 28 */ lwz r26, lbl_805A93E8@sda21(r13) -/* 802BA84C 002B77AC 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 802BA844 002B77A4 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 802BA848 002B77A8 83 4D A8 28 */ lwz r26, mpSpareBuffer__9CGraphics@sda21(r13) +/* 802BA84C 002B77AC 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 802BA850 002B77B0 38 60 00 01 */ li r3, 1 /* 802BA854 002B77B4 83 E6 00 00 */ lwz r31, 0(r6) /* 802BA858 002B77B8 38 80 00 03 */ li r4, 3 @@ -5666,9 +5666,9 @@ lbl_802BAA1C: /* 802BAC2C 002B7B8C 38 A0 00 00 */ li r5, 0 /* 802BAC30 002B7B90 38 C0 00 00 */ li r6, 0 /* 802BAC34 002B7B94 48 04 DC 9D */ bl SetBlendMode__3CGXF12_GXBlendMode14_GXBlendFactor14_GXBlendFactor10_GXLogicOp -/* 802BAC38 002B7B98 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802BAC38 002B7B98 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802BAC3C 002B7B9C 38 61 00 64 */ addi r3, r1, 0x64 -/* 802BAC40 002B7BA0 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802BAC40 002B7BA0 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802BAC44 002B7BA4 48 05 7F 31 */ bl __ct__12CTransform4fFRC12CTransform4f /* 802BAC48 002B7BA8 48 04 F2 15 */ bl GetProjectionState__9CGraphicsFv /* 802BAC4C 002B7BAC 88 C3 00 00 */ lbz r6, 0(r3) @@ -6743,9 +6743,9 @@ _DrawSpaceWarp__13CCubeRendererFRC9CVector3ff: /* 802BBBC4 002B8B24 DB E1 01 70 */ stfd f31, 0x170(r1) /* 802BBBC8 002B8B28 F3 E1 01 78 */ psq_st f31, 376(r1), 0, qr0 /* 802BBBCC 002B8B2C BF 41 01 58 */ stmw r26, 0x158(r1) -/* 802BBBD0 002B8B30 3C A0 80 3F */ lis r5, lbl_803ED910@ha +/* 802BBBD0 002B8B30 3C A0 80 3F */ lis r5, mViewport__9CGraphics@ha /* 802BBBD4 002B8B34 3C E0 43 30 */ lis r7, 0x4330 -/* 802BBBD8 002B8B38 38 A5 D9 10 */ addi r5, r5, lbl_803ED910@l +/* 802BBBD8 002B8B38 38 A5 D9 10 */ addi r5, r5, mViewport__9CGraphics@l /* 802BBBDC 002B8B3C C0 E4 00 04 */ lfs f7, 4(r4) /* 802BBBE0 002B8B40 83 A5 00 08 */ lwz r29, 8(r5) /* 802BBBE4 002B8B44 7C 7B 1B 78 */ mr r27, r3 @@ -6954,7 +6954,7 @@ lbl_802BBEB8: /* 802BBEFC 002B8E5C 54 03 04 3E */ clrlwi r3, r0, 0x10 /* 802BBF00 002B8E60 80 01 00 54 */ lwz r0, 0x54(r1) /* 802BBF04 002B8E64 54 84 04 3E */ clrlwi r4, r4, 0x10 -/* 802BBF08 002B8E68 83 4D A8 28 */ lwz r26, lbl_805A93E8@sda21(r13) +/* 802BBF08 002B8E68 83 4D A8 28 */ lwz r26, mpSpareBuffer__9CGraphics@sda21(r13) /* 802BBF0C 002B8E6C 54 A5 04 3E */ clrlwi r5, r5, 0x10 /* 802BBF10 002B8E70 54 06 04 3E */ clrlwi r6, r0, 0x10 /* 802BBF14 002B8E74 48 0B CE A1 */ bl GXSetTexCopySrc @@ -7068,8 +7068,8 @@ lbl_802BBEB8: /* 802BC0C4 002B9024 48 04 BD 65 */ bl SetVtxDescv__3CGXFPC14_GXVtxDescList /* 802BC0C8 002B9028 48 04 DD 95 */ bl GetProjectionState__9CGraphicsFv /* 802BC0CC 002B902C 88 03 00 00 */ lbz r0, 0(r3) -/* 802BC0D0 002B9030 3C 80 80 5A */ lis r4, lbl_805A61D4@ha -/* 802BC0D4 002B9034 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802BC0D0 002B9030 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha +/* 802BC0D4 002B9034 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802BC0D8 002B9038 98 01 00 8C */ stb r0, 0x8c(r1) /* 802BC0DC 002B903C C0 03 00 04 */ lfs f0, 4(r3) /* 802BC0E0 002B9040 D0 01 00 90 */ stfs f0, 0x90(r1) @@ -7291,12 +7291,12 @@ lbl_802BC414: /* 802BC41C 002B937C 48 05 35 DD */ bl __dt__8CTextureFv /* 802BC420 002B9380 93 7C 01 4C */ stw r27, 0x14c(r28) lbl_802BC424: -/* 802BC424 002B9384 3C 60 80 5A */ lis r3, lbl_805A6500@ha -/* 802BC428 002B9388 3C A0 80 3F */ lis r5, lbl_803ED910@ha -/* 802BC42C 002B938C 38 83 65 00 */ addi r4, r3, lbl_805A6500@l +/* 802BC424 002B9384 3C 60 80 5A */ lis r3, mRenderModeObj__9CGraphics@ha +/* 802BC428 002B9388 3C A0 80 3F */ lis r5, mViewport__9CGraphics@ha +/* 802BC42C 002B938C 38 83 65 00 */ addi r4, r3, mRenderModeObj__9CGraphics@l /* 802BC430 002B9390 38 60 00 00 */ li r3, 0 /* 802BC434 002B9394 A0 84 00 06 */ lhz r4, 6(r4) -/* 802BC438 002B9398 38 C5 D9 10 */ addi r6, r5, lbl_803ED910@l +/* 802BC438 002B9398 38 C5 D9 10 */ addi r6, r5, mViewport__9CGraphics@l /* 802BC43C 002B939C 83 46 00 00 */ lwz r26, 0(r6) /* 802BC440 002B93A0 38 A0 01 00 */ li r5, 0x100 /* 802BC444 002B93A4 3B 64 FF 00 */ addi r27, r4, -256 @@ -7311,7 +7311,7 @@ lbl_802BC424: /* 802BC468 002B93C8 38 A0 01 00 */ li r5, 0x100 /* 802BC46C 002B93CC 38 C0 01 00 */ li r6, 0x100 /* 802BC470 002B93D0 48 04 FB ED */ bl SetScissor__9CGraphicsFiiii -/* 802BC474 002B93D4 83 6D A8 28 */ lwz r27, lbl_805A93E8@sda21(r13) +/* 802BC474 002B93D4 83 6D A8 28 */ lwz r27, mpSpareBuffer__9CGraphics@sda21(r13) /* 802BC478 002B93D8 38 60 00 00 */ li r3, 0 /* 802BC47C 002B93DC 38 80 00 00 */ li r4, 0 /* 802BC480 002B93E0 38 A0 01 00 */ li r5, 0x100 @@ -8928,9 +8928,9 @@ lbl_802BDA30: /* 802BDA38 002BA998 7C 00 1B 78 */ or r0, r0, r3 /* 802BDA3C 002BA99C 54 06 0F FF */ rlwinm. r6, r0, 1, 0x1f, 0x1f /* 802BDA40 002BA9A0 41 82 00 44 */ beq lbl_802BDA84 -/* 802BDA44 002BA9A4 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 802BDA44 002BA9A4 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 802BDA48 002BA9A8 C0 1E 00 0C */ lfs f0, 0xc(r30) -/* 802BDA4C 002BA9AC 38 63 61 D4 */ addi r3, r3, lbl_805A61D4@l +/* 802BDA4C 002BA9AC 38 63 61 D4 */ addi r3, r3, mViewMatrix__9CGraphics@l /* 802BDA50 002BA9B0 C0 23 00 2C */ lfs f1, 0x2c(r3) /* 802BDA54 002BA9B4 C0 83 00 0C */ lfs f4, 0xc(r3) /* 802BDA58 002BA9B8 C0 63 00 1C */ lfs f3, 0x1c(r3) @@ -8946,9 +8946,9 @@ lbl_802BDA7C: /* 802BDA7C 002BA9DC 38 80 00 00 */ li r4, 0 /* 802BDA80 002BA9E0 48 00 00 50 */ b lbl_802BDAD0 lbl_802BDA84: -/* 802BDA84 002BA9E4 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 802BDA84 002BA9E4 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 802BDA88 002BA9E8 C0 3E 00 04 */ lfs f1, 4(r30) -/* 802BDA8C 002BA9EC 38 63 61 D4 */ addi r3, r3, lbl_805A61D4@l +/* 802BDA8C 002BA9EC 38 63 61 D4 */ addi r3, r3, mViewMatrix__9CGraphics@l /* 802BDA90 002BA9F0 C0 DE 00 08 */ lfs f6, 8(r30) /* 802BDA94 002BA9F4 C0 03 00 1C */ lfs f0, 0x1c(r3) /* 802BDA98 002BA9F8 C0 83 00 0C */ lfs f4, 0xc(r3) @@ -9073,7 +9073,7 @@ EndScene__13CCubeRendererFv: /* 802BDC3C 002BAB9C 90 01 00 14 */ stw r0, 0x14(r1) /* 802BDC40 002BABA0 93 E1 00 0C */ stw r31, 0xc(r1) /* 802BDC44 002BABA4 7C 7F 1B 78 */ mr r31, r3 -/* 802BDC48 002BABA8 88 8D 9C 6C */ lbz r4, lbl_805A882C@sda21(r13) +/* 802BDC48 002BABA8 88 8D 9C 6C */ lbz r4, mIsBeginSceneClearFb__9CGraphics@sda21(r13) /* 802BDC4C 002BABAC 88 03 03 18 */ lbz r0, 0x318(r3) /* 802BDC50 002BABB0 7C 83 00 34 */ cntlzw r3, r4 /* 802BDC54 002BABB4 50 60 DF FE */ rlwimi r0, r3, 0x1b, 0x1f, 0x1f @@ -9102,9 +9102,9 @@ lbl_802BDC8C: BeginScene__13CCubeRendererFv: /* 802BDCA0 002BAC00 94 21 FF E0 */ stwu r1, -0x20(r1) /* 802BDCA4 002BAC04 7C 08 02 A6 */ mflr r0 -/* 802BDCA8 002BAC08 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 802BDCA8 002BAC08 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 802BDCAC 002BAC0C 90 01 00 24 */ stw r0, 0x24(r1) -/* 802BDCB0 002BAC10 38 84 D9 10 */ addi r4, r4, lbl_803ED910@l +/* 802BDCB0 002BAC10 38 84 D9 10 */ addi r4, r4, mViewport__9CGraphics@l /* 802BDCB4 002BAC14 93 E1 00 1C */ stw r31, 0x1c(r1) /* 802BDCB8 002BAC18 7C 7F 1B 78 */ mr r31, r3 /* 802BDCBC 002BAC1C 38 60 00 01 */ li r3, 1 diff --git a/asm/MetroidPrime/CActor.s b/asm/MetroidPrime/CActor.s index 8ebbd488..1bf966d0 100644 --- a/asm/MetroidPrime/CActor.s +++ b/asm/MetroidPrime/CActor.s @@ -2376,9 +2376,9 @@ EnsureRendered__6CActorCFRC13CStateManager: /* 800549F8 00051958 81 8C 00 64 */ lwz r12, 0x64(r12) /* 800549FC 0005195C 7D 89 03 A6 */ mtctr r12 /* 80054A00 00051960 4E 80 04 21 */ bctrl -/* 80054A04 00051964 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 80054A04 00051964 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 80054A08 00051968 C1 01 00 2C */ lfs f8, 0x2c(r1) -/* 80054A0C 0005196C 38 C3 61 D4 */ addi r6, r3, lbl_805A61D4@l +/* 80054A0C 0005196C 38 C3 61 D4 */ addi r6, r3, mViewMatrix__9CGraphics@l /* 80054A10 00051970 C0 E1 00 30 */ lfs f7, 0x30(r1) /* 80054A14 00051974 C0 C1 00 34 */ lfs f6, 0x34(r1) /* 80054A18 00051978 38 61 00 08 */ addi r3, r1, 8 @@ -2410,7 +2410,7 @@ EnsureRendered__6CActorCFRC13CStateManager: /* 80054A80 000519E0 38 C1 00 44 */ addi r6, r1, 0x44 /* 80054A84 000519E4 D0 21 00 18 */ stfs f1, 0x18(r1) /* 80054A88 000519E8 D0 01 00 1C */ stfs f0, 0x1c(r1) -/* 80054A8C 000519EC 48 00 00 1D */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f +/* 80054A8C 000519EC 48 00 00 1D */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox /* 80054A90 000519F0 80 01 00 74 */ lwz r0, 0x74(r1) /* 80054A94 000519F4 83 E1 00 6C */ lwz r31, 0x6c(r1) /* 80054A98 000519F8 83 C1 00 68 */ lwz r30, 0x68(r1) @@ -2418,8 +2418,8 @@ EnsureRendered__6CActorCFRC13CStateManager: /* 80054AA0 00051A00 38 21 00 70 */ addi r1, r1, 0x70 /* 80054AA4 00051A04 4E 80 00 20 */ blr -.global EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f -EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f: +.global EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox +EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox: /* 80054AA8 00051A08 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80054AAC 00051A0C 7C 08 02 A6 */ mflr r0 /* 80054AB0 00051A10 90 01 00 24 */ stw r0, 0x24(r1) diff --git a/asm/MetroidPrime/CActorParticles.s b/asm/MetroidPrime/CActorParticles.s index ecd5282c..4069c8ae 100644 --- a/asm/MetroidPrime/CActorParticles.s +++ b/asm/MetroidPrime/CActorParticles.s @@ -426,9 +426,9 @@ lbl_801E3E04: Render__20CActorModelParticlesCFRC6CActor: /* 801E3E24 001E0D84 94 21 FF A0 */ stwu r1, -0x60(r1) /* 801E3E28 001E0D88 7C 08 02 A6 */ mflr r0 -/* 801E3E2C 001E0D8C 3C C0 80 5A */ lis r6, lbl_805A6204@ha +/* 801E3E2C 001E0D8C 3C C0 80 5A */ lis r6, mModelMatrix__9CGraphics@ha /* 801E3E30 001E0D90 90 01 00 64 */ stw r0, 0x64(r1) -/* 801E3E34 001E0D94 38 06 62 04 */ addi r0, r6, lbl_805A6204@l +/* 801E3E34 001E0D94 38 06 62 04 */ addi r0, r6, mModelMatrix__9CGraphics@l /* 801E3E38 001E0D98 BF 41 00 48 */ stmw r26, 0x48(r1) /* 801E3E3C 001E0D9C 7C 7A 1B 78 */ mr r26, r3 /* 801E3E40 001E0DA0 7C 9D 23 78 */ mr r29, r4 diff --git a/asm/MetroidPrime/CAnimData.s b/asm/MetroidPrime/CAnimData.s index df58ac4f..4b29c61e 100644 --- a/asm/MetroidPrime/CAnimData.s +++ b/asm/MetroidPrime/CAnimData.s @@ -5736,7 +5736,7 @@ DrawSkinnedModel__9CAnimDataCFRC13CSkinnedModelRC11CModelFlags: /* 8002E444 0002B3A4 7C BF 2B 78 */ mr r31, r5 /* 8002E448 0002B3A8 93 C1 00 08 */ stw r30, 8(r1) /* 8002E44C 0002B3AC 7C 9E 23 78 */ mr r30, r4 -/* 8002E450 0002B3B0 88 ED A8 16 */ lbz r7, lbl_805A93D6@sda21(r13) +/* 8002E450 0002B3B0 88 ED A8 16 */ lbz r7, mLightActive__9CGraphics@sda21(r13) /* 8002E454 0002B3B4 28 07 00 00 */ cmplwi r7, 0 /* 8002E458 0002B3B8 41 82 00 08 */ beq lbl_8002E460 /* 8002E45C 0002B3BC 39 20 00 01 */ li r9, 1 diff --git a/asm/MetroidPrime/CArtifactDoll.s b/asm/MetroidPrime/CArtifactDoll.s index 49eb2c75..d14bb627 100644 --- a/asm/MetroidPrime/CArtifactDoll.s +++ b/asm/MetroidPrime/CArtifactDoll.s @@ -136,9 +136,9 @@ Draw__13CArtifactDollFfRC13CStateManagerbUi: /* 8029C9BC 0029991C 48 00 0A 65 */ bl IsLoaded__13CArtifactDollCFv /* 8029C9C0 00299920 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8029C9C4 00299924 41 82 03 F4 */ beq lbl_8029CDB8 -/* 8029C9C8 00299928 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8029C9C8 00299928 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8029C9CC 0029992C 3C 80 43 30 */ lis r4, 0x4330 -/* 8029C9D0 00299930 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 8029C9D0 00299930 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 8029C9D4 00299934 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) /* 8029C9D8 00299938 80 A6 00 08 */ lwz r5, 8(r6) /* 8029C9DC 0029993C 80 06 00 0C */ lwz r0, 0xc(r6) diff --git a/asm/MetroidPrime/CAutoMapper.s b/asm/MetroidPrime/CAutoMapper.s index 3d0217de..0e9b3bd1 100644 --- a/asm/MetroidPrime/CAutoMapper.s +++ b/asm/MetroidPrime/CAutoMapper.s @@ -1251,9 +1251,9 @@ GetMapAreaMiniMapDrawDepth__11CAutoMapperFv: GetMapScreenViewportSize__11CAutoMapperFv: /* 800962BC 0009321C 94 21 FF F0 */ stwu r1, -0x10(r1) /* 800962C0 00093220 7C 08 02 A6 */ mflr r0 -/* 800962C4 00093224 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 800962C4 00093224 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 800962C8 00093228 90 01 00 14 */ stw r0, 0x14(r1) -/* 800962CC 0009322C 38 A4 D9 10 */ addi r5, r4, lbl_803ED910@l +/* 800962CC 0009322C 38 A4 D9 10 */ addi r5, r4, mViewport__9CGraphics@l /* 800962D0 00093230 80 85 00 08 */ lwz r4, 8(r5) /* 800962D4 00093234 80 A5 00 0C */ lwz r5, 0xc(r5) /* 800962D8 00093238 48 27 E0 75 */ bl __ct__9CVector2iFii @@ -1267,9 +1267,9 @@ GetMiniMapViewportSize__11CAutoMapperFv: /* 800962EC 0009324C 94 21 FF D0 */ stwu r1, -0x30(r1) /* 800962F0 00093250 7C 08 02 A6 */ mflr r0 /* 800962F4 00093254 3C 80 43 30 */ lis r4, 0x4330 -/* 800962F8 00093258 3C A0 80 3F */ lis r5, lbl_803ED910@ha +/* 800962F8 00093258 3C A0 80 3F */ lis r5, mViewport__9CGraphics@ha /* 800962FC 0009325C 90 01 00 34 */ stw r0, 0x34(r1) -/* 80096300 00093260 38 C5 D9 10 */ addi r6, r5, lbl_803ED910@l +/* 80096300 00093260 38 C5 D9 10 */ addi r6, r5, mViewport__9CGraphics@l /* 80096304 00093264 C8 A2 8B 88 */ lfd f5, lbl_805AA8A8@sda21(r2) /* 80096308 00093268 80 A6 00 08 */ lwz r5, 8(r6) /* 8009630C 0009326C 80 06 00 0C */ lwz r0, 0xc(r6) @@ -5232,9 +5232,9 @@ lbl_80099CBC: /* 80099CBC 00096C1C C0 02 8B A8 */ lfs f0, lbl_805AA8C8@sda21(r2) /* 80099CC0 00096C20 FC 19 00 40 */ fcmpo cr0, f25, f0 /* 80099CC4 00096C24 40 81 01 68 */ ble lbl_80099E2C -/* 80099CC8 00096C28 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 80099CC8 00096C28 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80099CCC 00096C2C 38 60 00 00 */ li r3, 0 -/* 80099CD0 00096C30 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80099CD0 00096C30 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80099CD4 00096C34 48 27 05 E5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80099CD8 00096C38 80 7F 00 44 */ lwz r3, 0x44(r31) /* 80099CDC 00096C3C 38 80 00 00 */ li r4, 0 diff --git a/asm/MetroidPrime/CCredits.s b/asm/MetroidPrime/CCredits.s index ddbd2229..d870c7db 100644 --- a/asm/MetroidPrime/CCredits.s +++ b/asm/MetroidPrime/CCredits.s @@ -768,8 +768,8 @@ lbl_8002589C: /* 800258A0 00022800 48 00 06 54 */ b lbl_80025EF4 lbl_800258A4: /* 800258A4 00022804 80 1F 00 44 */ lwz r0, 0x44(r31) -/* 800258A8 00022808 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 800258AC 0002280C 38 83 D9 10 */ addi r4, r3, lbl_803ED910@l +/* 800258A8 00022808 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 800258AC 0002280C 38 83 D9 10 */ addi r4, r3, mViewport__9CGraphics@l /* 800258B0 00022810 80 64 00 08 */ lwz r3, 8(r4) /* 800258B4 00022814 2C 00 00 00 */ cmpwi r0, 0 /* 800258B8 00022818 83 64 00 0C */ lwz r27, 0xc(r4) @@ -1819,9 +1819,9 @@ sub_80026770: /* 800267A8 00023708 FC 01 00 40 */ fcmpo cr0, f1, f0 /* 800267AC 0002370C 41 81 01 60 */ bgt lbl_8002690C lbl_800267B0: -/* 800267B0 00023710 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 800267B0 00023710 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 800267B4 00023714 3C 60 43 30 */ lis r3, 0x4330 -/* 800267B8 00023718 38 84 D9 10 */ addi r4, r4, lbl_803ED910@l +/* 800267B8 00023718 38 84 D9 10 */ addi r4, r4, mViewport__9CGraphics@l /* 800267BC 0002371C 80 1F 00 58 */ lwz r0, 0x58(r31) /* 800267C0 00023720 83 C4 00 0C */ lwz r30, 0xc(r4) /* 800267C4 00023724 90 61 00 38 */ stw r3, 0x38(r1) @@ -2015,8 +2015,8 @@ lbl_80026A60: /* 80026A64 000239C4 48 00 0B 18 */ b lbl_8002757C lbl_80026A68: /* 80026A68 000239C8 80 6D A0 60 */ lwz r3, gpResourceFactory@sda21(r13) -/* 80026A6C 000239CC 3C 80 80 3F */ lis r4, lbl_803ED910@ha -/* 80026A70 000239D0 38 A4 D9 10 */ addi r5, r4, lbl_803ED910@l +/* 80026A6C 000239CC 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha +/* 80026A70 000239D0 38 A4 D9 10 */ addi r5, r4, mViewport__9CGraphics@l /* 80026A74 000239D4 80 8D A1 38 */ lwz r4, gpTweakGui@sda21(r13) /* 80026A78 000239D8 81 83 00 00 */ lwz r12, 0(r3) /* 80026A7C 000239DC 83 A5 00 08 */ lwz r29, 8(r5) diff --git a/asm/MetroidPrime/CErrorOutputWindow.s b/asm/MetroidPrime/CErrorOutputWindow.s index 2dbe13b3..027cfffd 100644 --- a/asm/MetroidPrime/CErrorOutputWindow.s +++ b/asm/MetroidPrime/CErrorOutputWindow.s @@ -397,9 +397,9 @@ sub_802695f8: /* 8026961C 0026657C 80 03 00 1C */ lwz r0, 0x1c(r3) /* 80269620 00266580 28 00 00 00 */ cmplwi r0, 0 /* 80269624 00266584 41 82 02 80 */ beq lbl_802698A4 -/* 80269628 00266588 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 80269628 00266588 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 8026962C 0026658C 38 61 00 B4 */ addi r3, r1, 0xb4 -/* 80269630 00266590 39 24 D9 10 */ addi r9, r4, lbl_803ED910@l +/* 80269630 00266590 39 24 D9 10 */ addi r9, r4, mViewport__9CGraphics@l /* 80269634 00266594 81 09 00 00 */ lwz r8, 0(r9) /* 80269638 00266598 80 E9 00 04 */ lwz r7, 4(r9) /* 8026963C 0026659C 80 C9 00 08 */ lwz r6, 8(r9) @@ -716,7 +716,7 @@ lbl_80269A94: /* 80269A9C 002669FC 41 82 00 30 */ beq lbl_80269ACC /* 80269AA0 00266A00 2C 00 00 00 */ cmpwi r0, 0 /* 80269AA4 00266A04 40 82 00 14 */ bne lbl_80269AB8 -/* 80269AA8 00266A08 88 6D 9C 6C */ lbz r3, lbl_805A882C@sda21(r13) +/* 80269AA8 00266A08 88 6D 9C 6C */ lbz r3, mIsBeginSceneClearFb__9CGraphics@sda21(r13) /* 80269AAC 00266A0C 88 1F 00 18 */ lbz r0, 0x18(r31) /* 80269AB0 00266A10 50 60 3E 30 */ rlwimi r0, r3, 7, 0x18, 0x18 /* 80269AB4 00266A14 98 1F 00 18 */ stb r0, 0x18(r31) diff --git a/asm/MetroidPrime/CFluidPlaneCPU.s b/asm/MetroidPrime/CFluidPlaneCPU.s index d76a9ba6..96c16b23 100644 --- a/asm/MetroidPrime/CFluidPlaneCPU.s +++ b/asm/MetroidPrime/CFluidPlaneCPU.s @@ -129,9 +129,9 @@ RenderCleanup__14CFluidPlaneCPUCFv: /* 80199988 001968E8 38 60 00 00 */ li r3, 0 /* 8019998C 001968EC 48 16 ED 05 */ bl SetNumIndStages__3CGXFUc /* 80199990 001968F0 48 16 E4 ED */ bl SetIndexedPositionVtxFmt__14CFluidPlaneCPUFv -/* 80199994 001968F4 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 80199994 001968F4 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 80199998 001968F8 38 61 00 08 */ addi r3, r1, 8 -/* 8019999C 001968FC 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 8019999C 001968FC 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 801999A0 00196900 48 17 92 A1 */ bl GetRotation__12CTransform4fCFv /* 801999A4 00196904 38 61 00 38 */ addi r3, r1, 0x38 /* 801999A8 00196908 38 81 00 08 */ addi r4, r1, 8 @@ -176,7 +176,7 @@ RenderCleanup__14CFluidPlaneCPUCFv: /* 80199A44 001969A4 48 16 F2 89 */ bl SetChanCtrl__3CGXFQ23CGX10EChannelIdUc11_GXColorSrc11_GXColorSrc10_GXLightID12_GXDiffuseFn9_GXAttnFn /* 80199A48 001969A8 38 60 00 01 */ li r3, 1 /* 80199A4C 001969AC 48 16 F4 05 */ bl SetNumChans__3CGXFUc -/* 80199A50 001969B0 88 6D A8 16 */ lbz r3, lbl_805A93D6@sda21(r13) +/* 80199A50 001969B0 88 6D A8 16 */ lbz r3, mLightActive__9CGraphics@sda21(r13) /* 80199A54 001969B4 48 17 2E 7D */ bl SetLightState__9CGraphicsFUc lbl_80199A58: /* 80199A58 001969B8 80 01 00 D4 */ lwz r0, 0xd4(r1) @@ -977,7 +977,7 @@ lbl_8019A4F0: lbl_8019A5F4: /* 8019A5F4 00197554 38 60 00 02 */ li r3, 2 /* 8019A5F8 00197558 48 16 E8 59 */ bl SetNumChans__3CGXFUc -/* 8019A5FC 0019755C 88 ED A8 16 */ lbz r7, lbl_805A93D6@sda21(r13) +/* 8019A5FC 0019755C 88 ED A8 16 */ lbz r7, mLightActive__9CGraphics@sda21(r13) /* 8019A600 00197560 38 60 00 01 */ li r3, 1 /* 8019A604 00197564 38 80 00 01 */ li r4, 1 /* 8019A608 00197568 38 A0 00 00 */ li r5, 0 @@ -985,7 +985,7 @@ lbl_8019A5F4: /* 8019A610 00197570 39 00 00 02 */ li r8, 2 /* 8019A614 00197574 39 20 00 01 */ li r9, 1 /* 8019A618 00197578 48 16 E6 B5 */ bl SetChanCtrl__3CGXFQ23CGX10EChannelIdUc11_GXColorSrc11_GXColorSrc10_GXLightID12_GXDiffuseFn9_GXAttnFn -/* 8019A61C 0019757C 88 0D A8 16 */ lbz r0, lbl_805A93D6@sda21(r13) +/* 8019A61C 0019757C 88 0D A8 16 */ lbz r0, mLightActive__9CGraphics@sda21(r13) /* 8019A620 00197580 38 81 00 38 */ addi r4, r1, 0x38 /* 8019A624 00197584 38 60 00 01 */ li r3, 1 /* 8019A628 00197588 28 00 00 00 */ cmplwi r0, 0 @@ -1207,9 +1207,9 @@ lbl_8019A79C: /* 8019A958 001978B8 57 C0 06 3F */ clrlwi. r0, r30, 0x18 /* 8019A95C 001978BC 39 E0 00 27 */ li r15, 0x27 /* 8019A960 001978C0 41 82 00 B4 */ beq lbl_8019AA14 -/* 8019A964 001978C4 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 8019A964 001978C4 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 8019A968 001978C8 C3 B2 00 FC */ lfs f29, 0xfc(r18) -/* 8019A96C 001978CC 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 8019A96C 001978CC 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 8019A970 001978D0 38 61 01 90 */ addi r3, r1, 0x190 /* 8019A974 001978D4 48 17 82 CD */ bl GetRotation__12CTransform4fCFv /* 8019A978 001978D8 38 61 01 C0 */ addi r3, r1, 0x1c0 @@ -1635,9 +1635,9 @@ lbl_8019AFA8: /* 8019AFC4 00197F24 D0 01 00 5C */ stfs f0, 0x5c(r1) /* 8019AFC8 00197F28 48 17 7A 5D */ bl TransposeRotate__12CTransform4fCFRC9CVector3f /* 8019AFCC 00197F2C C0 22 A6 E0 */ lfs f1, lbl_805AC400@sda21(r2) -/* 8019AFD0 00197F30 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 8019AFD0 00197F30 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 8019AFD4 00197F34 C0 02 A6 DC */ lfs f0, lbl_805AC3FC@sda21(r2) -/* 8019AFD8 00197F38 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 8019AFD8 00197F38 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 8019AFDC 00197F3C D0 21 00 3C */ stfs f1, 0x3c(r1) /* 8019AFE0 00197F40 38 61 01 60 */ addi r3, r1, 0x160 /* 8019AFE4 00197F44 C3 A1 00 60 */ lfs f29, 0x60(r1) diff --git a/asm/MetroidPrime/CFrontEndUI.s b/asm/MetroidPrime/CFrontEndUI.s index 2299be74..67e76e5f 100644 --- a/asm/MetroidPrime/CFrontEndUI.s +++ b/asm/MetroidPrime/CFrontEndUI.s @@ -1248,13 +1248,13 @@ lbl_8001C3DC: /* 8001C3EC 0001934C 83 9F 00 40 */ lwz r28, 0x40(r31) /* 8001C3F0 00019350 28 1C 00 00 */ cmplwi r28, 0 /* 8001C3F4 00019354 41 82 00 B0 */ beq lbl_8001C4A4 -/* 8001C3F8 00019358 3C 60 80 5A */ lis r3, lbl_805A5EBC@ha +/* 8001C3F8 00019358 3C 60 80 5A */ lis r3, kEnvModulate__9CGraphics@ha /* 8001C3FC 0001935C AB DC 00 04 */ lha r30, 4(r28) -/* 8001C400 00019360 38 83 5E BC */ addi r4, r3, lbl_805A5EBC@l +/* 8001C400 00019360 38 83 5E BC */ addi r4, r3, kEnvModulate__9CGraphics@l /* 8001C404 00019364 AB BC 00 06 */ lha r29, 6(r28) /* 8001C408 00019368 38 60 00 00 */ li r3, 0 /* 8001C40C 0001936C 48 2E DE AD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8001C410 00019370 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8001C410 00019370 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8001C414 00019374 38 60 00 01 */ li r3, 1 /* 8001C418 00019378 48 2E DE A1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8001C41C 0001937C 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) diff --git a/asm/MetroidPrime/CGameCubeDoll.s b/asm/MetroidPrime/CGameCubeDoll.s index 4d77fb92..86b6313c 100644 --- a/asm/MetroidPrime/CGameCubeDoll.s +++ b/asm/MetroidPrime/CGameCubeDoll.s @@ -15,9 +15,9 @@ Draw__13CGameCubeDollFf: /* 8029E664 0029B5C4 48 00 04 D5 */ bl IsLoaded__13CGameCubeDollCFv /* 8029E668 0029B5C8 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8029E66C 0029B5CC 41 82 01 44 */ beq lbl_8029E7B0 -/* 8029E670 0029B5D0 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8029E670 0029B5D0 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8029E674 0029B5D4 3C 80 43 30 */ lis r4, 0x4330 -/* 8029E678 0029B5D8 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 8029E678 0029B5D8 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 8029E67C 0029B5DC 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) /* 8029E680 0029B5E0 80 A6 00 08 */ lwz r5, 8(r6) /* 8029E684 0029B5E4 80 06 00 0C */ lwz r0, 0xc(r6) diff --git a/asm/MetroidPrime/CInGameGuiManager.s b/asm/MetroidPrime/CInGameGuiManager.s index 4abb9c1d..67b9aaaa 100644 --- a/asm/MetroidPrime/CInGameGuiManager.s +++ b/asm/MetroidPrime/CInGameGuiManager.s @@ -2212,16 +2212,16 @@ lbl_801087CC: /* 80108810 00105770 81 8C 00 68 */ lwz r12, 0x68(r12) /* 80108814 00105774 7D 89 03 A6 */ mtctr r12 /* 80108818 00105778 4E 80 04 21 */ bctrl -/* 8010881C 0010577C 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 8010881C 0010577C 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80108820 00105780 38 60 00 00 */ li r3, 0 -/* 80108824 00105784 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80108824 00105784 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80108828 00105788 48 20 1A 91 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8010882C 0010578C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8010882C 0010578C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80108830 00105790 38 60 00 01 */ li r3, 1 /* 80108834 00105794 48 20 1A 85 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80108838 00105798 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80108838 00105798 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8010883C 0010579C 83 BF 01 C8 */ lwz r29, 0x1c8(r31) -/* 80108840 001057A0 38 E3 D9 10 */ addi r7, r3, lbl_803ED910@l +/* 80108840 001057A0 38 E3 D9 10 */ addi r7, r3, mViewport__9CGraphics@l /* 80108844 001057A4 83 9F 01 CC */ lwz r28, 0x1cc(r31) /* 80108848 001057A8 80 67 00 08 */ lwz r3, 8(r7) /* 8010884C 001057AC 80 07 00 0C */ lwz r0, 0xc(r7) @@ -2676,9 +2676,9 @@ lbl_80108DE8: /* 80108EBC 00105E1C 38 AD 89 F8 */ addi r5, r13, lbl_805A75B8@sda21 /* 80108EC0 00105E20 D0 01 00 18 */ stfs f0, 0x18(r1) /* 80108EC4 00105E24 4B F0 33 F1 */ bl "Clamp__5CMathFRCfRCfRCf" -/* 80108EC8 00105E28 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 80108EC8 00105E28 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 80108ECC 00105E2C C0 23 00 00 */ lfs f1, 0(r3) -/* 80108ED0 00105E30 38 84 D9 10 */ addi r4, r4, lbl_803ED910@l +/* 80108ED0 00105E30 38 84 D9 10 */ addi r4, r4, mViewport__9CGraphics@l /* 80108ED4 00105E34 C0 02 94 90 */ lfs f0, lbl_805AB1B0@sda21(r2) /* 80108ED8 00105E38 83 44 00 08 */ lwz r26, 8(r4) /* 80108EDC 00105E3C 83 A4 00 0C */ lwz r29, 0xc(r4) @@ -2687,7 +2687,7 @@ lbl_80108DE8: /* 80108EE8 00105E48 57 45 04 3E */ clrlwi r5, r26, 0x10 /* 80108EEC 00105E4C 80 04 00 04 */ lwz r0, 4(r4) /* 80108EF0 00105E50 57 A6 04 3E */ clrlwi r6, r29, 0x10 -/* 80108EF4 00105E54 83 2D A8 28 */ lwz r25, lbl_805A93E8@sda21(r13) +/* 80108EF4 00105E54 83 2D A8 28 */ lwz r25, mpSpareBuffer__9CGraphics@sda21(r13) /* 80108EF8 00105E58 54 63 04 3E */ clrlwi r3, r3, 0x10 /* 80108EFC 00105E5C 54 04 04 3E */ clrlwi r4, r0, 0x10 /* 80108F00 00105E60 48 26 FE B5 */ bl GXSetTexCopySrc @@ -2730,11 +2730,11 @@ lbl_80108DE8: /* 80108F94 00105EF4 6F A3 80 00 */ xoris r3, r29, 0x8000 /* 80108F98 00105EF8 6F 40 80 00 */ xoris r0, r26, 0x8000 /* 80108F9C 00105EFC 90 61 01 1C */ stw r3, 0x11c(r1) -/* 80108FA0 00105F00 3C 60 80 5A */ lis r3, lbl_805A5EBC@ha +/* 80108FA0 00105F00 3C 60 80 5A */ lis r3, kEnvModulate__9CGraphics@ha /* 80108FA4 00105F04 90 A1 01 18 */ stw r5, 0x118(r1) /* 80108FA8 00105F08 EC 1F 00 32 */ fmuls f0, f31, f0 /* 80108FAC 00105F0C C8 82 94 B8 */ lfd f4, lbl_805AB1D8@sda21(r2) -/* 80108FB0 00105F10 38 83 5E BC */ addi r4, r3, lbl_805A5EBC@l +/* 80108FB0 00105F10 38 83 5E BC */ addi r4, r3, kEnvModulate__9CGraphics@l /* 80108FB4 00105F14 C8 21 01 18 */ lfd f1, 0x118(r1) /* 80108FB8 00105F18 38 60 00 00 */ li r3, 0 /* 80108FBC 00105F1C EC 5F 00 32 */ fmuls f2, f31, f0 @@ -2757,7 +2757,7 @@ lbl_80108DE8: /* 80109000 00105F60 EF 06 00 32 */ fmuls f24, f6, f0 /* 80109004 00105F64 FF 20 C0 50 */ fneg f25, f24 /* 80109008 00105F68 48 20 12 B1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8010900C 00105F6C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8010900C 00105F6C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80109010 00105F70 38 60 00 01 */ li r3, 1 /* 80109014 00105F74 48 20 12 A5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80109018 00105F78 38 60 00 98 */ li r3, 0x98 diff --git a/asm/MetroidPrime/CMappableObject.s b/asm/MetroidPrime/CMappableObject.s index 282b172f..9656ff03 100644 --- a/asm/MetroidPrime/CMappableObject.s +++ b/asm/MetroidPrime/CMappableObject.s @@ -833,9 +833,9 @@ lbl_800E9044: /* 800E90A0 000E6000 38 80 00 00 */ li r4, 0 /* 800E90A4 000E6004 38 A0 00 01 */ li r5, 1 /* 800E90A8 000E6008 48 22 66 95 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode -/* 800E90AC 000E600C 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 800E90AC 000E600C 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 800E90B0 000E6010 38 60 00 00 */ li r3, 0 -/* 800E90B4 000E6014 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 800E90B4 000E6014 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 800E90B8 000E6018 48 22 12 01 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 800E90BC 000E601C 38 60 00 98 */ li r3, 0x98 /* 800E90C0 000E6020 48 22 25 A9 */ bl StreamBegin__9CGraphicsF13ERglPrimitive diff --git a/asm/MetroidPrime/CNESEmulator.s b/asm/MetroidPrime/CNESEmulator.s index 3aabaca3..1b22e68a 100644 --- a/asm/MetroidPrime/CNESEmulator.s +++ b/asm/MetroidPrime/CNESEmulator.s @@ -211,13 +211,13 @@ lbl_80293C38: /* 80293D94 00290CF4 38 61 00 08 */ addi r3, r1, 8 /* 80293D98 00290CF8 38 80 00 00 */ li r4, 0 /* 80293D9C 00290CFC 48 0E 66 F9 */ bl GXLoadTexObj -/* 80293DA0 00290D00 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 80293DA4 00290D04 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha -/* 80293DA8 00290D08 38 A3 D9 10 */ addi r5, r3, lbl_803ED910@l +/* 80293DA0 00290D00 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 80293DA4 00290D04 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha +/* 80293DA8 00290D08 38 A3 D9 10 */ addi r5, r3, mViewport__9CGraphics@l /* 80293DAC 00290D0C 83 C5 00 00 */ lwz r30, 0(r5) /* 80293DB0 00290D10 38 60 00 00 */ li r3, 0 /* 80293DB4 00290D14 83 A5 00 04 */ lwz r29, 4(r5) -/* 80293DB8 00290D18 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80293DB8 00290D18 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80293DBC 00290D1C 83 85 00 08 */ lwz r28, 8(r5) /* 80293DC0 00290D20 83 65 00 0C */ lwz r27, 0xc(r5) /* 80293DC4 00290D24 48 07 64 F5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass @@ -258,9 +258,9 @@ sub_80293e2c: /* 80293E40 00290DA0 DB C1 00 A0 */ stfd f30, 0xa0(r1) /* 80293E44 00290DA4 F3 C1 00 A8 */ psq_st f30, 168(r1), 0, qr0 /* 80293E48 00290DA8 BF 21 00 84 */ stmw r25, 0x84(r1) -/* 80293E4C 00290DAC 3D 00 80 3F */ lis r8, lbl_803ED910@ha +/* 80293E4C 00290DAC 3D 00 80 3F */ lis r8, mViewport__9CGraphics@ha /* 80293E50 00290DB0 7C 79 1B 78 */ mr r25, r3 -/* 80293E54 00290DB4 39 48 D9 10 */ addi r10, r8, lbl_803ED910@l +/* 80293E54 00290DB4 39 48 D9 10 */ addi r10, r8, mViewport__9CGraphics@l /* 80293E58 00290DB8 7C 9A 23 78 */ mr r26, r4 /* 80293E5C 00290DBC 81 2A 00 00 */ lwz r9, 0(r10) /* 80293E60 00290DC0 7C BB 2B 78 */ mr r27, r5 diff --git a/asm/MetroidPrime/CProjectedShadow.s b/asm/MetroidPrime/CProjectedShadow.s index 99494ee4..96984739 100644 --- a/asm/MetroidPrime/CProjectedShadow.s +++ b/asm/MetroidPrime/CProjectedShadow.s @@ -520,16 +520,16 @@ RenderShadowBuffer__16CProjectedShadowFR13CStateManagerRC10CModelDataRC12CTransf /* 8029DE2C 0029AD8C D3 D7 00 94 */ stfs f30, 0x94(r23) /* 8029DE30 0029AD90 98 17 00 80 */ stb r0, 0x80(r23) /* 8029DE34 0029AD94 48 00 03 E1 */ bl sub_8029e214 -/* 8029DE38 0029AD98 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 8029DE38 0029AD98 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 8029DE3C 0029AD9C 38 61 01 34 */ addi r3, r1, 0x134 -/* 8029DE40 0029ADA0 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 8029DE40 0029ADA0 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 8029DE44 0029ADA4 48 07 4D 31 */ bl __ct__12CTransform4fFRC12CTransform4f -/* 8029DE48 0029ADA8 C3 ED A7 E0 */ lfs f31, lbl_805A93A0@sda21(r13) -/* 8029DE4C 0029ADAC C3 CD 9C 78 */ lfs f30, lbl_805A8838@sda21(r13) +/* 8029DE48 0029ADA8 C3 ED A7 E0 */ lfs f31, mDepthNear__9CGraphics@sda21(r13) +/* 8029DE4C 0029ADAC C3 CD 9C 78 */ lfs f30, mDepthFar__9CGraphics@sda21(r13) /* 8029DE50 0029ADB0 48 06 C0 0D */ bl GetProjectionState__9CGraphicsFv /* 8029DE54 0029ADB4 88 03 00 00 */ lbz r0, 0(r3) -/* 8029DE58 0029ADB8 3C 80 80 3F */ lis r4, lbl_803ED910@ha -/* 8029DE5C 0029ADBC 3B 84 D9 10 */ addi r28, r4, lbl_803ED910@l +/* 8029DE58 0029ADB8 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha +/* 8029DE5C 0029ADBC 3B 84 D9 10 */ addi r28, r4, mViewport__9CGraphics@l /* 8029DE60 0029ADC0 3C A0 80 5A */ lis r5, sDownVector__9CVector3f@ha /* 8029DE64 0029ADC4 98 01 00 58 */ stb r0, 0x58(r1) /* 8029DE68 0029ADC8 3C 80 80 5A */ lis r4, sRightVector__9CVector3f@ha @@ -608,8 +608,8 @@ RenderShadowBuffer__16CProjectedShadowFR13CStateManagerRC10CModelDataRC12CTransf /* 8029DF8C 0029AEEC FC 80 18 50 */ fneg f4, f3 /* 8029DF90 0029AEF0 48 06 E5 C5 */ bl SetOrtho__9CGraphicsFffffff /* 8029DF94 0029AEF4 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) -/* 8029DF98 0029AEF8 3C 80 80 5A */ lis r4, lbl_805A6500@ha -/* 8029DF9C 0029AEFC 38 84 65 00 */ addi r4, r4, lbl_805A6500@l +/* 8029DF98 0029AEF8 3C 80 80 5A */ lis r4, mRenderModeObj__9CGraphics@ha +/* 8029DF9C 0029AEFC 38 84 65 00 */ addi r4, r4, mRenderModeObj__9CGraphics@l /* 8029DFA0 0029AF00 7F A6 EB 78 */ mr r6, r29 /* 8029DFA4 0029AF04 81 83 00 00 */ lwz r12, 0(r3) /* 8029DFA8 0029AF08 7F 87 E3 78 */ mr r7, r28 diff --git a/asm/MetroidPrime/CRainSplashGenerator.s b/asm/MetroidPrime/CRainSplashGenerator.s index 7ed216d9..015d1f64 100644 --- a/asm/MetroidPrime/CRainSplashGenerator.s +++ b/asm/MetroidPrime/CRainSplashGenerator.s @@ -443,10 +443,10 @@ DoDraw__20CRainSplashGeneratorCFRC12CTransform4f: /* 8026A2A4 00267204 38 80 00 03 */ li r4, 3 /* 8026A2A8 00267208 38 A0 00 00 */ li r5, 0 /* 8026A2AC 0026720C 48 09 E5 D1 */ bl SetZMode__3CGXFb10_GXCompareb -/* 8026A2B0 00267210 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8026A2B0 00267210 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8026A2B4 00267214 38 60 00 00 */ li r3, 0 /* 8026A2B8 00267218 48 0A 00 01 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8026A2BC 0026721C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8026A2BC 0026721C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8026A2C0 00267220 38 60 00 01 */ li r3, 1 /* 8026A2C4 00267224 48 09 FF F5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8026A2C8 00267228 7F A3 EB 78 */ mr r3, r29 diff --git a/asm/MetroidPrime/CSamusDoll.s b/asm/MetroidPrime/CSamusDoll.s index 37701bfb..0a1c7699 100644 --- a/asm/MetroidPrime/CSamusDoll.s +++ b/asm/MetroidPrime/CSamusDoll.s @@ -1236,10 +1236,10 @@ Draw__10CSamusDollFRC13CStateManagerf: /* 800DB708 000D8668 4B F3 0B AD */ bl "Clamp__5CMathFRCfRCfRCf" /* 800DB70C 000D866C C0 1F 00 C4 */ lfs f0, 0xc4(r31) /* 800DB710 000D8670 3C 80 43 30 */ lis r4, 0x4330 -/* 800DB714 000D8674 3C A0 80 3F */ lis r5, lbl_803ED910@ha +/* 800DB714 000D8674 3C A0 80 3F */ lis r5, mViewport__9CGraphics@ha /* 800DB718 000D8678 C3 43 00 00 */ lfs f26, 0(r3) /* 800DB71C 000D867C FC 00 02 10 */ fabs f0, f0 -/* 800DB720 000D8680 38 A5 D9 10 */ addi r5, r5, lbl_803ED910@l +/* 800DB720 000D8680 38 A5 D9 10 */ addi r5, r5, mViewport__9CGraphics@l /* 800DB724 000D8684 80 65 00 08 */ lwz r3, 8(r5) /* 800DB728 000D8688 80 05 00 0C */ lwz r0, 0xc(r5) /* 800DB72C 000D868C FC 00 00 18 */ frsp f0, f0 diff --git a/asm/MetroidPrime/CSimpleShadow.s b/asm/MetroidPrime/CSimpleShadow.s index 123bafe1..cfcc9c5d 100644 --- a/asm/MetroidPrime/CSimpleShadow.s +++ b/asm/MetroidPrime/CSimpleShadow.s @@ -239,11 +239,11 @@ Render__13CSimpleShadowCFPC8CTexture: /* 80105D6C 00102CCC 38 80 00 00 */ li r4, 0 /* 80105D70 00102CD0 38 A0 00 01 */ li r5, 1 /* 80105D74 00102CD4 48 20 99 C9 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode -/* 80105D78 00102CD8 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 80105D78 00102CD8 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80105D7C 00102CDC 38 60 00 00 */ li r3, 0 -/* 80105D80 00102CE0 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80105D80 00102CE0 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80105D84 00102CE4 48 20 45 35 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80105D88 00102CE8 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80105D88 00102CE8 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80105D8C 00102CEC 38 60 00 01 */ li r3, 1 /* 80105D90 00102CF0 48 20 45 29 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80105D94 00102CF4 38 60 00 07 */ li r3, 7 diff --git a/asm/MetroidPrime/CSlideShow.s b/asm/MetroidPrime/CSlideShow.s index eaced8b0..e0009e6f 100644 --- a/asm/MetroidPrime/CSlideShow.s +++ b/asm/MetroidPrime/CSlideShow.s @@ -306,8 +306,8 @@ lbl_80297C4C: /* 80297C50 00294BB0 41 82 00 FC */ beq lbl_80297D4C /* 80297C54 00294BB4 48 0A 91 B9 */ bl GetObj__6CTokenFv /* 80297C58 00294BB8 80 83 00 04 */ lwz r4, 4(r3) -/* 80297C5C 00294BBC 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 80297C60 00294BC0 38 A3 D9 10 */ addi r5, r3, lbl_803ED910@l +/* 80297C5C 00294BBC 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 80297C60 00294BC0 38 A3 D9 10 */ addi r5, r3, mViewport__9CGraphics@l /* 80297C64 00294BC4 3C E0 43 30 */ lis r7, 0x4330 /* 80297C68 00294BC8 A8 04 00 04 */ lha r0, 4(r4) /* 80297C6C 00294BCC 38 6D A5 A8 */ addi r3, r13, lbl_805A9168@sda21 @@ -412,9 +412,9 @@ lbl_80297DDC: /* 80297DDC 00294D3C 54 A0 06 3F */ clrlwi. r0, r5, 0x18 /* 80297DE0 00294D40 41 82 03 98 */ beq lbl_80298178 /* 80297DE4 00294D44 48 0A 90 29 */ bl GetObj__6CTokenFv -/* 80297DE8 00294D48 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 80297DE8 00294D48 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 80297DEC 00294D4C 3C C0 43 30 */ lis r6, 0x4330 -/* 80297DF0 00294D50 38 A4 D9 10 */ addi r5, r4, lbl_803ED910@l +/* 80297DF0 00294D50 38 A4 D9 10 */ addi r5, r4, mViewport__9CGraphics@l /* 80297DF4 00294D54 81 03 00 04 */ lwz r8, 4(r3) /* 80297DF8 00294D58 83 A5 00 08 */ lwz r29, 8(r5) /* 80297DFC 00294D5C 7F E4 FB 78 */ mr r4, r31 @@ -679,8 +679,8 @@ sub_802981c4: /* 802981EC 0029514C 28 00 00 00 */ cmplwi r0, 0 /* 802981F0 00295150 41 82 02 5C */ beq lbl_8029844C /* 802981F4 00295154 80 8D A0 68 */ lwz r4, gpRender@sda21(r13) -/* 802981F8 00295158 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 802981FC 0029515C 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 802981F8 00295158 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 802981FC 0029515C 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 80298200 00295160 38 61 00 34 */ addi r3, r1, 0x34 /* 80298204 00295164 81 84 00 00 */ lwz r12, 0(r4) /* 80298208 00295168 38 A0 00 01 */ li r5, 1 @@ -851,8 +851,8 @@ sub_80298470: /* 8029848C 002953EC 28 00 00 00 */ cmplwi r0, 0 /* 80298490 002953F0 41 82 00 B4 */ beq lbl_80298544 /* 80298494 002953F4 80 8D A0 68 */ lwz r4, gpRender@sda21(r13) -/* 80298498 002953F8 3C 60 80 3F */ lis r3, lbl_803ED910@ha -/* 8029849C 002953FC 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 80298498 002953F8 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha +/* 8029849C 002953FC 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 802984A0 00295400 38 61 00 08 */ addi r3, r1, 8 /* 802984A4 00295404 81 84 00 00 */ lwz r12, 0(r4) /* 802984A8 00295408 38 A0 00 00 */ li r5, 0 @@ -1026,8 +1026,8 @@ sub_802986e0: /* 80298714 00295674 28 00 00 00 */ cmplwi r0, 0 /* 80298718 00295678 41 82 01 AC */ beq lbl_802988C4 /* 8029871C 0029567C 80 6D A1 50 */ lwz r3, gpTweakSlideShow@sda21(r13) -/* 80298720 00295680 3C 80 80 3F */ lis r4, lbl_803ED910@ha -/* 80298724 00295684 38 A4 D9 10 */ addi r5, r4, lbl_803ED910@l +/* 80298720 00295680 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha +/* 80298724 00295684 38 A4 D9 10 */ addi r5, r4, mViewport__9CGraphics@l /* 80298728 00295688 C0 1F 00 58 */ lfs f0, 0x58(r31) /* 8029872C 0029568C C0 23 00 50 */ lfs f1, 0x50(r3) /* 80298730 00295690 38 81 00 14 */ addi r4, r1, 0x14 @@ -1891,9 +1891,9 @@ lbl_802993A4: sub_802993c8: /* 802993C8 00296328 94 21 FF E0 */ stwu r1, -0x20(r1) /* 802993CC 0029632C 7C 08 02 A6 */ mflr r0 -/* 802993D0 00296330 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 802993D0 00296330 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 802993D4 00296334 90 01 00 24 */ stw r0, 0x24(r1) -/* 802993D8 00296338 38 84 D9 10 */ addi r4, r4, lbl_803ED910@l +/* 802993D8 00296338 38 84 D9 10 */ addi r4, r4, mViewport__9CGraphics@l /* 802993DC 0029633C 93 E1 00 1C */ stw r31, 0x1c(r1) /* 802993E0 00296340 80 63 00 38 */ lwz r3, 0x38(r3) /* 802993E4 00296344 83 E4 00 08 */ lwz r31, 8(r4) @@ -4581,9 +4581,9 @@ __ct__10CSlideShowFv: /* 8029B984 002988E4 38 84 00 04 */ addi r4, r4, 4 /* 8029B988 002988E8 48 09 FB D5 */ bl "AddPakFileAsync__10CResLoaderFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>b" /* 8029B98C 002988EC 80 6D A0 60 */ lwz r3, gpResourceFactory@sda21(r13) -/* 8029B990 002988F0 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 8029B990 002988F0 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 8029B994 002988F4 80 AD A1 50 */ lwz r5, gpTweakSlideShow@sda21(r13) -/* 8029B998 002988F8 38 84 D9 10 */ addi r4, r4, lbl_803ED910@l +/* 8029B998 002988F8 38 84 D9 10 */ addi r4, r4, mViewport__9CGraphics@l /* 8029B99C 002988FC 81 83 00 00 */ lwz r12, 0(r3) /* 8029B9A0 00298900 3B 65 00 24 */ addi r27, r5, 0x24 /* 8029B9A4 00298904 3B 45 00 28 */ addi r26, r5, 0x28 @@ -4923,11 +4923,11 @@ lbl_8029BE04: /* 8029BE98 00298DF8 48 07 72 A9 */ bl Translate__12CTransform4fFRC9CVector3f /* 8029BE9C 00298DFC 38 61 00 2C */ addi r3, r1, 0x2c /* 8029BEA0 00298E00 48 07 07 41 */ bl SetModelMatrix__9CGraphicsFRC12CTransform4f -/* 8029BEA4 00298E04 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 8029BEA4 00298E04 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 8029BEA8 00298E08 38 60 00 00 */ li r3, 0 -/* 8029BEAC 00298E0C 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 8029BEAC 00298E0C 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 8029BEB0 00298E10 48 06 E4 09 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8029BEB4 00298E14 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8029BEB4 00298E14 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8029BEB8 00298E18 38 60 00 01 */ li r3, 1 /* 8029BEBC 00298E1C 48 06 E3 FD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8029BEC0 00298E20 7F E3 FB 78 */ mr r3, r31 diff --git a/asm/MetroidPrime/CSplashScreen.s b/asm/MetroidPrime/CSplashScreen.s index 3830e975..9714558a 100644 --- a/asm/MetroidPrime/CSplashScreen.s +++ b/asm/MetroidPrime/CSplashScreen.s @@ -243,11 +243,11 @@ lbl_8002832C: /* 80028360 000252C0 3C 60 80 5A */ lis r3, sIdentity__12CTransform4f@ha /* 80028364 000252C4 38 63 66 70 */ addi r3, r3, sIdentity__12CTransform4f@l /* 80028368 000252C8 48 2E 43 E5 */ bl SetViewPointMatrix__9CGraphicsFRC12CTransform4f -/* 8002836C 000252CC 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 8002836C 000252CC 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80028370 000252D0 38 60 00 00 */ li r3, 0 -/* 80028374 000252D4 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80028374 000252D4 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80028378 000252D8 48 2E 1F 41 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8002837C 000252DC 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8002837C 000252DC 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80028380 000252E0 38 60 00 01 */ li r3, 1 /* 80028384 000252E4 48 2E 1F 35 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80028388 000252E8 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) @@ -396,9 +396,9 @@ lbl_80028404: /* 800285C0 00025520 48 2E 34 B1 */ bl SetCullMode__9CGraphicsF12ERglCullMode /* 800285C4 00025524 48 00 00 28 */ b lbl_800285EC lbl_800285C8: -/* 800285C8 00025528 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 800285C8 00025528 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 800285CC 0002552C 7F A3 EB 78 */ mr r3, r29 -/* 800285D0 00025530 38 E4 D9 10 */ addi r7, r4, lbl_803ED910@l +/* 800285D0 00025530 38 E4 D9 10 */ addi r7, r4, mViewport__9CGraphics@l /* 800285D4 00025534 39 01 00 20 */ addi r8, r1, 0x20 /* 800285D8 00025538 80 87 00 00 */ lwz r4, 0(r7) /* 800285DC 0002553C 80 A7 00 04 */ lwz r5, 4(r7) @@ -406,9 +406,9 @@ lbl_800285C8: /* 800285E4 00025544 80 E7 00 0C */ lwz r7, 0xc(r7) /* 800285E8 00025548 48 2E 31 75 */ bl Render2D__9CGraphicsFRC8CTextureiiiiRC6CColor lbl_800285EC: -/* 800285EC 0002554C 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 800285EC 0002554C 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 800285F0 00025550 38 61 01 4C */ addi r3, r1, 0x14c -/* 800285F4 00025554 39 24 D9 10 */ addi r9, r4, lbl_803ED910@l +/* 800285F4 00025554 39 24 D9 10 */ addi r9, r4, mViewport__9CGraphics@l /* 800285F8 00025558 81 09 00 00 */ lwz r8, 0(r9) /* 800285FC 0002555C 80 E9 00 04 */ lwz r7, 4(r9) /* 80028600 00025560 80 C9 00 08 */ lwz r6, 8(r9) diff --git a/asm/MetroidPrime/CStateManager.s b/asm/MetroidPrime/CStateManager.s index bada97f0..004adf76 100644 --- a/asm/MetroidPrime/CStateManager.s +++ b/asm/MetroidPrime/CStateManager.s @@ -2187,9 +2187,9 @@ DrawReflection__13CStateManagerFRC9CVector3f: /* 800455C0 00042520 38 61 00 FC */ addi r3, r1, 0xfc /* 800455C4 00042524 38 81 00 9C */ addi r4, r1, 0x9c /* 800455C8 00042528 48 2C D5 AD */ bl __ct__12CTransform4fFRC12CTransform4f -/* 800455CC 0004252C 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 800455CC 0004252C 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 800455D0 00042530 38 61 00 CC */ addi r3, r1, 0xcc -/* 800455D4 00042534 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 800455D4 00042534 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 800455D8 00042538 48 2C D5 9D */ bl __ct__12CTransform4fFRC12CTransform4f /* 800455DC 0004253C 38 61 00 FC */ addi r3, r1, 0xfc /* 800455E0 00042540 48 2C 71 6D */ bl SetViewPointMatrix__9CGraphicsFRC12CTransform4f @@ -2200,9 +2200,9 @@ DrawReflection__13CStateManagerFRC9CVector3f: /* 800455F4 00042554 48 2C 48 69 */ bl GetProjectionState__9CGraphicsFv /* 800455F8 00042558 88 03 00 00 */ lbz r0, 0(r3) /* 800455FC 0004255C 3C 80 43 30 */ lis r4, 0x4330 -/* 80045600 00042560 3C A0 80 3F */ lis r5, lbl_803ED910@ha +/* 80045600 00042560 3C A0 80 3F */ lis r5, mViewport__9CGraphics@ha /* 80045604 00042564 90 81 01 30 */ stw r4, 0x130(r1) -/* 80045608 00042568 38 C5 D9 10 */ addi r6, r5, lbl_803ED910@l +/* 80045608 00042568 38 C5 D9 10 */ addi r6, r5, mViewport__9CGraphics@l /* 8004560C 0004256C C8 22 85 A8 */ lfd f1, lbl_805AA2C8@sda21(r2) /* 80045610 00042570 98 01 00 68 */ stb r0, 0x68(r1) /* 80045614 00042574 80 A6 00 08 */ lwz r5, 8(r6) @@ -2829,9 +2829,9 @@ ResetViewAfterDraw__13CStateManagerCFRCQ29CGraphics9CViewportRC12CTransform4f: /* 80045EA4 00042E04 81 8C 00 58 */ lwz r12, 0x58(r12) /* 80045EA8 00042E08 7D 89 03 A6 */ mtctr r12 /* 80045EAC 00042E0C 4E 80 04 21 */ bctrl -/* 80045EB0 00042E10 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80045EB0 00042E10 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 80045EB4 00042E14 3C 80 43 30 */ lis r4, 0x4330 -/* 80045EB8 00042E18 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 80045EB8 00042E18 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 80045EBC 00042E1C 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) /* 80045EC0 00042E20 80 A6 00 08 */ lwz r5, 8(r6) /* 80045EC4 00042E24 80 06 00 0C */ lwz r0, 0xc(r6) @@ -2895,9 +2895,9 @@ DrawWorld__13CStateManagerCFv: /* 80045F90 00042EF0 38 61 00 90 */ addi r3, r1, 0x90 /* 80045F94 00042EF4 38 90 0F 14 */ addi r4, r16, 0xf14 /* 80045F98 00042EF8 48 31 23 3D */ bl __ct__13CTimeProviderFRCf -/* 80045F9C 00042EFC 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80045F9C 00042EFC 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 80045FA0 00042F00 7E 04 83 78 */ mr r4, r16 -/* 80045FA4 00042F04 39 63 D9 10 */ addi r11, r3, lbl_803ED910@l +/* 80045FA4 00042F04 39 63 D9 10 */ addi r11, r3, mViewport__9CGraphics@l /* 80045FA8 00042F08 38 61 01 54 */ addi r3, r1, 0x154 /* 80045FAC 00042F0C 81 4B 00 00 */ lwz r10, 0(r11) /* 80045FB0 00042F10 38 A1 00 B0 */ addi r5, r1, 0xb0 @@ -2960,9 +2960,9 @@ lbl_8004607C: /* 8004607C 00042FDC 42 00 00 00 */ bdnz lbl_8004607C lbl_80046080: /* 80046080 00042FE0 38 00 00 00 */ li r0, 0 -/* 80046084 00042FE4 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 80046084 00042FE4 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 80046088 00042FE8 90 01 01 54 */ stw r0, 0x154(r1) -/* 8004608C 00042FEC 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 8004608C 00042FEC 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 80046090 00042FF0 38 61 01 24 */ addi r3, r1, 0x124 /* 80046094 00042FF4 48 2C CA E1 */ bl __ct__12CTransform4fFRC12CTransform4f /* 80046098 00042FF8 7E 04 83 78 */ mr r4, r16 @@ -4518,9 +4518,9 @@ GetVisSetForArea__13CStateManagerCF7TAreaId7TAreaId: /* 80047674 000445D4 38 60 00 00 */ li r3, 0 /* 80047678 000445D8 48 00 03 14 */ b lbl_8004798C lbl_8004767C: -/* 8004767C 000445DC 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 8004767C 000445DC 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 80047680 000445E0 80 1D 00 00 */ lwz r0, 0(r29) -/* 80047684 000445E4 38 63 61 D4 */ addi r3, r3, lbl_805A61D4@l +/* 80047684 000445E4 38 63 61 D4 */ addi r3, r3, mViewMatrix__9CGraphics@l /* 80047688 000445E8 3B E0 00 00 */ li r31, 0 /* 8004768C 000445EC C3 A3 00 2C */ lfs f29, 0x2c(r3) /* 80047690 000445F0 7C 00 28 00 */ cmpw r0, r5 diff --git a/asm/MetroidPrime/CTargetReticles.s b/asm/MetroidPrime/CTargetReticles.s index cd37f48d..2a85f807 100644 --- a/asm/MetroidPrime/CTargetReticles.s +++ b/asm/MetroidPrime/CTargetReticles.s @@ -361,9 +361,9 @@ lbl_800BC34C: /* 800BC3C0 000B9320 81 8C 00 58 */ lwz r12, 0x58(r12) /* 800BC3C4 000B9324 7D 89 03 A6 */ mtctr r12 /* 800BC3C8 000B9328 4E 80 04 21 */ bctrl -/* 800BC3CC 000B932C 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 800BC3CC 000B932C 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 800BC3D0 000B9330 3C 80 43 30 */ lis r4, 0x4330 -/* 800BC3D4 000B9334 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 800BC3D4 000B9334 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 800BC3D8 000B9338 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) /* 800BC3DC 000B933C 80 A6 00 08 */ lwz r5, 8(r6) /* 800BC3E0 000B9340 80 06 00 0C */ lwz r0, 0xc(r6) @@ -978,9 +978,9 @@ Draw__17CTargetingManagerCFRC13CStateManager: /* 800BCC74 000B9BD4 81 8C 00 58 */ lwz r12, 0x58(r12) /* 800BCC78 000B9BD8 7D 89 03 A6 */ mtctr r12 /* 800BCC7C 000B9BDC 4E 80 04 21 */ bctrl -/* 800BCC80 000B9BE0 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 800BCC80 000B9BE0 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 800BCC84 000B9BE4 3C 80 43 30 */ lis r4, 0x4330 -/* 800BCC88 000B9BE8 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 800BCC88 000B9BE8 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 800BCC8C 000B9BEC 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) /* 800BCC90 000B9BF0 80 A6 00 08 */ lwz r5, 8(r6) /* 800BCC94 000B9BF4 80 06 00 0C */ lwz r0, 0xc(r6) @@ -1273,9 +1273,9 @@ CalculateClampedScale__22CCompoundTargetReticleF9CVector3ffffRC13CStateManager: /* 800BD0A8 000BA008 38 61 00 2C */ addi r3, r1, 0x2c /* 800BD0AC 000BA00C 38 A1 00 20 */ addi r5, r1, 0x20 /* 800BD0B0 000BA010 48 25 36 A1 */ bl MultiplyOneOverW__9CMatrix4fCFRC9CVector3f -/* 800BD0B4 000BA014 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 800BD0B4 000BA014 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 800BD0B8 000BA018 3C 00 43 30 */ lis r0, 0x4330 -/* 800BD0BC 000BA01C 38 63 D9 10 */ addi r3, r3, lbl_803ED910@l +/* 800BD0BC 000BA01C 38 63 D9 10 */ addi r3, r3, mViewport__9CGraphics@l /* 800BD0C0 000BA020 C0 01 00 2C */ lfs f0, 0x2c(r1) /* 800BD0C4 000BA024 80 83 00 08 */ lwz r4, 8(r3) /* 800BD0C8 000BA028 38 61 00 08 */ addi r3, r1, 8 diff --git a/asm/MetroidPrime/CVisorFlare.s b/asm/MetroidPrime/CVisorFlare.s index ae1c37d0..a28f4e43 100644 --- a/asm/MetroidPrime/CVisorFlare.s +++ b/asm/MetroidPrime/CVisorFlare.s @@ -174,11 +174,11 @@ lbl_802077E0: /* 802077EC 0020474C 7D 89 03 A6 */ mtctr r12 /* 802077F0 00204750 4E 80 04 21 */ bctrl lbl_802077F4: -/* 802077F4 00204754 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 802077F4 00204754 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 802077F8 00204758 38 60 00 00 */ li r3, 0 -/* 802077FC 0020475C 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 802077FC 0020475C 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80207800 00204760 48 10 2A B9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80207804 00204764 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80207804 00204764 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80207808 00204768 38 60 00 01 */ li r3, 1 /* 8020780C 0020476C 48 10 2A AD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_80207810: @@ -419,9 +419,9 @@ lbl_80207B60: /* 80207B84 00204AE4 7F E4 FB 78 */ mr r4, r31 /* 80207B88 00204AE8 4B E0 3F 91 */ bl GetCurrentCamera__14CCameraManagerCFR13CStateManager /* 80207B8C 00204AEC 7C 7D 1B 78 */ mr r29, r3 -/* 80207B90 00204AF0 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 80207B90 00204AF0 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 80207B94 00204AF4 C0 BD 00 60 */ lfs f5, 0x60(r29) -/* 80207B98 00204AF8 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 80207B98 00204AF8 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 80207B9C 00204AFC C0 9D 00 50 */ lfs f4, 0x50(r29) /* 80207BA0 00204B00 38 61 01 30 */ addi r3, r1, 0x130 /* 80207BA4 00204B04 C0 7D 00 40 */ lfs f3, 0x40(r29) diff --git a/asm/MetroidPrime/CWorldShadow.s b/asm/MetroidPrime/CWorldShadow.s index bb92ba6d..92e18918 100644 --- a/asm/MetroidPrime/CWorldShadow.s +++ b/asm/MetroidPrime/CWorldShadow.s @@ -499,14 +499,14 @@ lbl_801113AC: /* 8011154C 0010E4AC EC 60 18 28 */ fsubs f3, f0, f3 /* 80111550 0010E4B0 7D 89 03 A6 */ mtctr r12 /* 80111554 0010E4B4 4E 80 04 21 */ bctrl -/* 80111558 0010E4B8 C3 ED A7 E0 */ lfs f31, lbl_805A93A0@sda21(r13) -/* 8011155C 0010E4BC C3 CD 9C 78 */ lfs f30, lbl_805A8838@sda21(r13) +/* 80111558 0010E4B8 C3 ED A7 E0 */ lfs f31, mDepthNear__9CGraphics@sda21(r13) +/* 8011155C 0010E4BC C3 CD 9C 78 */ lfs f30, mDepthFar__9CGraphics@sda21(r13) /* 80111560 0010E4C0 C0 22 95 88 */ lfs f1, lbl_805AB2A8@sda21(r2) /* 80111564 0010E4C4 C0 42 95 8C */ lfs f2, lbl_805AB2AC@sda21(r2) /* 80111568 0010E4C8 48 1F 8E 79 */ bl SetDepthRange__9CGraphicsFff /* 8011156C 0010E4CC 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) -/* 80111570 0010E4D0 3C 80 80 3F */ lis r4, lbl_803ED910@ha -/* 80111574 0010E4D4 39 04 D9 10 */ addi r8, r4, lbl_803ED910@l +/* 80111570 0010E4D0 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha +/* 80111574 0010E4D4 39 04 D9 10 */ addi r8, r4, mViewport__9CGraphics@l /* 80111578 0010E4D8 80 FF 00 00 */ lwz r7, 0(r31) /* 8011157C 0010E4DC 81 83 00 00 */ lwz r12, 0(r3) /* 80111580 0010E4E0 38 80 00 00 */ li r4, 0 @@ -573,10 +573,10 @@ lbl_801113AC: /* 80111674 0010E5D4 38 A0 00 05 */ li r5, 5 /* 80111678 0010E5D8 38 C0 00 00 */ li r6, 0 /* 8011167C 0010E5DC 48 1F A3 D5 */ bl SetBlendMode__9CGraphicsF13ERglBlendMode15ERglBlendFactor15ERglBlendFactor11ERglLogicOp -/* 80111680 0010E5E0 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80111680 0010E5E0 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80111684 0010E5E4 38 60 00 00 */ li r3, 0 /* 80111688 0010E5E8 48 1F 8C 31 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8011168C 0010E5EC 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8011168C 0010E5EC 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80111690 0010E5F0 38 60 00 01 */ li r3, 1 /* 80111694 0010E5F4 48 1F 8C 25 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80111698 0010E5F8 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) @@ -706,10 +706,10 @@ lbl_801117FC: /* 8011187C 0010E7DC 38 A0 00 05 */ li r5, 5 /* 80111880 0010E7E0 38 C0 00 00 */ li r6, 0 /* 80111884 0010E7E4 48 1F A1 CD */ bl SetBlendMode__9CGraphicsF13ERglBlendMode15ERglBlendFactor15ERglBlendFactor11ERglLogicOp -/* 80111888 0010E7E8 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80111888 0010E7E8 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8011188C 0010E7EC 38 60 00 00 */ li r3, 0 /* 80111890 0010E7F0 48 1F 8A 29 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80111894 0010E7F4 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80111894 0010E7F4 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80111898 0010E7F8 38 60 00 01 */ li r3, 1 /* 8011189C 0010E7FC 48 1F 8A 1D */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 801118A0 0010E800 38 60 00 98 */ li r3, 0x98 @@ -769,11 +769,11 @@ lbl_80111930: /* 80111974 0010E8D4 38 C0 00 07 */ li r6, 7 /* 80111978 0010E8D8 38 E0 00 00 */ li r7, 0 /* 8011197C 0010E8DC 48 1F A0 AD */ bl SetAlphaCompare__9CGraphicsF13ERglAlphaFuncUc11ERglAlphaOp13ERglAlphaFuncUc -/* 80111980 0010E8E0 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 80111980 0010E8E0 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80111984 0010E8E4 38 60 00 00 */ li r3, 0 -/* 80111988 0010E8E8 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80111988 0010E8E8 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 8011198C 0010E8EC 48 1F 89 2D */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 80111990 0010E8F0 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80111990 0010E8F0 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80111994 0010E8F4 38 60 00 01 */ li r3, 1 /* 80111998 0010E8F8 48 1F 89 21 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8011199C 0010E8FC C0 22 95 8C */ lfs f1, lbl_805AB2AC@sda21(r2) diff --git a/asm/MetroidPrime/CWorldTransManager.s b/asm/MetroidPrime/CWorldTransManager.s index d45c4bad..2dde22f5 100644 --- a/asm/MetroidPrime/CWorldTransManager.s +++ b/asm/MetroidPrime/CWorldTransManager.s @@ -978,9 +978,9 @@ DrawEnabled__18CWorldTransManagerCFv: /* 80209AB8 00206A18 4B E0 26 11 */ bl DefaultNearPlane__14CCameraManagerFv /* 80209ABC 00206A1C FF C0 08 90 */ fmr f30, f1 /* 80209AC0 00206A20 4B E0 26 01 */ bl DefaultFarPlane__14CCameraManagerFv -/* 80209AC4 00206A24 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80209AC4 00206A24 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 80209AC8 00206A28 3C 80 43 30 */ lis r4, 0x4330 -/* 80209ACC 00206A2C 3B C3 D9 10 */ addi r30, r3, lbl_803ED910@l +/* 80209ACC 00206A2C 3B C3 D9 10 */ addi r30, r3, mViewport__9CGraphics@l /* 80209AD0 00206A30 FC 00 08 90 */ fmr f0, f1 /* 80209AD4 00206A34 80 7E 00 08 */ lwz r3, 8(r30) /* 80209AD8 00206A38 FC 20 F8 90 */ fmr f1, f31 @@ -1036,9 +1036,9 @@ lbl_80209B80: /* 80209B98 00206AF8 D0 01 00 10 */ stfs f0, 0x10(r1) /* 80209B9C 00206AFC 4B E0 27 19 */ bl "Clamp__5CMathFRCfRCfRCf" /* 80209BA0 00206B00 C0 23 00 00 */ lfs f1, 0(r3) -/* 80209BA4 00206B04 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80209BA4 00206B04 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 80209BA8 00206B08 C0 02 B1 30 */ lfs f0, lbl_805ACE50@sda21(r2) -/* 80209BAC 00206B0C 38 A3 D9 10 */ addi r5, r3, lbl_803ED910@l +/* 80209BAC 00206B0C 38 A3 D9 10 */ addi r5, r3, mViewport__9CGraphics@l /* 80209BB0 00206B10 80 9D 00 04 */ lwz r4, 4(r29) /* 80209BB4 00206B14 7F A3 EB 78 */ mr r3, r29 /* 80209BB8 00206B18 EF C0 08 28 */ fsubs f30, f0, f1 diff --git a/asm/MetroidPrime/Cameras/CCameraFilter.s b/asm/MetroidPrime/Cameras/CCameraFilter.s index 8f15f132..b0cd1846 100644 --- a/asm/MetroidPrime/Cameras/CCameraFilter.s +++ b/asm/MetroidPrime/Cameras/CCameraFilter.s @@ -231,7 +231,7 @@ AllocatePersistentFbTexture__15CCameraBlurPassFv: /* 800EA974 000E78D4 7C 7F 1B 78 */ mr r31, r3 /* 800EA978 000E78D8 38 60 01 40 */ li r3, 0x140 /* 800EA97C 000E78DC 48 28 F2 C5 */ bl GXGetTexBufferSize -/* 800EA980 000E78E0 80 0D A8 28 */ lwz r0, lbl_805A93E8@sda21(r13) +/* 800EA980 000E78E0 80 0D A8 28 */ lwz r0, mpSpareBuffer__9CGraphics@sda21(r13) /* 800EA984 000E78E4 90 1F 00 30 */ stw r0, 0x30(r31) /* 800EA988 000E78E8 80 01 00 14 */ lwz r0, 0x14(r1) /* 800EA98C 000E78EC 83 E1 00 0C */ lwz r31, 0xc(r1) @@ -243,11 +243,11 @@ AllocatePersistentFbTexture__15CCameraBlurPassFv: GetFbCopy__15CCameraBlurPassCF9_GXTexFmtPUc: /* 800EA99C 000E78FC 94 21 FF E0 */ stwu r1, -0x20(r1) /* 800EA9A0 000E7900 7C 08 02 A6 */ mflr r0 -/* 800EA9A4 000E7904 3C C0 80 3F */ lis r6, lbl_803ED910@ha +/* 800EA9A4 000E7904 3C C0 80 3F */ lis r6, mViewport__9CGraphics@ha /* 800EA9A8 000E7908 90 01 00 24 */ stw r0, 0x24(r1) /* 800EA9AC 000E790C 93 E1 00 1C */ stw r31, 0x1c(r1) /* 800EA9B0 000E7910 7C BF 2B 78 */ mr r31, r5 -/* 800EA9B4 000E7914 38 A6 D9 10 */ addi r5, r6, lbl_803ED910@l +/* 800EA9B4 000E7914 38 A6 D9 10 */ addi r5, r6, mViewport__9CGraphics@l /* 800EA9B8 000E7918 38 C0 01 C0 */ li r6, 0x1c0 /* 800EA9BC 000E791C 93 C1 00 18 */ stw r30, 0x18(r1) /* 800EA9C0 000E7920 7C 9E 23 78 */ mr r30, r4 @@ -362,7 +362,7 @@ Draw__15CCameraBlurPassCFv: /* 800EAB58 000E7AB8 83 D8 00 30 */ lwz r30, 0x30(r24) /* 800EAB5C 000E7ABC 48 00 00 08 */ b lbl_800EAB64 lbl_800EAB60: -/* 800EAB60 000E7AC0 83 CD A8 28 */ lwz r30, lbl_805A93E8@sda21(r13) +/* 800EAB60 000E7AC0 83 CD A8 28 */ lwz r30, mpSpareBuffer__9CGraphics@sda21(r13) lbl_800EAB64: /* 800EAB64 000E7AC4 2C 04 00 03 */ cmpwi r4, 3 /* 800EAB68 000E7AC8 3B 60 02 80 */ li r27, 0x280 @@ -426,9 +426,9 @@ lbl_800EAC28: /* 800EAC38 000E7B98 57 44 04 3E */ clrlwi r4, r26, 0x10 /* 800EAC3C 000E7B9C 48 21 F3 E5 */ bl LoadDolphinSpareTexture__9CGraphicsFii9_GXTexFmtPv11_GXTexMapID lbl_800EAC40: -/* 800EAC40 000E7BA0 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 800EAC40 000E7BA0 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 800EAC44 000E7BA4 3C A0 43 30 */ lis r5, 0x4330 -/* 800EAC48 000E7BA8 38 E3 D9 10 */ addi r7, r3, lbl_803ED910@l +/* 800EAC48 000E7BA8 38 E3 D9 10 */ addi r7, r3, mViewport__9CGraphics@l /* 800EAC4C 000E7BAC 90 A1 00 88 */ stw r5, 0x88(r1) /* 800EAC50 000E7BB0 80 07 00 08 */ lwz r0, 8(r7) /* 800EAC54 000E7BB4 80 87 00 0C */ lwz r4, 0xc(r7) @@ -2054,11 +2054,11 @@ DrawRandomStatic__17CCameraFilterPassFRC6CColorfb: /* 800EC3B8 000E9318 81 8C 00 60 */ lwz r12, 0x60(r12) /* 800EC3BC 000E931C 7D 89 03 A6 */ mtctr r12 /* 800EC3C0 000E9320 4E 80 04 21 */ bctrl -/* 800EC3C4 000E9324 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 800EC3C4 000E9324 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 800EC3C8 000E9328 38 60 00 00 */ li r3, 0 -/* 800EC3CC 000E932C 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 800EC3CC 000E932C 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 800EC3D0 000E9330 48 21 DE E9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 800EC3D4 000E9334 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 800EC3D4 000E9334 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 800EC3D8 000E9338 38 60 00 01 */ li r3, 1 /* 800EC3DC 000E933C 48 21 DE DD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 800EC3E0 000E9340 C3 E1 00 50 */ lfs f31, 0x50(r1) @@ -2093,11 +2093,11 @@ lbl_800EC440: /* 800EC450 000E93B0 81 8C 00 60 */ lwz r12, 0x60(r12) /* 800EC454 000E93B4 7D 89 03 A6 */ mtctr r12 /* 800EC458 000E93B8 4E 80 04 21 */ bctrl -/* 800EC45C 000E93BC 3C 80 80 5A */ lis r4, lbl_805A6038@ha +/* 800EC45C 000E93BC 3C 80 80 5A */ lis r4, kEnvModulateColor__9CGraphics@ha /* 800EC460 000E93C0 38 60 00 00 */ li r3, 0 -/* 800EC464 000E93C4 38 84 60 38 */ addi r4, r4, lbl_805A6038@l +/* 800EC464 000E93C4 38 84 60 38 */ addi r4, r4, kEnvModulateColor__9CGraphics@l /* 800EC468 000E93C8 48 21 DE 51 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 800EC46C 000E93CC 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 800EC46C 000E93CC 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 800EC470 000E93D0 38 60 00 01 */ li r3, 1 /* 800EC474 000E93D4 48 21 DE 45 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 800EC478 000E93D8 C3 81 00 50 */ lfs f28, 0x50(r1) @@ -2271,11 +2271,11 @@ DrawWideScreen__17CCameraFilterPassFRC6CColorPC8CTexturef: /* 800EC704 000E9664 38 A0 00 01 */ li r5, 1 /* 800EC708 000E9668 48 22 30 35 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode lbl_800EC70C: -/* 800EC70C 000E966C 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 800EC70C 000E966C 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 800EC710 000E9670 38 60 00 00 */ li r3, 0 -/* 800EC714 000E9674 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 800EC714 000E9674 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 800EC718 000E9678 48 21 DB A1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 800EC71C 000E967C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 800EC71C 000E967C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 800EC720 000E9680 38 60 00 01 */ li r3, 1 /* 800EC724 000E9684 48 21 DB 95 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 800EC728 000E9688 38 60 00 98 */ li r3, 0x98 @@ -2652,9 +2652,9 @@ DrawFullScreenTexturedQuadQuarters__17CCameraFilterPassFRC6CColorPC8CTexturef: /* 800ECCB8 000E9C18 7D 89 03 A6 */ mtctr r12 /* 800ECCBC 000E9C1C 4E 80 04 21 */ bctrl /* 800ECCC0 000E9C20 C0 61 00 38 */ lfs f3, 0x38(r1) -/* 800ECCC4 000E9C24 3C 60 80 5A */ lis r3, lbl_805A5EBC@ha +/* 800ECCC4 000E9C24 3C 60 80 5A */ lis r3, kEnvModulate__9CGraphics@ha /* 800ECCC8 000E9C28 C0 41 00 3C */ lfs f2, 0x3c(r1) -/* 800ECCCC 000E9C2C 38 83 5E BC */ addi r4, r3, lbl_805A5EBC@l +/* 800ECCCC 000E9C2C 38 83 5E BC */ addi r4, r3, kEnvModulate__9CGraphics@l /* 800ECCD0 000E9C30 C0 21 00 40 */ lfs f1, 0x40(r1) /* 800ECCD4 000E9C34 38 60 00 00 */ li r3, 0 /* 800ECCD8 000E9C38 C0 01 00 44 */ lfs f0, 0x44(r1) @@ -2663,7 +2663,7 @@ DrawFullScreenTexturedQuadQuarters__17CCameraFilterPassFRC6CColorPC8CTexturef: /* 800ECCE4 000E9C44 D0 21 00 50 */ stfs f1, 0x50(r1) /* 800ECCE8 000E9C48 D0 01 00 54 */ stfs f0, 0x54(r1) /* 800ECCEC 000E9C4C 48 21 D5 CD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 800ECCF0 000E9C50 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 800ECCF0 000E9C50 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 800ECCF4 000E9C54 38 60 00 01 */ li r3, 1 /* 800ECCF8 000E9C58 48 21 D5 C1 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 800ECCFC 000E9C5C 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) @@ -2815,11 +2815,11 @@ DrawFullScreenTexturedQuad__17CCameraFilterPassFRC6CColorPC8CTexturef: /* 800ECF20 000E9E80 38 A0 00 01 */ li r5, 1 /* 800ECF24 000E9E84 48 22 28 19 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode lbl_800ECF28: -/* 800ECF28 000E9E88 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 800ECF28 000E9E88 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 800ECF2C 000E9E8C 38 60 00 00 */ li r3, 0 -/* 800ECF30 000E9E90 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 800ECF30 000E9E90 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 800ECF34 000E9E94 48 21 D3 85 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 800ECF38 000E9E98 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 800ECF38 000E9E98 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 800ECF3C 000E9E9C 38 60 00 01 */ li r3, 1 /* 800ECF40 000E9EA0 48 21 D3 79 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 800ECF44 000E9EA4 38 60 00 98 */ li r3, 0x98 diff --git a/asm/MetroidPrime/Cameras/CCameraManager.s b/asm/MetroidPrime/Cameras/CCameraManager.s index 310aa335..e11a1471 100644 --- a/asm/MetroidPrime/Cameras/CCameraManager.s +++ b/asm/MetroidPrime/Cameras/CCameraManager.s @@ -3656,9 +3656,9 @@ __ct__14CCameraManagerF9TUniqueId: /* 8000C23C 0000919C D0 A1 00 18 */ stfs f5, 0x18(r1) /* 8000C240 000091A0 D0 A1 00 1C */ stfs f5, 0x1c(r1) /* 8000C244 000091A4 48 2D E1 F5 */ bl AddListener__11CSfxManagerFQ211CSfxManager12ESfxChannelsRC9CVector3fRC9CVector3fRC9CVector3fRC9CVector3ffffUiUc -/* 8000C248 000091A8 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8000C248 000091A8 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8000C24C 000091AC 3C 80 43 30 */ lis r4, 0x4330 -/* 8000C250 000091B0 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 8000C250 000091B0 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 8000C254 000091B4 90 81 00 20 */ stw r4, 0x20(r1) /* 8000C258 000091B8 80 A6 00 08 */ lwz r5, 8(r6) /* 8000C25C 000091BC 7F E3 FB 78 */ mr r3, r31 diff --git a/asm/MetroidPrime/Enemies/CDrone.s b/asm/MetroidPrime/Enemies/CDrone.s index a4692d65..87a291d6 100644 --- a/asm/MetroidPrime/Enemies/CDrone.s +++ b/asm/MetroidPrime/Enemies/CDrone.s @@ -9439,7 +9439,7 @@ sub_80166f10: /* 80167010 00163F70 38 A0 00 FF */ li r5, 0xff /* 80167014 00163F74 38 C0 00 04 */ li r6, 4 /* 80167018 00163F78 48 1A 19 35 */ bl SetTevOrder__3CGXF13_GXTevStageID13_GXTexCoordID11_GXTexMapID12_GXChannelID -/* 8016701C 00163F7C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8016701C 00163F7C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80167020 00163F80 38 60 00 00 */ li r3, 0 /* 80167024 00163F84 48 1A 32 95 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80167028 00163F88 57 A0 06 3F */ clrlwi. r0, r29, 0x18 diff --git a/asm/MetroidPrime/Enemies/COmegaPirate.s b/asm/MetroidPrime/Enemies/COmegaPirate.s index 3b5597f8..455d3bae 100644 --- a/asm/MetroidPrime/Enemies/COmegaPirate.s +++ b/asm/MetroidPrime/Enemies/COmegaPirate.s @@ -845,8 +845,8 @@ lbl_8028BAA0: /* 8028BAB0 00288A10 48 07 FF A1 */ bl SetBlendMode__9CGraphicsF13ERglBlendMode15ERglBlendFactor15ERglBlendFactor11ERglLogicOp lbl_8028BAB4: /* 8028BAB4 00288A14 C0 1E 00 FC */ lfs f0, 0xfc(r30) -/* 8028BAB8 00288A18 3C 60 80 5A */ lis r3, lbl_805A61D4@ha -/* 8028BABC 00288A1C 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 8028BAB8 00288A18 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha +/* 8028BABC 00288A1C 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 8028BAC0 00288A20 C2 FE 00 60 */ lfs f23, 0x60(r30) /* 8028BAC4 00288A24 EC 94 00 32 */ fmuls f4, f20, f0 /* 8028BAC8 00288A28 C0 24 00 00 */ lfs f1, 0(r4) @@ -868,12 +868,12 @@ lbl_8028BAB4: /* 8028BB08 00288A68 C3 3E 00 40 */ lfs f25, 0x40(r30) /* 8028BB0C 00288A6C 48 08 0A D5 */ bl SetModelMatrix__9CGraphicsFRC12CTransform4f /* 8028BB10 00288A70 48 0B E4 9D */ bl White__6CColorFv -/* 8028BB14 00288A74 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 8028BB14 00288A74 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 8028BB18 00288A78 83 E3 00 00 */ lwz r31, 0(r3) -/* 8028BB1C 00288A7C 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 8028BB1C 00288A7C 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 8028BB20 00288A80 38 60 00 00 */ li r3, 0 /* 8028BB24 00288A84 48 07 E7 95 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8028BB28 00288A88 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8028BB28 00288A88 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 8028BB2C 00288A8C 38 60 00 01 */ li r3, 1 /* 8028BB30 00288A90 48 07 E7 89 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8028BB34 00288A94 38 60 00 00 */ li r3, 0 diff --git a/asm/MetroidPrime/Enemies/CThardus.s b/asm/MetroidPrime/Enemies/CThardus.s index ea95e262..e522c2d8 100644 --- a/asm/MetroidPrime/Enemies/CThardus.s +++ b/asm/MetroidPrime/Enemies/CThardus.s @@ -10413,8 +10413,8 @@ sub_801e32a0: /* 801E3328 001E0288 38 A0 00 01 */ li r5, 1 /* 801E332C 001E028C 48 12 C4 11 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode /* 801E3330 001E0290 C0 02 AD 78 */ lfs f0, lbl_805ACA98@sda21(r2) -/* 801E3334 001E0294 3C 60 80 5A */ lis r3, lbl_805A61D4@ha -/* 801E3338 001E0298 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 801E3334 001E0294 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha +/* 801E3338 001E0298 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 801E333C 001E029C C3 3F 09 2C */ lfs f25, 0x92c(r31) /* 801E3340 001E02A0 EC 80 05 32 */ fmuls f4, f0, f20 /* 801E3344 001E02A4 C0 24 00 00 */ lfs f1, 0(r4) @@ -10439,11 +10439,11 @@ sub_801e32a0: /* 801E3390 001E02F0 38 A0 00 01 */ li r5, 1 /* 801E3394 001E02F4 38 C0 00 00 */ li r6, 0 /* 801E3398 001E02F8 48 12 86 B9 */ bl SetBlendMode__9CGraphicsF13ERglBlendMode15ERglBlendFactor15ERglBlendFactor11ERglLogicOp -/* 801E339C 001E02FC 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 801E339C 001E02FC 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 801E33A0 001E0300 38 60 00 00 */ li r3, 0 -/* 801E33A4 001E0304 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 801E33A4 001E0304 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 801E33A8 001E0308 48 12 6F 11 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 801E33AC 001E030C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 801E33AC 001E030C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 801E33B0 001E0310 38 60 00 01 */ li r3, 1 /* 801E33B4 001E0314 48 12 6F 05 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 801E33B8 001E0318 38 60 00 00 */ li r3, 0 diff --git a/asm/MetroidPrime/Enemies/CWallCrawlerSwarm.s b/asm/MetroidPrime/Enemies/CWallCrawlerSwarm.s index 8b24772c..d7f92d60 100644 --- a/asm/MetroidPrime/Enemies/CWallCrawlerSwarm.s +++ b/asm/MetroidPrime/Enemies/CWallCrawlerSwarm.s @@ -2301,7 +2301,7 @@ lbl_801E93BC: /* 801E9474 001E63D4 B0 61 00 3A */ sth r3, 0x3a(r1) /* 801E9478 001E63D8 90 01 00 3C */ stw r0, 0x3c(r1) lbl_801E947C: -/* 801E947C 001E63DC 88 ED A8 16 */ lbz r7, lbl_805A93D6@sda21(r13) +/* 801E947C 001E63DC 88 ED A8 16 */ lbz r7, mLightActive__9CGraphics@sda21(r13) /* 801E9480 001E63E0 39 20 00 02 */ li r9, 2 /* 801E9484 001E63E4 28 07 00 00 */ cmplwi r7, 0 /* 801E9488 001E63E8 41 82 00 08 */ beq lbl_801E9490 diff --git a/asm/MetroidPrime/HUD/CHudDecoInterface.s b/asm/MetroidPrime/HUD/CHudDecoInterface.s index 3a3e797c..f7e69572 100644 --- a/asm/MetroidPrime/HUD/CHudDecoInterface.s +++ b/asm/MetroidPrime/HUD/CHudDecoInterface.s @@ -3817,9 +3817,9 @@ lbl_8019235C: /* 80192420 0018F380 38 80 00 00 */ li r4, 0 /* 80192424 0018F384 38 A0 00 01 */ li r5, 1 /* 80192428 0018F388 48 17 D3 15 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode -/* 8019242C 0018F38C 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 8019242C 0018F38C 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80192430 0018F390 38 60 00 00 */ li r3, 0 -/* 80192434 0018F394 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80192434 0018F394 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80192438 0018F398 48 17 7E 81 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 8019243C 0018F39C 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) /* 80192440 0018F3A0 38 80 00 00 */ li r4, 0 diff --git a/asm/MetroidPrime/Player/CGameOptions.s b/asm/MetroidPrime/Player/CGameOptions.s index 5cff9afd..1f9bda6c 100644 --- a/asm/MetroidPrime/Player/CGameOptions.s +++ b/asm/MetroidPrime/Player/CGameOptions.s @@ -732,7 +732,7 @@ SetScreenBrightness__12CGameOptionsFib: /* 8020F0D4 0020C034 41 82 00 10 */ beq lbl_8020F0E4 /* 8020F0D8 0020C038 7F C3 F3 78 */ mr r3, r30 /* 8020F0DC 0020C03C 4B FF FF 79 */ bl TuneScreenBrightness__12CGameOptionsFv -/* 8020F0E0 0020C040 D0 2D 9C 84 */ stfs f1, lbl_805A8844@sda21(r13) +/* 8020F0E0 0020C040 D0 2D 9C 84 */ stfs f1, mBrightness__9CGraphics@sda21(r13) lbl_8020F0E4: /* 8020F0E4 0020C044 80 01 00 24 */ lwz r0, 0x24(r1) /* 8020F0E8 0020C048 83 E1 00 1C */ lwz r31, 0x1c(r1) diff --git a/asm/MetroidPrime/Player/CGrappleArm.s b/asm/MetroidPrime/Player/CGrappleArm.s index a0c2f657..249df7fe 100644 --- a/asm/MetroidPrime/Player/CGrappleArm.s +++ b/asm/MetroidPrime/Player/CGrappleArm.s @@ -2513,9 +2513,9 @@ lbl_8011F540: /* 8011F570 0011C4D0 81 8C 00 10 */ lwz r12, 0x10(r12) /* 8011F574 0011C4D4 7D 89 03 A6 */ mtctr r12 /* 8011F578 0011C4D8 4E 80 04 21 */ bctrl -/* 8011F57C 0011C4DC 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 8011F57C 0011C4DC 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 8011F580 0011C4E0 38 61 00 C8 */ addi r3, r1, 0xc8 -/* 8011F584 0011C4E4 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 8011F584 0011C4E4 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 8011F588 0011C4E8 48 1F 35 ED */ bl __ct__12CTransform4fFRC12CTransform4f /* 8011F58C 0011C4EC 38 61 00 08 */ addi r3, r1, 8 /* 8011F590 0011C4F0 38 81 00 F8 */ addi r4, r1, 0xf8 diff --git a/asm/MetroidPrime/Player/CMorphBallShadow.s b/asm/MetroidPrime/Player/CMorphBallShadow.s index b9e833a9..93f091f9 100644 --- a/asm/MetroidPrime/Player/CMorphBallShadow.s +++ b/asm/MetroidPrime/Player/CMorphBallShadow.s @@ -599,16 +599,16 @@ lbl_802963B0: /* 802963B0 00293310 7F E3 FB 78 */ mr r3, r31 /* 802963B4 00293314 7F A4 EB 78 */ mr r4, r29 /* 802963B8 00293318 4B FF F8 05 */ bl GatherAreas__16CMorphBallShadowFR13CStateManager -/* 802963BC 0029331C 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 802963BC 0029331C 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 802963C0 00293320 38 61 01 A0 */ addi r3, r1, 0x1a0 -/* 802963C4 00293324 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 802963C4 00293324 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 802963C8 00293328 48 07 C7 AD */ bl __ct__12CTransform4fFRC12CTransform4f -/* 802963CC 0029332C C3 ED A7 E0 */ lfs f31, lbl_805A93A0@sda21(r13) -/* 802963D0 00293330 C3 CD 9C 78 */ lfs f30, lbl_805A8838@sda21(r13) +/* 802963CC 0029332C C3 ED A7 E0 */ lfs f31, mDepthNear__9CGraphics@sda21(r13) +/* 802963D0 00293330 C3 CD 9C 78 */ lfs f30, mDepthFar__9CGraphics@sda21(r13) /* 802963D4 00293334 48 07 3A 89 */ bl GetProjectionState__9CGraphicsFv /* 802963D8 00293338 88 03 00 00 */ lbz r0, 0(r3) -/* 802963DC 0029333C 3C 80 80 3F */ lis r4, lbl_803ED910@ha -/* 802963E0 00293340 3A C4 D9 10 */ addi r22, r4, lbl_803ED910@l +/* 802963DC 0029333C 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha +/* 802963E0 00293340 3A C4 D9 10 */ addi r22, r4, mViewport__9CGraphics@l /* 802963E4 00293344 3C A0 80 5A */ lis r5, sDownVector__9CVector3f@ha /* 802963E8 00293348 98 01 00 94 */ stb r0, 0x94(r1) /* 802963EC 0029334C 3C 80 80 5A */ lis r4, sRightVector__9CVector3f@ha @@ -688,8 +688,8 @@ lbl_802963B0: /* 80296514 00293474 EC C0 E8 2A */ fadds f6, f0, f29 /* 80296518 00293478 48 07 60 3D */ bl SetOrtho__9CGraphicsFffffff /* 8029651C 0029347C 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) -/* 80296520 00293480 3C 80 80 5A */ lis r4, lbl_805A6500@ha -/* 80296524 00293484 38 A4 65 00 */ addi r5, r4, lbl_805A6500@l +/* 80296520 00293480 3C 80 80 5A */ lis r4, mRenderModeObj__9CGraphics@ha +/* 80296524 00293484 38 A4 65 00 */ addi r5, r4, mRenderModeObj__9CGraphics@l /* 80296528 00293488 80 FF 00 B4 */ lwz r7, 0xb4(r31) /* 8029652C 0029348C 81 83 00 00 */ lwz r12, 0(r3) /* 80296530 00293490 38 80 00 00 */ li r4, 0 @@ -735,10 +735,10 @@ lbl_802963B0: /* 802965D0 00293530 38 A0 00 00 */ li r5, 0 /* 802965D4 00293534 38 C0 00 00 */ li r6, 0 /* 802965D8 00293538 48 07 54 79 */ bl SetBlendMode__9CGraphicsF13ERglBlendMode15ERglBlendFactor15ERglBlendFactor11ERglLogicOp -/* 802965DC 0029353C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802965DC 0029353C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802965E0 00293540 38 60 00 00 */ li r3, 0 /* 802965E4 00293544 48 07 3C D5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 802965E8 00293548 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802965E8 00293548 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802965EC 0029354C 38 60 00 01 */ li r3, 1 /* 802965F0 00293550 48 07 3C C9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 802965F4 00293554 38 60 00 00 */ li r3, 0 diff --git a/asm/MetroidPrime/Player/CPlayerGun.s b/asm/MetroidPrime/Player/CPlayerGun.s index fcfe24ac..917bb19f 100644 --- a/asm/MetroidPrime/Player/CPlayerGun.s +++ b/asm/MetroidPrime/Player/CPlayerGun.s @@ -8650,9 +8650,9 @@ lbl_80041B64: /* 80041C14 0003EB74 D0 61 04 20 */ stfs f3, 0x420(r1) /* 80041C18 0003EB78 D0 01 04 30 */ stfs f0, 0x430(r1) lbl_80041C1C: -/* 80041C1C 0003EB7C 3C 60 80 5A */ lis r3, lbl_805A61D4@ha +/* 80041C1C 0003EB7C 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha /* 80041C20 0003EB80 82 DC 06 98 */ lwz r22, 0x698(r28) -/* 80041C24 0003EB84 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 80041C24 0003EB84 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 80041C28 0003EB88 38 61 03 B4 */ addi r3, r1, 0x3b4 /* 80041C2C 0003EB8C 48 2D 0F 49 */ bl __ct__12CTransform4fFRC12CTransform4f /* 80041C30 0003EB90 38 61 01 D4 */ addi r3, r1, 0x1d4 @@ -8954,9 +8954,9 @@ lbl_80042074: /* 80042088 0003EFE8 80 7C 08 2C */ lwz r3, 0x82c(r28) /* 8004208C 0003EFEC 48 0C EF 0D */ bl DisableModelProjectedShadow__12CWorldShadowCFv lbl_80042090: -/* 80042090 0003EFF0 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 80042090 0003EFF0 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 80042094 0003EFF4 38 61 02 F4 */ addi r3, r1, 0x2f4 -/* 80042098 0003EFF8 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 80042098 0003EFF8 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 8004209C 0003EFFC 48 2D 0A D9 */ bl __ct__12CTransform4fFRC12CTransform4f /* 800420A0 0003F000 38 61 00 54 */ addi r3, r1, 0x54 /* 800420A4 0003F004 38 81 04 14 */ addi r4, r1, 0x414 @@ -9245,8 +9245,8 @@ DrawScreenTex__Ff: /* 80042494 0003F3F4 DB E1 00 90 */ stfd f31, 0x90(r1) /* 80042498 0003F3F8 F3 E1 00 98 */ psq_st f31, 152(r1), 0, qr0 /* 8004249C 0003F3FC FF E0 08 90 */ fmr f31, f1 -/* 800424A0 0003F400 3C 60 80 5A */ lis r3, lbl_805A61D4@ha -/* 800424A4 0003F404 38 83 61 D4 */ addi r4, r3, lbl_805A61D4@l +/* 800424A0 0003F400 3C 60 80 5A */ lis r3, mViewMatrix__9CGraphics@ha +/* 800424A4 0003F404 38 83 61 D4 */ addi r4, r3, mViewMatrix__9CGraphics@l /* 800424A8 0003F408 38 61 00 3C */ addi r3, r1, 0x3c /* 800424AC 0003F40C 48 2D 06 C9 */ bl __ct__12CTransform4fFRC12CTransform4f /* 800424B0 0003F410 48 2C 79 AD */ bl GetProjectionState__9CGraphicsFv @@ -9417,7 +9417,7 @@ CopyScreenTex__Fv: /* 80042738 0003F698 38 A0 00 06 */ li r5, 6 /* 8004273C 0003F69C 38 C0 00 00 */ li r6, 0 /* 80042740 0003F6A0 48 33 67 41 */ bl GXSetTexCopyDst -/* 80042744 0003F6A4 80 6D A8 28 */ lwz r3, lbl_805A93E8@sda21(r13) +/* 80042744 0003F6A4 80 6D A8 28 */ lwz r3, mpSpareBuffer__9CGraphics@sda21(r13) /* 80042748 0003F6A8 38 80 00 00 */ li r4, 0 /* 8004274C 0003F6AC 48 33 6D E9 */ bl GXCopyTex /* 80042750 0003F6B0 48 33 5E 15 */ bl GXPixModeSync diff --git a/asm/MetroidPrime/Player/CPlayerOrbit.s b/asm/MetroidPrime/Player/CPlayerOrbit.s index f8df41ef..71f5bec0 100644 --- a/asm/MetroidPrime/Player/CPlayerOrbit.s +++ b/asm/MetroidPrime/Player/CPlayerOrbit.s @@ -3152,9 +3152,9 @@ lbl_8017BEF8: /* 8017BFC0 00178F20 80 9E 08 70 */ lwz r4, 0x870(r30) /* 8017BFC4 00178F24 80 84 00 7C */ lwz r4, 0x7c(r4) /* 8017BFC8 00178F28 4B EE 18 C9 */ bl ConvertToScreenSpace__11CGameCameraCFRC9CVector3f -/* 8017BFCC 00178F2C 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8017BFCC 00178F2C 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8017BFD0 00178F30 3C A0 43 30 */ lis r5, 0x4330 -/* 8017BFD4 00178F34 38 83 D9 10 */ addi r4, r3, lbl_803ED910@l +/* 8017BFD4 00178F34 38 83 D9 10 */ addi r4, r3, mViewport__9CGraphics@l /* 8017BFD8 00178F38 C1 01 00 2C */ lfs f8, 0x2c(r1) /* 8017BFDC 00178F3C 80 04 00 08 */ lwz r0, 8(r4) /* 8017BFE0 00178F40 7F 83 E3 78 */ mr r3, r28 @@ -3677,9 +3677,9 @@ lbl_8017C690: /* 8017C758 001796B8 D0 81 00 68 */ stfs f4, 0x68(r1) /* 8017C75C 001796BC D0 A1 00 6C */ stfs f5, 0x6c(r1) /* 8017C760 001796C0 48 19 81 99 */ bl Normalize__9CVector3fFv -/* 8017C764 001796C4 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8017C764 001796C4 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8017C768 001796C8 3C E0 43 30 */ lis r7, 0x4330 -/* 8017C76C 001796CC 3B 43 D9 10 */ addi r26, r3, lbl_803ED910@l +/* 8017C76C 001796CC 3B 43 D9 10 */ addi r26, r3, mViewport__9CGraphics@l /* 8017C770 001796D0 C3 E2 A2 80 */ lfs f31, lbl_805ABFA0@sda21(r2) /* 8017C774 001796D4 80 BA 00 08 */ lwz r5, 8(r26) /* 8017C778 001796D8 57 A3 10 3A */ slwi r3, r29, 2 @@ -4300,9 +4300,9 @@ lbl_8017CF98: /* 8017D084 00179FE4 D0 81 00 B0 */ stfs f4, 0xb0(r1) /* 8017D088 00179FE8 D0 A1 00 B4 */ stfs f5, 0xb4(r1) /* 8017D08C 00179FEC 48 19 78 6D */ bl Normalize__9CVector3fFv -/* 8017D090 00179FF0 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8017D090 00179FF0 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8017D094 00179FF4 3C E0 43 30 */ lis r7, 0x4330 -/* 8017D098 00179FF8 38 63 D9 10 */ addi r3, r3, lbl_803ED910@l +/* 8017D098 00179FF8 38 63 D9 10 */ addi r3, r3, mViewport__9CGraphics@l /* 8017D09C 00179FFC C3 A2 A2 80 */ lfs f29, lbl_805ABFA0@sda21(r2) /* 8017D0A0 0017A000 80 A3 00 08 */ lwz r5, 8(r3) /* 8017D0A4 0017A004 56 A6 10 3A */ slwi r6, r21, 2 @@ -4964,10 +4964,10 @@ lbl_8017D8FC: /* 8017DA20 0017A980 C3 A1 00 3C */ lfs f29, 0x3c(r1) /* 8017DA24 0017A984 48 19 6E D5 */ bl Normalize__9CVector3fFv /* 8017DA28 0017A988 80 99 08 70 */ lwz r4, 0x870(r25) -/* 8017DA2C 0017A98C 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 8017DA2C 0017A98C 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 8017DA30 0017A990 3B B5 00 04 */ addi r29, r21, 4 /* 8017DA34 0017A994 83 C4 00 7C */ lwz r30, 0x7c(r4) -/* 8017DA38 0017A998 3B E3 D9 10 */ addi r31, r3, lbl_803ED910@l +/* 8017DA38 0017A998 3B E3 D9 10 */ addi r31, r3, mViewport__9CGraphics@l /* 8017DA3C 0017A99C 48 00 02 44 */ b lbl_8017DC80 lbl_8017DA40: /* 8017DA40 0017A9A0 A0 1D 00 00 */ lhz r0, 0(r29) diff --git a/asm/MetroidPrime/Player/CPlayerVisor.s b/asm/MetroidPrime/Player/CPlayerVisor.s index bb61e19e..9789ac8f 100644 --- a/asm/MetroidPrime/Player/CPlayerVisor.s +++ b/asm/MetroidPrime/Player/CPlayerVisor.s @@ -403,9 +403,9 @@ lbl_80111FC4: /* 801120BC 0010F01C 81 8C 00 58 */ lwz r12, 0x58(r12) /* 801120C0 0010F020 7D 89 03 A6 */ mtctr r12 /* 801120C4 0010F024 4E 80 04 21 */ bctrl -/* 801120C8 0010F028 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 801120C8 0010F028 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 801120CC 0010F02C 3C 80 43 30 */ lis r4, 0x4330 -/* 801120D0 0010F030 38 C3 D9 10 */ addi r6, r3, lbl_803ED910@l +/* 801120D0 0010F030 38 C3 D9 10 */ addi r6, r3, mViewport__9CGraphics@l /* 801120D4 0010F034 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) /* 801120D8 0010F038 80 A6 00 08 */ lwz r5, 8(r6) /* 801120DC 0010F03C 80 06 00 0C */ lwz r0, 0xc(r6) @@ -708,12 +708,12 @@ UpdateScanObjectIndicators__12CPlayerVisorFRC13CStateManagerf: /* 80112528 0010F488 FF C0 08 90 */ fmr f30, f1 /* 8011252C 0010F48C C0 02 96 08 */ lfs f0, lbl_805AB328@sda21(r2) /* 80112530 0010F490 7C 7A 1B 78 */ mr r26, r3 -/* 80112534 0010F494 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80112534 0010F494 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 80112538 0010F498 3B 9A 01 40 */ addi r28, r26, 0x140 /* 8011253C 0010F49C 7C 9B 23 78 */ mr r27, r4 /* 80112540 0010F4A0 EF E0 07 B2 */ fmuls f31, f0, f30 /* 80112544 0010F4A4 7F 9E E3 78 */ mr r30, r28 -/* 80112548 0010F4A8 3B E3 D9 10 */ addi r31, r3, lbl_803ED910@l +/* 80112548 0010F4A8 3B E3 D9 10 */ addi r31, r3, mViewport__9CGraphics@l /* 8011254C 0010F4AC 3B A0 00 00 */ li r29, 0 /* 80112550 0010F4B0 48 00 02 00 */ b lbl_80112750 lbl_80112554: @@ -1556,9 +1556,9 @@ DrawScanEffect__12CPlayerVisorCFRC13CStateManagerPC17CTargetingManager: /* 8011311C 0011007C C0 42 95 F0 */ lfs f2, lbl_805AB310@sda21(r2) /* 80113120 00110080 48 1F 72 C1 */ bl SetDepthRange__9CGraphicsFff lbl_80113124: -/* 80113124 00110084 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 80113124 00110084 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 80113128 00110088 80 7D 08 B8 */ lwz r3, 0x8b8(r29) -/* 8011312C 0011008C 38 A4 D9 10 */ addi r5, r4, lbl_803ED910@l +/* 8011312C 0011008C 38 A4 D9 10 */ addi r5, r4, mViewport__9CGraphics@l /* 80113130 00110090 80 85 00 08 */ lwz r4, 8(r5) /* 80113134 00110094 80 05 00 0C */ lwz r0, 0xc(r5) /* 80113138 00110098 90 81 00 30 */ stw r4, 0x30(r1) @@ -1652,7 +1652,7 @@ lbl_801131B0: /* 80113280 001101E0 54 63 04 3E */ clrlwi r3, r3, 0x10 /* 80113284 001101E4 54 04 04 3E */ clrlwi r4, r0, 0x10 /* 80113288 001101E8 48 26 5B 2D */ bl GXSetTexCopySrc -/* 8011328C 001101EC 83 CD A8 28 */ lwz r30, lbl_805A93E8@sda21(r13) +/* 8011328C 001101EC 83 CD A8 28 */ lwz r30, mpSpareBuffer__9CGraphics@sda21(r13) /* 80113290 001101F0 57 A3 04 3E */ clrlwi r3, r29, 0x10 /* 80113294 001101F4 57 64 04 3E */ clrlwi r4, r27, 0x10 /* 80113298 001101F8 38 A0 00 04 */ li r5, 4 diff --git a/asm/MetroidPrime/Player/CScanDisplay.s b/asm/MetroidPrime/Player/CScanDisplay.s index 5c69b872..9a4f380a 100644 --- a/asm/MetroidPrime/Player/CScanDisplay.s +++ b/asm/MetroidPrime/Player/CScanDisplay.s @@ -214,9 +214,9 @@ Draw__12CScanDisplayCFv: /* 80172CB8 0016FC18 81 8C 00 64 */ lwz r12, 0x64(r12) /* 80172CBC 0016FC1C 7D 89 03 A6 */ mtctr r12 /* 80172CC0 0016FC20 4E 80 04 21 */ bctrl -/* 80172CC4 0016FC24 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 80172CC4 0016FC24 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80172CC8 0016FC28 38 60 00 00 */ li r3, 0 -/* 80172CCC 0016FC2C 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80172CCC 0016FC2C 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80172CD0 0016FC30 48 19 75 E9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80172CD4 0016FC34 7F C3 F3 78 */ mr r3, r30 /* 80172CD8 0016FC38 38 80 00 00 */ li r4, 0 @@ -964,10 +964,10 @@ lbl_8017377C: /* 80173784 001706E4 2C 19 00 04 */ cmpwi r25, 4 /* 80173788 001706E8 3B BD 00 08 */ addi r29, r29, 8 /* 8017378C 001706EC 41 80 FE 20 */ blt lbl_801735AC -/* 80173790 001706F0 3C 60 80 3F */ lis r3, lbl_803ED910@ha +/* 80173790 001706F0 3C 60 80 3F */ lis r3, mViewport__9CGraphics@ha /* 80173794 001706F4 7F 5C D3 78 */ mr r28, r26 /* 80173798 001706F8 3B 00 00 00 */ li r24, 0 -/* 8017379C 001706FC 3B A3 D9 10 */ addi r29, r3, lbl_803ED910@l +/* 8017379C 001706FC 3B A3 D9 10 */ addi r29, r3, mViewport__9CGraphics@l lbl_801737A0: /* 801737A0 00170700 80 1B 00 00 */ lwz r0, 0(r27) /* 801737A4 00170704 2C 00 00 03 */ cmpwi r0, 3 diff --git a/asm/MetroidPrime/ScriptObjects/CScriptDamageableTrigger.s b/asm/MetroidPrime/ScriptObjects/CScriptDamageableTrigger.s index d599fb31..fe14a895 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptDamageableTrigger.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptDamageableTrigger.s @@ -399,7 +399,7 @@ AddToRenderer__24CScriptDamageableTriggerCFRC14CFrustumPlanesRC13CStateManager: /* 800FA9B0 000F7910 7F E4 FB 78 */ mr r4, r31 /* 800FA9B4 000F7914 38 A1 00 08 */ addi r5, r1, 8 /* 800FA9B8 000F7918 38 C1 00 14 */ addi r6, r1, 0x14 -/* 800FA9BC 000F791C 4B F5 A0 ED */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f +/* 800FA9BC 000F791C 4B F5 A0 ED */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox lbl_800FA9C0: /* 800FA9C0 000F7920 80 01 00 44 */ lwz r0, 0x44(r1) /* 800FA9C4 000F7924 83 E1 00 3C */ lwz r31, 0x3c(r1) diff --git a/asm/MetroidPrime/ScriptObjects/CScriptPlayerActor.s b/asm/MetroidPrime/ScriptObjects/CScriptPlayerActor.s index 4dc8163b..be49ee13 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptPlayerActor.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptPlayerActor.s @@ -1440,7 +1440,7 @@ lbl_801AB508: /* 801AB50C 001A846C 41 82 01 1C */ beq lbl_801AB628 /* 801AB510 001A8470 83 6D A0 68 */ lwz r27, gpRender@sda21(r13) /* 801AB514 001A8474 38 80 00 01 */ li r4, 1 -/* 801AB518 001A8478 80 CD A8 28 */ lwz r6, lbl_805A93E8@sda21(r13) +/* 801AB518 001A8478 80 CD A8 28 */ lwz r6, mpSpareBuffer__9CGraphics@sda21(r13) /* 801AB51C 001A847C 38 A0 00 01 */ li r5, 1 /* 801AB520 001A8480 7F 63 DB 78 */ mr r3, r27 /* 801AB524 001A8484 38 E0 00 04 */ li r7, 4 diff --git a/asm/MetroidPrime/ScriptObjects/CScriptVisorFlare.s b/asm/MetroidPrime/ScriptObjects/CScriptVisorFlare.s index 30c00651..e10ef17c 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptVisorFlare.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptVisorFlare.s @@ -96,7 +96,7 @@ AddToRenderer__17CScriptVisorFlareCFRC14CFrustumPlanesRC13CStateManager: /* 801D6538 001D3498 7F E4 FB 78 */ mr r4, r31 /* 801D653C 001D349C 38 A1 00 08 */ addi r5, r1, 8 /* 801D6540 001D34A0 38 C1 00 14 */ addi r6, r1, 0x14 -/* 801D6544 001D34A4 4B E7 E5 65 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f +/* 801D6544 001D34A4 4B E7 E5 65 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox lbl_801D6548: /* 801D6548 001D34A8 80 01 00 44 */ lwz r0, 0x44(r1) /* 801D654C 001D34AC 83 E1 00 3C */ lwz r31, 0x3c(r1) diff --git a/asm/MetroidPrime/Weapons/CBomb.s b/asm/MetroidPrime/Weapons/CBomb.s index 62ec3a07..14917984 100644 --- a/asm/MetroidPrime/Weapons/CBomb.s +++ b/asm/MetroidPrime/Weapons/CBomb.s @@ -824,9 +824,9 @@ AddToRenderer__5CBombCFRC14CFrustumPlanesRC13CStateManager: /* 800904D4 0008D434 D0 21 00 24 */ stfs f1, 0x24(r1) /* 800904D8 0008D438 D0 01 00 28 */ stfs f0, 0x28(r1) /* 800904DC 0008D43C 48 2A 80 2D */ bl __ct__6CAABoxFRC9CVector3fRC9CVector3f -/* 800904E0 0008D440 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 800904E0 0008D440 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 800904E4 0008D444 38 61 00 08 */ addi r3, r1, 8 -/* 800904E8 0008D448 38 C4 61 D4 */ addi r6, r4, lbl_805A61D4@l +/* 800904E8 0008D448 38 C4 61 D4 */ addi r6, r4, mViewMatrix__9CGraphics@l /* 800904EC 0008D44C 38 81 00 44 */ addi r4, r1, 0x44 /* 800904F0 0008D450 C0 46 00 04 */ lfs f2, 4(r6) /* 800904F4 0008D454 38 A1 00 38 */ addi r5, r1, 0x38 diff --git a/asm/MetroidPrime/Weapons/CFlameThrower.s b/asm/MetroidPrime/Weapons/CFlameThrower.s index 4002bf88..3063d30a 100644 --- a/asm/MetroidPrime/Weapons/CFlameThrower.s +++ b/asm/MetroidPrime/Weapons/CFlameThrower.s @@ -1090,7 +1090,7 @@ AddToRenderer__13CFlameThrowerCFRC14CFrustumPlanesRC13CStateManager: /* 801983D8 00195338 7F E4 FB 78 */ mr r4, r31 /* 801983DC 0019533C 38 A1 00 08 */ addi r5, r1, 8 /* 801983E0 00195340 38 C1 00 14 */ addi r6, r1, 0x14 -/* 801983E4 00195344 4B EB C6 C5 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f +/* 801983E4 00195344 4B EB C6 C5 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox /* 801983E8 00195348 80 01 00 44 */ lwz r0, 0x44(r1) /* 801983EC 0019534C 83 E1 00 3C */ lwz r31, 0x3c(r1) /* 801983F0 00195350 83 C1 00 38 */ lwz r30, 0x38(r1) diff --git a/asm/MetroidPrime/Weapons/CIceProjectile.s b/asm/MetroidPrime/Weapons/CIceProjectile.s index 23931449..587c2740 100644 --- a/asm/MetroidPrime/Weapons/CIceProjectile.s +++ b/asm/MetroidPrime/Weapons/CIceProjectile.s @@ -1993,10 +1993,10 @@ lbl_801F35E8: AddToRenderer__20CIceAttackProjectileCFRC14CFrustumPlanesRC13CStateManager: /* 801F3610 001F0570 94 21 FF E0 */ stwu r1, -0x20(r1) /* 801F3614 001F0574 7C 08 02 A6 */ mflr r0 -/* 801F3618 001F0578 3C C0 80 5A */ lis r6, lbl_805A61D4@ha +/* 801F3618 001F0578 3C C0 80 5A */ lis r6, mViewMatrix__9CGraphics@ha /* 801F361C 001F057C 7C 64 1B 78 */ mr r4, r3 /* 801F3620 001F0580 90 01 00 24 */ stw r0, 0x24(r1) -/* 801F3624 001F0584 38 C6 61 D4 */ addi r6, r6, lbl_805A61D4@l +/* 801F3624 001F0584 38 C6 61 D4 */ addi r6, r6, mViewMatrix__9CGraphics@l /* 801F3628 001F0588 7C A3 2B 78 */ mr r3, r5 /* 801F362C 001F058C C0 62 AF 18 */ lfs f3, lbl_805ACC38@sda21(r2) /* 801F3630 001F0590 C0 46 00 04 */ lfs f2, 4(r6) diff --git a/asm/MetroidPrime/Weapons/CNewFlameThrower.s b/asm/MetroidPrime/Weapons/CNewFlameThrower.s index e42617ab..15f54e1b 100644 --- a/asm/MetroidPrime/Weapons/CNewFlameThrower.s +++ b/asm/MetroidPrime/Weapons/CNewFlameThrower.s @@ -3110,7 +3110,7 @@ AddToRenderer__16CNewFlameThrowerCFRC14CFrustumPlanesRC13CStateManager: /* 80263B14 00260A74 7F E4 FB 78 */ mr r4, r31 /* 80263B18 00260A78 38 A1 00 08 */ addi r5, r1, 8 /* 80263B1C 00260A7C 38 C1 00 14 */ addi r6, r1, 0x14 -/* 80263B20 00260A80 4B DF 0F 89 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f +/* 80263B20 00260A80 4B DF 0F 89 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox /* 80263B24 00260A84 80 01 00 44 */ lwz r0, 0x44(r1) /* 80263B28 00260A88 83 E1 00 3C */ lwz r31, 0x3c(r1) /* 80263B2C 00260A8C 83 C1 00 38 */ lwz r30, 0x38(r1) diff --git a/asm/MetroidPrime/Weapons/CPhazonBeam.s b/asm/MetroidPrime/Weapons/CPhazonBeam.s index ce30cbd4..451c0225 100644 --- a/asm/MetroidPrime/Weapons/CPhazonBeam.s +++ b/asm/MetroidPrime/Weapons/CPhazonBeam.s @@ -608,7 +608,7 @@ lbl_8018CA34: /* 8018CA34 00189994 57 60 06 3F */ clrlwi. r0, r27, 0x18 /* 8018CA38 00189998 83 4D A0 68 */ lwz r26, gpRender@sda21(r13) /* 8018CA3C 0018999C 41 82 00 2C */ beq lbl_8018CA68 -/* 8018CA40 001899A0 80 CD A8 28 */ lwz r6, lbl_805A93E8@sda21(r13) +/* 8018CA40 001899A0 80 CD A8 28 */ lwz r6, mpSpareBuffer__9CGraphics@sda21(r13) /* 8018CA44 001899A4 7F 43 D3 78 */ mr r3, r26 /* 8018CA48 001899A8 38 80 00 01 */ li r4, 1 /* 8018CA4C 001899AC 38 A0 00 01 */ li r5, 1 @@ -882,9 +882,9 @@ PreRenderGunFx__11CPhazonBeamFRC13CStateManagerRC12CTransform4f: /* 8018CE28 00189D88 48 00 00 8D */ bl IsFiring__11CPhazonBeamCFRC13CStateManager /* 8018CE2C 00189D8C 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8018CE30 00189D90 41 82 00 68 */ beq lbl_8018CE98 -/* 8018CE34 00189D94 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 8018CE34 00189D94 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 8018CE38 00189D98 38 61 00 68 */ addi r3, r1, 0x68 -/* 8018CE3C 00189D9C 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 8018CE3C 00189D9C 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 8018CE40 00189DA0 48 18 5D 35 */ bl __ct__12CTransform4fFRC12CTransform4f /* 8018CE44 00189DA4 7F E4 FB 78 */ mr r4, r31 /* 8018CE48 00189DA8 38 61 00 08 */ addi r3, r1, 8 diff --git a/asm/MetroidPrime/Weapons/CPlasmaProjectile.s b/asm/MetroidPrime/Weapons/CPlasmaProjectile.s index 69953146..bfbc059f 100644 --- a/asm/MetroidPrime/Weapons/CPlasmaProjectile.s +++ b/asm/MetroidPrime/Weapons/CPlasmaProjectile.s @@ -862,10 +862,10 @@ RenderMotionBlur__17CPlasmaProjectileCFv: /* 80177684 001745E4 38 A0 00 FF */ li r5, 0xff /* 80177688 001745E8 38 C0 00 04 */ li r6, 4 /* 8017768C 001745EC 48 19 12 C1 */ bl SetTevOrder__3CGXF13_GXTevStageID13_GXTexCoordID11_GXTexMapID12_GXChannelID -/* 80177690 001745F0 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80177690 001745F0 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80177694 001745F4 38 60 00 00 */ li r3, 0 /* 80177698 001745F8 48 19 2C 21 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 8017769C 001745FC 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 8017769C 001745FC 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 801776A0 00174600 38 60 00 01 */ li r3, 1 /* 801776A4 00174604 48 19 2C 15 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 801776A8 00174608 38 60 00 98 */ li r3, 0x98 @@ -1187,9 +1187,9 @@ lbl_80177B10: /* 80177B44 00174AA4 38 A0 00 00 */ li r5, 0 /* 80177B48 00174AA8 38 C0 00 04 */ li r6, 4 /* 80177B4C 00174AAC 48 19 0E 01 */ bl SetTevOrder__3CGXF13_GXTevStageID13_GXTexCoordID11_GXTexMapID12_GXChannelID -/* 80177B50 00174AB0 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 80177B50 00174AB0 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 80177B54 00174AB4 38 60 00 00 */ li r3, 0 -/* 80177B58 00174AB8 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 80177B58 00174AB8 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 80177B5C 00174ABC 48 19 27 5D */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80177B60 00174AC0 7F C3 F3 78 */ mr r3, r30 /* 80177B64 00174AC4 38 80 00 00 */ li r4, 0 @@ -1204,11 +1204,11 @@ lbl_80177B74: /* 80177B84 00174AE4 38 A0 00 FF */ li r5, 0xff /* 80177B88 00174AE8 38 C0 00 04 */ li r6, 4 /* 80177B8C 00174AEC 48 19 0D C1 */ bl SetTevOrder__3CGXF13_GXTevStageID13_GXTexCoordID11_GXTexMapID12_GXChannelID -/* 80177B90 00174AF0 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80177B90 00174AF0 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80177B94 00174AF4 38 60 00 00 */ li r3, 0 /* 80177B98 00174AF8 48 19 27 21 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_80177B9C: -/* 80177B9C 00174AFC 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 80177B9C 00174AFC 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 80177BA0 00174B00 38 60 00 01 */ li r3, 1 /* 80177BA4 00174B04 48 19 27 15 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 80177BA8 00174B08 83 DA 00 00 */ lwz r30, 0(r26) @@ -1661,7 +1661,7 @@ lbl_80178204: /* 8017823C 0017519C 7F E4 FB 78 */ mr r4, r31 /* 80178240 001751A0 38 A1 00 08 */ addi r5, r1, 8 /* 80178244 001751A4 38 C1 00 14 */ addi r6, r1, 0x14 -/* 80178248 001751A8 4B ED C8 61 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f +/* 80178248 001751A8 4B ED C8 61 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox /* 8017824C 001751AC 80 01 00 44 */ lwz r0, 0x44(r1) /* 80178250 001751B0 83 E1 00 3C */ lwz r31, 0x3c(r1) /* 80178254 001751B4 83 C1 00 38 */ lwz r30, 0x38(r1) diff --git a/asm/MetroidPrime/Weapons/CPowerBeam.s b/asm/MetroidPrime/Weapons/CPowerBeam.s index f0a4e822..287e1a65 100644 --- a/asm/MetroidPrime/Weapons/CPowerBeam.s +++ b/asm/MetroidPrime/Weapons/CPowerBeam.s @@ -538,9 +538,9 @@ lbl_800DFD34: PreRenderGunFx__10CPowerBeamFRC13CStateManagerRC12CTransform4f: /* 800DFD60 000DCCC0 94 21 FF 60 */ stwu r1, -0xa0(r1) /* 800DFD64 000DCCC4 7C 08 02 A6 */ mflr r0 -/* 800DFD68 000DCCC8 3C 80 80 5A */ lis r4, lbl_805A61D4@ha +/* 800DFD68 000DCCC8 3C 80 80 5A */ lis r4, mViewMatrix__9CGraphics@ha /* 800DFD6C 000DCCCC 90 01 00 A4 */ stw r0, 0xa4(r1) -/* 800DFD70 000DCCD0 38 84 61 D4 */ addi r4, r4, lbl_805A61D4@l +/* 800DFD70 000DCCD0 38 84 61 D4 */ addi r4, r4, mViewMatrix__9CGraphics@l /* 800DFD74 000DCCD4 93 E1 00 9C */ stw r31, 0x9c(r1) /* 800DFD78 000DCCD8 7C BF 2B 78 */ mr r31, r5 /* 800DFD7C 000DCCDC 93 C1 00 98 */ stw r30, 0x98(r1) diff --git a/asm/MetroidPrime/Weapons/CWaveBuster.s b/asm/MetroidPrime/Weapons/CWaveBuster.s index 8206697c..24be92f1 100644 --- a/asm/MetroidPrime/Weapons/CWaveBuster.s +++ b/asm/MetroidPrime/Weapons/CWaveBuster.s @@ -1308,10 +1308,10 @@ lbl_801BE84C: /* 801BE8EC 001BB84C 38 A0 00 FF */ li r5, 0xff /* 801BE8F0 001BB850 38 C0 00 04 */ li r6, 4 /* 801BE8F4 001BB854 48 14 A0 59 */ bl SetTevOrder__3CGXF13_GXTevStageID13_GXTexCoordID11_GXTexMapID12_GXChannelID -/* 801BE8F8 001BB858 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 801BE8F8 001BB858 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 801BE8FC 001BB85C 38 60 00 00 */ li r3, 0 /* 801BE900 001BB860 48 14 B9 B9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 801BE904 001BB864 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 801BE904 001BB864 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 801BE908 001BB868 38 60 00 01 */ li r3, 1 /* 801BE90C 001BB86C 48 14 B9 AD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 801BE910 001BB870 80 6D A0 68 */ lwz r3, gpRender@sda21(r13) @@ -1674,7 +1674,7 @@ sub_801bee04: /* 801BEE54 001BBDB4 7F E4 FB 78 */ mr r4, r31 /* 801BEE58 001BBDB8 38 A1 00 08 */ addi r5, r1, 8 /* 801BEE5C 001BBDBC 38 C1 00 14 */ addi r6, r1, 0x14 -/* 801BEE60 001BBDC0 4B E9 5C 49 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3f +/* 801BEE60 001BBDC0 4B E9 5C 49 */ bl EnsureRendered__6CActorCFRC13CStateManagerRC9CVector3fRC6CAABox /* 801BEE64 001BBDC4 80 01 00 44 */ lwz r0, 0x44(r1) /* 801BEE68 001BBDC8 83 E1 00 3C */ lwz r31, 0x3c(r1) /* 801BEE6C 001BBDCC 83 C1 00 38 */ lwz r30, 0x38(r1) diff --git a/asm/MetroidPrime/main.s b/asm/MetroidPrime/main.s index a0e8507e..e0838304 100644 --- a/asm/MetroidPrime/main.s +++ b/asm/MetroidPrime/main.s @@ -4141,9 +4141,9 @@ lbl_80006184: /* 800061A8 00003108 48 26 3A 19 */ bl __ct__18CErrorOutputWindowFiff /* 800061AC 0000310C 38 60 00 01 */ li r3, 1 /* 800061B0 00003110 48 30 32 F9 */ bl SetIsBeginSceneClearFb__9CGraphicsFb -/* 800061B4 00003114 3C 80 80 3F */ lis r4, lbl_803ED910@ha +/* 800061B4 00003114 3C 80 80 3F */ lis r4, mViewport__9CGraphics@ha /* 800061B8 00003118 38 60 00 00 */ li r3, 0 -/* 800061BC 0000311C 38 C4 D9 10 */ addi r6, r4, lbl_803ED910@l +/* 800061BC 0000311C 38 C4 D9 10 */ addi r6, r4, mViewport__9CGraphics@l /* 800061C0 00003120 38 80 00 00 */ li r4, 0 /* 800061C4 00003124 80 A6 00 08 */ lwz r5, 8(r6) /* 800061C8 00003128 80 C6 00 0C */ lwz r6, 0xc(r6) diff --git a/asm/Weapons/CDecal.s b/asm/Weapons/CDecal.s index d7104a89..087e4114 100644 --- a/asm/Weapons/CDecal.s +++ b/asm/Weapons/CDecal.s @@ -623,9 +623,9 @@ lbl_802B50E0: /* 802B50F4 002B2054 48 05 A6 49 */ bl Load__8CTextureCF11_GXTexMapIDQ28CTexture10EClampMode /* 802B50F8 002B2058 38 61 00 10 */ addi r3, r1, 0x10 /* 802B50FC 002B205C 48 08 BD 11 */ bl GetObj__6CTokenFv -/* 802B5100 002B2060 3C 80 80 5A */ lis r4, lbl_805A5EBC@ha +/* 802B5100 002B2060 3C 80 80 5A */ lis r4, kEnvModulate__9CGraphics@ha /* 802B5104 002B2064 38 60 00 00 */ li r3, 0 -/* 802B5108 002B2068 38 84 5E BC */ addi r4, r4, lbl_805A5EBC@l +/* 802B5108 002B2068 38 84 5E BC */ addi r4, r4, kEnvModulate__9CGraphics@l /* 802B510C 002B206C 48 05 51 AD */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass /* 802B5110 002B2070 80 7E 00 14 */ lwz r3, 0x14(r30) /* 802B5114 002B2074 38 A1 00 24 */ addi r5, r1, 0x24 @@ -664,7 +664,7 @@ lbl_802B50E0: /* 802B5198 002B20F8 48 0C 66 99 */ bl GXSetTevSwapMode /* 802B519C 002B20FC 48 00 00 10 */ b lbl_802B51AC lbl_802B51A0: -/* 802B51A0 002B2100 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802B51A0 002B2100 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802B51A4 002B2104 38 60 00 01 */ li r3, 1 /* 802B51A8 002B2108 48 05 51 11 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_802B51AC: @@ -673,10 +673,10 @@ lbl_802B51AC: /* 802B51B4 002B2114 48 08 BC 8D */ bl __dt__6CTokenFv /* 802B51B8 002B2118 48 00 00 1C */ b lbl_802B51D4 lbl_802B51BC: -/* 802B51BC 002B211C 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802B51BC 002B211C 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802B51C0 002B2120 38 60 00 00 */ li r3, 0 /* 802B51C4 002B2124 48 05 50 F5 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass -/* 802B51C8 002B2128 80 8D 9C 68 */ lwz r4, lbl_805A8828@sda21(r13) +/* 802B51C8 002B2128 80 8D 9C 68 */ lwz r4, kEnvPassthru__9CGraphics@sda21(r13) /* 802B51CC 002B212C 38 60 00 01 */ li r3, 1 /* 802B51D0 002B2130 48 05 50 E9 */ bl SetTevOp__9CGraphicsF12ERglTevStageRCQ213CTevCombiners8CTevPass lbl_802B51D4: diff --git a/include/Kyoto/Graphics/CGraphics.hpp b/include/Kyoto/Graphics/CGraphics.hpp index 772fd18f..90bf4f65 100644 --- a/include/Kyoto/Graphics/CGraphics.hpp +++ b/include/Kyoto/Graphics/CGraphics.hpp @@ -5,6 +5,7 @@ #include "Kyoto/Graphics/CColor.hpp" #include "Kyoto/Math/CVector3f.hpp" +#include "Kyoto/Math/CTransform4f.hpp" #include "Kyoto/Graphics/CTevCombiners.hpp" @@ -49,6 +50,11 @@ public: static void StreamTexcoord(f32 u, f32 v); static void StreamVertex(const CVector3f& vtx); static void StreamEnd(); + + static const CTransform4f& GetViewMatrix() { return mViewMatrix; } + +private: + static CTransform4f mViewMatrix; }; #endif diff --git a/include/Kyoto/Math/CAABox.hpp b/include/Kyoto/Math/CAABox.hpp index ddef0068..44e43887 100644 --- a/include/Kyoto/Math/CAABox.hpp +++ b/include/Kyoto/Math/CAABox.hpp @@ -9,6 +9,9 @@ public: // TODO } CAABox(const CVector3f& min, const CVector3f& max);// : min(min), max(max) {} + CAABox(const CAABox& other) : min(other.min), max(other.max) {} + + CVector3f ClosestPointAlongVector(const CVector3f& vec) const; static CAABox mskInvertedBox; static CAABox mskNullBox; diff --git a/include/Kyoto/Math/CFrustumPlanes.hpp b/include/Kyoto/Math/CFrustumPlanes.hpp new file mode 100644 index 00000000..55132b99 --- /dev/null +++ b/include/Kyoto/Math/CFrustumPlanes.hpp @@ -0,0 +1,33 @@ +#ifndef _CFRUSTUMPLANES_HPP +#define _CFRUSTUMPLANES_HPP + +#include "types.h" + +#include "Kyoto/Math/CVector3f.hpp" + +#include "rstl/reserved_vector.hpp" +#include "rstl/optional_object.hpp" + +class CAABox; +class CSphere; + +class CPlane { +private: + f32 x; + f32 y; + f32 z; + f32 d; +}; + +class CFrustumPlanes { +public: + bool BoxInFrustumPlanes(const CAABox& box) const; + bool BoxInFrustumPlanes(const rstl::optional_object< CAABox >& box) const; + bool SphereInFrustumPlanes(const CSphere& sphere) const; + bool PointInFrustumPlanes(const CVector3f& point) const; + +private: + rstl::reserved_vector< CPlane, 6 > x0_planes; +}; + +#endif \ No newline at end of file diff --git a/include/MetaRender/CCubeRenderer.hpp b/include/MetaRender/CCubeRenderer.hpp index f974bdb8..1ff45f3b 100644 --- a/include/MetaRender/CCubeRenderer.hpp +++ b/include/MetaRender/CCubeRenderer.hpp @@ -9,6 +9,16 @@ #include "Kyoto/Math/CVector2f.hpp" #include "rstl/pair.hpp" +class IRenderer { +public: + enum EDrawableSorting { + kDS_SortedCallback, + kDS_UnsortedCallback, + }; + + // TODO vtable +}; + class CCubeRenderer { public: virtual ~CCubeRenderer(); @@ -26,7 +36,7 @@ public: virtual void AddParticleGen1(); virtual void AddParticleGen2(); virtual void AddPlaneObject(); - virtual void AddDrawable(); + virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, s32 mode, IRenderer::EDrawableSorting sorting); virtual void SetDrawableCallback(); virtual void SetWorldViewpoint(); virtual void SetPerspective1(); diff --git a/include/MetroidPrime/CActor.hpp b/include/MetroidPrime/CActor.hpp index 26ea0e8c..4e78ac3e 100644 --- a/include/MetroidPrime/CActor.hpp +++ b/include/MetroidPrime/CActor.hpp @@ -28,7 +28,7 @@ class CSimpleShadow; class CDamageInfo; class CDamageVulnerability; -class CFrustum; +class CFrustumPlanes; class CHealthInfo; class CScriptWater; class CWeaponMode; @@ -211,9 +211,9 @@ public: const CMaterialList& list, const CActorParameters& params, TUniqueId nextDrawNode); ~CActor(); - virtual void PreRender(CStateManager&, const CFrustum&); - virtual void AddToRenderer(const CFrustum&, CStateManager&); - virtual void Render(CStateManager&); + virtual void PreRender(CStateManager&, const CFrustumPlanes&); + virtual void AddToRenderer(const CFrustumPlanes&, const CStateManager&) const; + virtual void Render(const CStateManager&) const; virtual bool CanRenderUnsorted(const CStateManager&) const; virtual void CalculateRenderBounds(); virtual CHealthInfo* HealthInfo(CStateManager&); @@ -240,17 +240,67 @@ public: void UpdateSfxEmitters(); void RemoveEmitter(); void SetModelData(const CModelData& modelData); + f32 GetAverageAnimVelocity(s32 anim); + void EnsureRendered(const CStateManager& mgr) const; + void EnsureRendered(const CStateManager& mgr, const CVector3f& pos, const CAABox& bounds) const; + void DrawTouchBounds() const; const CTransform4f& GetTransform() const { return x34_transform; } CVector3f GetTranslation() const { return x34_transform.GetTranslation(); } - bool GetMuted() const { return xe5_26_muted; } - bool HasAnimation() const { return x64_modelData && x64_modelData->GetAnimationData(); } - bool HasModelData() const { return x64_modelData && (x64_modelData->GetAnimationData() || x64_modelData->HasNormalModel()); } + + bool HasModelData() const { return GetModelData() && (GetModelData()->HasAnimation() || GetModelData()->HasNormalModel()); } CModelData* ModelData() { return x64_modelData.get(); } const CModelData* GetModelData() const { return x64_modelData.get(); } + + bool HasAnimation() const { return GetModelData() && GetModelData()->HasAnimation(); } CAnimData* AnimationData() { return ModelData()->AnimationData(); } const CAnimData* GetAnimationData() const { return GetModelData()->GetAnimationData(); } - f32 GetAverageAnimVelocity(s32 anim); + + bool HasShadow() const { return !x94_simpleShadow.null(); } + CSimpleShadow* Shadow() { return x94_simpleShadow.get(); } + const CSimpleShadow* GetShadow() const { return x94_simpleShadow.get(); } + + bool HasActorLights() const { return !x90_actorLights.null(); } + CActorLights* ActorLights() { return x90_actorLights.get(); } + const CActorLights* GetActorLights() const { return x90_actorLights.get(); } + + const CModelFlags& GetModelFlags() const { return xb4_drawFlags; } + void SetModelFlags(const CModelFlags& flags) { xb4_drawFlags = flags; } + + bool GetTransformDirty() const { return xe4_27_notInSortedLists; } + bool GetTransformDirtySpare() const { return xe4_28_transformDirty; } + bool GetPreRenderHasMoved() const { return xe4_29_actorLightsDirty; } + bool GetPreRenderClipped() const { return xe4_30_outOfFrustum; } + bool GetCalculateLighting() const { return xe4_31_calculateLighting && HasActorLights(); } + bool GetDrawShadow() const { return xe5_24_shadowEnabled; } + bool GetShadowDirty() const { return xe5_25_shadowDirty; } + bool GetMuted() const { return xe5_26_muted; } + bool GetRenderParticleDatabaseInside() const { return xe6_29_renderParticleDBInside; } + + void SetTransformDirty(bool b) { xe4_27_notInSortedLists = b; } + void SetTransformDirtySpare(bool b) { xe4_28_transformDirty = b; } + void SetPreRenderHasMoved(bool b) { xe4_29_actorLightsDirty = b; } + void SetPreRenderClipped(bool b) { xe4_30_outOfFrustum = b; } + void SetCalculateLighting(bool b) { xe4_31_calculateLighting = b; } + void SetDrawShadow(bool b) { xe5_24_shadowEnabled = b; } + void SetShadowDirty(bool b) { xe5_25_shadowDirty = b; } + void SetMuted(bool b) { xe5_26_muted = b; } + void SetRenderParticleDatabaseInside(bool b) { xe6_29_renderParticleDBInside = b; } + + const CAABox& GetRenderBoundsCached() const { return x9c_renderBounds; } + void SetRenderBounds(const CAABox& bounds) { x9c_renderBounds = bounds; } + + // 000c0ec8 00001c 801711a8 4 GetUseInSortedLists__6CActorCFv CActor.o + // 000c0ee4 000014 801711c4 4 SetUseInSortedLists__6CActorFb CActor.o + // 000c0ef8 00001c 801711d8 4 GetCallTouch__6CActorCFv CActor.o + // 000c0f14 000014 801711f4 4 SetCallTouch__6CActorFb CActor.o + // GetOrbitDistanceCheck__6CActorCFv + // GetCalculateLighting__6CActorCFv + // GetDrawShadow__6CActorCFv + // GetRenderBoundsCached__6CActorCFv + // GetRenderParticleDatabaseInside__6CActorCFv + + // HasModelParticles__6CActorCFv protected: CTransform4f x34_transform; diff --git a/include/MetroidPrime/CActorLights.hpp b/include/MetroidPrime/CActorLights.hpp index e955aee8..d102aed9 100644 --- a/include/MetroidPrime/CActorLights.hpp +++ b/include/MetroidPrime/CActorLights.hpp @@ -3,9 +3,86 @@ #include "types.h" +#include "MetroidPrime/TGameTypes.hpp" + +#include "Kyoto/Graphics/CColor.hpp" +#include "Kyoto/Math/CVector3f.hpp" + +#include "rstl/reserved_vector.hpp" + +enum ELightType { + kLT_Spot = 0, + kLT_Point = 1, + kLT_Directional = 2, + kLT_LocalAmbient = 3, + kLT_Custom = 4, +}; + +class CLight { +private: + CVector3f x0_pos; + CVector3f xc_dir; + CColor x18_color; + ELightType x1c_type; + f32 x20_spotCutoff; + f32 x24_distC; + f32 x28_distL; + f32 x2c_distQ; + f32 x30_angleC; + f32 x34_angleL; + f32 x38_angleQ; + u32 x3c_priority; + u32 x40_lightId; + mutable f32 x44_cachedRadius; + mutable f32 x48_cachedIntensity; + mutable bool x4c_24_intensityDirty : 1; + mutable bool x4c_25_radiusDirty : 1; +}; +CHECK_SIZEOF(CLight, 0x50) + +class CGameArea; + class CActorLights { public: ~CActorLights(); + + void BuildConstantAmbientLighting(); + bool BuildAreaLightList(const CStateManager& mgr, const CGameArea& area, const CAABox& bounds); + void BuildDynamicLightList(const CStateManager& mgr, const CAABox& bounds); + + bool GetNeedsRelight() const { return x298_24_dirty; } + +private: + rstl::reserved_vector< CLight, 4 > x0_areaLights; + rstl::reserved_vector< CLight, 4 > x144_dynamicLights; + CVector3f x288_ambientColor; + TAreaId x294_aid; + bool x298_24_dirty : 1; + bool x298_25_castShadows : 1; + bool x298_26_hasAreaLights : 1; + bool x298_27_findShadowLight : 1; + bool x298_28_inArea : 1; + bool x298_29_ambienceGenerated : 1; + bool x298_30_layer2 : 1; + bool x298_31_disableWorldLights : 1; + bool x299_24_inBrightLight : 1; + bool x299_25_useBrightLightLag : 1; + bool x299_26_ambientOnly : 1; + bool x29a_findNearestDynamicLights; + s32 x29c_shadowLightArrIdx; + s32 x2a0_shadowLightIdx; + u32 x2a4_lastUpdateFrame; + u32 x2a8_areaUpdateFramePeriod; + CVector3f x2ac_actorPosBias; + s32 x2b8_maxAreaLights; + s32 x2bc_maxDynamicLights; + CVector3f x2c0_lastActorPos; + f32 x2cc_actorPositionDeltaUpdateThreshold; + f32 x2d0_shadowDynamicRangeThreshold; + f32 x2d4_worldLightingLevel; + s32 x2d8_brightLightIdx; + u32 x2dc_brightLightLag; }; +CHECK_SIZEOF(CActorLights, 0x2e0) #endif \ No newline at end of file diff --git a/include/MetroidPrime/CAnimData.hpp b/include/MetroidPrime/CAnimData.hpp index 46e3278a..5d925246 100644 --- a/include/MetroidPrime/CAnimData.hpp +++ b/include/MetroidPrime/CAnimData.hpp @@ -31,6 +31,7 @@ public: kAD_Backward, }; + void PreRender(); void SetParticleEffectState(const rstl::string& name, bool active, CStateManager& mgr) { x120_particleDB.SetParticleEffectState(name, active, mgr); } diff --git a/include/MetroidPrime/CGameArea.hpp b/include/MetroidPrime/CGameArea.hpp new file mode 100644 index 00000000..bb296298 --- /dev/null +++ b/include/MetroidPrime/CGameArea.hpp @@ -0,0 +1,81 @@ +#ifndef _CGAMEAREA_HPP +#define _CGAMEAREA_HPP + +#include "types.h" + +#include "MetroidPrime/TGameTypes.hpp" + +#include "Kyoto/IObjectStore.hpp" +#include "Kyoto/Math/CAABox.hpp" +#include "Kyoto/Math/CTransform4f.hpp" + +#include "rstl/auto_ptr.hpp" +#include "rstl/list.hpp" +#include "rstl/pair.hpp" +#include "rstl/rc_ptr.hpp" +#include "rstl/vector.hpp" + +class IGameArea { +public: + virtual ~IGameArea(); + virtual const CTransform4f& IGetTM() const = 0; + virtual CAssetId IGetStringTableAssetId() const = 0; + virtual u32 IGetNumAttachedAreas() const = 0; + virtual TAreaId IGetAttachedAreaId(int) const = 0; + virtual bool IIsActive() const = 0; + virtual CAssetId IGetAreaAssetId() const = 0; + virtual s32 IGetAreaSaveId() const = 0; + virtual rstl::pair< rstl::auto_ptr< u8 >, s32 > IGetScriptingMemoryAlways() const = 0; +}; + +class Dock; +class CToken; +class IDvdRequest; + +class CGameArea : public IGameArea { +public: + ~CGameArea(); + const CTransform4f& IGetTM() const override; + CAssetId IGetStringTableAssetId() const override; + u32 IGetNumAttachedAreas() const override; + TAreaId IGetAttachedAreaId(int) const override; + bool IIsActive() const override; + CAssetId IGetAreaAssetId() const override; + s32 IGetAreaSaveId() const override; + rstl::pair< rstl::auto_ptr< u8 >, s32 > IGetScriptingMemoryAlways() const override; + + bool IsLoaded() const { return xf0_24_postConstructed; } + bool IsActive() const { return xf0_25_active; } + +private: + enum EPhase { + kP_LoadHeader, + kP_LoadSecSizes, + kP_ReserveSections, + kP_LoadDataSections, + kP_WaitForFinish, + }; + TAreaId x4_selfIdx; + CAssetId x8_nameSTRG; + CTransform4f xc_transform; + CTransform4f x3c_invTransform; + CAABox x6c_aabb; + CAssetId x84_mrea; + s32 x88_areaId; + rstl::vector< u16 > x8c_attachedAreaIndices; + rstl::vector< SObjectTag > x9c_deps1; + rstl::vector< SObjectTag > xac_deps2; + rstl::vector< u32 > xbc_layerDepOffsets; + rstl::vector< Dock > xcc_docks; + rstl::vector< CToken > xdc_tokens; + u32 xec_totalResourcesSize; + bool xf0_24_postConstructed : 1; + bool xf0_25_active : 1; + bool xf0_26_tokensReady : 1; + bool xf0_27_loadPaused : 1; + bool xf0_28_validated : 1; + EPhase xf4_phase; + rstl::list< rstl::rc_ptr< IDvdRequest > > xf8_loadTransactions; +}; + +#endif \ No newline at end of file diff --git a/include/MetroidPrime/CModelData.hpp b/include/MetroidPrime/CModelData.hpp index 6074cd9c..1f24d330 100644 --- a/include/MetroidPrime/CModelData.hpp +++ b/include/MetroidPrime/CModelData.hpp @@ -15,8 +15,11 @@ #include "rstl/pair.hpp" class CAABox; +class CActorLights; class CAnimData; +class CFrustumPlanes; class CModel; +class CModelFlags; // TODO move #include "Kyoto/Math/CQuaternion.hpp" @@ -28,8 +31,14 @@ CHECK_SIZEOF(SAdvancementDeltas, 0x1c) class CModelData { public: + enum EWhichModel { + kWM_Normal, + kWM_XRay, + kWM_Thermal, + kWM_ThermalHot, + }; + // TODO these probably aren't real - bool IsStaticModel() const { return xc_animData.get() == nullptr && !x1c_normalModel; } bool HasNormalModel() const { return x1c_normalModel; } CModelData(); @@ -40,19 +49,24 @@ public: SAdvancementDeltas AdvanceAnimation(float dt, CStateManager& mgr, TAreaId aid, bool advTree); void AdvanceParticles(const CTransform4f& xf, float dt, CStateManager& mgr); + void RenderParticles(const CFrustumPlanes& planes) const; + void RenderUnsortedParts(EWhichModel which, const CTransform4f& xf, const CActorLights* lights, const CModelFlags& flags) const; const CAnimData* GetAnimationData() const { return xc_animData.get(); } CAnimData* AnimationData() { return xc_animData.get(); } CAABox GetBounds(const CTransform4f& xf) const; CAABox GetBounds() const; - bool IsNull() const { return xc_animData.get() == nullptr && !x1c_normalModel; } + bool HasAnimation() const { return !xc_animData.null(); } + bool IsNull() const { return xc_animData.null() && !x1c_normalModel; } void SetXRayModel(const rstl::pair< CAssetId, CAssetId >& assets); void SetInfraModel(const rstl::pair< CAssetId, CAssetId >& assets); void SetAmbientColor(const CColor& color) { x18_ambientColor = color; } void SetSortThermal(bool b) { x14_25_sortThermal = b; } + static EWhichModel GetRenderingModel(const CStateManager& mgr); + private: CVector3f x0_scale; rstl::auto_ptr< CAnimData > xc_animData; diff --git a/include/MetroidPrime/CSimpleShadow.hpp b/include/MetroidPrime/CSimpleShadow.hpp new file mode 100644 index 00000000..94ce0095 --- /dev/null +++ b/include/MetroidPrime/CSimpleShadow.hpp @@ -0,0 +1,22 @@ +#ifndef _CSIMPLESHADOW_HPP +#define _CSIMPLESHADOW_HPP + +#include "types.h" + +class CAABox; +class CStateManager; +class CTransform4f; + +class CSimpleShadow { +public: + CAABox GetBounds() const; + const CTransform4f& GetTransform() const; + CAABox GetMaxShadowBox(const CAABox& bounds) const; + void Calculate(const CAABox& bounds, const CTransform4f& xf, const CStateManager& mgr); + bool Valid() const; + +private: + // TODO +}; + +#endif \ No newline at end of file diff --git a/include/MetroidPrime/CStateManager.hpp b/include/MetroidPrime/CStateManager.hpp index 2df37c08..e81dc4ea 100644 --- a/include/MetroidPrime/CStateManager.hpp +++ b/include/MetroidPrime/CStateManager.hpp @@ -8,19 +8,27 @@ #include "rstl/auto_ptr.hpp" #include "rstl/list.hpp" +#include "rstl/rc_ptr.hpp" #include "rstl/reserved_vector.hpp" #include "rstl/single_ptr.hpp" +class CAABox; +class CActor; class CActorModelParticles; class CCameraManager; class CEnvFxManager; class CFluidPlaneManager; +class CMapWorldInfo; class CObjectList; class CPlayer; +class CPlayerState; class CRumbleManager; +class CScriptMailbox; class CStateManagerContainer; +class CVector3f; class CWeaponMgr; class CWorld; +class CWorldTransManager; namespace SL { class CSortedListManager; @@ -29,8 +37,14 @@ class CSortedListManager; class CStateManager { public: void SendScriptMsg(TUniqueId uid, TEditorId target, EScriptObjectMessage msg, EScriptObjectState state); + bool AddDrawableActor(const CActor& actor, const CVector3f& pos, const CAABox& bounds) const; - CCameraManager& GetCameraManager() { return *x870_cameraManager; } + CCameraManager* CameraManager() { return x870_cameraManager; } + const CCameraManager* GetCameraManager() const { return x870_cameraManager; } + CPlayerState* PlayerState() { return x8b8_playerState.GetPtr(); } + const CPlayerState* GetPlayerState() const { return x8b8_playerState.GetPtr(); } + CWorld* World() { return x850_world.get(); } + const CWorld* GetWorld() const { return x850_world.get(); } private: u16 x0_nextFreeIndex; @@ -47,6 +61,14 @@ private: CEnvFxManager* x880_envFxManager; rstl::auto_ptr< CActorModelParticles > x884_actorModelParticles; CRumbleManager* x88c_rumbleManager; + // TODO + // rstl::multimap< TEditorId, TUniqueId > x890_scriptIdMap; + // rstl::map< TEditorId, SScriptObjectStream > x8a4_loadedScriptObjects; + u8 pad[0x28]; + rstl::rc_ptr< CPlayerState > x8b8_playerState; + rstl::rc_ptr< CScriptMailbox > x8bc_mailbox; + rstl::rc_ptr< CMapWorldInfo > x8c0_mapWorldInfo; + rstl::rc_ptr< CWorldTransManager > x8c4_worldTransManager; }; #endif diff --git a/include/MetroidPrime/CWorld.hpp b/include/MetroidPrime/CWorld.hpp new file mode 100644 index 00000000..35162cce --- /dev/null +++ b/include/MetroidPrime/CWorld.hpp @@ -0,0 +1,111 @@ +#ifndef _CWORLD_HPP +#define _CWORLD_HPP + +#include "types.h" + +#include "MetroidPrime/TGameTypes.hpp" + +#include "Kyoto/IObjectStore.hpp" + +#include "rstl/string.hpp" + +class CMapWorld; +class IGameArea; + +class IWorld { +public: + virtual ~IWorld(); + virtual CAssetId IGetWorldAssetId() const = 0; + virtual CAssetId IGetStringTableAssetId() const = 0; + virtual CAssetId IGetSaveWorldAssetId() const = 0; + virtual const CMapWorld* IGetMapWorld() const = 0; + virtual CMapWorld* IMapWorld() = 0; + virtual const IGameArea* IGetAreaAlways(TAreaId id) const = 0; + virtual TAreaId IGetCurrentAreaId() const = 0; + virtual TAreaId IGetAreaId(CAssetId id) const = 0; + virtual bool ICheckWorldComplete() = 0; + virtual rstl::string IGetDefaultAudioTrack() const = 0; + virtual s32 IGetAreaCount() const = 0; +}; + +class CGameArea; +class CRelay; +class CSoundGroupData; +class IDvdRequest; +class IFactory; + +// TODO move? +enum EEnvFxType { + kEFX_None, + kEFX_Snow, + kEFX_Rain, + kEFX_UnderwaterFlake, +}; + +class CWorld : public IWorld { +public: + ~CWorld(); + CAssetId IGetWorldAssetId() const override; + CAssetId IGetStringTableAssetId() const override; + CAssetId IGetSaveWorldAssetId() const override; + const CMapWorld* IGetMapWorld() const override; + CMapWorld* IMapWorld() override; + const IGameArea* IGetAreaAlways(TAreaId id) const override; + TAreaId IGetCurrentAreaId() const override; + TAreaId IGetAreaId(CAssetId id) const override; + bool ICheckWorldComplete() override; + rstl::string IGetDefaultAudioTrack() const override; + s32 IGetAreaCount() const override; + + const CGameArea& GetAreaAlways(TAreaId id) const { + return *x18_areas[id.Value()]; + } + const CGameArea* GetArea(TAreaId id) const { + return x18_areas[id.Value()].get(); + } + bool IsAreaValid(TAreaId id) const { + return x18_areas[id.Value()]->IsLoaded(); + } + +private: + enum Phase { + kP_Loading, + kP_LoadingMap, + kP_LoadingMapAreas, + kP_LoadingSkyBox, + kP_LoadingSoundGroups, + kP_Done, + }; + + Phase x4_phase; + CAssetId x8_mlvlId; + CAssetId xc_strgId; + CAssetId x10_savwId; + rstl::vector< rstl::auto_ptr< CGameArea > > x18_areas; + CAssetId x24_mapwId; + CMapWorld* x28_mapWorld; + rstl::vector< CRelay > x2c_relays; + rstl::rc_ptr< IDvdRequest > x3c_loadToken; + rstl::single_ptr< u8 > x40_loadBuf; + u32 x44_bufSz; + u32 x48_chainCount; + CGameArea* x4c_chainHeads[5]; + IObjectStore* x60_objectStore; + IFactory* x64_resFactory; + TAreaId x68_curAreaId; + u32 x6c_loadedAudioGrpCount; + bool x70_24_currentAreaNeedsAllocation : 1; + bool x70_25_loadPaused : 1; + bool x70_26_skyboxActive : 1; + bool x70_27_skyboxVisible : 1; + rstl::vector< CSoundGroupData > x74_soundGroupData; + rstl::string x84_defAudioTrack; + rstl::optional_object< TLockedToken< CModel > > x94_skyboxWorld; + rstl::optional_object< TLockedToken< CModel > > xa4_skyboxWorldLoaded; + rstl::optional_object< TLockedToken< CModel > > xb4_skyboxOverride; + EEnvFxType xc4_neededFx; + rstl::reserved_vector< CSfxHandle, 10 > xc8_globalSfxHandles; +}; +CHECK_SIZEOF(CWorld, 0xf4) + +#endif \ No newline at end of file diff --git a/include/MetroidPrime/Player/CPlayerState.hpp b/include/MetroidPrime/Player/CPlayerState.hpp index 503a19a3..237ff513 100644 --- a/include/MetroidPrime/Player/CPlayerState.hpp +++ b/include/MetroidPrime/Player/CPlayerState.hpp @@ -3,8 +3,19 @@ #include "types.h" +class CStateManager; + class CPlayerState { public: + enum EPlayerVisor { + kPV_Combat, + kPV_XRay, + kPV_Scan, + kPV_Thermal, + }; + + EPlayerVisor GetActiveVisor(const CStateManager& mgr) const; + void SetIsFusionEnabled(bool v); private: diff --git a/include/rstl/auto_ptr.hpp b/include/rstl/auto_ptr.hpp index 7f43c9e9..a1df2855 100644 --- a/include/rstl/auto_ptr.hpp +++ b/include/rstl/auto_ptr.hpp @@ -27,15 +27,14 @@ public: // x4_item = other.x4_item; // other.x0_has = false; // } - T* get() { return x4_item; } - /* const*/ T* get() const { return x4_item; } - T* operator->() { return get(); } - const T* operator->() const { return get(); } + T* get() const { return x4_item; } + T* operator->() const { return x4_item; } + T& operator*() const { return *x4_item; } T* release() const { x0_has = false; return x4_item; } - operator bool() const { return x0_has; } + bool null() const { return x4_item == nullptr; } }; } // namespace rstl diff --git a/include/rstl/rc_ptr.hpp b/include/rstl/rc_ptr.hpp index 2b174636..3aa6f240 100644 --- a/include/rstl/rc_ptr.hpp +++ b/include/rstl/rc_ptr.hpp @@ -17,8 +17,10 @@ class rc_ptr { public: ~rc_ptr(); - T* get() { return x0_refData->x0_ptr; } - T* operator->() { return get(); } + T* GetPtr() const { return x0_refData->x0_ptr; } + // TODO ReleaseData__Q24rstl20rc_ptr + T* operator->() const { return GetPtr(); } + T& operator*() const { return *GetPtr(); } }; template < typename T > diff --git a/include/rstl/single_ptr.hpp b/include/rstl/single_ptr.hpp index ac5e12da..06777dc4 100644 --- a/include/rstl/single_ptr.hpp +++ b/include/rstl/single_ptr.hpp @@ -20,7 +20,7 @@ public: delete x0_ptr; x0_ptr = ptr; } - operator bool() const { return x0_ptr != nullptr; } + bool null() const { return x0_ptr == nullptr; } T& operator*() { return *x0_ptr; } const T& operator*() const { return *x0_ptr; } }; diff --git a/src/MetroidPrime/CActor.cpp b/src/MetroidPrime/CActor.cpp index a3245707..9e0e702f 100644 --- a/src/MetroidPrime/CActor.cpp +++ b/src/MetroidPrime/CActor.cpp @@ -1,14 +1,22 @@ #include "MetroidPrime/CActor.hpp" +#include "MetaRender/CCubeRenderer.hpp" #include "MetroidPrime/CActorLights.hpp" #include "MetroidPrime/CActorParameters.hpp" #include "MetroidPrime/CAnimData.hpp" +#include "MetroidPrime/CGameArea.hpp" #include "MetroidPrime/CModelData.hpp" +#include "MetroidPrime/CSimpleShadow.hpp" +#include "MetroidPrime/CStateManager.hpp" +#include "MetroidPrime/CWorld.hpp" #include "MetroidPrime/Cameras/CCameraManager.hpp" #include "MetroidPrime/Cameras/CGameCamera.hpp" +#include "MetroidPrime/Player/CPlayerState.hpp" #include "Kyoto/Audio/CAudioSys.hpp" #include "Kyoto/Audio/CSfxManager.hpp" +#include "Kyoto/Graphics/CGraphics.hpp" +#include "Kyoto/Math/CFrustumPlanes.hpp" static CMaterialList MakeActorMaterialList(const CMaterialList& in, const CActorParameters& params) { CMaterialList ret = in; @@ -25,12 +33,12 @@ CActor::CActor(TUniqueId uid, bool active, const rstl::string& name, const CEnti const CModelData& mData, const CMaterialList& list, const CActorParameters& params, TUniqueId nextDrawNode) : CEntity(uid, info, active, name) , x34_transform(xf) -, x64_modelData(mData.IsStaticModel() ? nullptr : new CModelData(mData)) +, x64_modelData(mData.IsNull() ? nullptr : new CModelData(mData)) , x68_material(MakeActorMaterialList(list, params)) , x70_materialFilter(CMaterialFilter::MakeIncludeExclude(CMaterialList().Union(SolidMaterial), CMaterialList(0))) , x88_sfxId(InvalidSfxId) , x8c_loopingSfxHandle(0) -, x90_actorLights(mData.IsStaticModel() ? nullptr : params.GetLighting().MakeActorLights().release()) +, x90_actorLights(mData.IsNull() ? nullptr : params.GetLighting().MakeActorLights().release()) , x9c_renderBounds(CAABox::mskInvertedBox) , xb4_drawFlags(CModelFlags::Normal()) , xbc_time(0.f) @@ -66,7 +74,7 @@ CActor::CActor(TUniqueId uid, bool active, const rstl::string& name, const CEnti , xe7_29_drawEnabled(active) , xe7_30_doTargetDistanceTest(true) , xe7_31_targetable(true) { - if (x64_modelData) { + if (!x64_modelData.null()) { if (params.GetXRay().first != 0) { x64_modelData->SetXRayModel(params.GetXRay()); } @@ -96,14 +104,14 @@ SAdvancementDeltas CActor::UpdateAnimation(float dt, CStateManager& mgr, bool ad u16 maxVol = xd4_maxVol; s32 aid = x4_areaId.Value(); - const CGameCamera* camera = mgr.GetCameraManager().GetCurrentCamera(mgr); + const CGameCamera* camera = mgr.GetCameraManager()->GetCurrentCamera(mgr); const CVector3f origin = GetTranslation(); const CVector3f toCamera = camera->GetTranslation() - origin; - const CInt32POINode* intNode = nullptr; - const CSoundPOINode* soundNode = nullptr; - const CParticlePOINode* particleNode = nullptr; - + const CInt32POINode* intNode; + const CSoundPOINode* soundNode; + const CParticlePOINode* particleNode; + s32 soundNodeCount = 0; if (HasAnimation()) { soundNode = GetAnimationData()->GetSoundPOIList(soundNodeCount); @@ -160,8 +168,7 @@ SAdvancementDeltas CActor::UpdateAnimation(float dt, CStateManager& mgr, bool ad } void CActor::RemoveEmitter() { - CSfxHandle handle = x8c_loopingSfxHandle; - if (handle) { + if (CSfxHandle handle = x8c_loopingSfxHandle) { CSfxManager::RemoveEmitter(handle); x88_sfxId = -1; x8c_loopingSfxHandle = 0; @@ -178,10 +185,10 @@ f32 CActor::GetAverageAnimVelocity(s32 anim) { return HasAnimation() ? GetAnimat void CActor::CalculateRenderBounds() { if (HasModelData()) { - x9c_renderBounds = GetModelData()->GetBounds(GetTransform()); + SetRenderBounds(GetModelData()->GetBounds(GetTransform())); } else { const CVector3f origin = GetTranslation(); - x9c_renderBounds = CAABox(origin, origin); + SetRenderBounds(CAABox(origin, origin)); } } @@ -191,3 +198,102 @@ void CActor::SetModelData(const CModelData& modelData) { x64_modelData = modelDa extern "C" { void sub_8005502c() {} } + +// TODO nonmatching +void CActor::PreRender(CStateManager& mgr, const CFrustumPlanes& planes) { + if (HasModelData()) { + SetPreRenderClipped(!planes.BoxInFrustumPlanes(x9c_renderBounds)); + if (!GetPreRenderClipped()) { + bool lightsDirty = false; + if (GetPreRenderHasMoved()) { + SetPreRenderHasMoved(false); + SetShadowDirty(true); + lightsDirty = true; + } else if (xe7_28_worldLightingDirty) { + lightsDirty = true; + } else if (HasActorLights() && GetActorLights()->GetNeedsRelight()) { + lightsDirty = true; + } + + if (GetShadowDirty() && GetDrawShadow() && HasShadow()) { + Shadow()->Calculate(GetModelData()->GetBounds(), GetTransform(), mgr); + SetShadowDirty(false); + } + + if (GetCalculateLighting()) { + CAABox bounds = GetModelData()->GetBounds(GetTransform()); + if (mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::kPV_Thermal) { + ActorLights()->BuildConstantAmbientLighting(); + } else { + if (lightsDirty) { + TAreaId aid = x4_areaId; + if (aid != kInvalidAreaId && mgr.GetWorld()->IsAreaValid(aid) && + ActorLights()->BuildAreaLightList(mgr, *mgr.GetWorld()->GetArea(aid), bounds)) { + xe7_28_worldLightingDirty = false; + } + } + ActorLights()->BuildDynamicLightList(mgr, bounds); + } + } + + if (GetModelData()->HasAnimation()) { + AnimationData()->PreRender(); + } + } else { + if (GetPreRenderHasMoved()) { + SetPreRenderHasMoved(false); + SetShadowDirty(true); + } + if (GetShadowDirty() && GetDrawShadow() && HasShadow()) { + if (planes.BoxInFrustumPlanes(GetShadow()->GetMaxShadowBox(GetModelData()->GetBounds(GetTransform()))) == true) { + Shadow()->Calculate(GetModelData()->GetBounds(), GetTransform(), mgr); + SetShadowDirty(false); + } + } + } + } +} + +void CActor::AddToRenderer(const CFrustumPlanes& planes, const CStateManager& mgr) const { + if (HasModelData()) { + if (GetRenderParticleDatabaseInside()) { + GetModelData()->RenderParticles(planes); + } + + if (!GetPreRenderClipped()) { + if (CanRenderUnsorted(mgr)) { + Render(mgr); + } else { + EnsureRendered(mgr); + } + } + + if (mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::kPV_XRay && + mgr.GetPlayerState()->GetActiveVisor(mgr) != CPlayerState::kPV_Thermal && GetDrawShadow() && GetShadow()->Valid() && + planes.BoxInFrustumPlanes(GetShadow()->GetBounds()) == true) { + gpRender->AddDrawable(GetShadow(), GetShadow()->GetTransform().GetTranslation(), GetShadow()->GetBounds(), 1, + IRenderer::kDS_SortedCallback); + } + } +} + +void CActor::EnsureRendered(const CStateManager& mgr, const CVector3f& pos, const CAABox& bounds) const { + if (GetModelData()) { + const CModelData::EWhichModel which = CModelData::GetRenderingModel(mgr); + GetModelData()->RenderUnsortedParts(which, GetTransform(), GetActorLights(), GetModelFlags()); + } + mgr.AddDrawableActor(*this, pos, bounds); +} + +void CActor::EnsureRendered(const CStateManager& mgr) const { + const CAABox bounds = GetSortingBounds(mgr); + const CVector3f viewForward = CGraphics::GetViewMatrix().GetForward(); + const CVector3f pos = bounds.ClosestPointAlongVector(viewForward); + EnsureRendered(mgr, pos, bounds); +} + +void CActor::DrawTouchBounds() const {} + +bool CActor::CanRenderUnsorted(const CStateManager& mgr) const { + // if (GetModelData()->IsNull() && ) +}