mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 01:28:30 -05:00
Fix some names (#762)
* Fix some names * reorder unit in CMake --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
3839b3278c
commit
a956b19ac6
9 changed files with 161 additions and 161 deletions
|
@ -305,10 +305,10 @@ add_library(lego1 SHARED
|
||||||
LEGO1/lego/legoomni/src/actors/towtrack.cpp
|
LEGO1/lego/legoomni/src/actors/towtrack.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp
|
LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/legocachsound.cpp
|
LEGO1/lego/legoomni/src/audio/legocachsound.cpp
|
||||||
|
LEGO1/lego/legoomni/src/audio/legocachesoundmanager.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp
|
LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp
|
LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/legounknown100d5778.cpp
|
LEGO1/lego/legoomni/src/audio/legounknown100d5778.cpp
|
||||||
LEGO1/lego/legoomni/src/audio/legounknown100d6b4c.cpp
|
|
||||||
LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp
|
LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp
|
||||||
LEGO1/lego/legoomni/src/build/buildingentity.cpp
|
LEGO1/lego/legoomni/src/build/buildingentity.cpp
|
||||||
LEGO1/lego/legoomni/src/build/helicopterstate.cpp
|
LEGO1/lego/legoomni/src/build/helicopterstate.cpp
|
||||||
|
|
118
LEGO1/lego/legoomni/include/legocachesoundmanager.h
Normal file
118
LEGO1/lego/legoomni/include/legocachesoundmanager.h
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
#ifndef LEGOCACHESOUNDMANAGER_H
|
||||||
|
#define LEGOCACHESOUNDMANAGER_H
|
||||||
|
|
||||||
|
#include "decomp.h"
|
||||||
|
#include "legocachsound.h"
|
||||||
|
#include "mxstl/stlcompat.h"
|
||||||
|
#include "mxtypes.h"
|
||||||
|
|
||||||
|
// SIZE 0x08
|
||||||
|
struct LegoCacheSoundEntry {
|
||||||
|
LegoCacheSoundEntry() : m_sound(NULL), m_name(NULL) {}
|
||||||
|
LegoCacheSoundEntry(LegoCacheSound* p_sound, const char* p_name) : m_sound(p_sound), m_name(p_name) {}
|
||||||
|
LegoCacheSoundEntry(LegoCacheSound* p_sound) : m_sound(p_sound), m_name(p_sound->GetString0x48().GetData()) {}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1003d030
|
||||||
|
~LegoCacheSoundEntry()
|
||||||
|
{
|
||||||
|
if (m_sound == NULL && m_name != NULL) {
|
||||||
|
delete[] const_cast<char*>(m_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator==(LegoCacheSoundEntry) const { return 0; }
|
||||||
|
bool operator<(LegoCacheSoundEntry) const { return 0; }
|
||||||
|
|
||||||
|
inline LegoCacheSound* GetSound() const { return m_sound; }
|
||||||
|
inline const char* GetName() const { return m_name; }
|
||||||
|
|
||||||
|
friend struct Set100d6b4cComparator;
|
||||||
|
|
||||||
|
private:
|
||||||
|
LegoCacheSound* m_sound; // 0x00
|
||||||
|
const char* m_name; // 0x04
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Set100d6b4cComparator {
|
||||||
|
bool operator()(const LegoCacheSoundEntry& p_a, const LegoCacheSoundEntry& p_b) const
|
||||||
|
{
|
||||||
|
return strcmpi(p_a.m_name, p_b.m_name) > 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef set<LegoCacheSoundEntry, Set100d6b4cComparator> Set100d6b4c;
|
||||||
|
typedef list<LegoCacheSoundEntry> List100d6b4c;
|
||||||
|
|
||||||
|
// VTABLE: LEGO1 0x100d6b4c
|
||||||
|
// SIZE 0x20
|
||||||
|
class LegoCacheSoundManager {
|
||||||
|
public:
|
||||||
|
LegoCacheSoundManager() {}
|
||||||
|
~LegoCacheSoundManager();
|
||||||
|
|
||||||
|
virtual MxResult Tickle(); // vtable+0x00
|
||||||
|
|
||||||
|
LegoCacheSound* FUN_1003d170(const char* p_key);
|
||||||
|
LegoCacheSound* FUN_1003d290(LegoCacheSound* p_sound);
|
||||||
|
void 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);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Set100d6b4c m_set; // 0x04
|
||||||
|
List100d6b4c m_list; // 0x14
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO: Function names subject to change.
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
// TEMPLATE: LEGO1 0x10029c30
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::~_Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10029d10
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::iterator::_Inc
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10029d50
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::erase
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1002a1b0
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Erase
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1002a210
|
||||||
|
// list<LegoCacheSoundEntry,allocator<LegoCacheSoundEntry> >::~list<LegoCacheSoundEntry,allocator<LegoCacheSoundEntry> >
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1002a2a0
|
||||||
|
// set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::~set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1002a2f0
|
||||||
|
// Set<LegoCacheSoundEntry,Set100d6b4cComparator>::~Set<LegoCacheSoundEntry,Set100d6b4cComparator>
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1002a340
|
||||||
|
// List<LegoCacheSoundEntry>::~List<LegoCacheSoundEntry>
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1003dab0
|
||||||
|
// list<LegoCacheSoundEntry,allocator<LegoCacheSoundEntry> >::_Buynode
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1003d450
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::insert
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1003d6f0
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::iterator::_Dec
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1003d740
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_BuyNode
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1003d760
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Insert
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1003d9f0
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Lrotate
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x1003da50
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Rrotate
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x100f31cc
|
||||||
|
// _Tree<LegoCacheSoundEntry,LegoCacheSoundEntry,set<LegoCacheSoundEntry,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Kfn,Set100d6b4cComparator,allocator<LegoCacheSoundEntry> >::_Nil
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
#endif // LEGOCACHESOUNDMANAGER_H
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef LEGOSOUNDMANAGER_H
|
#ifndef LEGOSOUNDMANAGER_H
|
||||||
#define LEGOSOUNDMANAGER_H
|
#define LEGOSOUNDMANAGER_H
|
||||||
|
|
||||||
#include "legounknown100d6b4c.h"
|
#include "legocachesoundmanager.h"
|
||||||
#include "mxsoundmanager.h"
|
#include "mxsoundmanager.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d6b10
|
// VTABLE: LEGO1 0x100d6b10
|
||||||
|
@ -20,14 +20,14 @@ class LegoSoundManager : public MxSoundManager {
|
||||||
|
|
||||||
void FUN_1002a410(const float* p_pos, const float* p_dir, const float* p_up, const float* p_vel);
|
void FUN_1002a410(const float* p_pos, const float* p_dir, const float* p_up, const float* p_vel);
|
||||||
|
|
||||||
inline LegoUnknown100d6b4c* GetUnknown0x40() { return m_unk0x40; }
|
inline LegoCacheSoundManager* GetCacheSoundManager() { return m_cacheSoundManager; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
|
|
||||||
LPDIRECTSOUND3DLISTENER m_listener; // 0x3c
|
LPDIRECTSOUND3DLISTENER m_listener; // 0x3c
|
||||||
LegoUnknown100d6b4c* m_unk0x40; // 0x40
|
LegoCacheSoundManager* m_cacheSoundManager; // 0x40
|
||||||
};
|
};
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100db6d0
|
// GLOBAL: LEGO1 0x100db6d0
|
||||||
|
|
|
@ -1,118 +0,0 @@
|
||||||
#ifndef LEGOUNKNOWN100D6B4C_H
|
|
||||||
#define LEGOUNKNOWN100D6B4C_H
|
|
||||||
|
|
||||||
#include "decomp.h"
|
|
||||||
#include "legocachsound.h"
|
|
||||||
#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()) {}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003d030
|
|
||||||
~Element100d6b4c()
|
|
||||||
{
|
|
||||||
if (m_sound == NULL && m_name != NULL) {
|
|
||||||
delete[] const_cast<char*>(m_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator==(Element100d6b4c) const { return 0; }
|
|
||||||
bool operator<(Element100d6b4c) const { return 0; }
|
|
||||||
|
|
||||||
inline LegoCacheSound* GetSound() const { return m_sound; }
|
|
||||||
inline const char* GetName() const { return m_name; }
|
|
||||||
|
|
||||||
friend struct Set100d6b4cComparator;
|
|
||||||
|
|
||||||
private:
|
|
||||||
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.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();
|
|
||||||
|
|
||||||
virtual MxResult Tickle(); // vtable+0x00
|
|
||||||
|
|
||||||
LegoCacheSound* FUN_1003d170(const char* p_key);
|
|
||||||
LegoCacheSound* FUN_1003d290(LegoCacheSound* p_sound);
|
|
||||||
void 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);
|
|
||||||
|
|
||||||
private:
|
|
||||||
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> >
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x10029d10
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::iterator::_Inc
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x10029d50
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::erase
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1002a1b0
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Erase
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1002a210
|
|
||||||
// list<Element100d6b4c,allocator<Element100d6b4c> >::~list<Element100d6b4c,allocator<Element100d6b4c> >
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1002a2a0
|
|
||||||
// set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::~set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1002a2f0
|
|
||||||
// Set<Element100d6b4c,Set100d6b4cComparator>::~Set<Element100d6b4c,Set100d6b4cComparator>
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1002a340
|
|
||||||
// List<Element100d6b4c>::~List<Element100d6b4c>
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1003dab0
|
|
||||||
// list<Element100d6b4c,allocator<Element100d6b4c> >::_Buynode
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1003d450
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::insert
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1003d6f0
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::iterator::_Dec
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1003d740
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::_BuyNode
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1003d760
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Insert
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1003d9f0
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Lrotate
|
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x1003da50
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Rrotate
|
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f31cc
|
|
||||||
// _Tree<Element100d6b4c,Element100d6b4c,set<Element100d6b4c,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Kfn,Set100d6b4cComparator,allocator<Element100d6b4c> >::_Nil
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
#endif // LEGOUNKNOWN100D6B4C_H
|
|
|
@ -1,13 +1,13 @@
|
||||||
#include "legounknown100d6b4c.h"
|
#include "legocachesoundmanager.h"
|
||||||
|
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Element100d6b4c, 0x08)
|
DECOMP_SIZE_ASSERT(LegoCacheSoundEntry, 0x08)
|
||||||
DECOMP_SIZE_ASSERT(LegoUnknown100d6b4c, 0x20)
|
DECOMP_SIZE_ASSERT(LegoCacheSoundManager, 0x20)
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003cf20
|
// FUNCTION: LEGO1 0x1003cf20
|
||||||
LegoUnknown100d6b4c::~LegoUnknown100d6b4c()
|
LegoCacheSoundManager::~LegoCacheSoundManager()
|
||||||
{
|
{
|
||||||
LegoCacheSound* sound;
|
LegoCacheSound* sound;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ LegoUnknown100d6b4c::~LegoUnknown100d6b4c()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003d050
|
// FUNCTION: LEGO1 0x1003d050
|
||||||
MxResult LegoUnknown100d6b4c::Tickle()
|
MxResult LegoCacheSoundManager::Tickle()
|
||||||
{
|
{
|
||||||
#ifdef COMPAT_MODE
|
#ifdef COMPAT_MODE
|
||||||
Set100d6b4c::iterator setIter;
|
Set100d6b4c::iterator setIter;
|
||||||
|
@ -61,7 +61,7 @@ MxResult LegoUnknown100d6b4c::Tickle()
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003d170
|
// STUB: LEGO1 0x1003d170
|
||||||
LegoCacheSound* LegoUnknown100d6b4c::FUN_1003d170(const char* p_key)
|
LegoCacheSound* LegoCacheSoundManager::FUN_1003d170(const char* p_key)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
char* x = new char[strlen(p_key) + 1];
|
char* x = new char[strlen(p_key) + 1];
|
||||||
|
@ -78,14 +78,14 @@ LegoCacheSound* LegoUnknown100d6b4c::FUN_1003d170(const char* p_key)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003d290
|
// FUNCTION: LEGO1 0x1003d290
|
||||||
LegoCacheSound* LegoUnknown100d6b4c::FUN_1003d290(LegoCacheSound* p_sound)
|
LegoCacheSound* LegoCacheSoundManager::FUN_1003d290(LegoCacheSound* p_sound)
|
||||||
{
|
{
|
||||||
Set100d6b4c::iterator it = m_set.find(Element100d6b4c(p_sound));
|
Set100d6b4c::iterator it = m_set.find(LegoCacheSoundEntry(p_sound));
|
||||||
if (it != m_set.end()) {
|
if (it != m_set.end()) {
|
||||||
LegoCacheSound* sound = (*it).GetSound();
|
LegoCacheSound* sound = (*it).GetSound();
|
||||||
|
|
||||||
if (sound->GetUnk0x58()) {
|
if (sound->GetUnk0x58()) {
|
||||||
m_list.push_back(Element100d6b4c(p_sound));
|
m_list.push_back(LegoCacheSoundEntry(p_sound));
|
||||||
return p_sound;
|
return p_sound;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -94,7 +94,7 @@ LegoCacheSound* LegoUnknown100d6b4c::FUN_1003d290(LegoCacheSound* p_sound)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_set.insert(Element100d6b4c(p_sound));
|
m_set.insert(LegoCacheSoundEntry(p_sound));
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
if (world) {
|
if (world) {
|
||||||
world->Add(p_sound);
|
world->Add(p_sound);
|
||||||
|
@ -104,14 +104,14 @@ LegoCacheSound* LegoUnknown100d6b4c::FUN_1003d290(LegoCacheSound* p_sound)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003dae0
|
// FUNCTION: LEGO1 0x1003dae0
|
||||||
void LegoUnknown100d6b4c::FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three)
|
void LegoCacheSoundManager::FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three)
|
||||||
{
|
{
|
||||||
// DECOMP: Second parameter is 0xe4 member of LegoPathActor subclass
|
// DECOMP: Second parameter is LegoRoi::m_name (0xe4)
|
||||||
FUN_1003db10(FUN_1003d170(p_one), p_two, p_three);
|
FUN_1003db10(FUN_1003d170(p_one), p_two, p_three);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003db10
|
// FUNCTION: LEGO1 0x1003db10
|
||||||
LegoCacheSound* LegoUnknown100d6b4c::FUN_1003db10(LegoCacheSound* p_one, const char* p_two, MxBool p_three)
|
LegoCacheSound* LegoCacheSoundManager::FUN_1003db10(LegoCacheSound* p_one, const char* p_two, MxBool p_three)
|
||||||
{
|
{
|
||||||
if (!p_one) {
|
if (!p_one) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -135,10 +135,10 @@ LegoCacheSound* LegoUnknown100d6b4c::FUN_1003db10(LegoCacheSound* p_one, const c
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003dc40
|
// FUNCTION: LEGO1 0x1003dc40
|
||||||
void LegoUnknown100d6b4c::FUN_1003dc40(LegoCacheSound** p_und)
|
void LegoCacheSoundManager::FUN_1003dc40(LegoCacheSound** p_und)
|
||||||
{
|
{
|
||||||
// Called during LegoWorld::Destroy like this:
|
// Called during LegoWorld::Destroy like this:
|
||||||
// SoundManager()->GetUnknown0x40()->FUN_1003dc40(&sound);
|
// SoundManager()->GetCacheSoundManager()->FUN_1003dc40(&sound);
|
||||||
// LegoCacheSound*& p_sound?
|
// LegoCacheSound*& p_sound?
|
||||||
|
|
||||||
#ifdef COMPAT_MODE
|
#ifdef COMPAT_MODE
|
|
@ -77,7 +77,7 @@ MxResult LegoLoadCacheSoundPresenter::PutData()
|
||||||
m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
|
|
||||||
if (m_currentTickleState == e_done) {
|
if (m_currentTickleState == e_done) {
|
||||||
m_cacheSound = SoundManager()->GetUnknown0x40()->FUN_1003d290(m_cacheSound);
|
m_cacheSound = SoundManager()->GetCacheSoundManager()->FUN_1003d290(m_cacheSound);
|
||||||
m_unk0x7c = 1;
|
m_unk0x7c = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@ LegoSoundManager::~LegoSoundManager()
|
||||||
// FUNCTION: LEGO1 0x100299a0
|
// FUNCTION: LEGO1 0x100299a0
|
||||||
void LegoSoundManager::Init()
|
void LegoSoundManager::Init()
|
||||||
{
|
{
|
||||||
m_unk0x40 = NULL;
|
m_cacheSoundManager = NULL;
|
||||||
m_listener = NULL;
|
m_listener = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100299b0
|
// FUNCTION: LEGO1 0x100299b0
|
||||||
void LegoSoundManager::Destroy(MxBool p_fromDestructor)
|
void LegoSoundManager::Destroy(MxBool p_fromDestructor)
|
||||||
{
|
{
|
||||||
delete m_unk0x40;
|
delete m_cacheSoundManager;
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
if (!p_fromDestructor) {
|
if (!p_fromDestructor) {
|
||||||
|
@ -65,7 +65,7 @@ MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_unk0x40 = new LegoUnknown100d6b4c;
|
m_cacheSoundManager = new LegoCacheSoundManager;
|
||||||
result = SUCCESS;
|
result = SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ MxResult LegoSoundManager::Tickle()
|
||||||
MxSoundManager::Tickle();
|
MxSoundManager::Tickle();
|
||||||
|
|
||||||
AUTOLOCK(m_criticalSection);
|
AUTOLOCK(m_criticalSection);
|
||||||
return m_unk0x40->Tickle();
|
return m_cacheSoundManager->Tickle();
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1002a410
|
// STUB: LEGO1 0x1002a410
|
||||||
|
|
|
@ -198,7 +198,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||||
|
|
||||||
while (cursor.First(sound)) {
|
while (cursor.First(sound)) {
|
||||||
cursor.Detach();
|
cursor.Detach();
|
||||||
SoundManager()->GetUnknown0x40()->FUN_1003dc40(&sound);
|
SoundManager()->GetCacheSoundManager()->FUN_1003dc40(&sound);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete m_cacheSoundList;
|
delete m_cacheSoundList;
|
||||||
|
|
|
@ -126,13 +126,13 @@ void LegoExtraActor::VTable0xa4(MxU8& p_und1, MxS32& p_und2)
|
||||||
MxResult LegoExtraActor::FUN_1002aae0()
|
MxResult LegoExtraActor::FUN_1002aae0()
|
||||||
{
|
{
|
||||||
LegoPathBoundary* oldEdge = m_boundary;
|
LegoPathBoundary* oldEdge = m_boundary;
|
||||||
Vector3 dir(m_unk0xec[0]);
|
Vector3 rightRef(m_unk0xec[0]);
|
||||||
Vector3 right(m_unk0xec[1]);
|
Vector3 upRef(m_unk0xec[1]);
|
||||||
Vector3 up(m_unk0xec[2]);
|
Vector3 dirRef(m_unk0xec[2]);
|
||||||
Vector3 unused(m_unk0xec[3]);
|
Vector3 positionRef(m_unk0xec[3]);
|
||||||
|
|
||||||
up.Mul(-1.0f);
|
dirRef.Mul(-1.0f);
|
||||||
dir.EqualsCross(&right, &up);
|
rightRef.EqualsCross(&upRef, &dirRef);
|
||||||
|
|
||||||
if (m_boundary == m_destEdge->m_faceA) {
|
if (m_boundary == m_destEdge->m_faceA) {
|
||||||
m_boundary = (LegoPathBoundary*) m_destEdge->m_faceB;
|
m_boundary = (LegoPathBoundary*) m_destEdge->m_faceB;
|
||||||
|
@ -227,7 +227,7 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||||
m_roi->FUN_100a58f0(matrix2);
|
m_roi->FUN_100a58f0(matrix2);
|
||||||
m_roi->VTable0x14();
|
m_roi->VTable0x14();
|
||||||
FUN_1002ad8a();
|
FUN_1002ad8a();
|
||||||
SoundManager()->GetUnknown0x40()->FUN_1003dae0("crash5", m_roi->GetName(), FALSE);
|
SoundManager()->GetCacheSoundManager()->FUN_1003dae0("crash5", m_roi->GetName(), FALSE);
|
||||||
m_scheduledTime = Timer()->GetTime() + m_disAnim->GetDuration();
|
m_scheduledTime = Timer()->GetTime() + m_disAnim->GetDuration();
|
||||||
m_unk0x10 = m_worldSpeed;
|
m_unk0x10 = m_worldSpeed;
|
||||||
VTable0xc4();
|
VTable0xc4();
|
||||||
|
@ -239,7 +239,7 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||||
|
|
||||||
if (b) {
|
if (b) {
|
||||||
LegoROI* roi = m_roi;
|
LegoROI* roi = m_roi;
|
||||||
SoundManager()->GetUnknown0x40()->FUN_1003dae0("crash5", m_roi->GetName(), FALSE);
|
SoundManager()->GetCacheSoundManager()->FUN_1003dae0("crash5", m_roi->GetName(), FALSE);
|
||||||
VTable0xc4();
|
VTable0xc4();
|
||||||
m_state = 0x102;
|
m_state = 0x102;
|
||||||
Mx3DPointFloat dir = p_actor->GetWorldDirection();
|
Mx3DPointFloat dir = p_actor->GetWorldDirection();
|
||||||
|
@ -249,23 +249,23 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||||
roi->FUN_100a58f0(matrix3);
|
roi->FUN_100a58f0(matrix3);
|
||||||
|
|
||||||
#ifdef COMPAT_MODE
|
#ifdef COMPAT_MODE
|
||||||
float dot, dot2;
|
float dotX, dotZ;
|
||||||
{
|
{
|
||||||
Mx3DPointFloat tmp(1.0f, 0, 0);
|
Mx3DPointFloat tmp(1.0f, 0, 0);
|
||||||
dot = dir.Dot(&dir, &tmp);
|
dotX = dir.Dot(&dir, &tmp);
|
||||||
Mx3DPointFloat tmp2(1.0f, 0, 0);
|
Mx3DPointFloat tmp2(0, 0, 1.0f);
|
||||||
dot2 = dir.Dot(&dir, &tmp2);
|
dotZ = dir.Dot(&dir, &tmp2);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
float dot = dir.Dot(&dir, &Mx3DPointFloat(1.0f, 0, 0));
|
float dotX = dir.Dot(&dir, &Mx3DPointFloat(1.0f, 0, 0));
|
||||||
float dot2 = dir.Dot(&dir, &Mx3DPointFloat(0, 0, 1.0f));
|
float dotZ = dir.Dot(&dir, &Mx3DPointFloat(0, 0, 1.0f));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (abs(dot2) < abs(dot)) {
|
if (abs(dotZ) < abs(dotX)) {
|
||||||
m_axis = dot > 0.0 ? e_posz : e_negz;
|
m_axis = dotX > 0.0 ? e_posz : e_negz;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_axis = dot2 > 0.0 ? e_posx : e_negx;
|
m_axis = dotZ > 0.0 ? e_posx : e_negx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue