From ef4f2b353817a9d173c7d0459d39cc5bed16daf3 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 16 Apr 2022 15:09:42 -0700 Subject: [PATCH] Split CDecalDescription, and rename GameTweaks to CFrameDelayedKiller Former-commit-id: 186077f010484603817b120035b7e755e8812c71 --- asm/Dolphin/pad/PadClamp.s | 1 + .../{GameTweaks.s => CFrameDelayedKiller.s} | 4 +-- asm/Kyoto/Graphics/CLight.s | 20 ++++++------- asm/MetaRender/CCubeRenderer.s | 30 ------------------- asm/ctors.s | 10 +++---- obj_files.mk | 3 +- 6 files changed, 20 insertions(+), 48 deletions(-) rename asm/Kyoto/{GameTweaks.s => CFrameDelayedKiller.s} (99%) diff --git a/asm/Dolphin/pad/PadClamp.s b/asm/Dolphin/pad/PadClamp.s index 899a26ed..58504bd9 100644 --- a/asm/Dolphin/pad/PadClamp.s +++ b/asm/Dolphin/pad/PadClamp.s @@ -4,6 +4,7 @@ lbl_803D8588: .incbin "baserom.dol", 0x3D5588, 0x10 + .global lbl_803D8598 lbl_803D8598: .incbin "baserom.dol", 0x3D5598, 0x10 diff --git a/asm/Kyoto/GameTweaks.s b/asm/Kyoto/CFrameDelayedKiller.s similarity index 99% rename from asm/Kyoto/GameTweaks.s rename to asm/Kyoto/CFrameDelayedKiller.s index 05623a4c..96bd85a6 100644 --- a/asm/Kyoto/GameTweaks.s +++ b/asm/Kyoto/CFrameDelayedKiller.s @@ -301,8 +301,8 @@ lbl_8036CDEC: /* 8036CE0C 00369D6C 38 21 00 10 */ addi r1, r1, 0x10 /* 8036CE10 00369D70 4E 80 00 20 */ blr -.global __sinit_GameTweaks_cpp -__sinit_GameTweaks_cpp: +.global __sinit_CFrameDelayedKiller_cpp +__sinit_CFrameDelayedKiller_cpp: /* 8036CE14 00369D74 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8036CE18 00369D78 7C 08 02 A6 */ mflr r0 /* 8036CE1C 00369D7C 3C 60 80 54 */ lis r3, lbl_80540A4C@ha diff --git a/asm/Kyoto/Graphics/CLight.s b/asm/Kyoto/Graphics/CLight.s index d017f6a6..a972d516 100644 --- a/asm/Kyoto/Graphics/CLight.s +++ b/asm/Kyoto/Graphics/CLight.s @@ -318,12 +318,12 @@ BuildSpot__6CLightFRC9CVector3fRC9CVector3fRC6CColorf: BuildPoint__6CLightFRC9CVector3fRC6CColor: /* 80306434 00303394 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80306438 00303398 7C 08 02 A6 */ mflr r0 -/* 8030643C 0030339C 3C C0 80 5A */ lis r6, lbl_805A53E0@ha +/* 8030643C 0030339C 3C C0 80 5A */ lis r6, kDefaultDirection__6CLight@ha /* 80306440 003033A0 7C A7 2B 78 */ mr r7, r5 /* 80306444 003033A4 90 01 00 14 */ stw r0, 0x14(r1) /* 80306448 003033A8 7C 85 23 78 */ mr r5, r4 /* 8030644C 003033AC C0 22 C7 94 */ lfs f1, lbl_805AE4B4@sda21(r2) -/* 80306450 003033B0 38 C6 53 E0 */ addi r6, r6, lbl_805A53E0@l +/* 80306450 003033B0 38 C6 53 E0 */ addi r6, r6, kDefaultDirection__6CLight@l /* 80306454 003033B4 38 80 00 01 */ li r4, 1 /* 80306458 003033B8 48 00 01 19 */ bl __ct__6CLightF10ELightTypeRC9CVector3fRC9CVector3fRC6CColorf /* 8030645C 003033BC 80 01 00 14 */ lwz r0, 0x14(r1) @@ -335,10 +335,10 @@ BuildPoint__6CLightFRC9CVector3fRC6CColor: BuildDirectional__6CLightFRC9CVector3fRC6CColor: /* 8030646C 003033CC 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80306470 003033D0 7C 08 02 A6 */ mflr r0 -/* 80306474 003033D4 3C C0 80 5A */ lis r6, lbl_805A53C8@ha +/* 80306474 003033D4 3C C0 80 5A */ lis r6, kDefaultPosition__6CLight@ha /* 80306478 003033D8 7C A7 2B 78 */ mr r7, r5 /* 8030647C 003033DC 90 01 00 14 */ stw r0, 0x14(r1) -/* 80306480 003033E0 38 A6 53 C8 */ addi r5, r6, lbl_805A53C8@l +/* 80306480 003033E0 38 A6 53 C8 */ addi r5, r6, kDefaultPosition__6CLight@l /* 80306484 003033E4 7C 86 23 78 */ mr r6, r4 /* 80306488 003033E8 C0 22 C7 94 */ lfs f1, lbl_805AE4B4@sda21(r2) /* 8030648C 003033EC 38 80 00 02 */ li r4, 2 @@ -352,12 +352,12 @@ BuildDirectional__6CLightFRC9CVector3fRC6CColor: BuildLocalAmbient__6CLightFRC9CVector3fRC6CColor: /* 803064A4 00303404 94 21 FF F0 */ stwu r1, -0x10(r1) /* 803064A8 00303408 7C 08 02 A6 */ mflr r0 -/* 803064AC 0030340C 3C C0 80 5A */ lis r6, lbl_805A53E0@ha +/* 803064AC 0030340C 3C C0 80 5A */ lis r6, kDefaultDirection__6CLight@ha /* 803064B0 00303410 7C A7 2B 78 */ mr r7, r5 /* 803064B4 00303414 90 01 00 14 */ stw r0, 0x14(r1) /* 803064B8 00303418 7C 85 23 78 */ mr r5, r4 /* 803064BC 0030341C C0 22 C7 94 */ lfs f1, lbl_805AE4B4@sda21(r2) -/* 803064C0 00303420 38 C6 53 E0 */ addi r6, r6, lbl_805A53E0@l +/* 803064C0 00303420 38 C6 53 E0 */ addi r6, r6, kDefaultDirection__6CLight@l /* 803064C4 00303424 38 80 00 03 */ li r4, 3 /* 803064C8 00303428 48 00 00 A9 */ bl __ct__6CLightF10ELightTypeRC9CVector3fRC9CVector3fRC6CColorf /* 803064CC 0030342C 80 01 00 14 */ lwz r0, 0x14(r1) @@ -448,11 +448,11 @@ __ct__6CLightF10ELightTypeRC9CVector3fRC9CVector3fRC6CColorf: .global __sinit_CLight_cpp __sinit_CLight_cpp: /* 80306604 00303564 C0 22 C7 88 */ lfs f1, lbl_805AE4A8@sda21(r2) -/* 80306608 00303568 3C 80 80 5A */ lis r4, lbl_805A53C8@ha -/* 8030660C 0030356C 3C 60 80 5A */ lis r3, lbl_805A53E0@ha +/* 80306608 00303568 3C 80 80 5A */ lis r4, kDefaultPosition__6CLight@ha +/* 8030660C 0030356C 3C 60 80 5A */ lis r3, kDefaultDirection__6CLight@ha /* 80306610 00303570 C0 02 C7 84 */ lfs f0, lbl_805AE4A4@sda21(r2) -/* 80306614 00303574 D4 24 53 C8 */ stfsu f1, lbl_805A53C8@l(r4) -/* 80306618 00303578 D4 23 53 E0 */ stfsu f1, lbl_805A53E0@l(r3) +/* 80306614 00303574 D4 24 53 C8 */ stfsu f1, kDefaultPosition__6CLight@l(r4) +/* 80306618 00303578 D4 23 53 E0 */ stfsu f1, kDefaultDirection__6CLight@l(r3) /* 8030661C 0030357C D0 24 00 04 */ stfs f1, 4(r4) /* 80306620 00303580 D0 24 00 08 */ stfs f1, 8(r4) /* 80306624 00303584 D0 03 00 04 */ stfs f0, 4(r3) diff --git a/asm/MetaRender/CCubeRenderer.s b/asm/MetaRender/CCubeRenderer.s index 5d8dc7ee..4ea29069 100644 --- a/asm/MetaRender/CCubeRenderer.s +++ b/asm/MetaRender/CCubeRenderer.s @@ -2,36 +2,6 @@ .section .text, "ax" # 0x80003640 - 0x803CB1C0 -.global __ct__17CDecalDescriptionFv -__ct__17CDecalDescriptionFv: -/* 802B5CE4 002B2C44 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802B5CE8 002B2C48 7C 08 02 A6 */ mflr r0 -/* 802B5CEC 002B2C4C 90 01 00 14 */ stw r0, 0x14(r1) -/* 802B5CF0 002B2C50 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802B5CF4 002B2C54 7C 7F 1B 78 */ mr r31, r3 -/* 802B5CF8 002B2C58 4B FF FF C9 */ bl sub_802b5cc0 -/* 802B5CFC 002B2C5C 38 7F 00 1C */ addi r3, r31, 0x1c -/* 802B5D00 002B2C60 4B FF FF C1 */ bl sub_802b5cc0 -/* 802B5D04 002B2C64 38 80 00 00 */ li r4, 0 -/* 802B5D08 002B2C68 7F E3 FB 78 */ mr r3, r31 -/* 802B5D0C 002B2C6C 98 9F 00 44 */ stb r4, 0x44(r31) -/* 802B5D10 002B2C70 90 9F 00 48 */ stw r4, 0x48(r31) -/* 802B5D14 002B2C74 90 9F 00 4C */ stw r4, 0x4c(r31) -/* 802B5D18 002B2C78 90 9F 00 50 */ stw r4, 0x50(r31) -/* 802B5D1C 002B2C7C 90 9F 00 54 */ stw r4, 0x54(r31) -/* 802B5D20 002B2C80 90 9F 00 58 */ stw r4, 0x58(r31) -/* 802B5D24 002B2C84 88 1F 00 5C */ lbz r0, 0x5c(r31) -/* 802B5D28 002B2C88 50 80 3E 30 */ rlwimi r0, r4, 7, 0x18, 0x18 -/* 802B5D2C 002B2C8C 98 1F 00 5C */ stb r0, 0x5c(r31) -/* 802B5D30 002B2C90 88 1F 00 5C */ lbz r0, 0x5c(r31) -/* 802B5D34 002B2C94 50 80 36 72 */ rlwimi r0, r4, 6, 0x19, 0x19 -/* 802B5D38 002B2C98 98 1F 00 5C */ stb r0, 0x5c(r31) -/* 802B5D3C 002B2C9C 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802B5D40 002B2CA0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802B5D44 002B2CA4 7C 08 03 A6 */ mtlr r0 -/* 802B5D48 002B2CA8 38 21 00 10 */ addi r1, r1, 0x10 -/* 802B5D4C 002B2CAC 4E 80 00 20 */ blr - .global DrawString__13CCubeRendererFPCcii DrawString__13CCubeRendererFPCcii: /* 802B5D50 002B2CB0 94 21 FF E0 */ stwu r1, -0x20(r1) diff --git a/asm/ctors.s b/asm/ctors.s index b753b067..38d2c687 100644 --- a/asm/ctors.s +++ b/asm/ctors.s @@ -272,11 +272,11 @@ lbl_805A5214: .global lbl_805A5368 lbl_805A5368: .skip 0x60 -.global lbl_805A53C8 -lbl_805A53C8: +.global kDefaultPosition__6CLight +kDefaultPosition__6CLight: .skip 0x18 -.global lbl_805A53E0 -lbl_805A53E0: +.global kDefaultDirection__6CLight +kDefaultDirection__6CLight: .skip 0xC .global lbl_805A53EC lbl_805A53EC: @@ -556,5 +556,5 @@ __init_cpp_exceptions_reference: .4byte __sinit_CDSPStreamManager_cpp .4byte __sinit_CStreamAudioManager_cpp .4byte __sinit_CStaticAudioPlayer_cpp - .4byte __sinit_GameTweaks_cpp + .4byte __sinit_CFrameDelayedKiller_cpp .4byte 0 diff --git a/obj_files.mk b/obj_files.mk index 46f97e35..72de1192 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -389,6 +389,7 @@ WEAPONS :=\ $(BUILD_DIR)/asm/Weapons/CDecalDataFactory.o\ $(BUILD_DIR)/asm/Weapons/CDecal.o\ $(BUILD_DIR)/asm/Weapons/CWeaponDescription.o\ + $(BUILD_DIR)/asm/Weapons/CDecalDescription.o\ METARENDER :=\ $(BUILD_DIR)/asm/MetaRender/CCubeRenderer.o\ @@ -632,7 +633,7 @@ KYOTO :=\ $(BUILD_DIR)/asm/Kyoto/Audio/SDSPStream.o\ $(BUILD_DIR)/asm/Kyoto/Audio/g721.o\ $(BUILD_DIR)/asm/Kyoto/Audio/CStaticAudioPlayer.o\ - $(BUILD_DIR)/asm/Kyoto/GameTweaks.o\ + $(BUILD_DIR)/asm/Kyoto/CFrameDelayedKiller.o\ AI_FILES :=\ $(BUILD_DIR)/asm/Dolphin/ai.o