Commands: DATA - Starts a data section DEND - Ends a data section BITM [name],[size] - (used in a data section) Creates a bitmap with a name of [name] and a height and width of [size] ARRY [array name],[size] - Defines array [array name] with size of [size] SIZE [varname 1],[int name] - Stores size of array or string [varname1] to [int name] CLRS - Clears screen buffer TEXT [x],[y],[string],[color] - Draws [string] at [x],[y] in [color] LINE [x1],[y1],[x2],[y2],[color] - Draws line from [x1],[y1] to [x2],[y2] in [color] PIXL [x],[y],[color] - Sets pixel at [x],[y] to [color] PIXT [x],[y],[int name] - Stores color of pixel at [x],[y] to [int name] SPRT [sprite name],[bitmap name] - Creates a new sprite [sprite name], with the graphics data contained in [bitmap name] and a position of 0,0 DISP [sprite name] - Draws sprite [sprite name] (if sprite name is replaced with .0, all existing sprites are drawn) DBMP [bitmap name],[x],[y] - Draws bitmap [bitmap name] at [x],[y] CLSN [sprite name 1],[sprite name 2],[int name] - Detects if [sprite name 1] and [sprite name 2] are colliding, sets [int name] to 1 if so, otherwise sets [int name] to 0 CLSN [sprite name],0,[int name],[pointer name] - Detects if [sprite name] is touching any other existing sprites, if not sets [int name] to 0, otherwise sets [int name] to 1 and returns a pointer to the sprite that it's touching in [pointer name] RECT [x1],[y1],[x2],[y2],[color1],[color2] - Draws a box from [x1],[y1] to [x2,y2] with line color of [color1], fill color of [color2] DRAW - Draws contents of screen buffer to screen (all graphics operations draw to buffer) STOP - Stores the contents of the screen buffer RCLP - Recalls the saved screen buffer X SHFT [x],[y],[mode] - Shifts the screen buffer horizontally by [x] and vertically by [y], loops if [mode] is -1, otherwise fills the area with color specified by [mode] GKEY [keycode],[int name] - Sets [int name] to 1 if the key [keycode] is pressed, otherwise sets [int name] to 0 WKEY [int name] - Waits for a key to be pressed, then stores the keycode to [int name] PAUS - Waits until Enter is pressed FNCT [name] - Defines a function with a name of [name] FRUN [name] - Runs the function [name] FGOB - Jumps to the beginning of the current function FEND - Returns from the current function, continuing execution after the line where the function was called IIFF [conditional expression] - If [conditional expression] is true, executes the next line, otherwise skips it RNDM [lower limit],[upper limit],[int name] - Generates a random number between [lower limit] and [upper limit], inclusive, and stores it to [int name] HALT - Ends the program X WAIT [delay] - Waits for a time determined by [delay] before continuing WRTE [position],[varname] - Writes the contents of [varname] to position [position] in the program's data string READ [position],[varname] - Reads the data from position [position] in the program's data string and stores it in [varname] (must be the same type of var as the stored data!!!) POLR [length],[angle],[x int name],[y int name] - Converts the polar vector of [length], [angle] to a rectangular vector and stores the x portion in [x int name] and the y portion in [y int name] SUBS [string],[starting position],[ending position],[string name] - Stores the segment of [string] from [starting position] to [ending position] in [string name] RSET - Restarts the program (useful for returning to the title menu of a game, etc.) CINT [string],[int name] - Converts the string [string] to a number and stores it in [int name] (negative numbers allowed) ABSL [number],[int name] - Finds the absolute value of [number] and stores it in [int name] INPT [x],[y],[prompt],[color],[var] - Displays [prompt] in [color] at [x], [y], waits for a number or string (depends on the type of [var]), and stores it to [var] NMAP [width],[height],[map name] - Creates a tilemap with a name of [map name] and dimensions of [width] and [height] TILE [map name],[bitmap 1],[bitmap 2]... - Sets the specified bitmaps in [map name] to be "solid" CMAP [map name],[sprite name],[x array],[y array] - Finds where each corner of [sprite name] is touching [map name] and stores the positions of the map elements in [x array] and [y array] (the position of [map name] is determined from the position it was last drawn with DMAP) ~ TCHK [map name],[x array],[y array],[int name] - Checks each of the map elements specified by [x array], [y array] in [map name] - if any of them are "solid", [int name] is set to 1, otherwise [int name] is set to 0 DMAP [x],[y],[map name] - Draws [map name] with the top left corner at [x],[y] Arguments: [number]: Any numerical expression, can involve variables, numbers, sprite properties, the 4 basic operators, and the modulus operator ('|') [int name]: The name of an integer variable, preceded by a % (array elements are also allowed for most commands - for example, "#PIXT 0,5,@COLOR(%X)" [string name]: The name of a string variable, preceded by a '$' [array name]: The name of an array variable, preceded by a '@' [bitmap name]: The name of a bitmap defined in a data section, preceded with a '[' [sprite name]: The name of a sprite object, preceded with a '^' [pointer name]: The name of a pointer, preceded with a '*' [map name]: The name of a tilemap, preceded with a '{' [color]: The color for a graphics operation: 0 is white, 1 is light gray, 2 is dark gray, 3 is black, 4 is inverted, and 5 is transparent (only allowed in rectangles) [keycode]: A number representing a key: 10*row+col (on TI calcs, 4th row is skipped) [conditional expression]: For example: "%A+2<73" Separate expression segments can be separated with '&', and the expression will only be true if each segment is true - for example: "%A<%B&%B<%C&%C<%D" Valid expressions (examples): conditional numerical (valid conditional operators are <, >, =, !, and &) %POS+3=%X/8 @ARRAY(8)>2 %A=%B&%C=%D string (valid conditional operators are = and !) $STR="TI86" $STR1!$STR2 bitmap (valid conditional operators are = and !) ^SPR.BMP=[BMP1 ^SPR1.BMP!^SPR2.BMP numerical %A=%A+3-%B/7 %NUM=@ARY(%I+1)-2 %INT+ (increments %INT) %INT- (decrements %INT) %INT+=2 (same as %INT=%INT+2) %INT-=2 (same as %INT=%INT-2) %INT/=4 (same as %INT=%INT/4) %INT*=4 (same as %INT=%INT*4) array / tilemap full definition @ARRAY=3,2,0,89,%NUM,%NUM2+1 {MAP=[BMP1,[BMP2,[BMP3,[BMP4 single element @ARRAY(1)=7 {MAP(1,2)=^SPR.BMP string $STR="A test string" $STR=$STR+" "+$INP $STR=%INT+3 $STR="Score:"+%SCR sprite properties ^SPR1.X=2 ^SPR1.Y=^SPR2.X+%VX ^SPR.VX=3 ^SPR.VY=0-^SPR.VY ^SPR.DX=50 ^SPR.DY=^SPR3.X*10 assigning pointers *PTR:%INT *PTR:@ARRAY *PTR:$STR *PTR:^SPR *PTR:[BMP *PTR:{MAP