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 here
will 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
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
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
eFlipDirection
enum eFlipDirection {
eFlipLeftToRight,
eFlipUpsideDown,
eFlipBoth
};
Used by: DynamicSprite.Flip
FontType
enum FontType {
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.
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
};
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 here
will execute some code if type variable contains at least "eInputKeyboard".
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
};
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
RepeatStyle
enum RepeatStyle {
eOnce,
eRepeat
};
Used by: Button.Animate
, Character.Animate
, Object.Animate
RoundDirection
enum RoundDirection {
eRoundDown,
eRoundNearest,
eRoundUp
};
Used by: FloatToInt
SkipSpeechStyle
enum SkipSpeechStyle {
eSkipNone = -1,
eSkipKeyMouseTime = 0,
eSkipKeyTime = 1,
eSkipTime = 2,
eSkipKeyMouse = 3,
eSkipMouseTime = 4,
eSkipKey = 5,
eSkipMouse = 6
};
Used by: Speech.SkipStyle
SortStyle
enum SortStyle {
eNonSorted = 0,
eSorted = 1
};
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
};
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
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