ScummVM API documentation
global_game.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef AGS_ENGINE_AC_GLOBAL_GAME_H
23 #define AGS_ENGINE_AC_GLOBAL_GAME_H
24 
25 #include "ags/shared/util/string.h"
26 #include "ags/lib/system/datetime.h"
27 
28 namespace AGS3 {
29 
30 using namespace AGS; // FIXME later
31 
32 struct SaveListItem {
33  int Slot;
34  Shared::String Description;
35  time_t FileTime = 0;
36 
37  SaveListItem(int slot, const Shared::String &desc, time_t ft)
38  : Slot(slot), Description(desc), FileTime(ft) {
39  }
40 
41  inline bool operator < (const SaveListItem &other) const {
42  return FileTime < other.FileTime;
43  }
44 };
45 
46 // Notify the running game that the engine requested immediate stop
47 void AbortGame();
48 void GiveScore(int amnt);
49 void restart_game();
50 void RestoreGameSlot(int slnum);
51 void DeleteSaveSlot(int slnum);
52 int GetSaveSlotDescription(int slnum, char *desbuf);
53 int LoadSaveSlotScreenshot(int slnum, int width, int height);
54 void FillSaveList(std::vector<SaveListItem> &saves, size_t max_count = -1);
55 void PauseGame();
56 void UnPauseGame();
57 int IsGamePaused();
58 void SetGlobalInt(int index, int valu);
59 int GetGlobalInt(int index);
60 void SetGlobalString(int index, const char *newval);
61 void GetGlobalString(int index, char *strval);
62 int RunAGSGame(const Shared::String &newgame, unsigned int mode, int data);
63 int GetGameParameter(int parm, int data1, int data2, int data3);
64 void QuitGame(int dialog);
65 void SetRestartPoint();
66 void SetGameSpeed(int newspd);
67 int GetGameSpeed();
68 int SetGameOption(int opt, int setting);
69 int GetGameOption(int opt);
70 
71 void SkipUntilCharacterStops(int cc);
72 void EndSkippingUntilCharStops();
73 // skipwith decides how it can be skipped:
74 // 1 = ESC only
75 // 2 = any key
76 // 3 = mouse button
77 // 4 = mouse button or any key
78 // 5 = right click or ESC only
79 void StartCutscene(int skipwith);
80 int EndCutscene();
81 // Tell the game to skip current cutscene
82 void SkipCutscene();
83 
84 // ShowInputBox assumes a string buffer of MAX_MAXSTRLEN
85 void ShowInputBox(const char *msg, char *bufr);
86 void ShowInputBoxImpl(const char *msg, char *bufr, size_t buf_len);
87 
88 int GetLocationType(int xxx, int yyy);
89 void SaveCursorForLocationChange();
90 // GetLocationName assumes a string buffer of MAX_MAXSTRLEN
91 void GetLocationName(int xxx, int yyy, char *buf);
92 
93 int IsKeyPressed(int keycode);
94 
95 int SaveScreenShot(const char *namm);
96 void SetMultitasking(int mode);
97 
98 void RoomProcessClick(int xx, int yy, int mood);
99 int IsInteractionAvailable(int xx, int yy, int mood);
100 
101 void GetMessageText(int msg, char *buffer);
102 
103 void SetSpeechFont(int fontnum);
104 void SetNormalFont(int fontnum);
105 
106 void _sc_AbortGame(const char *text);
107 
108 int GetGraphicalVariable(const char *varName);
109 void SetGraphicalVariable(const char *varName, int p_value);
110 void scrWait(int nloops);
111 int WaitKey(int nloops);
112 int WaitMouse(int nloops);
113 int WaitMouseKey(int nloops);
114 int WaitInput(int input_flags, int nloops);
115 void SkipWait();
116 
117 void scStartRecording(int keyToStop);
118 
119 } // namespace AGS3
120 
121 #endif
Definition: achievements_tables.h:27
Definition: vector.h:39
Definition: string.h:62
Definition: ags.h:40
Definition: global_game.h:32