Go to the source code of this file.
Functions | |
| statement | START () |
| Signifies the start of a code block. | |
| statement | END () |
| Signifies the end of a code block. | |
| statement | VAR () |
| Defines and instantiates a variable, a typed variable or an array. | |
| statement | TYPE () |
| Defines a user defined type/structure. | |
| statement | PRINT (expression) |
| Prints an expression. Places the cursor on the nextline. | |
| statement | WRITE (expression) |
| Prints an expression (string,number or variable). Cursor stays on the line. | |
| statement | DELAY (expression) |
| Waits until a specified amount of time has elapsed. | |
| statement | INPUT (expression) |
| Reads a value typed from the keyboard until enter is pressed. | |
| statement | WHILE (condition)< statement(s)> |
| Specifies that a loop block will continue as long as the condition evaluates as TRUE. The loop block can be a single statement or a block of statements contained between the START and END statements. | |
| statement | IF (condition)< statement(s)> THEN ELSE< statement(s)> |
| A way to control the flow of the program. If the condition evaluates as TRUE,the code block immediately following the THEN statement gets executed. Otherwise, the code block following the ELSE statement gets executed. | |
| statement | FOR (VAR counterVariable=startValue TO endValue STEP increment)< statement(s)> |
| Initializes variable to startValue and increments it by adding the increment value every loop. The code block following the construct will continue to be performed until variable is equal to endValue. | |
| statement | REPEAT (startValue TO endValue STEP increment)< statement(s)> |
| Initializes an internal variable to startValue and increments it by adding the increment value every loop. The code block following the construct will continue to be performed until variable is equal to endValue. Unlike FOR, this construct does not need a counter variable. | |
| statement | FUNCTION (< parameterList...>) statement(s) |
| Defines a procedure that can or cannot return a value. Defines a block of code that gets executed everytime the function is called. Functions can be called as a statement(procedure/sub) or as part of an expression. | |
| statement | RETURN (expression) |
| Used to return a value from a function. RETURN should always be the last statement in a function. Functions can be called as a statement(procedure/sub) or as part of an expression. | |
| statement | BREAK () |
| A control flow statement used to exit a statement block. Statement blocks are 2 or more statements inside a conditional IF-ELSE, WHILE, FOR and REPEAT. | |
| statement | SCREEN (< width, height, vsynch >) |
| Initializes and shows our graphics screen. If width and height is not present as an argument, screensize defaults to 640x480. | |
| statement | SCREENFLIP (< fps >) |
| Displays the contents of the backbuffer. Our screen is doublebuffered, and flip shows the hidden backbuffer where we draw our graphics entities. | |
| statement | CLS (< red, green, blue, alpha >) |
| Clears the contents of the backbuffer. An empty parenthesis tells CLS to clear the screen to black. | |
| statement | DRAWLINE (x1, y1, x2, y2,< red, green, blue, alpha >)< |
| Draws either a line of a box. Boxes can be either be empty or filled. | |
| statement statement | DRAWELLIPSE (x, y, radius1, radius2, angleBias,< red, green, blue, alpha >)<+> |
| Draws an ellipse. Can be empty or filled. | |
| statement | DRAWSTRING (x, y,< red, green, blue, alpha >, text) |
| Draws a string of characters. | |
| statement | SETCOLOR (red, green, blue, alpha) |
| Sets the current default drawing color. Successive draw commands would use the last color set by setcolor unless they are overriden in the parameters of the primitive or image. | |
| statement | SETBLENDMODE (mode) |
| Sets the current blending mode. Successive draw commands would use the last blendmode set by setBlendmode. | |
| statement | DRAWFANCYLINE (x1, y1, x2, y2, thickness, type,< red, green, blue, alpha >) |
| Draws a textured line. Boxes can be either be empty or filled. | |
| statement | LOADIMAGE (path, array, index) |
| Loads a power of 2 image to a hardware accelerated surface then puts a reference an array for easy fetching later. LOADIMAGE only accepts images with a power of two size. ie. 2x8, 16x16, 256x1024.. | |
| statement | DRAWIMAGE (x, y,< red, green, blue, alpha >) |
| Draws an image on the backbuffer screen. | |
| statement | DRAWTRANSFORMEDIMAGE (x, y, angle, scaleX, scaleY,< red, green, blue, alpha >) |
| Draws a transformed image on the backbuffer screen "Transformed" means that we can apply rotation and scaling to the image. | |
| statement | DRAWSCROLLEDIMAGE (x, y, scaleX, scaleY, u, v,< red, green, blue, alpha >) |
| Draws a scrolled image on the backbuffer screen "Scrolled" means that we can scroll the U/V textures pf the image when drawn. | |
| statement | GETSUBIMAGE (x1, y1, x2, y2, imageIndex) |
| Gets a copy of a portion of an image then stores the indx in imageArray[arrayIndex] Very usefull for spritesheets and imageatlases. | |
| statement | SOUNDINIT () |
| Initializes our sound engine. | |
| statement | SOUNDLOAD (stringID, isLooping) |
| Loads the sound sample pointed to by the path. | |
| statement | SOUNDPLAY (stringID) |
| Plays the sound sample pointed to by the string ID. | |
| statement | SOUNDPAUSE (stringID) |
| Pauses the sound sample pointed to by the string ID. | |
| statement | SOUNDSTOP (stringID) |
| Stops the sound sample pointed to by the string ID. | |
| statement | SWAP (a, b) |
| Swaps the values held by the two arguments You can even use SWAP to exchange different types of variables. | |
| statement | FREE (variablenamee) |
| Frees the memory used by a variable, array or type. | |
| statement | EXIT (expression) |
| Closes and destroys the graphics screen, and ends the program. Be sure to call this at the end of your code when you have opened a graphics screen as it does some cleaning up. | |
| function | KEYDOWN (expression) |
| function | TIMER () |
| function | FORMAT (string, expression) |
| function | SUBSTRING (string, begin<, end >) |
| function | SPLIT (string, regex) |
| function | VALASCII (string, index) |
| function | VAL (string) |
| function | ISDIGIT (string) |
| function | ISLETTER (string) |
| function | STRINGLENGTH (string) |
| function | LOWERCASE (string) |
| function | UPPERCASE (string) |
| function | SIZEOF (array<, dimension >) |
| function | CONTAINSKEY (string, associativearray) |
| function | MOUSEX () |
| function | MOUSEY () |
| function | MOUSEBUTTONDOWN (buttonID) |
| function | WINDOWCLOSED () |
| function | SIN (expression) |
| function | COS (expression) |
| function | TAN (expression) |
| function | ASIN (expression) |
| function | ACOS (expression) |
| function | ATAN (expression) |
| function | ATAN2 (y, x) |
| function | CEIL (expression) |
| function | FLOOR (expression) |
| function | ROUND (expression) |
| function | EXP (expression) |
| function | LOG (expression) |
| function | RANDOM (expression) |
| function | ABS (expression) |
| function | SQRT (expression) |
| function | INT (expression) |
| function | BOXINTERSECTS (ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) |
| function | CIRCLEINTERSECTS (ax, ay, aradius, bx, by, bradius) |
Variables | |
| statement | flipMode |
| statement | array [index] |
| statement | imageArray |
| statement | arrayIndex |
| function ABS | ( | expression | ) |
the absolute value of a number.
| expression | The argument to pass to the function. |
| function ACOS | ( | expression | ) |
the trigonometric arcosine of the argument.
| expression | The argument to pass to the function in radians(not degrees). |
| function ASIN | ( | expression | ) |
the trigonometric arcsine of the argument.
| expression | The argument to pass to the function in radians(not degrees). |
| function ATAN | ( | expression | ) |
the trigonometric arctangent of the argument.
| expression | The argument to pass to the function in radians(not degrees). |
| function ATAN2 | ( | y | , |
| x | |||
| ) |
the trigonometric arctangent of a ratio.
| y | The y/rise component to pass to the function in radians(not degrees). |
| x | The x/run component to pass to the function in radians(not degrees). |
| function BOXINTERSECTS | ( | ax1 | , |
| ay1 | , | ||
| ax2 | , | ||
| ay2 | , | ||
| bx1 | , | ||
| by1 | , | ||
| bx2 | , | ||
| by2 | |||
| ) |
1 if the two boxes intersect, returns 0 otherwise.
| ax1,ay1,ax2,ay2 | The coordinates defining the first box. |
| bx1,by1,bx2,by2 | The coordinates defining the second box. |
| function CEIL | ( | expression | ) |
the trigonometric sine of the argument.
| expression | The argument to pass to the function in radians(not degrees). |
| function CIRCLEINTERSECTS | ( | ax | , |
| ay | , | ||
| aradius | , | ||
| bx | , | ||
| by | , | ||
| bradius | |||
| ) |
1 if the two circles intersect, returns 0 otherwise.
| ax,ay | The coordinates of the center of the first circle. |
| aradius | The radius of the first circle. |
| bx,by | The coordinates of the center of the second circle. |
| bradius | The radius of the second circle. |
| statement CLS | ( | < red, green, blue, alpha > | ) |
Clears the contents of the backbuffer. An empty parenthesis tells CLS to clear the screen to black.
| red | Red component of the color. |
| green | Green component of the color. |
| blue | Blue component of the color. |
| alpha | Alpha transparency component of the color. |
| function CONTAINSKEY | ( | string | , |
| associativearray | |||
| ) |
1 if a key is contained in an associative array ans 0 if not.
| string | The key to check. |
| associativearray | The name of the associative array variable. |
| function COS | ( | expression | ) |
the trigonometric cosine of the argument.
| expression | The argument to pass to the function in radians(not degrees). |
| statement DELAY | ( | expression | ) |
Waits until a specified amount of time has elapsed.
| expression | Number of milliseconds to wait . |
| statement statement DRAWELLIPSE | ( | x | , |
| y | , | ||
| radius1 | , | ||
| radius2 | , | ||
| angleBias | , | ||
| < red, green, blue, alpha > | |||
| ) |
Draws an ellipse. Can be empty or filled.
| x,y | Center coordinate of the ellipse. |
| radius1 | Horizontal radius of the ellipse. |
| radius2 | Vertical radius of the ellipse. |
| angleBias | angle of rotation in degrees of the ellipse. |
| red | Red component of the color. |
| green | Green component of the color. |
| blue | Blue component of the color. |
| alpha | Alpha transparency component of the color. |
| + | The '+' signifies that we fill the ellipse. |
| statement DRAWFANCYLINE | ( | x1 | , |
| y1 | , | ||
| x2 | , | ||
| y2 | , | ||
| thickness | , | ||
| type | , | ||
| < red, green, blue, alpha > | |||
| ) |
Draws a textured line. Boxes can be either be empty or filled.
| x1-y1 | Top-left coordinate of the line. |
| x2-y2 | Bottom-right coordinate of the line. |
| thickness | Thickness of the line. |
| type | The texture type to use while drawing the line. |
| red | Red component of the color. |
| green | Green component of the color. |
| blue | Blue component of the color. |
| alpha | Alpha transparency component of the color. |
| statement DRAWIMAGE | ( | x | , |
| y | , | ||
| < red, green, blue, alpha > | |||
| ) |
Draws an image on the backbuffer screen.
| x,y | Coordinate to start drawing the string. |
| red | Red component of the color(0 to 1). |
| green | Green component of the color(0 to 1). |
| blue | Blue component of the color(0 to 1). |
| alpha | Alpha transparency component of the color(0 to 1). |
| flipmode | an integer value that signifies how we flip the image(0 to 3). |
| array[index] | The array[index] that references the image. |
| statement DRAWLINE | ( | x1 | , |
| y1 | , | ||
| x2 | , | ||
| y2 | , | ||
| < red, green, blue, alpha > | |||
| ) |
Draws either a line of a box. Boxes can be either be empty or filled.
| x1-y1 | Top-left coordinate of the line. |
| x2-y2 | Bottom-right coordinate of the line. |
| red | Red component of the color. |
| green | Green component of the color. |
| blue | Blue component of the color. |
| alpha | Alpha transparency component of the color. |
| + | The first '+' signifies that we draw a box. |
| + | The second '+' signifies that we fill the box. |
| statement DRAWSCROLLEDIMAGE | ( | x | , |
| y | , | ||
| scaleX | , | ||
| scaleY | , | ||
| u | , | ||
| v | , | ||
| < red, green, blue, alpha > | |||
| ) |
Draws a scrolled image on the backbuffer screen "Scrolled" means that we can scroll the U/V textures pf the image when drawn.
| x,y | coordinate of the image. |
| scaleX | Horizontal scaling factor(1 is normal scale). |
| scaleY | Vertical scaling factor(1 is normal scale). |
| u | Horizontal scroll offset. |
| v | Vertical scroll offset. |
| red | Red component of the color(0 to 1). |
| green | Green component of the color(0 to 1). |
| blue | Blue component of the color(0 to 1). |
| alpha | Alpha transparency component of the color(0 to 1). |
| flipmode | an integer value that signifies how we flip the image(0 to 3). |
| array[index] | The array[index] that references the image. |
| statement DRAWSTRING | ( | x | , |
| y | , | ||
| < red, green, blue, alpha > | , | ||
| text | |||
| ) |
Draws a string of characters.
| x,y | Coordinate to start drawing the string. |
| red | Red component of the color. |
| green | Green component of the color. |
| blue | Blue component of the color. |
| alpha | Alpha transparency component of the color. |
| text | The string to print. |
| statement DRAWTRANSFORMEDIMAGE | ( | x | , |
| y | , | ||
| angle | , | ||
| scaleX | , | ||
| scaleY | , | ||
| < red, green, blue, alpha > | |||
| ) |
Draws a transformed image on the backbuffer screen "Transformed" means that we can apply rotation and scaling to the image.
| x,y | Center coordinate of the image. |
| angle | angle(in degrees) to rotate the image. |
| scaleX | Horizontal scaling factor(1 is normal scale). |
| scaleY | Vertical scaling factor(1 is normal scale). |
| red | Red component of the color(0 to 1). |
| green | Green component of the color(0 to 1). |
| blue | Blue component of the color(0 to 1). |
| alpha | Alpha transparency component of the color(0 to 1). |
| flipmode | an integer value that signifies how we flip the image(0 to 3). |
| array[index] | The array[index] that references the image. |
| statement EXIT | ( | expression | ) |
Closes and destroys the graphics screen, and ends the program. Be sure to call this at the end of your code when you have opened a graphics screen as it does some cleaning up.
| expression | Value you want System.exit() to return. |
| function EXP | ( | expression | ) |
e raised to the power of a number.
| expression | The argument to pass to the function in radians(not degrees). |
| function FLOOR | ( | expression | ) |
the integer part of a number equal to or greater than the argument.
| expression | The argument to pass to the function. |
| statement FOR | ( | VAR | counterVariable = startValue TO endValue STEP increment ) |
Initializes variable to startValue and increments it by adding the increment value every loop. The code block following the construct will continue to be performed until variable is equal to endValue.
| counterVariable | A number variable that acts as a loop counter. |
| startValue | An expression to initialize the counterVariable. |
| endValue | An expression to check to finish the loop. |
| increment | An expression to add to the counter everytime the loop gets executed. |
| function FORMAT | ( | string | , |
| expression | |||
| ) |
a formatted string of a nummber.
Format strings are the same as C and Java.
| String | The format string. |
| expression | The argument to pass to the function. |
| statement FREE | ( | variablenamee | ) |
Frees the memory used by a variable, array or type.
| variablename | Name of the variable to free. |
| statement FUNCTION | ( | < parameterList...> | ) |
Defines a procedure that can or cannot return a value. Defines a block of code that gets executed everytime the function is called. Functions can be called as a statement(procedure/sub) or as part of an expression.
| parameterList | Any number of expressions separated by commas. A function can also have no parameters. |
| statement GETSUBIMAGE | ( | x1 | , |
| y1 | , | ||
| x2 | , | ||
| y2 | , | ||
| imageIndex | |||
| ) |
Gets a copy of a portion of an image then stores the indx in imageArray[arrayIndex] Very usefull for spritesheets and imageatlases.
| ax1,ay1,ax2,ay2 | The coordinates defining the first box. |
| imageIndex | The index reference of the original image. |
| imageArray | The array to hold the index reference of the image portion. |
| arrayIndex | The index in the array to hold the reference to the image portion. |
| statement IF | ( | condition | ) |
A way to control the flow of the program. If the condition evaluates as TRUE,the code block immediately following the THEN statement gets executed. Otherwise, the code block following the ELSE statement gets executed.
| condition | A boolean expression to be evaluated. |
| statement INPUT | ( | expression | ) |
Reads a value typed from the keyboard until enter is pressed.
| expression | Number or String variable . |
| function INT | ( | expression | ) |
integer part of a number.
| expression | The argument to pass to the function. |
| function ISDIGIT | ( | string | ) |
1 if he string is a digit. Returns 0 otherwise
| String | The stringto parse values from. |
| function ISLETTER | ( | string | ) |
1 if he string is a letter. Returns 0 otherwise
| String | The stringto parse values from. |
| function KEYDOWN | ( | expression | ) |
the state(0 or 1) of a key being pressed.
| expression | The argument to pass to the function. |
| statement LOADIMAGE | ( | path | , |
| array | , | ||
| index | |||
| ) |
Loads a power of 2 image to a hardware accelerated surface then puts a reference an array for easy fetching later. LOADIMAGE only accepts images with a power of two size. ie. 2x8, 16x16, 256x1024..
| path | The relative or absolute path of the image to load. |
| array | The name of the array variable. |
| index | Index on the array where we store the reference to the image. |
| function LOG | ( | expression | ) |
the natural logarithm of a given number.
| expression | The argument to pass to the function. |
| function LOWERCASE | ( | string | ) |
the lowercase representation of the string.
| String | The original string. |
| function MOUSEBUTTONDOWN | ( | buttonID | ) |
whether a partcular mouse buttonis pressed.
| buttonID | The ID of the button to check if pressed. |
| function MOUSEX | ( | ) |
the absolute horizontal coordinate of the mouse.
| function MOUSEY | ( | ) |
the absolute vertical coordinate of the mouse.
| statement PRINT | ( | expression | ) |
Prints an expression. Places the cursor on the nextline.
| expression | A string, number, function, variable or a combination of them. |
| function RANDOM | ( | expression | ) |
a random number from 0 to expression(exclusive).
| expression | The argument to pass to the function. |
| statement REPEAT | ( | startValue TO endValue STEP | increment ) |
Initializes an internal variable to startValue and increments it by adding the increment value every loop. The code block following the construct will continue to be performed until variable is equal to endValue. Unlike FOR, this construct does not need a counter variable.
| startValue | An expression to initialize the counterVariable. |
| endValue | An expression to check to finish the loop. |
| increment | An expression to add to the counter everytime the loop gets executed. |
| statement RETURN | ( | expression | ) |
Used to return a value from a function. RETURN should always be the last statement in a function. Functions can be called as a statement(procedure/sub) or as part of an expression.
| expression | A value to return. |
| function ROUND | ( | expression | ) |
the rounded integer part of a number.
| expression | The argument to pass to the function. |
| statement SCREEN | ( | < width, height, vsynch > | ) |
Initializes and shows our graphics screen. If width and height is not present as an argument, screensize defaults to 640x480.
| width | Width of the screen. |
| height | Height of the screen. |
| vynch | 1 to synch the rendering to screen refresh, 0 otherwise. |
| statement SCREENFLIP | ( | < fps > | ) |
Displays the contents of the backbuffer. Our screen is doublebuffered, and flip shows the hidden backbuffer where we draw our graphics entities.
| fps | Frames per second to sync the drawing. Defaults to 60 if absent. |
| statement SETBLENDMODE | ( | mode | ) |
Sets the current blending mode. Successive draw commands would use the last blendmode set by setBlendmode.
| mode | 0 for normal blend, 1 for additive blend. |
| statement SETCOLOR | ( | red | , |
| green | , | ||
| blue | , | ||
| alpha | |||
| ) |
Sets the current default drawing color. Successive draw commands would use the last color set by setcolor unless they are overriden in the parameters of the primitive or image.
| red | Red component of the color. |
| green | Green component of the color. |
| blue | Blue component of the color. |
| alpha | Alpha transparency component of the color. |
| function SIN | ( | expression | ) |
the trigonometric sine of the argument.
| expression | The argument to pass to the function in radians(not degrees). |
| function SIZEOF | ( | array<, dimension > | ) |
an integer that corresponds to the size of an array/associative array.
| array | array/associative The name of the array variable. |
| dimension | The dimension to return(0 for row, 1 for column). Not used if it's an associative arrays. |
| statement SOUNDLOAD | ( | stringID | , |
| isLooping | |||
| ) |
Loads the sound sample pointed to by the path.
| stringID | The path of the sound sample to load. |
| isLooping | 1 for looping, 0 for play once. |
| statement SOUNDPAUSE | ( | stringID | ) |
Pauses the sound sample pointed to by the string ID.
| stringID | The ID of the sound sample to play. Should be the same stringID used by SoundLoad(). |
| statement SOUNDPLAY | ( | stringID | ) |
Plays the sound sample pointed to by the string ID.
| stringID | The ID of the sound sample to play. Should be the same stringID used by SoundLoad(). |
| statement SOUNDSTOP | ( | stringID | ) |
Stops the sound sample pointed to by the string ID.
| stringID | The ID of the sound sample to play. Should be the same stringID used by SoundLoad(). |
| function SPLIT | ( | string | , |
| regex | |||
| ) |
a string array composed of the splitted portions of the string.
| String | The original string. |
| Regex | The regular expression to use to split the string. |
| function SQRT | ( | expression | ) |
the squareroot of a number.
| expression | The argument to pass to the function. |
| function STRINGLENGTH | ( | string | ) |
an integer that corresponds to the length of the string.
| String | The original string. |
| function SUBSTRING | ( | string | , |
| begin<, end > | |||
| ) |
a portion of a string.
| String | The original string. |
| begin | The start index where the substring would start. |
| end | The end index where the substring would end. Substring would return from begin to length of string if end is absent. |
| statement SWAP | ( | a | , |
| b | |||
| ) |
Swaps the values held by the two arguments You can even use SWAP to exchange different types of variables.
| a,b | Variables whose values are to be swapped. |
| function TAN | ( | expression | ) |
the trigonometric tangent of the argument.
| expression | The argument to pass to the function in radians(not degrees). |
| function TIMER | ( | ) |
current value of the high resolution timer(in milliseconds).
| function UPPERCASE | ( | string | ) |
the uppercase representation of the string.
| String | The original string. |
| function VAL | ( | string | ) |
an integer that corresponds to the value of the string.
| String | The stringto parse values from. |
| function VALASCII | ( | string | , |
| index | |||
| ) |
an integer that corresponds to the ASCII value of the character at index.
| String | The original string. |
| index | The index of the character in the string to read. |
| statement WHILE | ( | condition | ) |
Specifies that a loop block will continue as long as the condition evaluates as TRUE. The loop block can be a single statement or a block of statements contained between the START and END statements.
| condition | A boolean expression to be evaluated. |
| function WINDOWCLOSED | ( | ) |
a value(0 or 1) of whether the current graphics window is closed.
| statement WRITE | ( | expression | ) |
Prints an expression (string,number or variable). Cursor stays on the line.
| expression | A string, number, function, variable or a combination of them. |
1.7.2