mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
implemented some parts of MxOmni and LegoOmni
This commit is contained in:
parent
d774644b4a
commit
f8263a3ef8
12 changed files with 167 additions and 16 deletions
|
@ -1,4 +1,4 @@
|
|||
#include <windows.h>
|
||||
#include "legoinc.h"
|
||||
|
||||
// OFFSET: LEGO1 0x10091ee0
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
|
|
10
LEGO1/legoinc.h
Normal file
10
LEGO1/legoinc.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef LEGOINC_H
|
||||
#define LEGOINC_H
|
||||
|
||||
// It is recommended to include this over <windows.h> directly because this way
|
||||
// we can undef stuff that might cause issues with our code.
|
||||
|
||||
#include <windows.h>
|
||||
#undef GetClassName
|
||||
|
||||
#endif // LEGOINC_H
|
|
@ -1,5 +1,17 @@
|
|||
#include "legoomni.h"
|
||||
|
||||
// OFFSET: LEGO1 0x10058a00
|
||||
LegoOmni::LegoOmni()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058b50
|
||||
LegoOmni::~LegoOmni()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005ad10
|
||||
LegoOmni *LegoOmni::GetInstance()
|
||||
{
|
||||
|
@ -17,3 +29,87 @@ LegoVideoManager *VideoManager()
|
|||
{
|
||||
return LegoOmni::GetInstance()->GetVideoManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b5f0
|
||||
long LegoOmni::Notify(MxParam &p)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058aa0
|
||||
const char *LegoOmni::GetClassName() const
|
||||
{
|
||||
return "LegoOmni";
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058ab0
|
||||
MxBool LegoOmni::IsClass(const char *name) const
|
||||
{
|
||||
return strcmp("LegoOmni", name) == 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058bd0
|
||||
void LegoOmni::Init()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058e70
|
||||
MxResult LegoOmni::Create(MxOmniCreateParam &p)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
void LegoOmni::Destroy()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable20()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable24(MxDSAction &ds)
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
MxBool LegoOmni::vtable28(MxDSAction &ds)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return MX_TRUE;
|
||||
}
|
||||
|
||||
void LegoOmni::vtable2c()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable30()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable34()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable38()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable3c()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
unsigned char LegoOmni::vtable40()
|
||||
{
|
||||
// FIXME: Stub
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ class LegoOmni : public MxOmni
|
|||
__declspec(dllexport) static void CreateInstance();
|
||||
__declspec(dllexport) static LegoOmni *GetInstance();
|
||||
|
||||
LegoOmni();
|
||||
virtual ~LegoOmni(); // vtable+00
|
||||
|
||||
virtual long Notify(MxParam &p); // vtable+04
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef MXCRITICALSECTION_H
|
||||
#define MXCRITICALSECTION_H
|
||||
|
||||
#include <windows.h>
|
||||
#include "legoinc.h"
|
||||
|
||||
class MxCriticalSection
|
||||
{
|
||||
|
|
|
@ -3,6 +3,35 @@
|
|||
// 0x101015b0
|
||||
MxOmni* MxOmni::m_instance = NULL;
|
||||
|
||||
// OFFSET: LEGO1 0x100aef10
|
||||
MxOmni::MxOmni()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100aeff0
|
||||
MxOmni::~MxOmni()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void MxOmni::Init()
|
||||
{
|
||||
m_windowHandle = NULL;
|
||||
m_objectFactory = NULL;
|
||||
m_variableTable = NULL;
|
||||
m_tickleManager = NULL;
|
||||
m_notificationManager = NULL;
|
||||
m_videoManager = NULL;
|
||||
m_soundManager = NULL;
|
||||
m_musicManager = NULL;
|
||||
m_eventManager = NULL;
|
||||
m_timer = NULL;
|
||||
m_streamer = NULL;
|
||||
m_unk44 = NULL;
|
||||
m_unk64 = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b0680
|
||||
MxOmni *MxOmni::GetInstance()
|
||||
{
|
||||
|
@ -23,3 +52,16 @@ MxResult MxOmni::Create(MxOmniCreateParam &p)
|
|||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100afe90
|
||||
void MxOmni::Destroy()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b07f0
|
||||
long MxOmni::Notify(MxParam &p)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -53,11 +53,11 @@ class MxOmni : public MxCore
|
|||
MxTimer* m_timer; //0x3C
|
||||
MxStreamer* m_streamer; //0x40
|
||||
|
||||
char unknown44[0x4]; // 0x44
|
||||
int m_unk44; // 0x44
|
||||
|
||||
MxCriticalSection m_criticalsection; // 0x48
|
||||
|
||||
char unknown64[0x4]; // 0x64
|
||||
int m_unk64; // 0x64
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef MXOMNICREATEPARAM_H
|
||||
#define MXOMNICREATEPARAM_H
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "legoinc.h"
|
||||
#include "mxomnicreateflags.h"
|
||||
#include "mxomnicreateparambase.h"
|
||||
#include "mxstring.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "mxtimer.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include "legoinc.h"
|
||||
|
||||
// 0x10101414
|
||||
long MxTimer::s_LastTimeCalculated = 0;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include "mxvideoparam.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// OFFSET: LEGO1 0x100bec70
|
||||
MxVideoParam::MxVideoParam()
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ class MxVideoParam
|
|||
int m_right;
|
||||
int m_bottom;
|
||||
MxPalette *m_palette;
|
||||
BOOL m_backBuffers;
|
||||
int m_backBuffers;
|
||||
MxVideoParamFlags m_flags;
|
||||
int m_unk1c;
|
||||
char *m_deviceId;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef MXVIDEOPARAMFLAGS_H
|
||||
#define MXVIDEOPARAMFLAGS_H
|
||||
|
||||
#include <windows.h>
|
||||
#include "mxbool.h"
|
||||
|
||||
class MxVideoParamFlags
|
||||
{
|
||||
|
@ -24,22 +24,22 @@ class MxVideoParamFlags
|
|||
|
||||
__declspec(dllexport) MxVideoParamFlags();
|
||||
|
||||
inline void EnableFullScreen(BOOL e)
|
||||
inline void EnableFullScreen(MxBool e)
|
||||
{
|
||||
m_flags1 = (m_flags1 ^ (e << 0)) & FULL_SCREEN ^ m_flags1;
|
||||
}
|
||||
|
||||
inline void EnableFlipSurfaces(BOOL e)
|
||||
inline void EnableFlipSurfaces(MxBool e)
|
||||
{
|
||||
m_flags1 = (m_flags1 ^ (e << 1)) & FLIP_SURFACES ^ m_flags1;
|
||||
}
|
||||
|
||||
inline void EnableBackBuffers(BOOL e)
|
||||
inline void EnableBackBuffers(MxBool e)
|
||||
{
|
||||
m_flags1 = (m_flags1 ^ ((!e) << 2)) & BACK_BUFFERS ^ m_flags1;
|
||||
}
|
||||
|
||||
inline void SetUnknown3(BOOL e)
|
||||
inline void SetUnknown3(MxBool e)
|
||||
{
|
||||
m_flags1 = (m_flags1 ^ (e << 7)) & UNKNOWN3 ^ m_flags1;
|
||||
}
|
||||
|
@ -59,17 +59,17 @@ class MxVideoParamFlags
|
|||
m_flags1 = ((e << 5) ^ m_flags1) & ENABLE_16BIT ^ m_flags1;
|
||||
}
|
||||
|
||||
inline void EnableWideViewAngle(BOOL e)
|
||||
inline void EnableWideViewAngle(MxBool e)
|
||||
{
|
||||
m_flags1 = (m_flags1 ^ (e << 6)) & WIDE_VIEW_ANGLE ^ m_flags1;
|
||||
}
|
||||
|
||||
inline void EnableUnknown1(BOOL e)
|
||||
inline void EnableUnknown1(MxBool e)
|
||||
{
|
||||
m_flags2 = (m_flags2 ^ ((!e) << 0)) & UNKNOWN1 ^ m_flags2;
|
||||
}
|
||||
|
||||
inline void EnableUnknown2(BOOL e)
|
||||
inline void EnableUnknown2(MxBool e)
|
||||
{
|
||||
m_flags2 = (m_flags2 ^ (e << 1)) & UNKNOWN2 ^ m_flags2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue