Skip to content

Statements

CPU edited this page Jan 18, 2021 · 12 revisions

This page lists all the possible statements for the language.
The language is not case and space sensitive, so the statements Clr(0), CLR( 0 ), and clr (0) are all the same.

Assignment, composed assignments

If Else

While

For

Expression Operators

Conditional Operators

Clr

Clr clears the screen. The screen is not automatically cleaned each frame.
Clr(color) cleans the screen with the specified color, it does not affect sprites or tiles.

Write

Write is used to write some text on the screen.
Write(txt, x, y, color)
Writes the parameter txt on the screen at position (x, y) with the specified color. The background is unchanged and the size of the letters is 8x8 pixels.
Write(txt, x, y, color, backgroundColor)
Writes the parameter txt on the screen at position (x, y) with the specified color for the foreground and the background. The size of the letters is 8x8 pixels.
Write(txt, x, y, color, backgroundColor, size)
Writes the parameter txt on the screen at position (x, y) with the specified color for the foreground and the background.
mode specifies the size and the format of the letters:

  • 0 ⇒ 8x8 pixels (8 pixels font)
  • 1 ⇒ 6x8 pixels (6 pixels font)
  • 2 ⇒ 4x8 pixels by interpolating the 8x8 font
  • 3 ⇒ 3x8 pixels by interpolating the 6x8 font

Sprite

defines a sprite (see Sprite)

Spen

enable/disable sprites (see Sprite)

SPos

set sprite position (see Sprite)

SRot

set sprite rotation (see Sprite)

STint

Colorize the sprite (see Sprite)

SScale

Scale the sprite (see Sprite)

return

increment and decrement

wait

destroy (texture)

Screen

GetP

not really a statement but an expression that returns the color of the specified pixel

SetP

set the pixel with the specified color

Line

Box

Circle

Frame

DeltaTime (expression)

Len (expression)

PLen (expression)

Key, KeyX, KeyY (Input system)

Clone this wiki locally