mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-27 18:21:15 +00:00
More fixes
This commit is contained in:
parent
9dc982f901
commit
e2bfeb6817
@ -4,9 +4,9 @@
|
|||||||
int g_buildingManagerConfig = 1;
|
int g_buildingManagerConfig = 1;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002f8b0
|
// FUNCTION: LEGO1 0x1002f8b0
|
||||||
void LegoBuildingManager::configureLegoBuildingManager(int param_1)
|
void LegoBuildingManager::configureLegoBuildingManager(MxS32 p_buildingManagerConfig)
|
||||||
{
|
{
|
||||||
g_buildingManagerConfig = param_1;
|
g_buildingManagerConfig = p_buildingManagerConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002f8c0
|
// FUNCTION: LEGO1 0x1002f8c0
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class LegoBuildingManager : public MxCore {
|
|||||||
return "LegoBuildingManager";
|
return "LegoBuildingManager";
|
||||||
}
|
}
|
||||||
|
|
||||||
__declspec(dllexport) static void configureLegoBuildingManager(int param_1);
|
__declspec(dllexport) static void configureLegoBuildingManager(MxS32);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
|||||||
@ -24,9 +24,9 @@ LegoEntityPresenter::~LegoEntityPresenter()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10053630
|
// FUNCTION: LEGO1 0x10053630
|
||||||
undefined4 LegoEntityPresenter::VTable0x6c(undefined4 p_unknown)
|
undefined4 LegoEntityPresenter::VTable0x6c(undefined4 p_unk0x4c)
|
||||||
{
|
{
|
||||||
m_unk0x4c = p_unknown;
|
m_unk0x4c = p_unk0x4c;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ class LegoEntityPresenter : public MxCompositePresenter {
|
|||||||
|
|
||||||
virtual void Destroy() override; // vtable+0x38
|
virtual void Destroy() override; // vtable+0x38
|
||||||
virtual void Init(); // vtable+0x68
|
virtual void Init(); // vtable+0x68
|
||||||
virtual undefined4 VTable0x6c(undefined4 p_unknown); // vtable+0x6c
|
virtual undefined4 VTable0x6c(undefined4 p_unk0x4c); // vtable+0x6c
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
|
|||||||
@ -8,10 +8,10 @@
|
|||||||
DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24)
|
DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24)
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f3be8
|
// GLOBAL: LEGO1 0x100f3be8
|
||||||
const char* g_str_enable = "enable";
|
const char* g_strEnable = "enable";
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f3bf4
|
// GLOBAL: LEGO1 0x100f3bf4
|
||||||
const char* g_str_disable = "disable";
|
const char* g_strDisable = "disable";
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1003c500
|
// FUNCTION: LEGO1 0x1003c500
|
||||||
LegoFullScreenMovie::LegoFullScreenMovie(const char* p_key, const char* p_value)
|
LegoFullScreenMovie::LegoFullScreenMovie(const char* p_key, const char* p_value)
|
||||||
@ -30,12 +30,12 @@ void LegoFullScreenMovie::SetValue(const char* p_option)
|
|||||||
LegoVideoManager* videomanager = VideoManager();
|
LegoVideoManager* videomanager = VideoManager();
|
||||||
if (videomanager) {
|
if (videomanager) {
|
||||||
|
|
||||||
if (!strcmp(m_value.GetData(), g_str_enable)) {
|
if (!strcmp(m_value.GetData(), g_strEnable)) {
|
||||||
videomanager->EnableFullScreenMovie(TRUE);
|
videomanager->EnableFullScreenMovie(TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(m_value.GetData(), g_str_disable)) {
|
if (!strcmp(m_value.GetData(), g_strDisable)) {
|
||||||
videomanager->EnableFullScreenMovie(FALSE);
|
videomanager->EnableFullScreenMovie(FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ ColorStringStruct g_colorSaveData[43] = {
|
|||||||
// NOTE: This offset = the end of the variables table, the last entry
|
// NOTE: This offset = the end of the variables table, the last entry
|
||||||
// in that table is a special entry, the string "END_OF_VARIABLES"
|
// in that table is a special entry, the string "END_OF_VARIABLES"
|
||||||
// GLOBAL: LEGO1 0x100f3e50
|
// GLOBAL: LEGO1 0x100f3e50
|
||||||
extern const char* s_endOfVariables;
|
extern const char* g_endOfVariables;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10039550
|
// FUNCTION: LEGO1 0x10039550
|
||||||
LegoGameState::LegoGameState()
|
LegoGameState::LegoGameState()
|
||||||
@ -96,7 +96,7 @@ MxResult LegoGameState::Save(MxULong p_slot)
|
|||||||
fileStream.Write(&maybeVersion, 4);
|
fileStream.Write(&maybeVersion, 4);
|
||||||
fileStream.Write(&m_unk0x24, 2);
|
fileStream.Write(&m_unk0x24, 2);
|
||||||
fileStream.Write(&m_unk0x10, 2);
|
fileStream.Write(&m_unk0x10, 2);
|
||||||
fileStream.Write(&m_unk0xC, 1);
|
fileStream.Write(&m_unk0xc, 1);
|
||||||
|
|
||||||
for (MxS32 i = 0; i < sizeof(g_colorSaveData) / sizeof(g_colorSaveData[0]); ++i) {
|
for (MxS32 i = 0; i < sizeof(g_colorSaveData) / sizeof(g_colorSaveData[0]); ++i) {
|
||||||
if (LegoStream::WriteVariable(&fileStream, variableTable, g_colorSaveData[i].m_targetName) == FAILURE)
|
if (LegoStream::WriteVariable(&fileStream, variableTable, g_colorSaveData[i].m_targetName) == FAILURE)
|
||||||
@ -140,9 +140,9 @@ void LegoGameState::SetSavePath(char* p_savePath)
|
|||||||
// FUNCTION: LEGO1 0x1003a020
|
// FUNCTION: LEGO1 0x1003a020
|
||||||
MxResult LegoGameState::WriteEndOfVariables(LegoStream* p_stream)
|
MxResult LegoGameState::WriteEndOfVariables(LegoStream* p_stream)
|
||||||
{
|
{
|
||||||
MxU8 len = strlen(s_endOfVariables);
|
MxU8 len = strlen(g_endOfVariables);
|
||||||
if (p_stream->Write(&len, 1) == SUCCESS)
|
if (p_stream->Write(&len, 1) == SUCCESS)
|
||||||
return p_stream->Write(s_endOfVariables, len);
|
return p_stream->Write(g_endOfVariables, len);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,19 +167,19 @@ void LegoGameState::GetFileSavePath(MxString* p_outPath, MxULong p_slotn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003a2e0
|
// STUB: LEGO1 0x1003a2e0
|
||||||
void LegoGameState::SerializePlayersInfo(MxS16 p)
|
void LegoGameState::SerializePlayersInfo(MxS16)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003a720
|
// STUB: LEGO1 0x1003a720
|
||||||
void LegoGameState::FUN_1003a720(MxU32 p_unk)
|
void LegoGameState::FUN_1003a720(MxU32)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003b060
|
// STUB: LEGO1 0x1003b060
|
||||||
void LegoGameState::HandleAction(MxU32 p_unk)
|
void LegoGameState::HandleAction(MxU32)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -256,7 +256,7 @@ void LegoGameState::RegisterState(LegoState* p_state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1003cdd0
|
// STUB: LEGO1 0x1003cdd0
|
||||||
void LegoGameState::SerializeScoreHistory(MxS16 p)
|
void LegoGameState::SerializeScoreHistory(MxS16)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,17 +22,17 @@ class LegoGameState {
|
|||||||
__declspec(dllexport) LegoGameState();
|
__declspec(dllexport) LegoGameState();
|
||||||
__declspec(dllexport) ~LegoGameState();
|
__declspec(dllexport) ~LegoGameState();
|
||||||
__declspec(dllexport) MxResult Load(MxULong);
|
__declspec(dllexport) MxResult Load(MxULong);
|
||||||
__declspec(dllexport) MxResult Save(MxULong p);
|
__declspec(dllexport) MxResult Save(MxULong);
|
||||||
__declspec(dllexport) void SerializePlayersInfo(MxS16 p);
|
__declspec(dllexport) void SerializePlayersInfo(MxS16);
|
||||||
__declspec(dllexport) void SerializeScoreHistory(MxS16 p);
|
__declspec(dllexport) void SerializeScoreHistory(MxS16);
|
||||||
__declspec(dllexport) void SetSavePath(char* p);
|
__declspec(dllexport) void SetSavePath(char*);
|
||||||
|
|
||||||
LegoState* GetState(COMPAT_CONST char* p_stateName);
|
LegoState* GetState(COMPAT_CONST char* p_stateName);
|
||||||
LegoState* CreateState(COMPAT_CONST char* p_stateName);
|
LegoState* CreateState(COMPAT_CONST char* p_stateName);
|
||||||
|
|
||||||
void GetFileSavePath(MxString* p_outPath, MxULong p_slotn);
|
void GetFileSavePath(MxString* p_outPath, MxULong p_slotn);
|
||||||
void FUN_1003a720(MxU32 p_unk);
|
void FUN_1003a720(MxU32);
|
||||||
void HandleAction(MxU32 p_unk);
|
void HandleAction(MxU32);
|
||||||
|
|
||||||
inline MxU32 GetUnknown10() { return m_unk0x10; }
|
inline MxU32 GetUnknown10() { return m_unk0x10; }
|
||||||
inline void SetUnknown424(undefined4 p_unk0x424) { m_unk0x424 = p_unk0x424; }
|
inline void SetUnknown424(undefined4 p_unk0x424) { m_unk0x424 = p_unk0x424; }
|
||||||
@ -48,7 +48,7 @@ class LegoGameState {
|
|||||||
char* m_savePath; // 0x0
|
char* m_savePath; // 0x0
|
||||||
MxS16 m_stateCount;
|
MxS16 m_stateCount;
|
||||||
LegoState** m_stateArray;
|
LegoState** m_stateArray;
|
||||||
MxU8 m_unk0xC;
|
MxU8 m_unk0xc;
|
||||||
MxU32 m_unk0x10;
|
MxU32 m_unk0x10;
|
||||||
undefined4 m_unk0x14;
|
undefined4 m_unk0x14;
|
||||||
LegoBackgroundColor* m_backgroundColor; // 0x18
|
LegoBackgroundColor* m_backgroundColor; // 0x18
|
||||||
@ -61,6 +61,6 @@ class LegoGameState {
|
|||||||
undefined4 m_unk0x42c;
|
undefined4 m_unk0x42c;
|
||||||
};
|
};
|
||||||
|
|
||||||
MxBool ROIHandlerFunction(char* p_0, char* p_output, MxU32 p_copyLen);
|
MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen);
|
||||||
|
|
||||||
#endif // LEGOGAMESTATE_H
|
#endif // LEGOGAMESTATE_H
|
||||||
|
|||||||
@ -95,15 +95,15 @@ void LegoInputManager::Destroy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005c030
|
// FUNCTION: LEGO1 0x1005c030
|
||||||
void LegoInputManager::CreateAndAcquireKeyboard(HWND hwnd)
|
void LegoInputManager::CreateAndAcquireKeyboard(HWND p_hwnd)
|
||||||
{
|
{
|
||||||
HINSTANCE hinstance = (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE);
|
HINSTANCE hinstance = (HINSTANCE) GetWindowLong(p_hwnd, GWL_HINSTANCE);
|
||||||
HRESULT hresult = DirectInputCreate(hinstance, 0x500, &m_directInput, NULL); // 0x500 for DX5
|
HRESULT hresult = DirectInputCreate(hinstance, 0x500, &m_directInput, NULL); // 0x500 for DX5
|
||||||
|
|
||||||
if (hresult == DI_OK) {
|
if (hresult == DI_OK) {
|
||||||
HRESULT createdeviceresult = m_directInput->CreateDevice(GUID_SysKeyboard, &m_directInputDevice, NULL);
|
HRESULT createdeviceresult = m_directInput->CreateDevice(GUID_SysKeyboard, &m_directInputDevice, NULL);
|
||||||
if (createdeviceresult == DI_OK) {
|
if (createdeviceresult == DI_OK) {
|
||||||
m_directInputDevice->SetCooperativeLevel(hwnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
|
m_directInputDevice->SetCooperativeLevel(p_hwnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
|
||||||
m_directInputDevice->SetDataFormat(&c_dfDIKeyboard);
|
m_directInputDevice->SetDataFormat(&c_dfDIKeyboard);
|
||||||
m_directInputDevice->Acquire();
|
m_directInputDevice->Acquire();
|
||||||
}
|
}
|
||||||
@ -159,10 +159,10 @@ MxResult LegoInputManager::GetJoystickId()
|
|||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005c320
|
// FUNCTION: LEGO1 0x1005c320
|
||||||
MxResult LegoInputManager::GetJoystickState(
|
MxResult LegoInputManager::GetJoystickState(
|
||||||
MxU32* joystick_x,
|
MxU32* p_joystickX,
|
||||||
MxU32* joystick_y,
|
MxU32* p_joystickY,
|
||||||
DWORD* buttons_state,
|
DWORD* p_buttonsState,
|
||||||
MxU32* pov_position
|
MxU32* p_povPosition
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (m_useJoystick != FALSE) {
|
if (m_useJoystick != FALSE) {
|
||||||
@ -186,23 +186,23 @@ MxResult LegoInputManager::GetJoystickState(
|
|||||||
MMRESULT mmresult = joyGetPosEx(m_joyid, &joyinfoex);
|
MMRESULT mmresult = joyGetPosEx(m_joyid, &joyinfoex);
|
||||||
|
|
||||||
if (mmresult == MMSYSERR_NOERROR) {
|
if (mmresult == MMSYSERR_NOERROR) {
|
||||||
*buttons_state = joyinfoex.dwButtons;
|
*p_buttonsState = joyinfoex.dwButtons;
|
||||||
MxU32 xmin = m_joyCaps.wXmin;
|
MxU32 xmin = m_joyCaps.wXmin;
|
||||||
MxU32 ymax = m_joyCaps.wYmax;
|
MxU32 ymax = m_joyCaps.wYmax;
|
||||||
MxU32 ymin = m_joyCaps.wYmin;
|
MxU32 ymin = m_joyCaps.wYmin;
|
||||||
MxS32 ydiff = ymax - ymin;
|
MxS32 ydiff = ymax - ymin;
|
||||||
*joystick_x = ((joyinfoex.dwXpos - xmin) * 100) / (m_joyCaps.wXmax - xmin);
|
*p_joystickX = ((joyinfoex.dwXpos - xmin) * 100) / (m_joyCaps.wXmax - xmin);
|
||||||
*joystick_y = ((joyinfoex.dwYpos - m_joyCaps.wYmin) * 100) / ydiff;
|
*p_joystickY = ((joyinfoex.dwYpos - m_joyCaps.wYmin) * 100) / ydiff;
|
||||||
if ((m_joyCaps.wCaps & (JOYCAPS_POV4DIR | JOYCAPS_POVCTS)) != 0) {
|
if ((m_joyCaps.wCaps & (JOYCAPS_POV4DIR | JOYCAPS_POVCTS)) != 0) {
|
||||||
if (joyinfoex.dwPOV == JOY_POVCENTERED) {
|
if (joyinfoex.dwPOV == JOY_POVCENTERED) {
|
||||||
*pov_position = (MxU32) -1;
|
*p_povPosition = (MxU32) -1;
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
*pov_position = joyinfoex.dwPOV / 100;
|
*p_povPosition = joyinfoex.dwPOV / 100;
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*pov_position = (MxU32) -1;
|
*p_povPosition = (MxU32) -1;
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,10 +40,10 @@ class LegoInputManager : public MxPresenter {
|
|||||||
|
|
||||||
MxResult Create(HWND p_hwnd);
|
MxResult Create(HWND p_hwnd);
|
||||||
void Destroy();
|
void Destroy();
|
||||||
void CreateAndAcquireKeyboard(HWND hwnd);
|
void CreateAndAcquireKeyboard(HWND p_hwnd);
|
||||||
void ReleaseDX();
|
void ReleaseDX();
|
||||||
MxResult GetJoystickId();
|
MxResult GetJoystickId();
|
||||||
MxResult GetJoystickState(MxU32* joystick_x, MxU32* joystick_y, DWORD* buttons_state, MxU32* pov_position);
|
MxResult GetJoystickState(MxU32* p_joystickX, MxU32* p_joystickY, DWORD* p_buttonsState, MxU32* p_povPosition);
|
||||||
void SetTimer();
|
void SetTimer();
|
||||||
void KillTimer();
|
void KillTimer();
|
||||||
void SetCamera(LegoCameraController* p_camera);
|
void SetCamera(LegoCameraController* p_camera);
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
int g_modelPresenterConfig = 1;
|
int g_modelPresenterConfig = 1;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1007f660
|
// FUNCTION: LEGO1 0x1007f660
|
||||||
void LegoModelPresenter::configureLegoModelPresenter(int param_1)
|
void LegoModelPresenter::configureLegoModelPresenter(MxS32 p_modelPresenterConfig)
|
||||||
{
|
{
|
||||||
g_modelPresenterConfig = param_1;
|
g_modelPresenterConfig = p_modelPresenterConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
// SIZE 0x6c (discovered through inline constructor at 0x10009ae6)
|
// SIZE 0x6c (discovered through inline constructor at 0x10009ae6)
|
||||||
class LegoModelPresenter : public MxVideoPresenter {
|
class LegoModelPresenter : public MxVideoPresenter {
|
||||||
public:
|
public:
|
||||||
__declspec(dllexport) static void configureLegoModelPresenter(int param_1);
|
__declspec(dllexport) static void configureLegoModelPresenter(MxS32 p_modelPresenterConfig);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000ccb0
|
// FUNCTION: LEGO1 0x1000ccb0
|
||||||
inline const char* ClassName() const override // vtable+0xc
|
inline const char* ClassName() const override // vtable+0xc
|
||||||
|
|||||||
@ -35,15 +35,15 @@ LegoNavController::LegoNavController()
|
|||||||
{
|
{
|
||||||
ResetToDefault();
|
ResetToDefault();
|
||||||
|
|
||||||
this->unk_18 = 0.0f;
|
this->m_unk0x18 = 0.0f;
|
||||||
this->unk_1C = 0.0f;
|
this->m_unk0x1c = 0.0f;
|
||||||
this->m_targetMovementSpeed = 0.0f;
|
this->m_targetMovementSpeed = 0.0f;
|
||||||
this->m_targetTurnSpeed = 0.0f;
|
this->m_targetTurnSpeed = 0.0f;
|
||||||
this->m_movementAccel = 0.0f;
|
this->m_movementAccel = 0.0f;
|
||||||
this->m_turnAccel = 0.0f;
|
this->m_turnAccel = 0.0f;
|
||||||
this->m_trackDefault = FALSE;
|
this->m_trackDefault = FALSE;
|
||||||
this->m_unk0x5D = FALSE;
|
this->m_unk0x5d = FALSE;
|
||||||
this->m_unk0x6C = FALSE;
|
this->m_unk0x6c = FALSE;
|
||||||
this->m_unk0x64 = 0;
|
this->m_unk0x64 = 0;
|
||||||
this->m_unk0x68 = 0;
|
this->m_unk0x68 = 0;
|
||||||
this->m_unk0x60 = 0;
|
this->m_unk0x60 = 0;
|
||||||
|
|||||||
@ -64,8 +64,8 @@ class LegoNavController : public MxCore {
|
|||||||
int m_vMax;
|
int m_vMax;
|
||||||
int m_mouseDeadzone;
|
int m_mouseDeadzone;
|
||||||
float m_zeroThreshold;
|
float m_zeroThreshold;
|
||||||
float unk_18;
|
float m_unk0x18;
|
||||||
float unk_1C;
|
float m_unk0x1c;
|
||||||
float m_targetMovementSpeed;
|
float m_targetMovementSpeed;
|
||||||
float m_targetTurnSpeed;
|
float m_targetTurnSpeed;
|
||||||
float m_movementMaxSpeed;
|
float m_movementMaxSpeed;
|
||||||
@ -82,12 +82,12 @@ class LegoNavController : public MxCore {
|
|||||||
MxBool m_turnUseVelocity;
|
MxBool m_turnUseVelocity;
|
||||||
int m_time;
|
int m_time;
|
||||||
MxBool m_trackDefault;
|
MxBool m_trackDefault;
|
||||||
MxBool m_unk0x5D;
|
MxBool m_unk0x5d;
|
||||||
char m_unk0x5E[2];
|
char m_unk0x5e[2];
|
||||||
int m_unk0x60;
|
int m_unk0x60;
|
||||||
int m_unk0x64;
|
int m_unk0x64;
|
||||||
int m_unk0x68;
|
int m_unk0x68;
|
||||||
MxBool m_unk0x6C;
|
MxBool m_unk0x6c;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGONAVCONTROLLER_H
|
#endif // LEGONAVCONTROLLER_H
|
||||||
|
|||||||
@ -363,7 +363,7 @@ void LegoOmni::Init()
|
|||||||
m_currentWorld = NULL;
|
m_currentWorld = NULL;
|
||||||
m_unk0x80 = FALSE;
|
m_unk0x80 = FALSE;
|
||||||
m_currentVehicle = NULL;
|
m_currentVehicle = NULL;
|
||||||
m_unk0xLegoSaveDataWriter = NULL;
|
m_saveDataWriter = NULL;
|
||||||
m_plantManager = NULL;
|
m_plantManager = NULL;
|
||||||
m_gameState = NULL;
|
m_gameState = NULL;
|
||||||
m_animationManager = NULL;
|
m_animationManager = NULL;
|
||||||
@ -380,20 +380,20 @@ void LegoOmni::Destroy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10058e70
|
// FUNCTION: LEGO1 0x10058e70
|
||||||
MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||||
{
|
{
|
||||||
MxResult result = FAILURE;
|
MxResult result = FAILURE;
|
||||||
MxAutoLocker lock(&this->m_criticalsection);
|
MxAutoLocker lock(&this->m_criticalsection);
|
||||||
|
|
||||||
p.CreateFlags().CreateObjectFactory(FALSE);
|
p_param.CreateFlags().CreateObjectFactory(FALSE);
|
||||||
p.CreateFlags().CreateVideoManager(FALSE);
|
p_param.CreateFlags().CreateVideoManager(FALSE);
|
||||||
p.CreateFlags().CreateSoundManager(FALSE);
|
p_param.CreateFlags().CreateSoundManager(FALSE);
|
||||||
p.CreateFlags().CreateTickleManager(FALSE);
|
p_param.CreateFlags().CreateTickleManager(FALSE);
|
||||||
|
|
||||||
if (!(m_tickleManager = new MxTickleManager()))
|
if (!(m_tickleManager = new MxTickleManager()))
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
|
||||||
if (MxOmni::Create(p) != SUCCESS)
|
if (MxOmni::Create(p_param) != SUCCESS)
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
|
||||||
m_objectFactory = new LegoObjectFactory();
|
m_objectFactory = new LegoObjectFactory();
|
||||||
@ -409,14 +409,14 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_videoManager = new LegoVideoManager()) {
|
if (m_videoManager = new LegoVideoManager()) {
|
||||||
if (m_videoManager->Create(p.GetVideoParam(), 100, 0) != SUCCESS) {
|
if (m_videoManager->Create(p_param.GetVideoParam(), 100, 0) != SUCCESS) {
|
||||||
delete m_videoManager;
|
delete m_videoManager;
|
||||||
m_videoManager = NULL;
|
m_videoManager = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_inputMgr = new LegoInputManager()) {
|
if (m_inputMgr = new LegoInputManager()) {
|
||||||
if (m_inputMgr->Create(p.GetWindowHandle()) != SUCCESS) {
|
if (m_inputMgr->Create(p_param.GetWindowHandle()) != SUCCESS) {
|
||||||
delete m_inputMgr;
|
delete m_inputMgr;
|
||||||
m_inputMgr = NULL;
|
m_inputMgr = NULL;
|
||||||
}
|
}
|
||||||
@ -466,7 +466,7 @@ LegoOmni* LegoOmni::GetInstance()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005af10
|
// STUB: LEGO1 0x1005af10
|
||||||
void LegoOmni::RemoveWorld(const MxAtomId& p1, MxLong p2)
|
void LegoOmni::RemoveWorld(const MxAtomId&, MxLong)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -479,7 +479,7 @@ LegoEntity* LegoOmni::FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_ent
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1005b1d0
|
// STUB: LEGO1 0x1005b1d0
|
||||||
MxResult LegoOmni::DeleteObject(MxDSAction& ds)
|
MxResult LegoOmni::DeleteObject(MxDSAction& p_dsAction)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
@ -511,10 +511,10 @@ void LegoOmni::NotifyCurrentEntity(MxNotificationParam* p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005b3c0
|
// FUNCTION: LEGO1 0x1005b3c0
|
||||||
MxBool LegoOmni::DoesEntityExist(MxDSAction& ds)
|
MxBool LegoOmni::DoesEntityExist(MxDSAction& p_dsAction)
|
||||||
{
|
{
|
||||||
if (MxOmni::DoesEntityExist(ds)) {
|
if (MxOmni::DoesEntityExist(p_dsAction)) {
|
||||||
if (FindByEntityIdOrAtomId(ds.GetAtomId(), ds.GetObjectId()) == NULL) {
|
if (FindByEntityIdOrAtomId(p_dsAction.GetAtomId(), p_dsAction.GetObjectId()) == NULL) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -536,12 +536,12 @@ void LegoOmni::CreateBackgroundAudio()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005b580
|
// FUNCTION: LEGO1 0x1005b580
|
||||||
MxResult LegoOmni::Start(MxDSAction* action)
|
MxResult LegoOmni::Start(MxDSAction* p_dsAction)
|
||||||
{
|
{
|
||||||
MxResult result = MxOmni::Start(action);
|
MxResult result = MxOmni::Start(p_dsAction);
|
||||||
this->m_action.SetAtomId(action->GetAtomId());
|
this->m_action.SetAtomId(p_dsAction->GetAtomId());
|
||||||
this->m_action.SetObjectId(action->GetObjectId());
|
this->m_action.SetObjectId(p_dsAction->GetObjectId());
|
||||||
this->m_action.SetUnknown24(action->GetUnknown24());
|
this->m_action.SetUnknown24(p_dsAction->GetUnknown24());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,8 +61,8 @@ extern MxAtomId* g_nocdSourceName;
|
|||||||
class LegoOmni : public MxOmni {
|
class LegoOmni : public MxOmni {
|
||||||
public:
|
public:
|
||||||
__declspec(dllexport) void CreateBackgroundAudio();
|
__declspec(dllexport) void CreateBackgroundAudio();
|
||||||
__declspec(dllexport) void RemoveWorld(const MxAtomId& p1, MxLong p2);
|
__declspec(dllexport) void RemoveWorld(const MxAtomId&, MxLong);
|
||||||
__declspec(dllexport) static int GetCurrPathInfo(LegoPathBoundary**, int&);
|
__declspec(dllexport) static int GetCurrPathInfo(LegoPathBoundary**, MxS32&);
|
||||||
__declspec(dllexport) static void CreateInstance();
|
__declspec(dllexport) static void CreateInstance();
|
||||||
__declspec(dllexport) static LegoOmni* GetInstance();
|
__declspec(dllexport) static LegoOmni* GetInstance();
|
||||||
|
|
||||||
@ -85,11 +85,11 @@ class LegoOmni : public MxOmni {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void Init() override; // vtable+14
|
virtual void Init() override; // vtable+14
|
||||||
virtual MxResult Create(MxOmniCreateParam& p) override; // vtable+18
|
virtual MxResult Create(MxOmniCreateParam& p_param) override; // vtable+18
|
||||||
virtual void Destroy() override; // vtable+1c
|
virtual void Destroy() override; // vtable+1c
|
||||||
virtual MxResult Start(MxDSAction* action) override; // vtable+20
|
virtual MxResult Start(MxDSAction* p_dsAction) override; // vtable+20
|
||||||
virtual MxResult DeleteObject(MxDSAction& ds) override; // vtable+24
|
virtual MxResult DeleteObject(MxDSAction& p_dsAction) override; // vtable+24
|
||||||
virtual MxBool DoesEntityExist(MxDSAction& ds) override; // vtable+28
|
virtual MxBool DoesEntityExist(MxDSAction& p_dsAction) override; // vtable+28
|
||||||
virtual MxEntity* FindWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter) override; // vtable+30
|
virtual MxEntity* FindWorld(const char* p_id, MxS32 p_entityId, MxPresenter* 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
|
||||||
@ -123,7 +123,7 @@ class LegoOmni : public MxOmni {
|
|||||||
MxBool m_unk0x80;
|
MxBool m_unk0x80;
|
||||||
LegoNavController* m_navController; // 0x84
|
LegoNavController* m_navController; // 0x84
|
||||||
LegoWorld* m_currentVehicle; // 0x88
|
LegoWorld* m_currentVehicle; // 0x88
|
||||||
LegoUnkSaveDataWriter* m_unk0xLegoSaveDataWriter;
|
LegoUnkSaveDataWriter* m_saveDataWriter;
|
||||||
LegoPlantManager* m_plantManager; // 0x90
|
LegoPlantManager* m_plantManager; // 0x90
|
||||||
LegoAnimationManager* m_animationManager;
|
LegoAnimationManager* m_animationManager;
|
||||||
LegoBuildingManager* m_buildingManager; // 0x98
|
LegoBuildingManager* m_buildingManager; // 0x98
|
||||||
|
|||||||
@ -7,8 +7,8 @@ int g_partPresenterConfig1 = 1;
|
|||||||
int g_partPresenterConfig2 = 100;
|
int g_partPresenterConfig2 = 100;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1007c990
|
// FUNCTION: LEGO1 0x1007c990
|
||||||
void LegoPartPresenter::configureLegoPartPresenter(int param_1, int param_2)
|
void LegoPartPresenter::configureLegoPartPresenter(MxS32 p_partPresenterConfig1, MxS32 p_partPresenterConfig2)
|
||||||
{
|
{
|
||||||
g_partPresenterConfig1 = param_1;
|
g_partPresenterConfig1 = p_partPresenterConfig1;
|
||||||
g_partPresenterConfig2 = param_2;
|
g_partPresenterConfig2 = p_partPresenterConfig2;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class LegoPartPresenter : public MxMediaPresenter {
|
|||||||
return !strcmp(p_name, LegoPartPresenter::ClassName()) || MxMediaPresenter::IsA(p_name);
|
return !strcmp(p_name, LegoPartPresenter::ClassName()) || MxMediaPresenter::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
__declspec(dllexport) static void configureLegoPartPresenter(int param_1, int param_2);
|
__declspec(dllexport) static void configureLegoPartPresenter(MxS32, MxS32);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOPARTPRESENTER_H
|
#endif // LEGOPARTPRESENTER_H
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class LegoPathActor : public LegoActor {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// TODO: the types
|
// TODO: the types
|
||||||
undefined unk78[0xc4];
|
undefined m_pad[0xc4];
|
||||||
MxFloat m_unk0x13c;
|
MxFloat m_unk0x13c;
|
||||||
MxS32 m_unk0x140;
|
MxS32 m_unk0x140;
|
||||||
MxS32 m_unk0x144;
|
MxS32 m_unk0x144;
|
||||||
|
|||||||
@ -36,9 +36,9 @@ MxS32 g_roiConfig = 100;
|
|||||||
ROIHandler g_someHandlerFunction = NULL;
|
ROIHandler g_someHandlerFunction = NULL;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a81c0
|
// FUNCTION: LEGO1 0x100a81c0
|
||||||
void LegoROI::configureLegoROI(MxS32 p_roi)
|
void LegoROI::configureLegoROI(MxS32 p_roiConfig)
|
||||||
{
|
{
|
||||||
g_roiConfig = p_roi;
|
g_roiConfig = p_roiConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a9bf0
|
// FUNCTION: LEGO1 0x100a9bf0
|
||||||
|
|||||||
@ -17,8 +17,8 @@ LegoSoundManager::~LegoSoundManager()
|
|||||||
// FUNCTION: LEGO1 0x100299a0
|
// FUNCTION: LEGO1 0x100299a0
|
||||||
void LegoSoundManager::Init()
|
void LegoSoundManager::Init()
|
||||||
{
|
{
|
||||||
unk0x40 = 0;
|
m_unk0x40 = 0;
|
||||||
unk0x3c = 0;
|
m_unk0x3c = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100299b0
|
// STUB: LEGO1 0x100299b0
|
||||||
|
|||||||
@ -18,8 +18,8 @@ class LegoSoundManager : public MxSoundManager {
|
|||||||
void Init();
|
void Init();
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
|
|
||||||
undefined4 unk0x3c;
|
undefined4 m_unk0x3c;
|
||||||
undefined4 unk0x40;
|
undefined4 m_unk0x40;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOSOUNDMANAGER_H
|
#endif // LEGOSOUNDMANAGER_H
|
||||||
|
|||||||
@ -20,7 +20,7 @@ MxBool LegoState::SetFlag()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10005fb0
|
// FUNCTION: LEGO1 0x10005fb0
|
||||||
MxResult LegoState::VTable0x1C(LegoFileStream* p_legoFileStream)
|
MxResult LegoState::VTable0x1c(LegoFileStream* p_legoFileStream)
|
||||||
{
|
{
|
||||||
if (p_legoFileStream->IsWriteMode()) {
|
if (p_legoFileStream->IsWriteMode()) {
|
||||||
p_legoFileStream->FUN_10006030(this->ClassName());
|
p_legoFileStream->FUN_10006030(this->ClassName());
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class LegoState : public MxCore {
|
|||||||
|
|
||||||
virtual MxBool VTable0x14(); // vtable+0x14
|
virtual MxBool VTable0x14(); // vtable+0x14
|
||||||
virtual MxBool SetFlag(); // vtable+0x18
|
virtual MxBool SetFlag(); // vtable+0x18
|
||||||
virtual MxResult VTable0x1C(LegoFileStream* p_legoFileStream); // vtable+0x1C
|
virtual MxResult VTable0x1c(LegoFileStream* p_legoFileStream); // vtable+0x1C
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOSTATE_H
|
#endif // LEGOSTATE_H
|
||||||
|
|||||||
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
// This is a pointer to the end of the global variable name table, which has
|
// This is a pointer to the end of the global variable name table, which has
|
||||||
// the text "END_OF_VARIABLES" in it.
|
// the text "END_OF_VARIABLES" in it.
|
||||||
// TODO: make s_endOfVariables reference the actual end of the variable array.
|
// TODO: make g_endOfVariables reference the actual end of the variable array.
|
||||||
// GLOBAL: LEGO1 0x100f3e50
|
// GLOBAL: LEGO1 0x100f3e50
|
||||||
const char* s_endOfVariables = "END_OF_VARIABLES";
|
const char* g_endOfVariables = "END_OF_VARIABLES";
|
||||||
|
|
||||||
// Very likely but not certain sizes.
|
// Very likely but not certain sizes.
|
||||||
// The classes are only used on the stack in functions we have not 100% matched
|
// The classes are only used on the stack in functions we have not 100% matched
|
||||||
@ -50,7 +50,7 @@ MxS32 LegoStream::ReadVariable(LegoStream* p_stream, MxVariableTable* p_to)
|
|||||||
char nameBuffer[256];
|
char nameBuffer[256];
|
||||||
if (p_stream->Read(nameBuffer, length) == SUCCESS) {
|
if (p_stream->Read(nameBuffer, length) == SUCCESS) {
|
||||||
nameBuffer[length] = '\0';
|
nameBuffer[length] = '\0';
|
||||||
if (strcmp(nameBuffer, s_endOfVariables) == 0)
|
if (strcmp(nameBuffer, g_endOfVariables) == 0)
|
||||||
// 2 -> "This was the last entry, done reading."
|
// 2 -> "This was the last entry, done reading."
|
||||||
result = 2;
|
result = 2;
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -1,2 +1,6 @@
|
|||||||
configureLegoAnimationManager(MxS32): 'DLL exported function'
|
configureLegoAnimationManager(MxS32): 'DLL exported function'
|
||||||
|
configureLegoBuildingManager(MxS32): 'DLL exported function'
|
||||||
|
configureLegoModelPresenter(MxS32): 'DLL exported function'
|
||||||
|
configureLegoPartPresenter(MxS32, MxS32): 'DLL exported function'
|
||||||
|
configureLegoROI(MxS32): 'DLL exported function'
|
||||||
|
GetNoCD_SourceName: 'DLL exported function'
|
||||||
Loading…
Reference in New Issue
Block a user