mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
Update names
This commit is contained in:
parent
fb8e7c6269
commit
9488a37d1b
@ -56,9 +56,9 @@ class LegoCacheSoundManager {
|
||||
|
||||
LegoCacheSound* FindSoundByKey(const char* p_key);
|
||||
LegoCacheSound* ManageSoundEntry(LegoCacheSound* p_sound);
|
||||
LegoCacheSound* FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three);
|
||||
LegoCacheSound* FUN_1003db10(LegoCacheSound* p_one, const char* p_two, MxBool p_three);
|
||||
void FUN_1003dc40(LegoCacheSound** p_und);
|
||||
LegoCacheSound* Play(const char* p_key, const char* p_name, MxBool p_looping);
|
||||
LegoCacheSound* Play(LegoCacheSound* p_sound, const char* p_name, MxBool p_looping);
|
||||
void Destroy(LegoCacheSound*& p_sound);
|
||||
|
||||
private:
|
||||
Set100d6b4c m_set; // 0x04
|
||||
|
||||
@ -37,7 +37,7 @@ class LegoCacheSound : public MxCore {
|
||||
virtual void FUN_10006cd0(undefined4, undefined4); // vtable+0x1c
|
||||
|
||||
inline const MxString& GetUnknown0x48() const { return m_unk0x48; }
|
||||
inline const undefined GetUnknown0x58() const { return m_unk0x58; }
|
||||
inline const MxBool GetUnknown0x58() const { return m_unk0x58; }
|
||||
|
||||
LegoCacheSound* Clone();
|
||||
MxResult Play(const char* p_name, MxBool p_looping);
|
||||
|
||||
@ -104,53 +104,49 @@ LegoCacheSound* LegoCacheSoundManager::ManageSoundEntry(LegoCacheSound* p_sound)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003dae0
|
||||
LegoCacheSound* LegoCacheSoundManager::FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three)
|
||||
LegoCacheSound* LegoCacheSoundManager::Play(const char* p_key, const char* p_name, MxBool p_looping)
|
||||
{
|
||||
// DECOMP: Second parameter is LegoRoi::m_name (0xe4)
|
||||
return FUN_1003db10(FindSoundByKey(p_one), p_two, p_three);
|
||||
return Play(FindSoundByKey(p_key), p_name, p_looping);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003db10
|
||||
LegoCacheSound* LegoCacheSoundManager::FUN_1003db10(LegoCacheSound* p_one, const char* p_two, MxBool p_three)
|
||||
LegoCacheSound* LegoCacheSoundManager::Play(LegoCacheSound* p_sound, const char* p_name, MxBool p_looping)
|
||||
{
|
||||
if (!p_one) {
|
||||
if (!p_sound) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (p_one->GetUnknown0x58()) {
|
||||
LegoCacheSound* result = p_one->Clone();
|
||||
if (p_sound->GetUnknown0x58()) {
|
||||
LegoCacheSound* clone = p_sound->Clone();
|
||||
|
||||
if (result) {
|
||||
LegoCacheSound* t = ManageSoundEntry(result);
|
||||
t->Play(p_two, p_three);
|
||||
return t;
|
||||
if (clone) {
|
||||
LegoCacheSound* sound = ManageSoundEntry(clone);
|
||||
sound->Play(p_name, p_looping);
|
||||
return sound;
|
||||
}
|
||||
}
|
||||
else {
|
||||
p_one->Play(p_two, p_three);
|
||||
return p_one;
|
||||
p_sound->Play(p_name, p_looping);
|
||||
return p_sound;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003dc40
|
||||
void LegoCacheSoundManager::FUN_1003dc40(LegoCacheSound** p_und)
|
||||
void LegoCacheSoundManager::Destroy(LegoCacheSound*& p_sound)
|
||||
{
|
||||
// Called during LegoWorld::Destroy like this:
|
||||
// SoundManager()->GetCacheSoundManager()->FUN_1003dc40(&sound);
|
||||
// LegoCacheSound*& p_sound?
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
Set100d6b4c::iterator setIter;
|
||||
for (setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
|
||||
#else
|
||||
for (Set100d6b4c::iterator setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
|
||||
#endif
|
||||
if ((*setIter).GetSound() == *p_und) {
|
||||
(*p_und)->FUN_10006b80();
|
||||
if ((*setIter).GetSound() == p_sound) {
|
||||
p_sound->FUN_10006b80();
|
||||
|
||||
delete *p_und;
|
||||
delete p_sound;
|
||||
m_set.erase(setIter);
|
||||
return;
|
||||
}
|
||||
@ -167,8 +163,8 @@ void LegoCacheSoundManager::FUN_1003dc40(LegoCacheSound** p_und)
|
||||
}
|
||||
|
||||
LegoCacheSound* sound = (*listIter).GetSound();
|
||||
if (sound == *p_und) {
|
||||
(*p_und)->FUN_10006b80();
|
||||
if (sound == p_sound) {
|
||||
p_sound->FUN_10006b80();
|
||||
|
||||
delete sound;
|
||||
m_list.erase(listIter);
|
||||
|
||||
@ -103,7 +103,7 @@ void LegoActor::ParseAction(char* p_extra)
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(value, g_strSOUND, p_extra)) {
|
||||
m_sound = SoundManager()->GetCacheSoundManager()->FUN_1003dae0(value, GetROI()->GetName(), TRUE);
|
||||
m_sound = SoundManager()->GetCacheSoundManager()->Play(value, GetROI()->GetName(), TRUE);
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(value, g_strMUTE, p_extra)) {
|
||||
|
||||
@ -204,7 +204,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||
|
||||
while (cursor.First(sound)) {
|
||||
cursor.Detach();
|
||||
SoundManager()->GetCacheSoundManager()->FUN_1003dc40(&sound);
|
||||
SoundManager()->GetCacheSoundManager()->Destroy(sound);
|
||||
}
|
||||
|
||||
delete m_cacheSoundList;
|
||||
|
||||
@ -233,7 +233,7 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||
m_roi->FUN_100a58f0(matrix2);
|
||||
m_roi->VTable0x14();
|
||||
FUN_1002ad8a();
|
||||
SoundManager()->GetCacheSoundManager()->FUN_1003dae0("crash5", m_roi->GetName(), FALSE);
|
||||
SoundManager()->GetCacheSoundManager()->Play("crash5", m_roi->GetName(), FALSE);
|
||||
m_scheduledTime = Timer()->GetTime() + m_disAnim->GetDuration();
|
||||
m_prevWorldSpeed = m_worldSpeed;
|
||||
VTable0xc4();
|
||||
@ -245,7 +245,7 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||
|
||||
if (b) {
|
||||
LegoROI* roi = m_roi;
|
||||
SoundManager()->GetCacheSoundManager()->FUN_1003dae0("crash5", m_roi->GetName(), FALSE);
|
||||
SoundManager()->GetCacheSoundManager()->Play("crash5", m_roi->GetName(), FALSE);
|
||||
VTable0xc4();
|
||||
m_state = 0x102;
|
||||
Mx3DPointFloat dir = p_actor->GetWorldDirection();
|
||||
|
||||
@ -278,7 +278,7 @@ MxS32 LegoPathActor::VTable0x8c(float p_time, Matrix4& p_transform)
|
||||
const char* var = VariableTable()->GetVariable(g_strHIT_WALL_SOUND);
|
||||
|
||||
if (var && var[0] != 0) {
|
||||
SoundManager()->GetCacheSoundManager()->FUN_1003dae0(var, NULL, FALSE);
|
||||
SoundManager()->GetCacheSoundManager()->Play(var, NULL, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user