ScummVM API documentation
script_system.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 // Wrapper around script "System" struct, managing access to its variables.
23 // ScriptSystem is a readable/writeable struct which had been exposed to
24 // script in older versions of API (deprecated).
25 // WARNING: it *MUST* keep its size exact to avoid breaking address offsets
26 // when running old scripts. In case of emergency you may use its reserved
27 // fields, but it's not recommended to do, as this struct is not a part of
28 // the modern API anymore.
29 
30 #ifndef AGS_ENGINE_DYNOBJ_SCRIPT_SYSTEM_H
31 #define AGS_ENGINE_DYNOBJ_SCRIPT_SYSTEM_H
32 
33 #include "ags/engine/ac/dynobj/cc_ags_dynamic_object.h"
34 
35 namespace AGS3 {
36 
38  int width = 0; // game screen width
39  int height = 0; // game screen height
40  int coldepth = 0; // game's color depth, in bits per pixel (8, 16, 32)
41  int os = 0; // operating system's code (see eScriptSystemOSID)
42  int windowed = 0; // windowed/fullscreen flag
43  int vsync = 0; // vertical sync flag
44  int viewport_width = 0; // game viewport width (normal or letterboxed)
45  int viewport_height = 0; // game viewport height (normal or letterboxed)
46  char aci_version[10]{}; // engine version string (informational)
47  int reserved[5]{}; // reserved fields
48 
49  int32_t ReadInt32(void *address, intptr_t offset) override;
50  void WriteInt32(void *address, intptr_t offset, int32_t val) override;
51 };
52 
53 } // namespace AGS3
54 
55 #endif
Definition: script_system.h:37
Definition: cc_ags_dynamic_object.h:108
Definition: ags.h:40