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 // sprite compression type (None, RLE, LZW, Deflate) 74 #define OPT_STRICTSTRINGS 35 // don't allow old-style strings, for reference only 75 #define OPT_NEWGUIALPHA 36 // alpha blending method when drawing GUI and controls 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 // alpha blending method when drawing images on DrawingSurface 81 #define OPT_SAFEFILEPATHS 41 // restricted file path in script (not writing to the game dir, etc) 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_SCALECHAROFFSETS 52 // apply character scaling to the sprite offsets (z, locked offs) 93 #define OPT_HIGHESTOPTION OPT_SCALECHAROFFSETS 94 #define OPT_NOMODMUSIC 98 // [DEPRECATED] 95 #define OPT_LIPSYNCTEXT 99 97 #define CUSTOMENG_NONE 0 98 #define CUSTOMENG_DRACONIAN 1 // Draconian Edition 99 #define CUSTOMENG_CLIFFTOP 2 // Clifftop Games 102 #define PORTRAIT_LEFT 0 103 #define PORTRAIT_RIGHT 1 104 #define PORTRAIT_ALTERNATE 2 105 #define PORTRAIT_XPOSITION 3 108 #define FADE_NORMAL 0 109 #define FADE_INSTANT 1 110 #define FADE_DISSOLVE 2 111 #define FADE_BOXOUT 3 112 #define FADE_CROSSFADE 4 113 #define FADE_LAST 4 // this should equal the last one 117 #define FFLG_LEGACY_SIZEMASK 0x3f 118 #define MAX_LEGACY_FONT_SIZE 63 120 #define FFLG_SIZEMULTIPLIER 0x01 // size data means multiplier 121 #define FFLG_DEFLINESPACING 0x02 // linespacing derived from the font height 125 #define FFLG_REPORTNOMINALHEIGHT 0x04 128 #define FFLG_ASCENDERFIXUP 0x08 130 #define FFLG_TTF_BACKCOMPATMASK (FFLG_REPORTNOMINALHEIGHT | FFLG_ASCENDERFIXUP) 132 #define FFLG_LOADMODEMASK (FFLG_REPORTNOMINALHEIGHT | FFLG_ASCENDERFIXUP) 134 #define FONT_OUTLINE_NONE -1 135 #define FONT_OUTLINE_AUTO -10 137 #define DIALOG_OPTIONS_HIGHLIGHT_COLOR_DEFAULT 14 // Yellow 140 #define LEGACY_MAXVIEWNAMELENGTH 15 141 #define MAXLIPSYNCFRAMES 20 142 #define MAX_GUID_LENGTH 40 143 #define MAX_SG_EXT_LENGTH 20 144 #define LEGACY_MAX_SG_FOLDER_LEN 50 146 enum GameResolutionType {
147 kGameResolution_Undefined = -1,
149 kGameResolution_Default = 0,
150 kGameResolution_320x200 = 1,
151 kGameResolution_320x240 = 2,
152 kGameResolution_640x400 = 3,
153 kGameResolution_640x480 = 4,
154 kGameResolution_800x600 = 5,
155 kGameResolution_1024x768 = 6,
156 kGameResolution_1280x720 = 7,
157 kGameResolution_Custom = 8,
160 kGameResolution_LastLoRes = kGameResolution_320x240,
161 kGameResolution_FirstHiRes = kGameResolution_640x400
164 inline bool IsLegacyHiRes(GameResolutionType resolution) {
165 return resolution > kGameResolution_LastLoRes;
168 Size ResolutionTypeToSize(GameResolutionType resolution,
bool letterbox =
false);
171 enum DialogOptionNumbering {
172 kDlgOptNoNumbering = -1,
183 enum ScriptAPIVersion {
184 kScriptAPI_Undefined = INT32_MIN,
192 kScriptAPI_v3507 = 7,
194 kScriptAPI_v360 = 3060000,
195 kScriptAPI_v36026 = 3060026,
196 kScriptAPI_v361 = 3060100,
197 kScriptAPI_Current = kScriptAPI_v361
200 extern const char *GetScriptAPIName(ScriptAPIVersion v);
204 enum RenderAtScreenRes {
205 kRenderAtScreenRes_UserDefined = 0,
206 kRenderAtScreenRes_Enabled = 1,
207 kRenderAtScreenRes_Disabled = 2,
211 enum GameSpriteAlphaRenderingStyle {
212 kSpriteAlphaRender_Legacy = 0,
213 kSpriteAlphaRender_Proper
217 enum GameGuiAlphaRenderingStyle {
218 kGuiAlphaRender_Legacy = 0,
219 kGuiAlphaRender_AdditiveAlpha,
220 kGuiAlphaRender_Proper
226 #define SPF_HIRES 0x01 // sized for high native resolution (legacy option) 227 #define SPF_HICOLOR 0x02 // is 16-bit (UNUSED) 228 #define SPF_DYNAMICALLOC 0x04 // created by runtime script 229 #define SPF_TRUECOLOR 0x08 // is 32-bit (UNUSED) 230 #define SPF_ALPHACHANNEL 0x10 // has alpha-channel 231 #define SPF_VAR_RESOLUTION 0x20 // variable resolution (refer to SPF_HIRES) 232 #define SPF_HADALPHACHANNEL 0x80 // the saved sprite on disk has one 233 #define SPF_OBJECTOWNED 0x0100 // owned by a game object (not created in user script) 242 SpriteInfo(
int w,
int h, uint32_t flags) : Width(w), Height(h), Flags(flags) {}
244 inline Size GetResolution()
const {
return Size(Width, Height); }
246 inline bool IsDynamicSprite()
const {
return (Flags & SPF_DYNAMICALLOC) != 0; }
252 inline bool IsRelativeRes()
const {
253 return (Flags & SPF_VAR_RESOLUTION) != 0;
258 inline bool IsLegacyHiRes()
const {
259 return (Flags & SPF_HIRES) != 0;
269 enum AutoOutlineStyle :
int {
287 int AutoOutlineThickness;
289 AutoOutlineStyle AutoOutlineStyle;
Definition: geometry.h:148
Definition: game_struct_defines.h:268
Definition: game_struct_defines.h:236