28 #ifndef AGS_ENGINE_PLATFORM_BASE_AGS_PLATFORM_DRIVER_H 29 #define AGS_ENGINE_PLATFORM_BASE_AGS_PLATFORM_DRIVER_H 31 #include "common/std/vector.h" 32 #include "ags/engine/ac/date_time.h" 33 #include "ags/engine/ac/path_helper.h" 34 #include "ags/shared/debugging/output_handler.h" 35 #include "ags/shared/util/geometry.h" 36 #include "ags/shared/util/ini_util.h" 37 #include "ags/lib/allegro/error.h" 53 enum eScriptSystemOSID {
64 enum SetupReturnValue {
76 virtual void MainInit() { };
78 virtual void PreBackendInit() { };
80 virtual void PostBackendInit() { };
82 virtual void PreBackendExit() { };
84 virtual void PostBackendExit() { };
86 virtual void Delay(
int millis);
87 virtual void DisplayAlert(
const char *, ...) = 0;
88 virtual void AttachToParentConsole();
89 virtual int GetLastSystemError();
93 virtual FSLocation GetAllUsersDataDirectory() {
97 virtual FSLocation GetUserSavedgamesDirectory() {
105 virtual FSLocation GetUserGlobalConfigDirectory() {
115 virtual bool IsLocalDirRestricted() {
return true; }
117 virtual const char *GetIllegalFileChars() {
120 virtual const char *GetDiskWriteAccessTroubleshootingText();
121 virtual const char *GetGraphicsTroubleshootingText() {
124 virtual uint64_t GetDiskFreeSpaceMB(
const Shared::String &path) = 0;
125 virtual const char *GetNoMouseErrorString() = 0;
127 virtual bool IsMouseControlSupported(
bool windowed) {
132 virtual bool IsBackendResponsibleForMouseScaling() {
135 virtual const char *GetAllegroFailUserHint();
136 virtual eScriptSystemOSID GetSystemOSID() = 0;
138 virtual void PlayVideo(
const char *name,
int skip,
int flags);
139 virtual void InitialiseAbufAtStartup();
140 virtual void PostAllegroInit(
bool windowed);
141 virtual void PostAllegroExit() = 0;
142 virtual const char *GetBackendFailUserHint() {
145 virtual void FinishedUsingGraphicsMode();
147 virtual void SetGameWindowIcon();
150 virtual void WriteStdOut(
const char *fmt, ...);
153 virtual void WriteStdErr(
const char *fmt, ...);
156 virtual void DisplayMessageBox(
const char *text) = 0;
157 virtual void YieldCPU();
159 virtual void DisplaySwitchOut();
161 virtual void DisplaySwitchIn();
164 virtual void PauseApplication();
166 virtual void ResumeApplication();
172 virtual bool ExitFullscreenMode();
174 virtual void AdjustWindowStyleForFullscreen();
176 virtual void AdjustWindowStyleForWindowed();
177 virtual int ConvertKeycodeToScanCode(
int keyCode);
179 virtual Size ValidateWindowSize(
const Size &sz,
bool borderless)
const;
181 virtual int InitializeCDPlayer() = 0;
182 virtual int CDPlayerCommand(
int cmdd,
int datt) = 0;
183 virtual void ShutdownCDPlayer() = 0;
188 virtual bool LockMouseToWindow();
189 virtual void UnlockMouse();
194 void SetCommandArgs(
const char *
const argv[],
size_t argc);
197 void SetOutputToErr(
bool on) {
202 void SetGUIMode(
bool on) {
218 bool _logToStdErr =
false;
221 bool _guiMode =
false;
223 const char *
const *_cmdArgs =
nullptr;
224 size_t _cmdArgCount = 0u;
230 #if defined (AGS_HAS_CD_AUDIO) 231 int cd_player_init();
232 int cd_player_control(
int cmdd,
int datt);
Definition: achievements_tables.h:27
Definition: path_helper.h:55
Definition: gfx_defines.h:60
Definition: output_handler.h:39
Definition: geometry.h:148
Definition: script_date_time.h:29
Definition: output_handler.h:55