diff --git a/asm/GuiSys/CGuiWidgetIdDB.s b/asm/GuiSys/CGuiWidgetIdDB.s index 9393f60b..6b5cb9b9 100644 --- a/asm/GuiSys/CGuiWidgetIdDB.s +++ b/asm/GuiSys/CGuiWidgetIdDB.s @@ -20,7 +20,7 @@ lbl_802CAFA4: /* 802CAFA4 002C7F04 80 1C 00 0C */ lwz r0, 0xc(r28) /* 802CAFA8 002C7F08 7F A4 EB 78 */ mr r4, r29 /* 802CAFAC 002C7F0C 7C 60 FA 14 */ add r3, r0, r31 -/* 802CAFB0 002C7F10 4B D8 76 31 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 802CAFB0 002C7F10 4B D8 76 31 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 802CAFB4 002C7F14 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 802CAFB8 002C7F18 41 82 00 0C */ beq lbl_802CAFC4 /* 802CAFBC 002C7F1C 7F C3 07 34 */ extsh r3, r30 @@ -196,4 +196,3 @@ lbl_803D6948: .asciz "??(??)" .balign 4 .4byte 0 - diff --git a/asm/Kyoto/Animation/CAnimSource.s b/asm/Kyoto/Animation/CAnimSource.s index a5915104..7226e641 100644 --- a/asm/Kyoto/Animation/CAnimSource.s +++ b/asm/Kyoto/Animation/CAnimSource.s @@ -1725,7 +1725,7 @@ sub_802edef0: /* 802EDF1C 002EAE7C 40 82 00 28 */ bne lbl_802EDF44 /* 802EDF20 002EAE80 7F A3 EB 78 */ mr r3, r29 /* 802EDF24 002EAE84 7F C4 F3 78 */ mr r4, r30 -/* 802EDF28 002EAE88 4B D6 46 B9 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 802EDF28 002EAE88 4B D6 46 B9 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 802EDF2C 002EAE8C 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 802EDF30 002EAE90 41 82 00 18 */ beq lbl_802EDF48 /* 802EDF34 002EAE94 80 7D 00 10 */ lwz r3, 0x10(r29) @@ -2049,4 +2049,3 @@ lbl_803D6DD8: # ROM: 0x3D3DD8 .asciz "??(??)" .balign 4 - diff --git a/asm/Kyoto/Animation/CCharacterInfo.s b/asm/Kyoto/Animation/CCharacterInfo.s index 1341e81d..7920ee10 100644 --- a/asm/Kyoto/Animation/CCharacterInfo.s +++ b/asm/Kyoto/Animation/CCharacterInfo.s @@ -96,7 +96,7 @@ sub_802dd89c: lbl_802DD8CC: /* 802DD8CC 002DA82C 7F A4 EB 78 */ mr r4, r29 /* 802DD8D0 002DA830 38 7E 00 14 */ addi r3, r30, 0x14 -/* 802DD8D4 002DA834 4B D7 4D 0D */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 802DD8D4 002DA834 4B D7 4D 0D */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 802DD8D8 002DA838 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 802DD8DC 002DA83C 41 82 00 0C */ beq lbl_802DD8E8 /* 802DD8E0 002DA840 80 7E 00 00 */ lwz r3, 0(r30) @@ -2168,4 +2168,3 @@ lbl_803D6D48: # ROM: 0x3D3D48 .asciz "??(??)" .balign 4 - diff --git a/asm/Kyoto/Audio/CStreamAudioManager.s b/asm/Kyoto/Audio/CStreamAudioManager.s index 87f51897..632afc24 100644 --- a/asm/Kyoto/Audio/CStreamAudioManager.s +++ b/asm/Kyoto/Audio/CStreamAudioManager.s @@ -160,7 +160,7 @@ sub_80365524: /* 80365524 00362484 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80365528 00362488 7C 08 02 A6 */ mflr r0 /* 8036552C 0036248C 90 01 00 14 */ stw r0, 0x14(r1) -/* 80365530 00362490 4B CC 52 45 */ bl sub_8002a774 +/* 80365530 00362490 4B CC 52 45 */ bl "_eq_helper__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80365534 00362494 7C 03 00 D0 */ neg r0, r3 /* 80365538 00362498 7C 00 1B 78 */ or r0, r0, r3 /* 8036553C 0036249C 54 03 0F FE */ srwi r3, r0, 0x1f @@ -569,7 +569,7 @@ lbl_80365A54: /* 80365ABC 00362A1C 7C 7E 1B 78 */ mr r30, r3 /* 80365AC0 00362A20 EC 00 18 28 */ fsubs f0, f0, f3 /* 80365AC4 00362A24 D0 0D 9E 74 */ stfs f0, lbl_805A8A34@sda21(r13) -/* 80365AC8 00362A28 4B CE CB 19 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 80365AC8 00362A28 4B CE CB 19 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80365ACC 00362A2C 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 80365AD0 00362A30 41 82 00 3C */ beq lbl_80365B0C /* 80365AD4 00362A34 57 E3 06 3E */ clrlwi r3, r31, 0x18 diff --git a/asm/Kyoto/Audio/DolphinCAudioSys.s b/asm/Kyoto/Audio/DolphinCAudioSys.s index 33227a10..eff984bf 100644 --- a/asm/Kyoto/Audio/DolphinCAudioSys.s +++ b/asm/Kyoto/Audio/DolphinCAudioSys.s @@ -1597,7 +1597,7 @@ lbl_8034BA24: lbl_8034BAD0: /* 8034BAD0 00348A30 7F E4 FB 78 */ mr r4, r31 /* 8034BAD4 00348A34 38 65 00 14 */ addi r3, r5, 0x14 -/* 8034BAD8 00348A38 4B D0 6B 09 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8034BAD8 00348A38 4B D0 6B 09 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8034BADC 00348A3C 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8034BAE0 00348A40 41 82 00 7C */ beq lbl_8034BB5C /* 8034BAE4 00348A44 83 A1 00 20 */ lwz r29, 0x20(r1) diff --git a/asm/MetroidPrime/CAnimData.s b/asm/MetroidPrime/CAnimData.s index 0fbf17a2..c6287906 100644 --- a/asm/MetroidPrime/CAnimData.s +++ b/asm/MetroidPrime/CAnimData.s @@ -1483,15 +1483,15 @@ sub_8002a750: /* 8002A750 000276B0 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8002A754 000276B4 7C 08 02 A6 */ mflr r0 /* 8002A758 000276B8 90 01 00 14 */ stw r0, 0x14(r1) -/* 8002A75C 000276BC 48 00 00 19 */ bl sub_8002a774 +/* 8002A75C 000276BC 48 00 00 19 */ bl "_eq_helper__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8002A760 000276C0 80 01 00 14 */ lwz r0, 0x14(r1) /* 8002A764 000276C4 54 63 0F FE */ srwi r3, r3, 0x1f /* 8002A768 000276C8 7C 08 03 A6 */ mtlr r0 /* 8002A76C 000276CC 38 21 00 10 */ addi r1, r1, 0x10 /* 8002A770 000276D0 4E 80 00 20 */ blr -.global sub_8002a774 -sub_8002a774: +.global "_eq_helper__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" +"_eq_helper__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>": /* 8002A774 000276D4 94 21 FF B0 */ stwu r1, -0x50(r1) /* 8002A778 000276D8 7C 08 02 A6 */ mflr r0 /* 8002A77C 000276DC 38 E0 00 00 */ li r7, 0 diff --git a/asm/MetroidPrime/CIOWinManager.s b/asm/MetroidPrime/CIOWinManager.s index 8995c655..45c39f63 100644 --- a/asm/MetroidPrime/CIOWinManager.s +++ b/asm/MetroidPrime/CIOWinManager.s @@ -15,8 +15,8 @@ lbl_803CCF28: .section .text, "ax" -.global sub_80051d7c -sub_80051d7c: +.global "erase__Q24rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>FPQ34rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>4node" +"erase__Q24rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>FPQ34rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>4node": /* 80051D7C 0004ECDC 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80051D80 0004ECE0 7C 08 02 A6 */ mflr r0 /* 80051D84 0004ECE4 90 01 00 24 */ stw r0, 0x24(r1) @@ -119,7 +119,7 @@ lbl_80051ECC: /* 80051ED8 0004EE38 7F E4 FB 78 */ mr r4, r31 /* 80051EDC 0004EE3C 38 61 00 18 */ addi r3, r1, 0x18 /* 80051EE0 0004EE40 38 A5 00 04 */ addi r5, r5, 4 -/* 80051EE4 0004EE44 48 00 06 05 */ bl sub_800524e8 +/* 80051EE4 0004EE44 48 00 06 05 */ bl FindIOWin__13CIOWinManagerFPCc /* 80051EE8 0004EE48 80 A1 00 18 */ lwz r5, 0x18(r1) /* 80051EEC 0004EE4C 38 61 00 18 */ addi r3, r1, 0x18 /* 80051EF0 0004EE50 90 A1 00 24 */ stw r5, 0x24(r1) @@ -186,7 +186,7 @@ lbl_80051FC0: /* 80051FD4 0004EF34 38 61 00 0C */ addi r3, r1, 0xc /* 80051FD8 0004EF38 83 A5 00 08 */ lwz r29, 8(r5) /* 80051FDC 0004EF3C 38 A5 00 0C */ addi r5, r5, 0xc -/* 80051FE0 0004EF40 48 00 05 09 */ bl sub_800524e8 +/* 80051FE0 0004EF40 48 00 05 09 */ bl FindIOWin__13CIOWinManagerFPCc /* 80051FE4 0004EF44 80 A1 00 0C */ lwz r5, 0xc(r1) /* 80051FE8 0004EF48 38 61 00 0C */ addi r3, r1, 0xc /* 80051FEC 0004EF4C 90 A1 00 1C */ stw r5, 0x1c(r1) @@ -206,7 +206,7 @@ lbl_80051FC0: /* 80052024 0004EF84 38 81 00 08 */ addi r4, r1, 8 /* 80052028 0004EF88 38 07 00 01 */ addi r0, r7, 1 /* 8005202C 0004EF8C 90 08 00 04 */ stw r0, 4(r8) -/* 80052030 0004EF90 48 00 05 D9 */ bl sub_80052608 +/* 80052030 0004EF90 48 00 05 D9 */ bl "ChangeIOWinPriority__13CIOWinManagerFQ24rstl17ncrc_ptr<6CIOWin>ii" /* 80052034 0004EF94 38 61 00 08 */ addi r3, r1, 8 /* 80052038 0004EF98 4B FB 66 65 */ bl "__dt__Q24rstl15rc_ptr<6CIOWin>Fv" lbl_8005203C: @@ -349,7 +349,7 @@ lbl_800521CC: lbl_8005221C: /* 8005221C 0004F17C 38 61 00 14 */ addi r3, r1, 0x14 /* 80052220 0004F180 38 99 00 08 */ addi r4, r25, 8 -/* 80052224 0004F184 48 00 01 69 */ bl sub_8005238c +/* 80052224 0004F184 48 00 01 69 */ bl Pop__18CArchitectureQueueFv /* 80052228 0004F188 80 61 00 14 */ lwz r3, 0x14(r1) /* 8005222C 0004F18C 28 1E 00 00 */ cmplwi r30, 0 /* 80052230 0004F190 80 01 00 18 */ lwz r0, 0x18(r1) @@ -377,7 +377,7 @@ lbl_8005225C: /* 80052284 0004F1E4 48 00 00 10 */ b lbl_80052294 lbl_80052288: /* 80052288 0004F1E8 38 79 00 08 */ addi r3, r25, 8 -/* 8005228C 0004F1EC 4B FF FA F1 */ bl sub_80051d7c +/* 8005228C 0004F1EC 4B FF FA F1 */ bl "erase__Q24rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>FPQ34rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>4node" /* 80052290 0004F1F0 7C 64 1B 78 */ mr r4, r3 lbl_80052294: /* 80052294 0004F1F4 7C 04 D0 40 */ cmplw r4, r26 @@ -387,7 +387,7 @@ lbl_80052294: /* 800522A4 0004F204 48 00 00 10 */ b lbl_800522B4 lbl_800522A8: /* 800522A8 0004F208 7F 63 DB 78 */ mr r3, r27 -/* 800522AC 0004F20C 4B FF FA D1 */ bl sub_80051d7c +/* 800522AC 0004F20C 4B FF FA D1 */ bl "erase__Q24rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>FPQ34rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>4node" /* 800522B0 0004F210 7C 64 1B 78 */ mr r4, r3 lbl_800522B4: /* 800522B4 0004F214 7C 04 C8 40 */ cmplw r4, r25 @@ -457,8 +457,8 @@ lbl_80052378: /* 80052384 0004F2E4 38 21 00 50 */ addi r1, r1, 0x50 /* 80052388 0004F2E8 4E 80 00 20 */ blr -.global sub_8005238c -sub_8005238c: +.global Pop__18CArchitectureQueueFv +Pop__18CArchitectureQueueFv: /* 8005238C 0004F2EC 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80052390 0004F2F0 7C 08 02 A6 */ mflr r0 /* 80052394 0004F2F4 90 01 00 24 */ stw r0, 0x24(r1) @@ -478,7 +478,7 @@ sub_8005238c: /* 800523CC 0004F32C 38 05 00 01 */ addi r0, r5, 1 /* 800523D0 0004F330 90 06 00 04 */ stw r0, 4(r6) /* 800523D4 0004F334 80 84 00 04 */ lwz r4, 4(r4) -/* 800523D8 0004F338 4B FF F9 A5 */ bl sub_80051d7c +/* 800523D8 0004F338 4B FF F9 A5 */ bl "erase__Q24rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>FPQ34rstl55list<20CArchitectureMessage,Q24rstl17rmemory_allocator>4node" /* 800523DC 0004F33C 80 01 00 08 */ lwz r0, 8(r1) /* 800523E0 0004F340 28 1F 00 00 */ cmplwi r31, 0 /* 800523E4 0004F344 90 1E 00 00 */ stw r0, 0(r30) @@ -518,7 +518,7 @@ PumpMessages__13CIOWinManagerFR18CArchitectureQueue: lbl_8005245C: /* 8005245C 0004F3BC 7F A4 EB 78 */ mr r4, r29 /* 80052460 0004F3C0 38 61 00 08 */ addi r3, r1, 8 -/* 80052464 0004F3C4 4B FF FF 29 */ bl sub_8005238c +/* 80052464 0004F3C4 4B FF FF 29 */ bl Pop__18CArchitectureQueueFv /* 80052468 0004F3C8 80 61 00 08 */ lwz r3, 8(r1) /* 8005246C 0004F3CC 28 1F 00 00 */ cmplwi r31, 0 /* 80052470 0004F3D0 80 01 00 0C */ lwz r0, 0xc(r1) @@ -554,8 +554,8 @@ lbl_800524BC: /* 800524E0 0004F440 38 21 00 30 */ addi r1, r1, 0x30 /* 800524E4 0004F444 4E 80 00 20 */ blr -.global sub_800524e8 -sub_800524e8: +.global FindIOWin__13CIOWinManagerFPCc +FindIOWin__13CIOWinManagerFPCc: /* 800524E8 0004F448 94 21 FF D0 */ stwu r1, -0x30(r1) /* 800524EC 0004F44C 7C 08 02 A6 */ mflr r0 /* 800524F0 0004F450 90 01 00 34 */ stw r0, 0x34(r1) @@ -573,7 +573,7 @@ lbl_8005250C: /* 8005251C 0004F47C 80 63 00 00 */ lwz r3, 0(r3) /* 80052520 0004F480 48 00 06 7D */ bl GetName__6CIOWinCFv /* 80052524 0004F484 7F A4 EB 78 */ mr r4, r29 -/* 80052528 0004F488 48 00 00 B9 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 80052528 0004F488 48 00 00 B9 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8005252C 0004F48C 7C 7F 1B 78 */ mr r31, r3 /* 80052530 0004F490 38 61 00 0C */ addi r3, r1, 0xc /* 80052534 0004F494 4B FB 61 69 */ bl "__dt__Q24rstl15rc_ptr<6CIOWin>Fv" @@ -598,7 +598,7 @@ lbl_80052564: /* 80052574 0004F4D4 80 63 00 00 */ lwz r3, 0(r3) /* 80052578 0004F4D8 48 00 06 25 */ bl GetName__6CIOWinCFv /* 8005257C 0004F4DC 7F A4 EB 78 */ mr r4, r29 -/* 80052580 0004F4E0 48 00 00 61 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 80052580 0004F4E0 48 00 00 61 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80052584 0004F4E4 7C 7F 1B 78 */ mr r31, r3 /* 80052588 0004F4E8 38 61 00 08 */ addi r3, r1, 8 /* 8005258C 0004F4EC 4B FB 61 11 */ bl "__dt__Q24rstl15rc_ptr<6CIOWin>Fv" @@ -626,12 +626,12 @@ lbl_800525CC: /* 800525D8 0004F538 38 21 00 30 */ addi r1, r1, 0x30 /* 800525DC 0004F53C 4E 80 00 20 */ blr -.global "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" -"find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat": +.global "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" +"__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>": /* 800525E0 0004F540 94 21 FF F0 */ stwu r1, -0x10(r1) /* 800525E4 0004F544 7C 08 02 A6 */ mflr r0 /* 800525E8 0004F548 90 01 00 14 */ stw r0, 0x14(r1) -/* 800525EC 0004F54C 4B FD 81 89 */ bl sub_8002a774 +/* 800525EC 0004F54C 4B FD 81 89 */ bl "_eq_helper__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 800525F0 0004F550 7C 60 00 34 */ cntlzw r0, r3 /* 800525F4 0004F554 54 03 D9 7E */ srwi r3, r0, 5 /* 800525F8 0004F558 80 01 00 14 */ lwz r0, 0x14(r1) @@ -639,8 +639,8 @@ lbl_800525CC: /* 80052600 0004F560 38 21 00 10 */ addi r1, r1, 0x10 /* 80052604 0004F564 4E 80 00 20 */ blr -.global sub_80052608 -sub_80052608: +.global "ChangeIOWinPriority__13CIOWinManagerFQ24rstl17ncrc_ptr<6CIOWin>ii" +"ChangeIOWinPriority__13CIOWinManagerFQ24rstl17ncrc_ptr<6CIOWin>ii": /* 80052608 0004F568 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8005260C 0004F56C 7C 08 02 A6 */ mflr r0 /* 80052610 0004F570 90 01 00 34 */ stw r0, 0x34(r1) diff --git a/asm/MetroidPrime/Enemies/CActorContraption.s b/asm/MetroidPrime/Enemies/CActorContraption.s index 6f918fad..558271c9 100644 --- a/asm/MetroidPrime/Enemies/CActorContraption.s +++ b/asm/MetroidPrime/Enemies/CActorContraption.s @@ -136,7 +136,7 @@ lbl_8023F460: lbl_8023F468: /* 8023F468 0023C3C8 38 7F 00 0C */ addi r3, r31, 0xc /* 8023F46C 0023C3CC 38 9E 00 3C */ addi r4, r30, 0x3c -/* 8023F470 0023C3D0 4B E1 31 71 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8023F470 0023C3D0 4B E1 31 71 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8023F474 0023C3D4 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8023F478 0023C3D8 41 82 00 38 */ beq lbl_8023F4B0 /* 8023F47C 0023C3DC A0 1F 00 08 */ lhz r0, 8(r31) @@ -360,7 +360,7 @@ sub_8023f748: lbl_8023F76C: /* 8023F76C 0023C6CC 7F 84 E3 78 */ mr r4, r28 /* 8023F770 0023C6D0 38 7A 00 0C */ addi r3, r26, 0xc -/* 8023F774 0023C6D4 4B E1 2E 6D */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8023F774 0023C6D4 4B E1 2E 6D */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8023F778 0023C6D8 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8023F77C 0023C6DC 41 82 00 1C */ beq lbl_8023F798 /* 8023F780 0023C6E0 A0 1A 00 08 */ lhz r0, 8(r26) diff --git a/asm/MetroidPrime/Enemies/CBabygoth.s b/asm/MetroidPrime/Enemies/CBabygoth.s index 4e0904de..62038866 100644 --- a/asm/MetroidPrime/Enemies/CBabygoth.s +++ b/asm/MetroidPrime/Enemies/CBabygoth.s @@ -2481,7 +2481,7 @@ lbl_8021F274: /* 8021F2C8 0021C228 4B DE 59 F1 */ bl string_l__4rstlFPCc /* 8021F2CC 0021C22C 38 78 00 2C */ addi r3, r24, 0x2c /* 8021F2D0 0021C230 38 81 00 50 */ addi r4, r1, 0x50 -/* 8021F2D4 0021C234 4B E3 33 0D */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8021F2D4 0021C234 4B E3 33 0D */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8021F2D8 0021C238 7C 79 1B 78 */ mr r25, r3 /* 8021F2DC 0021C23C 38 61 00 50 */ addi r3, r1, 0x50 /* 8021F2E0 0021C240 48 11 E8 01 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2496,7 +2496,7 @@ lbl_8021F2F8: /* 8021F300 0021C260 4B DE 59 B9 */ bl string_l__4rstlFPCc /* 8021F304 0021C264 38 78 00 2C */ addi r3, r24, 0x2c /* 8021F308 0021C268 38 81 00 40 */ addi r4, r1, 0x40 -/* 8021F30C 0021C26C 4B E3 32 D5 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8021F30C 0021C26C 4B E3 32 D5 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8021F310 0021C270 7C 79 1B 78 */ mr r25, r3 /* 8021F314 0021C274 38 61 00 40 */ addi r3, r1, 0x40 /* 8021F318 0021C278 48 11 E7 C9 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2507,7 +2507,7 @@ lbl_8021F2F8: /* 8021F32C 0021C28C 4B DE 59 8D */ bl string_l__4rstlFPCc /* 8021F330 0021C290 38 78 00 2C */ addi r3, r24, 0x2c /* 8021F334 0021C294 38 81 00 30 */ addi r4, r1, 0x30 -/* 8021F338 0021C298 4B E3 32 A9 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8021F338 0021C298 4B E3 32 A9 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8021F33C 0021C29C 7C 79 1B 78 */ mr r25, r3 /* 8021F340 0021C2A0 38 61 00 30 */ addi r3, r1, 0x30 /* 8021F344 0021C2A4 48 11 E7 9D */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CElitePirate.s b/asm/MetroidPrime/Enemies/CElitePirate.s index 447e945a..86cfdc4d 100644 --- a/asm/MetroidPrime/Enemies/CElitePirate.s +++ b/asm/MetroidPrime/Enemies/CElitePirate.s @@ -2655,7 +2655,7 @@ sub_8022943c: /* 80229460 002263C0 4B DD B8 59 */ bl string_l__4rstlFPCc /* 80229464 002263C4 7F 63 DB 78 */ mr r3, r27 /* 80229468 002263C8 38 81 00 18 */ addi r4, r1, 0x18 -/* 8022946C 002263CC 4B E2 91 75 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8022946C 002263CC 4B E2 91 75 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80229470 002263D0 7C 7F 1B 78 */ mr r31, r3 /* 80229474 002263D4 38 61 00 18 */ addi r3, r1, 0x18 /* 80229478 002263D8 48 11 46 69 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2673,7 +2673,7 @@ lbl_80229498: /* 802294A0 00226400 4B DD B8 19 */ bl string_l__4rstlFPCc /* 802294A4 00226404 7F 63 DB 78 */ mr r3, r27 /* 802294A8 00226408 38 81 00 08 */ addi r4, r1, 8 -/* 802294AC 0022640C 4B E2 91 35 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 802294AC 0022640C 4B E2 91 35 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 802294B0 00226410 7C 7F 1B 78 */ mr r31, r3 /* 802294B4 00226414 38 61 00 08 */ addi r3, r1, 8 /* 802294B8 00226418 48 11 46 29 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -3003,7 +3003,7 @@ lbl_8022992C: /* 80229974 002268D4 4B DD B3 45 */ bl string_l__4rstlFPCc /* 80229978 002268D8 38 73 00 2C */ addi r3, r19, 0x2c /* 8022997C 002268DC 38 81 00 38 */ addi r4, r1, 0x38 -/* 80229980 002268E0 4B E2 8C 61 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 80229980 002268E0 4B E2 8C 61 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80229984 002268E4 7C 72 1B 78 */ mr r18, r3 /* 80229988 002268E8 38 61 00 38 */ addi r3, r1, 0x38 /* 8022998C 002268EC 48 11 41 55 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CFlaahgra.s b/asm/MetroidPrime/Enemies/CFlaahgra.s index bd354b7d..30303698 100644 --- a/asm/MetroidPrime/Enemies/CFlaahgra.s +++ b/asm/MetroidPrime/Enemies/CFlaahgra.s @@ -2287,7 +2287,7 @@ lbl_801AEE88: /* 801AEF1C 001ABE7C 4B E5 5D 9D */ bl string_l__4rstlFPCc /* 801AEF20 001ABE80 38 7A 00 2C */ addi r3, r26, 0x2c /* 801AEF24 001ABE84 38 81 00 18 */ addi r4, r1, 0x18 -/* 801AEF28 001ABE88 4B EA 36 B9 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801AEF28 001ABE88 4B EA 36 B9 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801AEF2C 001ABE8C 7C 7B 1B 78 */ mr r27, r3 /* 801AEF30 001ABE90 38 61 00 18 */ addi r3, r1, 0x18 /* 801AEF34 001ABE94 48 18 EB AD */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CFlaahgraTentacle.s b/asm/MetroidPrime/Enemies/CFlaahgraTentacle.s index 485c29db..34a4b8c7 100644 --- a/asm/MetroidPrime/Enemies/CFlaahgraTentacle.s +++ b/asm/MetroidPrime/Enemies/CFlaahgraTentacle.s @@ -632,7 +632,7 @@ lbl_801F04B0: /* 801F05CC 001ED52C 4B E1 46 ED */ bl string_l__4rstlFPCc /* 801F05D0 001ED530 38 7C 00 2C */ addi r3, r28, 0x2c /* 801F05D4 001ED534 38 81 00 28 */ addi r4, r1, 0x28 -/* 801F05D8 001ED538 4B E6 20 09 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801F05D8 001ED538 4B E6 20 09 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801F05DC 001ED53C 7C 7C 1B 78 */ mr r28, r3 /* 801F05E0 001ED540 38 61 00 28 */ addi r3, r1, 0x28 /* 801F05E4 001ED544 48 14 D4 FD */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CIceSheegoth.s b/asm/MetroidPrime/Enemies/CIceSheegoth.s index 3b8d3961..87d5a95f 100644 --- a/asm/MetroidPrime/Enemies/CIceSheegoth.s +++ b/asm/MetroidPrime/Enemies/CIceSheegoth.s @@ -2563,7 +2563,7 @@ lbl_801A01D4: /* 801A022C 0019D18C 4B E6 4A 8D */ bl string_l__4rstlFPCc /* 801A0230 0019D190 38 7D 00 2C */ addi r3, r29, 0x2c /* 801A0234 0019D194 38 81 00 78 */ addi r4, r1, 0x78 -/* 801A0238 0019D198 4B EB 23 A9 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801A0238 0019D198 4B EB 23 A9 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801A023C 0019D19C 7C 77 1B 78 */ mr r23, r3 /* 801A0240 0019D1A0 38 61 00 78 */ addi r3, r1, 0x78 /* 801A0244 0019D1A4 48 19 D8 9D */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2581,7 +2581,7 @@ lbl_801A0268: /* 801A0270 0019D1D0 4B E6 4A 49 */ bl string_l__4rstlFPCc /* 801A0274 0019D1D4 38 7D 00 2C */ addi r3, r29, 0x2c /* 801A0278 0019D1D8 38 81 00 68 */ addi r4, r1, 0x68 -/* 801A027C 0019D1DC 4B EB 23 65 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801A027C 0019D1DC 4B EB 23 65 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801A0280 0019D1E0 7C 77 1B 78 */ mr r23, r3 /* 801A0284 0019D1E4 38 61 00 68 */ addi r3, r1, 0x68 /* 801A0288 0019D1E8 48 19 D8 59 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2598,7 +2598,7 @@ lbl_801A02A8: /* 801A02B0 0019D210 4B E6 4A 09 */ bl string_l__4rstlFPCc /* 801A02B4 0019D214 38 7D 00 2C */ addi r3, r29, 0x2c /* 801A02B8 0019D218 38 81 00 58 */ addi r4, r1, 0x58 -/* 801A02BC 0019D21C 4B EB 23 25 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801A02BC 0019D21C 4B EB 23 25 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801A02C0 0019D220 7C 77 1B 78 */ mr r23, r3 /* 801A02C4 0019D224 38 61 00 58 */ addi r3, r1, 0x58 /* 801A02C8 0019D228 48 19 D8 19 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2615,7 +2615,7 @@ lbl_801A02E8: /* 801A02F0 0019D250 4B E6 49 C9 */ bl string_l__4rstlFPCc /* 801A02F4 0019D254 38 7D 00 2C */ addi r3, r29, 0x2c /* 801A02F8 0019D258 38 81 00 48 */ addi r4, r1, 0x48 -/* 801A02FC 0019D25C 4B EB 22 E5 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801A02FC 0019D25C 4B EB 22 E5 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801A0300 0019D260 7C 77 1B 78 */ mr r23, r3 /* 801A0304 0019D264 38 61 00 48 */ addi r3, r1, 0x48 /* 801A0308 0019D268 48 19 D7 D9 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2626,7 +2626,7 @@ lbl_801A02E8: /* 801A031C 0019D27C 4B E6 49 9D */ bl string_l__4rstlFPCc /* 801A0320 0019D280 38 7D 00 2C */ addi r3, r29, 0x2c /* 801A0324 0019D284 38 81 00 38 */ addi r4, r1, 0x38 -/* 801A0328 0019D288 4B EB 22 B9 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801A0328 0019D288 4B EB 22 B9 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801A032C 0019D28C 7C 7D 1B 78 */ mr r29, r3 /* 801A0330 0019D290 38 61 00 38 */ addi r3, r1, 0x38 /* 801A0334 0019D294 48 19 D7 AD */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CMagdolite.s b/asm/MetroidPrime/Enemies/CMagdolite.s index 37c40154..3a6d0eec 100644 --- a/asm/MetroidPrime/Enemies/CMagdolite.s +++ b/asm/MetroidPrime/Enemies/CMagdolite.s @@ -2817,7 +2817,7 @@ lbl_80236968: /* 80236980 002338E0 4B DC E3 39 */ bl string_l__4rstlFPCc /* 80236984 002338E4 38 7C 00 2C */ addi r3, r28, 0x2c /* 80236988 002338E8 38 81 00 60 */ addi r4, r1, 0x60 -/* 8023698C 002338EC 4B E1 BC 55 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8023698C 002338EC 4B E1 BC 55 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80236990 002338F0 7C 7F 1B 78 */ mr r31, r3 /* 80236994 002338F4 38 61 00 60 */ addi r3, r1, 0x60 /* 80236998 002338F8 48 10 71 49 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -2828,7 +2828,7 @@ lbl_80236968: /* 802369AC 0023390C 4B DC E3 0D */ bl string_l__4rstlFPCc /* 802369B0 00233910 38 7C 00 2C */ addi r3, r28, 0x2c /* 802369B4 00233914 38 81 00 50 */ addi r4, r1, 0x50 -/* 802369B8 00233918 4B E1 BC 29 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 802369B8 00233918 4B E1 BC 29 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 802369BC 0023391C 7C 7F 1B 78 */ mr r31, r3 /* 802369C0 00233920 38 61 00 50 */ addi r3, r1, 0x50 /* 802369C4 00233924 48 10 71 1D */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CMetroidBeta.s b/asm/MetroidPrime/Enemies/CMetroidBeta.s index ef108407..c64ce8ce 100644 --- a/asm/MetroidPrime/Enemies/CMetroidBeta.s +++ b/asm/MetroidPrime/Enemies/CMetroidBeta.s @@ -1527,7 +1527,7 @@ lbl_801C1D74: /* 801C1DBC 001BED1C 4B E4 2E FD */ bl string_l__4rstlFPCc /* 801C1DC0 001BED20 38 7D 00 2C */ addi r3, r29, 0x2c /* 801C1DC4 001BED24 38 81 00 30 */ addi r4, r1, 0x30 -/* 801C1DC8 001BED28 4B E9 08 19 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801C1DC8 001BED28 4B E9 08 19 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801C1DCC 001BED2C 7C 7D 1B 78 */ mr r29, r3 /* 801C1DD0 001BED30 38 61 00 30 */ addi r3, r1, 0x30 /* 801C1DD4 001BED34 48 17 BD 0D */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s b/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s index e8374196..b1881249 100644 --- a/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s +++ b/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s @@ -3759,7 +3759,7 @@ lbl_8027FA34: /* 8027FA7C 0027C9DC 4B D8 52 3D */ bl string_l__4rstlFPCc /* 8027FA80 0027C9E0 38 7D 00 2C */ addi r3, r29, 0x2c /* 8027FA84 0027C9E4 38 81 00 28 */ addi r4, r1, 0x28 -/* 8027FA88 0027C9E8 4B DD 2B 59 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8027FA88 0027C9E8 4B DD 2B 59 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8027FA8C 0027C9EC 7C 7D 1B 78 */ mr r29, r3 /* 8027FA90 0027C9F0 38 61 00 28 */ addi r3, r1, 0x28 /* 8027FA94 0027C9F4 48 0B E0 4D */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s b/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s index 9800afb8..f2bf51e9 100644 --- a/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s +++ b/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s @@ -9977,7 +9977,7 @@ lbl_80279540: /* 80279558 002764B8 4B D8 B7 61 */ bl string_l__4rstlFPCc /* 8027955C 002764BC 38 7C 00 2C */ addi r3, r28, 0x2c /* 80279560 002764C0 38 81 00 48 */ addi r4, r1, 0x48 -/* 80279564 002764C4 4B DD 90 7D */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 80279564 002764C4 4B DD 90 7D */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80279568 002764C8 7C 7F 1B 78 */ mr r31, r3 /* 8027956C 002764CC 38 61 00 48 */ addi r3, r1, 0x48 /* 80279570 002764D0 48 0C 45 71 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CNewIntroBoss.s b/asm/MetroidPrime/Enemies/CNewIntroBoss.s index c22c1422..3ac355b8 100644 --- a/asm/MetroidPrime/Enemies/CNewIntroBoss.s +++ b/asm/MetroidPrime/Enemies/CNewIntroBoss.s @@ -1081,7 +1081,7 @@ lbl_8018AA34: /* 8018AA74 001879D4 4B E7 A2 45 */ bl string_l__4rstlFPCc /* 8018AA78 001879D8 38 77 00 2C */ addi r3, r23, 0x2c /* 8018AA7C 001879DC 38 81 00 C0 */ addi r4, r1, 0xc0 -/* 8018AA80 001879E0 4B EC 7B 61 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8018AA80 001879E0 4B EC 7B 61 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8018AA84 001879E4 7C 78 1B 78 */ mr r24, r3 /* 8018AA88 001879E8 38 61 00 C0 */ addi r3, r1, 0xc0 /* 8018AA8C 001879EC 48 1B 30 55 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -1129,7 +1129,7 @@ lbl_8018AB20: /* 8018AB30 00187A90 4B E7 A1 89 */ bl string_l__4rstlFPCc /* 8018AB34 00187A94 38 77 00 2C */ addi r3, r23, 0x2c /* 8018AB38 00187A98 38 81 00 B0 */ addi r4, r1, 0xb0 -/* 8018AB3C 00187A9C 4B EC 7A A5 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 8018AB3C 00187A9C 4B EC 7A A5 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 8018AB40 00187AA0 7C 78 1B 78 */ mr r24, r3 /* 8018AB44 00187AA4 38 61 00 B0 */ addi r3, r1, 0xb0 /* 8018AB48 00187AA8 48 1B 2F 99 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Enemies/CThardus.s b/asm/MetroidPrime/Enemies/CThardus.s index 925d1950..7db6cca1 100644 --- a/asm/MetroidPrime/Enemies/CThardus.s +++ b/asm/MetroidPrime/Enemies/CThardus.s @@ -3852,7 +3852,7 @@ lbl_801DD550: /* 801DD558 001DA4B8 4B E2 77 61 */ bl string_l__4rstlFPCc /* 801DD55C 001DA4BC 7F 23 CB 78 */ mr r3, r25 /* 801DD560 001DA4C0 38 81 00 08 */ addi r4, r1, 8 -/* 801DD564 001DA4C4 4B E7 50 7D */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801DD564 001DA4C4 4B E7 50 7D */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801DD568 001DA4C8 7C 7C 1B 78 */ mr r28, r3 /* 801DD56C 001DA4CC 38 61 00 08 */ addi r3, r1, 8 /* 801DD570 001DA4D0 48 16 05 71 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -6990,7 +6990,7 @@ lbl_801E0218: /* 801E0220 001DD180 4B E2 4A 99 */ bl string_l__4rstlFPCc /* 801E0224 001DD184 7F E3 FB 78 */ mr r3, r31 /* 801E0228 001DD188 38 81 00 78 */ addi r4, r1, 0x78 -/* 801E022C 001DD18C 4B E7 23 B5 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801E022C 001DD18C 4B E7 23 B5 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801E0230 001DD190 7C 78 1B 78 */ mr r24, r3 /* 801E0234 001DD194 38 61 00 78 */ addi r3, r1, 0x78 /* 801E0238 001DD198 48 15 D8 A9 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" @@ -7023,7 +7023,7 @@ lbl_801E0288: /* 801E02A0 001DD200 4B E2 4A 19 */ bl string_l__4rstlFPCc /* 801E02A4 001DD204 7F E3 FB 78 */ mr r3, r31 /* 801E02A8 001DD208 38 81 00 68 */ addi r4, r1, 0x68 -/* 801E02AC 001DD20C 4B E7 23 35 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 801E02AC 001DD20C 4B E7 23 35 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 801E02B0 001DD210 7C 7F 1B 78 */ mr r31, r3 /* 801E02B4 001DD214 38 61 00 68 */ addi r3, r1, 0x68 /* 801E02B8 001DD218 48 15 D8 29 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/asm/MetroidPrime/Player/CGameHintInfo.s b/asm/MetroidPrime/Player/CGameHintInfo.s index 4f6a94a5..09f77570 100644 --- a/asm/MetroidPrime/Player/CGameHintInfo.s +++ b/asm/MetroidPrime/Player/CGameHintInfo.s @@ -426,7 +426,7 @@ lbl_802676A4: /* 802676A4 00264604 80 1F 00 0C */ lwz r0, 0xc(r31) /* 802676A8 00264608 7F 84 E3 78 */ mr r4, r28 /* 802676AC 0026460C 7C 60 F2 14 */ add r3, r0, r30 -/* 802676B0 00264610 4B DE AF 31 */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 802676B0 00264610 4B DE AF 31 */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 802676B4 00264614 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 802676B8 00264618 41 82 00 0C */ beq lbl_802676C4 /* 802676BC 0026461C 7F A3 EB 78 */ mr r3, r29 diff --git a/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s b/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s index 49584922..a06c1efa 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s @@ -662,7 +662,7 @@ lbl_80215E54: /* 80215F28 00212E88 4B DE ED 91 */ bl string_l__4rstlFPCc /* 80215F2C 00212E8C 38 7A 00 2C */ addi r3, r26, 0x2c /* 80215F30 00212E90 38 81 00 40 */ addi r4, r1, 0x40 -/* 80215F34 00212E94 4B E3 C6 AD */ bl "find__Q24rstl418red_black_tree,Q24rstl17rmemory_allocator>,Q24rstl83pair,Q24rstl17rmemory_allocator>,s>,0,Q24rstl103select1st,Q24rstl17rmemory_allocator>,s>>,Q24rstl81less,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocat" +/* 80215F34 00212E94 4B E3 C6 AD */ bl "__eq__Q24rstl66basic_string,Q24rstl17rmemory_allocator>CFRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>" /* 80215F38 00212E98 7C 7A 1B 78 */ mr r26, r3 /* 80215F3C 00212E9C 38 61 00 40 */ addi r3, r1, 0x40 /* 80215F40 00212EA0 48 12 7B A1 */ bl "internal_dereference__Q24rstl66basic_string,Q24rstl17rmemory_allocator>Fv" diff --git a/configure.py b/configure.py index 6f3eeb7e..33597270 100755 --- a/configure.py +++ b/configure.py @@ -47,7 +47,7 @@ LIBS = [ ["MetroidPrime/CArchMsgParmNull", True], ["MetroidPrime/CArchMsgParmReal32", True], ["MetroidPrime/Decode", True], - "MetroidPrime/CIOWinManager", + ["MetroidPrime/CIOWinManager", False], ["MetroidPrime/CIOWin", True], ["MetroidPrime/CActor", False], "MetroidPrime/CWorld", diff --git a/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp b/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp index 8f22b663..9074c462 100644 --- a/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp +++ b/include/MetroidPrime/CArchMsgParmInt32Int32VoidPtr.hpp @@ -14,6 +14,10 @@ class CArchMsgParmInt32Int32VoidPtr : public IArchitectureMessageParm { public: CArchMsgParmInt32Int32VoidPtr(int val1, int val2, const void* ptr); ~CArchMsgParmInt32Int32VoidPtr(); + + int GetInt1() const { return mInt1; } + int GetInt2() const { return mInt2; } + const void* GetPtr() const { return mPtr; } }; #endif // _CARCHMSGPARMINT32INT32VOIDPTR diff --git a/include/MetroidPrime/CArchitectureMessage.hpp b/include/MetroidPrime/CArchitectureMessage.hpp index 081fd762..77e1c4f7 100644 --- a/include/MetroidPrime/CArchitectureMessage.hpp +++ b/include/MetroidPrime/CArchitectureMessage.hpp @@ -37,6 +37,7 @@ public: EArchMsgType GetType() const { return x4_type; } const IArchitectureMessageParm* GetParm() const { return x8_parm.GetPtr(); } + EArchMsgTarget GetTarget() const { return x0_target; } private: EArchMsgTarget x0_target; diff --git a/include/MetroidPrime/CArchitectureQueue.hpp b/include/MetroidPrime/CArchitectureQueue.hpp index ed22cd23..fcadfcdd 100644 --- a/include/MetroidPrime/CArchitectureQueue.hpp +++ b/include/MetroidPrime/CArchitectureQueue.hpp @@ -10,9 +10,13 @@ class CArchitectureQueue { public: bool Push(const CArchitectureMessage& msg); - void Pop(); // TODO - void Clear(); // TODO - bool IsEmpty() const; // TODO + CArchitectureMessage Pop() { + CArchitectureMessage result = *x0_queue.begin(); + x0_queue.pop_front(); + return result; + } + void Clear() { x0_queue.clear(); } + bool IsEmpty() const { return x0_queue.empty(); } private: rstl::list< CArchitectureMessage > x0_queue; diff --git a/include/MetroidPrime/CIOWinManager.hpp b/include/MetroidPrime/CIOWinManager.hpp index 671ab4a1..9af74834 100644 --- a/include/MetroidPrime/CIOWinManager.hpp +++ b/include/MetroidPrime/CIOWinManager.hpp @@ -3,21 +3,38 @@ #include "types.h" +#include "MetroidPrime/CArchitectureQueue.hpp" + #include "rstl/list.hpp" #include "rstl/rc_ptr.hpp" class CIOWin; -// TODO -class IOWinPQNode; class CIOWinManager { public: + struct IOWinPQNode { + rstl::rc_ptr x0_iowin; + int x4_prio; + IOWinPQNode* x8_next; + + IOWinPQNode(rstl::ncrc_ptr iowin, int prio, IOWinPQNode* next); + + rstl::ncrc_ptr GetIOWin() const; + }; + CIOWinManager(); ~CIOWinManager(); void Draw() const; void AddIOWin(rstl::ncrc_ptr< CIOWin >, int, int); + void RemoveIOWin(rstl::ncrc_ptr chIow); void RemoveAllIOWins(); + void ChangeIOWinPriority(rstl::ncrc_ptr toChange, int pumpPrio, int drawPrio); + rstl::ncrc_ptr FindIOWin(const char* name); + + void PumpMessages(CArchitectureQueue& queue); + bool DistributeOneMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue); + bool OnIOWinMessage(const CArchitectureMessage& msg); inline bool IsEmpty() const { return x4_pumpRoot == nullptr && x0_drawRoot == nullptr; } diff --git a/include/rstl/list.hpp b/include/rstl/list.hpp index ea8e1543..aa06eb6b 100644 --- a/include/rstl/list.hpp +++ b/include/rstl/list.hpp @@ -15,8 +15,8 @@ public: iterator erase(const iterator& item); private: - class node; - node* erase(const node* item); + struct node; + node* erase(node* item); public: list() @@ -33,18 +33,22 @@ public: size_t size() const { return x14_count; } bool empty() const { return x14_count == 0; } + void pop_front() { + erase(x4_start); + } + iterator begin() { return iterator(x4_start); } const_iterator begin() const { return const_iterator(x4_start); } iterator end() { return iterator(x8_end); } const_iterator end() const { return const_iterator(x8_end); } iterator erase(const iterator& start, const iterator& end) { - iterator it = start; - while (it != end) { - erase(it++); + node* last = end.get_node(); + node* it = start.get_node(); + while (it != last) { + it = erase(it); } - - return it; + return iterator(it); } private: @@ -135,6 +139,8 @@ public: bool operator==(const iterator& other) const { return current == other.current; } bool operator!=(const iterator& other) const { return current != other.current; } + node* get_node() const { return current; } + protected: node* current; }; @@ -160,6 +166,21 @@ list< T, Alloc >::~list() { } } + +template < typename T, typename Alloc > +typename list< T, Alloc >::node* list< T, Alloc >::erase(node* node) { + typename list< T, Alloc >::node* result = node->get_next(); + if (node == x4_start) { + x4_start = result; + } + node->get_prev()->set_next(node->get_next()); + node->get_next()->set_prev(node->get_prev()); + destroy(node); + x0_allocator.deallocate(node); + x14_count--; + return result; +} + } // namespace rstl #endif // _RSTL_LIST diff --git a/include/rstl/rc_ptr.hpp b/include/rstl/rc_ptr.hpp index 1ffce123..9af0dfd5 100644 --- a/include/rstl/rc_ptr.hpp +++ b/include/rstl/rc_ptr.hpp @@ -23,6 +23,7 @@ public: template < typename T > class rc_ptr { public: + rc_ptr() : x0_refData(&CRefData::sNull) { x0_refData->AddRef(); } rc_ptr(const T* ptr) : x0_refData(new CRefData(ptr)) {} rc_ptr(const rc_ptr& other) : x0_refData(other.x0_refData) { x0_refData->AddRef(); } ~rc_ptr() { ReleaseData(); } @@ -47,8 +48,16 @@ void rc_ptr< T >::ReleaseData() { template < typename T > class ncrc_ptr : public rc_ptr< T > { public: + ncrc_ptr() {} ncrc_ptr(T* ptr) : rc_ptr< T >(ptr) {} + ncrc_ptr(const rc_ptr< T >& other) : rc_ptr< T >(other) {} }; + +template < typename T > +bool operator==(const rc_ptr< T >& left, const rc_ptr< T >& right) { + return left.GetPtr() == right.GetPtr(); +} + } // namespace rstl #endif // _RSTL_RC_PTR diff --git a/include/rstl/string.hpp b/include/rstl/string.hpp index c3d5eaff..5a791723 100644 --- a/include/rstl/string.hpp +++ b/include/rstl/string.hpp @@ -105,9 +105,17 @@ public: } basic_string operator+(const _CharTp*); + int _eq_helper(const basic_string& other) const; + bool operator==(const basic_string& other) const; + const char* data() const { return x0_ptr; } }; +template < typename _CharTp, typename Traits, typename Alloc > +bool basic_string< _CharTp, Traits, Alloc >::operator==(const basic_string& other) const { + return _eq_helper(other) == 0; +} + // template <> // const char basic_string::mNull = 0; // template <> diff --git a/src/MetroidPrime/CIOWinManager.cpp b/src/MetroidPrime/CIOWinManager.cpp new file mode 100644 index 00000000..0d141a03 --- /dev/null +++ b/src/MetroidPrime/CIOWinManager.cpp @@ -0,0 +1,236 @@ +#include "MetroidPrime/CIOWinManager.hpp" + +#include "MetroidPrime/CIOWin.hpp" +#include "MetroidPrime/Decode.hpp" + +#include "rstl/string.hpp" + +CIOWinManager::CIOWinManager() +: x0_drawRoot(nullptr), x4_pumpRoot(nullptr), x8_localGatherQueue() {} + +CIOWinManager::~CIOWinManager() { RemoveAllIOWins(); } + +CIOWinManager::IOWinPQNode::IOWinPQNode(rstl::ncrc_ptr< CIOWin > iowin, int prio, + CIOWinManager::IOWinPQNode* next) +: x0_iowin(iowin), x4_prio(prio), x8_next(next) {} + +void CIOWinManager::AddIOWin(rstl::ncrc_ptr< CIOWin > chIow, int pumpPrio, int drawPrio) { + IOWinPQNode* node; + IOWinPQNode* prevNode = nullptr; + for (node = x4_pumpRoot; node && node->x4_prio > pumpPrio; node = node->x8_next) + prevNode = node; + IOWinPQNode* newNode = new IOWinPQNode(chIow, pumpPrio, node); + if (prevNode) + prevNode->x8_next = newNode; + else + x4_pumpRoot = newNode; + + prevNode = nullptr; + for (node = x0_drawRoot; node && drawPrio < node->x4_prio; node = node->x8_next) + prevNode = node; + newNode = new IOWinPQNode(chIow, drawPrio, node); + if (prevNode) + prevNode->x8_next = newNode; + else + x0_drawRoot = newNode; +} + +void CIOWinManager::RemoveIOWin(rstl::ncrc_ptr< CIOWin > chIow) { + IOWinPQNode* prevNode = nullptr; + for (IOWinPQNode* node = x4_pumpRoot; node; node = node->x8_next) { + if (node->GetIOWin() == chIow) { + if (prevNode) + prevNode->x8_next = node->x8_next; + else + x4_pumpRoot = node->x8_next; + delete node; + break; + } + prevNode = node; + } + + prevNode = nullptr; + for (IOWinPQNode* node = x0_drawRoot; node; node = node->x8_next) { + if (node->GetIOWin() == chIow) { + if (prevNode) + prevNode->x8_next = node->x8_next; + else + x0_drawRoot = node->x8_next; + delete node; + break; + } + prevNode = node; + } +} + +void CIOWinManager::RemoveAllIOWins() { + while (x0_drawRoot) { + RemoveIOWin(x0_drawRoot->GetIOWin()); + } + while (x4_pumpRoot) { + RemoveIOWin(x4_pumpRoot->GetIOWin()); + } +} + +void CIOWinManager::ChangeIOWinPriority(rstl::ncrc_ptr< CIOWin > toChange, int pumpPrio, + int drawPrio) { + IOWinPQNode* prevNode = nullptr; + + for (IOWinPQNode* node = x4_pumpRoot; node; node = node->x8_next) { + if (node->GetIOWin() == toChange) { + if (prevNode == nullptr) + x4_pumpRoot = node->x8_next; + else + prevNode->x8_next = node->x8_next; + + node->x4_prio = pumpPrio; + IOWinPQNode* testNode = x4_pumpRoot; + IOWinPQNode* testPrevNode = nullptr; + for (; testNode && testNode->x4_prio > pumpPrio; testNode = testNode->x8_next) { + testPrevNode = testNode; + } + node->x8_next = testNode; + + if (testPrevNode == nullptr) + x4_pumpRoot = node; + else + testPrevNode->x8_next = node; + break; + } + prevNode = node; + } + + prevNode = nullptr; + for (IOWinPQNode* node = x0_drawRoot; node; node = node->x8_next) { + if (node->GetIOWin() == toChange) { + if (prevNode == nullptr) + x0_drawRoot = node->x8_next; + else + prevNode->x8_next = node->x8_next; + + node->x4_prio = drawPrio; + IOWinPQNode* testNode = x0_drawRoot; + IOWinPQNode* testPrevNode = nullptr; + for (; testNode && testNode->x4_prio > drawPrio; testNode = testNode->x8_next) { + testPrevNode = testNode; + } + node->x8_next = testNode; + if (testPrevNode == nullptr) + x0_drawRoot = node; + else + testPrevNode->x8_next = node; + break; + } + prevNode = node; + } +} + +rstl::ncrc_ptr< CIOWin > CIOWinManager::FindIOWin(const char* name) { + const rstl::string& nameStr = reinterpret_cast(*name); + + for (IOWinPQNode* node = x4_pumpRoot; node; node = node->x8_next) { + if (node->GetIOWin()->GetName() == nameStr) { + return node->GetIOWin(); + } + } + for (IOWinPQNode* node = x0_drawRoot; node; node = node->x8_next) { + if (node->GetIOWin()->GetName() == nameStr) { + return node->GetIOWin(); + } + } + return rstl::ncrc_ptr< CIOWin >(); +} + +void CIOWinManager::PumpMessages(CArchitectureQueue& queue) { + while (!queue.IsEmpty()) { + CArchitectureMessage msg = queue.Pop(); + DistributeOneMessage(msg, queue); + } +} + +bool CIOWinManager::DistributeOneMessage(const CArchitectureMessage& msg, + CArchitectureQueue& queue) { + for (IOWinPQNode* node = x4_pumpRoot; node;) { + rstl::ncrc_ptr< CIOWin > iow = node->GetIOWin(); + CIOWin::EMessageReturn mret = iow->OnMessage(msg, x8_localGatherQueue); + + while (!x8_localGatherQueue.IsEmpty()) { + CArchitectureMessage msg = x8_localGatherQueue.Pop(); + if (msg.GetTarget() == kAMT_IOWinManager) { + if (OnIOWinMessage(msg)) { + x8_localGatherQueue.Clear(); + queue.Clear(); + return true; + } + } else { + queue.Push(msg); + } + } + + if (mret == CIOWin::kMR_RemoveIOWinAndExit || mret == CIOWin::kMR_RemoveIOWin) { + node = node->x8_next; + RemoveIOWin(iow); + } else { + node = node->x8_next; + } + if (mret == CIOWin::kMR_Exit || mret == CIOWin::kMR_RemoveIOWinAndExit) { + break; + } + } + + return false; +} + +void CIOWinManager::Draw() const { + for (IOWinPQNode* node = x0_drawRoot; node; node = node->x8_next) { + node->GetIOWin()->PreDraw(); + if (!node->GetIOWin()->GetIsContinueDraw()) + break; + } + for (IOWinPQNode* node = x0_drawRoot; node; node = node->x8_next) { + node->GetIOWin()->Draw(); + if (!node->GetIOWin()->GetIsContinueDraw()) + break; + } +} + +bool CIOWinManager::OnIOWinMessage(const CArchitectureMessage& msg) { + switch (msg.GetType()) { + case kAM_RemoveIOWin: { + const CArchMsgParmNull& parm = MakeMsg::GetParmDeleteIOWin(msg); + rstl::ncrc_ptr< CIOWin > iow = FindIOWin((char*)&parm + 4); + if (iow) + RemoveIOWin(iow); + break; + } + case kAM_CreateIOWin: { + const CArchMsgParmInt32Int32VoidPtr& parm = MakeMsg::GetParmCreateIOWin(msg); + int pumpPrio = parm.GetInt1(); + int drawPrio = parm.GetInt2(); + rstl::rc_ptr< CIOWin > ptr(static_cast< CIOWin* >(const_cast< void* >(parm.GetPtr()))); + AddIOWin(ptr, pumpPrio, drawPrio); + break; + } + case kAM_ChangeIOWinPriority: { + const CArchMsgParmInt32Int32VoidPtr& parm = MakeMsg::GetParmChangeIOWinPriority(msg); + int pumpPrio = parm.GetInt1(); + int drawPrio = parm.GetInt2(); + const void* ptr = parm.GetPtr(); + rstl::ncrc_ptr< CIOWin > iow = FindIOWin((char*)&parm + 0xc); + if (iow) + ChangeIOWinPriority(iow, pumpPrio, drawPrio); + break; + } + case kAM_RemoveAllIOWins: { + RemoveAllIOWins(); + return true; + } + default: + break; + } + return false; +} + +rstl::ncrc_ptr CIOWinManager::IOWinPQNode::GetIOWin() const { + return x0_iowin; +} diff --git a/src/MetroidPrime/Weapons/WeaponTypes.cpp b/src/MetroidPrime/Weapons/WeaponTypes.cpp index 2d8a5e4a..902064e5 100644 --- a/src/MetroidPrime/Weapons/WeaponTypes.cpp +++ b/src/MetroidPrime/Weapons/WeaponTypes.cpp @@ -161,6 +161,8 @@ CSfxHandle play_sfx(u16 sfx, bool underwater, bool looped, short pan) { return hnd; } +} // namespace NWeaponTypes + CDamageInfo CGunWeapon::GetShotDamageInfo(const SShotParam& shotParam, CStateManager& mgr) const { // CWeaponMode mode(shotParam.x0_weaponType, 0); // float damage = shotParam.x8_damage; @@ -183,6 +185,9 @@ CDamageInfo CGunWeapon::GetShotDamageInfo(const SShotParam& shotParam, CStateMan return result; } + +namespace NWeaponTypes { + int get_current_suit(const CStateManager& mgr) { const CPlayerState* state = mgr.GetPlayerState(); CPlayerState::EPlayerSuit suit = state->GetCurrentSuit();