libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
Functions - Display

Macros

#define RGB(r, g, b)
 Create an RGB color.
 

Functions

 __attribute__ ((no_assume_ds_data, no_assume_ss_data, save_all)) void ws_display_set_shade_lut(uint32_t lut)
 Configure the shade LUT.
 
static void ws_screen_put_tiles (void __wf_iram *dest, const void __far *src, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Place a map of tiles on the screen.
 
static void ws_screen_put_tiles_ex (void __wf_iram *dest, const void __far *src, uint16_t sx, uint16_t sy, uint16_t pitch, uint16_t dx, uint16_t dy, uint16_t width, uint16_t height)
 Place a map of tiles on the screen. This varianta llows specifying the source X position, Y position and width.
 
void ws_screen_get_tiles (void __far *dest, const void __wf_iram *src, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Copy a map of tiles from the screen.
 
void ws_screen_fill_tiles (void __wf_iram *dest, uint16_t src, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Fill an area on the screen with a given tile.
 
void ws_screen_modify_tiles (void __wf_iram *dest, uint16_t mask, uint16_t value, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Modify an area on the screen with given data.
 
static void ws_screen_put_tile (void __wf_iram *dest, uint16_t src, uint16_t x, uint16_t y)
 Put a tile on the screen.
 
static uint16_t ws_screen_get_tile (void __wf_iram *src, uint16_t x, uint16_t y)
 Get a tile on the screen.
 

Detailed Description

Macro Definition Documentation

◆ RGB

#define RGB ( r,
g,
b )
Value:
(((r) << 8) | ((g) << 4) | (b))

Create an RGB color.

Parameters
rThe red component (0-15).
gThe red component (0-15).
bThe red component (0-15).

Definition at line 209 of file display.h.

Function Documentation

◆ __attribute__()

__attribute__ ( (no_assume_ds_data, no_assume_ss_data, save_all) )

Configure the shade LUT.

To learn more about the shade LUT, see video_pipeline.

Parameters
lutThe shade LUT configuration. Usage of the #GRAY_LUT macro is recommended. A default configuration is provided via #GRAY_LUT_DEFAULT .

◆ ws_screen_fill_tiles()

void ws_screen_fill_tiles ( void __wf_iram * dest,
uint16_t src,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )

Fill an area on the screen with a given tile.

Parameters
destPointer to the destination screen.
srcThe tile to fill the area with.
xDestination X position, in tiles.
yDestination Y position, in tiles.
widthWidth, in tiles.
heightHeight, in tiles.

◆ ws_screen_get_tile()

static uint16_t ws_screen_get_tile ( void __wf_iram * src,
uint16_t x,
uint16_t y )
inlinestatic

Get a tile on the screen.

Parameters
srcPointer to the source screen.
xDestination X position, in tiles.
yDestination Y position, in tiles.

Definition at line 311 of file display.h.

◆ ws_screen_get_tiles()

void ws_screen_get_tiles ( void __far * dest,
const void __wf_iram * src,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )

Copy a map of tiles from the screen.

Parameters
destPointer to the destination area.
srcPointer to the source screen.
xSource X position, in tiles.
ySource Y position, in tiles.
widthWidth, in tiles.
heightHeight, in tiles.

◆ ws_screen_modify_tiles()

void ws_screen_modify_tiles ( void __wf_iram * dest,
uint16_t mask,
uint16_t value,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )

Modify an area on the screen with given data.

Parameters
destPointer to the destination screen.
maskThe mask to AND the area with.
valueThe value to OR the area with.
xDestination X position, in tiles.
yDestination Y position, in tiles.
widthWidth, in tiles.
heightHeight, in tiles.

◆ ws_screen_put_tile()

static void ws_screen_put_tile ( void __wf_iram * dest,
uint16_t src,
uint16_t x,
uint16_t y )
inlinestatic

Put a tile on the screen.

Parameters
destPointer to the destination screen.
srcThe tile to put.
xDestination X position, in tiles.
yDestination Y position, in tiles.

Definition at line 300 of file display.h.

◆ ws_screen_put_tiles()

static void ws_screen_put_tiles ( void __wf_iram * dest,
const void __far * src,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )
inlinestatic

Place a map of tiles on the screen.

Parameters
destPointer to the destination screen.
srcPointer to the source map.
xDestination X position, in tiles.
yDestination Y position, in tiles.
widthDestination width, in tiles (1-32).
heightDestination height, in tiles (1-32).

Definition at line 231 of file display.h.

◆ ws_screen_put_tiles_ex()

static void ws_screen_put_tiles_ex ( void __wf_iram * dest,
const void __far * src,
uint16_t sx,
uint16_t sy,
uint16_t pitch,
uint16_t dx,
uint16_t dy,
uint16_t width,
uint16_t height )
inlinestatic

Place a map of tiles on the screen. This varianta llows specifying the source X position, Y position and width.

Parameters
destPointer to the destination screen.
srcPointer to the source map.
sxSource X position, in tiles.
sySource Y position, in tiles.
pitchSource width, in tiles.
dxDestination X position, in tiles.
dyDestination Y position, in tiles.
widthDestination width, in tiles (1-32).
heightDestination height, in tiles (1-32).

Definition at line 250 of file display.h.