screen

alias UxnPixel = u8

Used for the Screen/pixel port

alias UxnSprite = u8

Used for the Screen/sprite port

alias UxnAuto = u8

Used for the Screen/auto port

uxn_set_screen_vector

Parameters: addr vector

Sets the screen vector to the function vector

uxn_set_screen_size

Parameters: cell width, cell height

Sets the screen size to widthxheight

uxn_get_screen_size

Returns: cell width, cell height

Returns the size of the screen in pixels

uxn_get_pixel

Returns: UxnPixel res

Returns the value stored in the Screen/pixel port

uxn_set_pixel

Parameters: UxnPixel pixel

Writes the value to the Screen/pixel port

uxn_pixel_set_colour

Parameters: UxnPixel pixel, cell colour

Returns UxnPixel res

Sets the colour in pixel and returns the result. colour must be below 256

uxn_pixel_set_flip_x

Parameters: UxnPixel pixel, bool flip?

Returns: UxnPixel res

Sets the flip X value in pixel to flip?

uxn_pixel_set_flip_y

Parameters: UxnPixel pixel, bool flip?

Returns: UxnPixel res

Sets the flip Y value in pixel to flip?

uxn_pixel_set_layer

Parameters: UxnPixel pixel, cell layer

Returns: UxnPixel res

Sets the layer value in pixel to layer. layer must be 0 or 1.

uxn_pixel_set_fill

Parameters: UxnPixel pixel, bool fill?

Returns UxnPixel res

Sets the fill value in pixel to fill?

uxn_get_sprite

Returns: UxnSprite sprite

Returns the value in the Screen/sprite port

uxn_set_sprite

Parameters: UxnSprite sprite

Writes sprite to the Screen/sprite port

uxn_sprite_set_flip_x

Parameters: UxnSprite sprite, bool flip?

Returns: UxnSprite sprite

Sets the flip X value in sprite to flip?

uxn_sprite_set_flip_y

Parameters: UxnSprite sprite, bool flip?

Returns UxnSprite sprite

Sets the flip Y value in sprite to flip?

uxn_sprite_set_2bpp

Parameters: UxnSprite sprite, bool 2bpp?

Returns UxnSprite sprite

Sets the 2bpp value in sprite to 2bpp?

uxn_sprite_set_layer

Parameters: UxnSprite sprite, cell layer

Returns UxnSprite sprite

Sets the layer value in sprite to layer. layer must be 0 or 1.

uxn_sprite_set_colours

Parameters: UxnSprite sprite, cell colours

Returns UxnSprite sprite

Sets the sprite colour value in sprite to colours. colours must be under 16.

uxn_get_auto

Returns: UxnAuto auto

Reads the value stored in the Screen/auto port.

uxn_set_auto

Parameters: UxnAuto auto

Writes auto to the Screen/auto port.

uxn_auto_set_length

Parameters: UxnAuto auto, cell length

Returns: UxnAuto auto

Sets the length value in auto. length must be less than 16.

uxn_auto_set_x

Parameters: UxnAuto auto, bool x?

Returns: UxnAuto auto

Sets the X value in auto to x?.

uxn_auto_set_y

Parameters: UxnAuto auto, bool y?

Returns: UxnAuto auto

Sets the Y value in auto to y?

uxn_auto_set_addr

Parameters: UxnAuto auto, bool address?

Returns UxnAuto auto

Sets the address value in auto to address?

uxn_screen_set_x

Parameters: cell x

Writes x to the Screen/x port.

uxn_screen_set_y

Parameters: cell y

Writes y to the Screen/y port.

uxn_screen_get_x

Returns: cell x

Reads a value from the Screen/x port.

uxn_screen_get_y

Returns: cell y

Reads a value from the Screen/y port.

uxn_screen_get_addr

Parameters: addr address

Writes address to the Screen/addr port.

uxn_screen_get_addr

Returns: addr address

Reads the value from the Screen/addr port.