This commit is contained in:
Christian Semmler 2024-01-06 12:28:34 -05:00
parent 6d8c858df3
commit 1a64552e44
6 changed files with 31 additions and 19 deletions

View File

@ -1,16 +1,14 @@
#include "define.h"
// GLOBAL: LEGO1 0x1010141c
MxS32 g_mxcoreCount[101] = {
0, -6643, -5643, -5058, -4643, -4321, -4058, -3836, -3643, -3473, -3321, -3184, -3058,
-2943, -2836, -2736, -2643, -2556, -2473, -2395, -2321, -2251, -2184, -2120, -2058, -2000,
-1943, -1888, -1836, -1785, -1736, -1689, -1643, -1599, -1556, -1514, -1473, -1434, -1395,
-1358, -1321, -1286, -1251, -1217, -1184, -1152, -1120, -1089, -1058, -1029, -1000, -971,
-943, -915, -888, -862, -836, -810, -785, -761, -736, -713, -689, -666, -643,
-621, -599, -577, -556, -535, -514, -494, -473, -454, -434, -415, -395, -377,
-358, -340, -321, -304, -286, -268, -251, -234, -217, -200, -184, -168, -152,
-136, -120, -104, -89, -74, -58, -43, -29, -14, 0
};
MxS32 g_mxcoreCount[101] = {0, -6643, -5643, -5058, -4643, -4321, -4058, -3836, -3643, -3473, -3321, -3184, -3058,
-2943, -2836, -2736, -2643, -2556, -2473, -2395, -2321, -2251, -2184, -2120, -2058, -2000,
-1943, -1888, -1836, -1785, -1736, -1689, -1643, -1599, -1556, -1514, -1473, -1434, -1395,
-1358, -1321, -1286, -1251, -1217, -1184, -1152, -1120, -1089, -1058, -1029, -1000, -971,
-943, -915, -888, -862, -836, -810, -785, -761, -736, -713, -689, -666, -643,
-621, -599, -577, -556, -535, -514, -494, -473, -454, -434, -415, -395, -377,
-358, -340, -321, -304, -286, -268, -251, -234, -217, -200, -184, -168, -152,
-136, -120, -104, -89, -74, -58, -43, -29, -14, 0};
// GLOBAL: LEGO1 0x10101eac
const char* g_parseExtraTokens = ":;";

View File

@ -25,20 +25,23 @@ void LegoCameraController::FUN_100123e0(Matrix4Data& p_transform, MxU32)
// STUB: LEGO1 0x10012740
Vector3Data& LegoCameraController::FUN_10012740()
{
static Vector3Data v;
return v;
// Actually returns reference to a member
static Vector3Data g_v;
return g_v;
}
// STUB: LEGO1 0x100127f0
Vector3Data& LegoCameraController::FUN_100127f0()
{
static Vector3Data v;
return v;
// Actually returns reference to a member
static Vector3Data g_v;
return g_v;
}
// STUB: LEGO1 0x100128a0
Vector3Data& LegoCameraController::FUN_100128a0()
{
static Vector3Data v;
return v;
// Actually returns reference to a member
static Vector3Data g_v;
return g_v;
}

View File

@ -11,7 +11,7 @@ MxResult MxCore::Tickle()
// FUNCTION: LEGO1 0x100ae1a0
MxCore::MxCore()
{
m_id = (MxU32)g_mxcoreCount[0];
m_id = (MxU32) g_mxcoreCount[0];
g_mxcoreCount[0]++;
}

View File

@ -76,7 +76,10 @@ class MxPtrList : public MxList<T*> {
static void Destroy(T* p_obj) { delete p_obj; };
void SetOwnership(MxBool p_ownership) { MxPtrList<T>::SetDestroy(p_ownership ? MxList<T*>::Destroy : MxCollection<T*>::Destroy); }
void SetOwnership(MxBool p_ownership)
{
MxCollection<T*>::SetDestroy(p_ownership ? MxPtrList<T>::Destroy : MxCollection<T*>::Destroy);
}
};
template <class T>

View File

@ -25,9 +25,13 @@ MxDSAction* MxStreamListMxDSAction::Find(MxDSAction* p_action, MxBool p_delete)
// DECOMP ALPHA 0x1008b99d ?
MxDSAction* found = NULL;
iterator it;
#ifdef COMPAT_MODE
iterator it;
for (it = begin(); it != end(); it++) {
#else
for (iterator it = begin(); it != end(); it++) {
#endif
if (p_action->GetObjectId() == -1 || p_action->GetObjectId() == (*it)->GetObjectId()) {
if (p_action->GetUnknown24() == -2 || p_action->GetUnknown24() == -3 ||
p_action->GetUnknown24() == (*it)->GetUnknown24()) {

View File

@ -3,6 +3,10 @@
// Various macros to enable compiling with other/newer compilers.
#ifdef __MINGW32__
#define COMPAT_MODE
#endif
// Use `COMPAT_CONST` where something ought to be 'const', and a newer compiler would complain if it
// wasn't, but we know it isn't 'const' in the original code.
#ifdef __MINGW32__