Talk:Function and property list/Archive

From Adventure Game Studio | Wiki
Jump to navigation Jump to search

Here's the php code I used to generate this list:

<?php
  $arr = array(
    "Character functions and properties" => array(
      "Character.ActiveInventory",
      "Character.AddInventory",
      "Character.AddWaypoint",
      "Character.Animate",
      "Character.Animating",
      "Character.AnimationSpeed",
      "Character.Baseline",
      "Character.BlinkInterval",
      "Character.BlinkView",
      "Character.BlinkWhileThinking",
      "Character.BlockingHeight",
      "Character.BlockingWidth",
      "Character.ChangeRoom",
      "Character.ChangeView",
      "Character.Clickable",
      "Character.DiagonalLoops",
      "Character.FaceCharacter",
      "Character.FaceLocation",
      "Character.FaceObject",
      "Character.FollowCharacter",
      "Character.Frame",
      "Character.GetAtScreenXY",
      "Character.GetProperty",
      "Character.GetTextProperty",
      "Character.ID",
      "Character.IdleView",
      "Character.IgnoreLighting",
      "Character.IgnoreWalkbehinds",
      "Character.InventoryQuantity",
      "Character.IsCollidingWithChar",
      "Character.IsCollidingWithObject",
      "Character.LockView",
      "Character.LockViewAligned",
      "Character.LockViewFrame",
      "Character.LockViewOffset",
      "Character.Loop",
      "Character.LoseInventory",
      "Character.ManualScaling",
      "Character.Moving",
      "Character.Name",
      "Character.NormalView",
      "Character.PlaceOnWalkableArea",
      "Character.PreviousRoom",
      "Character.RemoveTint",
      "Character.Room",
      "Character.RunInteraction",
      "Character.Say",
      "Character.SayAt",
      "Character.SayBackground",
      "Character.ScaleMoveSpeed",
      "Character.ScaleVolume",
      "Character.Scaling",
      "Character.SetAsPlayer",
      "Character.SetIdleView",
      "Character.SetWalkSpeed",
      "Character.Solid",
      "Character.Speaking",
      "Character.SpeechColor",
      "Character.SpeechView",
      "Character.StopMoving",
      "Character.Think",
      "Character.ThinkView",
      "Character.Tint",
      "Character.Transparency",
      "Character.TurnBeforeWalking",
      "Character.UnlockView",
      "Character.View",
      "Character.Walk",
      "Character.WalkSpeedX",
      "Character.WalkSpeedY",
      "Character.WalkStraight",
      "Character.x",
      "Character.y",
      "Character.z",
      "SetCharacterProperty"
      ),
    "DateTime functions and properties" => array(
      "DateTime.DayOfMonth",
      "DateTime.Hour",
      "DateTime.Minute",
      "DateTime.Month",
      "DateTime.Now",
      "DateTime.RawTime",
      "DateTime.Second",
      "DateTime.Year"
      ),
    "DynamicSprite functions and properties" => array(
      "DynamicSprite.ColorDepth",
      "DynamicSprite.CreateFromBackground",
      "DynamicSprite.CreateFromExistingSprite",
      "DynamicSprite.CreateFromFile",
      "DynamicSprite.CreateFromSaveGame",
      "DynamicSprite.CreateFromScreenShot",
      "DynamicSprite.Crop",
      "DynamicSprite.Delete",
      "DynamicSprite.Flip",
      "DynamicSprite.Graphic",
      "DynamicSprite.Height",
      "DynamicSprite.Resize",
      "DynamicSprite.Rotate",
      "DynamicSprite.SaveToFile",
      "DynamicSprite.Width"
      ),
    "File functions and properties" => array(
      "File.Close",
      "File.EOF",
      "File.Error",
      "File.Open",
      "File.ReadInt",
      "File.ReadRawChar",
      "File.ReadRawInt",
      "File.ReadRawLineBack",
      "File.ReadStringBack",
      "File.WriteInt",
      "File.WriteRawChar",
      "File.WriteRawLine",
      "File.WriteString"
      ),
    "Game / Global functions" => array(
      "AbortGame",
      "CallRoomScript",
      "ClaimEvent",
      "Debug",
      "DeleteSaveSlot",
      "DisableInterface",
      "EnableInterface",
      "EndCutscene",
      "Game.CharacterCount",
      "Game.FileName",
      "Game.GetFrameCountForLoop",
      "Game.GetLocationName",
      "Game.GetLoopCountForView",
      "Game.GetMODPattern",
      "Game.GetRunNextSettingForLoop",
      "Game.GetSaveSlotDescription",
      "Game.GetViewFrame",
      "Game.GlobalMessages",
      "Game.GlobalStrings",
      "Game.GUICount",
      "Game.InputBox",
      "Game.InventoryItemCount",
      "Game.Name",
      "Game.NormalFont",
      "Game.SpeechFont",
      "Game.SpriteHeight",
      "Game.SpriteWidth",
      "Game.TranslationFilename",
      "Game.ViewCount",
      "GetGameParameter",
      "GetGameOption",
      "GetGameSpeed",
      "GetGlobalInt",
      "GetGraphicalVariable",
      "GetLocationType",
      "GetTextHeight",
      "GetTextWidth",
      "GetTranslation",
      "GiveScore",
      "InventoryScreen",
      "IsGamePaused",
      "IsInterfaceEnabled",
      "IsInteractionAvailable",
      "IsKeyPressed",
      "IsTimerExpired",
      "IsTranslationAvailable",
      "MoveCharacterToHotspot",
      "MoveCharacterToObject",
      "PauseGame",
      "ProcessClick",
      "QuitGame",
      "Random",
      "RestartGame",
      "RestoreGameDialog",
      "RestoreGameSlot",
      "RunAGSGame",
      "SaveGameDialog",
      "SaveGameSlot",
      "SaveScreenShot",
      "SetAmbientTint",
      "SetGameOption",
      "SetGameSpeed",
      "SetGlobalInt",
      "SetGraphicalVariable",
      "SetMultitaskingMode",
      "SetRestartPoint",
      "SetTextWindowGUI",
      "SetTimer",
      "SkipUntilCharacterStops",
      "StartCutscene",
      "UpdateInventory",
      "UnPauseGame",
      "Wait",
      "WaitKey",
      "WaitMouseKey"
      ),
    "GUI functions and properties" => array(
      "GUI.BackgroundGraphic",
      "GUI.Centre",
      "GUI.Clickable",
      "GUI.ControlCount",
      "GUI.Controls",
      "GUI.GetAtScreenXY",
      "GUI.Height",
      "GUI.ID",
      "GUI.SetPosition",
      "GUI.SetSize",
      "GUI.Transparency",
      "GUI.Visible",
      "GUI.Width",
      "GUI.X",
      "GUI.Y",
      "GUI.ZOrder"
      ),
    "GUI control functions and properties" => array(
      "GUIControl.AsType",
      "GUIControl.AsButton",
      "GUIControl.AsInvWindow",
      "GUIControl.AsLabel",
      "GUIControl.AsListBox",
      "GUIControl.AsSlider",
      "GUIControl.AsTextBox",
      "GUIControl.BringToFront",
      "GUIControl.Clickable",
      "GUIControl.Enabled",
      "GUIControl.GetAtScreenXY",
      "GUIControl.Height",
      "GUIControl.ID",
      "GUIControl.OwningGUI",
      "GUIControl.SendToBack",
      "GUIControl.SetPosition",
      "GUIControl.SetSize",
      "GUIControl.Visible",
      "GUIControl.Width",
      "GUIControl.X",
      "GUIControl.Y"
      ),
    "GUI Button functions and properties" => array(
      "Button.Animate",
      "Button.BringToFront",
      "Button.Clickable",
      "Button.ClipImage",
      "Button.Enabled",
      "Button.Font",
      "Button.Graphic",
      "Button.Height",
      "Button.ID",
      "Button.MouseOverGraphic",
      "Button.NormalGraphic",
      "Button.OwningGUI",
      "Button.PushedGraphic",
      "Button.SendToBack",
      "Button.SetPosition",
      "Button.SetSize",
      "Button.Text",
      "Button.TextColor",
      "Button.Visible",
      "Button.Width",
      "Button.X",
      "Button.Y"
      ),
    "GUI InvWindow functions and properties" => array(
      "InvWindow.BringToFront",
      "InvWindow.CharacterToUse",
      "InvWindow.Clickable",
      "InvWindow.Enabled",
      "InvWindow.Height",
      "InvWindow.ID",
      "InvWindow.ItemAtIndex",
      "InvWindow.ItemCount",
      "InvWindow.ItemHeight",
      "InvWindow.ItemsPerRow",
      "InvWindow.ItemWidth",
      "InvWindow.OwningGUI",
      "InvWindow.RowCount",
      "InvWindow.ScrollDown",
      "InvWindow.ScrollUp",
      "InvWindow.SendToBack",
      "InvWindow.SetPosition",
      "InvWindow.SetSize",
      "InvWindow.TopItem",
      "InvWindow.Visible",
      "InvWindow.Width",
      "InvWindow.X",
      "InvWindow.Y"
      ),
    "GUI Label functions and properties" => array(
      "Label.BringToFront",
      "Label.Clickable",
      "Label.Enabled",
      "Label.Font",
      "Label.Height",
      "Label.ID",
      "Label.OwningGUI",
      "Label.SendToBack",
      "Label.SetPosition",
      "Label.SetSize",
      "Label.Text",
      "Label.TextColor",
      "Label.Visible",
      "Label.Width",
      "Label.X",
      "Label.Y"
      ),
    "GUI List Box functions and properties" => array(
      "ListBox.AddItem",
      "ListBox.BringToFront",
      "ListBox.Clear",
      "ListBox.Clickable",
      "ListBox.Enabled",
      "ListBox.FillDirList",
      "ListBox.FillSaveGameList",
      "ListBox.Font",
      "ListBox.GetItemAtLocation",
      "ListBox.Height",
      "ListBox.HideBorder",
      "ListBox.HideScrollArrows",
      "ListBox.ID",
      "ListBox.InsertItemAt",
      "ListBox.ItemCount",
      "ListBox.Items",
      "ListBox.OwningGUI",
      "ListBox.RemoveItem",
      "ListBox.RowCount",
      "ListBox.SaveGameSlots",
      "ListBox.ScrollDown",
      "ListBox.ScrollUp",
      "ListBox.SelectedIndex",
      "ListBox.SendToBack",
      "ListBox.SetPosition",
      "ListBox.SetSize",
      "ListBox.TopItem",
      "ListBox.Visible",
      "ListBox.Width",
      "ListBox.X",
      "ListBox.Y"
      ),
    "GUI Slider properties" => array(
      "Slider.BringToFront",
      "Slider.Clickable",
      "Slider.Enabled",
      "Slider.Height",
      "Slider.ID",
      "Slider.Max",
      "Slider.Min",
      "Slider.OwningGUI",
      "Slider.SendToBack",
      "Slider.SetPosition",
      "Slider.SetSize",
      "Slider.Value",
      "Slider.Visible",
      "Slider.Width",
      "Slider.X",
      "Slider.Y"
      ),
    "GUI Text Box functions and properties" => array(
      "TextBox.BringToFront",
      "TextBox.Clickable",
      "TextBox.Enabled",
      "TextBox.Font",
      "TextBox.Height",
      "TextBox.ID",
      "TextBox.OwningGUI",
      "TextBox.SendToBack",
      "TextBox.SetPosition",
      "TextBox.SetSize",
      "TextBox.Text",
      "TextBox.Visible",
      "TextBox.Width",
      "TextBox.X",
      "TextBox.Y"
      ),
    "Hotspot functions and properties" => array(
      "Hotspot.GetAtScreenXY",
      "Hotspot.GetProperty",
      "Hotspot.GetTextProperty",
      "Hotspot.RunInteraction",
      "Hotspot.Enabled",
      "Hotspot.ID",
      "Hotspot.Name",
      "Hotspot.WalkToX",
      "Hotspot.WalkToY"
      ),
    "Inventory item functions and properties" => array(
      "InventoryItem.GetAtScreenXY",
      "InventoryItem.GetProperty",
      "InventoryItem.GetTextProperty",
      "InventoryItem.Graphic",
      "InventoryItem.ID",
      "InventoryItem.IsInteractionAvailable",
      "InventoryItem.Name",
      "InventoryItem.RunInteraction"
      ),
    "Maths functions and properties" => array(
      "FloatToInt",
      "IntToFloat",
      "Maths.ArcCos",
      "Maths.ArcSin",
      "Maths.ArcTan",
      "Maths.ArcTan2",
      "Maths.Cos",
      "Maths.DegreesToRadians",
      "Maths.Pi",
      "Maths.RadiansToDegrees",
      "Maths.RaiseToPower",
      "Maths.Sin",
      "Maths.Sqrt",
      "Maths.Tan"
      ),
    "Mouse functions and properties" => array(
      "Mouse.ChangeModeGraphic",
      "Mouse.ChangeModeHotspot",
      "Mouse.ChangeModeView",
      "Mouse.DisableMode",
      "Mouse.EnableMode",
      "Mouse.GetModeGraphic",
      "Mouse.IsButtonDown",
      "Mouse.Mode",
      "Mouse.SaveCursorUntilItLeaves",
      "Mouse.SelectNextMode",
      "Mouse.SetBounds",
      "Mouse.SetPosition",
      "Mouse.Update",
      "Mouse.UseDefaultGraphic",
      "Mouse.UseModeGraphic",
      "Mouse.Visible"
      ),
    "Multimedia functions" => array(
      "CDAudio",
      "Game.GetMODPattern",
      "Game.SetSaveGameDirectory",
      "Game.StopSound",
      "GetCurrentMusic",
      "GetMIDIPosition",
      "GetMP3PosMillis",
      "IsChannelPlaying",
      "IsMusicPlaying",
      "IsMusicVoxAvailable",
      "IsSoundPlaying",
      "IsSpeechVoxAvailable",
      "PlayAmbientSound",
      "PlayFlic",
      "PlayMP3File",
      "PlayMusic",
      "PlayMusicQueued",
      "PlaySilentMIDI",
      "PlaySound",
      "PlaySoundEx",
      "PlayVideo",
      "SeekMIDIPosition",
      "SeekMODPattern",
      "SeekMP3PosMillis",
      "SetChannelVolume",
      "SetDigitalMasterVolume",
      "SetMusicMasterVolume",
      "SetMusicRepeat",
      "SetMusicVolume",
      "SetSoundVolume",
      "SetSpeechVolume",
      "SetVoiceMode",
      "StopAmbientSound",
      "StopChannel",
      "StopMusic"
      ),
    "Object functions and properties" => array(
      "Object.Animate",
      "Object.Animating",
      "Object.Baseline",
      "Object.BlockingHeight",
      "Object.BlockingWidth",
      "Object.Clickable",
      "Object.Frame",
      "Object.GetAtScreenXY",
      "Object.GetProperty",
      "Object.GetTextProperty",
      "Object.Graphic",
      "Object.ID",
      "Object.IgnoreScaling",
      "Object.IgnoreWalkbehinds",
      "Object.IsCollidingWithObject",
      "Object.Loop",
      "Object.MergeIntoBackground",
      "Object.Move",
      "Object.Moving",
      "Object.Name",
      "Object.RemoveTint",
      "Object.RunInteraction",
      "Object.SetPosition",
      "Object.SetView",
      "Object.Solid",
      "Object.StopAnimating",
      "Object.StopMoving",
      "Object.Tint",
      "Object.Transparency",
      "Object.View",
      "Object.Visible",
      "Object.X",
      "Object.Y"
      ),
    "Overlay functions and properties" => array(
      "Overlay.CreateGraphical",
      "Overlay.CreateTextual",
      "Overlay.Remove",
      "Overlay.SetText",
      "Overlay.Valid",
      "Overlay.X",
      "Overlay.Y"
      ),
    "Palette functions" => array(
      "CyclePalette",
      "SetPalRGB",
      "UpdatePalette"
      ),
    "Parser functions" => array(
      "Parser.ParseText",
      "Parser.Said",
      "Parser.SaidUnknownWord"
      ),
    "Region functions and properties" => array(
      "Region.Enabled",
      "Region.GetAtRoomXY",
      "Region.ID",
      "Region.LightLevel",
      "Region.RunInteraction",
      "Region.Tint",
      "Region.TintEnabled",
      "Region.TintBlue",
      "Region.TintGreen",
      "Region.TintRed",
      "Region.TintSaturation"
      ),
    "Room functions" => array(
      "AreThingsOverlapping",
      "DisableGroundLevelAreas",
      "EnableGroundLevelAreas",
      "GetBackgroundFrame",
      "GetPlayerCharacter",
      "GetRoomProperty",
      "GetScalingAt",
      "GetViewportX",
      "GetViewportY",
      "GetWalkableAreaAt",
      "HasPlayerBeenInRoom",
      "RawClearScreen",
      "RawDrawCircle",
      "RawDrawFrameTransparent",
      "RawDrawImage",
      "RawDrawImageResized",
      "RawDrawImageTransparent",
      "RawDrawLine",
      "RawDrawRectangle",
      "RawDrawTriangle",
      "RawPrint",
      "RawPrintMessageWrapped",
      "RawRestoreScreen",
      "RawSaveScreen",
      "RawSetColor",
      "RawSetColorRGB",
      "ReleaseViewport",
      "RemoveWalkableArea",
      "ResetRoom",
      "RestoreWalkableArea",
      "Room.BottomEdge",
      "Room.ColorDepth",
      "Room.GetTextProperty",
      "Room.Height",
      "Room.LeftEdge",
      "Room.Messages",
      "Room.MusicOnLoad",
      "Room.ObjectCount",
      "Room.RightEdge",
      "Room.TopEdge",
      "Room.Width",
      "SetAreaScaling",
      "SetBackgroundFrame",
      "SetViewport",
      "SetWalkBehindBase"
      ),
    "Screen functions" => array(
      "FadeIn",
      "FadeOut",
      "FlipScreen",
      "SetFadeColor",
      "SetNextScreenTransition",
      "SetScreenTransition",
      "ShakeScreen",
      "ShakeScreenBackground",
      "TintScreen"
      ),
    "String functions" => array(
      "String.Append",
      "String.AppendChar",
      "String.AsFloat",
      "String.AsInt",
      "String.Chars",
      "String.CompareTo", 
      "String.Contains",
      "String.Copy",
      "String.Format",
      "String.Length",
      "String.LowerCase",
      "String.ReplaceCharAt",
      "String.Substring",
      "String.Truncate",
      "String.UpperCase"
      ),
    "Text display / Speech functions" => array(
      "Dialog.GetOptionState",
      "Dialog.SetOptionState",
      "Dialog.Start",
      "Display",
      "DisplayAt",
      "DisplayAtY",
      "DisplayMessage",
      "DisplayMessageAtY",
      "DisplayTopBar",
      "SetSkipSpeech",
      "SetSpeechStyle",
      "StopDialog"
      ),
    "ViewFrame functions and properties" => array(
      "ViewFrame.Flipped",
      "ViewFrame.Frame",
      "ViewFrame.Graphic",
      "ViewFrame.Loop",
      "ViewFrame.Sound",
      "ViewFrame.Speed",
      "ViewFrame.View"
      ),
    "System functions and properties" => array(
      "System.ColorDepth",
      "System.Gamma",
      "System.OperatingSystem",
      "System.ScreenHeight",
      "System.ScreenWidth",
      "System.SupportsGammaControl",
      "System.Version",
      "System.ViewportHeight",
      "System.ViewportWidth",
      "System.VSync",
      "System.Windowed"
      )
    );

  function kcasesort(&$arr) { // case-insensitive version of ksort
    if (!is_array($arr)) return FALSE;
    $arr_keys = array();
    foreach ($arr as $key => $value) $arr_keys[] = strtolower($key) . $key; // doubles the key, the first copy being lowercase for sorting
    sort($arr_keys); // only works on the first half (lowercase) of the keys
    foreach ($arr_keys as $key => $value) $arr_keys[$key] = substr($arr_keys[$key], (strlen($arr_keys[$key]) / 2), strlen($arr_keys[$key])); // removes the duplicate
    $t_arr = array();
    foreach ($arr_keys as $key) $t_arr[$key] = $arr[$key];
    $arr = $t_arr;
    }

  $t_arr = array();
  foreach ($arr as $article => $entries) {
    foreach ($entries as $entry) {
      $t_arr["{$entry}"] = "{{link|" . $article . "|" . $entry . "}}";
      }
    }

  kcasesort($t_arr);

  foreach ($t_arr as $entry) echo "{$entry}<br /><br />";

?>

This code just makes it a bit simpler to add several new entries to the list at once. Just add a new key to the $arr array for the name of the page, and set its value to an array containing the functions and properties contained in that page. Monkey 05 06 05:54, 27 July 2007 (CEST)