diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f07a7d26..3e98bafd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,8 +32,7 @@ jobs: C:\msys64\usr\bin\wget.exe https://archive.org/download/idx5sdk/idx5sdk.exe 7z x .\idx5sdk.exe 7z x .\DX5SDK.EXE - cd cdrom - + - name: Cache DX5 SDK if: steps.cache-dx5.outputs.cache-hit != 'true' id: save-dx5 @@ -41,13 +40,13 @@ jobs: with: path: dx5sdk key: dx5sdk - + - name: Setup DX5 SDK run: | cd dx5sdk cd cdrom .\SETUP.EXE /s - + - name: Build shell: cmd run: | diff --git a/ISLE/isle.cpp b/ISLE/isle.cpp index b2ab17a9..140e1862 100644 --- a/ISLE/isle.cpp +++ b/ISLE/isle.cpp @@ -54,7 +54,7 @@ Isle::Isle() Isle::~Isle() { if (LegoOmni::GetInstance()) { - close(); + Close(); MxOmni::DestroyInstance(); } @@ -76,7 +76,7 @@ Isle::~Isle() } // OFFSET: ISLE 0x401260 -void Isle::close() +void Isle::Close() { MxDSAction ds; @@ -111,7 +111,7 @@ void Isle::close() } // OFFSET: ISLE 0x402740 -BOOL readReg(LPCSTR name, LPSTR outValue, DWORD outSize) +BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize) { HKEY hKey; DWORD valueType; @@ -130,11 +130,11 @@ BOOL readReg(LPCSTR name, LPSTR outValue, DWORD outSize) } // OFFSET: ISLE 0x4027b0 -int readRegBool(LPCSTR name, BOOL *out) +int ReadRegBool(LPCSTR name, BOOL *out) { char buffer[256]; - BOOL read = readReg(name, buffer, 0x100); + BOOL read = ReadReg(name, buffer, sizeof(buffer)); if (read) { if (strcmp("YES", buffer) == 0) { *out = TRUE; @@ -150,11 +150,11 @@ int readRegBool(LPCSTR name, BOOL *out) } // OFFSET: ISLE 0x402880 -int readRegInt(LPCSTR name, int *out) +int ReadRegInt(LPCSTR name, int *out) { char buffer[256]; - if (readReg(name, buffer, 0x100)) { + if (ReadReg(name, buffer, sizeof(buffer))) { *out = atoi(buffer); return TRUE; } @@ -163,13 +163,11 @@ int readRegInt(LPCSTR name, int *out) } // OFFSET: ISLE 0x4028d0 -void Isle::loadConfig() +void Isle::LoadConfig() { - #define BUFFER_SIZE 1024 + char buffer[1024]; - char buffer[BUFFER_SIZE]; - - if (!readReg("diskpath", buffer, BUFFER_SIZE)) { + if (!ReadReg("diskpath", buffer, sizeof(buffer))) { strcpy(buffer, MxOmni::GetHD()); } @@ -177,7 +175,7 @@ void Isle::loadConfig() strcpy(m_hdPath, buffer); MxOmni::SetHD(m_hdPath); - if (!readReg("cdpath", buffer, BUFFER_SIZE)) { + if (!ReadReg("cdpath", buffer, sizeof(buffer))) { strcpy(buffer, MxOmni::GetCD()); } @@ -185,22 +183,22 @@ void Isle::loadConfig() strcpy(m_cdPath, buffer); MxOmni::SetCD(m_cdPath); - readRegBool("Flip Surfaces", &m_flipSurfaces); - readRegBool("Full Screen", &m_fullScreen); - readRegBool("Wide View Angle", &m_wideViewAngle); - readRegBool("3DSound", &m_use3dSound); - readRegBool("Music", &m_useMusic); - readRegBool("UseJoystick", &m_useJoystick); - readRegInt("JoystickIndex", &m_joystickIndex); - readRegBool("Draw Cursor", &m_drawCursor); + ReadRegBool("Flip Surfaces", &m_flipSurfaces); + ReadRegBool("Full Screen", &m_fullScreen); + ReadRegBool("Wide View Angle", &m_wideViewAngle); + ReadRegBool("3DSound", &m_use3dSound); + ReadRegBool("Music", &m_useMusic); + ReadRegBool("UseJoystick", &m_useJoystick); + ReadRegInt("JoystickIndex", &m_joystickIndex); + ReadRegBool("Draw Cursor", &m_drawCursor); int backBuffersInVRAM; - if (readRegBool("Back Buffers in Video RAM",&backBuffersInVRAM)) { + if (ReadRegBool("Back Buffers in Video RAM",&backBuffersInVRAM)) { m_backBuffersInVram = !backBuffersInVRAM; } int bitDepth; - if (readRegInt("Display Bit Depth", &bitDepth)) { + if (ReadRegInt("Display Bit Depth", &bitDepth)) { if (bitDepth == 8) { m_using8bit = TRUE; } else if (bitDepth == 16) { @@ -208,29 +206,29 @@ void Isle::loadConfig() } } - if (!readReg("Island Quality", buffer, BUFFER_SIZE)) { + if (!ReadReg("Island Quality", buffer, sizeof(buffer))) { strcpy(buffer, "1"); } m_islandQuality = atoi(buffer); - if (!readReg("Island Texture", buffer, BUFFER_SIZE)) { + if (!ReadReg("Island Texture", buffer, sizeof(buffer))) { strcpy(buffer, "1"); } m_islandTexture = atoi(buffer); - if (readReg("3D Device ID", buffer, BUFFER_SIZE)) { + if (ReadReg("3D Device ID", buffer, sizeof(buffer))) { m_deviceId = new char[strlen(buffer) + 1]; strcpy(m_deviceId, buffer); } - if (readReg("savepath", buffer, BUFFER_SIZE)) { + if (ReadReg("savepath", buffer, sizeof(buffer))) { m_savePath = new char[strlen(buffer) + 1]; strcpy(m_savePath, buffer); } } // OFFSET: ISLE 0x401560 -void Isle::setupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers, +void Isle::SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers, BOOL using8bit, BOOL m_using16bit, BOOL param_6, BOOL param_7, BOOL wideViewAngle, char *deviceId) { @@ -251,10 +249,10 @@ void Isle::setupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers, } // OFFSET: ISLE 0x4013b0 -BOOL Isle::setupLegoOmni() +BOOL Isle::SetupLegoOmni() { char mediaPath[256]; - GetProfileStringA("LEGO Island", "MediaPath", "", mediaPath, 256); + GetProfileStringA("LEGO Island", "MediaPath", "", mediaPath, sizeof(mediaPath)); if (Lego()->Create(MxOmniCreateParam(mediaPath, (struct HWND__ *) m_windowHandle, m_videoParam, MxOmniCreateFlags())) != FAILURE) { VariableTable()->SetVariable("ACTOR_01", ""); @@ -266,7 +264,7 @@ BOOL Isle::setupLegoOmni() } // OFFSET: ISLE 0x402e80 -void Isle::setupCursor(WPARAM wParam) +void Isle::SetupCursor(WPARAM wParam) { switch (wParam) { case 0: @@ -348,13 +346,13 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } return DefWindowProcA(hWnd,WM_SYSCOMMAND,wParam,lParam); case WM_EXITMENULOOP: - return DefWindowProcA(hWnd,WM_EXITMENULOOP,wParam,lParam); + return DefWindowProcA(hWnd, WM_EXITMENULOOP, wParam, lParam); case WM_MOVING: if (g_isle && g_isle->m_fullScreen) { GetWindowRect(hWnd, (LPRECT) lParam); return 0; } - return DefWindowProcA(hWnd,WM_MOVING,wParam,lParam); + return DefWindowProcA(hWnd, WM_MOVING, wParam, lParam); case WM_NCPAINT: if (g_isle && g_isle->m_fullScreen) { return 0; @@ -396,8 +394,10 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) switch (uMsg) { case WM_KEYDOWN: - if (lParam & 0x40000000) { - return DefWindowProcA(hWnd,WM_KEYDOWN,wParam,lParam); + // While this probably should be (HIWORD(lParam) & KF_REPEAT), this seems + // to be what the assembly is actually doing + if (lParam & (KF_REPEAT << 16)) { + return DefWindowProcA(hWnd, WM_KEYDOWN, wParam, lParam); } keyCode = wParam; type = KEYDOWN; @@ -428,7 +428,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) break; case 0x5400: if (g_isle) { - g_isle->setupCursor(wParam); + g_isle->SetupCursor(wParam); return 0; } } @@ -457,14 +457,14 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } // OFFSET: ISLE 0x4023e0 -MxResult Isle::setupWindow(HINSTANCE hInstance) +MxResult Isle::SetupWindow(HINSTANCE hInstance) { WNDCLASSA wndclass; ZeroMemory(&wndclass, sizeof(WNDCLASSA)); - loadConfig(); + LoadConfig(); - setupVideoFlags(m_fullScreen, m_flipSurfaces, m_backBuffersInVram, m_using8bit, + SetupVideoFlags(m_fullScreen, m_flipSurfaces, m_backBuffersInVram, m_using8bit, m_using16bit, m_unk24, FALSE, m_wideViewAngle, m_deviceId); MxOmni::SetSound3D(m_use3dSound); @@ -525,7 +525,7 @@ MxResult Isle::setupWindow(HINSTANCE hInstance) ShowWindow(m_windowHandle, SW_SHOWNORMAL); UpdateWindow(m_windowHandle); - if (!setupLegoOmni()) { + if (!SetupLegoOmni()) { return FAILURE; } @@ -565,7 +565,7 @@ MxResult Isle::setupWindow(HINSTANCE hInstance) } // OFFSET: ISLE 0x402c20 -void Isle::tick(BOOL sleepIfNotNextFrame) +void Isle::Tick(BOOL sleepIfNotNextFrame) { if (this->m_windowActive) { if (!Lego()) return; @@ -603,7 +603,7 @@ void Isle::tick(BOOL sleepIfNotNextFrame) return; } - ds.m_atomId = stream->atom; + ds.setAtomId(stream->atom); ds.m_unk24 = 0xFFFF; ds.m_unk1c = 0; VideoManager()->EnableFullScreenMovie(TRUE, TRUE); @@ -612,7 +612,7 @@ void Isle::tick(BOOL sleepIfNotNextFrame) return; } } else { - ds.m_atomId = stream->atom; + ds.setAtomId(stream->atom); ds.m_unk24 = 0xFFFF; ds.m_unk1c = 0; if (Start(&ds) != SUCCESS) { diff --git a/ISLE/isle.h b/ISLE/isle.h index e23fb8cb..d4f4e42e 100644 --- a/ISLE/isle.h +++ b/ISLE/isle.h @@ -1,7 +1,7 @@ #ifndef ISLE_H #define ISLE_H -#include +#include #include "mxresult.h" #include "mxvideoparam.h" @@ -12,21 +12,21 @@ class Isle Isle(); ~Isle(); - static void close(); + static void Close(); - MxResult setupWindow(HINSTANCE hInstance); + MxResult SetupWindow(HINSTANCE hInstance); - void tick(BOOL sleepIfNotNextFrame); + void Tick(BOOL sleepIfNotNextFrame); - BOOL setupLegoOmni(); - void loadConfig(); - void setupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers, + BOOL SetupLegoOmni(); + void LoadConfig(); + void SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers, BOOL using8bit, BOOL m_using16bit, BOOL param_6, BOOL param_7, BOOL wideViewAngle, char *deviceId); - void setupCursor(WPARAM wParam); + void SetupCursor(WPARAM wParam); -//private: +// private: // 0 LPSTR m_hdPath; diff --git a/ISLE/main.cpp b/ISLE/main.cpp index c4e9f4f3..be56225c 100644 --- a/ISLE/main.cpp +++ b/ISLE/main.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "define.h" #include "isle.h" @@ -21,7 +21,7 @@ BOOL findExistingInstance(void) // OFFSET: ISLE 0x401ce0 BOOL startDirectSound(void) { - LPDIRECTSOUND lpDS = 0; + LPDIRECTSOUND lpDS = NULL; HRESULT ret = DirectSoundCreate(NULL, &lpDS, NULL); if (ret == DS_OK && lpDS != NULL) { lpDS->Release(); @@ -52,7 +52,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine // Throw error if sound unavailable if (!soundReady) { MessageBoxA(NULL, "\"LEGO\xAE Island\" is not detecting a DirectSound compatible sound card. Please quit all other applications and try again.", - "Lego Island Error",0); + "Lego Island Error", MB_OK); return 0; } @@ -60,8 +60,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine g_isle = new Isle(); // Create window - if (g_isle->setupWindow(hInstance) != SUCCESS) { - MessageBoxA(NULL, "\"LEGO\xAE Island\" failed to start. Please quit all other applications and try again.", "LEGO\xAE Island Error",0); + if (g_isle->SetupWindow(hInstance) != SUCCESS) { + MessageBoxA(NULL, "\"LEGO\xAE Island\" failed to start. Please quit all other applications and try again.", "LEGO\xAE Island Error", MB_OK); return 0; } @@ -79,12 +79,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine while (!g_closed) { while (!PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE)) { if (g_isle) { - g_isle->tick(1); + g_isle->Tick(1); } } if (g_isle) { - g_isle->tick(1); + g_isle->Tick(1); } if (g_closed) { @@ -124,7 +124,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } } else if (g_mousemoved) { if (g_isle) { - g_isle->tick(0); + g_isle->Tick(0); } goto LAB_00401bc7; } diff --git a/ISLE/res/isle.rc b/ISLE/res/isle.rc index 59bd314b..4534ea64 100644 Binary files a/ISLE/res/isle.rc and b/ISLE/res/isle.rc differ diff --git a/LEGO1/dllmain.cpp b/LEGO1/dllmain.cpp index 53650bd6..58d0149f 100644 --- a/LEGO1/dllmain.cpp +++ b/LEGO1/dllmain.cpp @@ -1,4 +1,4 @@ -#include +#include // OFFSET: LEGO1 0x10091ee0 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) diff --git a/LEGO1/legoinputmanager.h b/LEGO1/legoinputmanager.h index 2f3f6412..d5d177d0 100644 --- a/LEGO1/legoinputmanager.h +++ b/LEGO1/legoinputmanager.h @@ -3,12 +3,12 @@ __declspec(dllexport) enum NotificationId { - NONE = 0x0, - KEYDOWN = 0x7, - MOUSEUP = 0x8, - MOUSEDOWN = 0x9, - MOUSEMOVE = 0x10, - TIMER = 0xF + NONE = 0, + KEYDOWN = 7, + MOUSEUP = 8, + MOUSEDOWN = 9, + MOUSEMOVE = 10, + TIMER = 15 }; class LegoInputManager diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index 5ab9e866..07ad6c19 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -2,17 +2,20 @@ LegoOmni *LegoOmni::m_instance = NULL; +// OFFSET: LEGO1 0x1005ad10 LegoOmni *LegoOmni::GetInstance() { return m_instance; } +// OFFSET: LEGO1 0x10015700 LegoOmni *Lego() { return LegoOmni::GetInstance(); } +// OFFSET: LEGO1 0x10015720 LegoVideoManager *VideoManager() { return LegoOmni::GetInstance()->GetVideoManager(); -} \ No newline at end of file +} diff --git a/LEGO1/mxatomid.h b/LEGO1/mxatomid.h index 3e3ce24b..537b097e 100644 --- a/LEGO1/mxatomid.h +++ b/LEGO1/mxatomid.h @@ -1,7 +1,9 @@ #ifndef MXATOMID_H #define MXATOMID_H -enum LookupMode; +enum LookupMode +{ +}; class MxAtomId { diff --git a/LEGO1/mxcore.cpp b/LEGO1/mxcore.cpp index da8fe0b9..1187cdbe 100644 --- a/LEGO1/mxcore.cpp +++ b/LEGO1/mxcore.cpp @@ -2,33 +2,40 @@ #include +// 0x1010141c unsigned int g_mxcoreCount = 0; +// OFFSET: LEGO1 0x100ae1a0 MxCore::MxCore() { m_id = g_mxcoreCount; g_mxcoreCount++; } +// OFFSET: LEGO1 0x100ae1e0 MxCore::~MxCore() { } +// OFFSET: LEGO1 0x100ae1f0 long MxCore::Notify(MxParam &p) { return 0; } +// OFFSET: LEGO1 0x10001f70 long MxCore::Tickle() { return 0; } +// OFFSET: LEGO1 0x100144c0 const char *MxCore::GetClassName() const { return "MxCore"; } +// OFFSET: LEGO1 0x100140d0 MxBool MxCore::IsClass(const char *name) const { return strcmp(name, "MxCore") == 0; diff --git a/LEGO1/mxcriticalsection.cpp b/LEGO1/mxcriticalsection.cpp index b94c021c..d0d11f15 100644 --- a/LEGO1/mxcriticalsection.cpp +++ b/LEGO1/mxcriticalsection.cpp @@ -2,8 +2,10 @@ #include +// 0x10101e78 int g_useMutex = 0; +// OFFSET: LEGO1 0x100b6d20 MxCriticalSection::MxCriticalSection() { HANDLE mutex; @@ -19,6 +21,7 @@ MxCriticalSection::MxCriticalSection() this->m_mutex = NULL; } +// OFFSET: LEGO1 0x100b6d60 MxCriticalSection::~MxCriticalSection() { if (this->m_mutex != NULL) @@ -30,11 +33,13 @@ MxCriticalSection::~MxCriticalSection() DeleteCriticalSection(&this->m_criticalSection); } +// OFFSET: LEGO1 0x100b6e00 void MxCriticalSection::SetDoMutex() { g_useMutex = 1; } +// OFFSET: LEGO1 0x100b6d80 void MxCriticalSection::Enter() { DWORD result; @@ -61,6 +66,7 @@ void MxCriticalSection::Enter() } } +// OFFSET: LEGO1 0x100b6de0 void MxCriticalSection::Leave() { if (this->m_mutex != NULL) @@ -70,4 +76,4 @@ void MxCriticalSection::Leave() } LeaveCriticalSection(&this->m_criticalSection); -} \ No newline at end of file +} diff --git a/LEGO1/mxcriticalsection.h b/LEGO1/mxcriticalsection.h index bd84babb..81d96d37 100644 --- a/LEGO1/mxcriticalsection.h +++ b/LEGO1/mxcriticalsection.h @@ -1,7 +1,7 @@ #ifndef MXCRITICALSECTION_H #define MXCRITICALSECTION_H -#include +#include class MxCriticalSection { diff --git a/LEGO1/mxdsaction.h b/LEGO1/mxdsaction.h index d76f6930..aa5a7e4b 100644 --- a/LEGO1/mxdsaction.h +++ b/LEGO1/mxdsaction.h @@ -47,6 +47,11 @@ class MxDSAction int m_unk8c; int m_unk90; + void setAtomId(MxAtomId &atomId) + { + this->m_atomId = atomId; + } + }; #endif // MXDSACTION_H diff --git a/LEGO1/mxomni.cpp b/LEGO1/mxomni.cpp index 261fe7f8..ba87b304 100644 --- a/LEGO1/mxomni.cpp +++ b/LEGO1/mxomni.cpp @@ -1,12 +1,15 @@ #include "mxomni.h" +// 0x101015b0 MxOmni* MxOmni::m_instance = NULL; +// OFFSET: LEGO1 0x100b0680 MxOmni *MxOmni::GetInstance() { return m_instance; } +// OFFSET: LEGO1 0x100af0c0 MxResult MxOmni::Create(const MxOmniCreateParam &p) { if (p.CreateFlags().CreateTimer()) diff --git a/LEGO1/mxomnicreateflags.cpp b/LEGO1/mxomnicreateflags.cpp index 46f735d7..ebed554c 100644 --- a/LEGO1/mxomnicreateflags.cpp +++ b/LEGO1/mxomnicreateflags.cpp @@ -1,5 +1,6 @@ #include "mxomnicreateflags.h" +// OFFSET: LEGO1 0x100b0a30 MxOmniCreateFlags::MxOmniCreateFlags() { this->CreateObjectFactory(MX_TRUE); diff --git a/LEGO1/mxomnicreateparam.cpp b/LEGO1/mxomnicreateparam.cpp index 96bd541d..65db5b8d 100644 --- a/LEGO1/mxomnicreateparam.cpp +++ b/LEGO1/mxomnicreateparam.cpp @@ -1,5 +1,6 @@ #include "mxomnicreateparam.h" +// OFFSET: LEGO1 0x100b0b00 MxOmniCreateParam::MxOmniCreateParam(const char *mediaPath, struct HWND__ *windowHandle, MxVideoParam &vparam, MxOmniCreateFlags flags) { this->m_mediaPath = mediaPath; diff --git a/LEGO1/mxomnicreateparam.h b/LEGO1/mxomnicreateparam.h index 3729e969..31dcd447 100644 --- a/LEGO1/mxomnicreateparam.h +++ b/LEGO1/mxomnicreateparam.h @@ -1,7 +1,7 @@ #ifndef MXOMNICREATEPARAM_H #define MXOMNICREATEPARAM_H -#include +#include #include "mxomnicreateflags.h" #include "mxomnicreateparambase.h" @@ -12,7 +12,6 @@ class MxOmniCreateParam : public MxOmniCreateParamBase { public: __declspec(dllexport) MxOmniCreateParam(const char *mediaPath, struct HWND__ *windowHandle, MxVideoParam &vparam, MxOmniCreateFlags flags); - // virtual void vtable00(); seems to be a destructor const MxOmniCreateFlags& CreateFlags() const { return this->m_createFlags; } diff --git a/LEGO1/mxomnicreateparambase.cpp b/LEGO1/mxomnicreateparambase.cpp index fe7c5836..0091785d 100644 --- a/LEGO1/mxomnicreateparambase.cpp +++ b/LEGO1/mxomnicreateparambase.cpp @@ -1,6 +1 @@ #include "mxomnicreateparam.h" - -MxOmniCreateParamBase::~MxOmniCreateParamBase() -{ - -} diff --git a/LEGO1/mxomnicreateparambase.h b/LEGO1/mxomnicreateparambase.h index fee0a488..605f4d30 100644 --- a/LEGO1/mxomnicreateparambase.h +++ b/LEGO1/mxomnicreateparambase.h @@ -5,8 +5,7 @@ class MxOmniCreateParamBase { public: - ~MxOmniCreateParamBase(); - virtual void vtable00(){} + virtual ~MxOmniCreateParamBase(){} }; diff --git a/LEGO1/mxstring.cpp b/LEGO1/mxstring.cpp index 66e84c85..81188291 100644 --- a/LEGO1/mxstring.cpp +++ b/LEGO1/mxstring.cpp @@ -2,6 +2,7 @@ #include #include +// OFFSET: LEGO1 0x100ae200 MxString::MxString() { // Set string to one char in length and set that char to null terminator @@ -11,6 +12,7 @@ MxString::MxString() } // TODO: this *mostly* matches, again weird with the comparison +// OFFSET: LEGO1 0x100ae510 const MxString &MxString::operator=(const char *param) { if (this->m_data != param) @@ -24,6 +26,7 @@ const MxString &MxString::operator=(const char *param) return *this; } +// OFFSET: LEGO1 0x100ae420 MxString::~MxString() { free(this->m_data); diff --git a/LEGO1/mxtimer.cpp b/LEGO1/mxtimer.cpp index 245787aa..ee917218 100644 --- a/LEGO1/mxtimer.cpp +++ b/LEGO1/mxtimer.cpp @@ -2,9 +2,13 @@ #include +// 0x10101414 long MxTimer::s_LastTimeCalculated = 0; + +// 0x10101418 long MxTimer::s_LastTimeTimerStarted = 0; +// OFFSET: LEGO1 0x100ae060 MxTimer::MxTimer() { this->m_isRunning = MX_FALSE; @@ -12,12 +16,14 @@ MxTimer::MxTimer() this->m_startTime = MxTimer::s_LastTimeCalculated; } +// OFFSET: LEGO1 0x100ae160 void MxTimer::Start() { this->m_isRunning = MX_TRUE; MxTimer::s_LastTimeTimerStarted = timeGetTime(); } +// OFFSET: LEGO1 0x100ae180 void MxTimer::Stop() { long elapsed = this->GetRealTime(); @@ -27,6 +33,7 @@ void MxTimer::Stop() this->m_startTime = this->m_startTime + startTime - 5; } +// OFFSET: LEGO1 0x100ae140 long MxTimer::GetRealTime() { MxTimer::s_LastTimeCalculated = timeGetTime(); diff --git a/LEGO1/mxvideoparam.cpp b/LEGO1/mxvideoparam.cpp index 19dbad96..893124b6 100644 --- a/LEGO1/mxvideoparam.cpp +++ b/LEGO1/mxvideoparam.cpp @@ -1,5 +1,6 @@ #include "mxvideoparam.h" +// OFFSET: LEGO1 0x100bec70 MxVideoParam::MxVideoParam() { this->m_flags = MxVideoParamFlags(); @@ -13,6 +14,7 @@ MxVideoParam::MxVideoParam() this->m_deviceId = 0; } +// OFFSET: LEGO1 0x100becf0 MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other) { m_flags = MxVideoParamFlags(); @@ -30,6 +32,7 @@ MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other) return *this; } +// OFFSET: LEGO1 0x100bed70 void MxVideoParam::SetDeviceName(char *id) { if (this->m_deviceId != 0) @@ -48,6 +51,7 @@ void MxVideoParam::SetDeviceName(char *id) } } +// OFFSET: LEGO1 0x100bed50 MxVideoParam::~MxVideoParam() { if (this->m_deviceId != 0) diff --git a/LEGO1/mxvideoparamflags.cpp b/LEGO1/mxvideoparamflags.cpp index 00429e30..97f01515 100644 --- a/LEGO1/mxvideoparamflags.cpp +++ b/LEGO1/mxvideoparamflags.cpp @@ -1,5 +1,6 @@ #include "mxvideoparamflags.h" +// OFFSET: LEGO1 0x100bec40 MxVideoParamFlags::MxVideoParamFlags() { // TODO: convert to EnableXXX function calls diff --git a/isle.mak b/isle.mak index b1b8bfad..1672552e 100644 --- a/isle.mak +++ b/isle.mak @@ -280,7 +280,6 @@ CLEAN : -@erase "$(INTDIR)\isle.obj" -@erase "$(INTDIR)\isle.res" -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\mxomnicreateparambase.obj" -@erase "$(INTDIR)\vc40.pdb" -@erase ".\Release\ISLE.EXE" -@erase ".\Release\ISLE.PDB" @@ -342,7 +341,6 @@ LINK32_OBJS= \ "$(INTDIR)\isle.obj" \ "$(INTDIR)\isle.res" \ "$(INTDIR)\main.obj" \ - "$(INTDIR)\mxomnicreateparambase.obj" \ ".\Release\LEGO1.LIB" ".\Release\ISLE.EXE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) @@ -372,7 +370,6 @@ CLEAN : -@erase "$(INTDIR)\isle.obj" -@erase "$(INTDIR)\isle.res" -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\mxomnicreateparambase.obj" -@erase "$(INTDIR)\vc40.idb" -@erase "$(INTDIR)\vc40.pdb" -@erase ".\Debug\ISLE.EXE" @@ -436,7 +433,6 @@ LINK32_OBJS= \ "$(INTDIR)\isle.obj" \ "$(INTDIR)\isle.res" \ "$(INTDIR)\main.obj" \ - "$(INTDIR)\mxomnicreateparambase.obj" \ ".\LEGO1\Debug\LEGO1.lib" ".\Debug\ISLE.EXE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) @@ -603,7 +599,11 @@ DEP_CPP_MXOMN=\ SOURCE=.\LEGO1\mxvideoparam.cpp DEP_CPP_MXVID=\ + ".\LEGO1\mxpalette.h"\ + ".\LEGO1\mxrect32.h"\ + ".\LEGO1\mxvariabletable.h"\ ".\LEGO1\mxvideoparam.h"\ + ".\LEGO1\mxvideoparamflags.h"\ "$(INTDIR)\mxvideoparam.obj" : $(SOURCE) $(DEP_CPP_MXVID) "$(INTDIR)" @@ -865,30 +865,6 @@ SOURCE=.\ISLE\res\isle.rc !ENDIF -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\LEGO1\mxomnicreateparambase.cpp -DEP_CPP_MXOMNIC=\ - ".\LEGO1\mxbool.h"\ - ".\LEGO1\mxcore.h"\ - ".\LEGO1\mxomnicreateflags.h"\ - ".\LEGO1\mxomnicreateparam.h"\ - ".\LEGO1\mxomnicreateparambase.h"\ - ".\LEGO1\mxpalette.h"\ - ".\LEGO1\mxrect32.h"\ - ".\LEGO1\mxstring.h"\ - ".\LEGO1\mxvariabletable.h"\ - ".\LEGO1\mxvideoparam.h"\ - ".\LEGO1\mxvideoparamflags.h"\ - - -"$(INTDIR)\mxomnicreateparambase.obj" : $(SOURCE) $(DEP_CPP_MXOMNIC)\ - "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - # End Source File ################################################################################ # Begin Source File @@ -1145,18 +1121,6 @@ SOURCE=.\LEGO1\mxomnicreateparam.h ################################################################################ # Begin Source File -SOURCE=.\LEGO1\mxomnicreateparambase.h - -!IF "$(CFG)" == "ISLE - Win32 Release" - -!ELSEIF "$(CFG)" == "ISLE - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - SOURCE=.\LEGO1\mxpalette.h !IF "$(CFG)" == "ISLE - Win32 Release" diff --git a/isle.mdp b/isle.mdp index bb991128..9bec89b4 100644 Binary files a/isle.mdp and b/isle.mdp differ