2023-06-29 04:10:08 -04:00
|
|
|
#ifndef ISLEAPP_H
|
|
|
|
#define ISLEAPP_H
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2024-06-24 10:25:51 -04:00
|
|
|
#include "legoutils.h"
|
2023-06-29 04:10:08 -04:00
|
|
|
#include "mxtypes.h"
|
2023-05-05 05:54:17 -04:00
|
|
|
#include "mxvideoparam.h"
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2024-05-31 17:56:00 -04:00
|
|
|
#include <SDL3/SDL_mouse.h>
|
|
|
|
#include <SDL3/SDL_video.h>
|
2023-10-24 19:38:27 -04:00
|
|
|
#include <windows.h>
|
|
|
|
|
2024-02-05 09:01:48 -05:00
|
|
|
// SIZE 0x8c
|
2023-10-24 19:38:27 -04:00
|
|
|
class IsleApp {
|
2023-04-27 22:19:39 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
IsleApp();
|
|
|
|
~IsleApp();
|
|
|
|
|
|
|
|
void Close();
|
|
|
|
|
2024-05-31 23:13:27 -04:00
|
|
|
MxS32 SetupLegoOmni();
|
2023-10-24 19:38:27 -04:00
|
|
|
void SetupVideoFlags(
|
2024-05-31 23:13:27 -04:00
|
|
|
MxS32 fullScreen,
|
|
|
|
MxS32 flipSurfaces,
|
|
|
|
MxS32 backBuffers,
|
|
|
|
MxS32 using8bit,
|
|
|
|
MxS32 using16bit,
|
|
|
|
MxS32 param_6,
|
|
|
|
MxS32 param_7,
|
|
|
|
MxS32 wideViewAngle,
|
2023-10-24 19:38:27 -04:00
|
|
|
char* deviceId
|
|
|
|
);
|
2024-05-31 17:56:00 -04:00
|
|
|
MxResult SetupWindow();
|
2023-10-24 19:38:27 -04:00
|
|
|
|
|
|
|
void LoadConfig();
|
2024-05-31 23:13:27 -04:00
|
|
|
void Tick();
|
2024-06-01 10:54:17 -04:00
|
|
|
void SetupCursor(Cursor p_cursor);
|
2023-10-24 19:38:27 -04:00
|
|
|
|
2024-05-31 17:56:00 -04:00
|
|
|
static MxU8 MapMouseButtonFlagsToModifier(SDL_MouseButtonFlags p_flags);
|
|
|
|
|
|
|
|
inline SDL_Window* GetWindowHandle() { return m_windowHandle; }
|
2024-02-05 09:01:48 -05:00
|
|
|
inline MxLong GetFrameDelta() { return m_frameDelta; }
|
2024-05-31 23:13:27 -04:00
|
|
|
inline MxS32 GetFullScreen() { return m_fullScreen; }
|
2024-06-01 10:54:17 -04:00
|
|
|
inline SDL_Cursor* GetCursorCurrent() { return m_cursorCurrent; }
|
|
|
|
inline SDL_Cursor* GetCursorBusy() { return m_cursorBusy; }
|
|
|
|
inline SDL_Cursor* GetCursorNo() { return m_cursorNo; }
|
2024-05-31 23:13:27 -04:00
|
|
|
inline MxS32 GetDrawCursor() { return m_drawCursor; }
|
2024-02-05 09:01:48 -05:00
|
|
|
|
2024-05-31 23:13:27 -04:00
|
|
|
inline void SetWindowActive(MxS32 p_windowActive) { m_windowActive = p_windowActive; }
|
2024-02-05 09:01:48 -05:00
|
|
|
|
2024-06-26 14:24:40 -04:00
|
|
|
MxResult ParseArguments(int argc, char** argv);
|
|
|
|
|
2024-02-05 09:01:48 -05:00
|
|
|
private:
|
2024-06-01 10:54:17 -04:00
|
|
|
char* m_hdPath; // 0x00
|
|
|
|
char* m_cdPath; // 0x04
|
|
|
|
char* m_deviceId; // 0x08
|
|
|
|
char* m_savePath; // 0x0c
|
|
|
|
MxS32 m_fullScreen; // 0x10
|
|
|
|
MxS32 m_flipSurfaces; // 0x14
|
|
|
|
MxS32 m_backBuffersInVram; // 0x18
|
|
|
|
MxS32 m_using8bit; // 0x1c
|
|
|
|
MxS32 m_using16bit; // 0x20
|
|
|
|
MxS32 m_unk0x24; // 0x24
|
|
|
|
MxS32 m_use3dSound; // 0x28
|
|
|
|
MxS32 m_useMusic; // 0x2c
|
|
|
|
MxS32 m_useJoystick; // 0x30
|
|
|
|
MxS32 m_joystickIndex; // 0x34
|
|
|
|
MxS32 m_wideViewAngle; // 0x38
|
|
|
|
MxS32 m_islandQuality; // 0x3c
|
|
|
|
MxS32 m_islandTexture; // 0x40
|
|
|
|
MxS32 m_gameStarted; // 0x44
|
|
|
|
MxLong m_frameDelta; // 0x48
|
|
|
|
MxVideoParam m_videoParam; // 0x4c
|
|
|
|
MxS32 m_windowActive; // 0x70
|
|
|
|
SDL_Window* m_windowHandle; // 0x74
|
|
|
|
MxS32 m_drawCursor; // 0x78
|
|
|
|
SDL_Cursor* m_cursorArrow; // 0x7c
|
|
|
|
SDL_Cursor* m_cursorBusy; // 0x80
|
|
|
|
SDL_Cursor* m_cursorNo; // 0x84
|
|
|
|
SDL_Cursor* m_cursorCurrent; // 0x88
|
2024-06-26 14:24:40 -04:00
|
|
|
|
|
|
|
char* m_iniPath;
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
2023-06-29 04:10:08 -04:00
|
|
|
#endif // ISLEAPP_H
|