22 #ifndef AGS_SHARED_AC_GAME_SETUP_STRUCT_BASE_H 23 #define AGS_SHARED_AC_GAME_SETUP_STRUCT_BASE_H 25 #include "ags/lib/allegro.h" 26 #include "ags/shared/ac/game_version.h" 27 #include "ags/shared/ac/game_struct_defines.h" 28 #include "ags/shared/util/string.h" 29 #include "ags/globals.h" 42 struct WordsDictionary;
48 static const int GAME_NAME_LENGTH = 50;
49 static const int MAX_OPTIONS = 100;
50 static const int NUM_INTS_RESERVED = 17;
52 char gamename[GAME_NAME_LENGTH];
53 int32_t options[MAX_OPTIONS];
54 unsigned char paluses[256];
61 int numdialog, numdlgmessage;
66 unsigned short hotdot, hotdotouter;
70 int default_lipsync_frame;
72 int32_t reserved[NUM_INTS_RESERVED];
73 String messages[MAXGLOBALMES];
80 int32_t *load_messages;
82 bool load_compiled_script;
91 void SetDefaultResolution(GameResolutionType type);
92 void SetDefaultResolution(
Size game_res);
93 void SetGameResolution(GameResolutionType type);
94 void SetGameResolution(
Size game_res);
146 inline GameResolutionType GetResolutionType()
const {
147 return _resolutionType;
151 const Size &GetGameRes()
const {
152 return _gameResolution;
156 const Size &GetDefaultRes()
const {
157 return _defGameResolution;
161 const Size &GetDataRes()
const {
162 return _dataResolution;
165 inline int GetDataUpscaleMult()
const {
166 return _dataUpscaleMult;
171 inline int GetRelativeUIMult()
const {
172 return _relativeUIMult;
176 inline int GetScreenUpscaleMult()
const {
177 return _screenUpscaleMult;
181 inline bool AllowRelativeRes()
const {
182 return options[OPT_RELATIVEASSETRES] != 0;
187 inline bool IsLegacyHiRes()
const {
188 if (_resolutionType == kGameResolution_Custom)
189 return (_gameResolution.Width * _gameResolution.Height) > (320 * 240);
190 return ::AGS3::IsLegacyHiRes(_resolutionType);
193 inline bool IsDataInNativeCoordinates()
const {
194 return options[OPT_NATIVECOORDINATES] != 0;
198 inline bool IsLegacyLetterbox()
const {
199 return options[OPT_LETTERBOX] != 0;
202 const Size &GetLetterboxSize()
const {
203 return _letterboxSize;
212 inline bool IsLegacyAudioSystem()
const {
213 return _G(loaded_game_file_version) < kGameVersion_320;
218 return IsLegacyAudioSystem() ?
"music.vox" :
"audio.vox";
224 OPT_DEBUGMODE, OPT_LETTERBOX, OPT_HIRES_FONTS, OPT_SPLITRESOURCES,
225 OPT_STRICTSCRIPTING, OPT_LEFTTORIGHTEVAL, OPT_COMPRESSSPRITES, OPT_STRICTSTRINGS,
226 OPT_NATIVECOORDINATES, OPT_SAFEFILEPATHS, OPT_DIALOGOPTIONSAPI, OPT_BASESCRIPTAPI,
227 OPT_SCRIPTCOMPATLEV, OPT_RELATIVEASSETRES, OPT_GAMETEXTENCODING, OPT_KEYHANDLEAPI,
233 void SetDefaultResolution(GameResolutionType type,
Size game_res);
234 void SetNativeResolution(GameResolutionType type,
Size game_res);
235 void OnResolutionSet();
238 GameResolutionType _resolutionType;
243 Size _defGameResolution;
245 Size _gameResolution;
248 Size _dataResolution;
254 int _dataUpscaleMult;
258 int _screenUpscaleMult;
Definition: achievements_tables.h:27
Definition: words_dictionary.h:41
Definition: game_setup_struct_base.h:47
Definition: character_info.h:74
Definition: geometry.h:144
Definition: cc_script.h:37