mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-02 21:21:16 +00:00
add missing parameter to SetupWindow
This commit is contained in:
parent
7e662f5955
commit
e7354ab8b0
@ -466,7 +466,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: ISLE 0x4023e0
|
// OFFSET: ISLE 0x4023e0
|
||||||
MxResult Isle::SetupWindow(HINSTANCE hInstance)
|
MxResult Isle::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
|
||||||
{
|
{
|
||||||
WNDCLASSA wndclass;
|
WNDCLASSA wndclass;
|
||||||
ZeroMemory(&wndclass, sizeof(WNDCLASSA));
|
ZeroMemory(&wndclass, sizeof(WNDCLASSA));
|
||||||
@ -502,7 +502,7 @@ MxResult Isle::SetupWindow(HINSTANCE hInstance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DWORD dwStyle;
|
DWORD dwStyle;
|
||||||
int x, y, width, height;
|
int width, height, x, y;
|
||||||
|
|
||||||
if (!m_fullScreen) {
|
if (!m_fullScreen) {
|
||||||
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
|
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
|
||||||
@ -515,8 +515,10 @@ MxResult Isle::SetupWindow(HINSTANCE hInstance)
|
|||||||
dwStyle = WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
|
dwStyle = WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
|
||||||
} else {
|
} else {
|
||||||
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
|
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
|
||||||
|
|
||||||
height = g_windowRect.bottom - g_windowRect.top;
|
height = g_windowRect.bottom - g_windowRect.top;
|
||||||
width = g_windowRect.right - g_windowRect.left;
|
width = g_windowRect.right - g_windowRect.left;
|
||||||
|
|
||||||
dwStyle = WS_CAPTION | WS_SYSMENU;
|
dwStyle = WS_CAPTION | WS_SYSMENU;
|
||||||
x = g_windowRect.left;
|
x = g_windowRect.left;
|
||||||
y = g_windowRect.top;
|
y = g_windowRect.top;
|
||||||
@ -543,12 +545,15 @@ MxResult Isle::SetupWindow(HINSTANCE hInstance)
|
|||||||
GameState()->SerializeScoreHistory(1);
|
GameState()->SerializeScoreHistory(1);
|
||||||
|
|
||||||
int iVar10;
|
int iVar10;
|
||||||
if (m_islandQuality == 0) {
|
switch (m_islandQuality) {
|
||||||
iVar10 = 1;
|
case 0:
|
||||||
} else if (m_islandQuality == 1) {
|
iVar10 = 1;
|
||||||
iVar10 = 2;
|
break;
|
||||||
} else {
|
case 1:
|
||||||
iVar10 = 100;
|
iVar10 = 2;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
iVar10 = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
int uVar1 = (m_islandTexture == 0);
|
int uVar1 = (m_islandTexture == 0);
|
||||||
@ -560,8 +565,8 @@ MxResult Isle::SetupWindow(HINSTANCE hInstance)
|
|||||||
LegoAnimationManager::configureLegoAnimationManager(m_islandQuality);
|
LegoAnimationManager::configureLegoAnimationManager(m_islandQuality);
|
||||||
if (LegoOmni::GetInstance()) {
|
if (LegoOmni::GetInstance()) {
|
||||||
if (LegoOmni::GetInstance()->GetInputManager()) {
|
if (LegoOmni::GetInstance()->GetInputManager()) {
|
||||||
LegoOmni::GetInstance()->GetInputManager()->m_unk00[0xCD] = m_useJoystick;
|
LegoOmni::GetInstance()->GetInputManager()->m_useJoystick = m_useJoystick;
|
||||||
LegoOmni::GetInstance()->GetInputManager()->m_unk00[0x67] = m_joystickIndex;
|
LegoOmni::GetInstance()->GetInputManager()->m_joystickIndex = m_joystickIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_fullScreen) {
|
if (m_fullScreen) {
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class Isle
|
|||||||
int ReadRegBool(LPCSTR name, BOOL *out);
|
int ReadRegBool(LPCSTR name, BOOL *out);
|
||||||
int ReadRegInt(LPCSTR name, int *out);
|
int ReadRegInt(LPCSTR name, int *out);
|
||||||
|
|
||||||
MxResult SetupWindow(HINSTANCE hInstance);
|
MxResult SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine);
|
||||||
|
|
||||||
void Tick(BOOL sleepIfNotNextFrame);
|
void Tick(BOOL sleepIfNotNextFrame);
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||||||
g_isle = new Isle();
|
g_isle = new Isle();
|
||||||
|
|
||||||
// Create window
|
// Create window
|
||||||
if (g_isle->SetupWindow(hInstance) != SUCCESS) {
|
if (g_isle->SetupWindow(hInstance, lpCmdLine) != SUCCESS) {
|
||||||
MessageBoxA(NULL, "\"LEGO\xAE Island\" failed to start. Please quit all other applications and try again.", "LEGO\xAE Island Error", MB_OK);
|
MessageBoxA(NULL, "\"LEGO\xAE Island\" failed to start. Please quit all other applications and try again.", "LEGO\xAE Island Error", MB_OK);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user