(Refactor) Use more forward declarations (#881)

* Use more forward declarations

* Use more forward declarations

* Add more forward declarations

* Fix
This commit is contained in:
Christian Semmler
2024-05-03 12:19:12 -04:00
committed by GitHub
parent 01b861bc09
commit 51adf75b9b
165 changed files with 377 additions and 136 deletions

View File

@@ -35,8 +35,8 @@ public:
// MxAtom::`scalar deleting destructor'
private:
MxString m_key;
MxU16 m_value;
MxString m_key; // 0x00
MxU16 m_value; // 0x10
};
struct MxAtomCompare {

View File

@@ -1,7 +1,7 @@
#ifndef MXAUTOLOCK_H
#define MXAUTOLOCK_H
#include "mxcriticalsection.h"
class MxCriticalSection;
#define AUTOLOCK(CS) MxAutoLock lock(&CS)

View File

@@ -2,11 +2,13 @@
#define MXBITMAP_H
#include "mxcore.h"
#include "mxpalette.h"
#include "mxtypes.h"
#include <ddraw.h>
#include <stdlib.h>
class MxPalette;
// The stock BITMAPINFO struct from wingdi.h only makes room for one color
// in the palette. It seems like the expectation (if you use the struct)
// is to malloc as much as you actually need, and then index into the array

View File

@@ -1,10 +1,12 @@
#ifndef MXCOMPOSITEPRESENTER_H
#define MXCOMPOSITEPRESENTER_H
#include "mxactionnotificationparam.h"
#include "mxpresenter.h"
#include "mxstl/stlcompat.h"
class MxEndActionNotificationParam;
class MxNotificationParam;
class MxCompositePresenterList : public list<MxPresenter*> {};
// VTABLE: LEGO1 0x100dc618

View File

@@ -3,13 +3,14 @@
#include "decomp.h"
#include "mxdsbuffer.h"
#include "mxdsstreamingaction.h"
#include "mxstl/stlcompat.h"
#include "mxstreamcontroller.h"
#include "mxtypes.h"
#include <string.h>
class MxDSStreamingAction;
// VTABLE: LEGO1 0x100dccb8
// SIZE 0xc8
class MxDiskStreamController : public MxStreamController {

View File

@@ -2,13 +2,14 @@
#define MXDISPLAYSURFACE_H
#include "decomp.h"
#include "mxbitmap.h"
#include "mxcore.h"
#include "mxpalette.h"
#include "mxvideoparam.h"
#include <ddraw.h>
class MxBitmap;
class MxPalette;
// VTABLE: LEGO1 0x100dc768
// SIZE 0xac
class MxDisplaySurface : public MxCore {

View File

@@ -2,10 +2,9 @@
#define MXDSACTIONLIST_H
#include "decomp.h"
#include "mxdsaction.h"
#include "mxlist.h"
class MxDSAction;
// VTABLE: LEGO1 0x100dcea8
// class MxCollection<MxDSAction *>
@@ -31,7 +30,7 @@ public:
// MxDSActionList::`scalar deleting destructor'
private:
undefined m_unk0x18;
undefined m_unk0x18; // 0x18
};
// VTABLE: LEGO1 0x100d7e68

View File

@@ -3,7 +3,6 @@
#include "decomp.h"
#include "mxdsaction.h"
#include "mxpoint32.h"
// VTABLE: LEGO1 0x100dcd40
// SIZE 0xb8

View File

@@ -3,8 +3,6 @@
#include "decomp.h"
#include "mxcore.h"
#include "mxdschunk.h"
#include "mxstreamchunk.h"
#include "mxstreamchunklist.h"
class MxStreamController;

View File

@@ -4,9 +4,10 @@
#include "mxcore.h"
#include "mxcriticalsection.h"
#include "mxpresenterlist.h"
#include "mxthread.h"
#include "mxtypes.h"
class MxThread;
// VTABLE: LEGO1 0x100dc6b0
// SIZE 0x2c
class MxMediaManager : public MxCore {

View File

@@ -2,10 +2,11 @@
#define MXMEDIAPRESENTER_H
#include "decomp.h"
#include "mxdssubscriber.h"
#include "mxpresenter.h"
#include "mxstreamchunklist.h"
class MxDSSubscriber;
// VTABLE: LEGO1 0x100d4cd8
// SIZE 0x50
class MxMediaPresenter : public MxPresenter {

View File

@@ -2,7 +2,8 @@
#define MXMIDIPRESENTER_H
#include "mxmusicpresenter.h"
#include "mxstreamchunk.h"
class MxStreamChunk;
// VTABLE: LEGO1 0x100dca20
// SIZE 0x58
@@ -41,7 +42,7 @@ private:
void Destroy(MxBool p_fromDestructor);
protected:
MxStreamChunk* m_chunk;
MxStreamChunk* m_chunk; // 0x54
};
#endif // MXMIDIPRESENTER_H

View File

@@ -3,10 +3,11 @@
#include "mxcore.h"
#include "mxcriticalsection.h"
#include "mxnotificationparam.h"
#include "mxstl/stlcompat.h"
#include "mxtypes.h"
class MxNotificationParam;
class MxNotification {
public:
MxNotification(MxCore* p_target, const MxNotificationParam& p_param);

View File

@@ -3,6 +3,7 @@
#include "mxtypes.h"
// SIZE 0x02
class MxOmniCreateFlags {
public:
MxOmniCreateFlags();

View File

@@ -32,10 +32,10 @@ public:
// MxOmniCreateParam::`scalar deleting destructor'
private:
MxString m_mediaPath;
HWND m_windowHandle;
MxVideoParam m_videoParam;
MxOmniCreateFlags m_createFlags;
MxString m_mediaPath; // 0x04
HWND m_windowHandle; // 0x14
MxVideoParam m_videoParam; // 0x18
MxOmniCreateFlags m_createFlags; // 0x3c
};
// SYNTHETIC: ISLE 0x4014b0

View File

@@ -4,10 +4,11 @@
#include "decomp.h"
#include "mxcore.h"
#include "mxcriticalsection.h"
#include "mxdsaction.h"
#include "mxpoint32.h"
class MxCompositePresenter;
class MxDSAction;
class MxOmni;
class MxStreamController;
class MxEntity;
@@ -107,7 +108,7 @@ public:
virtual void Enable(MxBool p_enable); // vtable+0x54
MxEntity* CreateEntity(const char* p_defaultName);
void SendToCompositePresenter(MxOmni*);
void SendToCompositePresenter(MxOmni* p_omni);
MxBool IsEnabled();
inline MxS32 GetCurrentTickleState() const { return this->m_currentTickleState; }

View File

@@ -2,9 +2,10 @@
#define MXRAMSTREAMCONTROLLER_H
#include "mxdsbuffer.h"
#include "mxdsstreamingaction.h"
#include "mxstreamcontroller.h"
class MxDSStreamingAction;
// VTABLE: LEGO1 0x100dc728
// SIZE 0x98
class MxRAMStreamController : public MxStreamController {

View File

@@ -2,12 +2,13 @@
#define MXSMACK_H
#include "decomp.h"
#include "mxbitmap.h"
#include "mxrectlist.h"
#include "mxtypes.h"
#include <smack.h>
struct MxBITMAPINFO;
// These functions are not part of the public interface,
// but present in SMACK.LIB and used directly by Mindscape.
extern "C"

View File

@@ -2,7 +2,6 @@
#define MXSTREAMCHUNK_H
#include "mxdschunk.h"
#include "mxdsobject.h"
class MxDSBuffer;
class MxStreamListMxDSSubscriber;

View File

@@ -3,8 +3,7 @@
#include "decomp.h"
#include "mxlist.h"
class MxStreamChunk;
#include "mxstreamchunk.h"
// VTABLE: LEGO1 0x100dc5d0
// class MxCollection<MxStreamChunk *>

View File

@@ -5,14 +5,12 @@
#include "mxatom.h"
#include "mxcore.h"
#include "mxcriticalsection.h"
#include "mxdsaction.h"
#include "mxdsobject.h"
#include "mxdssubscriber.h"
#include "mxstl/stlcompat.h"
#include "mxstreamlist.h"
#include "mxstreamprovider.h"
class MxDSStreamingAction;
class MxStreamProvider;
// VTABLE: LEGO1 0x100dc968
// SIZE 0x64

View File

@@ -3,19 +3,21 @@
#include "decomp.h"
#include "mxcore.h"
#include "mxdsobject.h"
#include "mxmemorypool.h"
#include "mxnotificationparam.h"
#include "mxstl/stlcompat.h"
#include "mxstreamcontroller.h"
#include "mxtypes.h"
#include <assert.h>
#include <list>
class MxDSObject;
typedef MxMemoryPool<64, 22> MxMemoryPool64;
typedef MxMemoryPool<128, 2> MxMemoryPool128;
// VTABLE: LEGO1 0x100dc760
// SIZE 0x10
class MxStreamerNotification : public MxNotificationParam {
public:
inline MxStreamerNotification(NotificationId p_type, MxCore* p_sender, MxStreamController* p_ctrlr)
@@ -29,7 +31,7 @@ public:
MxStreamController* GetController() { return m_controller; }
private:
MxStreamController* m_controller;
MxStreamController* m_controller; // 0x0c
};
// VTABLE: LEGO1 0x100dc710

View File

@@ -3,10 +3,10 @@
#include "decomp.h"
#include "mxcore.h"
#include "mxdsfile.h"
class MxStreamController;
class MxDSAction;
class MxDSFile;
// VTABLE: LEGO1 0x100dd100
// SIZE 0x10

View File

@@ -10,6 +10,7 @@
class MxVariable {
public:
MxVariable() {}
// FUNCTION: BETA10 0x1012a840
MxVariable(const char* p_key, const char* p_value)
{
@@ -17,6 +18,7 @@ public:
m_key.ToUpperCase();
m_value = p_value;
}
// FUNCTION: BETA10 0x1012aa30
MxVariable(const char* p_key)
{

View File

@@ -1,14 +1,15 @@
#ifndef MXVIDEOMANAGER_H
#define MXVIDEOMANAGER_H
#include "mxdisplaysurface.h"
#include "mxmediamanager.h"
#include "mxrect32.h"
#include "mxregion.h"
#include "mxvideoparam.h"
#include <d3d.h>
class MxDisplaySurface;
class MxRect32;
class MxRegion;
// VTABLE: LEGO1 0x100dc810
// SIZE 0x64
class MxVideoManager : public MxMediaManager {

View File

@@ -2,14 +2,14 @@
#define MXVIDEOPARAM_H
#include "compat.h"
#include "mxpalette.h"
#include "mxrect32.h"
#include "mxtypes.h"
#include "mxvariabletable.h"
#include "mxvideoparamflags.h"
#include <ddraw.h>
class MxPalette;
// SIZE 0x24
class MxVideoParam {
public:

View File

@@ -6,6 +6,8 @@
#include "mxmediapresenter.h"
#include "mxrect32.h"
#include <ddraw.h>
// VTABLE: LEGO1 0x100d4be8
// SIZE 0x64
class MxVideoPresenter : public MxMediaPresenter {

View File

@@ -3,6 +3,7 @@
#include "decomp.h"
#include "mxautolock.h"
#include "mxdssound.h"
#include "mxdssubscriber.h"
#include "mxmisc.h"
#include "mxmusicmanager.h"

View File

@@ -1,6 +1,7 @@
#include "mxmusicmanager.h"
#include "mxmisc.h"
#include "mxthread.h"
#include "mxticklemanager.h"
#include <windows.h>

View File

@@ -1,9 +1,11 @@
#include "mxsoundmanager.h"
#include "mxautolock.h"
#include "mxdsaction.h"
#include "mxmisc.h"
#include "mxomni.h"
#include "mxpresenter.h"
#include "mxthread.h"
#include "mxticklemanager.h"
#include "mxwavepresenter.h"

View File

@@ -4,6 +4,7 @@
#include "define.h"
#include "mxautolock.h"
#include "mxdssound.h"
#include "mxdssubscriber.h"
#include "mxmisc.h"
#include "mxomni.h"
#include "mxsoundmanager.h"

View File

@@ -1,6 +1,7 @@
#include "mxcompositepresenter.h"
#include "decomp.h"
#include "mxactionnotificationparam.h"
#include "mxautolock.h"
#include "mxdsmultiaction.h"
#include "mxmisc.h"

View File

@@ -3,6 +3,7 @@
#include "mxactionnotificationparam.h"
#include "mxautolock.h"
#include "mxcompositepresenter.h"
#include "mxdssubscriber.h"
#include "mxmisc.h"
#include "mxnotificationmanager.h"
#include "mxstreamchunk.h"

View File

@@ -2,6 +2,8 @@
#include "decomp.h"
#include "mxautolock.h"
#include "mxdsaction.h"
#include "mxdssubscriber.h"
#include "mxeventmanager.h"
#include "mxmisc.h"
#include "mxvariabletable.h"

View File

@@ -15,6 +15,7 @@
#include "mxstreamer.h"
#include "mxticklemanager.h"
#include "mxtimer.h"
#include "mxvariabletable.h"
#include "mxvideomanager.h"
// GLOBAL: LEGO1 0x101015b8

View File

@@ -1,5 +1,9 @@
#include "mxomnicreateflags.h"
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxOmniCreateFlags, 0x02)
// FUNCTION: LEGO1 0x100b0a30
// FUNCTION: BETA10 0x10130a1c
MxOmniCreateFlags::MxOmniCreateFlags()

View File

@@ -1,5 +1,9 @@
#include "mxomnicreateparam.h"
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxOmniCreateParam, 0x40)
// FUNCTION: LEGO1 0x100b0b00
// FUNCTION: BETA10 0x10130b6b
MxOmniCreateParam::MxOmniCreateParam(

View File

@@ -4,6 +4,7 @@
#include "decomp.h"
#include "mxautolock.h"
#include "mxmisc.h"
#include "mxnotificationparam.h"
#include "mxparam.h"
#include "mxticklemanager.h"
#include "mxtypes.h"

View File

@@ -3,6 +3,7 @@
#include "mxautolock.h"
#include "mxdiskstreamcontroller.h"
#include "mxdsbuffer.h"
#include "mxdsfile.h"
#include "mxdsstreamingaction.h"
#include "mxomni.h"
#include "mxramstreamprovider.h"

View File

@@ -8,6 +8,7 @@
#include "mxstreamchunk.h"
#include "mxstreamcontroller.h"
#include "mxstreamer.h"
#include "mxstreamprovider.h"
DECOMP_SIZE_ASSERT(MxDSBuffer, 0x34);

View File

@@ -2,6 +2,7 @@
#include "decomp.h"
#include "mxdsbuffer.h"
#include "mxdsfile.h"
#include "mxomni.h"
#include "mxstreamcontroller.h"

View File

@@ -7,6 +7,7 @@
#include "mxnextactiondatastart.h"
#include "mxstl/stlcompat.h"
#include "mxstreamchunk.h"
#include "mxstreamprovider.h"
#include "mxtimer.h"
#include "mxutilities.h"

View File

@@ -1,5 +1,7 @@
#include "mxautolock.h"
#include "mxcriticalsection.h"
// FUNCTION: LEGO1 0x100b8ed0
MxAutoLock::MxAutoLock(MxCriticalSection* p_criticalSection)
{

View File

@@ -1,6 +1,7 @@
#include "mxbitmap.h"
#include "decomp.h"
#include "mxpalette.h"
#include "mxutilities.h"
DECOMP_SIZE_ASSERT(MxBitmap, 0x20);

View File

@@ -1,7 +1,9 @@
#include "mxdisplaysurface.h"
#include "mxbitmap.h"
#include "mxmisc.h"
#include "mxomni.h"
#include "mxpalette.h"
#include "mxutilities.h"
#include "mxvideomanager.h"

View File

@@ -1,6 +1,8 @@
#include "mxloopingflcpresenter.h"
#include "decomp.h"
#include "mxdsaction.h"
#include "mxdssubscriber.h"
DECOMP_SIZE_ASSERT(MxLoopingFlcPresenter, 0x6c);

View File

@@ -2,6 +2,7 @@
#include "mxautolock.h"
#include "mxdsmediaaction.h"
#include "mxdssubscriber.h"
DECOMP_SIZE_ASSERT(MxLoopingSmkPresenter, 0x724);

View File

@@ -1,5 +1,7 @@
#include "mxsmack.h"
#include "mxbitmap.h"
#include <string.h>
DECOMP_SIZE_ASSERT(SmackTag, 0x390);

View File

@@ -3,6 +3,7 @@
#include "decomp.h"
#include "mxdsmediaaction.h"
#include "mxmisc.h"
#include "mxpalette.h"
#include "mxvideomanager.h"
DECOMP_SIZE_ASSERT(MxSmkPresenter, 0x720);

View File

@@ -3,9 +3,12 @@
#include "decomp.h"
#include "define.h"
#include "mxcompositepresenter.h"
#include "mxdisplaysurface.h"
#include "mxdsmediaaction.h"
#include "mxdssubscriber.h"
#include "mxmisc.h"
#include "mxomni.h"
#include "mxpalette.h"
#include "mxutilities.h"
#include "mxvideomanager.h"

View File

@@ -1,9 +1,13 @@
#include "mxvideomanager.h"
#include "mxautolock.h"
#include "mxdisplaysurface.h"
#include "mxmisc.h"
#include "mxomni.h"
#include "mxpalette.h"
#include "mxpresenter.h"
#include "mxregion.h"
#include "mxthread.h"
#include "mxticklemanager.h"
DECOMP_SIZE_ASSERT(MxVideoManager, 0x64)

View File

@@ -1,7 +1,9 @@
#include "mxvideopresenter.h"
#include "mxautolock.h"
#include "mxdisplaysurface.h"
#include "mxdsmediaaction.h"
#include "mxdssubscriber.h"
#include "mxmisc.h"
#include "mxregioncursor.h"
#include "mxvideomanager.h"