diff --git a/ISLE/define.cpp b/ISLE/define.cpp index 0e38f2c8..a5122188 100644 --- a/ISLE/define.cpp +++ b/ISLE/define.cpp @@ -1,17 +1,43 @@ #include "define.h" +// 0x410030 Isle *g_isle = 0; + +// 0x410034 +unsigned char g_mousedown = 0; + +// 0x410038 +unsigned char g_mousemoved = 0; + +// 0x41003c int g_closed = 0; -const char *WINDOW_TITLE = "LEGO\xAE"; +// 0x410040 +RECT g_windowRect = {0, 0, 640, 480}; -unsigned char g_mousedown = 0; -unsigned char g_mousemoved = 0; +// 0x410050 int g_rmDisabled = 0; + +// 0x410054 int g_waitingForTargetDepth = 1; + +// 0x410058 int g_targetWidth = 640; + +// 0x41005c int g_targetHeight = 480; + +// 0x410060 unsigned int g_targetDepth = 16; + +// 0x410064 int g_reqEnableRMDevice = 0; + +// 0x4101bc int g_startupDelay = 200; + +// 0x4101c0 long g_lastFrameTime = 0; + +// 0x4101dc +const char *WINDOW_TITLE = "LEGO\xAE"; diff --git a/ISLE/define.h b/ISLE/define.h index c7d91fb9..36f69993 100644 --- a/ISLE/define.h +++ b/ISLE/define.h @@ -1,6 +1,8 @@ #ifndef DEFINE_H #define DEFINE_H +#include + class Isle; extern Isle *g_isle; @@ -9,6 +11,7 @@ extern int g_closed; extern const char *WINDOW_TITLE; extern unsigned char g_mousedown; extern unsigned char g_mousemoved; +extern RECT g_windowRect; extern int g_rmDisabled; extern int g_waitingForTargetDepth; extern int g_targetWidth; diff --git a/ISLE/isle.cpp b/ISLE/isle.cpp index b975736b..b2ab17a9 100644 --- a/ISLE/isle.cpp +++ b/ISLE/isle.cpp @@ -7,8 +7,6 @@ #include "mxomni.h" #include "res/resource.h" -RECT windowRect = {0, 0, 640, 480}; - // OFFSET: ISLE 0x401000 Isle::Isle() { @@ -303,9 +301,9 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_ACTIVATEAPP: if (g_isle) { if ((wParam != 0) && (g_isle->m_fullScreen)) { - MoveWindow(hWnd, windowRect.left, windowRect.top, - (windowRect.right - windowRect.left) + 1, - (windowRect.bottom - windowRect.top) + 1, TRUE); + MoveWindow(hWnd, g_windowRect.left, g_windowRect.top, + (g_windowRect.right - g_windowRect.left) + 1, + (g_windowRect.bottom - g_windowRect.top) + 1, TRUE); } g_isle->m_windowActive = wParam; } @@ -324,10 +322,10 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { MINMAXINFO *mmi = (MINMAXINFO *) lParam; - mmi->ptMaxTrackSize.x = (windowRect.right - windowRect.left) + 1; - mmi->ptMaxTrackSize.y = (windowRect.bottom - windowRect.top) + 1; - mmi->ptMinTrackSize.x = (windowRect.right - windowRect.left) + 1; - mmi->ptMinTrackSize.y = (windowRect.bottom - windowRect.top) + 1; + mmi->ptMaxTrackSize.x = (g_windowRect.right - g_windowRect.left) + 1; + mmi->ptMaxTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1; + mmi->ptMinTrackSize.x = (g_windowRect.right - g_windowRect.left) + 1; + mmi->ptMinTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1; return 0; } @@ -498,21 +496,21 @@ MxResult Isle::setupWindow(HINSTANCE hInstance) int x, y, width, height; if (!m_fullScreen) { - AdjustWindowRectEx(&windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW); + AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW); - height = windowRect.bottom - windowRect.top; - width = windowRect.right - windowRect.left; + height = g_windowRect.bottom - g_windowRect.top; + width = g_windowRect.right - g_windowRect.left; y = CW_USEDEFAULT; x = CW_USEDEFAULT; dwStyle = WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX; } else { - AdjustWindowRectEx(&windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW); - height = windowRect.bottom - windowRect.top; - width = windowRect.right - windowRect.left; + AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW); + height = g_windowRect.bottom - g_windowRect.top; + width = g_windowRect.right - g_windowRect.left; dwStyle = WS_CAPTION | WS_SYSMENU; - x = windowRect.left; - y = windowRect.top; + x = g_windowRect.left; + y = g_windowRect.top; } m_windowHandle = CreateWindowExA(WS_EX_APPWINDOW, WNDCLASS_NAME, WINDOW_TITLE, dwStyle, @@ -522,7 +520,7 @@ MxResult Isle::setupWindow(HINSTANCE hInstance) } if (m_fullScreen) { - MoveWindow(m_windowHandle, windowRect.left, windowRect.top, (windowRect.right - windowRect.left) + 1, (windowRect.bottom - windowRect.top) + 1, TRUE); + MoveWindow(m_windowHandle, g_windowRect.left, g_windowRect.top, (g_windowRect.right - g_windowRect.left) + 1, (g_windowRect.bottom - g_windowRect.top) + 1, TRUE); } ShowWindow(m_windowHandle, SW_SHOWNORMAL); @@ -558,7 +556,7 @@ MxResult Isle::setupWindow(HINSTANCE hInstance) } } if (m_fullScreen) { - MoveWindow(m_windowHandle, windowRect.left, windowRect.top, (windowRect.right - windowRect.left) + 1, (windowRect.bottom - windowRect.top) + 1, TRUE); + MoveWindow(m_windowHandle, g_windowRect.left, g_windowRect.top, (g_windowRect.right - g_windowRect.left) + 1, (g_windowRect.bottom - g_windowRect.top) + 1, TRUE); } ShowWindow(m_windowHandle, SW_SHOWNORMAL); UpdateWindow(m_windowHandle); diff --git a/LEGO1/dllmain.cpp b/LEGO1/dllmain.cpp index 060bd70c..53650bd6 100644 --- a/LEGO1/dllmain.cpp +++ b/LEGO1/dllmain.cpp @@ -1,5 +1,6 @@ #include +// OFFSET: LEGO1 0x10091ee0 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { return TRUE; diff --git a/LEGO1/mxautolocker.cpp b/LEGO1/mxautolocker.cpp index 9020afaf..f5cf0853 100644 --- a/LEGO1/mxautolocker.cpp +++ b/LEGO1/mxautolocker.cpp @@ -1,5 +1,6 @@ #include "mxautolocker.h" +// OFFSET: LEGO1 0x100b8ed0 MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect) { this->m_criticalSection = critsect; @@ -7,6 +8,7 @@ MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect) this->m_criticalSection->Enter(); } +// OFFSET: LEGO1 0x100b8ef0 MxAutoLocker::~MxAutoLocker() { if (this->m_criticalSection != 0) diff --git a/isle.mak b/isle.mak index f9e92b96..b1b8bfad 100644 --- a/isle.mak +++ b/isle.mak @@ -72,7 +72,6 @@ CLEAN : -@erase ".\Release\LEGO1.DLL" -@erase ".\Release\LEGO1.EXP" -@erase ".\Release\LEGO1.LIB" - -@erase ".\Release\LEGO1.MAP" -@erase ".\Release\LEGO1.PDB" "$(OUTDIR)" : @@ -119,13 +118,13 @@ BSC32_SBRS= \ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /pdb:"Release/LEGO1.PDB" /map:"Release/LEGO1.MAP" /debug /machine:I386 /out:"Release/LEGO1.DLL" /implib:"Release/LEGO1.LIB" -# SUBTRACT LINK32 /pdb:none +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /pdb:"Release/LEGO1.PDB" /debug /machine:I386 /out:"Release/LEGO1.DLL" /implib:"Release/LEGO1.LIB" +# SUBTRACT LINK32 /pdb:none /map LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no\ - /pdb:"Release/LEGO1.PDB" /map:"Release/LEGO1.MAP" /debug /machine:I386\ - /out:"Release/LEGO1.DLL" /implib:"Release/LEGO1.LIB" + /pdb:"Release/LEGO1.PDB" /debug /machine:I386 /out:"Release/LEGO1.DLL"\ + /implib:"Release/LEGO1.LIB" LINK32_OBJS= \ "$(INTDIR)\dllmain.obj" \ "$(INTDIR)\legonavcontroller.obj" \ @@ -183,7 +182,6 @@ CLEAN : -@erase "$(INTDIR)\vc40.pdb" -@erase "$(OUTDIR)\LEGO1.exp" -@erase "$(OUTDIR)\LEGO1.lib" - -@erase "$(OUTDIR)\LEGO1.map" -@erase "$(OUTDIR)\LEGO1.pdb" -@erase ".\Debug\LEGO1.DLL" -@erase ".\Debug\LEGO1.ILK" @@ -232,13 +230,13 @@ BSC32_SBRS= \ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /map /debug /machine:I386 /out:"Debug/LEGO1.DLL" -# SUBTRACT LINK32 /pdb:none +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/LEGO1.DLL" +# SUBTRACT LINK32 /pdb:none /map LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:yes\ - /pdb:"$(OUTDIR)/LEGO1.pdb" /map:"$(INTDIR)/LEGO1.map" /debug /machine:I386\ - /out:"Debug/LEGO1.DLL" /implib:"$(OUTDIR)/LEGO1.lib" + /pdb:"$(OUTDIR)/LEGO1.pdb" /debug /machine:I386 /out:"Debug/LEGO1.DLL"\ + /implib:"$(OUTDIR)/LEGO1.lib" LINK32_OBJS= \ "$(INTDIR)\dllmain.obj" \ "$(INTDIR)\legonavcontroller.obj" \ diff --git a/isle.mdp b/isle.mdp index c9155f67..bb991128 100644 Binary files a/isle.mdp and b/isle.mdp differ diff --git a/tools/reccomp/reccomp.py b/tools/reccomp/reccomp.py index 8ffb1f4b..dd601e53 100755 --- a/tools/reccomp/reccomp.py +++ b/tools/reccomp/reccomp.py @@ -109,7 +109,7 @@ def get_wine_path(fn): # Load source lines from PDB if not line_dump: - call = [os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'cvdump'), '-l', '-s'] + call = [os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'cvdump.exe'), '-l', '-s'] if os.name != 'nt': # Run cvdump through wine and convert path to Windows-friendly wine path