mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
Merge branch 'master' into mxregion-mxrect
This commit is contained in:
commit
9f6bde8524
@ -164,6 +164,12 @@ void LegoGameState::SerializeScoreHistory(MxS16 p)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1003cea0
|
||||||
|
void LegoGameState::SetSomeEnumState(undefined4 p_state)
|
||||||
|
{
|
||||||
|
m_unk10 = p_state;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10039f00
|
// OFFSET: LEGO1 0x10039f00
|
||||||
void LegoGameState::SetSavePath(char* p_savePath)
|
void LegoGameState::SetSavePath(char* p_savePath)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class LegoGameState {
|
|||||||
inline MxU32 GetUnknown10() { return m_unk10; }
|
inline MxU32 GetUnknown10() { return m_unk10; }
|
||||||
inline void SetUnknown424(undefined4 p_unk424) { m_unk424 = p_unk424; }
|
inline void SetUnknown424(undefined4 p_unk424) { m_unk424 = p_unk424; }
|
||||||
|
|
||||||
|
void SetSomeEnumState(undefined4 p_state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RegisterState(LegoState* p_state);
|
void RegisterState(LegoState* p_state);
|
||||||
MxResult WriteEndOfVariables(LegoStream* p_stream);
|
MxResult WriteEndOfVariables(LegoStream* p_stream);
|
||||||
|
|||||||
@ -63,6 +63,13 @@ void LegoInputManager::Destroy()
|
|||||||
delete m_controlManager;
|
delete m_controlManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1005b960 STUB
|
||||||
|
MxResult LegoInputManager::Create(HWND p_hwnd)
|
||||||
|
{
|
||||||
|
// TODO STUB
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1005c030
|
// OFFSET: LEGO1 0x1005c030
|
||||||
void LegoInputManager::CreateAndAcquireKeyboard(HWND hwnd)
|
void LegoInputManager::CreateAndAcquireKeyboard(HWND hwnd)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,6 +35,7 @@ class LegoInputManager : public MxPresenter {
|
|||||||
|
|
||||||
virtual MxResult Tickle() override; // vtable+0x8
|
virtual MxResult Tickle() override; // vtable+0x8
|
||||||
|
|
||||||
|
MxResult Create(HWND p_hwnd);
|
||||||
void Destroy();
|
void Destroy();
|
||||||
void CreateAndAcquireKeyboard(HWND hwnd);
|
void CreateAndAcquireKeyboard(HWND hwnd);
|
||||||
void ReleaseDX();
|
void ReleaseDX();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "legonavcontroller.h"
|
#include "legonavcontroller.h"
|
||||||
|
|
||||||
|
#include "legoinputmanager.h"
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
#include "legoutil.h"
|
#include "legoutil.h"
|
||||||
#include "legovideomanager.h"
|
#include "legovideomanager.h"
|
||||||
@ -106,18 +107,14 @@ LegoNavController::LegoNavController()
|
|||||||
MxTimer* timer = Timer();
|
MxTimer* timer = Timer();
|
||||||
this->m_time = timer->GetTime();
|
this->m_time = timer->GetTime();
|
||||||
|
|
||||||
// TODO: InputManager()
|
InputManager()->Register(this);
|
||||||
// LegoInputManager* inputManager = InputManager();
|
|
||||||
// inputManager->Register(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: InputManager()
|
|
||||||
// OFFSET: LEGO1 0x10054c30
|
// OFFSET: LEGO1 0x10054c30
|
||||||
// LegoNavController::~LegoNavController()
|
LegoNavController::~LegoNavController()
|
||||||
// {
|
{
|
||||||
// LegoInputManager* inputManager = InputManager();
|
InputManager()->UnRegister(this);
|
||||||
// inputManager->UnRegister(this);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10054ca0
|
// OFFSET: LEGO1 0x10054ca0
|
||||||
void LegoNavController::SetControlMax(int p_hMax, int p_vMax)
|
void LegoNavController::SetControlMax(int p_hMax, int p_vMax)
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class LegoNavController : public MxCore {
|
|||||||
);
|
);
|
||||||
|
|
||||||
LegoNavController();
|
LegoNavController();
|
||||||
// virtual ~LegoNavController(); // vtable+0x0
|
virtual ~LegoNavController() override; // vtable+0x0
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10054b80
|
// OFFSET: LEGO1 0x10054b80
|
||||||
inline const char* ClassName() const override // vtable+0xc
|
inline const char* ClassName() const override // vtable+0xc
|
||||||
|
|||||||
@ -31,8 +31,8 @@ MxCore* LegoObjectFactory::Create(const char* p_name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1000fb30 STUB
|
// OFFSET: LEGO1 0x1000fb30
|
||||||
void LegoObjectFactory::Destroy(MxCore* p_object)
|
void LegoObjectFactory::Destroy(MxCore* p_object)
|
||||||
{
|
{
|
||||||
// TODO
|
delete p_object;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,110 @@
|
|||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
|
|
||||||
|
#include "gifmanager.h"
|
||||||
|
#include "legoanimationmanager.h"
|
||||||
|
#include "legobuildingmanager.h"
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
#include "legoinputmanager.h"
|
#include "legoinputmanager.h"
|
||||||
#include "legoobjectfactory.h"
|
#include "legoobjectfactory.h"
|
||||||
|
#include "legoplantmanager.h"
|
||||||
|
#include "legosoundmanager.h"
|
||||||
#include "legoutil.h"
|
#include "legoutil.h"
|
||||||
|
#include "legovideomanager.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
#include "mxautolocker.h"
|
||||||
#include "mxbackgroundaudiomanager.h"
|
#include "mxbackgroundaudiomanager.h"
|
||||||
#include "mxdsfile.h"
|
#include "mxdsfile.h"
|
||||||
|
#include "mxomnicreateflags.h"
|
||||||
|
#include "mxomnicreateparam.h"
|
||||||
|
#include "mxticklemanager.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
|
|
||||||
|
// 0x100f451c
|
||||||
|
MxAtomId* g_copterScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4520
|
||||||
|
MxAtomId* g_dunecarScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4524
|
||||||
|
MxAtomId* g_jetskiScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4528
|
||||||
|
MxAtomId* g_racecarScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f452c
|
||||||
|
MxAtomId* g_carraceScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4530
|
||||||
|
MxAtomId* g_carracerScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4534
|
||||||
|
MxAtomId* g_jetraceScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4538
|
||||||
|
MxAtomId* g_jetracerScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f453c
|
||||||
|
MxAtomId* g_isleScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4540
|
||||||
|
MxAtomId* g_elevbottScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4544
|
||||||
|
MxAtomId* g_infodoorScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4548
|
||||||
|
MxAtomId* g_infomainScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f454c
|
||||||
|
MxAtomId* g_infoscorScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4550
|
||||||
|
MxAtomId* g_regbookScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4554
|
||||||
|
MxAtomId* g_histbookScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4558
|
||||||
|
MxAtomId* g_hospitalScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f455c
|
||||||
|
MxAtomId* g_policeScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4560
|
||||||
|
MxAtomId* g_garageScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4564
|
||||||
|
MxAtomId* g_act2mainScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4568
|
||||||
|
MxAtomId* g_act3Script = NULL;
|
||||||
|
|
||||||
|
// 0x100f456c
|
||||||
|
MxAtomId* g_jukeboxScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4570
|
||||||
|
MxAtomId* g_pz5Script = NULL;
|
||||||
|
|
||||||
|
// 0x100f4574
|
||||||
|
MxAtomId* g_introScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4578
|
||||||
|
MxAtomId* g_testScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f457c
|
||||||
|
MxAtomId* g_jukeboxwScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4580c
|
||||||
|
MxAtomId* g_sndAnimScript = NULL;
|
||||||
|
|
||||||
|
// 0x100f4584
|
||||||
|
MxAtomId* g_creditsScript = NULL;
|
||||||
|
|
||||||
// 0x100f4588
|
// 0x100f4588
|
||||||
MxAtomId* g_nocdSourceName = NULL;
|
MxAtomId* g_nocdSourceName = NULL;
|
||||||
|
|
||||||
// 0x100f456c
|
// 0x100f6718
|
||||||
MxAtomId* g_jukeboxScript = NULL;
|
const char* g_current = "current";
|
||||||
|
|
||||||
// 0x101020e8
|
// 0x101020e8
|
||||||
void (*g_omniUserMessage)(const char*, int);
|
void (*g_omniUserMessage)(const char*, int);
|
||||||
@ -42,6 +134,13 @@ void LegoOmni::RemoveWorld(const MxAtomId& p1, MxLong p2)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1005b0c0 STUB
|
||||||
|
LegoEntity* LegoOmni::FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1005b400 STUB
|
// OFFSET: LEGO1 0x1005b400 STUB
|
||||||
int LegoOmni::GetCurrPathInfo(LegoPathBoundary**, int&)
|
int LegoOmni::GetCurrPathInfo(LegoPathBoundary**, int&)
|
||||||
{
|
{
|
||||||
@ -212,12 +311,29 @@ GifManager* GetGifManager()
|
|||||||
return LegoOmni::GetInstance()->GetGifManager();
|
return LegoOmni::GetInstance()->GetGifManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100158e0
|
||||||
|
MxDSAction& GetCurrentAction()
|
||||||
|
{
|
||||||
|
return LegoOmni::GetInstance()->GetCurrentAction();
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10015900
|
// OFFSET: LEGO1 0x10015900
|
||||||
MxTransitionManager* TransitionManager()
|
MxTransitionManager* TransitionManager()
|
||||||
{
|
{
|
||||||
return LegoOmni::GetInstance()->GetTransitionManager();
|
return LegoOmni::GetInstance()->GetTransitionManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10015910
|
||||||
|
void PlayMusic(MxU32 p_index)
|
||||||
|
{
|
||||||
|
// index is the entityid of the music in jukebox.si
|
||||||
|
MxDSAction action;
|
||||||
|
action.SetAtomId(*g_jukeboxScript);
|
||||||
|
action.SetObjectId(p_index);
|
||||||
|
|
||||||
|
LegoOmni::GetInstance()->GetBackgroundAudioManager()->PlayMusic(action, 5, 4);
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c0280
|
// OFFSET: LEGO1 0x100c0280
|
||||||
MxDSObject* CreateStreamObject(MxDSFile* p_file, MxS16 p_ofs)
|
MxDSObject* CreateStreamObject(MxDSFile* p_file, MxS16 p_ofs)
|
||||||
{
|
{
|
||||||
@ -302,17 +418,84 @@ void LegoOmni::Init()
|
|||||||
m_transitionManager = NULL;
|
m_transitionManager = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10058e70 STUB
|
// OFFSET: LEGO1 0x1001a700 STUB
|
||||||
|
void FUN_1001a700()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10058e70
|
||||||
MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
||||||
{
|
{
|
||||||
MxOmni::Create(p);
|
MxResult result = FAILURE;
|
||||||
|
MxAutoLocker lock(&this->m_criticalsection);
|
||||||
|
|
||||||
|
p.CreateFlags().CreateObjectFactory(FALSE);
|
||||||
|
p.CreateFlags().CreateVideoManager(FALSE);
|
||||||
|
p.CreateFlags().CreateSoundManager(FALSE);
|
||||||
|
p.CreateFlags().CreateTickleManager(FALSE);
|
||||||
|
|
||||||
|
if (!(m_tickleManager = new MxTickleManager()))
|
||||||
|
return FAILURE;
|
||||||
|
|
||||||
|
if (MxOmni::Create(p) != SUCCESS)
|
||||||
|
return FAILURE;
|
||||||
|
|
||||||
m_objectFactory = new LegoObjectFactory();
|
m_objectFactory = new LegoObjectFactory();
|
||||||
m_gameState = new LegoGameState();
|
if (m_objectFactory == NULL)
|
||||||
m_bkgAudioManager = new MxBackgroundAudioManager();
|
return FAILURE;
|
||||||
|
|
||||||
|
if (m_soundManager = new LegoSoundManager()) {
|
||||||
|
if (m_soundManager->Create(10, 0) != SUCCESS) {
|
||||||
|
delete m_soundManager;
|
||||||
|
m_soundManager = NULL;
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_videoManager = new LegoVideoManager()) {
|
||||||
|
if (m_videoManager->Create(p.GetVideoParam(), 100, 0) != SUCCESS) {
|
||||||
|
delete m_videoManager;
|
||||||
|
m_videoManager = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_inputMgr = new LegoInputManager()) {
|
||||||
|
if (m_inputMgr->Create(p.GetWindowHandle()) != SUCCESS) {
|
||||||
|
delete m_inputMgr;
|
||||||
|
m_inputMgr = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: there are a few more classes here
|
||||||
|
m_gifManager = new GifManager();
|
||||||
|
m_plantManager = new LegoPlantManager();
|
||||||
|
m_animationManager = new LegoAnimationManager();
|
||||||
|
m_buildingManager = new LegoBuildingManager();
|
||||||
|
m_gameState = new LegoGameState();
|
||||||
|
// TODO: initialize list at m_unk78
|
||||||
|
|
||||||
|
if (m_unk6c && m_gifManager && m_unk78 && m_plantManager && m_animationManager && m_buildingManager) {
|
||||||
|
// TODO: initialize a bunch of MxVariables
|
||||||
|
RegisterScripts();
|
||||||
|
FUN_1001a700();
|
||||||
|
// todo: another function call. in legoomni maybe?
|
||||||
|
m_bkgAudioManager = new MxBackgroundAudioManager();
|
||||||
|
if (m_bkgAudioManager != NULL) {
|
||||||
|
m_transitionManager = new MxTransitionManager();
|
||||||
|
if (m_transitionManager != NULL) {
|
||||||
|
if (m_transitionManager->GetDDrawSurfaceFromVideoManager() == SUCCESS) {
|
||||||
|
m_notificationManager->Register(this);
|
||||||
|
SetAppCursor(1);
|
||||||
|
m_gameState->SetSomeEnumState(0);
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10058c30 STUB
|
// OFFSET: LEGO1 0x10058c30 STUB
|
||||||
void LegoOmni::Destroy()
|
void LegoOmni::Destroy()
|
||||||
@ -337,18 +520,33 @@ MxResult LegoOmni::DeleteObject(MxDSAction& ds)
|
|||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1005b3c0 STUB
|
// OFFSET: LEGO1 0x1005b3c0
|
||||||
MxBool LegoOmni::DoesEntityExist(MxDSAction& ds)
|
MxBool LegoOmni::DoesEntityExist(MxDSAction& ds)
|
||||||
{
|
{
|
||||||
// TODO
|
if (MxOmni::DoesEntityExist(ds)) {
|
||||||
|
if (FindByEntityIdOrAtomId(ds.GetAtomId(), ds.GetObjectId()) == NULL) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1005b2f0 STUB
|
// OFFSET: LEGO1 0x1005b2f0
|
||||||
int LegoOmni::Vtable0x30(char*, int, MxCore*)
|
MxEntity* LegoOmni::FindWorld(const char* p_id, MxS32 p_entityId, MxCore* p_presenter)
|
||||||
{
|
{
|
||||||
// TODO
|
LegoWorld* foundEntity = NULL;
|
||||||
return 0;
|
if (strcmpi(p_id, g_current)) {
|
||||||
|
foundEntity = (LegoWorld*) FindByEntityIdOrAtomId(MxAtomId(p_id, LookupMode_LowerCase2), p_entityId);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
foundEntity = this->m_currentWorld;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (foundEntity != NULL) {
|
||||||
|
foundEntity->VTable0x58(p_presenter);
|
||||||
|
}
|
||||||
|
|
||||||
|
return foundEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1005b3a0
|
// OFFSET: LEGO1 0x1005b3a0
|
||||||
@ -371,3 +569,99 @@ void LegoOmni::StopTimer()
|
|||||||
MxOmni::StopTimer();
|
MxOmni::StopTimer();
|
||||||
SetAppCursor(0);
|
SetAppCursor(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100528e0
|
||||||
|
void RegisterScripts()
|
||||||
|
{
|
||||||
|
g_copterScript = new MxAtomId("\\lego\\scripts\\build\\copter", LookupMode_LowerCase2);
|
||||||
|
g_dunecarScript = new MxAtomId("\\lego\\scripts\\build\\dunecar", LookupMode_LowerCase2);
|
||||||
|
g_jetskiScript = new MxAtomId("\\lego\\scripts\\build\\jetski", LookupMode_LowerCase2);
|
||||||
|
g_racecarScript = new MxAtomId("\\lego\\scripts\\build\\racecar", LookupMode_LowerCase2);
|
||||||
|
g_carraceScript = new MxAtomId("\\lego\\scripts\\race\\carrace", LookupMode_LowerCase2);
|
||||||
|
g_carracerScript = new MxAtomId("\\lego\\scripts\\race\\carracer", LookupMode_LowerCase2);
|
||||||
|
g_jetraceScript = new MxAtomId("\\lego\\scripts\\race\\jetrace", LookupMode_LowerCase2);
|
||||||
|
g_jetracerScript = new MxAtomId("\\lego\\scripts\\race\\jetracer", LookupMode_LowerCase2);
|
||||||
|
g_isleScript = new MxAtomId("\\lego\\scripts\\isle\\isle", LookupMode_LowerCase2);
|
||||||
|
g_elevbottScript = new MxAtomId("\\lego\\scripts\\infocntr\\elevbott", LookupMode_LowerCase2);
|
||||||
|
g_infodoorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infodoor", LookupMode_LowerCase2);
|
||||||
|
g_infomainScript = new MxAtomId("\\lego\\scripts\\infocntr\\infomain", LookupMode_LowerCase2);
|
||||||
|
g_infoscorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infoscor", LookupMode_LowerCase2);
|
||||||
|
g_regbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\regbook", LookupMode_LowerCase2);
|
||||||
|
g_histbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\histbook", LookupMode_LowerCase2);
|
||||||
|
g_hospitalScript = new MxAtomId("\\lego\\scripts\\hospital\\hospital", LookupMode_LowerCase2);
|
||||||
|
g_policeScript = new MxAtomId("\\lego\\scripts\\police\\police", LookupMode_LowerCase2);
|
||||||
|
g_garageScript = new MxAtomId("\\lego\\scripts\\garage\\garage", LookupMode_LowerCase2);
|
||||||
|
g_act2mainScript = new MxAtomId("\\lego\\scripts\\act2\\act2main", LookupMode_LowerCase2);
|
||||||
|
g_act3Script = new MxAtomId("\\lego\\scripts\\act3\\act3", LookupMode_LowerCase2);
|
||||||
|
g_jukeboxScript = new MxAtomId("\\lego\\scripts\\isle\\jukebox", LookupMode_LowerCase2);
|
||||||
|
g_pz5Script = new MxAtomId("\\lego\\scripts\\isle\\pz5", LookupMode_LowerCase2);
|
||||||
|
g_introScript = new MxAtomId("\\lego\\scripts\\intro", LookupMode_LowerCase2);
|
||||||
|
g_testScript = new MxAtomId("\\lego\\scripts\\test\\test", LookupMode_LowerCase2);
|
||||||
|
g_jukeboxwScript = new MxAtomId("\\lego\\scripts\\isle\\jukeboxw", LookupMode_LowerCase2);
|
||||||
|
g_sndAnimScript = new MxAtomId("\\lego\\scripts\\sndanim", LookupMode_LowerCase2);
|
||||||
|
g_creditsScript = new MxAtomId("\\lego\\scripts\\credits", LookupMode_LowerCase2);
|
||||||
|
g_nocdSourceName = new MxAtomId("\\lego\\scripts\\nocd", LookupMode_LowerCase2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100530c0
|
||||||
|
void UnregisterScripts()
|
||||||
|
{
|
||||||
|
delete g_copterScript;
|
||||||
|
delete g_dunecarScript;
|
||||||
|
delete g_jetskiScript;
|
||||||
|
delete g_racecarScript;
|
||||||
|
delete g_carraceScript;
|
||||||
|
delete g_carracerScript;
|
||||||
|
delete g_jetraceScript;
|
||||||
|
delete g_jetracerScript;
|
||||||
|
delete g_isleScript;
|
||||||
|
delete g_elevbottScript;
|
||||||
|
delete g_infodoorScript;
|
||||||
|
delete g_infomainScript;
|
||||||
|
delete g_infoscorScript;
|
||||||
|
delete g_regbookScript;
|
||||||
|
delete g_histbookScript;
|
||||||
|
delete g_hospitalScript;
|
||||||
|
delete g_policeScript;
|
||||||
|
delete g_garageScript;
|
||||||
|
delete g_act2mainScript;
|
||||||
|
delete g_act3Script;
|
||||||
|
delete g_jukeboxScript;
|
||||||
|
delete g_pz5Script;
|
||||||
|
delete g_introScript;
|
||||||
|
delete g_testScript;
|
||||||
|
delete g_jukeboxwScript;
|
||||||
|
delete g_sndAnimScript;
|
||||||
|
delete g_creditsScript;
|
||||||
|
delete g_nocdSourceName;
|
||||||
|
|
||||||
|
g_copterScript = NULL;
|
||||||
|
g_dunecarScript = NULL;
|
||||||
|
g_jetskiScript = NULL;
|
||||||
|
g_racecarScript = NULL;
|
||||||
|
g_carraceScript = NULL;
|
||||||
|
g_carracerScript = NULL;
|
||||||
|
g_jetraceScript = NULL;
|
||||||
|
g_jetracerScript = NULL;
|
||||||
|
g_isleScript = NULL;
|
||||||
|
g_elevbottScript = NULL;
|
||||||
|
g_infodoorScript = NULL;
|
||||||
|
g_infomainScript = NULL;
|
||||||
|
g_infoscorScript = NULL;
|
||||||
|
g_regbookScript = NULL;
|
||||||
|
g_histbookScript = NULL;
|
||||||
|
g_hospitalScript = NULL;
|
||||||
|
g_policeScript = NULL;
|
||||||
|
g_garageScript = NULL;
|
||||||
|
g_act2mainScript = NULL;
|
||||||
|
g_act3Script = NULL;
|
||||||
|
g_jukeboxScript = NULL;
|
||||||
|
g_pz5Script = NULL;
|
||||||
|
g_introScript = NULL;
|
||||||
|
g_testScript = NULL;
|
||||||
|
g_testScript = NULL;
|
||||||
|
g_jukeboxwScript = NULL;
|
||||||
|
g_sndAnimScript = NULL;
|
||||||
|
g_creditsScript = NULL;
|
||||||
|
g_nocdSourceName = NULL;
|
||||||
|
}
|
||||||
|
|||||||
@ -26,6 +26,35 @@ class MxBackgroundAudioManager;
|
|||||||
class MxDSFile;
|
class MxDSFile;
|
||||||
class MxTransitionManager;
|
class MxTransitionManager;
|
||||||
|
|
||||||
|
extern MxAtomId* g_copterScript;
|
||||||
|
extern MxAtomId* g_dunecarScript;
|
||||||
|
extern MxAtomId* g_jetskiScript;
|
||||||
|
extern MxAtomId* g_racecarScript;
|
||||||
|
extern MxAtomId* g_carraceScript;
|
||||||
|
extern MxAtomId* g_carracerScript;
|
||||||
|
extern MxAtomId* g_jetraceScript;
|
||||||
|
extern MxAtomId* g_jetracerScript;
|
||||||
|
extern MxAtomId* g_isleScript;
|
||||||
|
extern MxAtomId* g_elevbottScript;
|
||||||
|
extern MxAtomId* g_infodoorScript;
|
||||||
|
extern MxAtomId* g_infomainScript;
|
||||||
|
extern MxAtomId* g_infoscorScript;
|
||||||
|
extern MxAtomId* g_regbookScript;
|
||||||
|
extern MxAtomId* g_histbookScript;
|
||||||
|
extern MxAtomId* g_hospitalScript;
|
||||||
|
extern MxAtomId* g_policeScript;
|
||||||
|
extern MxAtomId* g_garageScript;
|
||||||
|
extern MxAtomId* g_act2mainScript;
|
||||||
|
extern MxAtomId* g_act3Script;
|
||||||
|
extern MxAtomId* g_jukeboxScript;
|
||||||
|
extern MxAtomId* g_pz5Script;
|
||||||
|
extern MxAtomId* g_introScript;
|
||||||
|
extern MxAtomId* g_testScript;
|
||||||
|
extern MxAtomId* g_jukeboxwScript;
|
||||||
|
extern MxAtomId* g_sndAnimScript;
|
||||||
|
extern MxAtomId* g_creditsScript;
|
||||||
|
extern MxAtomId* g_nocdSourceName;
|
||||||
|
|
||||||
// VTABLE 0x100d8638
|
// VTABLE 0x100d8638
|
||||||
// SIZE: 0x140
|
// SIZE: 0x140
|
||||||
class LegoOmni : public MxOmni {
|
class LegoOmni : public MxOmni {
|
||||||
@ -60,11 +89,13 @@ class LegoOmni : public MxOmni {
|
|||||||
virtual MxResult Start(MxDSAction* action) override; // vtable+20
|
virtual MxResult Start(MxDSAction* action) override; // vtable+20
|
||||||
virtual MxResult DeleteObject(MxDSAction& ds) override; // vtable+24
|
virtual MxResult DeleteObject(MxDSAction& ds) override; // vtable+24
|
||||||
virtual MxBool DoesEntityExist(MxDSAction& ds) override; // vtable+28
|
virtual MxBool DoesEntityExist(MxDSAction& ds) override; // vtable+28
|
||||||
virtual int Vtable0x30(char*, int, MxCore*) override; // vtable+30
|
virtual MxEntity* FindWorld(const char* p_id, MxS32 p_entityId, MxCore* p_presenter) override; // vtable+30
|
||||||
virtual void NotifyCurrentEntity(MxNotificationParam* p_param) override; // vtable+34
|
virtual void NotifyCurrentEntity(MxNotificationParam* p_param) override; // vtable+34
|
||||||
virtual void StartTimer() override; // vtable+38
|
virtual void StartTimer() override; // vtable+38
|
||||||
virtual void StopTimer() override; // vtable+3c
|
virtual void StopTimer() override; // vtable+3c
|
||||||
|
|
||||||
|
LegoEntity* FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||||
|
|
||||||
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
|
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
|
||||||
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
||||||
|
|
||||||
@ -79,6 +110,7 @@ class LegoOmni : public MxOmni {
|
|||||||
LegoGameState* GetGameState() { return m_gameState; }
|
LegoGameState* GetGameState() { return m_gameState; }
|
||||||
MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; }
|
MxBackgroundAudioManager* GetBackgroundAudioManager() { return m_bkgAudioManager; }
|
||||||
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
|
MxTransitionManager* GetTransitionManager() { return m_transitionManager; }
|
||||||
|
MxDSAction& GetCurrentAction() { return m_action; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
undefined4 m_unk68;
|
undefined4 m_unk68;
|
||||||
@ -124,5 +156,9 @@ LegoPlantManager* PlantManager();
|
|||||||
MxBool KeyValueStringParse(char*, const char*, const char*);
|
MxBool KeyValueStringParse(char*, const char*, const char*);
|
||||||
LegoWorld* GetCurrentWorld();
|
LegoWorld* GetCurrentWorld();
|
||||||
GifManager* GetGifManager();
|
GifManager* GetGifManager();
|
||||||
|
MxDSAction& GetCurrentAction();
|
||||||
|
|
||||||
|
void RegisterScripts();
|
||||||
|
void UnregisterScripts();
|
||||||
|
|
||||||
#endif // LEGOOMNI_H
|
#endif // LEGOOMNI_H
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
#include "mxbackgroundaudiomanager.h"
|
#include "mxbackgroundaudiomanager.h"
|
||||||
|
|
||||||
|
#include "legoomni.h"
|
||||||
|
#include "mxcompositepresenter.h"
|
||||||
|
#include "mxdssound.h"
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
|
#include "mxpresenter.h"
|
||||||
#include "mxstreamer.h"
|
#include "mxstreamer.h"
|
||||||
#include "mxticklemanager.h"
|
#include "mxticklemanager.h"
|
||||||
|
|
||||||
@ -14,7 +18,7 @@ MxBackgroundAudioManager::MxBackgroundAudioManager()
|
|||||||
m_unk138 = 0;
|
m_unk138 = 0;
|
||||||
m_unk13c = 0;
|
m_unk13c = 0;
|
||||||
m_unk140 = 0;
|
m_unk140 = 0;
|
||||||
m_unk144 = 0;
|
m_targetVolume = 0;
|
||||||
m_unk148 = 0;
|
m_unk148 = 0;
|
||||||
m_musicEnabled = FALSE;
|
m_musicEnabled = FALSE;
|
||||||
}
|
}
|
||||||
@ -47,6 +51,32 @@ void MxBackgroundAudioManager::Stop()
|
|||||||
m_unk13c = 0;
|
m_unk13c = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007f570
|
||||||
|
void MxBackgroundAudioManager::LowerVolume()
|
||||||
|
{
|
||||||
|
if (m_unk148 == 0) {
|
||||||
|
if (m_unk13c == 0) {
|
||||||
|
m_unk13c = 2;
|
||||||
|
}
|
||||||
|
m_unk140 = 20;
|
||||||
|
}
|
||||||
|
m_unk148++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007f5b0
|
||||||
|
void MxBackgroundAudioManager::RaiseVolume()
|
||||||
|
{
|
||||||
|
if (m_unk148 != 0) {
|
||||||
|
m_unk148--;
|
||||||
|
if (m_unk148 == 0) {
|
||||||
|
if (m_unk13c == 0) {
|
||||||
|
m_unk13c = 2;
|
||||||
|
}
|
||||||
|
m_unk140 = 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1007f5f0
|
// OFFSET: LEGO1 0x1007f5f0
|
||||||
void MxBackgroundAudioManager::Enable(MxBool p)
|
void MxBackgroundAudioManager::Enable(MxBool p)
|
||||||
{
|
{
|
||||||
@ -106,3 +136,191 @@ void MxBackgroundAudioManager::DestroyMusic()
|
|||||||
m_musicEnabled = FALSE;
|
m_musicEnabled = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007f170
|
||||||
|
MxLong MxBackgroundAudioManager::Notify(MxParam& p)
|
||||||
|
{
|
||||||
|
switch (((MxNotificationParam&) p).GetNotification()) {
|
||||||
|
case c_notificationStartAction:
|
||||||
|
StartAction(p);
|
||||||
|
return 1;
|
||||||
|
case c_notificationEndAction:
|
||||||
|
StopAction(p);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007f1b0
|
||||||
|
void MxBackgroundAudioManager::StartAction(MxParam& p)
|
||||||
|
{
|
||||||
|
// TODO: the sender is most likely a MxAudioPresenter?
|
||||||
|
m_unk138 = (MxAudioPresenter*) ((MxNotificationParam&) p).GetSender();
|
||||||
|
m_action2.SetAtomId(m_unk138->GetAction()->GetAtomId());
|
||||||
|
m_action2.SetObjectId(m_unk138->GetAction()->GetObjectId());
|
||||||
|
m_targetVolume = ((MxDSSound*) (m_unk138->GetAction()))->GetVolume();
|
||||||
|
m_unk138->vtable60(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007f200
|
||||||
|
void MxBackgroundAudioManager::StopAction(MxParam& p)
|
||||||
|
{
|
||||||
|
if (((MxNotificationParam&) p).GetSender() == m_unka0) {
|
||||||
|
m_unka0 = NULL;
|
||||||
|
m_action1.SetAtomId(MxAtomId());
|
||||||
|
m_action1.SetObjectId(-1);
|
||||||
|
}
|
||||||
|
else if (((MxNotificationParam&) p).GetSender() == m_unk138) {
|
||||||
|
m_unk138 = NULL;
|
||||||
|
m_action2.SetAtomId(MxAtomId());
|
||||||
|
m_action2.SetObjectId(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Lego()->HandleNotificationType2(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007f2f0
|
||||||
|
MxResult MxBackgroundAudioManager::PlayMusic(MxDSAction& p_action, undefined4 p_unknown, undefined4 p_unknown2)
|
||||||
|
{
|
||||||
|
if (!m_musicEnabled) {
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
if (m_action2.GetObjectId() == -1 && m_action1.GetObjectId() != p_action.GetObjectId()) {
|
||||||
|
MxDSAction action;
|
||||||
|
action.SetAtomId(GetCurrentAction().GetAtomId());
|
||||||
|
action.SetObjectId(GetCurrentAction().GetObjectId());
|
||||||
|
action.SetUnknown24(GetCurrentAction().GetUnknown24());
|
||||||
|
|
||||||
|
m_action2.SetAtomId(p_action.GetAtomId());
|
||||||
|
m_action2.SetObjectId(p_action.GetObjectId());
|
||||||
|
m_action2.SetUnknown84(this);
|
||||||
|
m_action2.SetUnknown8c(this);
|
||||||
|
|
||||||
|
MxResult result = Start(&m_action2);
|
||||||
|
|
||||||
|
GetCurrentAction().SetAtomId(action.GetAtomId());
|
||||||
|
GetCurrentAction().SetObjectId(action.GetObjectId());
|
||||||
|
GetCurrentAction().SetUnknown24(action.GetUnknown24());
|
||||||
|
|
||||||
|
if (result == SUCCESS) {
|
||||||
|
m_unk13c = p_unknown2;
|
||||||
|
m_unk140 = p_unknown;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007ee40
|
||||||
|
MxResult MxBackgroundAudioManager::Tickle()
|
||||||
|
{
|
||||||
|
switch (m_unk13c) {
|
||||||
|
case MxPresenter::TickleState_Starting:
|
||||||
|
FadeInOrFadeOut();
|
||||||
|
return SUCCESS;
|
||||||
|
case MxPresenter::TickleState_Streaming:
|
||||||
|
FUN_1007ee70();
|
||||||
|
return SUCCESS;
|
||||||
|
case MxPresenter::TickleState_Repeating:
|
||||||
|
FUN_1007ef40();
|
||||||
|
return SUCCESS;
|
||||||
|
default:
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007ee70
|
||||||
|
void MxBackgroundAudioManager::FUN_1007ee70()
|
||||||
|
{
|
||||||
|
if (m_unka0 && m_unka0->GetAction()) {
|
||||||
|
DeleteObject(*m_unk138->GetAction());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk138) {
|
||||||
|
m_unka0 = m_unk138;
|
||||||
|
m_action1 = m_action2;
|
||||||
|
m_unk138 = NULL;
|
||||||
|
m_action2.SetObjectId(-1);
|
||||||
|
m_action2.SetAtomId(MxAtomId());
|
||||||
|
m_unk13c = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007ef40
|
||||||
|
void MxBackgroundAudioManager::FUN_1007ef40()
|
||||||
|
{
|
||||||
|
MxU32 compare;
|
||||||
|
MxU32 volume;
|
||||||
|
if (m_unka0 == NULL) {
|
||||||
|
if (m_unk138) {
|
||||||
|
compare = 30;
|
||||||
|
if (m_unk148 == 0) {
|
||||||
|
compare = m_unk148;
|
||||||
|
}
|
||||||
|
volume = m_unk138->vtable5c();
|
||||||
|
if (volume < compare) {
|
||||||
|
if (m_unk140 + m_unk138->vtable5c() <= compare) {
|
||||||
|
compare = m_unk140 + compare;
|
||||||
|
}
|
||||||
|
m_unk138->vtable60(compare);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_unk138->vtable60(compare);
|
||||||
|
m_unka0 = m_unk138;
|
||||||
|
m_action1 = m_action2;
|
||||||
|
m_unk138 = NULL;
|
||||||
|
m_action2.SetObjectId(-1);
|
||||||
|
m_action2.SetAtomId(MxAtomId());
|
||||||
|
m_unk13c = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (m_unka0->GetAction() != NULL) {
|
||||||
|
if (m_unka0->vtable5c() == 0) {
|
||||||
|
DeleteObject(*m_unka0->GetAction());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
compare = m_unka0->vtable5c();
|
||||||
|
volume = 0;
|
||||||
|
if (compare != m_unk140 && -1 < compare - m_unk140) {
|
||||||
|
volume = m_unka0->vtable5c() - m_unk140;
|
||||||
|
}
|
||||||
|
m_unk138->vtable60(volume);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1007f0e0
|
||||||
|
void MxBackgroundAudioManager::FadeInOrFadeOut()
|
||||||
|
{
|
||||||
|
// This function probably is the fade in/out routine
|
||||||
|
if (m_unka0 != NULL) {
|
||||||
|
undefined4 volume = m_unka0->vtable5c();
|
||||||
|
MxU32 compare = 30;
|
||||||
|
if (m_unk148 == 0) {
|
||||||
|
compare = m_targetVolume;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (volume < compare) {
|
||||||
|
volume = m_unk140 + volume;
|
||||||
|
if (compare <= volume) {
|
||||||
|
volume = compare;
|
||||||
|
}
|
||||||
|
m_unka0->vtable60(volume);
|
||||||
|
}
|
||||||
|
else if (compare < volume) {
|
||||||
|
volume = volume - m_unk140;
|
||||||
|
if (volume <= compare) {
|
||||||
|
volume = compare;
|
||||||
|
}
|
||||||
|
m_unka0->vtable60(volume);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_unka0->vtable60(volume);
|
||||||
|
m_unk13c = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_unk13c = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
#ifndef MXBACKGROUNDAUDIOMANAGER_H
|
#ifndef MXBACKGROUNDAUDIOMANAGER_H
|
||||||
#define MXBACKGROUNDAUDIOMANAGER_H
|
#define MXBACKGROUNDAUDIOMANAGER_H
|
||||||
|
|
||||||
|
#include "mxaudiopresenter.h"
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
#include "mxdsaction.h"
|
#include "mxdsaction.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
|
#include "mxpresenter.h"
|
||||||
#include "mxtypes.h"
|
#include "mxtypes.h"
|
||||||
|
|
||||||
// VTABLE 0x100d9fe8
|
// VTABLE 0x100d9fe8
|
||||||
@ -13,6 +15,9 @@ class MxBackgroundAudioManager : public MxCore {
|
|||||||
MxBackgroundAudioManager();
|
MxBackgroundAudioManager();
|
||||||
virtual ~MxBackgroundAudioManager() override;
|
virtual ~MxBackgroundAudioManager() override;
|
||||||
|
|
||||||
|
virtual MxLong Notify(MxParam& p) override; // vtable+0x04
|
||||||
|
virtual MxResult Tickle() override; // vtable+0x08
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1007eb70
|
// OFFSET: LEGO1 0x1007eb70
|
||||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||||
{
|
{
|
||||||
@ -26,10 +31,20 @@ class MxBackgroundAudioManager : public MxCore {
|
|||||||
return !strcmp(name, MxBackgroundAudioManager::ClassName()) || MxCore::IsA(name);
|
return !strcmp(name, MxBackgroundAudioManager::ClassName()) || MxCore::IsA(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StartAction(MxParam& p);
|
||||||
|
void StopAction(MxParam& p);
|
||||||
|
MxResult PlayMusic(MxDSAction& p_action, undefined4 p_unknown, undefined4 p_unknown2);
|
||||||
|
|
||||||
|
void FUN_1007ee70();
|
||||||
|
void FUN_1007ef40();
|
||||||
|
void FadeInOrFadeOut();
|
||||||
|
|
||||||
__declspec(dllexport) void Enable(unsigned char p);
|
__declspec(dllexport) void Enable(unsigned char p);
|
||||||
virtual MxResult Create(MxAtomId& p_script, MxU32 p_frequencyMS);
|
virtual MxResult Create(MxAtomId& p_script, MxU32 p_frequencyMS);
|
||||||
|
|
||||||
void Stop();
|
void Stop();
|
||||||
|
void LowerVolume();
|
||||||
|
void RaiseVolume();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
@ -38,12 +53,12 @@ class MxBackgroundAudioManager : public MxCore {
|
|||||||
|
|
||||||
MxBool m_musicEnabled; // 0x8
|
MxBool m_musicEnabled; // 0x8
|
||||||
MxDSAction m_action1; // 0xc
|
MxDSAction m_action1; // 0xc
|
||||||
MxS32 m_unka0;
|
MxAudioPresenter* m_unka0;
|
||||||
MxDSAction m_action2; // 0xa4
|
MxDSAction m_action2; // 0xa4
|
||||||
MxS32 m_unk138;
|
MxAudioPresenter* m_unk138;
|
||||||
MxS32 m_unk13c;
|
MxS32 m_unk13c;
|
||||||
MxS32 m_unk140;
|
MxS32 m_unk140;
|
||||||
MxS32 m_unk144;
|
MxS32 m_targetVolume;
|
||||||
MxS16 m_unk148;
|
MxS16 m_unk148;
|
||||||
MxAtomId m_script;
|
MxAtomId m_script;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -30,7 +30,7 @@ void MxCompositePresenter::VTable0x5c()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b6b40 STUB
|
// OFFSET: LEGO1 0x100b6b40 STUB
|
||||||
void MxCompositePresenter::VTable0x60()
|
void MxCompositePresenter::VTable0x60(undefined4 p_unknown)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class MxCompositePresenter : public MxPresenter {
|
|||||||
|
|
||||||
virtual void VTable0x58();
|
virtual void VTable0x58();
|
||||||
virtual void VTable0x5c();
|
virtual void VTable0x5c();
|
||||||
virtual void VTable0x60();
|
virtual void VTable0x60(undefined4 p_unknown);
|
||||||
virtual void VTable0x64();
|
virtual void VTable0x64();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class MxCore {
|
|||||||
public:
|
public:
|
||||||
__declspec(dllexport) MxCore();
|
__declspec(dllexport) MxCore();
|
||||||
__declspec(dllexport) virtual ~MxCore(); // vtable+00
|
__declspec(dllexport) virtual ~MxCore(); // vtable+00
|
||||||
__declspec(dllexport) virtual MxResult Notify(MxParam& p); // vtable+04
|
__declspec(dllexport) virtual MxLong Notify(MxParam& p); // vtable+04
|
||||||
virtual MxResult Tickle(); // vtable+08
|
virtual MxResult Tickle(); // vtable+08
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100144c0
|
// OFFSET: LEGO1 0x100144c0
|
||||||
|
|||||||
@ -81,7 +81,7 @@ MxResult MxDiskStreamProvider::WaitForWorkToComplete()
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100d1760 STUB
|
// OFFSET: LEGO1 0x100d18f0 STUB
|
||||||
void MxDiskStreamProvider::PerformWork()
|
void MxDiskStreamProvider::PerformWork()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@ -28,7 +28,7 @@ MxDSAction::MxDSAction()
|
|||||||
this->m_up.Fill(FLT_MAX);
|
this->m_up.Fill(FLT_MAX);
|
||||||
this->m_unk84 = NULL;
|
this->m_unk84 = NULL;
|
||||||
this->m_unk88 = 0;
|
this->m_unk88 = 0;
|
||||||
this->m_omni = NULL;
|
this->m_unk8c = NULL;
|
||||||
this->m_unkTimingField = INT_MIN;
|
this->m_unkTimingField = INT_MIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ void MxDSAction::CopyFrom(MxDSAction& p_dsAction)
|
|||||||
AppendData(p_dsAction.m_extraLength, p_dsAction.m_extraData);
|
AppendData(p_dsAction.m_extraLength, p_dsAction.m_extraData);
|
||||||
this->m_unk84 = p_dsAction.m_unk84;
|
this->m_unk84 = p_dsAction.m_unk84;
|
||||||
this->m_unk88 = p_dsAction.m_unk88;
|
this->m_unk88 = p_dsAction.m_unk88;
|
||||||
this->m_omni = p_dsAction.m_omni;
|
this->m_unk8c = p_dsAction.m_unk8c;
|
||||||
this->m_unkTimingField = p_dsAction.m_unkTimingField;
|
this->m_unkTimingField = p_dsAction.m_unkTimingField;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class MxDSAction : public MxDSObject {
|
|||||||
inline void SetLoopCount(MxS32 p_loopCount) { m_loopCount = p_loopCount; }
|
inline void SetLoopCount(MxS32 p_loopCount) { m_loopCount = p_loopCount; }
|
||||||
inline const MxVector3Data& GetLocation() const { return m_location; }
|
inline const MxVector3Data& GetLocation() const { return m_location; }
|
||||||
inline void SetUnknown84(MxCore* p_unk84) { m_unk84 = p_unk84; }
|
inline void SetUnknown84(MxCore* p_unk84) { m_unk84 = p_unk84; }
|
||||||
inline void SetOmni(MxOmni* p_omni) { m_omni = p_omni; }
|
inline void SetUnknown8c(MxCore* p_unk8c) { m_unk8c = p_unk8c; }
|
||||||
|
|
||||||
inline MxBool IsLooping() const { return m_flags & Flag_Looping; }
|
inline MxBool IsLooping() const { return m_flags & Flag_Looping; }
|
||||||
inline MxBool IsBit3() const { return m_flags & Flag_Bit3; }
|
inline MxBool IsBit3() const { return m_flags & Flag_Bit3; }
|
||||||
@ -85,7 +85,7 @@ class MxDSAction : public MxDSObject {
|
|||||||
MxU16 m_extraLength;
|
MxU16 m_extraLength;
|
||||||
MxCore* m_unk84;
|
MxCore* m_unk84;
|
||||||
undefined4 m_unk88;
|
undefined4 m_unk88;
|
||||||
MxOmni* m_omni; // 0x8c
|
MxCore* m_unk8c;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MxLong m_unkTimingField; // 0x90
|
MxLong m_unkTimingField; // 0x90
|
||||||
|
|||||||
@ -30,6 +30,8 @@ class MxDSSound : public MxDSMediaAction {
|
|||||||
virtual void Deserialize(char** p_source, MxS16 p_unk24) override; // vtable+1c;
|
virtual void Deserialize(char** p_source, MxS16 p_unk24) override; // vtable+1c;
|
||||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||||
|
|
||||||
|
inline MxS32 GetVolume() const { return m_volume; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxU32 m_sizeOnDisk;
|
MxU32 m_sizeOnDisk;
|
||||||
MxS32 m_volume; // 0xbc
|
MxS32 m_volume; // 0xbc
|
||||||
|
|||||||
@ -24,11 +24,22 @@ void MxEventPresenter::Init()
|
|||||||
m_unk50 = NULL;
|
m_unk50 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c2db0
|
||||||
|
MxResult MxEventPresenter::AddToManager()
|
||||||
|
{
|
||||||
|
MxResult ret = FAILURE;
|
||||||
|
if (EventManager()) {
|
||||||
|
ret = SUCCESS;
|
||||||
|
EventManager()->AddPresenter(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c2de0
|
// OFFSET: LEGO1 0x100c2de0
|
||||||
void MxEventPresenter::Destroy()
|
void MxEventPresenter::Destroy()
|
||||||
{
|
{
|
||||||
MxEventManager* eventManager = EventManager();
|
if (EventManager())
|
||||||
if (eventManager)
|
|
||||||
EventManager()->RemovePresenter(*this);
|
EventManager()->RemovePresenter(*this);
|
||||||
|
|
||||||
m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
|
|||||||
@ -24,6 +24,7 @@ class MxEventPresenter : public MxMediaPresenter {
|
|||||||
return !strcmp(name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(name);
|
return !strcmp(name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual MxResult AddToManager() override; // vtable+0x34
|
||||||
virtual void Destroy() override; // vtable+0x38
|
virtual void Destroy() override; // vtable+0x38
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -4,6 +4,34 @@
|
|||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
|
||||||
// VTABLE 0x100dc9a0
|
// VTABLE 0x100dc9a0
|
||||||
class MxNextActionDataStart : public MxCore {};
|
// SIZE 0x14
|
||||||
|
class MxNextActionDataStart : public MxCore {
|
||||||
|
public:
|
||||||
|
// inlined constructor at 0x100c1847
|
||||||
|
inline MxNextActionDataStart(MxU32 p_objectId, MxS16 p_unk24val, MxU32 p_data)
|
||||||
|
{
|
||||||
|
m_objectId = p_objectId;
|
||||||
|
m_unk24val = p_unk24val;
|
||||||
|
m_data = p_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c1900
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0xc
|
||||||
|
{
|
||||||
|
// 0x101025a0
|
||||||
|
return "MxNextActionDataStart";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c1910
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, MxNextActionDataStart::ClassName()) || MxCore::IsA(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
MxU32 m_objectId;
|
||||||
|
MxS16 m_unk24val;
|
||||||
|
MxU32 m_data;
|
||||||
|
};
|
||||||
|
|
||||||
#endif // MXNEXTACTIONDATASTART_H
|
#endif // MXNEXTACTIONDATASTART_H
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class MxCore;
|
|||||||
|
|
||||||
enum MxParamType {
|
enum MxParamType {
|
||||||
PARAM_NONE = 0,
|
PARAM_NONE = 0,
|
||||||
PAINT = 1, // 100dc210:100d8350
|
c_notificationStartAction = 1, // 100dc210:100d8350
|
||||||
c_notificationEndAction = 2, // 100d8358:100d8350
|
c_notificationEndAction = 2, // 100d8358:100d8350
|
||||||
TYPE4 = 4, // 100dc208:100d8350
|
TYPE4 = 4, // 100dc208:100d8350
|
||||||
MXPRESENTER_NOTIFICATION = 5,
|
MXPRESENTER_NOTIFICATION = 5,
|
||||||
|
|||||||
@ -91,11 +91,10 @@ void MxOmni::Vtable0x2c()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100aefb0 STUB
|
// OFFSET: LEGO1 0x100aefb0
|
||||||
int MxOmni::Vtable0x30(char*, int, MxCore*)
|
MxEntity* MxOmni::FindWorld(const char*, MxS32, MxCore*)
|
||||||
{
|
{
|
||||||
// TODO
|
return NULL;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100aefc0
|
// OFFSET: LEGO1 0x100aefc0
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class MxTickleManager;
|
|||||||
class MxTimer;
|
class MxTimer;
|
||||||
class MxVariableTable;
|
class MxVariableTable;
|
||||||
class MxVideoManager;
|
class MxVideoManager;
|
||||||
|
class MxEntity;
|
||||||
|
|
||||||
// VTABLE 0x100dc168
|
// VTABLE 0x100dc168
|
||||||
// SIZE 0x68
|
// SIZE 0x68
|
||||||
@ -45,7 +46,7 @@ class MxOmni : public MxCore {
|
|||||||
virtual MxResult DeleteObject(MxDSAction& p_dsAction); // vtable+24
|
virtual MxResult DeleteObject(MxDSAction& p_dsAction); // vtable+24
|
||||||
virtual MxBool DoesEntityExist(MxDSAction& p_dsAction); // vtable+28
|
virtual MxBool DoesEntityExist(MxDSAction& p_dsAction); // vtable+28
|
||||||
virtual void Vtable0x2c(); // vtable+2c
|
virtual void Vtable0x2c(); // vtable+2c
|
||||||
virtual int Vtable0x30(char*, int, MxCore*); // vtable+30
|
virtual MxEntity* FindWorld(const char*, MxS32, MxCore*); // vtable+30
|
||||||
virtual void NotifyCurrentEntity(MxNotificationParam* p_param); // vtable+34
|
virtual void NotifyCurrentEntity(MxNotificationParam* p_param); // vtable+34
|
||||||
virtual void StartTimer(); // vtable+38
|
virtual void StartTimer(); // vtable+38
|
||||||
virtual void StopTimer(); // vtable+3c
|
virtual void StopTimer(); // vtable+3c
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class MxOmniCreateParam : public MxParam {
|
|||||||
MxOmniCreateFlags flags
|
MxOmniCreateFlags flags
|
||||||
);
|
);
|
||||||
|
|
||||||
const MxOmniCreateFlags& CreateFlags() const { return this->m_createFlags; }
|
MxOmniCreateFlags& CreateFlags() { return this->m_createFlags; }
|
||||||
const MxString& GetMediaPath() const { return m_mediaPath; }
|
const MxString& GetMediaPath() const { return m_mediaPath; }
|
||||||
const HWND GetWindowHandle() const { return m_windowHandle; }
|
const HWND GetWindowHandle() const { return m_windowHandle; }
|
||||||
MxVideoParam& GetVideoParam() { return m_videoParam; }
|
MxVideoParam& GetVideoParam() { return m_videoParam; }
|
||||||
|
|||||||
@ -47,7 +47,7 @@ void MxPresenter::ParseExtra()
|
|||||||
|
|
||||||
token = strtok(NULL, g_parseExtraTokens);
|
token = strtok(NULL, g_parseExtraTokens);
|
||||||
MxS32 val = token ? atoi(token) : 0;
|
MxS32 val = token ? atoi(token) : 0;
|
||||||
MxS32 result = MxOmni::GetInstance()->Vtable0x30(t_token, val, this);
|
MxEntity* result = MxOmni::GetInstance()->FindWorld(t_token, val, this);
|
||||||
|
|
||||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Parsed);
|
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Parsed);
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ void MxPresenter::SendTo_unkPresenter(MxOmni* p_omni)
|
|||||||
|
|
||||||
NotificationManager()->Send(m_unkPresenter, &MxNotificationParam(MXPRESENTER_NOTIFICATION, this));
|
NotificationManager()->Send(m_unkPresenter, &MxNotificationParam(MXPRESENTER_NOTIFICATION, this));
|
||||||
|
|
||||||
m_action->SetOmni(p_omni ? p_omni : MxOmni::GetInstance());
|
m_action->SetUnknown8c(p_omni ? p_omni : MxOmni::GetInstance());
|
||||||
m_unkPresenter = NULL;
|
m_unkPresenter = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,19 @@ class MxRAMStreamProvider : public MxStreamProvider {
|
|||||||
MxRAMStreamProvider();
|
MxRAMStreamProvider();
|
||||||
virtual ~MxRAMStreamProvider() override;
|
virtual ~MxRAMStreamProvider() override;
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100d0970
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0xc
|
||||||
|
{
|
||||||
|
// 0x10102864
|
||||||
|
return "MxRAMStreamProvider";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100d0980
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, MxRAMStreamProvider::ClassName()) || MxStreamProvider::IsA(name);
|
||||||
|
}
|
||||||
|
|
||||||
virtual MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14
|
virtual MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14
|
||||||
virtual MxU32 GetFileSize() override; // vtable+0x18
|
virtual MxU32 GetFileSize() override; // vtable+0x18
|
||||||
virtual MxU32 GetStreamBuffersNum() override; // vtable+0x1c
|
virtual MxU32 GetStreamBuffersNum() override; // vtable+0x1c
|
||||||
|
|||||||
@ -13,6 +13,19 @@ class MxSmkPresenter : public MxVideoPresenter {
|
|||||||
MxSmkPresenter();
|
MxSmkPresenter();
|
||||||
virtual ~MxSmkPresenter() override;
|
virtual ~MxSmkPresenter() override;
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b3730
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0xc
|
||||||
|
{
|
||||||
|
// 0x10101e38
|
||||||
|
return "MxSmkPresenter";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b3740
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, MxSmkPresenter::ClassName()) || MxVideoPresenter::IsA(name);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
virtual void VTable0x5c(undefined4 p_unknown1) override;
|
virtual void VTable0x5c(undefined4 p_unknown1) override;
|
||||||
virtual void VTable0x60() override;
|
virtual void VTable0x60() override;
|
||||||
|
|||||||
@ -8,6 +8,19 @@
|
|||||||
// SIZE 0x6c
|
// SIZE 0x6c
|
||||||
class MxStillPresenter : public MxVideoPresenter {
|
class MxStillPresenter : public MxVideoPresenter {
|
||||||
public:
|
public:
|
||||||
|
// OFFSET: LEGO1 0x100435c0
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0xc
|
||||||
|
{
|
||||||
|
// 0x100f0184
|
||||||
|
return "MxStillPresenter";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100435d0
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, MxStillPresenter::ClassName()) || MxVideoPresenter::IsA(name);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void ParseExtra() override; // vtable+0x30
|
virtual void ParseExtra() override; // vtable+0x30
|
||||||
|
|
||||||
MxStillPresenter() { m_unk68 = 0; }
|
MxStillPresenter() { m_unk68 = 0; }
|
||||||
|
|||||||
@ -4,6 +4,19 @@
|
|||||||
#include "mxdschunk.h"
|
#include "mxdschunk.h"
|
||||||
|
|
||||||
// VTABLE 0x100dc2a8
|
// VTABLE 0x100dc2a8
|
||||||
class MxStreamChunk : public MxDSChunk {};
|
class MxStreamChunk : public MxDSChunk {
|
||||||
|
// OFFSET: LEGO1 0x100b1fe0
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0xc
|
||||||
|
{
|
||||||
|
// 0x10101e5c
|
||||||
|
return "MxStreamChunk";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b1ff0
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, MxStreamChunk::ClassName()) || MxDSChunk::IsA(name);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#endif // MXSTREAMCHUNK_H
|
#endif // MXSTREAMCHUNK_H
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
#include "legoomni.h"
|
#include "legoomni.h"
|
||||||
#include "mxautolocker.h"
|
#include "mxautolocker.h"
|
||||||
|
#include "mxnextactiondatastart.h"
|
||||||
|
|
||||||
|
DECOMP_SIZE_ASSERT(MxNextActionDataStart, 0x14)
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c0b90 STUB
|
// OFFSET: LEGO1 0x100c0b90 STUB
|
||||||
MxStreamController::MxStreamController()
|
MxStreamController::MxStreamController()
|
||||||
@ -74,20 +77,42 @@ MxResult MxStreamController::vtable0x24(undefined4 p_unknown)
|
|||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c1800 STUB
|
||||||
|
MxResult MxStreamController::FUN_100c1800(MxDSAction* p_action, MxU32 p_val)
|
||||||
|
{
|
||||||
|
MxNextActionDataStart* dataActionStart =
|
||||||
|
new MxNextActionDataStart(p_action->GetObjectId(), p_action->GetUnknown24(), p_val);
|
||||||
|
if (dataActionStart == NULL) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
// TODO: insert dataActionStart to a list
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b9420
|
// OFFSET: LEGO1 0x100b9420
|
||||||
MxResult MxStreamController::vtable0x28()
|
MxResult MxStreamController::vtable0x28()
|
||||||
{
|
{
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c1c10 STUB
|
// OFFSET: LEGO1 0x100c1c10
|
||||||
MxResult MxStreamController::vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval)
|
MxResult MxStreamController::vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval)
|
||||||
{
|
{
|
||||||
|
MxAutoLocker locker(&m_criticalSection);
|
||||||
|
if (FUN_100c1a00(p_action, p_bufferval) != SUCCESS) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
return FUN_100c1800(p_action, (p_bufferval / m_provider->GetFileSize()) * m_provider->GetFileSize());
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c1ce0 STUB
|
// OFFSET: LEGO1 0x100c1ce0 STUB
|
||||||
MxResult MxStreamController::vtable0x30(undefined4 p_unknown)
|
MxResult MxStreamController::vtable0x30(undefined4 p_unknown)
|
||||||
{
|
{
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c1a00 STUB
|
||||||
|
MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval)
|
||||||
|
{
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|||||||
@ -35,11 +35,13 @@ class MxStreamController : public MxCore {
|
|||||||
virtual MxResult vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2); // vtable+0x1c
|
virtual MxResult vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2); // vtable+0x1c
|
||||||
virtual MxResult vtable0x20(MxDSAction* p_action); // vtable+0x20
|
virtual MxResult vtable0x20(MxDSAction* p_action); // vtable+0x20
|
||||||
virtual MxResult vtable0x24(undefined4 p_unknown); // vtable+0x24
|
virtual MxResult vtable0x24(undefined4 p_unknown); // vtable+0x24
|
||||||
|
MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val);
|
||||||
virtual MxResult vtable0x28(); // vtable+0x28
|
virtual MxResult vtable0x28(); // vtable+0x28
|
||||||
virtual MxResult vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
|
virtual MxResult vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
|
||||||
virtual MxResult vtable0x30(undefined4 p_unknown); // vtable+0x30
|
virtual MxResult vtable0x30(undefined4 p_unknown); // vtable+0x30
|
||||||
|
|
||||||
MxBool FUN_100c20d0(MxDSObject& p_obj);
|
MxBool FUN_100c20d0(MxDSObject& p_obj);
|
||||||
|
MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval);
|
||||||
|
|
||||||
inline MxAtomId& GetAtom() { return atom; };
|
inline MxAtomId& GetAtom() { return atom; };
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ Pizza::~Pizza()
|
|||||||
TickleManager()->UnregisterClient(this);
|
TickleManager()->UnregisterClient(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100388a0
|
// OFFSET: LEGO1 0x100388a0 STUB
|
||||||
MxResult Pizza::Tickle()
|
MxResult Pizza::Tickle()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@ -7,6 +7,18 @@
|
|||||||
// SIZE 0x84
|
// SIZE 0x84
|
||||||
class Pizzeria : public IsleActor {
|
class Pizzeria : public IsleActor {
|
||||||
public:
|
public:
|
||||||
|
// OFFSET: LEGO1 0x1000e780
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||||
|
{
|
||||||
|
// 0x100f0380
|
||||||
|
return "Pizzeria";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1000e790
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, Pizzeria::ClassName()) || IsleActor::IsA(name);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PIZZERIASTATE_H
|
#endif // PIZZERIASTATE_H
|
||||||
|
|||||||
@ -8,6 +8,19 @@
|
|||||||
class PizzeriaState : public LegoState {
|
class PizzeriaState : public LegoState {
|
||||||
public:
|
public:
|
||||||
PizzeriaState();
|
PizzeriaState();
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10017c20
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||||
|
{
|
||||||
|
// 0x100f0370
|
||||||
|
return "PizzeriaState";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10017c30
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, PizzeriaState::ClassName()) || LegoState::IsA(name);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PIZZERIASTATE_H
|
#endif // PIZZERIASTATE_H
|
||||||
|
|||||||
@ -7,6 +7,19 @@
|
|||||||
class Radio : public MxCore {
|
class Radio : public MxCore {
|
||||||
public:
|
public:
|
||||||
virtual ~Radio() override;
|
virtual ~Radio() override;
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1002c8e0
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||||
|
{
|
||||||
|
// 0x100f328c
|
||||||
|
return "Radio";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1002c8f0
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, Radio::ClassName()) || MxCore::IsA(name);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RADIO_H
|
#endif // RADIO_H
|
||||||
|
|||||||
@ -11,6 +11,19 @@ class RegistrationBook : public LegoWorld {
|
|||||||
virtual ~RegistrationBook() override; // vtable+0x0
|
virtual ~RegistrationBook() override; // vtable+0x0
|
||||||
|
|
||||||
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
|
virtual MxLong Notify(MxParam& p) override; // vtable+0x4
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10076e10
|
||||||
|
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||||
|
{
|
||||||
|
// 0x100f04c8
|
||||||
|
return "RegistrationBook";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x10076e20
|
||||||
|
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, RegistrationBook::ClassName()) || LegoWorld::IsA(name);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // REGISTRATIONBOOK_H
|
#endif // REGISTRATIONBOOK_H
|
||||||
|
|||||||
@ -15,8 +15,6 @@
|
|||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Score, 0x104)
|
DECOMP_SIZE_ASSERT(Score, 0x104)
|
||||||
|
|
||||||
MxAtomId* g_infoscorScript;
|
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10001000
|
// OFFSET: LEGO1 0x10001000
|
||||||
Score::Score()
|
Score::Score()
|
||||||
{
|
{
|
||||||
@ -41,7 +39,7 @@ MxLong Score::Notify(MxParam& p)
|
|||||||
LegoWorld::Notify(p);
|
LegoWorld::Notify(p);
|
||||||
if (m_unkf6) {
|
if (m_unkf6) {
|
||||||
switch (((MxNotificationParam&) p).GetNotification()) {
|
switch (((MxNotificationParam&) p).GetNotification()) {
|
||||||
case PAINT:
|
case c_notificationStartAction:
|
||||||
ret = 1;
|
ret = 1;
|
||||||
Paint();
|
Paint();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -220,12 +220,14 @@ def get_recompiled_address(self, filename, line):
|
|||||||
found = False
|
found = False
|
||||||
|
|
||||||
logger.debug('Looking for %s:%d', filename, line)
|
logger.debug('Looking for %s:%d', filename, line)
|
||||||
|
filename_basename = os.path.basename(filename).lower()
|
||||||
|
|
||||||
for fn in self.lines:
|
for fn in self.lines:
|
||||||
# Sometimes a PDB is compiled with a relative path while we always have
|
# Sometimes a PDB is compiled with a relative path while we always have
|
||||||
# an absolute path. Therefore we must
|
# an absolute path. Therefore we must
|
||||||
try:
|
try:
|
||||||
if os.path.samefile(fn, filename):
|
if (os.path.basename(fn).lower() == filename_basename and
|
||||||
|
os.path.samefile(fn, filename)):
|
||||||
filename = fn
|
filename = fn
|
||||||
break
|
break
|
||||||
except FileNotFoundError as e:
|
except FileNotFoundError as e:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user