From 5b896bb471765ced514a8f9f188775749cb974d5 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sat, 7 Jun 2025 15:30:24 +0200 Subject: [PATCH] A few more --- config/SOUE01/symbols.txt | 2 +- include/d/a/d_a_base.h | 2 +- include/toBeSorted/actor_info.h | 11 +++++++++++ src/d/a/d_a_base.cpp | 9 ++++----- src/toBeSorted/actor_info.cpp | 6 +++--- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 25e8c5c0..cc91afff 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -1031,7 +1031,7 @@ __ct__9dAcBase_cFv = .text:0x8002C3B0; // type:function size:0x178 __dt__7dBase_cFv = .text:0x8002C530; // type:function size:0x58 __dt__9dAcBase_cFv = .text:0x8002C590; // type:function size:0xB4 setTempCreateParams__9dAcBase_cFP7mVec3_cP7mAng3_cP7mVec3_clUlP9dAcBase_cUcUsScPC9ActorInfo = .text:0x8002C650; // type:function size:0x34 -FUN_8002c690__9dAcBase_cFv = .text:0x8002C690; // type:function size:0x78 +createSoundSource__9dAcBase_cFv = .text:0x8002C690; // type:function size:0x78 initAllocatorWork1Heap__9dAcBase_cFiPci = .text:0x8002C710; // type:function size:0xC initAllocator__9dAcBase_cFiPcPQ23EGG4Heapi = .text:0x8002C720; // type:function size:0x8C addActorToRoom__9dAcBase_cFl = .text:0x8002C7B0; // type:function size:0x88 diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h index 06868d39..546967d9 100644 --- a/include/d/a/d_a_base.h +++ b/include/d/a/d_a_base.h @@ -252,7 +252,7 @@ public: s8 viewClipIdx, const ActorInfo *actorInfo ); - /* 8002c690 */ SoundSource *FUN_8002c690(); + /* 8002c690 */ SoundSource *createSoundSource(); /* 8002c710 */ int initAllocatorWork1Heap(int size, char *name, int align); /* 8002c720 */ int initAllocator(int size, char *name, EGG::Heap *heap, int align); /* 8002c7b0 */ bool addActorToRoom(s32 roomId); diff --git a/include/toBeSorted/actor_info.h b/include/toBeSorted/actor_info.h index e48fcd2c..d6843009 100644 --- a/include/toBeSorted/actor_info.h +++ b/include/toBeSorted/actor_info.h @@ -6,7 +6,16 @@ // TODO: Expand when we figure out what the other entries have in common enum SoundSourceCategory_e { SND_SOURCE_PLAYER = 0, + SND_SOURCE_PLAYER_HEAD = 1, + SND_SOURCE_NET = 2, + SND_SOURCE_BLADE = 3, + SND_SOURCE_SHIELD = 4, + SND_SOURCE_WHIP = 5, + SND_SOURCE_ARROW = 7, + + SND_SOURCE_HOOKSHOT = 9, + SND_SOURCE_BULLET = 29, SND_SOURCE_OBJECT = 32, SND_SOURCE_ITEM = 35, @@ -18,6 +27,8 @@ enum SoundSourceCategory_e { SND_SOURCE_PLAYER_BIRD = 45, SND_SOURCE_INSECT = 49, SND_SOURCE_NPC_NRM = 51, + SND_SOURCE_NPC_DRAGON = 52, + SND_SOURCE_TG_SOUND = 53, SND_SOURCE_SW_HARP = 56, }; diff --git a/src/d/a/d_a_base.cpp b/src/d/a/d_a_base.cpp index 87386d46..3d89800d 100644 --- a/src/d/a/d_a_base.cpp +++ b/src/d/a/d_a_base.cpp @@ -110,8 +110,7 @@ void dAcBase_c::setTempCreateParams( s_Create_ActorInfo = actorInfo; } -// has regswap -SoundSource *dAcBase_c::FUN_8002c690() { +SoundSource *dAcBase_c::createSoundSource() { if (mpActorInfo == nullptr) { return nullptr; } @@ -121,8 +120,8 @@ SoundSource *dAcBase_c::FUN_8002c690() { return nullptr; } - const char *objName = getActorName(mpActorInfo); - return soundForActorInitRelated_803889c0(soundSourceCategory, this, objName, subtype); + const char *actorName = getActorName(mpActorInfo); + return soundForActorInitRelated_803889c0(soundSourceCategory, this, actorName, subtype); } int dAcBase_c::initAllocatorWork1Heap(int size, char *name, int align) { @@ -133,7 +132,7 @@ int dAcBase_c::initAllocator(int size, char *name, EGG::Heap *heap, int align) { if (!heap_allocator.createNewTempFrmHeap(size, heap, name, 0x20, 0)) { return 0; } - sound_source = FUN_8002c690(); + sound_source = createSoundSource(); int success = createHeap(); heap_allocator.adjustFrmHeapRestoreCurrent(); return success; diff --git a/src/toBeSorted/actor_info.cpp b/src/toBeSorted/actor_info.cpp index b4868b0d..e3228135 100644 --- a/src/toBeSorted/actor_info.cpp +++ b/src/toBeSorted/actor_info.cpp @@ -424,7 +424,7 @@ static const ActorInfo sInfos[] = { {"Musasab", fProfile::OBJ_MUSASABI, fProfile::OBJ_MUSASABI, 321, SND_SOURCE_OBJECT, 0}, { "MvElc", fProfile::OBJ_MOVE_ELEC, fProfile::OBJ_MOVE_ELEC, 0xFFFF, SND_SOURCE_OBJECT, 0}, {"MvLiftV", fProfile::OBJ_MOVE_LIFT_VOL, fProfile::OBJ_MOVE_LIFT_VOL, 0xFFFF, SND_SOURCE_OBJECT, 0}, - { "NpcAdr", fProfile::NPC_ADR, fProfile::NPC_ADR, 310, 52, 0}, + { "NpcAdr", fProfile::NPC_ADR, fProfile::NPC_ADR, 310, SND_SOURCE_NPC_DRAGON, 0}, {"NpcAkuH", fProfile::NPC_AKU_HUMAN, fProfile::NPC_AKU_HUMAN, 346, SND_SOURCE_NPC_NRM, 0}, {"NpcAkum", fProfile::NPC_AKUMAKUN, fProfile::NPC_AKUMAKUN, 279, SND_SOURCE_NPC_NRM, 0}, {"NpcAzFa", fProfile::NPC_AZUKARIYA_FATHER, fProfile::NPC_AZUKARIYA_FATHER, 298, SND_SOURCE_NPC_NRM, 0}, @@ -445,7 +445,7 @@ static const ActorInfo sInfos[] = { {"NpcDrbC", fProfile::NPC_DRBC, fProfile::NPC_DRBC, 320, 43, 0}, { "NpcDsk", fProfile::NPC_DSK, fProfile::NPC_DSK, 258, SND_SOURCE_NPC_NRM, 0}, {"NpcDskN", fProfile::NPC_DAISHINKAN_N, fProfile::NPC_DAISHINKAN_N, 340, SND_SOURCE_NPC_NRM, 0}, - { "NpcFdr", fProfile::NPC_FDR, fProfile::NPC_FDR, 318, 52, 0}, + { "NpcFdr", fProfile::NPC_FDR, fProfile::NPC_FDR, 318, SND_SOURCE_NPC_DRAGON, 0}, { "NpcGhm", fProfile::NPC_GHM, fProfile::NPC_GHM, 323, 50, 0}, {"NpcGost", fProfile::NPC_TOILET_GHOST, fProfile::NPC_TOILET_GHOST, 300, SND_SOURCE_NPC_NRM, 0}, { "NpcGra", fProfile::NPC_GRA, fProfile::NPC_GRA, 302, SND_SOURCE_NPC_NRM, 0}, @@ -514,7 +514,7 @@ static const ActorInfo sInfos[] = { { "NpcSui", fProfile::NPC_SUISEI, fProfile::NPC_SUISEI, 344, 43, 0}, {"NpcSuiN", fProfile::NPC_SUISEI_NORMAL, fProfile::NPC_SUISEI_NORMAL, 309, 50, 0}, {"NpcSuiS", fProfile::NPC_SUISEI_SUB, fProfile::NPC_SUISEI_SUB, 309, 43, 0}, - { "NpcTdr", fProfile::NPC_TDR, fProfile::NPC_TDR, 322, 52, 0}, + { "NpcTdr", fProfile::NPC_TDR, fProfile::NPC_TDR, 322, SND_SOURCE_NPC_DRAGON, 0}, {"NpcTdrB", fProfile::NPC_TDRB, fProfile::NPC_TDRB, 322, SND_SOURCE_OBJECT, 0}, { "NpcTds", fProfile::NPC_TDS, fProfile::NPC_TDS, 478, 0xFF, 0}, { "NpcTer", fProfile::NPC_TERRY, fProfile::NPC_TERRY, 264, SND_SOURCE_NPC_NRM, 0},