implement all DLL exports (as TODOs)

Now we can use our own compiled LEGO1.LIB rather than one generated from the original. Also implements a script that tests them to help ensure future commits don't break them.
This commit is contained in:
itsmattkc
2023-06-30 11:34:39 -07:00
parent 13df3f906d
commit 4c9e138cbf
37 changed files with 694 additions and 313 deletions

View File

@@ -1,7 +1,7 @@
#include <windows.h>
// OFFSET: LEGO1 0x10091ee0
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
return TRUE;
}

View File

@@ -1,5 +1,8 @@
#include "legoanimationmanager.h"
// 0x100f74f8
int g_legoAnimationManagerConfig = 1;
// OFFSET: LEGO1 0x1005eb60 STUB
LegoAnimationManager::LegoAnimationManager()
{
@@ -32,3 +35,9 @@ void LegoAnimationManager::Init()
{
// TODO
}
// OFFSET: LEGO1 0x1005eb50
void LegoAnimationManager::configureLegoAnimationManager(int param_1)
{
g_legoAnimationManagerConfig = param_1;
}

View File

@@ -0,0 +1,7 @@
#include "legobackgroundcolor.h"
// OFFSET: LEGO1 0x1003bfb0
LegoBackgroundColor::LegoBackgroundColor(const char *, const char *)
{
// TODO
}

View File

@@ -1,13 +1,18 @@
#include "legobuildingmanager.h"
// 0x100f37cc
int g_buildingManagerConfig = 1;
// OFFSET: LEGO1 0x1002f8c0 STUB
LegoBuildingManager::LegoBuildingManager()
{
// TODO
}
// OFFSET: LEGO1 0x1002f960 STUB
LegoBuildingManager::~LegoBuildingManager()
{
// TODO
}
// OFFSET: LEGO1 0x1002f9d0 STUB
@@ -15,3 +20,9 @@ void LegoBuildingManager::Init()
{
// TODO
}
// OFFSET: LEGO1 0x1002f8b0
void LegoBuildingManager::configureLegoBuildingManager(int param_1)
{
g_buildingManagerConfig = param_1;
}

45
LEGO1/legogamestate.cpp Normal file
View File

@@ -0,0 +1,45 @@
#include "legogamestate.h"
// OFFSET: LEGO1 0x10039550
LegoGameState::LegoGameState()
{
// TODO
}
// OFFSET: LEGO1 0x10039720
LegoGameState::~LegoGameState()
{
// TODO
}
// OFFSET: LEGO1 0x10039c60
long LegoGameState::Load(unsigned long)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x10039980
long LegoGameState::Save(unsigned long p)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1003a2e0
void LegoGameState::SerializePlayersInfo(short p)
{
// TODO
}
// OFFSET: LEGO1 0x1003cdd0
void LegoGameState::SerializeScoreHistory(short p)
{
// TODO
}
// OFFSET: LEGO1 0x10039f00
void LegoGameState::SetSavePath(char *p)
{
// TODO
}

View File

@@ -12,6 +12,24 @@ LegoInputManager::~LegoInputManager()
// TODO
}
// OFFSET: LEGO1 0x1005c740 STUB
void LegoInputManager::QueueEvent(NotificationId id, unsigned char p2, long p3, long p4, unsigned char p5)
{
// TODO
}
// OFFSET: LEGO1 0x1005c470 STUB
void LegoInputManager::Register(MxCore *)
{
// TODO
}
// OFFSET: LEGO1 0x1005c5c0 STUB
void LegoInputManager::UnRegister(MxCore *)
{
// TODO
}
// OFFSET: LEGO1 0x1005b8b0 STUB
long LegoInputManager::Tickle()
{

View File

@@ -0,0 +1,10 @@
#include "legomodelpresenter.h"
// 0x100f7ae0
int g_modelPresenterConfig = 1;
// OFFSET: LEGO1 0x1007f660
void LegoModelPresenter::configureLegoModelPresenter(int param_1)
{
g_modelPresenterConfig = param_1;
}

View File

@@ -1,5 +1,11 @@
#include "legoomni.h"
// 0x100f4588
char *g_nocdSourceName = NULL;
// 0x101020e8
void (*g_omniUserMessage)(const char *,int);
// OFFSET: LEGO1 0x10058a00
LegoOmni::LegoOmni()
{
@@ -12,6 +18,44 @@ LegoOmni::~LegoOmni()
Destroy();
}
// OFFSET: LEGO1 0x1005b560 STUB
void LegoOmni::CreateBackgroundAudio()
{
// TODO
}
// OFFSET: LEGO1 0x1005af10 STUB
void LegoOmni::RemoveWorld(const MxAtomId &p1, long p2)
{
// TODO
}
// OFFSET: LEGO1 0x1005b400 STUB
int LegoOmni::GetCurrPathInfo(LegoPathBoundary **,int &)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x100b6ff0 STUB
void MakeSourceName(char *, const char *)
{
// TODO
}
// OFFSET: LEGO1 0x100b7210
void SetOmniUserMessage(void (*p_userMsg)(const char *,int))
{
g_omniUserMessage = p_userMsg;
}
// OFFSET: LEGO1 0x100acf50 STUB
long Start(MxDSAction *)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1005ad10
LegoOmni *LegoOmni::GetInstance()
{
@@ -67,6 +111,13 @@ MxBackgroundAudioManager *BackgroundAudioManager()
return LegoOmni::GetInstance()->GetBackgroundAudioManager();
}
// OFFSET: LEGO1 0x100c0280 STUB
MxDSObject *CreateStreamObject(MxDSFile *,short)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x10015740
LegoInputManager *InputManager()
{
@@ -91,6 +142,11 @@ MxTransitionManager *TransitionManager()
return LegoOmni::GetInstance()->GetTransitionManager();
}
// OFFSET: LEGO1 0x10053430
const char *GetNoCD_SourceName()
{
return g_nocdSourceName;
}
// OFFSET: LEGO1 0x1005b5f0
long LegoOmni::Notify(MxParam &p)
@@ -99,6 +155,20 @@ long LegoOmni::Notify(MxParam &p)
return 0;
}
// OFFSET: LEGO1 0x1003dd70 STUB
LegoROI *PickROI(long,long)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x1003ddc0 STUB
LegoEntity *PickEntity(long,long)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x10058bd0
void LegoOmni::Init()
{

View File

@@ -5,6 +5,7 @@
#include "legoinputmanager.h"
#include "legogamestate.h"
#include "legonavcontroller.h"
#include "legopathboundary.h"
#include "legoroi.h"
#include "legovideomanager.h"
#include "mxatomid.h"
@@ -27,7 +28,7 @@ class LegoOmni : public MxOmni
public:
__declspec(dllexport) void CreateBackgroundAudio();
__declspec(dllexport) void RemoveWorld(const MxAtomId &p1, long p2);
__declspec(dllexport) static int GetCurrPathInfo(class LegoPathBoundary * *,int &);
__declspec(dllexport) static int GetCurrPathInfo(LegoPathBoundary **,int &);
__declspec(dllexport) static void CreateInstance();
__declspec(dllexport) static LegoOmni *GetInstance();
@@ -99,7 +100,6 @@ __declspec(dllexport) const char * GetNoCD_SourceName();
__declspec(dllexport) LegoInputManager * InputManager();
__declspec(dllexport) LegoOmni * Lego();
__declspec(dllexport) void MakeSourceName(char *, const char *);
__declspec(dllexport) MxNotificationManager * NotificationManager();
__declspec(dllexport) LegoEntity * PickEntity(long,long);
__declspec(dllexport) LegoROI * PickROI(long,long);
__declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int));

View File

@@ -0,0 +1,14 @@
#include "legopartpresenter.h"
// 0x100f7aa0
int g_partPresenterConfig1 = 1;
// 0x100f7aa4
int g_partPresenterConfig2 = 100;
// OFFSET: LEGO1 0x1007c990
void LegoPartPresenter::configureLegoPartPresenter(int param_1, int param_2)
{
g_partPresenterConfig1 = param_1;
g_partPresenterConfig2 = param_2;
}

View File

@@ -1,6 +1,8 @@
#ifndef LEGOPARTPRESENTER_H
#define LEGOPARTPRESENTER_H
#include "mxmediapresenter.h"
// VTABLE 0x100d4df0
// SIZE 0x54 (from inlined construction at 0x10009fac)
class LegoPartPresenter : public MxMediaPresenter

9
LEGO1/legopathboundary.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef LEGOPATHBOUNDARH_H
#define LEGOPATHBOUNDARH_H
class LegoPathBoundary
{
};
#endif // LEGOPATHBOUNDARH_H

17
LEGO1/legoroi.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "legoroi.h"
// 0x10101368
int g_roiConfig = 100;
// OFFSET: LEGO1 0x100a9e10
void LegoROI::SetDisplayBB(int p_displayBB)
{
// Intentionally empty function
}
// OFFSET: LEGO1 0x100a81c0
void LegoROI::configureLegoROI(int p_roi)
{
g_roiConfig = p_roi;
}

View File

@@ -4,8 +4,8 @@
class LegoROI
{
public:
__declspec(dllexport) void SetDisplayBB(int);
__declspec(dllexport) static void configureLegoROI(int param_1);
__declspec(dllexport) void SetDisplayBB(int p_displayBB);
__declspec(dllexport) static void configureLegoROI(int p_roi);
};
#endif // LEGOROI_H

27
LEGO1/mxbitmap.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "mxbitmap.h"
// OFFSET: LEGO1 0x100bc980
MxBitmap::MxBitmap()
{
// TODO
}
// OFFSET: LEGO1 0x100bca10
MxBitmap::~MxBitmap()
{
// TODO
}
// OFFSET: LEGO1 0x100bd1c0
MxPalette *MxBitmap::CreatePalette()
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x100bcd10
long MxBitmap::Read(const char *)
{
// TODO
return 0;
}

View File

@@ -1,6 +1,8 @@
#ifndef MXBITMAP_H
#define MXBITMAP_H
#include "mxpalette.h"
class MxBitmap
{
public:

22
LEGO1/mxdirectdraw.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "mxdirectdraw.h"
// OFFSET: LEGO1 0x1009e7f0
int MxDirectDraw::FlipToGDISurface()
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1009d570
int MxDirectDraw::GetPrimaryBitDepth()
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x1009e6a0
int MxDirectDraw::Pause(int)
{
// TODO
return 0;
}

View File

@@ -1,5 +1,14 @@
#include "mxomni.h"
// 0x101015b8
char g_hdPath[1024];
// 0x101019b8
char g_cdPath[1024];
// 0x10101db8
MxBool g_use3dSound;
// 0x101015b0
MxOmni *MxOmni::g_instance = NULL;
@@ -43,6 +52,43 @@ void MxOmni::DestroyInstance()
}
}
// OFFSET: LEGO1 0x100b0900
const char *MxOmni::GetHD()
{
return g_hdPath;
}
// OFFSET: LEGO1 0x100b0940
const char *MxOmni::GetCD()
{
return g_cdPath;
}
// OFFSET: LEGO1 0x100b0980
MxBool MxOmni::IsSound3D()
{
return g_use3dSound;
}
// OFFSET: LEGO1 0x100b0910
void MxOmni::SetHD(const char *p_hd)
{
strcpy(g_hdPath, p_hd);
}
// OFFSET: LEGO1 0x100b0950
void MxOmni::SetCD(const char *p_cd)
{
strcpy(g_cdPath, p_cd);
}
// OFFSET: LEGO1 0x100b0990
void MxOmni::SetSound3D(MxBool p_3dsound)
{
g_use3dSound = p_3dsound;
}
// OFFSET: LEGO1 0x100b0680
MxOmni *MxOmni::GetInstance()
{
@@ -141,4 +187,4 @@ MxMusicManager* MusicManager()
MxEventManager* EventManager()
{
return MxOmni::GetInstance()->GetEventManager();
}
}

View File

@@ -24,10 +24,10 @@ public:
__declspec(dllexport) static const char *GetCD();
__declspec(dllexport) static const char *GetHD();
__declspec(dllexport) static MxOmni *GetInstance();
__declspec(dllexport) static unsigned char IsSound3D();
__declspec(dllexport) static void SetCD(const char *s);
__declspec(dllexport) static void SetHD(const char *s);
__declspec(dllexport) static void SetSound3D(unsigned char);
__declspec(dllexport) static MxBool IsSound3D();
__declspec(dllexport) static void SetCD(const char *p_cd);
__declspec(dllexport) static void SetHD(const char *p_hd);
__declspec(dllexport) static void SetSound3D(MxBool p_3dsound);
virtual ~MxOmni();
@@ -75,5 +75,6 @@ __declspec(dllexport) MxSoundManager * MSoundManager();
__declspec(dllexport) MxVariableTable * VariableTable();
__declspec(dllexport) MxMusicManager * MusicManager();
__declspec(dllexport) MxEventManager * EventManager();
__declspec(dllexport) MxNotificationManager * NotificationManager();
#endif // MXOMNI_H

View File

@@ -5,4 +5,17 @@ MxResult MxPalette::GetEntries(LPPALETTEENTRY p_entries)
{
memcpy(p_entries, this->m_entries, sizeof(this->m_entries));
return SUCCESS;
}
}
// OFFSET: LEGO1 0x100bf340
MxBool MxPalette::operator==(MxPalette &)
{
// TODO
return FALSE;
}
// OFFSET: LEGO1 0x100bf330
void MxPalette::Detach()
{
// TODO
}

View File

@@ -11,7 +11,7 @@
class MxPalette : public MxCore
{
public:
__declspec(dllexport) unsigned char operator==(MxPalette &);
__declspec(dllexport) MxBool operator==(MxPalette &);
__declspec(dllexport) void Detach();
MxResult GetEntries(LPPALETTEENTRY p_entries);

15
LEGO1/mxscheduler.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "mxscheduler.h"
// OFFSET: LEGO1 0x100bf4f0
MxScheduler *MxScheduler::GetInstance()
{
// Intentionally empty
return 0;
}
// OFFSET: LEGO1 0x100bf500
void MxScheduler::StartMultiTasking(unsigned long)
{
// Intentionally empty
}

View File

@@ -6,6 +6,20 @@ MxStreamer::~MxStreamer()
// TODO
}
// OFFSET: LEGO1 0x100b92c0 STUB
MxStreamController *MxStreamer::Open(const char *name, unsigned short p)
{
// TODO
return NULL;
}
// OFFSET: LEGO1 0x100b9570 STUB
long MxStreamer::Close(const char *p)
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x100b9b60 STUB
long MxStreamer::Notify(MxParam &p)
{

View File

@@ -19,3 +19,9 @@ long MxTransitionManager::Tickle()
return 0;
}
// OFFSET: LEGO1 0x1004c470 STUB
void MxTransitionManager::SetWaitIndicator(MxVideoPresenter *videoPresenter)
{
// TODO
}

20
LEGO1/mxvariabletable.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include "mxvariabletable.h"
// OFFSET: LEGO1 0x100b73a0
void MxVariableTable::SetVariable(const char *key, const char *value)
{
// TODO
}
// OFFSET: LEGO1 0x100b7740
void MxVariableTable::SetVariable(MxVariable *var)
{
// TODO
}
// OFFSET: LEGO1 0x100b78f0
const char *MxVariableTable::GetVariable(const char *key)
{
// TODO
return 0;
}

View File

@@ -32,6 +32,12 @@ int MxVideoManager::Init()
return 0;
}
// OFFSET: LEGO1 0x100bea60 STUB
void MxVideoManager::InvalidateRect(MxRect32 &p_rect)
{
// TODO
}
// OFFSET: LEGO1 0x100bebe0
long MxVideoManager::RealizePalette(MxPalette *p_palette)
{

32
LEGO1/realtimeview.cpp Normal file
View File

@@ -0,0 +1,32 @@
#include "realtimeview.h"
// 0x10101048
float g_userMaxLod = 3.6f;
// 0x1010104c
float g_partsThreshold = 1000.0f;
// OFFSET: LEGO1 0x100a5e00
float RealtimeView::GetUserMaxLOD()
{
// TODO
return 0;
}
// OFFSET: LEGO1 0x100a5e10
float RealtimeView::GetPartsThreshold()
{
return g_partsThreshold;
}
// OFFSET: LEGO1 0x100a5de0
void RealtimeView::SetUserMaxLOD(float p_lod)
{
g_userMaxLod = p_lod;
}
// OFFSET: LEGO1 0x100a5df0
void RealtimeView::SetPartsThreshold(float p_threshold)
{
g_partsThreshold = p_threshold;
}

7
LEGO1/viewmanager.cpp Normal file
View File

@@ -0,0 +1,7 @@
#include "viewmanager.h"
// OFFSET: LEGO1 0x100a64d0 STUB
void ViewManager::RemoveAll(ViewROI *)
{
// TODO
}