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
28namespace AGS3 {
29
30using namespace AGS; // FIXME later
31
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
47void AbortGame();
48void GiveScore(int amnt);
49void restart_game();
50void RestoreGameSlot(int slnum);
51void DeleteSaveSlot(int slnum);
52int GetSaveSlotDescription(int slnum, char *desbuf);
53int LoadSaveSlotScreenshot(int slnum, int width, int height);
54void FillSaveList(std::vector<SaveListItem> &saves, size_t max_count = -1);
55void PauseGame();
56void UnPauseGame();
57int IsGamePaused();
58void SetGlobalInt(int index, int valu);
59int GetGlobalInt(int index);
60void SetGlobalString(int index, const char *newval);
61void GetGlobalString(int index, char *strval);
62int RunAGSGame(const Shared::String &newgame, unsigned int mode, int data);
63int GetGameParameter(int parm, int data1, int data2, int data3);
64void QuitGame(int dialog);
65void SetRestartPoint();
66void SetGameSpeed(int newspd);
67int GetGameSpeed();
68int SetGameOption(int opt, int setting);
69int GetGameOption(int opt);
70
71void SkipUntilCharacterStops(int cc);
72void 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
79void StartCutscene(int skipwith);
80int EndCutscene();
81// Tell the game to skip current cutscene
82void SkipCutscene();
83
84// ShowInputBox assumes a string buffer of MAX_MAXSTRLEN
85void ShowInputBox(const char *msg, char *bufr);
86void ShowInputBoxImpl(const char *msg, char *bufr, size_t buf_len);
87
88int GetLocationType(int xxx, int yyy);
89void SaveCursorForLocationChange();
90// GetLocationName assumes a string buffer of MAX_MAXSTRLEN
91void GetLocationName(int xxx, int yyy, char *buf);
92
93int IsKeyPressed(int keycode);
94
95int SaveScreenShot(const char *namm);
96void SetMultitasking(int mode);
97
98void RoomProcessClick(int xx, int yy, int mood);
99int IsInteractionAvailable(int xx, int yy, int mood);
100
101void GetMessageText(int msg, char *buffer);
102
103void SetSpeechFont(int fontnum);
104void SetNormalFont(int fontnum);
105
106void _sc_AbortGame(const char *text);
107
108int GetGraphicalVariable(const char *varName);
109void SetGraphicalVariable(const char *varName, int p_value);
110void scrWait(int nloops);
111int WaitKey(int nloops);
112int WaitMouse(int nloops);
113int WaitMouseKey(int nloops);
114int WaitInput(int input_flags, int nloops);
115void SkipWait();
116
117void scStartRecording(int keyToStop);
118
119} // namespace AGS3
120
121#endif
Definition: string.h:60
Definition: vector.h:39
Definition: global_game.h:32