Fix types

This commit is contained in:
Christian Semmler 2024-02-05 07:13:56 -05:00
parent 88607105eb
commit 34d16be1b8
2 changed files with 31 additions and 30 deletions

View File

@ -26,7 +26,7 @@
DECOMP_SIZE_ASSERT(IsleApp, 0x8c) DECOMP_SIZE_ASSERT(IsleApp, 0x8c)
// GLOBAL: ISLE 0x410030 // GLOBAL: ISLE 0x410030
IsleApp* g_isle = 0; IsleApp* g_isle = NULL;
// GLOBAL: ISLE 0x410034 // GLOBAL: ISLE 0x410034
unsigned char g_mousedown = 0; unsigned char g_mousedown = 0;
@ -35,16 +35,16 @@ unsigned char g_mousedown = 0;
unsigned char g_mousemoved = 0; unsigned char g_mousemoved = 0;
// GLOBAL: ISLE 0x41003c // GLOBAL: ISLE 0x41003c
int g_closed = 0; BOOL g_closed = FALSE;
// GLOBAL: ISLE 0x410040 // GLOBAL: ISLE 0x410040
RECT g_windowRect = {0, 0, 640, 480}; RECT g_windowRect = {0, 0, 640, 480};
// GLOBAL: ISLE 0x410050 // GLOBAL: ISLE 0x410050
int g_rmDisabled = 0; BOOL g_rmDisabled = FALSE;
// GLOBAL: ISLE 0x410054 // GLOBAL: ISLE 0x410054
int g_waitingForTargetDepth = 1; BOOL g_waitingForTargetDepth = TRUE;
// GLOBAL: ISLE 0x410058 // GLOBAL: ISLE 0x410058
int g_targetWidth = 640; int g_targetWidth = 640;
@ -56,7 +56,7 @@ int g_targetHeight = 480;
int g_targetDepth = 16; int g_targetDepth = 16;
// GLOBAL: ISLE 0x410064 // GLOBAL: ISLE 0x410064
int g_reqEnableRMDevice = 0; BOOL g_reqEnableRMDevice = FALSE;
// STRING: ISLE 0x4101c4 // STRING: ISLE 0x4101c4
#define WNDCLASS_NAME "Lego Island MainNoM App" #define WNDCLASS_NAME "Lego Island MainNoM App"
@ -75,23 +75,23 @@ IsleApp::IsleApp()
m_cdPath = NULL; m_cdPath = NULL;
m_deviceId = NULL; m_deviceId = NULL;
m_savePath = NULL; m_savePath = NULL;
m_fullScreen = 1; m_fullScreen = TRUE;
m_flipSurfaces = 0; m_flipSurfaces = FALSE;
m_backBuffersInVram = 1; m_backBuffersInVram = TRUE;
m_using8bit = 0; m_using8bit = FALSE;
m_using16bit = 1; m_using16bit = TRUE;
m_unk0x24 = 0; m_unk0x24 = 0;
m_drawCursor = 0; m_drawCursor = FALSE;
m_use3dSound = 1; m_use3dSound = TRUE;
m_useMusic = 1; m_useMusic = TRUE;
m_useJoystick = 0; m_useJoystick = FALSE;
m_joystickIndex = 0; m_joystickIndex = 0;
m_wideViewAngle = 1; m_wideViewAngle = TRUE;
m_islandQuality = 1; m_islandQuality = 1;
m_islandTexture = 1; m_islandTexture = 1;
m_gameStarted = 0; m_gameStarted = FALSE;
m_frameDelta = 10; m_frameDelta = 10;
m_windowActive = 1; m_windowActive = TRUE;
#ifdef COMPAT_MODE #ifdef COMPAT_MODE
{ {
@ -314,9 +314,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
} }
if (g_reqEnableRMDevice) { if (g_reqEnableRMDevice) {
g_reqEnableRMDevice = 0; g_reqEnableRMDevice = FALSE;
VideoManager()->EnableRMDevice(); VideoManager()->EnableRMDevice();
g_rmDisabled = 0; g_rmDisabled = FALSE;
Lego()->StopTimer(); Lego()->StopTimer();
} }
@ -417,7 +417,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (wParam == SC_SCREENSAVE) { if (wParam == SC_SCREENSAVE) {
return 0; return 0;
} }
if (wParam == SC_CLOSE && g_closed == 0) { if (wParam == SC_CLOSE && g_closed == FALSE) {
if (g_isle) { if (g_isle) {
if (g_rmDisabled) { if (g_rmDisabled) {
ShowWindow(g_isle->GetWindowHandle(), SW_RESTORE); ShowWindow(g_isle->GetWindowHandle(), SW_RESTORE);
@ -451,7 +451,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
int targetHeight = HIWORD(lParam); int targetHeight = HIWORD(lParam);
if (g_waitingForTargetDepth) { if (g_waitingForTargetDepth) {
g_waitingForTargetDepth = 0; g_waitingForTargetDepth = FALSE;
g_targetDepth = targetDepth; g_targetDepth = targetDepth;
} }
else { else {
@ -464,11 +464,11 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (g_rmDisabled) { if (g_rmDisabled) {
if (valid) { if (valid) {
g_reqEnableRMDevice = 1; g_reqEnableRMDevice = TRUE;
} }
} }
else if (!valid) { else if (!valid) {
g_rmDisabled = 1; g_rmDisabled = TRUE;
Lego()->StartTimer(); Lego()->StartTimer();
VideoManager()->DisableRMDevice(); VideoManager()->DisableRMDevice();
} }
@ -703,7 +703,7 @@ BOOL IsleApp::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
} }
// FUNCTION: ISLE 0x4027b0 // FUNCTION: ISLE 0x4027b0
int IsleApp::ReadRegBool(LPCSTR name, BOOL* out) BOOL IsleApp::ReadRegBool(LPCSTR name, BOOL* out)
{ {
char buffer[256]; char buffer[256];
@ -725,7 +725,7 @@ int IsleApp::ReadRegBool(LPCSTR name, BOOL* out)
} }
// FUNCTION: ISLE 0x402880 // FUNCTION: ISLE 0x402880
int IsleApp::ReadRegInt(LPCSTR name, int* out) BOOL IsleApp::ReadRegInt(LPCSTR name, int* out)
{ {
char buffer[256]; char buffer[256];
@ -875,7 +875,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
if (Start(&ds) != SUCCESS) { if (Start(&ds) != SUCCESS) {
return; return;
} }
m_gameStarted = 1; m_gameStarted = TRUE;
} }
} }
else if (sleepIfNotNextFrame != 0) { else if (sleepIfNotNextFrame != 0) {

View File

@ -1,6 +1,7 @@
#ifndef ISLEAPP_H #ifndef ISLEAPP_H
#define ISLEAPP_H #define ISLEAPP_H
#include "mxtypes.h"
#include "mxvideoparam.h" #include "mxvideoparam.h"
#include <windows.h> #include <windows.h>
@ -28,8 +29,8 @@ class IsleApp {
MxResult SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine); MxResult SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine);
BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize); BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize);
int ReadRegBool(LPCSTR name, BOOL* out); BOOL ReadRegBool(LPCSTR name, BOOL* out);
int ReadRegInt(LPCSTR name, int* out); BOOL ReadRegInt(LPCSTR name, int* out);
void LoadConfig(); void LoadConfig();
void Tick(BOOL sleepIfNotNextFrame); void Tick(BOOL sleepIfNotNextFrame);
@ -63,8 +64,8 @@ class IsleApp {
BOOL m_wideViewAngle; // 0x38 BOOL m_wideViewAngle; // 0x38
int m_islandQuality; // 0x3c int m_islandQuality; // 0x3c
int m_islandTexture; // 0x40 int m_islandTexture; // 0x40
int m_gameStarted; // 0x44 BOOL m_gameStarted; // 0x44
MxLong m_frameDelta; // 0x48 MxTime m_frameDelta; // 0x48
MxVideoParam m_videoParam; // 0x4c MxVideoParam m_videoParam; // 0x4c
BOOL m_windowActive; // 0x70 BOOL m_windowActive; // 0x70
HWND m_windowHandle; // 0x74 HWND m_windowHandle; // 0x74