mirror of
https://github.com/zeldaret/ss
synced 2026-07-01 03:40:11 -04:00
Fix one small order problem
This commit is contained in:
@@ -16,7 +16,7 @@ class dSndSourceMgr_c {
|
||||
public:
|
||||
dSndSourceMgr_c();
|
||||
|
||||
static dSoundSource_c *createSource(s32 sourceType, dAcBase_c *actor, const char *name, u8 subtype);
|
||||
static dSoundSourceIf_c *createSource(s32 sourceType, dAcBase_c *actor, const char *name, u8 subtype);
|
||||
|
||||
void registerSource(dSoundSource_c *source);
|
||||
void unregisterSource(dSoundSource_c *source);
|
||||
|
||||
@@ -79,7 +79,7 @@ s32 dSndSourceMgr_c::getSourceCategoryForSourceType(s32 sourceType, const char *
|
||||
}
|
||||
}
|
||||
|
||||
dSoundSource_c *dSndSourceMgr_c::createSource(s32 sourceType, dAcBase_c *actor, const char *name, u8 _subtype) {
|
||||
dSoundSourceIf_c *dSndSourceMgr_c::createSource(s32 sourceType, dAcBase_c *actor, const char *name, u8 _subtype) {
|
||||
if (actor == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ dSoundSource_c *dSndSourceMgr_c::createSource(s32 sourceType, dAcBase_c *actor,
|
||||
}
|
||||
|
||||
s32 sourceCategory = getSourceCategoryForSourceType(sourceType, actualName);
|
||||
dSoundSource_c *newSource = nullptr;
|
||||
dSoundSourceIf_c *newSource = nullptr;
|
||||
bool isAnimSource = isAnimSoundSource(sourceType, actualName);
|
||||
bool isMultiSource = isMultiSoundSource(sourceType, actualName);
|
||||
bool isDemo = dSndPlayerMgr_c::GetInstance()->canUseThisPlayer(sourceType);
|
||||
@@ -255,10 +255,12 @@ dSoundSource_c *dSndSourceMgr_c::createSource(s32 sourceType, dAcBase_c *actor,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// setSubtype not emitted by explicit call,
|
||||
// so it apparently happens through dSoundSourceIf_c
|
||||
newSource->setSubtype(subtype);
|
||||
newSource->setup();
|
||||
if (!streq(name, actualName)) {
|
||||
newSource->setOrigName(name);
|
||||
static_cast<dSoundSource_c *>(newSource)->setOrigName(name);
|
||||
}
|
||||
|
||||
if (sourceType == SND_SOURCE_NPC_HEAD) {
|
||||
@@ -270,7 +272,7 @@ dSoundSource_c *dSndSourceMgr_c::createSource(s32 sourceType, dAcBase_c *actor,
|
||||
}
|
||||
|
||||
if (existingSource != nullptr && existingSource != newSource && sourceType != SND_SOURCE_NPC_HEAD && existingSource->isMultiSource()) {
|
||||
existingSource->registerAdditionalSource(newSource);
|
||||
existingSource->registerAdditionalSource(static_cast<dSoundSource_c *>(newSource));
|
||||
}
|
||||
|
||||
return newSource;
|
||||
|
||||
Reference in New Issue
Block a user