From 279d62627909b6253bc115c77adb96413637ca27 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Sun, 11 Jun 2023 18:03:54 -0700 Subject: [PATCH] import all functions from lego1 exports This declares a bunch of classes and functions for us, as well as fixes some declarations that were slightly incorrect (e.g. missing "virtual", etc) --- LEGO1/legobackgroundcolor.h | 10 +++++++++ LEGO1/legoentity.h | 10 +++++++++ LEGO1/legogamestate.h | 3 +++ LEGO1/legoinputmanager.h | 2 ++ LEGO1/legonavcontroller.h | 11 ++++++++++ LEGO1/legoomni.h | 43 ++++++++++++++++++++++++++----------- LEGO1/legoroi.h | 1 + LEGO1/legoworld.h | 11 ++++++++++ LEGO1/mxatomid.h | 3 +++ LEGO1/mxbitmap.h | 5 ++++- LEGO1/mxcriticalsection.h | 12 +++++++++++ LEGO1/mxdirectdraw.h | 2 ++ LEGO1/mxdsaction.h | 2 +- LEGO1/mxdsfile.h | 9 +++++++- LEGO1/mxdsobject.h | 10 +++++++++ LEGO1/mxioinfo.h | 10 +++++++++ LEGO1/mxomni.h | 12 ++++++----- LEGO1/mxpalette.h | 2 ++ LEGO1/mxpresenter.h | 18 ++++++++++++++++ LEGO1/mxscheduler.h | 11 ++++++++++ LEGO1/mxstring.h | 2 ++ LEGO1/mxtransitionmanager.h | 2 +- LEGO1/mxvariabletable.h | 4 ++++ LEGO1/mxvideomanager.h | 11 ++++++++++ LEGO1/mxvideoparam.h | 2 ++ LEGO1/realtimeview.h | 13 +++++++++++ LEGO1/viewmanager.h | 10 +++++++++ 27 files changed, 210 insertions(+), 21 deletions(-) create mode 100755 LEGO1/legobackgroundcolor.h create mode 100755 LEGO1/legoentity.h mode change 100644 => 100755 LEGO1/legogamestate.h create mode 100755 LEGO1/legonavcontroller.h create mode 100755 LEGO1/legoworld.h create mode 100755 LEGO1/mxcriticalsection.h mode change 100644 => 100755 LEGO1/mxdsfile.h create mode 100755 LEGO1/mxdsobject.h create mode 100755 LEGO1/mxioinfo.h mode change 100644 => 100755 LEGO1/mxomni.h create mode 100755 LEGO1/mxpresenter.h create mode 100755 LEGO1/mxscheduler.h create mode 100755 LEGO1/mxvideomanager.h create mode 100755 LEGO1/realtimeview.h create mode 100755 LEGO1/viewmanager.h diff --git a/LEGO1/legobackgroundcolor.h b/LEGO1/legobackgroundcolor.h new file mode 100755 index 00000000..c660c0bf --- /dev/null +++ b/LEGO1/legobackgroundcolor.h @@ -0,0 +1,10 @@ +#ifndef LEGOBACKGROUNDCOLOR_H +#define LEGOBACKGROUNDCOLOR_H + +class LegoBackgroundColor +{ +public: + __declspec(dllexport) LegoBackgroundColor(const char *, const char *); +}; + +#endif // LEGOBACKGROUNDCOLOR_H diff --git a/LEGO1/legoentity.h b/LEGO1/legoentity.h new file mode 100755 index 00000000..b64f55a2 --- /dev/null +++ b/LEGO1/legoentity.h @@ -0,0 +1,10 @@ +#ifndef LEGOENTITY_H +#define LEGOENTITY_H + +class LegoEntity +{ +public: + __declspec(dllexport) virtual ~LegoEntity(); +}; + +#endif // LEGOENTITY_H diff --git a/LEGO1/legogamestate.h b/LEGO1/legogamestate.h old mode 100644 new mode 100755 index 4a41ca04..239719eb --- a/LEGO1/legogamestate.h +++ b/LEGO1/legogamestate.h @@ -4,6 +4,9 @@ class LegoGameState { public: + __declspec(dllexport) LegoGameState(); + __declspec(dllexport) ~LegoGameState(); + __declspec(dllexport) long Load(unsigned long); __declspec(dllexport) long Save(unsigned long p); __declspec(dllexport) void SerializePlayersInfo(short p); __declspec(dllexport) void SerializeScoreHistory(short p); diff --git a/LEGO1/legoinputmanager.h b/LEGO1/legoinputmanager.h index 6bdf18e0..2f3f6412 100644 --- a/LEGO1/legoinputmanager.h +++ b/LEGO1/legoinputmanager.h @@ -15,6 +15,8 @@ class LegoInputManager { public: __declspec(dllexport) void QueueEvent(NotificationId id, unsigned char p2, long p3, long p4, unsigned char p5); + __declspec(dllexport) void Register(MxCore *); + __declspec(dllexport) void UnRegister(MxCore *); int m_unk00[0x400]; }; diff --git a/LEGO1/legonavcontroller.h b/LEGO1/legonavcontroller.h new file mode 100755 index 00000000..33e16916 --- /dev/null +++ b/LEGO1/legonavcontroller.h @@ -0,0 +1,11 @@ +#ifndef LEGONAVCONTROLLER_H +#define LEGONAVCONTROLLER_H + +class LegoNavController +{ +public: + __declspec(dllexport) static void GetDefaults(int *,float *,float *,float *,float *,float *,float *,float *,float *,float *,unsigned char *); + __declspec(dllexport) static void SetDefaults(int,float,float,float,float,float,float,float,float,float,unsigned char); +}; + +#endif // LEGONAVCONTROLLER_H diff --git a/LEGO1/legoomni.h b/LEGO1/legoomni.h index 0724f9b0..1d4d92ef 100644 --- a/LEGO1/legoomni.h +++ b/LEGO1/legoomni.h @@ -3,6 +3,8 @@ #include "mxbackgroundaudiomanager.h" #include "mxdsaction.h" +#include "mxdsfile.h" +#include "mxdsobject.h" #include "mxomnicreateparam.h" #include "mxresult.h" #include "mxstreamer.h" @@ -11,6 +13,7 @@ #include "mxtransitionmanager.h" #include "legoanimationmanager.h" #include "legobuildingmanager.h" +#include "legoentity.h" #include "legogamestate.h" #include "legoinputmanager.h" #include "legomodelpresenter.h" @@ -19,14 +22,18 @@ #include "legoworldpresenter.h" #include "legovideomanager.h" -class MxBackgroundAudioManager; +class LegoSoundManager; +class MxEventManager; +class MxMusicManager; +class MxNotificationManager; +class MxSoundManager; class LegoOmni { 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 void CreateInstance(); __declspec(dllexport) static LegoOmni *GetInstance(); @@ -85,16 +92,28 @@ class LegoOmni }; -__declspec(dllexport) LegoOmni *Lego(); -__declspec(dllexport) MxBackgroundAudioManager *BackgroundAudioManager(); -__declspec(dllexport) MxTickleManager *TickleManager(); -__declspec(dllexport) LegoVideoManager *VideoManager(); -__declspec(dllexport) MxVariableTable *VariableTable(); -__declspec(dllexport) LegoGameState *GameState(); -__declspec(dllexport) MxTimer *Timer(); -__declspec(dllexport) MxStreamer *Streamer(); -__declspec(dllexport) LegoInputManager *InputManager(); -__declspec(dllexport) MxTransitionManager *TransitionManager(); +__declspec(dllexport) MxBackgroundAudioManager * BackgroundAudioManager(); +__declspec(dllexport) MxDSObject * CreateStreamObject(MxDSFile *,short); +__declspec(dllexport) MxEventManager * EventManager(); +__declspec(dllexport) LegoGameState * GameState(); +__declspec(dllexport) const char * GetNoCD_SourceName(); +__declspec(dllexport) LegoInputManager * InputManager(); +__declspec(dllexport) LegoOmni * Lego(); +__declspec(dllexport) MxSoundManager * MSoundManager(); +__declspec(dllexport) void MakeSourceName(char *, const char *); +__declspec(dllexport) MxMusicManager * MusicManager(); +__declspec(dllexport) MxNotificationManager * NotificationManager(); +__declspec(dllexport) LegoEntity * PickEntity(long,long); +__declspec(dllexport) LegoROI * PickROI(long,long); +__declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int)); +__declspec(dllexport) LegoSoundManager * SoundManager(); +__declspec(dllexport) long Start(MxDSAction *); +__declspec(dllexport) MxStreamer * Streamer(); +__declspec(dllexport) MxTickleManager * TickleManager(); +__declspec(dllexport) MxTimer * Timer(); +__declspec(dllexport) MxTransitionManager * TransitionManager(); +__declspec(dllexport) MxVariableTable * VariableTable(); +__declspec(dllexport) LegoVideoManager * VideoManager(); __declspec(dllexport) long Start(MxDSAction *a); diff --git a/LEGO1/legoroi.h b/LEGO1/legoroi.h index a605b398..8bfc0faa 100644 --- a/LEGO1/legoroi.h +++ b/LEGO1/legoroi.h @@ -4,6 +4,7 @@ class LegoROI { public: + __declspec(dllexport) void SetDisplayBB(int); __declspec(dllexport) static void configureLegoROI(int param_1); }; diff --git a/LEGO1/legoworld.h b/LEGO1/legoworld.h new file mode 100755 index 00000000..b11f7095 --- /dev/null +++ b/LEGO1/legoworld.h @@ -0,0 +1,11 @@ +#ifndef LEGOWORLD_H +#define LEGOWORLD_H + +class LegoWorld +{ +public: + __declspec(dllexport) LegoWorld(); + __declspec(dllexport) virtual ~LegoWorld(); +}; + +#endif // LEGOWORLD_H diff --git a/LEGO1/mxatomid.h b/LEGO1/mxatomid.h index 83275795..3e3ce24b 100644 --- a/LEGO1/mxatomid.h +++ b/LEGO1/mxatomid.h @@ -1,9 +1,12 @@ #ifndef MXATOMID_H #define MXATOMID_H +enum LookupMode; + class MxAtomId { public: + __declspec(dllexport) MxAtomId(const char *, LookupMode); __declspec(dllexport) MxAtomId &operator=(const MxAtomId &id); __declspec(dllexport) ~MxAtomId(); diff --git a/LEGO1/mxbitmap.h b/LEGO1/mxbitmap.h index 9e294a79..1613c47e 100644 --- a/LEGO1/mxbitmap.h +++ b/LEGO1/mxbitmap.h @@ -4,7 +4,10 @@ class MxBitmap { public: - __declspec(dllexport) MxPalette *CreatePalette(); + __declspec(dllexport) MxBitmap(); + __declspec(dllexport) virtual ~MxBitmap(); + __declspec(dllexport) virtual MxPalette *CreatePalette(); + __declspec(dllexport) virtual long Read(const char *); }; #endif // MXBITMAP_H diff --git a/LEGO1/mxcriticalsection.h b/LEGO1/mxcriticalsection.h new file mode 100755 index 00000000..3e9e411c --- /dev/null +++ b/LEGO1/mxcriticalsection.h @@ -0,0 +1,12 @@ +#ifndef MXCRITICALSECTION_H +#define MXCRITICALSECTION_H + +class MxCriticalSection +{ +public: + __declspec(dllexport) MxCriticalSection(); + __declspec(dllexport) ~MxCriticalSection(); + __declspec(dllexport) static void SetDoMutex(); +}; + +#endif // MXCRITICALSECTION_H diff --git a/LEGO1/mxdirectdraw.h b/LEGO1/mxdirectdraw.h index 50c56847..04f73dde 100644 --- a/LEGO1/mxdirectdraw.h +++ b/LEGO1/mxdirectdraw.h @@ -4,7 +4,9 @@ class MxDirectDraw { public: + __declspec(dllexport) int FlipToGDISurface(); __declspec(dllexport) static int GetPrimaryBitDepth(); + __declspec(dllexport) int Pause(int); }; #endif // MXDIRECTDRAW_H diff --git a/LEGO1/mxdsaction.h b/LEGO1/mxdsaction.h index 75c5056d..d76f6930 100644 --- a/LEGO1/mxdsaction.h +++ b/LEGO1/mxdsaction.h @@ -7,8 +7,8 @@ class MxDSAction { public: __declspec(dllexport) MxDSAction(); + __declspec(dllexport) virtual ~MxDSAction(); - int m_unk00; int m_unk04; int m_unk08; int m_unk0c; diff --git a/LEGO1/mxdsfile.h b/LEGO1/mxdsfile.h old mode 100644 new mode 100755 index 4014a8e2..d8f9440c --- a/LEGO1/mxdsfile.h +++ b/LEGO1/mxdsfile.h @@ -4,7 +4,14 @@ class MxDSFile { public: - __declspec(dllexport) long Close(); + __declspec(dllexport) MxDSFile(const char *,unsigned long); + __declspec(dllexport) virtual ~MxDSFile(); + __declspec(dllexport) virtual long Close(); + __declspec(dllexport) virtual unsigned long GetBufferSize(); + __declspec(dllexport) virtual unsigned long GetStreamBuffersNum(); + __declspec(dllexport) virtual long Open(unsigned long); + __declspec(dllexport) virtual long Read(unsigned char *,unsigned long); + __declspec(dllexport) virtual long Seek(long,int); }; #endif // MXDSFILE_H diff --git a/LEGO1/mxdsobject.h b/LEGO1/mxdsobject.h new file mode 100755 index 00000000..05ee1fd0 --- /dev/null +++ b/LEGO1/mxdsobject.h @@ -0,0 +1,10 @@ +#ifndef MXDSOBJECT_H +#define MXDSOBJECT_H + +class MxDSObject +{ +public: + __declspec(dllexport) void SetObjectName(const char *); +}; + +#endif // MXDSOBJECT_H diff --git a/LEGO1/mxioinfo.h b/LEGO1/mxioinfo.h new file mode 100755 index 00000000..d3f2a40e --- /dev/null +++ b/LEGO1/mxioinfo.h @@ -0,0 +1,10 @@ +#ifndef MXIOINFO_H +#define MXIOINFO_H + +class MXIOINFO +{ +public: + __declspec(dllexport) ~MXIOINFO(); +}; + +#endif // MXIOINFO_H diff --git a/LEGO1/mxomni.h b/LEGO1/mxomni.h old mode 100644 new mode 100755 index b36a1925..43b9b8ac --- a/LEGO1/mxomni.h +++ b/LEGO1/mxomni.h @@ -4,12 +4,14 @@ class MxOmni { public: - __declspec(dllexport) static const char *GetHD(); - __declspec(dllexport) static const char *GetCD(); - __declspec(dllexport) static void SetHD(const char *s); - __declspec(dllexport) static void SetCD(const char *s); - __declspec(dllexport) static void SetSound3D(unsigned char param_1); __declspec(dllexport) static void DestroyInstance(); + __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); }; #endif // MXOMNI_H diff --git a/LEGO1/mxpalette.h b/LEGO1/mxpalette.h index 6ed23153..fff36897 100644 --- a/LEGO1/mxpalette.h +++ b/LEGO1/mxpalette.h @@ -4,6 +4,8 @@ class MxPalette { public: + __declspec(dllexport) unsigned char operator==(MxPalette &); + __declspec(dllexport) void Detach(); }; #endif // MXPALETTE_H diff --git a/LEGO1/mxpresenter.h b/LEGO1/mxpresenter.h new file mode 100755 index 00000000..c4890c1f --- /dev/null +++ b/LEGO1/mxpresenter.h @@ -0,0 +1,18 @@ +#ifndef MXPRESENTER_H +#define MXPRESENTER_H + +class MxPresenter +{ +protected: + __declspec(dllexport) virtual void DoneTickle(); + __declspec(dllexport) void Init(); + __declspec(dllexport) virtual void ParseExtra(); +public: + __declspec(dllexport) virtual ~MxPresenter(); + __declspec(dllexport) virtual void Enable(unsigned char); + __declspec(dllexport) virtual void EndAction(); + __declspec(dllexport) virtual long StartAction(MxStreamController *, MxDSAction *); + __declspec(dllexport) virtual long Tickle(); +}; + +#endif // MXPRESENTER_H diff --git a/LEGO1/mxscheduler.h b/LEGO1/mxscheduler.h new file mode 100755 index 00000000..4f7ee387 --- /dev/null +++ b/LEGO1/mxscheduler.h @@ -0,0 +1,11 @@ +#ifndef MXSCHEDULER_H +#define MXSCHEDULER_H + +class MxScheduler +{ +public: + __declspec(dllexport) static MxScheduler *GetInstance(); + __declspec(dllexport) void StartMultiTasking(unsigned long); +}; + +#endif // MXSCHEDULER_H diff --git a/LEGO1/mxstring.h b/LEGO1/mxstring.h index 16878e94..607b732c 100644 --- a/LEGO1/mxstring.h +++ b/LEGO1/mxstring.h @@ -6,7 +6,9 @@ class MxString : public MxCore { public: + __declspec(dllexport) MxString(const MxString &); __declspec(dllexport) virtual ~MxString(); + __declspec(dllexport) const MxString &operator=(const char *); private: char *m_data; diff --git a/LEGO1/mxtransitionmanager.h b/LEGO1/mxtransitionmanager.h index d91b4a4d..904070b9 100644 --- a/LEGO1/mxtransitionmanager.h +++ b/LEGO1/mxtransitionmanager.h @@ -6,7 +6,7 @@ class MxVideoPresenter; class MxTransitionManager { public: - void SetWaitIndicator(MxVideoPresenter *videoPresenter); + __declspec(dllexport) void SetWaitIndicator(MxVideoPresenter *videoPresenter); }; #endif // MXTRANSITIONMANAGER_H diff --git a/LEGO1/mxvariabletable.h b/LEGO1/mxvariabletable.h index 53868a22..a82b25c4 100644 --- a/LEGO1/mxvariabletable.h +++ b/LEGO1/mxvariabletable.h @@ -1,9 +1,13 @@ #ifndef MXVARIABLETABLE_H #define MXVARIABLETABLE_H +class MxVariable; + class MxVariableTable { public: + __declspec(dllexport) const char * GetVariable(const char *key); + __declspec(dllexport) void SetVariable(MxVariable *var); __declspec(dllexport) void SetVariable(const char *key, const char *value); }; diff --git a/LEGO1/mxvideomanager.h b/LEGO1/mxvideomanager.h new file mode 100755 index 00000000..f2805b15 --- /dev/null +++ b/LEGO1/mxvideomanager.h @@ -0,0 +1,11 @@ +#ifndef MXVIDEOMANAGER_H +#define MXVIDEOMANAGER_H + +class MxVideoManager +{ +public: + __declspec(dllexport) void InvalidateRect(MxRect32 &); + __declspec(dllexport) virtual long RealizePalette(MxPalette *); +}; + +#endif // MXVIDEOMANAGER_H diff --git a/LEGO1/mxvideoparam.h b/LEGO1/mxvideoparam.h index 836b7a9d..8dcc2746 100644 --- a/LEGO1/mxvideoparam.h +++ b/LEGO1/mxvideoparam.h @@ -10,7 +10,9 @@ class MxVideoParam { public: __declspec(dllexport) MxVideoParam(); + __declspec(dllexport) MxVideoParam(MxVideoParam &); __declspec(dllexport) MxVideoParam(MxRect32 &rect, MxPalette *pal, unsigned long p3, MxVideoParamFlags &flags); + __declspec(dllexport) MxVideoParam &operator=(const MxVideoParam &); __declspec(dllexport) ~MxVideoParam(); __declspec(dllexport) void SetDeviceName(char *id); diff --git a/LEGO1/realtimeview.h b/LEGO1/realtimeview.h new file mode 100755 index 00000000..98adb32f --- /dev/null +++ b/LEGO1/realtimeview.h @@ -0,0 +1,13 @@ +#ifndef REALTIMEVIEW_H +#define REALTIMEVIEW_H + +class RealtimeView +{ +public: + __declspec(dllexport) static float GetPartsThreshold(); + __declspec(dllexport) static float GetUserMaxLOD(); + __declspec(dllexport) static void SetPartsThreshold(float); + __declspec(dllexport) static void SetUserMaxLOD(float); +}; + +#endif // REALTIMEVIEW_H diff --git a/LEGO1/viewmanager.h b/LEGO1/viewmanager.h new file mode 100755 index 00000000..3554c6c9 --- /dev/null +++ b/LEGO1/viewmanager.h @@ -0,0 +1,10 @@ +#ifndef VIEWMANAGER_H +#define VIEWMANAGER_H + +class ViewManager +{ +public: + __declspec(dllexport) void RemoveAll(ViewROI *); +}; + +#endif // VIEWMANAGER_H