22 #ifndef AGS_SHARED_AC_GAME_STRUCT_DEFINES_H 23 #define AGS_SHARED_AC_GAME_STRUCT_DEFINES_H 25 #include "ags/shared/util/geometry.h" 26 #include "ags/shared/core/types.h" 30 #define PAL_GAMEWIDE 0 32 #define PAL_BACKGROUND 2 33 #define MAXGLOBALMES 500 34 #define GLOBALMESLENGTH 500 36 #define LEGACY_MAX_FONTS 30 39 #define OPT_DEBUGMODE 0 40 #define OPT_SCORESOUND 1 41 #define OPT_WALKONLOOK 2 42 #define OPT_DIALOGIFACE 3 43 #define OPT_ANTIGLIDE 4 44 #define OPT_TWCUSTOM 5 45 #define OPT_DIALOGGAP 6 46 #define OPT_NOSKIPTEXT 7 47 #define OPT_DISABLEOFF 8 48 #define OPT_ALWAYSSPCH 9 49 #define OPT_SPEECHTYPE 10 50 #define OPT_PIXPERFECT 11 51 #define OPT_NOWALKMODE 12 52 #define OPT_LETTERBOX 13 53 #define OPT_FIXEDINVCURSOR 14 54 #define OPT_NOLOSEINV 15 55 #define OPT_HIRES_FONTS 16 56 #define OPT_SPLITRESOURCES 17 57 #define OPT_ROTATECHARS 18 58 #define OPT_FADETYPE 19 59 #define OPT_HANDLEINVCLICKS 20 60 #define OPT_MOUSEWHEEL 21 61 #define OPT_DIALOGNUMBERED 22 62 #define OPT_DIALOGUPWARDS 23 63 #define OPT_CROSSFADEMUSIC 24 64 #define OPT_ANTIALIASFONTS 25 65 #define OPT_THOUGHTGUI 26 66 #define OPT_TURNTOFACELOC 27 67 #define OPT_RIGHTLEFTWRITE 28 // right-to-left text writing 68 #define OPT_DUPLICATEINV 29 // if they have 2 of the item, draw it twice 69 #define OPT_SAVESCREENSHOT 30 70 #define OPT_PORTRAITSIDE 31 71 #define OPT_STRICTSCRIPTING 32 // don't allow MoveCharacter-style commands 72 #define OPT_LEFTTORIGHTEVAL 33 // left-to-right operator evaluation 73 #define OPT_COMPRESSSPRITES 34 // [DEPRECATED] 74 #define OPT_STRICTSTRINGS 35 // don't allow old-style strings, for reference only 75 #define OPT_NEWGUIALPHA 36 76 #define OPT_RUNGAMEDLGOPTS 37 77 #define OPT_NATIVECOORDINATES 38 // defines coordinate relation between game logic and game screen 78 #define OPT_GLOBALTALKANIMSPD 39 79 #define OPT_HIGHESTOPTION_321 39 80 #define OPT_SPRITEALPHA 40 81 #define OPT_SAFEFILEPATHS 41 82 #define OPT_DIALOGOPTIONSAPI 42 // version of dialog options API (-1 for pre-3.4.0 API) 83 #define OPT_BASESCRIPTAPI 43 // version of the Script API (ScriptAPIVersion) used to compile game script 84 #define OPT_SCRIPTCOMPATLEV 44 // level of API compatibility (ScriptAPIVersion) used to compile game script 85 #define OPT_RENDERATSCREENRES 45 // scale sprites at the (final) screen resolution 86 #define OPT_RELATIVEASSETRES 46 // relative asset resolution mode (where sprites are resized to match game type) 87 #define OPT_WALKSPEEDABSOLUTE 47 // if movement speeds are independent of walkable mask resolution 88 #define OPT_CLIPGUICONTROLS 48 // clip drawn gui control contents to the control's rectangle 89 #define OPT_GAMETEXTENCODING 49 // how the text in the game data should be interpreted 90 #define OPT_KEYHANDLEAPI 50 // key handling mode (old/new) 91 #define OPT_CUSTOMENGINETAG 51 // custom engine tag (for overriding behavior) 92 #define OPT_HIGHESTOPTION OPT_CUSTOMENGINETAG 93 #define OPT_NOMODMUSIC 98 // [DEPRECATED] 94 #define OPT_LIPSYNCTEXT 99 96 #define CUSTOMENG_NONE 0 97 #define CUSTOMENG_DRACONIAN 1 // Draconian Edition 98 #define CUSTOMENG_CLIFFTOP 2 // Clifftop Games 101 #define PORTRAIT_LEFT 0 102 #define PORTRAIT_RIGHT 1 103 #define PORTRAIT_ALTERNATE 2 104 #define PORTRAIT_XPOSITION 3 107 #define FADE_NORMAL 0 108 #define FADE_INSTANT 1 109 #define FADE_DISSOLVE 2 110 #define FADE_BOXOUT 3 111 #define FADE_CROSSFADE 4 112 #define FADE_LAST 4 // this should equal the last one 116 #define FFLG_LEGACY_SIZEMASK 0x3f 117 #define MAX_LEGACY_FONT_SIZE 63 119 #define FFLG_SIZEMULTIPLIER 0x01 // size data means multiplier 120 #define FFLG_DEFLINESPACING 0x02 // linespacing derived from the font height 124 #define FFLG_REPORTNOMINALHEIGHT 0x04 127 #define FFLG_ASCENDERFIXUP 0x08 129 #define FFLG_TTF_BACKCOMPATMASK (FFLG_REPORTNOMINALHEIGHT | FFLG_ASCENDERFIXUP) 131 #define FFLG_LOADMODEMASK (FFLG_REPORTNOMINALHEIGHT | FFLG_ASCENDERFIXUP) 133 #define FONT_OUTLINE_NONE -1 134 #define FONT_OUTLINE_AUTO -10 136 #define DIALOG_OPTIONS_HIGHLIGHT_COLOR_DEFAULT 14 // Yellow 138 #define MAXVIEWNAMELENGTH 15 139 #define MAXLIPSYNCFRAMES 20 140 #define MAX_GUID_LENGTH 40 141 #define MAX_SG_EXT_LENGTH 20 142 #define MAX_SG_FOLDER_LEN 50 144 enum GameResolutionType {
145 kGameResolution_Undefined = -1,
147 kGameResolution_Default = 0,
148 kGameResolution_320x200 = 1,
149 kGameResolution_320x240 = 2,
150 kGameResolution_640x400 = 3,
151 kGameResolution_640x480 = 4,
152 kGameResolution_800x600 = 5,
153 kGameResolution_1024x768 = 6,
154 kGameResolution_1280x720 = 7,
155 kGameResolution_Custom = 8,
158 kGameResolution_LastLoRes = kGameResolution_320x240,
159 kGameResolution_FirstHiRes = kGameResolution_640x400
162 inline bool IsLegacyHiRes(GameResolutionType resolution) {
163 return resolution > kGameResolution_LastLoRes;
166 Size ResolutionTypeToSize(GameResolutionType resolution,
bool letterbox =
false);
169 enum DialogOptionNumbering {
170 kDlgOptNoNumbering = -1,
181 enum ScriptAPIVersion {
182 kScriptAPI_Undefined = INT32_MIN,
190 kScriptAPI_v3507 = 7,
192 kScriptAPI_v360 = 3060000,
193 kScriptAPI_v36026 = 3060026,
194 kScriptAPI_Current = kScriptAPI_v36026
197 extern const char *GetScriptAPIName(ScriptAPIVersion v);
201 enum RenderAtScreenRes {
202 kRenderAtScreenRes_UserDefined = 0,
203 kRenderAtScreenRes_Enabled = 1,
204 kRenderAtScreenRes_Disabled = 2,
208 enum GameSpriteAlphaRenderingStyle {
209 kSpriteAlphaRender_Legacy = 0,
210 kSpriteAlphaRender_Proper
214 enum GameGuiAlphaRenderingStyle {
215 kGuiAlphaRender_Legacy = 0,
216 kGuiAlphaRender_AdditiveAlpha,
217 kGuiAlphaRender_Proper
222 #define SPF_HIRES 0x01 // sized for high native resolution (legacy option) 223 #define SPF_HICOLOR 0x02 // is 16-bit 224 #define SPF_DYNAMICALLOC 0x04 // created by runtime script 225 #define SPF_TRUECOLOR 0x08 // is 32-bit 226 #define SPF_ALPHACHANNEL 0x10 // has alpha-channel 227 #define SPF_VAR_RESOLUTION 0x20 // variable resolution (refer to SPF_HIRES) 228 #define SPF_HADALPHACHANNEL 0x80 // the saved sprite on disk has one 242 inline bool IsRelativeRes()
const {
243 return (Flags & SPF_VAR_RESOLUTION) != 0;
248 inline bool IsLegacyHiRes()
const {
249 return (Flags & SPF_HIRES) != 0;
259 enum AutoOutlineStyle :
int {
277 int AutoOutlineThickness;
279 AutoOutlineStyle AutoOutlineStyle;
Definition: geometry.h:144
Definition: game_struct_defines.h:258
Definition: game_struct_defines.h:231