MxOmni::Create: 31.44%

This commit is contained in:
Misha 2023-10-07 11:49:59 -04:00
parent 69957fe6dc
commit f781da9de0
6 changed files with 36 additions and 13 deletions

View File

@ -93,7 +93,7 @@ void IsleApp::Close()
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetObjectId()); Lego()->RemoveWorld(ds.GetAtomId(), ds.GetObjectId());
Lego()->DeleteObject(ds); Lego()->DeleteObject(ds);
TransitionManager()->SetWaitIndicator(NULL); TransitionManager()->SetWaitIndicator(NULL);
Lego()->vtable0x3c(); Lego()->StopTimer();
MxLong lVar8; MxLong lVar8;
do { do {
@ -232,7 +232,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
g_reqEnableRMDevice = 0; g_reqEnableRMDevice = 0;
VideoManager()->EnableRMDevice(); VideoManager()->EnableRMDevice();
g_rmDisabled = 0; g_rmDisabled = 0;
Lego()->vtable0x3c(); Lego()->StopTimer();
} }
if (g_closed) { if (g_closed) {

View File

@ -176,7 +176,8 @@ MxResult MxOmni::Create(MxOmniCreateParam &p)
{ {
goto failure; goto failure;
} }
m_mediaPath = p.GetMediaPath();
m_windowHandle = p.GetWindowHandle();
if (p.CreateFlags().CreateObjectFactory()) if (p.CreateFlags().CreateObjectFactory())
{ {
MxObjectFactory *objectFactory = new MxObjectFactory(); MxObjectFactory *objectFactory = new MxObjectFactory();
@ -218,7 +219,7 @@ MxResult MxOmni::Create(MxOmniCreateParam &p)
MxNotificationManager *notificationManager = new MxNotificationManager(); MxNotificationManager *notificationManager = new MxNotificationManager();
this->m_notificationManager = notificationManager; this->m_notificationManager = notificationManager;
if (notificationManager == NULL) if (notificationManager == NULL || notificationManager->Create(100, 0) != SUCCESS)
goto failure; goto failure;
} }
@ -227,7 +228,7 @@ MxResult MxOmni::Create(MxOmniCreateParam &p)
MxStreamer *streamer = new MxStreamer(); MxStreamer *streamer = new MxStreamer();
this->m_streamer = streamer; this->m_streamer = streamer;
if (streamer == NULL) if (streamer == NULL || streamer->Init() != SUCCESS)
goto failure; goto failure;
} }
@ -236,8 +237,11 @@ MxResult MxOmni::Create(MxOmniCreateParam &p)
MxVideoManager *videoManager = new MxVideoManager(); MxVideoManager *videoManager = new MxVideoManager();
this->m_videoManager = videoManager; this->m_videoManager = videoManager;
if (videoManager == NULL) if (videoManager != NULL && videoManager->vtable0x2c(p.GetVideoParam(), 100, 0) != 0)
return FAILURE; {
delete m_videoManager;
m_videoManager = NULL;
}
} }
if (p.CreateFlags().CreateSoundManager()) if (p.CreateFlags().CreateSoundManager())
@ -246,9 +250,10 @@ MxResult MxOmni::Create(MxOmniCreateParam &p)
this->m_soundManager = soundManager; this->m_soundManager = soundManager;
//TODO //TODO
if (soundManager != NULL) if (soundManager != NULL && soundManager->StartDirectSound(10, 0) != FAILURE)
{ {
delete m_soundManager;
m_soundManager = NULL;
} }
} }

View File

@ -16,7 +16,6 @@
#include "mxvariabletable.h" #include "mxvariabletable.h"
#include "mxvideomanager.h" #include "mxvideomanager.h"
#include "mxatomidcounter.h" #include "mxatomidcounter.h"
#include "mxmidimanager.h"
#include "mxautolocker.h" #include "mxautolocker.h"
// VTABLE 0x100dc168 // VTABLE 0x100dc168

View File

@ -15,6 +15,10 @@ class MxOmniCreateParam : public MxOmniCreateParamBase
const MxOmniCreateFlags& CreateFlags() const { return this->m_createFlags; } const MxOmniCreateFlags& CreateFlags() const { return this->m_createFlags; }
const MxString GetMediaPath() const { return m_mediaPath; }
const HWND GetWindowHandle() const { return m_windowHandle; }
MxVideoParam& GetVideoParam() { return m_videoParam; }
private: private:
MxString m_mediaPath; MxString m_mediaPath;
HWND m_windowHandle; HWND m_windowHandle;

View File

@ -111,3 +111,15 @@ MxLong MxVideoManager::RealizePalette(MxPalette *p_palette)
this->m_criticalSection.Leave(); this->m_criticalSection.Leave();
return 0; return 0;
} }
// OFFSET: LEGO1 0x100bebe0 STUB
void MxVideoManager::vtable0x28()
{
}
// OFFSET: LEGO1 0x100bebe0 STUB
MxResult MxVideoManager::vtable0x2c(MxVideoParam& p_videoParam, undefined4 p_unknown1, MxU8 p_unknown2)
{
return FAILURE;
}

View File

@ -15,6 +15,9 @@ class MxVideoManager : public MxMediaManager
virtual MxResult Tickle(); // vtable+0x8 virtual MxResult Tickle(); // vtable+0x8
virtual void vtable0x28(); // vtable+0x28 (TODO ARGUMENTS)
virtual MxResult vtable0x2c(MxVideoParam& p_videoParam, undefined4 p_unknown1, MxU8 p_unknown2); // vtable+0x2c
__declspec(dllexport) void InvalidateRect(MxRect32 &); __declspec(dllexport) void InvalidateRect(MxRect32 &);
__declspec(dllexport) virtual MxLong RealizePalette(MxPalette *); // vtable+0x30 __declspec(dllexport) virtual MxLong RealizePalette(MxPalette *); // vtable+0x30