29 #ifndef AGS_SHARED_AC_GAME_SETUP_STRUCT_BASE_H 30 #define AGS_SHARED_AC_GAME_SETUP_STRUCT_BASE_H 32 #include "ags/lib/allegro.h" 33 #include "common/std/array.h" 34 #include "common/std/memory.h" 35 #include "common/std/vector.h" 36 #include "ags/shared/ac/game_version.h" 37 #include "ags/shared/ac/game_struct_defines.h" 38 #include "ags/shared/ac/words_dictionary.h" 39 #include "ags/shared/util/string.h" 40 #include "ags/globals.h" 58 static const int LEGACY_GAME_NAME_LENGTH = 50;
59 static const int MAX_OPTIONS = 100;
60 static const int NUM_INTS_RESERVED = 16;
63 int32_t options[MAX_OPTIONS];
82 int default_lipsync_frame;
84 int32_t reserved[NUM_INTS_RESERVED];
85 String messages[MAXGLOBALMES];
97 void SetDefaultResolution(GameResolutionType type);
98 void SetDefaultResolution(
Size game_res);
99 void SetGameResolution(GameResolutionType type);
100 void SetGameResolution(
Size game_res);
104 bool HasCCScript =
false;
105 bool HasWordsDict =
false;
108 uint32_t ExtensionOffset = 0u;
111 HasMessages.
resize(MAXGLOBALMES);
166 inline GameResolutionType GetResolutionType()
const {
167 return _resolutionType;
171 const Size &GetGameRes()
const {
172 return _gameResolution;
176 const Size &GetDefaultRes()
const {
177 return _defGameResolution;
181 const Size &GetDataRes()
const {
182 return _dataResolution;
185 inline int GetDataUpscaleMult()
const {
186 return _dataUpscaleMult;
191 inline int GetRelativeUIMult()
const {
192 return _relativeUIMult;
196 inline int GetScreenUpscaleMult()
const {
197 return _screenUpscaleMult;
201 inline bool AllowRelativeRes()
const {
202 return options[OPT_RELATIVEASSETRES] != 0;
207 inline bool IsLegacyHiRes()
const {
208 if (_resolutionType == kGameResolution_Custom)
209 return (_gameResolution.Width * _gameResolution.Height) > (320 * 240);
210 return ::AGS3::IsLegacyHiRes(_resolutionType);
213 inline bool IsDataInNativeCoordinates()
const {
214 return options[OPT_NATIVECOORDINATES] != 0;
218 inline bool IsLegacyLetterbox()
const {
219 return options[OPT_LETTERBOX] != 0;
222 const Size &GetLetterboxSize()
const {
223 return _letterboxSize;
232 inline bool IsLegacyAudioSystem()
const {
233 return _G(loaded_game_file_version) < kGameVersion_320;
238 return IsLegacyAudioSystem() ?
"music.vox" :
"audio.vox";
244 OPT_DEBUGMODE, OPT_LETTERBOX, OPT_HIRES_FONTS, OPT_SPLITRESOURCES,
245 OPT_STRICTSCRIPTING, OPT_LEFTTORIGHTEVAL, OPT_COMPRESSSPRITES, OPT_STRICTSTRINGS,
246 OPT_NATIVECOORDINATES, OPT_SAFEFILEPATHS, OPT_DIALOGOPTIONSAPI, OPT_BASESCRIPTAPI,
247 OPT_SCRIPTCOMPATLEV, OPT_RELATIVEASSETRES, OPT_GAMETEXTENCODING, OPT_KEYHANDLEAPI,
253 void SetDefaultResolution(GameResolutionType type,
Size game_res);
254 void SetNativeResolution(GameResolutionType type,
Size game_res);
255 void OnResolutionSet();
258 GameResolutionType _resolutionType;
263 Size _defGameResolution;
265 Size _gameResolution;
268 Size _dataResolution;
274 int _dataUpscaleMult;
278 int _screenUpscaleMult;
Definition: achievements_tables.h:27
Definition: game_setup_struct_base.h:57
void resize(size_type newSize)
Definition: array.h:411
Definition: geometry.h:148
Definition: game_setup_struct_base.h:103