added more definitions

Also clarify .exe on script because Wine cares about that
This commit is contained in:
itsmattkc 2023-06-18 20:45:25 -07:00
parent 5aa7921e90
commit 319b52f248
8 changed files with 61 additions and 33 deletions

View file

@ -1,17 +1,43 @@
#include "define.h" #include "define.h"
// 0x410030
Isle *g_isle = 0; Isle *g_isle = 0;
// 0x410034
unsigned char g_mousedown = 0;
// 0x410038
unsigned char g_mousemoved = 0;
// 0x41003c
int g_closed = 0; int g_closed = 0;
const char *WINDOW_TITLE = "LEGO\xAE"; // 0x410040
RECT g_windowRect = {0, 0, 640, 480};
unsigned char g_mousedown = 0; // 0x410050
unsigned char g_mousemoved = 0;
int g_rmDisabled = 0; int g_rmDisabled = 0;
// 0x410054
int g_waitingForTargetDepth = 1; int g_waitingForTargetDepth = 1;
// 0x410058
int g_targetWidth = 640; int g_targetWidth = 640;
// 0x41005c
int g_targetHeight = 480; int g_targetHeight = 480;
// 0x410060
unsigned int g_targetDepth = 16; unsigned int g_targetDepth = 16;
// 0x410064
int g_reqEnableRMDevice = 0; int g_reqEnableRMDevice = 0;
// 0x4101bc
int g_startupDelay = 200; int g_startupDelay = 200;
// 0x4101c0
long g_lastFrameTime = 0; long g_lastFrameTime = 0;
// 0x4101dc
const char *WINDOW_TITLE = "LEGO\xAE";

View file

@ -1,6 +1,8 @@
#ifndef DEFINE_H #ifndef DEFINE_H
#define DEFINE_H #define DEFINE_H
#include <Windows.h>
class Isle; class Isle;
extern Isle *g_isle; extern Isle *g_isle;
@ -9,6 +11,7 @@ extern int g_closed;
extern const char *WINDOW_TITLE; extern const char *WINDOW_TITLE;
extern unsigned char g_mousedown; extern unsigned char g_mousedown;
extern unsigned char g_mousemoved; extern unsigned char g_mousemoved;
extern RECT g_windowRect;
extern int g_rmDisabled; extern int g_rmDisabled;
extern int g_waitingForTargetDepth; extern int g_waitingForTargetDepth;
extern int g_targetWidth; extern int g_targetWidth;

View file

@ -7,8 +7,6 @@
#include "mxomni.h" #include "mxomni.h"
#include "res/resource.h" #include "res/resource.h"
RECT windowRect = {0, 0, 640, 480};
// OFFSET: ISLE 0x401000 // OFFSET: ISLE 0x401000
Isle::Isle() Isle::Isle()
{ {
@ -303,9 +301,9 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_ACTIVATEAPP: case WM_ACTIVATEAPP:
if (g_isle) { if (g_isle) {
if ((wParam != 0) && (g_isle->m_fullScreen)) { if ((wParam != 0) && (g_isle->m_fullScreen)) {
MoveWindow(hWnd, windowRect.left, windowRect.top, MoveWindow(hWnd, g_windowRect.left, g_windowRect.top,
(windowRect.right - windowRect.left) + 1, (g_windowRect.right - g_windowRect.left) + 1,
(windowRect.bottom - windowRect.top) + 1, TRUE); (g_windowRect.bottom - g_windowRect.top) + 1, TRUE);
} }
g_isle->m_windowActive = wParam; g_isle->m_windowActive = wParam;
} }
@ -324,10 +322,10 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
MINMAXINFO *mmi = (MINMAXINFO *) lParam; MINMAXINFO *mmi = (MINMAXINFO *) lParam;
mmi->ptMaxTrackSize.x = (windowRect.right - windowRect.left) + 1; mmi->ptMaxTrackSize.x = (g_windowRect.right - g_windowRect.left) + 1;
mmi->ptMaxTrackSize.y = (windowRect.bottom - windowRect.top) + 1; mmi->ptMaxTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1;
mmi->ptMinTrackSize.x = (windowRect.right - windowRect.left) + 1; mmi->ptMinTrackSize.x = (g_windowRect.right - g_windowRect.left) + 1;
mmi->ptMinTrackSize.y = (windowRect.bottom - windowRect.top) + 1; mmi->ptMinTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1;
return 0; return 0;
} }
@ -498,21 +496,21 @@ MxResult Isle::setupWindow(HINSTANCE hInstance)
int x, y, width, height; int x, y, width, height;
if (!m_fullScreen) { 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; height = g_windowRect.bottom - g_windowRect.top;
width = windowRect.right - windowRect.left; width = g_windowRect.right - g_windowRect.left;
y = CW_USEDEFAULT; y = CW_USEDEFAULT;
x = CW_USEDEFAULT; x = CW_USEDEFAULT;
dwStyle = WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX; dwStyle = WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
} else { } else {
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; height = g_windowRect.bottom - g_windowRect.top;
width = windowRect.right - windowRect.left; width = g_windowRect.right - g_windowRect.left;
dwStyle = WS_CAPTION | WS_SYSMENU; dwStyle = WS_CAPTION | WS_SYSMENU;
x = windowRect.left; x = g_windowRect.left;
y = windowRect.top; y = g_windowRect.top;
} }
m_windowHandle = CreateWindowExA(WS_EX_APPWINDOW, WNDCLASS_NAME, WINDOW_TITLE, dwStyle, m_windowHandle = CreateWindowExA(WS_EX_APPWINDOW, WNDCLASS_NAME, WINDOW_TITLE, dwStyle,
@ -522,7 +520,7 @@ MxResult Isle::setupWindow(HINSTANCE hInstance)
} }
if (m_fullScreen) { 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); ShowWindow(m_windowHandle, SW_SHOWNORMAL);
@ -558,7 +556,7 @@ MxResult Isle::setupWindow(HINSTANCE hInstance)
} }
} }
if (m_fullScreen) { 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); ShowWindow(m_windowHandle, SW_SHOWNORMAL);
UpdateWindow(m_windowHandle); UpdateWindow(m_windowHandle);

View file

@ -1,5 +1,6 @@
#include <Windows.h> #include <Windows.h>
// OFFSET: LEGO1 0x10091ee0
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
return TRUE; return TRUE;

View file

@ -1,5 +1,6 @@
#include "mxautolocker.h" #include "mxautolocker.h"
// OFFSET: LEGO1 0x100b8ed0
MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect) MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect)
{ {
this->m_criticalSection = critsect; this->m_criticalSection = critsect;
@ -7,6 +8,7 @@ MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect)
this->m_criticalSection->Enter(); this->m_criticalSection->Enter();
} }
// OFFSET: LEGO1 0x100b8ef0
MxAutoLocker::~MxAutoLocker() MxAutoLocker::~MxAutoLocker()
{ {
if (this->m_criticalSection != 0) if (this->m_criticalSection != 0)

View file

@ -72,7 +72,6 @@ CLEAN :
-@erase ".\Release\LEGO1.DLL" -@erase ".\Release\LEGO1.DLL"
-@erase ".\Release\LEGO1.EXP" -@erase ".\Release\LEGO1.EXP"
-@erase ".\Release\LEGO1.LIB" -@erase ".\Release\LEGO1.LIB"
-@erase ".\Release\LEGO1.MAP"
-@erase ".\Release\LEGO1.PDB" -@erase ".\Release\LEGO1.PDB"
"$(OUTDIR)" : "$(OUTDIR)" :
@ -119,13 +118,13 @@ BSC32_SBRS= \
LINK32=link.exe 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 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" # 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 # SUBTRACT LINK32 /pdb:none /map
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no\ odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no\
/pdb:"Release/LEGO1.PDB" /map:"Release/LEGO1.MAP" /debug /machine:I386\ /pdb:"Release/LEGO1.PDB" /debug /machine:I386 /out:"Release/LEGO1.DLL"\
/out:"Release/LEGO1.DLL" /implib:"Release/LEGO1.LIB" /implib:"Release/LEGO1.LIB"
LINK32_OBJS= \ LINK32_OBJS= \
"$(INTDIR)\dllmain.obj" \ "$(INTDIR)\dllmain.obj" \
"$(INTDIR)\legonavcontroller.obj" \ "$(INTDIR)\legonavcontroller.obj" \
@ -183,7 +182,6 @@ CLEAN :
-@erase "$(INTDIR)\vc40.pdb" -@erase "$(INTDIR)\vc40.pdb"
-@erase "$(OUTDIR)\LEGO1.exp" -@erase "$(OUTDIR)\LEGO1.exp"
-@erase "$(OUTDIR)\LEGO1.lib" -@erase "$(OUTDIR)\LEGO1.lib"
-@erase "$(OUTDIR)\LEGO1.map"
-@erase "$(OUTDIR)\LEGO1.pdb" -@erase "$(OUTDIR)\LEGO1.pdb"
-@erase ".\Debug\LEGO1.DLL" -@erase ".\Debug\LEGO1.DLL"
-@erase ".\Debug\LEGO1.ILK" -@erase ".\Debug\LEGO1.ILK"
@ -232,13 +230,13 @@ BSC32_SBRS= \
LINK32=link.exe 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 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" # 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 # SUBTRACT LINK32 /pdb:none /map
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:yes\ odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:yes\
/pdb:"$(OUTDIR)/LEGO1.pdb" /map:"$(INTDIR)/LEGO1.map" /debug /machine:I386\ /pdb:"$(OUTDIR)/LEGO1.pdb" /debug /machine:I386 /out:"Debug/LEGO1.DLL"\
/out:"Debug/LEGO1.DLL" /implib:"$(OUTDIR)/LEGO1.lib" /implib:"$(OUTDIR)/LEGO1.lib"
LINK32_OBJS= \ LINK32_OBJS= \
"$(INTDIR)\dllmain.obj" \ "$(INTDIR)\dllmain.obj" \
"$(INTDIR)\legonavcontroller.obj" \ "$(INTDIR)\legonavcontroller.obj" \

BIN
isle.mdp

Binary file not shown.

View file

@ -109,7 +109,7 @@ def get_wine_path(fn):
# Load source lines from PDB # Load source lines from PDB
if not line_dump: 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': if os.name != 'nt':
# Run cvdump through wine and convert path to Windows-friendly wine path # Run cvdump through wine and convert path to Windows-friendly wine path