mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Changes/annotations
This commit is contained in:
parent
47d3e7a0e9
commit
f857900cab
@ -27,14 +27,14 @@ class LegoCacheSound : public MxCore {
|
||||
}
|
||||
|
||||
virtual MxResult FUN_10006710(); // vtable+0x14
|
||||
virtual void FUN_10006920(); // vtable+0x18
|
||||
virtual void Destroy(); // vtable+0x18
|
||||
virtual void FUN_10006cd0(undefined4, undefined4); // vtable+0x1c
|
||||
|
||||
inline const MxString& GetString0x48() const { return m_string0x48; }
|
||||
inline const undefined GetUnk0x58() { return m_unk0x58; }
|
||||
inline const undefined GetUnk0x58() const { return m_unk0x58; }
|
||||
|
||||
LegoCacheSound* FUN_10006960();
|
||||
MxResult FUN_10006a30(char* p_str, MxBool p_unused);
|
||||
MxResult FUN_10006a30(char* p_str, MxBool);
|
||||
void FUN_10006b80();
|
||||
void FUN_10006be0();
|
||||
|
||||
@ -53,7 +53,7 @@ class LegoCacheSound : public MxCore {
|
||||
undefined m_unk0x58; // 0x58
|
||||
PCMWAVEFORMAT m_unk0x59; // 0x59
|
||||
MxBool m_isLooping; // 0x69
|
||||
undefined m_unk0x6a; // 0x6a
|
||||
MxBool m_unk0x6a; // 0x6a
|
||||
undefined4 m_unk0x6c; // 0x6c
|
||||
undefined m_unk0x70; // 0x70
|
||||
MxString m_string0x74; // 0x74
|
||||
|
||||
@ -13,9 +13,10 @@ class LegoUnknown100d5778 {
|
||||
public:
|
||||
LegoUnknown100d5778();
|
||||
virtual ~LegoUnknown100d5778();
|
||||
|
||||
void Init();
|
||||
MxResult FUN_100116a0(LPDIRECTSOUND p_dsound, undefined4 p_two, undefined4 p_three);
|
||||
void FUN_10011880();
|
||||
MxResult FUN_100116a0(LPDIRECTSOUND p_dsound, undefined4, undefined4 p_unk0x2c);
|
||||
void Destroy();
|
||||
undefined4 FUN_100118e0(LPDIRECTSOUNDBUFFER p_dsBuffer);
|
||||
void FUN_10011ca0();
|
||||
|
||||
|
||||
@ -6,15 +6,16 @@
|
||||
#include "mxstl/stlcompat.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
// SIZE 0x08
|
||||
struct Element100d6b4c {
|
||||
Element100d6b4c() : m_sound(NULL), m_name(NULL){};
|
||||
Element100d6b4c(LegoCacheSound* p_sound, const char* p_name) : m_sound(p_sound), m_name(p_name){};
|
||||
Element100d6b4c(LegoCacheSound* p_sound) : m_sound(p_sound), m_name(p_sound->GetString0x48().GetData()){};
|
||||
Element100d6b4c() : m_sound(NULL), m_name(NULL) {}
|
||||
Element100d6b4c(LegoCacheSound* p_sound, const char* p_name) : m_sound(p_sound), m_name(p_name) {}
|
||||
Element100d6b4c(LegoCacheSound* p_sound) : m_sound(p_sound), m_name(p_sound->GetString0x48().GetData()) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003d030
|
||||
~Element100d6b4c()
|
||||
{
|
||||
if (m_sound == NULL) {
|
||||
if (m_sound == NULL && m_name != NULL) {
|
||||
delete[] const_cast<char*>(m_name);
|
||||
}
|
||||
}
|
||||
@ -25,27 +26,28 @@ struct Element100d6b4c {
|
||||
inline LegoCacheSound* GetSound() const { return m_sound; }
|
||||
inline const char* GetName() const { return m_name; }
|
||||
|
||||
friend struct Set100d6b4cComparator;
|
||||
|
||||
private:
|
||||
LegoCacheSound* m_sound;
|
||||
const char* m_name;
|
||||
LegoCacheSound* m_sound; // 0x00
|
||||
const char* m_name; // 0x04
|
||||
};
|
||||
|
||||
struct Set100d6b4cComparator {
|
||||
bool operator()(const Element100d6b4c& p_a, const Element100d6b4c& p_b) const
|
||||
{
|
||||
return strcmpi(p_a.GetName(), p_b.GetName()) > 0;
|
||||
return strcmpi(p_a.m_name, p_b.m_name) > 0;
|
||||
}
|
||||
};
|
||||
|
||||
typedef set<Element100d6b4c, Set100d6b4cComparator> Set100d6b4c;
|
||||
|
||||
typedef list<Element100d6b4c> List100d6b4c;
|
||||
|
||||
// VTABLE: LEGO1 0x100d6b4c
|
||||
// SIZE 0x20
|
||||
class LegoUnknown100d6b4c {
|
||||
public:
|
||||
LegoUnknown100d6b4c(){};
|
||||
LegoUnknown100d6b4c() {}
|
||||
~LegoUnknown100d6b4c();
|
||||
|
||||
virtual MxResult Tickle(); // vtable+0x00
|
||||
@ -57,14 +59,13 @@ class LegoUnknown100d6b4c {
|
||||
void FUN_1003dc40(LegoCacheSound** p_und);
|
||||
|
||||
private:
|
||||
Set100d6b4c m_set;
|
||||
List100d6b4c m_list;
|
||||
Set100d6b4c m_set; // 0x04
|
||||
List100d6b4c m_list; // 0x14
|
||||
};
|
||||
|
||||
// TODO: Function names subject to change.
|
||||
|
||||
// clang-format off
|
||||
|
||||
// TEMPLATE: LEGO1 0x10029c30
|
||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::~_Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >
|
||||
|
||||
@ -112,7 +113,6 @@ class LegoUnknown100d6b4c {
|
||||
|
||||
// GLOBAL: LEGO1 0x100f31cc
|
||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Nil
|
||||
|
||||
// clang-format on
|
||||
|
||||
#endif // LEGOUNKNOWN100D6B4C_H
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include "mxomni.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Lego3DWavePresenter, 0xa0);
|
||||
DECOMP_SIZE_ASSERT(Lego3DWavePresenter, 0xa0)
|
||||
|
||||
// FUNCTION: LEGO1 0x1004a7c0
|
||||
MxResult Lego3DWavePresenter::AddToManager()
|
||||
|
||||
@ -16,17 +16,17 @@ LegoCacheSound::LegoCacheSound()
|
||||
LegoCacheSound::~LegoCacheSound()
|
||||
{
|
||||
// TODO
|
||||
FUN_10006920();
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100066d0
|
||||
void LegoCacheSound::Init()
|
||||
{
|
||||
m_dsBuffer = NULL;
|
||||
m_unk0x40 = 0;
|
||||
m_unk0x40 = NULL;
|
||||
m_unk0x58 = 0;
|
||||
memset(&m_unk0x59, 0, sizeof(m_unk0x59));
|
||||
m_unk0x6a = 0;
|
||||
m_unk0x6a = FALSE;
|
||||
m_unk0x70 = 0;
|
||||
m_isLooping = TRUE;
|
||||
m_unk0x6c = 79;
|
||||
@ -56,7 +56,7 @@ MxResult LegoCacheSound::FUN_10006710()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10006920
|
||||
void LegoCacheSound::FUN_10006920()
|
||||
void LegoCacheSound::Destroy()
|
||||
{
|
||||
if (m_dsBuffer) {
|
||||
m_dsBuffer->Stop();
|
||||
@ -76,7 +76,7 @@ LegoCacheSound* LegoCacheSound::FUN_10006960()
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10006a30
|
||||
MxResult LegoCacheSound::FUN_10006a30(char* p_str, MxBool p_unused)
|
||||
MxResult LegoCacheSound::FUN_10006a30(char* p_str, MxBool)
|
||||
{
|
||||
// TODO
|
||||
// gets param2 from FUN_1003db10
|
||||
@ -98,7 +98,7 @@ void LegoCacheSound::FUN_10006b80()
|
||||
}
|
||||
|
||||
m_unk0x58 = 0;
|
||||
m_unk0x6a = 0;
|
||||
m_unk0x6a = FALSE;
|
||||
|
||||
m_unk0x10.FUN_10011ca0();
|
||||
if (m_string0x74.GetLength() != 0) {
|
||||
@ -110,13 +110,14 @@ void LegoCacheSound::FUN_10006b80()
|
||||
void LegoCacheSound::FUN_10006be0()
|
||||
{
|
||||
if (!m_isLooping) {
|
||||
|
||||
DWORD dwStatus;
|
||||
m_dsBuffer->GetStatus(&dwStatus);
|
||||
|
||||
if (m_unk0x70) {
|
||||
if (dwStatus == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_unk0x70 = 0;
|
||||
}
|
||||
|
||||
@ -139,11 +140,11 @@ void LegoCacheSound::FUN_10006be0()
|
||||
}
|
||||
|
||||
m_dsBuffer->Stop();
|
||||
m_unk0x6a = 1;
|
||||
m_unk0x6a = TRUE;
|
||||
}
|
||||
else if (m_unk0x6a) {
|
||||
m_dsBuffer->Play(0, 0, m_isLooping);
|
||||
m_unk0x6a = 0;
|
||||
m_unk0x6a = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include "legoomni.h"
|
||||
#include "legounksavedatawriter.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoUnknown100d5778, 0x30);
|
||||
DECOMP_SIZE_ASSERT(LegoUnknown100d5778, 0x30)
|
||||
|
||||
// FUNCTION: LEGO1 0x10011630
|
||||
LegoUnknown100d5778::LegoUnknown100d5778()
|
||||
@ -14,7 +14,7 @@ LegoUnknown100d5778::LegoUnknown100d5778()
|
||||
// FUNCTION: LEGO1 0x10011670
|
||||
LegoUnknown100d5778::~LegoUnknown100d5778()
|
||||
{
|
||||
FUN_10011880();
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10011680
|
||||
@ -30,9 +30,10 @@ void LegoUnknown100d5778::Init()
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100116a0
|
||||
MxResult LegoUnknown100d5778::FUN_100116a0(LPDIRECTSOUND p_dsound, undefined4 p_two, undefined4 p_three)
|
||||
MxResult LegoUnknown100d5778::FUN_100116a0(LPDIRECTSOUND p_dsound, undefined4, undefined4 p_unk0x2c)
|
||||
{
|
||||
m_unk0x2c = p_three;
|
||||
m_unk0x2c = p_unk0x2c;
|
||||
|
||||
if (MxOmni::IsSound3D()) {
|
||||
p_dsound->QueryInterface(IID_IDirectSoundBuffer, (LPVOID*) &m_dsBuffer);
|
||||
if (m_dsBuffer == NULL) {
|
||||
@ -48,7 +49,7 @@ MxResult LegoUnknown100d5778::FUN_100116a0(LPDIRECTSOUND p_dsound, undefined4 p_
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10011880
|
||||
void LegoUnknown100d5778::FUN_10011880()
|
||||
void LegoUnknown100d5778::Destroy()
|
||||
{
|
||||
if (m_dsBuffer) {
|
||||
m_dsBuffer->Release();
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
#include "legoomni.h"
|
||||
#include "legoworld.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoUnknown100d6b4c, 0x20);
|
||||
DECOMP_SIZE_ASSERT(Element100d6b4c, 0x08)
|
||||
DECOMP_SIZE_ASSERT(LegoUnknown100d6b4c, 0x20)
|
||||
|
||||
// FUNCTION: LEGO1 0x1003cf20
|
||||
LegoUnknown100d6b4c::~LegoUnknown100d6b4c()
|
||||
@ -44,18 +45,16 @@ MxResult LegoUnknown100d6b4c::Tickle()
|
||||
List100d6b4c::iterator listIter = m_list.begin();
|
||||
while (listIter != m_list.end()) {
|
||||
LegoCacheSound* sound = (*listIter).GetSound();
|
||||
|
||||
if (sound->GetUnk0x58()) {
|
||||
sound->FUN_10006be0();
|
||||
listIter++;
|
||||
continue;
|
||||
}
|
||||
sound->FUN_10006b80();
|
||||
|
||||
List100d6b4c::iterator temp = listIter;
|
||||
listIter++;
|
||||
|
||||
m_list.erase(temp);
|
||||
delete sound;
|
||||
else {
|
||||
sound->FUN_10006b80();
|
||||
m_list.erase(listIter++);
|
||||
delete sound;
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
@ -89,9 +88,10 @@ LegoCacheSound* LegoUnknown100d6b4c::FUN_1003d290(LegoCacheSound* p_sound)
|
||||
m_list.push_back(Element100d6b4c(p_sound));
|
||||
return p_sound;
|
||||
}
|
||||
|
||||
delete p_sound;
|
||||
return sound;
|
||||
else {
|
||||
delete p_sound;
|
||||
return sound;
|
||||
}
|
||||
}
|
||||
|
||||
m_set.insert(Element100d6b4c(p_sound));
|
||||
@ -119,6 +119,7 @@ LegoCacheSound* LegoUnknown100d6b4c::FUN_1003db10(LegoCacheSound* p_one, char* p
|
||||
|
||||
if (p_one->GetUnk0x58()) {
|
||||
LegoCacheSound* result = p_one->FUN_10006960();
|
||||
|
||||
if (result) {
|
||||
LegoCacheSound* t = FUN_1003d290(result);
|
||||
t->FUN_10006a30(p_two, p_three);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user