From 0b95ee0c23fddf44f2de73b6612b8b46de9307b9 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Sat, 11 Nov 2023 05:18:11 +0200 Subject: [PATCH] Various matches (#1984) --- .../mixExtraTrack__9JASDriverFPsUlPFl_Ps.s | 60 -- ...ixInterleaveTrack__9JASDriverFPsUlPFl_Ps.s | 37 -- .../mixMonoTrackWide__9JASDriverFPsUlPFl_Ps.s | 48 -- .../mixMonoTrack__9JASDriverFPsUlPFl_Ps.s | 48 -- asm/JSystem/JAudio2/JASCalc/func_8028F69C.s | 13 - .../Z2SoundObjMgr/__ct__13Z2SoundObjMgrFv.s | 25 - .../checkBattleFinish__13Z2SoundObjMgrFv.s | 8 - asm/Z2AudioLib/Z2SoundObjMgr/func_802C0074.s | 41 -- asm/Z2AudioLib/Z2SoundObjMgr/func_802C0190.s | 25 - .../isTwilightBattle__13Z2SoundObjMgrFv.s | 3 - .../searchEnemy__13Z2SoundObjMgrFv.s | 446 ------------- .../setBattleInit__13Z2SoundObjMgrFv.s | 9 - ...ForceBattleArea__13Z2SoundObjMgrFbUsUsUs.s | 6 - .../actionEnd__15daObjVolcBall_cFv.s | 75 --- include/JSystem/JAudio2/JASCalc.h | 2 + include/Z2AudioLib/Z2Creature.h | 3 +- include/Z2AudioLib/Z2SeqMgr.h | 16 + include/Z2AudioLib/Z2SoundObjMgr.h | 30 +- libs/JSystem/J3DGraphAnimator/J3DJoint.cpp | 7 +- libs/JSystem/JAudio2/JASAiCtrl.cpp | 123 +--- libs/JSystem/JAudio2/JASCalc.cpp | 19 +- libs/Z2AudioLib/Z2SoundObjMgr.cpp | 605 +++++++++--------- .../obj/d_a_obj_volcball/d_a_obj_volcball.cpp | 73 +-- src/d/menu/d_menu_ring.cpp | 4 +- 24 files changed, 423 insertions(+), 1303 deletions(-) delete mode 100644 asm/JSystem/JAudio2/JASAiCtrl/mixExtraTrack__9JASDriverFPsUlPFl_Ps.s delete mode 100644 asm/JSystem/JAudio2/JASAiCtrl/mixInterleaveTrack__9JASDriverFPsUlPFl_Ps.s delete mode 100644 asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrackWide__9JASDriverFPsUlPFl_Ps.s delete mode 100644 asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrack__9JASDriverFPsUlPFl_Ps.s delete mode 100644 asm/JSystem/JAudio2/JASCalc/func_8028F69C.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/__ct__13Z2SoundObjMgrFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/checkBattleFinish__13Z2SoundObjMgrFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/func_802C0074.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/func_802C0190.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/isTwilightBattle__13Z2SoundObjMgrFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/searchEnemy__13Z2SoundObjMgrFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/setBattleInit__13Z2SoundObjMgrFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObjMgr/setForceBattleArea__13Z2SoundObjMgrFbUsUsUs.s delete mode 100644 asm/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball/actionEnd__15daObjVolcBall_cFv.s diff --git a/asm/JSystem/JAudio2/JASAiCtrl/mixExtraTrack__9JASDriverFPsUlPFl_Ps.s b/asm/JSystem/JAudio2/JASAiCtrl/mixExtraTrack__9JASDriverFPsUlPFl_Ps.s deleted file mode 100644 index bd8946547d7..00000000000 --- a/asm/JSystem/JAudio2/JASAiCtrl/mixExtraTrack__9JASDriverFPsUlPFl_Ps.s +++ /dev/null @@ -1,60 +0,0 @@ -lbl_8029CB70: -/* 8029CB70 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8029CB74 7C 08 02 A6 */ mflr r0 -/* 8029CB78 90 01 00 24 */ stw r0, 0x24(r1) -/* 8029CB7C 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CB80 48 0C 56 55 */ bl _savegpr_27 -/* 8029CB84 7C 7D 1B 78 */ mr r29, r3 -/* 8029CB88 7C 9B 23 78 */ mr r27, r4 -/* 8029CB8C 7C BC 2B 78 */ mr r28, r5 -/* 8029CB90 38 60 00 05 */ li r3, 5 -/* 8029CB94 3C 80 80 3A */ lis r4, JASAiCtrl__stringBase0@ha /* 0x8039B2F0@ha */ -/* 8029CB98 38 84 B2 F0 */ addi r4, r4, JASAiCtrl__stringBase0@l /* 0x8039B2F0@l */ -/* 8029CB9C 38 84 00 3A */ addi r4, r4, 0x3a -/* 8029CBA0 4B FF 43 45 */ bl start__8JASProbeFlPCc -/* 8029CBA4 7F 63 DB 78 */ mr r3, r27 -/* 8029CBA8 7F 8C E3 78 */ mr r12, r28 -/* 8029CBAC 7D 89 03 A6 */ mtctr r12 -/* 8029CBB0 4E 80 04 21 */ bctrl -/* 8029CBB4 7C 7F 1B 79 */ or. r31, r3, r3 -/* 8029CBB8 41 82 00 80 */ beq lbl_8029CC38 -/* 8029CBBC 38 60 00 05 */ li r3, 5 -/* 8029CBC0 4B FF 43 65 */ bl stop__8JASProbeFl -/* 8029CBC4 38 60 00 06 */ li r3, 6 -/* 8029CBC8 3C 80 80 3A */ lis r4, JASAiCtrl__stringBase0@ha /* 0x8039B2F0@ha */ -/* 8029CBCC 38 84 B2 F0 */ addi r4, r4, JASAiCtrl__stringBase0@l /* 0x8039B2F0@l */ -/* 8029CBD0 38 84 00 41 */ addi r4, r4, 0x41 -/* 8029CBD4 4B FF 43 11 */ bl start__8JASProbeFlPCc -/* 8029CBD8 7F BE EB 78 */ mr r30, r29 -/* 8029CBDC 4B FF FE 29 */ bl getFrameSamples__9JASDriverFv -/* 8029CBE0 54 60 08 3C */ slwi r0, r3, 1 -/* 8029CBE4 7F BF 02 14 */ add r29, r31, r0 -/* 8029CBE8 7F 7C DB 78 */ mr r28, r27 -/* 8029CBEC 48 00 00 3C */ b lbl_8029CC28 -lbl_8029CBF0: -/* 8029CBF0 A8 7E 00 00 */ lha r3, 0(r30) -/* 8029CBF4 A8 1D 00 00 */ lha r0, 0(r29) -/* 8029CBF8 7C 63 02 14 */ add r3, r3, r0 -/* 8029CBFC 4B FF 2A A1 */ bl func_8028F69C -/* 8029CC00 B0 7E 00 00 */ sth r3, 0(r30) -/* 8029CC04 A8 7E 00 02 */ lha r3, 2(r30) -/* 8029CC08 A8 1F 00 00 */ lha r0, 0(r31) -/* 8029CC0C 7C 63 02 14 */ add r3, r3, r0 -/* 8029CC10 4B FF 2A 8D */ bl func_8028F69C -/* 8029CC14 B0 7E 00 02 */ sth r3, 2(r30) -/* 8029CC18 3B DE 00 04 */ addi r30, r30, 4 -/* 8029CC1C 3B BD 00 02 */ addi r29, r29, 2 -/* 8029CC20 3B FF 00 02 */ addi r31, r31, 2 -/* 8029CC24 3B 9C FF FF */ addi r28, r28, -1 -lbl_8029CC28: -/* 8029CC28 28 1C 00 00 */ cmplwi r28, 0 -/* 8029CC2C 40 82 FF C4 */ bne lbl_8029CBF0 -/* 8029CC30 38 60 00 06 */ li r3, 6 -/* 8029CC34 4B FF 42 F1 */ bl stop__8JASProbeFl -lbl_8029CC38: -/* 8029CC38 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CC3C 48 0C 55 E5 */ bl _restgpr_27 -/* 8029CC40 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8029CC44 7C 08 03 A6 */ mtlr r0 -/* 8029CC48 38 21 00 20 */ addi r1, r1, 0x20 -/* 8029CC4C 4E 80 00 20 */ blr diff --git a/asm/JSystem/JAudio2/JASAiCtrl/mixInterleaveTrack__9JASDriverFPsUlPFl_Ps.s b/asm/JSystem/JAudio2/JASAiCtrl/mixInterleaveTrack__9JASDriverFPsUlPFl_Ps.s deleted file mode 100644 index 40c8a999f86..00000000000 --- a/asm/JSystem/JAudio2/JASAiCtrl/mixInterleaveTrack__9JASDriverFPsUlPFl_Ps.s +++ /dev/null @@ -1,37 +0,0 @@ -lbl_8029CC50: -/* 8029CC50 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8029CC54 7C 08 02 A6 */ mflr r0 -/* 8029CC58 90 01 00 24 */ stw r0, 0x24(r1) -/* 8029CC5C 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CC60 48 0C 55 7D */ bl _savegpr_29 -/* 8029CC64 7C 7E 1B 78 */ mr r30, r3 -/* 8029CC68 7C 9D 23 78 */ mr r29, r4 -/* 8029CC6C 7F A3 EB 78 */ mr r3, r29 -/* 8029CC70 7C AC 2B 78 */ mr r12, r5 -/* 8029CC74 7D 89 03 A6 */ mtctr r12 -/* 8029CC78 4E 80 04 21 */ bctrl -/* 8029CC7C 28 03 00 00 */ cmplwi r3, 0 -/* 8029CC80 41 82 00 3C */ beq lbl_8029CCBC -/* 8029CC84 7F DF F3 78 */ mr r31, r30 -/* 8029CC88 7C 7E 1B 78 */ mr r30, r3 -/* 8029CC8C 57 BD 08 3C */ slwi r29, r29, 1 -/* 8029CC90 48 00 00 24 */ b lbl_8029CCB4 -lbl_8029CC94: -/* 8029CC94 A8 7F 00 00 */ lha r3, 0(r31) -/* 8029CC98 A8 1E 00 00 */ lha r0, 0(r30) -/* 8029CC9C 7C 63 02 14 */ add r3, r3, r0 -/* 8029CCA0 4B FF 29 FD */ bl func_8028F69C -/* 8029CCA4 B0 7F 00 00 */ sth r3, 0(r31) -/* 8029CCA8 3B FF 00 02 */ addi r31, r31, 2 -/* 8029CCAC 3B DE 00 02 */ addi r30, r30, 2 -/* 8029CCB0 3B BD FF FF */ addi r29, r29, -1 -lbl_8029CCB4: -/* 8029CCB4 28 1D 00 00 */ cmplwi r29, 0 -/* 8029CCB8 40 82 FF DC */ bne lbl_8029CC94 -lbl_8029CCBC: -/* 8029CCBC 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CCC0 48 0C 55 69 */ bl _restgpr_29 -/* 8029CCC4 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8029CCC8 7C 08 03 A6 */ mtlr r0 -/* 8029CCCC 38 21 00 20 */ addi r1, r1, 0x20 -/* 8029CCD0 4E 80 00 20 */ blr diff --git a/asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrackWide__9JASDriverFPsUlPFl_Ps.s b/asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrackWide__9JASDriverFPsUlPFl_Ps.s deleted file mode 100644 index 0c5b46eb7ec..00000000000 --- a/asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrackWide__9JASDriverFPsUlPFl_Ps.s +++ /dev/null @@ -1,48 +0,0 @@ -lbl_8029CAC0: -/* 8029CAC0 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8029CAC4 7C 08 02 A6 */ mflr r0 -/* 8029CAC8 90 01 00 24 */ stw r0, 0x24(r1) -/* 8029CACC 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CAD0 48 0C 57 09 */ bl _savegpr_28 -/* 8029CAD4 7C 7E 1B 78 */ mr r30, r3 -/* 8029CAD8 7C 9C 23 78 */ mr r28, r4 -/* 8029CADC 7C BD 2B 78 */ mr r29, r5 -/* 8029CAE0 38 60 00 05 */ li r3, 5 -/* 8029CAE4 3C 80 80 3A */ lis r4, JASAiCtrl__stringBase0@ha /* 0x8039B2F0@ha */ -/* 8029CAE8 38 84 B2 F0 */ addi r4, r4, JASAiCtrl__stringBase0@l /* 0x8039B2F0@l */ -/* 8029CAEC 38 84 00 2E */ addi r4, r4, 0x2e -/* 8029CAF0 4B FF 43 F5 */ bl start__8JASProbeFlPCc -/* 8029CAF4 7F 83 E3 78 */ mr r3, r28 -/* 8029CAF8 7F AC EB 78 */ mr r12, r29 -/* 8029CAFC 7D 89 03 A6 */ mtctr r12 -/* 8029CB00 4E 80 04 21 */ bctrl -/* 8029CB04 7C 7F 1B 79 */ or. r31, r3, r3 -/* 8029CB08 41 82 00 50 */ beq lbl_8029CB58 -/* 8029CB0C 38 60 00 05 */ li r3, 5 -/* 8029CB10 4B FF 44 15 */ bl stop__8JASProbeFl -/* 8029CB14 7F 9D E3 78 */ mr r29, r28 -/* 8029CB18 48 00 00 38 */ b lbl_8029CB50 -lbl_8029CB1C: -/* 8029CB1C A8 7E 00 00 */ lha r3, 0(r30) -/* 8029CB20 A8 1F 00 00 */ lha r0, 0(r31) -/* 8029CB24 7C 63 02 14 */ add r3, r3, r0 -/* 8029CB28 4B FF 2B 75 */ bl func_8028F69C -/* 8029CB2C B0 7E 00 00 */ sth r3, 0(r30) -/* 8029CB30 A8 7E 00 02 */ lha r3, 2(r30) -/* 8029CB34 A8 1F 00 00 */ lha r0, 0(r31) -/* 8029CB38 7C 60 18 50 */ subf r3, r0, r3 -/* 8029CB3C 4B FF 2B 61 */ bl func_8028F69C -/* 8029CB40 B0 7E 00 02 */ sth r3, 2(r30) -/* 8029CB44 3B DE 00 04 */ addi r30, r30, 4 -/* 8029CB48 3B FF 00 02 */ addi r31, r31, 2 -/* 8029CB4C 3B BD FF FF */ addi r29, r29, -1 -lbl_8029CB50: -/* 8029CB50 28 1D 00 00 */ cmplwi r29, 0 -/* 8029CB54 40 82 FF C8 */ bne lbl_8029CB1C -lbl_8029CB58: -/* 8029CB58 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CB5C 48 0C 56 C9 */ bl _restgpr_28 -/* 8029CB60 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8029CB64 7C 08 03 A6 */ mtlr r0 -/* 8029CB68 38 21 00 20 */ addi r1, r1, 0x20 -/* 8029CB6C 4E 80 00 20 */ blr diff --git a/asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrack__9JASDriverFPsUlPFl_Ps.s b/asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrack__9JASDriverFPsUlPFl_Ps.s deleted file mode 100644 index 69c32139676..00000000000 --- a/asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrack__9JASDriverFPsUlPFl_Ps.s +++ /dev/null @@ -1,48 +0,0 @@ -lbl_8029CA10: -/* 8029CA10 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8029CA14 7C 08 02 A6 */ mflr r0 -/* 8029CA18 90 01 00 24 */ stw r0, 0x24(r1) -/* 8029CA1C 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CA20 48 0C 57 B9 */ bl _savegpr_28 -/* 8029CA24 7C 7E 1B 78 */ mr r30, r3 -/* 8029CA28 7C 9C 23 78 */ mr r28, r4 -/* 8029CA2C 7C BD 2B 78 */ mr r29, r5 -/* 8029CA30 38 60 00 05 */ li r3, 5 -/* 8029CA34 3C 80 80 3A */ lis r4, JASAiCtrl__stringBase0@ha /* 0x8039B2F0@ha */ -/* 8029CA38 38 84 B2 F0 */ addi r4, r4, JASAiCtrl__stringBase0@l /* 0x8039B2F0@l */ -/* 8029CA3C 38 84 00 25 */ addi r4, r4, 0x25 -/* 8029CA40 4B FF 44 A5 */ bl start__8JASProbeFlPCc -/* 8029CA44 7F 83 E3 78 */ mr r3, r28 -/* 8029CA48 7F AC EB 78 */ mr r12, r29 -/* 8029CA4C 7D 89 03 A6 */ mtctr r12 -/* 8029CA50 4E 80 04 21 */ bctrl -/* 8029CA54 7C 7F 1B 79 */ or. r31, r3, r3 -/* 8029CA58 41 82 00 50 */ beq lbl_8029CAA8 -/* 8029CA5C 38 60 00 05 */ li r3, 5 -/* 8029CA60 4B FF 44 C5 */ bl stop__8JASProbeFl -/* 8029CA64 7F 9D E3 78 */ mr r29, r28 -/* 8029CA68 48 00 00 38 */ b lbl_8029CAA0 -lbl_8029CA6C: -/* 8029CA6C A8 7E 00 00 */ lha r3, 0(r30) -/* 8029CA70 A8 1F 00 00 */ lha r0, 0(r31) -/* 8029CA74 7C 63 02 14 */ add r3, r3, r0 -/* 8029CA78 4B FF 2C 25 */ bl func_8028F69C -/* 8029CA7C B0 7E 00 00 */ sth r3, 0(r30) -/* 8029CA80 A8 7E 00 02 */ lha r3, 2(r30) -/* 8029CA84 A8 1F 00 00 */ lha r0, 0(r31) -/* 8029CA88 7C 63 02 14 */ add r3, r3, r0 -/* 8029CA8C 4B FF 2C 11 */ bl func_8028F69C -/* 8029CA90 B0 7E 00 02 */ sth r3, 2(r30) -/* 8029CA94 3B DE 00 04 */ addi r30, r30, 4 -/* 8029CA98 3B FF 00 02 */ addi r31, r31, 2 -/* 8029CA9C 3B BD FF FF */ addi r29, r29, -1 -lbl_8029CAA0: -/* 8029CAA0 28 1D 00 00 */ cmplwi r29, 0 -/* 8029CAA4 40 82 FF C8 */ bne lbl_8029CA6C -lbl_8029CAA8: -/* 8029CAA8 39 61 00 20 */ addi r11, r1, 0x20 -/* 8029CAAC 48 0C 57 79 */ bl _restgpr_28 -/* 8029CAB0 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8029CAB4 7C 08 03 A6 */ mtlr r0 -/* 8029CAB8 38 21 00 20 */ addi r1, r1, 0x20 -/* 8029CABC 4E 80 00 20 */ blr diff --git a/asm/JSystem/JAudio2/JASCalc/func_8028F69C.s b/asm/JSystem/JAudio2/JASCalc/func_8028F69C.s deleted file mode 100644 index 339624e8aad..00000000000 --- a/asm/JSystem/JAudio2/JASCalc/func_8028F69C.s +++ /dev/null @@ -1,13 +0,0 @@ -lbl_8028F69C: -/* 8028F69C 2C 03 80 00 */ cmpwi r3, -32768 -/* 8028F6A0 41 81 00 0C */ bgt lbl_8028F6AC -/* 8028F6A4 38 60 80 00 */ li r3, -32768 -/* 8028F6A8 4E 80 00 20 */ blr -lbl_8028F6AC: -/* 8028F6AC 2C 03 7F FF */ cmpwi r3, 0x7fff -/* 8028F6B0 38 00 7F FF */ li r0, 0x7fff -/* 8028F6B4 40 80 00 08 */ bge lbl_8028F6BC -/* 8028F6B8 7C 60 07 34 */ extsh r0, r3 -lbl_8028F6BC: -/* 8028F6BC 7C 03 03 78 */ mr r3, r0 -/* 8028F6C0 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/__ct__13Z2SoundObjMgrFv.s b/asm/Z2AudioLib/Z2SoundObjMgr/__ct__13Z2SoundObjMgrFv.s deleted file mode 100644 index 61452e9bb9d..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/__ct__13Z2SoundObjMgrFv.s +++ /dev/null @@ -1,25 +0,0 @@ -lbl_802BF920: -/* 802BF920 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BF924 7C 08 02 A6 */ mflr r0 -/* 802BF928 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BF92C 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BF930 7C 7F 1B 78 */ mr r31, r3 -/* 802BF934 93 ED 85 C8 */ stw r31, __OSReport_disable-0x50(r13) -/* 802BF938 48 01 C5 DD */ bl initiate__10JSUPtrListFv -/* 802BF93C 38 00 00 00 */ li r0, 0 -/* 802BF940 98 1F 00 19 */ stb r0, 0x19(r31) -/* 802BF944 98 1F 00 1B */ stb r0, 0x1b(r31) -/* 802BF948 7F E3 FB 78 */ mr r3, r31 -/* 802BF94C 48 00 07 B5 */ bl setBattleInit__13Z2SoundObjMgrFv -/* 802BF950 7F E3 FB 78 */ mr r3, r31 -/* 802BF954 38 80 00 00 */ li r4, 0 -/* 802BF958 38 A0 02 BC */ li r5, 0x2bc -/* 802BF95C 38 C0 04 4C */ li r6, 0x44c -/* 802BF960 38 E0 05 DC */ li r7, 0x5dc -/* 802BF964 48 00 00 1D */ bl setForceBattleArea__13Z2SoundObjMgrFbUsUsUs -/* 802BF968 7F E3 FB 78 */ mr r3, r31 -/* 802BF96C 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BF970 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BF974 7C 08 03 A6 */ mtlr r0 -/* 802BF978 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BF97C 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/checkBattleFinish__13Z2SoundObjMgrFv.s b/asm/Z2AudioLib/Z2SoundObjMgr/checkBattleFinish__13Z2SoundObjMgrFv.s deleted file mode 100644 index b1c92ba3e66..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/checkBattleFinish__13Z2SoundObjMgrFv.s +++ /dev/null @@ -1,8 +0,0 @@ -lbl_802C0120: -/* 802C0120 88 83 00 18 */ lbz r4, 0x18(r3) -/* 802C0124 88 03 00 17 */ lbz r0, 0x17(r3) -/* 802C0128 7C 04 00 50 */ subf r0, r4, r0 -/* 802C012C 38 60 00 01 */ li r3, 1 -/* 802C0130 7C 00 00 34 */ cntlzw r0, r0 -/* 802C0134 5C 63 07 FE */ rlwnm r3, r3, r0, 0x1f, 0x1f -/* 802C0138 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/func_802C0074.s b/asm/Z2AudioLib/Z2SoundObjMgr/func_802C0074.s deleted file mode 100644 index 37606e23e73..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/func_802C0074.s +++ /dev/null @@ -1,41 +0,0 @@ -lbl_802C0074: -/* 802C0074 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 802C0078 7C 08 02 A6 */ mflr r0 -/* 802C007C 90 01 00 24 */ stw r0, 0x24(r1) -/* 802C0080 39 61 00 20 */ addi r11, r1, 0x20 -/* 802C0084 48 0A 21 51 */ bl _savegpr_27 -/* 802C0088 7C 7B 1B 78 */ mr r27, r3 -/* 802C008C 7C 9C 23 79 */ or. r28, r4, r4 -/* 802C0090 7C BD 2B 78 */ mr r29, r5 -/* 802C0094 41 82 00 50 */ beq lbl_802C00E4 -/* 802C0098 3B C0 00 00 */ li r30, 0 -/* 802C009C 3C 60 80 3D */ lis r3, mEnemyInfo@ha /* 0x803CAD70@ha */ -/* 802C00A0 3B E3 AD 70 */ addi r31, r3, mEnemyInfo@l /* 0x803CAD70@l */ -/* 802C00A4 48 00 00 34 */ b lbl_802C00D8 -lbl_802C00A8: -/* 802C00A8 7F 83 E3 78 */ mr r3, r28 -/* 802C00AC 57 C0 25 36 */ rlwinm r0, r30, 4, 0x14, 0x1b -/* 802C00B0 7C 9F 02 14 */ add r4, r31, r0 -/* 802C00B4 48 0A 88 E1 */ bl strcmp -/* 802C00B8 2C 03 00 00 */ cmpwi r3, 0 -/* 802C00BC 40 82 00 18 */ bne lbl_802C00D4 -/* 802C00C0 7F 63 DB 78 */ mr r3, r27 -/* 802C00C4 7F A4 EB 78 */ mr r4, r29 -/* 802C00C8 48 01 BE 85 */ bl append__10JSUPtrListFP10JSUPtrLink -/* 802C00CC 7F C3 F3 78 */ mr r3, r30 -/* 802C00D0 48 00 00 18 */ b lbl_802C00E8 -lbl_802C00D4: -/* 802C00D4 3B DE 00 01 */ addi r30, r30, 1 -lbl_802C00D8: -/* 802C00D8 57 C0 06 3E */ clrlwi r0, r30, 0x18 -/* 802C00DC 28 00 00 40 */ cmplwi r0, 0x40 -/* 802C00E0 41 80 FF C8 */ blt lbl_802C00A8 -lbl_802C00E4: -/* 802C00E4 38 60 00 00 */ li r3, 0 -lbl_802C00E8: -/* 802C00E8 39 61 00 20 */ addi r11, r1, 0x20 -/* 802C00EC 48 0A 21 35 */ bl _restgpr_27 -/* 802C00F0 80 01 00 24 */ lwz r0, 0x24(r1) -/* 802C00F4 7C 08 03 A6 */ mtlr r0 -/* 802C00F8 38 21 00 20 */ addi r1, r1, 0x20 -/* 802C00FC 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/func_802C0190.s b/asm/Z2AudioLib/Z2SoundObjMgr/func_802C0190.s deleted file mode 100644 index 217d247d00a..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/func_802C0190.s +++ /dev/null @@ -1,25 +0,0 @@ -lbl_802C0190: -/* 802C0190 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802C0194 7C 08 02 A6 */ mflr r0 -/* 802C0198 90 01 00 14 */ stw r0, 0x14(r1) -/* 802C019C 28 04 00 00 */ cmplwi r4, 0 -/* 802C01A0 40 82 00 0C */ bne lbl_802C01AC -/* 802C01A4 38 60 00 00 */ li r3, 0 -/* 802C01A8 48 00 00 2C */ b lbl_802C01D4 -lbl_802C01AC: -/* 802C01AC 80 A4 00 00 */ lwz r5, 0(r4) -/* 802C01B0 88 05 00 A3 */ lbz r0, 0xa3(r5) -/* 802C01B4 28 00 00 00 */ cmplwi r0, 0 -/* 802C01B8 41 82 00 18 */ beq lbl_802C01D0 -/* 802C01BC 88 A3 00 18 */ lbz r5, 0x18(r3) -/* 802C01C0 28 05 00 00 */ cmplwi r5, 0 -/* 802C01C4 41 82 00 0C */ beq lbl_802C01D0 -/* 802C01C8 38 05 FF FF */ addi r0, r5, -1 -/* 802C01CC 98 03 00 18 */ stb r0, 0x18(r3) -lbl_802C01D0: -/* 802C01D0 48 01 BF 8D */ bl remove__10JSUPtrListFP10JSUPtrLink -lbl_802C01D4: -/* 802C01D4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802C01D8 7C 08 03 A6 */ mtlr r0 -/* 802C01DC 38 21 00 10 */ addi r1, r1, 0x10 -/* 802C01E0 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/isTwilightBattle__13Z2SoundObjMgrFv.s b/asm/Z2AudioLib/Z2SoundObjMgr/isTwilightBattle__13Z2SoundObjMgrFv.s deleted file mode 100644 index 7ed4ba20988..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/isTwilightBattle__13Z2SoundObjMgrFv.s +++ /dev/null @@ -1,3 +0,0 @@ -lbl_802C01E4: -/* 802C01E4 88 63 00 1B */ lbz r3, 0x1b(r3) -/* 802C01E8 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/searchEnemy__13Z2SoundObjMgrFv.s b/asm/Z2AudioLib/Z2SoundObjMgr/searchEnemy__13Z2SoundObjMgrFv.s deleted file mode 100644 index 765d5c18902..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/searchEnemy__13Z2SoundObjMgrFv.s +++ /dev/null @@ -1,446 +0,0 @@ -lbl_802BF994: -/* 802BF994 94 21 FF 70 */ stwu r1, -0x90(r1) -/* 802BF998 7C 08 02 A6 */ mflr r0 -/* 802BF99C 90 01 00 94 */ stw r0, 0x94(r1) -/* 802BF9A0 DB E1 00 80 */ stfd f31, 0x80(r1) -/* 802BF9A4 F3 E1 00 88 */ psq_st f31, 136(r1), 0, 0 /* qr0 */ -/* 802BF9A8 DB C1 00 70 */ stfd f30, 0x70(r1) -/* 802BF9AC F3 C1 00 78 */ psq_st f30, 120(r1), 0, 0 /* qr0 */ -/* 802BF9B0 DB A1 00 60 */ stfd f29, 0x60(r1) -/* 802BF9B4 F3 A1 00 68 */ psq_st f29, 104(r1), 0, 0 /* qr0 */ -/* 802BF9B8 39 61 00 60 */ addi r11, r1, 0x60 -/* 802BF9BC 48 0A 28 09 */ bl _savegpr_23 -/* 802BF9C0 7C 77 1B 78 */ mr r23, r3 -/* 802BF9C4 38 00 00 00 */ li r0, 0 -/* 802BF9C8 98 03 00 1B */ stb r0, 0x1b(r3) -/* 802BF9CC 80 0D 8D E0 */ lwz r0, mLinkPtr__14Z2CreatureLink(r13) -/* 802BF9D0 28 00 00 00 */ cmplwi r0, 0 -/* 802BF9D4 40 82 00 18 */ bne lbl_802BF9EC -/* 802BF9D8 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BF9DC 38 80 00 01 */ li r4, 1 -/* 802BF9E0 38 A0 00 01 */ li r5, 1 -/* 802BF9E4 4B FF 58 21 */ bl stopBattleBgm__8Z2SeqMgrFUcUc -/* 802BF9E8 48 00 05 D4 */ b lbl_802BFFBC -lbl_802BF9EC: -/* 802BF9EC 3B C0 00 00 */ li r30, 0 -/* 802BF9F0 3B A0 00 00 */ li r29, 0 -/* 802BF9F4 3B 80 00 00 */ li r28, 0 -/* 802BF9F8 80 8D 86 04 */ lwz r4, __OSReport_disable-0x14(r13) -/* 802BF9FC 80 64 00 00 */ lwz r3, 0(r4) -/* 802BFA00 28 03 00 00 */ cmplwi r3, 0 -/* 802BFA04 41 82 00 10 */ beq lbl_802BFA14 -/* 802BFA08 80 63 00 18 */ lwz r3, 0x18(r3) -/* 802BFA0C 90 61 00 10 */ stw r3, 0x10(r1) -/* 802BFA10 48 00 00 08 */ b lbl_802BFA18 -lbl_802BFA14: -/* 802BFA14 38 60 FF FF */ li r3, -1 -lbl_802BFA18: -/* 802BFA18 3C 03 FF 00 */ addis r0, r3, 0xff00 -/* 802BFA1C 28 00 00 41 */ cmplwi r0, 0x41 -/* 802BFA20 40 82 00 08 */ bne lbl_802BFA28 -/* 802BFA24 3B 80 00 01 */ li r28, 1 -lbl_802BFA28: -/* 802BFA28 3B 60 00 00 */ li r27, 0 -/* 802BFA2C 80 A4 00 04 */ lwz r5, 4(r4) -/* 802BFA30 28 05 00 00 */ cmplwi r5, 0 -/* 802BFA34 41 82 00 10 */ beq lbl_802BFA44 -/* 802BFA38 80 65 00 18 */ lwz r3, 0x18(r5) -/* 802BFA3C 90 61 00 0C */ stw r3, 0xc(r1) -/* 802BFA40 48 00 00 08 */ b lbl_802BFA48 -lbl_802BFA44: -/* 802BFA44 38 60 FF FF */ li r3, -1 -lbl_802BFA48: -/* 802BFA48 3C 03 FF 00 */ addis r0, r3, 0xff00 -/* 802BFA4C 28 00 00 04 */ cmplwi r0, 4 -/* 802BFA50 40 82 00 0C */ bne lbl_802BFA5C -/* 802BFA54 3B 60 00 01 */ li r27, 1 -/* 802BFA58 48 00 00 30 */ b lbl_802BFA88 -lbl_802BFA5C: -/* 802BFA5C 28 05 00 00 */ cmplwi r5, 0 -/* 802BFA60 41 82 00 14 */ beq lbl_802BFA74 -/* 802BFA64 80 64 00 04 */ lwz r3, 4(r4) -/* 802BFA68 80 63 00 18 */ lwz r3, 0x18(r3) -/* 802BFA6C 90 61 00 08 */ stw r3, 8(r1) -/* 802BFA70 48 00 00 08 */ b lbl_802BFA78 -lbl_802BFA74: -/* 802BFA74 38 60 FF FF */ li r3, -1 -lbl_802BFA78: -/* 802BFA78 3C 03 FF 00 */ addis r0, r3, 0xff00 -/* 802BFA7C 28 00 00 96 */ cmplwi r0, 0x96 -/* 802BFA80 40 82 00 08 */ bne lbl_802BFA88 -/* 802BFA84 3B 60 00 02 */ li r27, 2 -lbl_802BFA88: -/* 802BFA88 38 00 00 00 */ li r0, 0 -/* 802BFA8C 98 17 00 14 */ stb r0, 0x14(r23) -/* 802BFA90 98 17 00 15 */ stb r0, 0x15(r23) -/* 802BFA94 98 17 00 16 */ stb r0, 0x16(r23) -/* 802BFA98 98 17 00 17 */ stb r0, 0x17(r23) -/* 802BFA9C 98 17 00 1A */ stb r0, 0x1a(r23) -/* 802BFAA0 98 17 00 18 */ stb r0, 0x18(r23) -/* 802BFAA4 80 6D 8D E0 */ lwz r3, mLinkPtr__14Z2CreatureLink(r13) -/* 802BFAA8 88 03 00 C8 */ lbz r0, 0xc8(r3) -/* 802BFAAC C8 22 C1 D0 */ lfd f1, lit_3703(r2) -/* 802BFAB0 90 01 00 2C */ stw r0, 0x2c(r1) -/* 802BFAB4 3C 00 43 30 */ lis r0, 0x4330 -/* 802BFAB8 90 01 00 28 */ stw r0, 0x28(r1) -/* 802BFABC C8 01 00 28 */ lfd f0, 0x28(r1) -/* 802BFAC0 EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BFAC4 C0 42 C1 B0 */ lfs f2, lit_3694(r2) -/* 802BFAC8 C0 62 C1 B4 */ lfs f3, lit_3695(r2) -/* 802BFACC C0 82 C1 B8 */ lfs f4, lit_3696(r2) -/* 802BFAD0 C0 A2 C1 BC */ lfs f5, lit_3697(r2) -/* 802BFAD4 C0 C2 C1 C0 */ lfs f6, lit_3698(r2) -/* 802BFAD8 38 60 00 01 */ li r3, 1 -/* 802BFADC 4B FE 9C 19 */ bl getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign -/* 802BFAE0 FF C0 08 90 */ fmr f30, f1 -/* 802BFAE4 83 57 00 00 */ lwz r26, 0(r23) -/* 802BFAE8 C0 02 C1 C4 */ lfs f0, lit_3699(r2) -/* 802BFAEC EF A0 07 B2 */ fmuls f29, f0, f30 -/* 802BFAF0 48 00 03 54 */ b lbl_802BFE44 -lbl_802BFAF4: -/* 802BFAF4 83 FA 00 00 */ lwz r31, 0(r26) -/* 802BFAF8 28 1F 00 00 */ cmplwi r31, 0 -/* 802BFAFC 41 82 03 44 */ beq lbl_802BFE40 -/* 802BFB00 88 1F 00 A1 */ lbz r0, 0xa1(r31) -/* 802BFB04 7C 00 07 74 */ extsb r0, r0 -/* 802BFB08 2C 00 00 01 */ cmpwi r0, 1 -/* 802BFB0C 41 80 03 34 */ blt lbl_802BFE40 -/* 802BFB10 3B 20 00 00 */ li r25, 0 -/* 802BFB14 8B 1F 00 A0 */ lbz r24, 0xa0(r31) -/* 802BFB18 38 18 FF F6 */ addi r0, r24, -10 -/* 802BFB1C 28 00 00 2F */ cmplwi r0, 0x2f -/* 802BFB20 41 81 00 7C */ bgt lbl_802BFB9C -/* 802BFB24 3C 60 80 3D */ lis r3, lit_3704@ha /* 0x803CB170@ha */ -/* 802BFB28 38 63 B1 70 */ addi r3, r3, lit_3704@l /* 0x803CB170@l */ -/* 802BFB2C 54 00 10 3A */ slwi r0, r0, 2 -/* 802BFB30 7C 03 00 2E */ lwzx r0, r3, r0 -/* 802BFB34 7C 09 03 A6 */ mtctr r0 -/* 802BFB38 4E 80 04 20 */ bctr -/* 802BFB3C 80 6D 86 00 */ lwz r3, __OSReport_disable-0x18(r13) -/* 802BFB40 80 03 00 04 */ lwz r0, 4(r3) -/* 802BFB44 2C 00 00 1C */ cmpwi r0, 0x1c -/* 802BFB48 41 82 02 F8 */ beq lbl_802BFE40 -/* 802BFB4C 48 00 00 50 */ b lbl_802BFB9C -/* 802BFB50 80 6D 86 00 */ lwz r3, __OSReport_disable-0x18(r13) -/* 802BFB54 80 03 00 04 */ lwz r0, 4(r3) -/* 802BFB58 2C 00 00 1E */ cmpwi r0, 0x1e -/* 802BFB5C 41 82 02 E4 */ beq lbl_802BFE40 -/* 802BFB60 48 00 00 3C */ b lbl_802BFB9C -/* 802BFB64 3B 20 00 01 */ li r25, 1 -/* 802BFB68 48 00 00 34 */ b lbl_802BFB9C -/* 802BFB6C 57 60 06 3F */ clrlwi. r0, r27, 0x18 -/* 802BFB70 41 82 02 D0 */ beq lbl_802BFE40 -/* 802BFB74 48 00 00 28 */ b lbl_802BFB9C -/* 802BFB78 57 60 06 3F */ clrlwi. r0, r27, 0x18 -/* 802BFB7C 40 82 02 C4 */ bne lbl_802BFE40 -/* 802BFB80 80 6D 8D E0 */ lwz r3, mLinkPtr__14Z2CreatureLink(r13) -/* 802BFB84 88 03 00 CB */ lbz r0, 0xcb(r3) -/* 802BFB88 54 00 FF FF */ rlwinm. r0, r0, 0x1f, 0x1f, 0x1f -/* 802BFB8C 41 82 00 10 */ beq lbl_802BFB9C -/* 802BFB90 88 03 00 C8 */ lbz r0, 0xc8(r3) -/* 802BFB94 28 00 00 26 */ cmplwi r0, 0x26 -/* 802BFB98 41 81 02 A8 */ bgt lbl_802BFE40 -lbl_802BFB9C: -/* 802BFB9C 80 7F 00 04 */ lwz r3, 4(r31) -/* 802BFBA0 28 03 00 00 */ cmplwi r3, 0 -/* 802BFBA4 41 82 02 9C */ beq lbl_802BFE40 -/* 802BFBA8 80 8D 8D E0 */ lwz r4, mLinkPtr__14Z2CreatureLink(r13) -/* 802BFBAC 80 84 00 04 */ lwz r4, 4(r4) -/* 802BFBB0 28 04 00 00 */ cmplwi r4, 0 -/* 802BFBB4 41 82 02 8C */ beq lbl_802BFE40 -/* 802BFBB8 57 06 25 36 */ rlwinm r6, r24, 4, 0x14, 0x1b -/* 802BFBBC 3C A0 80 3D */ lis r5, mEnemyInfo@ha /* 0x803CAD70@ha */ -/* 802BFBC0 38 05 AD 70 */ addi r0, r5, mEnemyInfo@l /* 0x803CAD70@l */ -/* 802BFBC4 7C C0 32 14 */ add r6, r0, r6 -/* 802BFBC8 80 A6 00 08 */ lwz r5, 8(r6) -/* 802BFBCC 80 06 00 0C */ lwz r0, 0xc(r6) -/* 802BFBD0 90 A1 00 14 */ stw r5, 0x14(r1) -/* 802BFBD4 90 01 00 18 */ stw r0, 0x18(r1) -/* 802BFBD8 88 17 00 1C */ lbz r0, 0x1c(r23) -/* 802BFBDC 28 00 00 00 */ cmplwi r0, 0 -/* 802BFBE0 41 82 00 24 */ beq lbl_802BFC04 -/* 802BFBE4 88 17 00 0C */ lbz r0, 0xc(r23) -/* 802BFBE8 98 01 00 14 */ stb r0, 0x14(r1) -/* 802BFBEC A0 17 00 0E */ lhz r0, 0xe(r23) -/* 802BFBF0 B0 01 00 16 */ sth r0, 0x16(r1) -/* 802BFBF4 A0 17 00 10 */ lhz r0, 0x10(r23) -/* 802BFBF8 B0 01 00 18 */ sth r0, 0x18(r1) -/* 802BFBFC A0 17 00 12 */ lhz r0, 0x12(r23) -/* 802BFC00 B0 01 00 1A */ sth r0, 0x1a(r1) -lbl_802BFC04: -/* 802BFC04 C3 E2 C1 C8 */ lfs f31, lit_3700(r2) -/* 802BFC08 88 01 00 14 */ lbz r0, 0x14(r1) -/* 802BFC0C 28 00 00 01 */ cmplwi r0, 1 -/* 802BFC10 40 82 00 08 */ bne lbl_802BFC18 -/* 802BFC14 C3 E2 C1 CC */ lfs f31, lit_3701(r2) -lbl_802BFC18: -/* 802BFC18 3C A0 80 3A */ lis r5, lit_3380@ha /* 0x8039C240@ha */ -/* 802BFC1C 38 C5 C2 40 */ addi r6, r5, lit_3380@l /* 0x8039C240@l */ -/* 802BFC20 80 A6 00 00 */ lwz r5, 0(r6) -/* 802BFC24 80 06 00 04 */ lwz r0, 4(r6) -/* 802BFC28 90 A1 00 1C */ stw r5, 0x1c(r1) -/* 802BFC2C 90 01 00 20 */ stw r0, 0x20(r1) -/* 802BFC30 80 06 00 08 */ lwz r0, 8(r6) -/* 802BFC34 90 01 00 24 */ stw r0, 0x24(r1) -/* 802BFC38 38 A1 00 1C */ addi r5, r1, 0x1c -/* 802BFC3C 48 08 74 79 */ bl PSVECSubtract -/* 802BFC40 C0 01 00 20 */ lfs f0, 0x20(r1) -/* 802BFC44 EC 00 07 F2 */ fmuls f0, f0, f31 -/* 802BFC48 D0 01 00 20 */ stfs f0, 0x20(r1) -/* 802BFC4C 38 61 00 1C */ addi r3, r1, 0x1c -/* 802BFC50 48 08 75 01 */ bl PSVECMag -/* 802BFC54 FF E0 08 90 */ fmr f31, f1 -/* 802BFC58 A0 01 00 1A */ lhz r0, 0x1a(r1) -/* 802BFC5C C8 22 C1 D0 */ lfd f1, lit_3703(r2) -/* 802BFC60 90 01 00 2C */ stw r0, 0x2c(r1) -/* 802BFC64 3C 80 43 30 */ lis r4, 0x4330 -/* 802BFC68 90 81 00 28 */ stw r4, 0x28(r1) -/* 802BFC6C C8 01 00 28 */ lfd f0, 0x28(r1) -/* 802BFC70 EC 00 08 28 */ fsubs f0, f0, f1 -/* 802BFC74 EC 00 07 B2 */ fmuls f0, f0, f30 -/* 802BFC78 FC 1F 00 40 */ fcmpo cr0, f31, f0 -/* 802BFC7C 40 80 01 94 */ bge lbl_802BFE10 -/* 802BFC80 57 20 06 3F */ clrlwi. r0, r25, 0x18 -/* 802BFC84 41 82 00 AC */ beq lbl_802BFD30 -/* 802BFC88 88 77 00 1A */ lbz r3, 0x1a(r23) -/* 802BFC8C 38 03 00 01 */ addi r0, r3, 1 -/* 802BFC90 98 17 00 1A */ stb r0, 0x1a(r23) -/* 802BFC94 A0 01 00 18 */ lhz r0, 0x18(r1) -/* 802BFC98 90 01 00 2C */ stw r0, 0x2c(r1) -/* 802BFC9C 90 81 00 28 */ stw r4, 0x28(r1) -/* 802BFCA0 C8 01 00 28 */ lfd f0, 0x28(r1) -/* 802BFCA4 EC 00 08 28 */ fsubs f0, f0, f1 -/* 802BFCA8 EC 00 07 B2 */ fmuls f0, f0, f30 -/* 802BFCAC FC 1F 00 40 */ fcmpo cr0, f31, f0 -/* 802BFCB0 40 80 00 54 */ bge lbl_802BFD04 -/* 802BFCB4 88 17 00 19 */ lbz r0, 0x19(r23) -/* 802BFCB8 60 00 00 01 */ ori r0, r0, 1 -/* 802BFCBC 98 17 00 19 */ stb r0, 0x19(r23) -/* 802BFCC0 88 17 00 19 */ lbz r0, 0x19(r23) -/* 802BFCC4 28 00 00 10 */ cmplwi r0, 0x10 -/* 802BFCC8 41 80 00 3C */ blt lbl_802BFD04 -/* 802BFCCC 88 77 00 15 */ lbz r3, 0x15(r23) -/* 802BFCD0 38 03 00 01 */ addi r0, r3, 1 -/* 802BFCD4 98 17 00 15 */ stb r0, 0x15(r23) -/* 802BFCD8 A0 01 00 16 */ lhz r0, 0x16(r1) -/* 802BFCDC 90 01 00 2C */ stw r0, 0x2c(r1) -/* 802BFCE0 90 81 00 28 */ stw r4, 0x28(r1) -/* 802BFCE4 C8 01 00 28 */ lfd f0, 0x28(r1) -/* 802BFCE8 EC 00 08 28 */ fsubs f0, f0, f1 -/* 802BFCEC EC 00 07 B2 */ fmuls f0, f0, f30 -/* 802BFCF0 FC 1F 00 40 */ fcmpo cr0, f31, f0 -/* 802BFCF4 40 80 00 10 */ bge lbl_802BFD04 -/* 802BFCF8 88 77 00 14 */ lbz r3, 0x14(r23) -/* 802BFCFC 38 03 00 01 */ addi r0, r3, 1 -/* 802BFD00 98 17 00 14 */ stb r0, 0x14(r23) -lbl_802BFD04: -/* 802BFD04 88 17 00 19 */ lbz r0, 0x19(r23) -/* 802BFD08 28 00 00 11 */ cmplwi r0, 0x11 -/* 802BFD0C 41 80 01 04 */ blt lbl_802BFE10 -/* 802BFD10 88 77 00 16 */ lbz r3, 0x16(r23) -/* 802BFD14 38 03 00 01 */ addi r0, r3, 1 -/* 802BFD18 98 17 00 16 */ stb r0, 0x16(r23) -/* 802BFD1C 88 1F 00 A2 */ lbz r0, 0xa2(r31) -/* 802BFD20 28 00 00 00 */ cmplwi r0, 0 -/* 802BFD24 41 82 00 EC */ beq lbl_802BFE10 -/* 802BFD28 3B A0 00 01 */ li r29, 1 -/* 802BFD2C 48 00 00 E4 */ b lbl_802BFE10 -lbl_802BFD30: -/* 802BFD30 88 77 00 16 */ lbz r3, 0x16(r23) -/* 802BFD34 38 03 00 01 */ addi r0, r3, 1 -/* 802BFD38 98 17 00 16 */ stb r0, 0x16(r23) -/* 802BFD3C 28 18 00 00 */ cmplwi r24, 0 -/* 802BFD40 41 82 00 58 */ beq lbl_802BFD98 -/* 802BFD44 28 18 00 09 */ cmplwi r24, 9 -/* 802BFD48 40 80 00 50 */ bge lbl_802BFD98 -/* 802BFD4C 88 17 00 1B */ lbz r0, 0x1b(r23) -/* 802BFD50 28 00 00 00 */ cmplwi r0, 0 -/* 802BFD54 40 82 00 0C */ bne lbl_802BFD60 -/* 802BFD58 38 00 00 01 */ li r0, 1 -/* 802BFD5C 98 17 00 1B */ stb r0, 0x1b(r23) -lbl_802BFD60: -/* 802BFD60 28 18 00 01 */ cmplwi r24, 1 -/* 802BFD64 41 82 00 0C */ beq lbl_802BFD70 -/* 802BFD68 28 18 00 05 */ cmplwi r24, 5 -/* 802BFD6C 40 82 00 0C */ bne lbl_802BFD78 -lbl_802BFD70: -/* 802BFD70 38 00 00 02 */ li r0, 2 -/* 802BFD74 98 17 00 1B */ stb r0, 0x1b(r23) -lbl_802BFD78: -/* 802BFD78 28 18 00 08 */ cmplwi r24, 8 -/* 802BFD7C 40 82 00 10 */ bne lbl_802BFD8C -/* 802BFD80 38 00 00 02 */ li r0, 2 -/* 802BFD84 98 17 00 1B */ stb r0, 0x1b(r23) -/* 802BFD88 48 00 00 10 */ b lbl_802BFD98 -lbl_802BFD8C: -/* 802BFD8C 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFD90 88 97 00 1B */ lbz r4, 0x1b(r23) -/* 802BFD94 4B FF 20 61 */ bl changeSubBgmStatus__8Z2SeqMgrFl -lbl_802BFD98: -/* 802BFD98 28 18 00 2C */ cmplwi r24, 0x2c -/* 802BFD9C 41 82 00 14 */ beq lbl_802BFDB0 -/* 802BFDA0 88 1F 00 A2 */ lbz r0, 0xa2(r31) -/* 802BFDA4 28 00 00 00 */ cmplwi r0, 0 -/* 802BFDA8 41 82 00 08 */ beq lbl_802BFDB0 -/* 802BFDAC 3B A0 00 01 */ li r29, 1 -lbl_802BFDB0: -/* 802BFDB0 A0 01 00 18 */ lhz r0, 0x18(r1) -/* 802BFDB4 C8 22 C1 D0 */ lfd f1, lit_3703(r2) -/* 802BFDB8 90 01 00 2C */ stw r0, 0x2c(r1) -/* 802BFDBC 3C 80 43 30 */ lis r4, 0x4330 -/* 802BFDC0 90 81 00 28 */ stw r4, 0x28(r1) -/* 802BFDC4 C8 01 00 28 */ lfd f0, 0x28(r1) -/* 802BFDC8 EC 00 08 28 */ fsubs f0, f0, f1 -/* 802BFDCC EC 00 07 B2 */ fmuls f0, f0, f30 -/* 802BFDD0 FC 1F 00 40 */ fcmpo cr0, f31, f0 -/* 802BFDD4 40 80 00 3C */ bge lbl_802BFE10 -/* 802BFDD8 88 77 00 15 */ lbz r3, 0x15(r23) -/* 802BFDDC 38 03 00 01 */ addi r0, r3, 1 -/* 802BFDE0 98 17 00 15 */ stb r0, 0x15(r23) -/* 802BFDE4 A0 01 00 16 */ lhz r0, 0x16(r1) -/* 802BFDE8 90 01 00 2C */ stw r0, 0x2c(r1) -/* 802BFDEC 90 81 00 28 */ stw r4, 0x28(r1) -/* 802BFDF0 C8 01 00 28 */ lfd f0, 0x28(r1) -/* 802BFDF4 EC 00 08 28 */ fsubs f0, f0, f1 -/* 802BFDF8 EC 00 07 B2 */ fmuls f0, f0, f30 -/* 802BFDFC FC 1F 00 40 */ fcmpo cr0, f31, f0 -/* 802BFE00 40 80 00 10 */ bge lbl_802BFE10 -/* 802BFE04 88 77 00 14 */ lbz r3, 0x14(r23) -/* 802BFE08 38 03 00 01 */ addi r0, r3, 1 -/* 802BFE0C 98 17 00 14 */ stb r0, 0x14(r23) -lbl_802BFE10: -/* 802BFE10 FC 1F E8 40 */ fcmpo cr0, f31, f29 -/* 802BFE14 40 80 00 10 */ bge lbl_802BFE24 -/* 802BFE18 88 77 00 17 */ lbz r3, 0x17(r23) -/* 802BFE1C 38 03 00 01 */ addi r0, r3, 1 -/* 802BFE20 98 17 00 17 */ stb r0, 0x17(r23) -lbl_802BFE24: -/* 802BFE24 88 1F 00 A3 */ lbz r0, 0xa3(r31) -/* 802BFE28 28 00 00 00 */ cmplwi r0, 0 -/* 802BFE2C 41 82 00 14 */ beq lbl_802BFE40 -/* 802BFE30 3B C0 00 01 */ li r30, 1 -/* 802BFE34 88 77 00 18 */ lbz r3, 0x18(r23) -/* 802BFE38 38 03 00 01 */ addi r0, r3, 1 -/* 802BFE3C 98 17 00 18 */ stb r0, 0x18(r23) -lbl_802BFE40: -/* 802BFE40 83 5A 00 0C */ lwz r26, 0xc(r26) -lbl_802BFE44: -/* 802BFE44 28 1A 00 00 */ cmplwi r26, 0 -/* 802BFE48 40 82 FC AC */ bne lbl_802BFAF4 -/* 802BFE4C 88 17 00 19 */ lbz r0, 0x19(r23) -/* 802BFE50 28 00 00 11 */ cmplwi r0, 0x11 -/* 802BFE54 40 82 00 34 */ bne lbl_802BFE88 -/* 802BFE58 88 77 00 1A */ lbz r3, 0x1a(r23) -/* 802BFE5C 88 17 00 16 */ lbz r0, 0x16(r23) -/* 802BFE60 7C 03 00 40 */ cmplw r3, r0 -/* 802BFE64 41 80 00 14 */ blt lbl_802BFE78 -/* 802BFE68 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFE6C 38 80 00 00 */ li r4, 0 -/* 802BFE70 4B FF 45 71 */ bl setBattleGhostMute__8Z2SeqMgrFb -/* 802BFE74 48 00 00 34 */ b lbl_802BFEA8 -lbl_802BFE78: -/* 802BFE78 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFE7C 38 80 00 01 */ li r4, 1 -/* 802BFE80 4B FF 45 61 */ bl setBattleGhostMute__8Z2SeqMgrFb -/* 802BFE84 48 00 00 24 */ b lbl_802BFEA8 -lbl_802BFE88: -/* 802BFE88 28 00 00 20 */ cmplwi r0, 0x20 -/* 802BFE8C 40 80 00 1C */ bge lbl_802BFEA8 -/* 802BFE90 88 17 00 1A */ lbz r0, 0x1a(r23) -/* 802BFE94 28 00 00 00 */ cmplwi r0, 0 -/* 802BFE98 40 82 00 10 */ bne lbl_802BFEA8 -/* 802BFE9C 7E E3 BB 78 */ mr r3, r23 -/* 802BFEA0 38 80 00 00 */ li r4, 0 -/* 802BFEA4 48 00 01 49 */ bl setGhostEnemyState__13Z2SoundObjMgrFUc -lbl_802BFEA8: -/* 802BFEA8 57 60 06 3E */ clrlwi r0, r27, 0x18 -/* 802BFEAC 28 00 00 01 */ cmplwi r0, 1 -/* 802BFEB0 40 82 00 30 */ bne lbl_802BFEE0 -/* 802BFEB4 88 17 00 14 */ lbz r0, 0x14(r23) -/* 802BFEB8 28 00 00 00 */ cmplwi r0, 0 -/* 802BFEBC 41 82 00 14 */ beq lbl_802BFED0 -/* 802BFEC0 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFEC4 38 80 00 01 */ li r4, 1 -/* 802BFEC8 4B FF 1F 2D */ bl changeSubBgmStatus__8Z2SeqMgrFl -/* 802BFECC 48 00 00 F0 */ b lbl_802BFFBC -lbl_802BFED0: -/* 802BFED0 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFED4 38 80 00 00 */ li r4, 0 -/* 802BFED8 4B FF 1F 1D */ bl changeSubBgmStatus__8Z2SeqMgrFl -/* 802BFEDC 48 00 00 E0 */ b lbl_802BFFBC -lbl_802BFEE0: -/* 802BFEE0 28 00 00 02 */ cmplwi r0, 2 -/* 802BFEE4 40 82 00 30 */ bne lbl_802BFF14 -/* 802BFEE8 88 17 00 15 */ lbz r0, 0x15(r23) -/* 802BFEEC 28 00 00 00 */ cmplwi r0, 0 -/* 802BFEF0 41 82 00 14 */ beq lbl_802BFF04 -/* 802BFEF4 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFEF8 38 80 00 01 */ li r4, 1 -/* 802BFEFC 4B FF 1E F9 */ bl changeSubBgmStatus__8Z2SeqMgrFl -/* 802BFF00 48 00 00 BC */ b lbl_802BFFBC -lbl_802BFF04: -/* 802BFF04 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFF08 38 80 00 00 */ li r4, 0 -/* 802BFF0C 4B FF 1E E9 */ bl changeSubBgmStatus__8Z2SeqMgrFl -/* 802BFF10 48 00 00 AC */ b lbl_802BFFBC -lbl_802BFF14: -/* 802BFF14 57 80 06 3F */ clrlwi. r0, r28, 0x18 -/* 802BFF18 41 82 00 30 */ beq lbl_802BFF48 -/* 802BFF1C 88 17 00 16 */ lbz r0, 0x16(r23) -/* 802BFF20 28 00 00 00 */ cmplwi r0, 0 -/* 802BFF24 41 82 00 14 */ beq lbl_802BFF38 -/* 802BFF28 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFF2C 38 80 00 01 */ li r4, 1 -/* 802BFF30 4B FF 00 5D */ bl changeBgmStatus__8Z2SeqMgrFl -/* 802BFF34 48 00 00 88 */ b lbl_802BFFBC -lbl_802BFF38: -/* 802BFF38 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFF3C 38 80 00 00 */ li r4, 0 -/* 802BFF40 4B FF 00 4D */ bl changeBgmStatus__8Z2SeqMgrFl -/* 802BFF44 48 00 00 78 */ b lbl_802BFFBC -lbl_802BFF48: -/* 802BFF48 57 C0 06 3F */ clrlwi. r0, r30, 0x18 -/* 802BFF4C 40 82 00 70 */ bne lbl_802BFFBC -/* 802BFF50 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFF54 7F A4 EB 78 */ mr r4, r29 -/* 802BFF58 4B FF 42 C5 */ bl setBattleSearched__8Z2SeqMgrFb -/* 802BFF5C 88 17 00 14 */ lbz r0, 0x14(r23) -/* 802BFF60 28 00 00 00 */ cmplwi r0, 0 -/* 802BFF64 41 82 00 14 */ beq lbl_802BFF78 -/* 802BFF68 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFF6C 38 80 00 00 */ li r4, 0 -/* 802BFF70 4B FF 45 29 */ bl setBattleDistState__8Z2SeqMgrFUc -/* 802BFF74 48 00 00 48 */ b lbl_802BFFBC -lbl_802BFF78: -/* 802BFF78 88 17 00 15 */ lbz r0, 0x15(r23) -/* 802BFF7C 28 00 00 00 */ cmplwi r0, 0 -/* 802BFF80 41 82 00 14 */ beq lbl_802BFF94 -/* 802BFF84 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFF88 38 80 00 01 */ li r4, 1 -/* 802BFF8C 4B FF 45 0D */ bl setBattleDistState__8Z2SeqMgrFUc -/* 802BFF90 48 00 00 2C */ b lbl_802BFFBC -lbl_802BFF94: -/* 802BFF94 88 17 00 16 */ lbz r0, 0x16(r23) -/* 802BFF98 28 00 00 00 */ cmplwi r0, 0 -/* 802BFF9C 41 82 00 14 */ beq lbl_802BFFB0 -/* 802BFFA0 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFFA4 38 80 00 02 */ li r4, 2 -/* 802BFFA8 4B FF 44 F1 */ bl setBattleDistState__8Z2SeqMgrFUc -/* 802BFFAC 48 00 00 10 */ b lbl_802BFFBC -lbl_802BFFB0: -/* 802BFFB0 80 6D 86 04 */ lwz r3, __OSReport_disable-0x14(r13) -/* 802BFFB4 38 80 00 03 */ li r4, 3 -/* 802BFFB8 4B FF 44 E1 */ bl setBattleDistState__8Z2SeqMgrFUc -lbl_802BFFBC: -/* 802BFFBC E3 E1 00 88 */ psq_l f31, 136(r1), 0, 0 /* qr0 */ -/* 802BFFC0 CB E1 00 80 */ lfd f31, 0x80(r1) -/* 802BFFC4 E3 C1 00 78 */ psq_l f30, 120(r1), 0, 0 /* qr0 */ -/* 802BFFC8 CB C1 00 70 */ lfd f30, 0x70(r1) -/* 802BFFCC E3 A1 00 68 */ psq_l f29, 104(r1), 0, 0 /* qr0 */ -/* 802BFFD0 CB A1 00 60 */ lfd f29, 0x60(r1) -/* 802BFFD4 39 61 00 60 */ addi r11, r1, 0x60 -/* 802BFFD8 48 0A 22 39 */ bl _restgpr_23 -/* 802BFFDC 80 01 00 94 */ lwz r0, 0x94(r1) -/* 802BFFE0 7C 08 03 A6 */ mtlr r0 -/* 802BFFE4 38 21 00 90 */ addi r1, r1, 0x90 -/* 802BFFE8 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/setBattleInit__13Z2SoundObjMgrFv.s b/asm/Z2AudioLib/Z2SoundObjMgr/setBattleInit__13Z2SoundObjMgrFv.s deleted file mode 100644 index 5c32fa8a5e2..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/setBattleInit__13Z2SoundObjMgrFv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_802C0100: -/* 802C0100 38 00 00 00 */ li r0, 0 -/* 802C0104 98 03 00 14 */ stb r0, 0x14(r3) -/* 802C0108 98 03 00 15 */ stb r0, 0x15(r3) -/* 802C010C 98 03 00 16 */ stb r0, 0x16(r3) -/* 802C0110 98 03 00 17 */ stb r0, 0x17(r3) -/* 802C0114 98 03 00 18 */ stb r0, 0x18(r3) -/* 802C0118 98 03 00 1A */ stb r0, 0x1a(r3) -/* 802C011C 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObjMgr/setForceBattleArea__13Z2SoundObjMgrFbUsUsUs.s b/asm/Z2AudioLib/Z2SoundObjMgr/setForceBattleArea__13Z2SoundObjMgrFbUsUsUs.s deleted file mode 100644 index 34d26e735ad..00000000000 --- a/asm/Z2AudioLib/Z2SoundObjMgr/setForceBattleArea__13Z2SoundObjMgrFbUsUsUs.s +++ /dev/null @@ -1,6 +0,0 @@ -lbl_802BF980: -/* 802BF980 98 83 00 1C */ stb r4, 0x1c(r3) -/* 802BF984 B0 A3 00 0E */ sth r5, 0xe(r3) -/* 802BF988 B0 C3 00 10 */ sth r6, 0x10(r3) -/* 802BF98C B0 E3 00 12 */ sth r7, 0x12(r3) -/* 802BF990 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball/actionEnd__15daObjVolcBall_cFv.s b/asm/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball/actionEnd__15daObjVolcBall_cFv.s deleted file mode 100644 index f65bdc0daec..00000000000 --- a/asm/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball/actionEnd__15daObjVolcBall_cFv.s +++ /dev/null @@ -1,75 +0,0 @@ -lbl_80D22CD4: -/* 80D22CD4 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80D22CD8 7C 08 02 A6 */ mflr r0 -/* 80D22CDC 90 01 00 24 */ stw r0, 0x24(r1) -/* 80D22CE0 93 E1 00 1C */ stw r31, 0x1c(r1) -/* 80D22CE4 7C 7F 1B 78 */ mr r31, r3 -/* 80D22CE8 88 03 06 00 */ lbz r0, 0x600(r3) -/* 80D22CEC 28 00 00 01 */ cmplwi r0, 1 -/* 80D22CF0 40 82 00 D8 */ bne lbl_80D22DC8 -/* 80D22CF4 40 82 00 2C */ bne lbl_80D22D20 -/* 80D22CF8 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D22CFC 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D22D00 80 1F 00 B0 */ lwz r0, 0xb0(r31) -/* 80D22D04 54 04 06 3E */ clrlwi r4, r0, 0x18 -/* 80D22D08 88 1F 04 BA */ lbz r0, 0x4ba(r31) -/* 80D22D0C 7C 05 07 74 */ extsb r5, r0 -/* 80D22D10 4B 31 26 51 */ bl isSwitch__10dSv_info_cCFii -/* 80D22D14 2C 03 00 00 */ cmpwi r3, 0 -/* 80D22D18 41 82 00 08 */ beq lbl_80D22D20 -/* 80D22D1C 48 00 00 AC */ b lbl_80D22DC8 -lbl_80D22D20: -/* 80D22D20 80 1F 29 20 */ lwz r0, 0x2920(r31) -/* 80D22D24 90 01 00 08 */ stw r0, 8(r1) -/* 80D22D28 3C 60 80 02 */ lis r3, fpcSch_JudgeByID__FPvPv@ha /* 0x80023590@ha */ -/* 80D22D2C 38 63 35 90 */ addi r3, r3, fpcSch_JudgeByID__FPvPv@l /* 0x80023590@l */ -/* 80D22D30 38 81 00 08 */ addi r4, r1, 8 -/* 80D22D34 4B 2F 6A C5 */ bl fopAcIt_Judge__FPFPvPv_PvPv -/* 80D22D38 28 03 00 00 */ cmplwi r3, 0 -/* 80D22D3C 41 82 00 8C */ beq lbl_80D22DC8 -/* 80D22D40 88 1F 29 24 */ lbz r0, 0x2924(r31) -/* 80D22D44 2C 00 00 02 */ cmpwi r0, 2 -/* 80D22D48 41 82 00 54 */ beq lbl_80D22D9C -/* 80D22D4C 40 80 00 14 */ bge lbl_80D22D60 -/* 80D22D50 2C 00 00 00 */ cmpwi r0, 0 -/* 80D22D54 41 82 00 18 */ beq lbl_80D22D6C -/* 80D22D58 40 80 00 20 */ bge lbl_80D22D78 -/* 80D22D5C 48 00 00 6C */ b lbl_80D22DC8 -lbl_80D22D60: -/* 80D22D60 2C 00 00 04 */ cmpwi r0, 4 -/* 80D22D64 40 80 00 64 */ bge lbl_80D22DC8 -/* 80D22D68 48 00 00 58 */ b lbl_80D22DC0 -lbl_80D22D6C: -/* 80D22D6C 38 00 00 01 */ li r0, 1 -/* 80D22D70 98 03 09 60 */ stb r0, 0x960(r3) -/* 80D22D74 98 1F 29 24 */ stb r0, 0x2924(r31) -lbl_80D22D78: -/* 80D22D78 88 1F 29 25 */ lbz r0, 0x2925(r31) -/* 80D22D7C 28 00 00 3C */ cmplwi r0, 0x3c -/* 80D22D80 40 82 00 0C */ bne lbl_80D22D8C -/* 80D22D84 38 00 00 02 */ li r0, 2 -/* 80D22D88 98 1F 29 24 */ stb r0, 0x2924(r31) -lbl_80D22D8C: -/* 80D22D8C 88 7F 29 25 */ lbz r3, 0x2925(r31) -/* 80D22D90 38 03 00 01 */ addi r0, r3, 1 -/* 80D22D94 98 1F 29 25 */ stb r0, 0x2925(r31) -/* 80D22D98 48 00 00 30 */ b lbl_80D22DC8 -lbl_80D22D9C: -/* 80D22D9C 38 7F 05 68 */ addi r3, r31, 0x568 -/* 80D22DA0 80 1F 00 B0 */ lwz r0, 0xb0(r31) -/* 80D22DA4 54 04 86 3E */ rlwinm r4, r0, 0x10, 0x18, 0x1f -/* 80D22DA8 38 A0 00 FF */ li r5, 0xff -/* 80D22DAC 38 C0 00 01 */ li r6, 1 -/* 80D22DB0 4B 32 5B 91 */ bl orderEvent__17dEvLib_callback_cFiii -/* 80D22DB4 38 00 00 03 */ li r0, 3 -/* 80D22DB8 98 1F 29 24 */ stb r0, 0x2924(r31) -/* 80D22DBC 48 00 00 0C */ b lbl_80D22DC8 -lbl_80D22DC0: -/* 80D22DC0 38 7F 05 68 */ addi r3, r31, 0x568 -/* 80D22DC4 4B 32 5A A9 */ bl eventUpdate__17dEvLib_callback_cFv -lbl_80D22DC8: -/* 80D22DC8 83 E1 00 1C */ lwz r31, 0x1c(r1) -/* 80D22DCC 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80D22DD0 7C 08 03 A6 */ mtlr r0 -/* 80D22DD4 38 21 00 20 */ addi r1, r1, 0x20 -/* 80D22DD8 4E 80 00 20 */ blr diff --git a/include/JSystem/JAudio2/JASCalc.h b/include/JSystem/JAudio2/JASCalc.h index 0693b355275..1a63d505b61 100644 --- a/include/JSystem/JAudio2/JASCalc.h +++ b/include/JSystem/JAudio2/JASCalc.h @@ -10,6 +10,8 @@ struct JASCalc { /* 8028F454 */ static void bzerofast(void*, u32); /* 8028F480 */ static void bzero(void*, u32); /* 8028F578 */ static f32 pow2(f32); + + // Could not make it work as inline - specialization is in JASCalc.cpp template static A clamp(B x); /* { if (std::numeric_limits::min() >= x) diff --git a/include/Z2AudioLib/Z2Creature.h b/include/Z2AudioLib/Z2Creature.h index 11920298540..50a4823965b 100644 --- a/include/Z2AudioLib/Z2Creature.h +++ b/include/Z2AudioLib/Z2Creature.h @@ -76,6 +76,8 @@ public: void setInWater(bool status) { mInWater = status; } bool isInWater() { return mInWater; } u8 getLinkState() const { return mLinkState; } + u8 getMoveSpeed() const { return mMoveSpeed; } + bool isRiding() const { return mRiding; } static Z2CreatureLink* mLinkPtr; @@ -159,7 +161,6 @@ public: /* 802C1B7C */ void setLinkSearch(bool); /* 802C1B90 */ void setEnemyName(char const*); -private: /* 0x90 */ JSULink mLink; /* 0xA0 */ u8 mEnemyID; /* 0xA1 */ s8 field_0xa1; diff --git a/include/Z2AudioLib/Z2SeqMgr.h b/include/Z2AudioLib/Z2SeqMgr.h index 8d9f2dfb363..3d44016e1f4 100644 --- a/include/Z2AudioLib/Z2SeqMgr.h +++ b/include/Z2AudioLib/Z2SeqMgr.h @@ -98,6 +98,22 @@ public: return field_0x08.isSoundAttached() || field_0xba != 0; } + u32 getMainBgmID() { + if (mMainBgmHandle) { + return mMainBgmHandle->getID(); + } + + return -1; + } + + u32 getSubBgmID() { + if (mSubBgmHandle) { + return mSubBgmHandle->getID(); + } + + return -1; + } + private: /* 0x00 */ JAISoundHandle mMainBgmHandle; /* 0x04 */ JAISoundHandle mSubBgmHandle; diff --git a/include/Z2AudioLib/Z2SoundObjMgr.h b/include/Z2AudioLib/Z2SoundObjMgr.h index 048fbd46d38..e002b324897 100644 --- a/include/Z2AudioLib/Z2SoundObjMgr.h +++ b/include/Z2AudioLib/Z2SoundObjMgr.h @@ -6,34 +6,42 @@ class Z2CreatureEnemy; -class Z2SoundObjMgr : protected JSUList, public JASGlobalInstance { +struct Z2EnemyArea { + /* 0x00 */ u8 field_0x0; + /* 0x02 */ u16 field_0x2; + /* 0x04 */ u16 field_0x4; + /* 0x06 */ u16 field_0x6; +}; + +enum Z2EnemyID { + Z2_ENEMY_ID_0, +}; + +class Z2SoundObjMgr : public JASGlobalInstance, protected JSUList { public: Z2SoundObjMgr(); void setForceBattleArea(bool, u16, u16, u16); void searchEnemy(); void setGhostEnemyState(u8); - void getEnemyID(char const*, JSULink*); + u8 getEnemyID(char const*, JSULink*); void setBattleInit(); - void checkBattleFinish(); + bool checkBattleFinish(); void deleteEnemyAll(); - void removeEnemy(JSULink*); - bool isTwilightBattle(); + bool removeEnemy(JSULink*); + u8 isTwilightBattle(); bool isForceBattle() { return mForceBattle; } private: - /* 0x0C */ u8 field_0xc[2]; - /* 0x0E */ u16 field_0xe; - /* 0x10 */ u16 field_0x10; - /* 0x12 */ u16 field_0x12; + /* 0x0C */ Z2EnemyArea mEnemyArea; /* 0x14 */ u8 field_0x14; /* 0x15 */ u8 mEnemyNumNear; /* 0x16 */ u8 field_0x16; /* 0x17 */ u8 mEnemyNumVeryFar; /* 0x18 */ u8 field_0x18; /* 0x19 */ u8 mGhostEnemyState; - /* 0x1A */ bool field_0x1a; - /* 0x1B */ bool mTwilightBattle; + /* 0x1A */ u8 field_0x1a; + /* 0x1B */ u8 mTwilightBattle; /* 0x1C */ bool mForceBattle; }; // Size = 0x20 diff --git a/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp b/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp index cec385c1454..a67100907a8 100644 --- a/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp +++ b/libs/JSystem/J3DGraphAnimator/J3DJoint.cpp @@ -184,10 +184,6 @@ void J3DJoint::appendChild(J3DJoint* pChild) { SECTION_DEAD static u32 const pad_803A2080[2] = {0,0}; #pragma pop -struct copyhelper { - u32 x[8]; -}; - /* 8032F170-8032F254 329AB0 00E4+00 0/0 1/1 0/0 .text __ct__8J3DJointFv */ J3DJoint::J3DJoint() { mCallBackUserData = NULL; @@ -198,8 +194,7 @@ J3DJoint::J3DJoint() { mJntNo = 0; mKind = 1; mScaleCompensate = false; - // This line is probably a fake match but the normal = works nothing like this. - *(copyhelper*)&mTransformInfo = *(copyhelper*)&j3dDefaultTransformInfo; + __memcpy(&mTransformInfo, &j3dDefaultTransformInfo, sizeof(J3DTransformInfo)); mBoundingSphereRadius = 0.0f; mMtxCalc = NULL; mMesh = NULL; diff --git a/libs/JSystem/JAudio2/JASAiCtrl.cpp b/libs/JSystem/JAudio2/JASAiCtrl.cpp index 01209622088..39e30631f96 100644 --- a/libs/JSystem/JAudio2/JASAiCtrl.cpp +++ b/libs/JSystem/JAudio2/JASAiCtrl.cpp @@ -383,13 +383,6 @@ asm void JASDriver::readDspBuffer(s16* param_0, u32 param_1) { #pragma pop #endif -/* ############################################################################################## */ -/* 8039B2F0-8039B2F0 027950 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8039B30C = "DSP-MAIN"; -#pragma pop - /* 8029C900-8029C9DC 297240 00DC+00 1/1 1/1 0/0 .text finishDSPFrame__9JASDriverFv */ void JASDriver::finishDSPFrame() { int r30 = sDspDacWriteBuffer + 1; @@ -439,89 +432,45 @@ u32 JASDriver::getFrameSamples() { return sSubFrames * 0x50; } -/* ############################################################################################## */ -/* 8039B2F0-8039B2F0 027950 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8039B315 = "MONO-MIX"; -#pragma pop - /* 8029CA10-8029CAC0 297350 00B0+00 1/0 0/0 0/0 .text mixMonoTrack__9JASDriverFPsUlPFl_Ps */ -// regalloc -#ifdef NONMATCHING -void JASDriver::mixMonoTrack(s16* param_0, u32 param_1, MixCallback param_2) { +void JASDriver::mixMonoTrack(s16* buffer, u32 param_1, MixCallback param_2) { JASProbe::start(5, "MONO-MIX"); s16* r31 = param_2(param_1); + s16* pTrack = buffer; if (r31 == NULL) { return; } JASProbe::stop(5); for (u32 i = param_1; i != 0; i--) { - param_0[0] = JASCalc::clamp(param_0[0] + r31[0]); - param_0[1] = JASCalc::clamp(param_0[1] + r31[0]); - param_0 += 2; + pTrack[0] = JASCalc::clamp(pTrack[0] + r31[0]); + pTrack[1] = JASCalc::clamp(pTrack[1] + r31[0]); + pTrack += 2; r31++; } } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void JASDriver::mixMonoTrack(s16* param_0, u32 param_1, MixCallback param_2) { - nofralloc -#include "asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrack__9JASDriverFPsUlPFl_Ps.s" -} -#pragma pop -#endif - -/* ############################################################################################## */ -/* 8039B2F0-8039B2F0 027950 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8039B31E = "MONO(W)-MIX"; -#pragma pop /* 8029CAC0-8029CB70 297400 00B0+00 1/0 0/0 0/0 .text mixMonoTrackWide__9JASDriverFPsUlPFl_Ps */ -// instruction order -#ifdef NONMATCHING -void JASDriver::mixMonoTrackWide(s16* param_0, u32 param_1, MixCallback param_2) { +void JASDriver::mixMonoTrackWide(s16* buffer, u32 param_1, MixCallback param_2) { JASProbe::start(5, "MONO(W)-MIX"); s16* r31 = param_2(param_1); + s16* pTrack = buffer; if (!r31) { return; } JASProbe::stop(5); for (u32 i = param_1; i != 0; i--) { - param_0[0] = JASCalc::clamp(param_0[0] + r31[0]); - param_0[1] = JASCalc::clamp(param_0[1] - r31[0]); - param_0 += 2; + pTrack[0] = JASCalc::clamp(pTrack[0] + r31[0]); + s32 src = pTrack[1]; + src -= r31[0]; + pTrack[1] = JASCalc::clamp(src); + pTrack += 2; r31++; } } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void JASDriver::mixMonoTrackWide(s16* param_0, u32 param_1, MixCallback param_2) { - nofralloc -#include "asm/JSystem/JAudio2/JASAiCtrl/mixMonoTrackWide__9JASDriverFPsUlPFl_Ps.s" -} -#pragma pop -#endif - -/* ############################################################################################## */ -/* 8039B2F0-8039B2F0 027950 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8039B32A = "DSPMIX"; -SECTION_DEAD static char const* const stringBase_8039B331 = "MIXING"; -#pragma pop /* 8029CB70-8029CC50 2974B0 00E0+00 1/0 0/0 0/0 .text mixExtraTrack__9JASDriverFPsUlPFl_Ps */ -// missing instruction -#ifdef NONMATCHING -void JASDriver::mixExtraTrack(s16* param_0, u32 param_1, MixCallback param_2) { +void JASDriver::mixExtraTrack(s16* buffer, u32 param_1, MixCallback param_2) { JASProbe::start(5, "DSPMIX"); s16* r31 = param_2(param_1); if (!r31) { @@ -529,51 +478,31 @@ void JASDriver::mixExtraTrack(s16* param_0, u32 param_1, MixCallback param_2) { } JASProbe::stop(5); JASProbe::start(6, "MIXING"); + s16* pTrack = buffer; s16* r29 = r31 + getFrameSamples(); for (u32 i = param_1; i != 0; i--) { - param_0[0] = JASCalc::clamp(param_0[0] + r29[0]); - param_0[1] = JASCalc::clamp(param_0[1] + r31[0]); - param_0 += 2; + pTrack[0] = JASCalc::clamp(pTrack[0] + r29[0]); + pTrack[1] = JASCalc::clamp(pTrack[1] + r31[0]); + pTrack += 2; r29++; r31++; } JASProbe::stop(6); } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void JASDriver::mixExtraTrack(s16* param_0, u32 param_1, MixCallback param_2) { - nofralloc -#include "asm/JSystem/JAudio2/JASAiCtrl/mixExtraTrack__9JASDriverFPsUlPFl_Ps.s" -} -#pragma pop -#endif /* 8029CC50-8029CCD4 297590 0084+00 1/0 0/0 0/0 .text mixInterleaveTrack__9JASDriverFPsUlPFl_Ps */ -// missing instructions -#ifdef NONMATCHING -void JASDriver::mixInterleaveTrack(s16* param_0, u32 param_1, MixCallback param_2) { +void JASDriver::mixInterleaveTrack(s16* buffer, u32 param_1, MixCallback param_2) { s16* r31 = param_2(param_1); - if (!r31) { - return; - } - for (u32 i = param_1 * 2; i != 0; i--) { - param_0[0] = JASCalc::clamp(param_0[0] + r31[0]); - param_0 += 1; - r31++; + if (r31) { + s16* pTrack = buffer; + s16* r30 = r31; + for (u32 i = param_1 * 2; i != 0; i--) { + pTrack[0] = JASCalc::clamp(pTrack[0] + r30[0]); + pTrack += 1; + r30++; + } } } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void JASDriver::mixInterleaveTrack(s16* param_0, u32 param_1, MixCallback param_2) { - nofralloc -#include "asm/JSystem/JAudio2/JASAiCtrl/mixInterleaveTrack__9JASDriverFPsUlPFl_Ps.s" -} -#pragma pop -#endif /* 8029CCD4-8029CCDC -00001 0008+00 0/0 0/0 0/0 .text getSubFrameCounter__9JASDriverFv */ u32 JASDriver::getSubFrameCounter() { diff --git a/libs/JSystem/JAudio2/JASCalc.cpp b/libs/JSystem/JAudio2/JASCalc.cpp index a1eb1183080..bcb17c1755e 100644 --- a/libs/JSystem/JAudio2/JASCalc.cpp +++ b/libs/JSystem/JAudio2/JASCalc.cpp @@ -7,6 +7,7 @@ #include "dol2asm.h" #include "dolphin/os/OSCache.h" #include "MSL_C/math.h" +#include "MSL_C/MSL_Common/Src/limits" // // Types: @@ -340,13 +341,11 @@ f32 JASCalc::pow2(f32 x) { return ret; } -/* 8028F69C-8028F6C4 289FDC 0028+00 0/0 4/4 0/0 .text clamp__7JASCalcFl */ -// Could not make clamp not inline -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -extern "C" asm void func_8028F69C(void* _this, s32 param_0) { - nofralloc -#include "asm/JSystem/JAudio2/JASCalc/func_8028F69C.s" -} -#pragma pop +template <> +s16 JASCalc::clamp(s32 x) { + if (std::numeric_limits::min() >= x) + return std::numeric_limits::min(); + if (x >= std::numeric_limits::max()) + return std::numeric_limits::max(); + return x; +} \ No newline at end of file diff --git a/libs/Z2AudioLib/Z2SoundObjMgr.cpp b/libs/Z2AudioLib/Z2SoundObjMgr.cpp index 65c6ac86094..d3441a8d515 100644 --- a/libs/Z2AudioLib/Z2SoundObjMgr.cpp +++ b/libs/Z2AudioLib/Z2SoundObjMgr.cpp @@ -6,234 +6,107 @@ #include "Z2AudioLib/Z2SoundObjMgr.h" #include "Z2AudioLib/Z2Creature.h" #include "Z2AudioLib/Z2SeqMgr.h" +#include "Z2AudioLib/Z2Calc.h" +#include "Z2AudioLib/Z2SceneMgr.h" #include "dol2asm.h" -// -// Types: -// - -struct Z2Calc { - struct CurveSign {}; - - /* 802A96F4 */ void getParamByExp(f32, f32, f32, f32, f32, f32, Z2Calc::CurveSign); -}; - -// -// Forward References: -// - -extern "C" void __ct__13Z2SoundObjMgrFv(); -extern "C" void setForceBattleArea__13Z2SoundObjMgrFbUsUsUs(); -extern "C" void searchEnemy__13Z2SoundObjMgrFv(); -extern "C" void setGhostEnemyState__13Z2SoundObjMgrFUc(); -extern "C" void func_802C0074(); -extern "C" void setBattleInit__13Z2SoundObjMgrFv(); -extern "C" void checkBattleFinish__13Z2SoundObjMgrFv(); -extern "C" void deleteEnemyAll__13Z2SoundObjMgrFv(); -extern "C" void func_802C0190(); -extern "C" void isTwilightBattle__13Z2SoundObjMgrFv(); -extern "C" void __sinit_Z2SoundObjMgr_cpp(); - -// -// External References: -// - -extern "C" void getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign(); -extern "C" void changeBgmStatus__8Z2SeqMgrFl(); -extern "C" void changeSubBgmStatus__8Z2SeqMgrFl(); -extern "C" void setBattleSearched__8Z2SeqMgrFb(); -extern "C" void setBattleGhostMute__8Z2SeqMgrFb(); -extern "C" void setBattleDistState__8Z2SeqMgrFUc(); -extern "C" void stopBattleBgm__8Z2SeqMgrFUcUc(); -extern "C" void initiate__10JSUPtrListFv(); -extern "C" void append__10JSUPtrListFP10JSUPtrLink(); -extern "C" void remove__10JSUPtrListFP10JSUPtrLink(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_27(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_27(); -extern "C" extern u8 data_80450B80[4]; -extern "C" extern Z2SeqMgr* data_80450B84; -extern "C" u8 mLinkPtr__14Z2CreatureLink[4 + 4 /* padding */]; -extern "C" extern u8 __OSReport_disable; - -// -// Declarations: -// - /* 802BF920-802BF980 2BA260 0060+00 0/0 1/1 0/0 .text __ct__13Z2SoundObjMgrFv */ -#ifdef NONMATCHING // order wrong because this needs to inherit from JASGlobalInstance -Z2SoundObjMgr::Z2SoundObjMgr() { - data_80450B48 = this; +Z2SoundObjMgr::Z2SoundObjMgr() : JASGlobalInstance(this) { mGhostEnemyState = 0; - mTwilightBattle = false; + mTwilightBattle = 0; setBattleInit(); setForceBattleArea(false, 700, 1100, 1500); } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm Z2SoundObjMgr::Z2SoundObjMgr() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/__ct__13Z2SoundObjMgrFv.s" -} -#pragma pop -#endif /* 802BF980-802BF994 2BA2C0 0014+00 1/1 3/3 3/3 .text setForceBattleArea__13Z2SoundObjMgrFbUsUsUs */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjMgr::setForceBattleArea(bool param_0, u16 param_1, u16 param_2, u16 param_3) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/setForceBattleArea__13Z2SoundObjMgrFbUsUsUs.s" +void Z2SoundObjMgr::setForceBattleArea(bool forceBattle, u16 param_1, u16 param_2, u16 param_3) { + mForceBattle = forceBattle; + mEnemyArea.field_0x2 = param_1; + mEnemyArea.field_0x4 = param_2; + mEnemyArea.field_0x6 = param_3; } -#pragma pop -/* ############################################################################################## */ -/* 8039C240-8039C250 0288A0 000C+04 1/1 0/0 0/0 .rodata @3380 */ -SECTION_RODATA static u8 const lit_3380[12 + 4 /* padding */] = { - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - /* padding */ - 0x00, - 0x00, - 0x00, - 0x00, +struct EnemyInfo { + u8 field_0x0; + u8 field_0x1; + u8 field_0x2; + u8 field_0x3; + u8 field_0x4; + u8 field_0x5; + u8 field_0x6; + u8 field_0x7; + u32 field_0x8; + u32 field_0xc; }; -COMPILER_STRIP_GATE(0x8039C240, &lit_3380); /* 803CAD70-803CB170 027E90 0400+00 3/3 0/0 0/0 .data mEnemyInfo */ -SECTION_DATA static u8 mEnemyInfo[1024] = { - 0x44, 0x75, 0x6D, 0x6D, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x73, 0x31, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xBC, 0x04, 0xB0, 0x07, 0xD0, - 0x45, 0x5F, 0x79, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x79, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x79, 0x67, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x2C, 0x01, 0xF4, 0x02, 0xBC, - 0x45, 0x5F, 0x79, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x79, 0x64, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x03, 0x84, 0x05, 0xDC, - 0x45, 0x5F, 0x72, 0x64, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x79, 0x6D, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x14, 0x00, 0x1E, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x77, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x64, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x6B, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x74, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xBC, 0x05, 0xDC, 0x09, 0xC4, - 0x45, 0x5F, 0x74, 0x6B, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xBC, 0x05, 0xDC, 0x09, 0xC4, - 0x45, 0x5F, 0x63, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x64, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x66, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x53, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x50, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x64, 0x62, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x03, 0x84, 0x07, 0x08, - 0x45, 0x5F, 0x6B, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x73, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x73, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x62, 0x73, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xC8, 0x01, 0x90, 0x02, 0x58, - 0x45, 0x5F, 0x53, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x62, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x62, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x48, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x68, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF4, 0x03, 0x20, 0x05, 0x14, - 0x45, 0x5F, 0x77, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x6F, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x66, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x66, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x62, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x6D, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x03, 0x20, 0x05, 0xDC, - 0x45, 0x5F, 0x6E, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x02, 0xBC, 0x04, 0x4C, - 0x45, 0x5F, 0x70, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x72, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x73, 0x67, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x02, 0xBC, 0x03, 0x84, - 0x45, 0x5F, 0x68, 0x62, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x03, 0x84, 0x05, 0xDC, - 0x45, 0x5F, 0x67, 0x62, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x40, 0x0B, 0xB8, 0x0F, 0xA0, - 0x45, 0x5F, 0x6D, 0x73, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x02, 0xBC, 0x04, 0x4C, - 0x45, 0x5F, 0x64, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x62, 0x69, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x02, 0xBC, 0x03, 0x84, - 0x45, 0x5F, 0x74, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x61, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x64, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x77, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x67, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x73, 0x6D, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x73, 0x77, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x90, 0x02, 0x58, 0x05, 0xDC, - 0x45, 0x5F, 0x72, 0x64, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xF4, 0x03, 0xE8, 0x05, 0xDC, - 0x45, 0x5F, 0x6B, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x7A, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x67, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x5F, 0x47, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xE8, 0x07, 0xD0, 0x0F, 0xA0, - 0x45, 0x5F, 0x6D, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x5F, 0x7A, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x5F, 0x74, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -/* 803CB170-803CB230 -00001 00C0+00 1/1 0/0 0/0 .data @3704 */ -SECTION_DATA static void* lit_3704[48] = { - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1E4), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1E4), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1BC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1D0), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1D0), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1EC), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1A8), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1D8), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x208), - (void*)(((char*)searchEnemy__13Z2SoundObjMgrFv) + 0x1D0), +SECTION_DATA static EnemyInfo mEnemyInfo[64] = { + {0x44, 0x75, 0x6D, 0x6D, 0x79, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x73, 0x31, 0x00, 0x00, 0x00, 0x00, 0x010002BC, 0x04B007D0}, + {0x45, 0x5F, 0x79, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x79, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x79, 0x67, 0x00, 0x00, 0x00, 0x00, 0x0100012C, 0x01F402BC}, + {0x45, 0x5F, 0x79, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x79, 0x64, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x038405DC}, + {0x45, 0x5F, 0x72, 0x64, 0x79, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x79, 0x6D, 0x62, 0x00, 0x00, 0x00, 0x0000000A, 0x0014001E}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x77, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x64, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x6B, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x74, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x010002BC, 0x05DC09C4}, + {0x45, 0x5F, 0x74, 0x6B, 0x32, 0x00, 0x00, 0x00, 0x010002BC, 0x05DC09C4}, + {0x45, 0x5F, 0x63, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x64, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x66, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x53, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x50, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x64, 0x62, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x03840708}, + {0x45, 0x5F, 0x6B, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x73, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x73, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x62, 0x73, 0x00, 0x00, 0x00, 0x00, 0x010000C8, 0x01900258}, + {0x45, 0x5F, 0x53, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x62, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x62, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x48, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x68, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x000001F4, 0x03200514}, + {0x45, 0x5F, 0x77, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x6F, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x66, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x66, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x62, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x6D, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x032005DC}, + {0x45, 0x5F, 0x6E, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x02BC044C}, + {0x45, 0x5F, 0x70, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x72, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x73, 0x67, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x02BC0384}, + {0x45, 0x5F, 0x68, 0x62, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x038405DC}, + {0x45, 0x5F, 0x67, 0x62, 0x00, 0x00, 0x00, 0x00, 0x01000640, 0x0BB80FA0}, + {0x45, 0x5F, 0x6D, 0x73, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x02BC044C}, + {0x45, 0x5F, 0x64, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x62, 0x69, 0x00, 0x00, 0x00, 0x00, 0x010001F4, 0x02BC0384}, + {0x45, 0x5F, 0x74, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x61, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x64, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x77, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x67, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x73, 0x6D, 0x32, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x73, 0x77, 0x00, 0x00, 0x00, 0x00, 0x01000190, 0x025805DC}, + {0x45, 0x5F, 0x72, 0x64, 0x62, 0x00, 0x00, 0x00, 0x010001F4, 0x03E805DC}, + {0x45, 0x5F, 0x6B, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x7A, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x67, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x42, 0x5F, 0x47, 0x47, 0x00, 0x00, 0x00, 0x00, 0x000003E8, 0x07D00FA0}, + {0x45, 0x5F, 0x6D, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x45, 0x5F, 0x7A, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, + {0x42, 0x5F, 0x74, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00000000, 0x00000000}, }; /* 80455B80-80455B84 004180 0004+00 1/1 0/0 0/0 .sdata2 sAreaDefault */ @@ -272,47 +145,213 @@ SECTION_SDATA2 static u32 sAreaSmallFloating = 0x000001F4; /* 80455BAC-80455BB0 0041AC 0004+00 1/1 0/0 0/0 .sdata2 None */ SECTION_SDATA2 static u32 data_80455BAC = 0x032004B0; -/* 80455BB0-80455BB4 0041B0 0004+00 1/1 0/0 0/0 .sdata2 @3694 */ -SECTION_SDATA2 static u8 lit_3694[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; - -/* 80455BB4-80455BB8 0041B4 0004+00 1/1 0/0 0/0 .sdata2 @3695 */ -SECTION_SDATA2 static f32 lit_3695 = 100.0f; - -/* 80455BB8-80455BBC 0041B8 0004+00 1/1 0/0 0/0 .sdata2 @3696 */ -SECTION_SDATA2 static f32 lit_3696 = 3.0f / 10.0f; - -/* 80455BBC-80455BC0 0041BC 0004+00 1/1 0/0 0/0 .sdata2 @3697 */ -SECTION_SDATA2 static f32 lit_3697 = 1.0f; - -/* 80455BC0-80455BC4 0041C0 0004+00 1/1 0/0 0/0 .sdata2 @3698 */ -SECTION_SDATA2 static f32 lit_3698 = 2.5f; - -/* 80455BC4-80455BC8 0041C4 0004+00 1/1 0/0 0/0 .sdata2 @3699 */ -SECTION_SDATA2 static f32 lit_3699 = 5000.0f; - -/* 80455BC8-80455BCC 0041C8 0004+00 1/1 0/0 0/0 .sdata2 @3700 */ -SECTION_SDATA2 static f32 lit_3700 = 2.0f; - -/* 80455BCC-80455BD0 0041CC 0004+00 1/1 0/0 0/0 .sdata2 @3701 */ -SECTION_SDATA2 static f32 lit_3701 = 4.0f; - -/* 80455BD0-80455BD8 0041D0 0008+00 1/1 0/0 0/0 .sdata2 @3703 */ -SECTION_SDATA2 static f64 lit_3703 = 4503599627370496.0 /* cast u32 to float */; +inline JAISoundID JAISound::getID() const { + return JAISoundID((u32)soundID); +} /* 802BF994-802BFFEC 2BA2D4 0658+00 1/0 1/1 0/0 .text searchEnemy__13Z2SoundObjMgrFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjMgr::searchEnemy() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/searchEnemy__13Z2SoundObjMgrFv.s" +void Z2SoundObjMgr::searchEnemy() { + mTwilightBattle = 0; + Z2CreatureLink* link = Z2GetLink(); + if (link == 0) { + Z2GetSeqMgr()->stopBattleBgm(1, 1); + return; + } + + bool bVar7 = false; + bool local_96 = false; + bool iVar8 = false; + if (Z2GetSeqMgr()->getMainBgmID() == 0x1000041) { + iVar8 = true; + } + u8 iVar16 = 0; + if (Z2GetSeqMgr()->getSubBgmID() == Z2BGM_HORSE_BATTLE) { + iVar16 = 1; + } else if (Z2GetSeqMgr()->getSubBgmID() == Z2BGM_FACE_OFF_BATTLE2) { + iVar16 = 2; + } + field_0x14 = 0; + mEnemyNumNear = 0; + field_0x16 = 0; + mEnemyNumVeryFar = 0; + field_0x1a = false; + field_0x18 = 0; + f32 dVar18 = Z2Calc::getParamByExp( + Z2GetLink()->getMoveSpeed(), + 0.0f, + 100.0f, + 0.3f, + 1.0f, + 2.5f, + Z2Calc::CURVE_SIGN_1); + f32 dVar19 = 5000.0f; + + for (JSULink* local_8c = getFirst(); local_8c != NULL; local_8c = local_8c->getNext()) { + Z2CreatureEnemy* this_00 = local_8c->getObject(); + if (this_00 == NULL) { + continue; + } + if (this_00->field_0xa1 < 1) { + continue; + } + bool bVar6 = false; + u8 enemyId = this_00->mEnemyID; + switch (enemyId) { + case 0x36: + if (Z2GetSceneMgr()->getCurrentSceneNum() == 0x1c) + continue; + break; + case 0x11: + if (Z2GetSceneMgr()->getCurrentSceneNum() == 0x1e) + continue; + break; + case 0x27: + case 0x28: + case 0x39: + bVar6 = true; + break; + case 0x37: + if (iVar16 == 0) + continue; + break; + case 0xa: + case 0xb: + if (iVar16 != 0) + continue; + case 0xc: + case 0x16: + case 0x1f: + case 0x22: + case 0x26: + case 0x29: + case 0x2b: + case 0x30: + case 0x35: + if (!Z2GetLink()->isRiding()) + break; + if (Z2GetLink()->getMoveSpeed() <= 0x26) + break; + continue; + } + Vec* iVar10 = this_00->getCurrentPos(); + if (iVar10 != NULL) { + Vec* iVar14 = Z2GetLink()->getCurrentPos(); + if (iVar14 != NULL) { + Z2EnemyArea local_88; + __memcpy(&local_88, &mEnemyInfo[enemyId].field_0x8, 8); + if (mForceBattle) { + local_88 = mEnemyArea; + } + f32 fVar2 = 2.0f; + if (local_88.field_0x0 == 1) { + fVar2 = 4.0f; + } + Vec local_80 = {0.0f, 0.0f, 0.0f}; + VECSubtract(iVar10, iVar14, &local_80); + local_80.y *= fVar2; + f32 dVar20 = VECMag(&local_80); + if (dVar20 < local_88.field_0x6 * dVar18) { + if (bVar6) { + field_0x1a++; + + if (dVar20 < local_88.field_0x4 * dVar18) { + mGhostEnemyState |= 1; + if (mGhostEnemyState >= 0x10) { + mEnemyNumNear++; + if (dVar20 < local_88.field_0x2 * dVar18) { + field_0x14++; + } + } + } + if (mGhostEnemyState >= 0x11) { + field_0x16++; + if (this_00->mLinkSearch) { + local_96 = true; + } + } + } else { + field_0x16++; + if (enemyId != 0 && enemyId < 9) { + if (mTwilightBattle == 0) { + mTwilightBattle = 1; + } + if (enemyId == 0x1 || enemyId == 0x5) { + mTwilightBattle = 2; + } + if (enemyId == 0x8) { + mTwilightBattle = 2; + } else { + Z2GetSeqMgr()->changeSubBgmStatus(mTwilightBattle); + } + } + if (enemyId != 0x2c && this_00->mLinkSearch) { + local_96 = true; + } + if (dVar20 < local_88.field_0x4 * dVar18) + { + mEnemyNumNear++; + if (dVar20 < local_88.field_0x2 * dVar18) + { + field_0x14++; + } + } + } + } + if (dVar20 < dVar19 * dVar18) { + mEnemyNumVeryFar++; + } + if (this_00->field_0xa3 != 0) { + bVar7 = true; + field_0x18++; + } + } + } + } + + if (mGhostEnemyState == 0x11) { + if (field_0x1a >= field_0x16) { + Z2GetSeqMgr()->setBattleGhostMute(false); + } else { + Z2GetSeqMgr()->setBattleGhostMute(true); + } + } else if (mGhostEnemyState < 0x20 && field_0x1a == 0x0) { + setGhostEnemyState(0); + } + if (iVar16 == 1) { + if (field_0x14 != 0x0) { + Z2GetSeqMgr()->changeSubBgmStatus(1); + } else { + Z2GetSeqMgr()->changeSubBgmStatus(0); + } + } else if (iVar16 == 2) { + if (mEnemyNumNear != 0x0) { + Z2GetSeqMgr()->changeSubBgmStatus(1); + } else { + Z2GetSeqMgr()->changeSubBgmStatus(0); + } + } else if (iVar8) { + if (field_0x16 != 0x0) { + Z2GetSeqMgr()->changeBgmStatus(1); + } else { + Z2GetSeqMgr()->changeBgmStatus(0); + } + } else if (!bVar7) { + Z2GetSeqMgr()->setBattleSearched(local_96); + if (field_0x14 != 0x0) { + Z2GetSeqMgr()->setBattleDistState(0); + } else { + if (mEnemyNumNear != 0x0) { + Z2GetSeqMgr()->setBattleDistState(1); + } else { + if (field_0x16 != 0x0) { + Z2GetSeqMgr()->setBattleDistState(2); + } else { + Z2GetSeqMgr()->setBattleDistState(3); + } + } + } + } } -#pragma pop void Z2SoundObjMgr::setGhostEnemyState(u8 p1) { if (p1 == 0x20) { @@ -331,34 +370,32 @@ void Z2SoundObjMgr::setGhostEnemyState(u8 p1) { /* 802C0074-802C0100 2BA9B4 008C+00 0/0 1/1 0/0 .text * getEnemyID__13Z2SoundObjMgrFPCcP26JSULink<15Z2CreatureEnemy> */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjMgr::getEnemyID(char const* param_0, JSULink* param_1) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/func_802C0074.s" +u8 Z2SoundObjMgr::getEnemyID(char const* param_0, JSULink* param_1) { + if (param_0 != NULL) { + for (u8 uVar2 = 0; uVar2 < 0x40; uVar2++) { + if (strcmp(param_0, (char*)&mEnemyInfo[(u32)uVar2].field_0x0) == 0) { + append(param_1); + return uVar2; + } + } + } + return Z2_ENEMY_ID_0; } -#pragma pop /* 802C0100-802C0120 2BAA40 0020+00 1/1 1/1 0/0 .text setBattleInit__13Z2SoundObjMgrFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjMgr::setBattleInit() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/setBattleInit__13Z2SoundObjMgrFv.s" +void Z2SoundObjMgr::setBattleInit() { + field_0x14 = 0; + mEnemyNumNear = 0; + field_0x16 = 0; + mEnemyNumVeryFar = 0; + field_0x18 = 0; + field_0x1a = false; } -#pragma pop /* 802C0120-802C013C 2BAA60 001C+00 0/0 1/1 0/0 .text checkBattleFinish__13Z2SoundObjMgrFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjMgr::checkBattleFinish() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/checkBattleFinish__13Z2SoundObjMgrFv.s" +bool Z2SoundObjMgr::checkBattleFinish() { + return mEnemyNumVeryFar - field_0x18 <= 0; } -#pragma pop /* 802C013C-802C0190 2BAA7C 0054+00 0/0 1/1 0/0 .text deleteEnemyAll__13Z2SoundObjMgrFv */ @@ -381,25 +418,23 @@ void Z2SoundObjMgr::deleteEnemyAll() { /* 802C0190-802C01E4 2BAAD0 0054+00 0/0 2/2 0/0 .text * removeEnemy__13Z2SoundObjMgrFP26JSULink<15Z2CreatureEnemy> */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjMgr::removeEnemy(JSULink* param_0) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/func_802C0190.s" +bool Z2SoundObjMgr::removeEnemy(JSULink* param_0) { + if (param_0 == NULL) { + return false; + } + + Z2CreatureEnemy* enemy = param_0->getObject(); + if (enemy->field_0xa3 != 0 && field_0x18 != 0) { + field_0x18--; + } + return remove(param_0); } -#pragma pop /* 802C01E4-802C01EC 2BAB24 0008+00 0/0 4/4 0/0 .text isTwilightBattle__13Z2SoundObjMgrFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm bool Z2SoundObjMgr::isTwilightBattle() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObjMgr/isTwilightBattle__13Z2SoundObjMgrFv.s" +u8 Z2SoundObjMgr::isTwilightBattle() { + return mTwilightBattle; } -#pragma pop /* 802C01EC-802C03C8 2BAB2C 01DC+00 0/0 1/0 0/0 .text __sinit_Z2SoundObjMgr_cpp */ #pragma push diff --git a/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball.cpp b/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball.cpp index 5fcf11cb763..093cc3f7fe6 100644 --- a/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball.cpp +++ b/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball.cpp @@ -5,6 +5,7 @@ #include "rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball.h" #include "SSystem/SComponent/c_math.h" +#include "JSystem/JKernel/JKRHeap.h" #include "d/a/d_a_player.h" #include "d/com/d_com_inf_game.h" #include "d/d_procname.h" @@ -321,13 +322,6 @@ extern void* __vt__17dEvLib_callback_c[6]; // Declarations: // -/* ############################################################################################## */ -/* 80D23E80-80D23E80 0000B4 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80D23E80 = "M_Volcbal"; -#pragma pop - /* 80D23E8C-80D23E98 000000 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */ SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -915,48 +909,35 @@ void daObjVolcBall_c::initActionEnd() { } /* 80D22CD4-80D22DDC 001234 0108+00 1/0 0/0 0/0 .text actionEnd__15daObjVolcBall_cFv */ -// weird branching -#ifdef NONMATCHING void daObjVolcBall_c::actionEnd() { - if (mIsBigVolc == 1 ||) { - if (mIsBigVolc == 1 && i_fopAcM_isSwitch(this, getSwBit())) { - return; - } + if (mIsBigVolc != 1 || (mIsBigVolc == 1 && i_fopAcM_isSwitch(this, getSwBit()))) { + return; + } - daObjVolcBom_c* bom_p = (daObjVolcBom_c*)fopAcM_SearchByID(mBigVolcActorID); - if (bom_p != NULL) { - switch (field_0x2924) { - case 0: - bom_p->startSearch(); - field_0x2924 = 1; - case 1: - if (field_0x2925 == 60) { - field_0x2924 = 2; - } - - field_0x2925++; - break; - case 2: - orderEvent(getEvNo(), 0xFF, 1); - field_0x2924 = 3; - break; - case 3: - eventUpdate(); - break; + daObjVolcBom_c* bom_p = (daObjVolcBom_c*)fopAcM_SearchByID(mBigVolcActorID); + if (bom_p != NULL) { + switch (field_0x2924) { + case 0: + bom_p->startSearch(); + field_0x2924 = 1; + case 1: + if (field_0x2925 == 60) { + field_0x2924 = 2; } + + field_0x2925++; + break; + case 2: + orderEvent(getEvNo(), 0xFF, 1); + field_0x2924 = 3; + break; + case 3: + eventUpdate(); + break; } } + } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daObjVolcBall_c::actionEnd() { - nofralloc -#include "asm/rel/d/a/obj/d_a_obj_volcball/d_a_obj_volcball/actionEnd__15daObjVolcBall_cFv.s" -} -#pragma pop -#endif /* 80D22DDC-80D22E24 00133C 0048+00 2/1 0/0 0/0 .text eventStart__15daObjVolcBall_cFv */ BOOL daObjVolcBall_c::eventStart() { @@ -1191,13 +1172,13 @@ COMPILER_STRIP_GATE(0x80D23E74, &lit_4411); #pragma pop /* 80D23438-80D23868 001998 0430+00 1/1 0/0 0/0 .text executeBall__15daObjVolcBall_cFv */ -// small regalloc / literals +// literals #ifdef NONMATCHING int daObjVolcBall_c::executeBall() { int ret = 0; vball_s* ball = mBall; - for (int i = 0; i < 9; i++) { + for (int i = 0; i < 9; i++, ball++) { if (ball->field_0x376 != 0) { ball->field_0x10 = ball->field_0x4; ball->field_0x364.y = ball->field_0x4.y; @@ -1251,8 +1232,6 @@ int daObjVolcBall_c::executeBall() { ret++; } - - ball++; } return ret; diff --git a/src/d/menu/d_menu_ring.cpp b/src/d/menu/d_menu_ring.cpp index 6d34afe6afb..96080c6c5bb 100644 --- a/src/d/menu/d_menu_ring.cpp +++ b/src/d/menu/d_menu_ring.cpp @@ -476,8 +476,8 @@ SECTION_SDATA2 static f64 lit_4312 = 4503599627370496.0 /* cast u32 to float */; /* 801E9118-801EA708 1E3A58 15F0+00 0/0 1/1 0/0 .text * __ct__12dMenu_Ring_cFP10JKRExpHeapP9STControlP10CSTControlUc */ +// literals #ifdef NONMATCHING -// clrlwi instruction instead of mr dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i_cstick, u8 param_3) { mpHeap = i_heap; @@ -693,7 +693,7 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i mpItemTex[i][k] = new J2DPicture(mpItemBuf[i][k]); mpItemTex[i][k]->setBasePosition(J2DBasePosition_4); } - dMeter2Info_setItemColor(i_textureNum, mpItemTex[i][0], mpItemTex[i][1], + dMeter2Info_setItemColor(item, mpItemTex[i][0], mpItemTex[i][1], mpItemTex[i][2], NULL); u8 texScale = dItem_data::getTexScale(item); f32 fVar1 = (texScale / 100.0f);