Isle
Loading...
Searching...
No Matches
isleapp.h
Go to the documentation of this file.
1#ifndef ISLEAPP_H
2#define ISLEAPP_H
3
4#include "mxtypes.h"
5#include "mxvideoparam.h"
6
7#include <windows.h>
8
9// SIZE 0x8c
14class IsleApp {
15public:
19 IsleApp();
20
24 ~IsleApp();
25
30 void Close();
31
37
50 void SetupVideoFlags(
51 BOOL fullScreen,
52 BOOL flipSurfaces,
53 BOOL backBuffers,
54 BOOL using8bit,
55 BOOL using16bit,
56 BOOL param_6,
57 BOOL param_7,
58 BOOL wideViewAngle,
59 char* deviceId
60 );
61
68 MxResult SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine);
69
77 BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize);
78
85 BOOL ReadRegBool(LPCSTR name, BOOL* out);
86
93 BOOL ReadRegInt(LPCSTR name, int* out);
94
99 void LoadConfig();
100
105 void Tick(BOOL sleepIfNotNextFrame);
106
111 void SetupCursor(WPARAM wParam);
112
115
118 HWND GetWindowHandle() { return m_windowHandle; }
119
123 MxLong GetFrameDelta() { return m_frameDelta; }
124
128 BOOL GetFullScreen() { return m_fullScreen; }
129
133 HCURSOR GetCursorCurrent() { return m_cursorCurrent; }
134
138 HCURSOR GetCursorBusy() { return m_cursorBusy; }
139
143 HCURSOR GetCursorNo() { return m_cursorNo; }
144
148 BOOL GetDrawCursor() { return m_drawCursor; }
150
155 void SetWindowActive(BOOL p_windowActive) { m_windowActive = p_windowActive; }
156
157private:
158 LPSTR m_hdPath;
159 LPSTR m_cdPath;
160 LPSTR m_deviceId;
161 LPSTR m_savePath;
162 BOOL m_fullScreen;
163 BOOL m_flipSurfaces;
164 BOOL m_backBuffersInVram;
165 BOOL m_using8bit;
166 BOOL m_using16bit;
167 int m_unk0x24;
168 BOOL m_use3dSound;
169 BOOL m_useMusic;
170 BOOL m_useJoystick;
171 int m_joystickIndex;
172 BOOL m_wideViewAngle;
173 int m_islandQuality;
174 int m_islandTexture;
175 BOOL m_gameStarted;
176 MxLong m_frameDelta;
177 MxVideoParam m_videoParam;
178 BOOL m_windowActive;
179 HWND m_windowHandle;
180 BOOL m_drawCursor;
181 HCURSOR m_cursorArrow;
182 HCURSOR m_cursorBusy;
183 HCURSOR m_cursorNo;
184 HCURSOR m_cursorCurrent;
185};
186
187#endif // ISLEAPP_H
[AI] Main application class for LEGO Island.
Definition: isleapp.h:14
void Tick(BOOL sleepIfNotNextFrame)
[AI] Executes a single frame tick/update for the game, managing timing, engine state,...
Definition: isleapp.cpp:806
MxResult SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
[AI] Creates the application window, registers the window class, loads icons/cursors,...
Definition: isleapp.cpp:540
HCURSOR GetCursorCurrent()
[AI] Gets the HCURSOR currently active for the application.
Definition: isleapp.h:133
void SetupCursor(WPARAM wParam)
[AI] Sets the current mouse cursor based on application or game state.
Definition: isleapp.cpp:886
void LoadConfig()
[AI] Loads all configuration from the registry (disk path, CD path, sound, joystick,...
Definition: isleapp.cpp:740
BOOL GetDrawCursor()
[AI] Returns TRUE if the application is drawing the custom cursor.
Definition: isleapp.h:148
void SetWindowActive(BOOL p_windowActive)
[AI] Sets application window active status (focus/active state).
Definition: isleapp.h:155
BOOL ReadRegBool(LPCSTR name, BOOL *out)
[AI] Reads a boolean (YES/NO string) value from registry.
Definition: isleapp.cpp:705
BOOL SetupLegoOmni()
[AI] Initializes the core LEGO Island engine with the current settings and media path.
Definition: isleapp.cpp:178
MxLong GetFrameDelta()
[AI] Returns the current frame delta (milliseconds per game frame).
Definition: isleapp.h:123
void SetupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers, BOOL using8bit, BOOL using16bit, BOOL param_6, BOOL param_7, BOOL wideViewAngle, char *deviceId)
[AI] Configures video mode and 3D device flags for rendering (fullscreen, backbuffers,...
Definition: isleapp.cpp:206
HCURSOR GetCursorNo()
[AI] Gets the HCURSOR representing the "not allowed" cursor.
Definition: isleapp.h:143
~IsleApp()
[AI] Destructor.
Definition: isleapp.cpp:124
BOOL GetFullScreen()
[AI] Returns TRUE if the game is in fullscreen mode.
Definition: isleapp.h:128
void Close()
[AI] Gracefully closes down the LEGO Island game, including engine teardown and saving player progres...
Definition: isleapp.cpp:149
IsleApp()
[AI] Constructor.
Definition: isleapp.cpp:79
HCURSOR GetCursorBusy()
[AI] Gets the HCURSOR representing the "busy" cursor.
Definition: isleapp.h:138
HWND GetWindowHandle()
[AI] Returns the handle to the main application window.
Definition: isleapp.h:118
BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
[AI] Reads a string value from the LEGO Island registry key under HKLM.
Definition: isleapp.cpp:686
BOOL ReadRegInt(LPCSTR name, int *out)
[AI] Reads an integer value from registry.
Definition: isleapp.cpp:727
[AI] Video parameter configuration for display and rendering, encapsulates resolution,...
Definition: mxvideoparam.h:14
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83