Isle
Loading...
Searching...
No Matches
IsleApp Class Reference

[AI] Main application class for LEGO Island. More...

#include <isleapp.h>

Public Member Functions

 IsleApp ()
 [AI] Constructor. More...
 
 ~IsleApp ()
 [AI] Destructor. More...
 
void Close ()
 [AI] Gracefully closes down the LEGO Island game, including engine teardown and saving player progress. More...
 
BOOL SetupLegoOmni ()
 [AI] Initializes the core LEGO Island engine with the current settings and media path. More...
 
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, bit depth, etc). More...
 
MxResult SetupWindow (HINSTANCE hInstance, LPSTR lpCmdLine)
 [AI] Creates the application window, registers the window class, loads icons/cursors, and sets up video and config. More...
 
BOOL ReadReg (LPCSTR name, LPSTR outValue, DWORD outSize)
 [AI] Reads a string value from the LEGO Island registry key under HKLM. More...
 
BOOL ReadRegBool (LPCSTR name, BOOL *out)
 [AI] Reads a boolean (YES/NO string) value from registry. More...
 
BOOL ReadRegInt (LPCSTR name, int *out)
 [AI] Reads an integer value from registry. More...
 
void LoadConfig ()
 [AI] Loads all configuration from the registry (disk path, CD path, sound, joystick, quality, etc) and applies defaults if necessary. More...
 
void Tick (BOOL sleepIfNotNextFrame)
 [AI] Executes a single frame tick/update for the game, managing timing, engine state, initial/first load sequence, and background audio. More...
 
void SetupCursor (WPARAM wParam)
 [AI] Sets the current mouse cursor based on application or game state. More...
 
void SetWindowActive (BOOL p_windowActive)
 [AI] Sets application window active status (focus/active state). More...
 
Window/Cursor Properties Accessors [AI]
HWND GetWindowHandle ()
 [AI] Returns the handle to the main application window. More...
 
MxLong GetFrameDelta ()
 [AI] Returns the current frame delta (milliseconds per game frame). More...
 
BOOL GetFullScreen ()
 [AI] Returns TRUE if the game is in fullscreen mode. More...
 
HCURSOR GetCursorCurrent ()
 [AI] Gets the HCURSOR currently active for the application. More...
 
HCURSOR GetCursorBusy ()
 [AI] Gets the HCURSOR representing the "busy" cursor. More...
 
HCURSOR GetCursorNo ()
 [AI] Gets the HCURSOR representing the "not allowed" cursor. More...
 
BOOL GetDrawCursor ()
 [AI] Returns TRUE if the application is drawing the custom cursor. More...
 

Detailed Description

[AI] Main application class for LEGO Island.

Manages the main game window and overall game flow, including resource paths, graphics, input, cursor state, registry settings, and config handling.

[AI] This class acts as the entry point of the LEGO Island game and handles initial setup, window creation, configuration loading, registry values, video settings, cursor handling, the primary update/tick loop, and communication with the underlying engine (LegoOmni and subsystems).

Definition at line 14 of file isleapp.h.

Constructor & Destructor Documentation

◆ IsleApp()

IsleApp::IsleApp ( )

[AI] Constructor.

Initializes the application, default config, and allocates/sets up class members.

Definition at line 79 of file isleapp.cpp.

◆ ~IsleApp()

IsleApp::~IsleApp ( )

[AI] Destructor.

Cleans up resources, destroys the engine, and deallocates buffers.

Definition at line 124 of file isleapp.cpp.

Member Function Documentation

◆ Close()

void IsleApp::Close ( )

[AI] Gracefully closes down the LEGO Island game, including engine teardown and saving player progress.

[AI] Saves game state and player progress, triggers object destruction and world removal, handles queued input, and synchronizes shutdown with the data streamer.

Definition at line 149 of file isleapp.cpp.

◆ GetCursorBusy()

HCURSOR IsleApp::GetCursorBusy ( )
inline

[AI] Gets the HCURSOR representing the "busy" cursor.

Definition at line 138 of file isleapp.h.

◆ GetCursorCurrent()

HCURSOR IsleApp::GetCursorCurrent ( )
inline

[AI] Gets the HCURSOR currently active for the application.

Definition at line 133 of file isleapp.h.

◆ GetCursorNo()

HCURSOR IsleApp::GetCursorNo ( )
inline

[AI] Gets the HCURSOR representing the "not allowed" cursor.

Definition at line 143 of file isleapp.h.

◆ GetDrawCursor()

BOOL IsleApp::GetDrawCursor ( )
inline

[AI] Returns TRUE if the application is drawing the custom cursor.

Definition at line 148 of file isleapp.h.

◆ GetFrameDelta()

MxLong IsleApp::GetFrameDelta ( )
inline

[AI] Returns the current frame delta (milliseconds per game frame).

Definition at line 123 of file isleapp.h.

◆ GetFullScreen()

BOOL IsleApp::GetFullScreen ( )
inline

[AI] Returns TRUE if the game is in fullscreen mode.

Definition at line 128 of file isleapp.h.

◆ GetWindowHandle()

HWND IsleApp::GetWindowHandle ( )
inline

[AI] Returns the handle to the main application window.

Definition at line 118 of file isleapp.h.

◆ LoadConfig()

void IsleApp::LoadConfig ( )

[AI] Loads all configuration from the registry (disk path, CD path, sound, joystick, quality, etc) and applies defaults if necessary.

[AI] Also applies config to MxOmni global paths and fills out member variables for later use.

Definition at line 740 of file isleapp.cpp.

◆ ReadReg()

BOOL IsleApp::ReadReg ( LPCSTR  name,
LPSTR  outValue,
DWORD  outSize 
)

[AI] Reads a string value from the LEGO Island registry key under HKLM.

Parameters
nameRegistry value name to read (e.g. "diskpath", "cdpath", etc). [AI]
outValuePointer to string buffer to receive the value. [AI]
outSizeSize of outValue buffer in bytes. [AI]
Returns
TRUE if the value was successfully read. [AI]

Definition at line 686 of file isleapp.cpp.

◆ ReadRegBool()

BOOL IsleApp::ReadRegBool ( LPCSTR  name,
BOOL out 
)

[AI] Reads a boolean (YES/NO string) value from registry.

Parameters
nameRegistry value to read. [AI]
outPointer to BOOL to receive value. [AI]
Returns
TRUE if the value was read and parsed successfully. [AI]

Definition at line 705 of file isleapp.cpp.

◆ ReadRegInt()

BOOL IsleApp::ReadRegInt ( LPCSTR  name,
int *  out 
)

[AI] Reads an integer value from registry.

Parameters
nameRegistry value to read. [AI]
outPointer to int to receive value. [AI]
Returns
TRUE if the value was read and parsed successfully. [AI]

Definition at line 727 of file isleapp.cpp.

◆ SetupCursor()

void IsleApp::SetupCursor ( WPARAM  wParam)

[AI] Sets the current mouse cursor based on application or game state.

Parameters
wParamCursor identifier (see Lego cursor enum). [AI]

Definition at line 886 of file isleapp.cpp.

◆ SetupLegoOmni()

BOOL IsleApp::SetupLegoOmni ( )

[AI] Initializes the core LEGO Island engine with the current settings and media path.

Returns
TRUE if the engine setup was successful, FALSE otherwise. [AI]

Definition at line 178 of file isleapp.cpp.

◆ SetupVideoFlags()

void IsleApp::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, bit depth, etc).

Parameters
fullScreenFullscreen mode enable flag. [AI]
flipSurfacesDouble buffering/flip surfaces flag. [AI]
backBuffersFlag for VRAM backbuffer usage (see registry). [AI]
using8bitIf true, prefer 8-bit color. [AI]
using16bitIf true, prefer 16-bit color. [AI]
param_6Unknown video option (propagated to SetF2bit0). [AI]
param_7Unknown video option (propagated to SetF1bit7). [AI]
wideViewAngleEnables wide field-of-view. [AI]
deviceId3D video device identifier string. [AI]

Definition at line 206 of file isleapp.cpp.

◆ SetupWindow()

MxResult IsleApp::SetupWindow ( HINSTANCE  hInstance,
LPSTR  lpCmdLine 
)

[AI] Creates the application window, registers the window class, loads icons/cursors, and sets up video and config.

Parameters
hInstanceHandle to current application instance. [AI]
lpCmdLineCommand line arguments. [AI]
Returns
[AI] SUCCESS or FAILURE as MxResult depending on window and system initialization.

Definition at line 540 of file isleapp.cpp.

◆ SetWindowActive()

void IsleApp::SetWindowActive ( BOOL  p_windowActive)
inline

[AI] Sets application window active status (focus/active state).

Parameters
p_windowActiveTRUE if the window is active. [AI]

Definition at line 155 of file isleapp.h.

◆ Tick()

void IsleApp::Tick ( BOOL  sleepIfNotNextFrame)
inline

[AI] Executes a single frame tick/update for the game, managing timing, engine state, initial/first load sequence, and background audio.

Parameters
sleepIfNotNextFrameIf true, yields processor if it's not time for next frame. [AI]

Definition at line 806 of file isleapp.cpp.


The documentation for this class was generated from the following files: