Standard Enumerated Types
AGS has several enumerated types in its standard header. These are used in calls to various commands, and will usually pop up automatically in autocomplete. However, for times where autocomplete doesn't do the job, having a manual reference is invaluable:
Alignment
enum Alignment {
eAlignNone = 0,
eAlignTopLeft = 1,
eAlignTopCenter = 2,
eAlignTopRight = 4,
eAlignMiddleLeft = 8,
eAlignMiddleCenter = 16,
eAlignMiddleRight = 32,
eAlignBottomLeft = 64,
eAlignBottomCenter = 128,
eAlignBottomRight = 256,
eAlignHasLeft = 73,
eAlignHasRight = 292,
eAlignHasTop = 7,
eAlignHasBottom = 448,
eAlignHasHorCenter = 146,
eAlignHasVerCenter = 56
};The Alignment enumeration consists of values that could be summed up in one integer variable to form a more complex combination of alignments. Although that ability is not used anywhere in practice yet, but may be in future. Additionally, it provides a set of masks that could be applied bitwise to check if alignment variable contains one of the distinct directions, for example:
if (align & eAlignHasLeft)
// some code herewill execute some code if align variable contains "Left" in any combination (eAlignTopLeft, eAlignMiddleLeft or eAlignBottomLeft).
Compatibility: new version of Alignment enum was introduced in AGS 3.5.0. Previous Alignment was renamed into HorizontalAlignment.
Used by: Button.TextAlignment
AudioFileType
enum AudioFileType {
eAudioFileOGG,
eAudioFileMP3,
eAudioFileWAV,
eAudioFileVOC,
eAudioFileMIDI,
eAudioFileMOD
};Used by: AudioClip.FileType
AudioPriority
enum AudioPriority {
eAudioPriorityVeryLow = 1,
eAudioPriorityLow = 25,
eAudioPriorityNormal = 50,
eAudioPriorityHigh = 75,
eAudioPriorityVeryHigh = 100
};Used by: AudioClip.Play, AudioClip.PlayFrom, AudioClip.PlayQueued
BlockingStyle
enum BlockingStyle {
eBlock,
eNoBlock
};Used by: Character.Animate, Character.FaceCharacter, Character.FaceLocation, Character.FaceObject, Character.Move, Character.Walk, Character.WalkStraight, Object.Animate, Object.Move
eCDAudioFunction
enum eCDAudioFunction {
eCDIsDriverPresent,
eCDGetPlayingStatus,
eCDPlayTrack,
eCDPausePlayback,
eCDResumePlayback,
eCDGetNumTracks,
eCDEject,
eCDCloseTray,
eCDGetCDDriveCount,
eCDSelectActiveCDDrive
};Used by: CDAudio
CharacterDirection
enum CharacterDirection {
eDirectionDown = 0,
eDirectionLeft,
eDirectionRight,
eDirectionUp,
eDirectionDownRight,
eDirectionUpRight,
eDirectionDownLeft,
eDirectionUpLeft,
eDirectionNone = SCR_NO_VALUE
};Used by: Character.ChangeRoom, Character.FaceDirection
CursorMode
enum CursorMode {
eModeXXXX,
eModeXXXX,
// ...
};The CursorMode enumeration is generated automatically based on your mouse cursors. The cursor mode name is taken, all its spaces are removed, and eMode is added to the front.
Used by: IsInteractionAvailable, Room.ProcessClick, Mouse.ChangeModeGraphic, Mouse.ChangeModeHotspot, Mouse.DisableMode, Mouse.EnableMode, Mouse.IsModeEnabled, Mouse.UseModeGraphic, Mouse.Mode, InventoryItem.IsInteractionAvailable, InventoryItem.RunInteraction, Hotspot.IsInteractionAvailable, Hotspot.RunInteraction, Object.IsInteractionAvailable, Object.RunInteraction, Character.IsInteractionAvailable, Character.RunInteraction
CutsceneSkipType
enum CutsceneSkipType {
eSkipESCOnly,
eSkipAnyKey,
eSkipMouseClick,
eSkipAnyKeyOrMouseClick,
eSkipESCOrRightButton,
eSkipScriptOnly
};Used by: StartCutscene
DialogOptionsNumbering
enum DialogOptionsNumbering {
eDialogOptNumbers_Disabled = -1,
eDialogOptNumbers_KeysOnly = 0,
eDialogOptNumbers_Display = 1
};Used by: Dialog.OptionsNumbering
DialogOptionSayStyle
enum DialogOptionSayStyle {
eSayUseOptionSetting,
eSayAlways,
eSayNever
};Used by: Dialog.DisplayOptions
DialogOptionState
enum DialogOptionState {
eOptionOff,
eOptionOn,
eOptionOffForever
};Used by: Dialog.GetOptionState, Dialog.SetOptionState
Direction
enum Direction {
eForwards,
eBackwards
};Used by: Character.Animate, Object.Animate
EngineValueID
enum EngineValueID
{
ENGINE_VALUE_UNDEFINED = 0, // formality...
ENGINE_VALUE_SI_VALUENAME, // get engine value's own name, by its index
ENGINE_VALUE_S_ENGINE_NAME,
ENGINE_VALUE_S_ENGINE_VERSION, // N.N.N.N (with an optional custom tag)
ENGINE_VALUE_S_ENGINE_VERSION_FULL, // full, with bitness, endianess and any tag list
ENGINE_VALUE_S_DISPLAY_MODE_STR,
ENGINE_VALUE_S_GFXRENDERER,
ENGINE_VALUE_S_GFXFILTER,
ENGINE_VALUE_I_SPRCACHE_MAXNORMAL, // sprite cache capacity limit (in KB)
ENGINE_VALUE_I_SPRCACHE_NORMAL, // sprite cache capacity filled (in KB)
ENGINE_VALUE_I_SPRCACHE_LOCKED, // amount of locked sprites (in KB)
ENGINE_VALUE_I_SPRCACHE_EXTERNAL, // amount of external sprites, that means dynamic sprites (in KB)
ENGINE_VALUE_I_TEXCACHE_MAXNORMAL, // texture cache capacity limit (in KB)
ENGINE_VALUE_I_TEXCACHE_NORMAL, // texture cache capacity filled (in KB)
ENGINE_VALUE_I_FPS_MAX, // max fps, this is set by SetGameSpeed
ENGINE_VALUE_I_FPS, // real average fps (updates along with the game run)
ENGINE_VALUE_LAST // in case user wants to iterate them
};The EngineValueID follows the pattern ENGINE_VALUE_<I,II,S,SI>_NAME, where
I- integer,S- string,II- indexed integer,SI- indexed string.
Compatibility: supported by AGS 3.6.2 and higher.
Used by: System.GetEngineInteger, System.GetEngineString
EventType
enum EventType {
eEventLeaveRoom,
eEventEnterRoomBeforeFadein,
eEventGotScore,
eEventGUIMouseDown,
eEventGUIMouseUp,
eEventAddInventory,
eEventLoseInventory,
eEventRestoreGame,
eEventEnterRoomAfterFadein,
eEventLeaveRoomAfterFadeout,
eEventGameSaved
};Compatibility: the eEventEnterRoomAfterFadein is supported by AGS 3.6.0 and later versions. The eEventLeaveRoomAfterFadeout and eEventGameSaved is supported by AGS 3.6.1 and later versions.
Passed into: on_event
FileMode
enum FileMode {
eFileRead,
eFileWrite,
eFileAppend
};Used by: File.Open
FileSeek
enum FileSeek {
eSeekBegin = 0,
eSeekCurrent = 1,
eSeekEnd = 2
};Used by: File.Seek
FileSortStyle
enum FileSortStyle
{
eFileSort_None,
eFileSort_Name,
eFileSort_Time
};Compatibility: supported by AGS 3.6.2 and higher.
Used by File.GetFiles, ListBox.FillDirList
eFlipDirection
enum eFlipDirection {
eFlipLeftToRight,
eFlipUpsideDown,
eFlipBoth
};Used by: DynamicSprite.Flip
FontType
enum FontType {
eNullFont
eFontXXXX,
eFontXXXX,
// ...
};The FontType enumeration is generated automatically based on your fonts. The font name is taken, all its spaces are removed, and eFont is added to the front.
The eNullFont is a special value that can be used in place of an existing font, and instead will draw no text, and return 0 size for the text.
Compatibility: the eNullFont is supported by AGS 3.6.2 and later versions.
Used by: Button.Font, DrawingSurface.DrawMessageWrapped, DrawingSurface.DrawString, DrawingSurface.DrawStringWrapped, Game.NormalFont, Game.SpeechFont, GetTextHeight, GetTextWidth, Label.Font, ListBox.Font, TextBox.Font, Overlay.CreateTextual, Overlay.SetText
GUIPopupStyle
enum GUIPopupStyle {
eGUIPopupNormal = 0,
eGUIPopupMouseYPos = 1,
eGUIPopupModal = 2,
eGUIPopupPersistent = 3
};Compatibility: supported by AGS 3.5.0 and higher.
Used by: GUI.PopupStyle
HorizontalAlignment
enum HorizontalAlignment {
eAlignLeft = 1,
eAlignCenter = 2,
eAlignRight = 4
};Note that HorizontalAlignment's values match the first values of Alignment enumeration (eAlignTopLeft, eAlignTopCenter, eAlignTopRight).
Compatibility: replaced old Alignment enumeration in AGS 3.5.0.
Used by: Character.LockViewAligned, DrawingSurface.DrawStringWrapped, Label.TextAlignment, ListBox.TextAlignment, Speech.TextAlignment
InputType
enum InputType
{
eInputNone = 0x00000000,
eInputKeyboard = 0x02000000,
eInputMouse = 0x04000000,
eInputAny = 0xFF000000
};The InputType enumeration consists of values that could be summed up in one integer variable to form a combination of input types. This may be used to store several "types" in one integer, pass them into a function, or return from a function. You may use bitwise operation to check if a variable contains one of the distinct types, for example:
if (type & eInputKeyboard)
// some code herewill execute some code if type variable contains at least "eInputKeyboard".
Compatibility: supported by AGS 3.6.0 and higher.
Used by: Wait functions
LocationType
enum LocationType {
eLocationNothing,
eLocationHotspot,
eLocationCharacter,
eLocationObject
};Returned by: GetLocationType
LogLevel
enum LogLevel
{
eLogAlert = 1,
eLogFatal = 2,
eLogError = 3,
eLogWarn = 4,
eLogInfo = 5,
eLogDebug = 6
};Compatibility: supported by AGS 3.6.0 and higher.
Used by: System.Log
eOperatingSystem
enum eOperatingSystem {
eOSDOS,
eOSWindows,
eOSLinux,
eOSMacOS,
eOSAndroid,
eOSiOS,
eOSPSP,
eOSWeb,
eOSFreeBSD
};Used by: System.OperatingSystem
RenderLayer
enum RenderLayer {
eRenderLayerNone = 0x00000000,
eRenderLayerEngine = 0x00000001,
eRenderLayerCursor = 0x00000002,
eRenderLayerUI = 0x00000004,
eRenderLayerRoom = 0x00000008,
eRenderLayerAll = 0xFFFFFFFF
};The RenderLayer enum lets specify which elements should be rendered in a screen capture. This allows you to, as an example, create a screenshot of only the room layer and not include any GUI or cursor on top. The Engine layer is for things like the in-engine FPS counter.
The RenderLayer enum can be combined like flags, using bitwise operators.
Compatibility: supported by AGS 3.6.2 and higher.
Used by: DynamicSprite.CreateFromScreenShot, SetGameOption
RepeatStyle
enum RepeatStyle {
eOnce,
eRepeat
};Used by: Button.Animate, Character.Animate, Object.Animate
RestoredSaveResult
enum RestoredSaveResult
{
eRestoredSave_ClearData = 0x01,
eRestoredSave_MissingData = 0x08,
eRestoredSave_ExtraData = 0x10,
eRestoredSave_Prescan = 0x20
};The RestoredSaveResult enum is used to specify the result of reading a save.
The RestoredSaveResult enum can be combined like flags, using bitwise operators.
Compatibility: supported by AGS 3.6.2 and higher.
Used by: validate_restored_save
RoundDirection
enum RoundDirection {
eRoundDown,
eRoundNearest,
eRoundUp
};Used by: FloatToInt
SaveGameSortStyle
enum SaveGameSortStyle
{
eSaveGameSort_None,
eSaveGameSort_Number,
eSaveGameSort_Time,
eSaveGameSort_Description
};Compatibility: supported by AGS 3.6.2 and higher.
Used by: Game.GetSaveSlots, Game.ScanSaveSlots, ListBox.FillSaveGameList, ListBox.FillSaveGameSlots
SaveComponentSelection
enum SaveComponentSelection
{
eSaveCmp_None = 0,
eSaveCmp_Audio = 0x00000002,
eSaveCmp_Dialogs = 0x00000008,
eSaveCmp_GUI = 0x00000010,
eSaveCmp_Cursors = 0x00000040,
eSaveCmp_Views = 0x00000080,
eSaveCmp_DynamicSprites = 0x00000100,
eSaveCmp_Plugins = 0x00002000
};The SaveComponentSelection enum lets specify which parts of the save should be skipped when writing or restoring a game save. This allows you to, as an example, keep certain things persistent in your game, unaffected by player saving and loading their story progress.
The SaveComponentSelection enum can be combined like flags, using bitwise operators.
Compatibility: supported by AGS 3.6.2 and higher.
Used by: SetGameOption, RestoredSaveInfo
SkipSpeechStyle
enum SkipSpeechStyle {
eSkipNone = -1,
eSkipKeyMouseTime = 0,
eSkipKeyTime = 1,
eSkipTime = 2,
eSkipKeyMouse = 3,
eSkipMouseTime = 4,
eSkipKey = 5,
eSkipMouse = 6
};Used by: Speech.SkipStyle
SortDirection
enum SortDirection
{
eSortNoDirection,
eSortAscending,
eSortDescending
};Compatibility: supported by AGS 3.6.2 and higher.
Used by ListBox.FillDirList, ListBox.FillSaveGameList, ListBox.FillSaveGameSlots
SortStyle
enum SortStyle {
eNonSorted = 0,
eSorted = 1
};Compatibility: supported by AGS 3.5.0 and higher.
Used by: Dictionary.Create, Set.Create
eSpeechStyle
enum eSpeechStyle {
eSpeechLucasarts,
eSpeechSierra,
eSpeechSierraWithBackground,
eSpeechFullScreen
};Used by: Speech.Style
StopMovementStyle
enum StopMovementStyle
{
eKeepMoving = 0,
eStopMoving = 1
};Used by: Character.LockView, Character.LockViewFrame
StringCompareStyle
enum StringCompareStyle {
eCaseInsensitive = 0,
eCaseSensitive = 1
};Compatibility: supported by AGS 3.5.0 and higher.
Used by: Dictionary.Create, Set.Create, String.CompareTo, String.EndsWith, String.Replace, String.StartsWith
TransitionStyle
enum TransitionStyle {
eTransitionFade,
eTransitionInstant,
eTransitionDissolve,
eTransitionBoxout,
eTransitionCrossfade
};Used by: SetScreenTransition, SetNextScreenTransition
VideoPlayStyle
enum VideoPlayStyle {
eVideoPlayDefault = 0,
eVideoPlayStretchToScreen = 1,
eVideoPlayNoAudio = 10,
eVideoPlayAudioAndDontMuteGame = 20
};Compatibility: supported by AGS 3.6.3 and later versions.
Used by: PlayVideo
VideoSkipStyle
enum VideoSkipStyle {
eVideoSkipNotAllowed,
eVideoSkipEscKey,
eVideoSkipAnyKey,
eVideoSkipAnyKeyOrMouse
};Used by: PlayVideo
eVoiceMode
enum eVoiceMode {
eSpeechTextOnly,
eSpeechVoiceAndText,
eSpeechVoiceOnly
};Used by: Speech.VoiceMode
WalkWhere
enum WalkWhere {
eAnywhere,
eWalkableAreas
};Used by: Character.Move, Character.Walk, Object.Move