Order below sinit is now ok

This commit is contained in:
robojumper
2025-06-27 19:34:43 +02:00
parent e1f7e2ac58
commit c73a1af098
18 changed files with 399 additions and 106 deletions
+5
View File
@@ -1,5 +1,6 @@
#include "d/snd/d_snd_se_sound.h"
#include "d/snd/d_snd_source_py_bird.h"
#include "d/snd/d_snd_source_npc.h"
#include "d/snd/d_snd_state_mgr.h"
#include "d/snd/d_snd_wzsound.h"
#include "nw4r/snd/snd_SeqSoundHandle.h"
@@ -14,6 +15,10 @@ void dSndSourcePyBird_c::cbPyBirdGlide(dSndSeSound_c *sound, dSoundSource_c *sou
seqHandle.WriteVariable(10, var);
}
void dSndSourceNpc_c::postSetupSound(u32 playingId, u32 requestedId, dSndSeSound_c *seSound) {
// TODO
}
void dSndSourcePyBird_c::postSetupSound(u32 playingId, u32 requestedId, dSndSeSound_c *seSound) {
if (requestedId == SE_PyBird_GLIDE) {
seSound->setCallback2(&cbPyBirdGlide);
+3 -3
View File
@@ -53,7 +53,7 @@ dSoundSource_c::dSoundSource_c(u8 sourceType, dAcBase_c *actor, const char *name
mpCtxParam(nullptr),
field_0x11C(0),
mpOwnerGroup(pOwnerGroup),
field_0x154(0),
mAnimEventValue(0),
mPolyAttr0(-1),
mPolyAttr1(-1) {
mSourceCategory = dSndSourceMgr_c::getSourceCategoryForSourceType(sourceType, name);
@@ -706,7 +706,7 @@ nw4r::snd::SoundHandle *dSoundSource_c::continueHoldingSound(
ok = HoldSound(handle, actualSoundId);
}
field_0x11C = 0;
field_0x154 = 0;
mAnimEventValue = 0;
if (ok) {
seHandle->setField0x130(1);
postHoldSound(*handle, seHandle, soundId, 0);
@@ -916,7 +916,7 @@ void dSoundSource_c::resetTempParams() {
sCtxParams.floatParam = 0.0f;
sCtxParams.intParam = 0;
field_0x11C = 0;
field_0x154 = 0;
mAnimEventValue = 0;
}
nw4r::snd::SoundStartable::StartResult dSoundSource_c::onSetupError() {
+15
View File
@@ -121,3 +121,18 @@ u32 dSndSourceEnemy_c::overrideHoldSoundId(u32 soundId, bool initial) {
}
return soundId;
}
u32 dSndSourceEnemyAnim_c::overrideStartSoundId(u32 soundId) {
// TODO
return soundId;
}
u32 dSndSourceEnemyAnim_c::overrideHoldSoundId(u32 soundId, bool initial) {
// TODO
return soundId;
}
void dSndSourceEnemyMulti_c::postCalc() {
// TODO - Nusi
}
+22
View File
@@ -0,0 +1,22 @@
#include "d/snd/d_snd_source_harp_related.h"
#include "d/snd/d_snd_source.h"
dSndSourceHarpRelated_c::dSndSourceHarpRelated_c(
u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup
)
: dSoundSource_c(sourceType, ac, name, pOwnerGroup) {
// TODO
}
dSndSourceHarpRelated_c::~dSndSourceHarpRelated_c() {
// TODO
}
void dSndSourceHarpRelated_c::postCalc() {
// TODO
}
void dSndSourceHarpRelated_c::setPause(bool flag, int fadeFrames) {
// TODO
}
+24 -2
View File
@@ -2,10 +2,18 @@
#include "common.h"
#include "d/snd/d_snd_source.h"
// clang-format off
#include "d/snd/d_snd_source_e_spark.h"
#include "d/snd/d_snd_source_enums.h"
#include "d/snd/d_snd_source_py_bird.h"
#include "d/snd/d_snd_source_enemy.h"
#include "d/snd/d_snd_source_obj_clef.h"
#include "d/snd/d_snd_source_obj.h"
#include "d/snd/d_snd_source_npc.h"
#include "d/snd/d_snd_source_harp_related.h"
// clang-format on
#include "d/snd/d_snd_util.h"
#include "nw4r/ut/ut_list.h"
@@ -52,9 +60,16 @@ s32 dSndSourceMgr_c::getSourceCategoryForSourceType(s32 sourceType, const char *
dSoundSource_c *dSndSourceMgr_c::createSource(u32 id, dAcBase_c *actor, const char *name, u8 subtype) {
// TODO
new dSndSourcePyBird_c(0, actor, name, nullptr);
new dSndSourceESpark_c(0, actor, name, nullptr);
new dSndSourceEnemyAnimBase_c(0, actor, name, nullptr);
new dSndSourceEnemyAnim_c(0, actor, name, nullptr);
new dSndSourceEnemyMulti_c(0, actor, name, nullptr);
new dSndSourceObjAnim_c(0, actor, name, nullptr);
new dSndSourceObjClef_c(0, actor, name, nullptr);
new dSndSourcePyBird_c(0, actor, name, nullptr);
new dSndSourceNpc_c(0, actor, name, nullptr);
new dSndSourceNpcAnimBase_c(0, actor, name, nullptr);
new dSndSourceNpcAnim_c(0, actor, name, nullptr);
new dSndSourceHarpTg_c(0, actor, name, nullptr);
return nullptr;
}
@@ -207,3 +222,10 @@ s32 dSndSourceMgr_c::getPlayerSourceRoomId() const {
}
return mpPlayerSource->getRoomId();
}
struct dSndSourceMgrEmptySinit {
dSndSourceMgrEmptySinit() {}
};
dSndSourceMgrEmptySinit emptySinit;
+3 -3
View File
@@ -256,7 +256,7 @@ static const ActorInfo sInfos[] = {
{"ELiTail", fProfile::E_LIZA_TAIL, fProfile::E_LIZA_TAIL, 0xFFFF, SND_SOURCE_ITEM, 0},
{"ELizaru", fProfile::E_LIZARUFOS, fProfile::E_LIZARUFOS, 41, SND_SOURCE_LIZARUFOS, 0},
{ "EMagma", fProfile::E_MAGMA, fProfile::E_MAGMA, 0xFFFF, SND_SOURCE_OBJECT, 0},
{"EMagupp", fProfile::E_MAGUPPO, fProfile::E_MAGUPPO, 74, 12, 0},
{"EMagupp", fProfile::E_MAGUPPO, fProfile::E_MAGUPPO, 74, SND_SOURCE_MAGUPPO, 0},
{ "EMr", fProfile::E_MR, fProfile::E_MR, 36, 10, 0},
{"EMrTate", fProfile::E_MR_SHIELD, fProfile::E_MR_SHIELD, 0xFFFF, 15, 0},
{ "EOc", fProfile::E_OC, fProfile::E_OC, 18, 10, 0},
@@ -525,9 +525,9 @@ static const ActorInfo sInfos[] = {
{"Npckyu1", fProfile::NPC_KYUI_FIRST, fProfile::NPC_KYUI_FIRST, 303, SND_SOURCE_NPC_NRM, 0},
{"Npckyu3", fProfile::NPC_KYUI_THIRD, fProfile::NPC_KYUI_THIRD, 305, SND_SOURCE_NPC_NRM, 0},
{"Npckyu4", fProfile::NPC_KYUI4, fProfile::NPC_KYUI4, 306, SND_SOURCE_NPC_NRM, 0},
{ "NusiB", fProfile::B_NUSI, fProfile::B_NUSI, 0xFFFF, 23, 0},
{ "NusiB", fProfile::B_NUSI, fProfile::B_NUSI, 0xFFFF, SND_SOURCE_BOSS_NUSI, 0},
{ "NusiBt", fProfile::B_NUSI_BULLET, fProfile::B_NUSI_BULLET, 0xFFFF, SND_SOURCE_BULLET, 0},
{"NusiNpc", fProfile::NUSI_NPC, fProfile::NUSI_NPC, 0xFFFF, 46, 0},
{"NusiNpc", fProfile::NUSI_NPC, fProfile::NUSI_NPC, 0xFFFF, SND_SOURCE_NPC_NUSI, 0},
{ "NusiS", fProfile::NUSI_BASE, fProfile::NUSI_BASE, 0xFFFF, 0xFF, 0},
{ "NusiT", fProfile::B_NUSI_TENTAKLE, fProfile::B_NUSI_TENTAKLE, 5, 19, 0},
{"OBBLBom", fProfile::OBJ_BBLARGEBOMB, fProfile::OBJ_BBLARGEBOMB, 0xFFFF, SND_SOURCE_OBJECT, 0},