Skip to content

class Screen


methods


Screen.setMode


function Screen.setMode(
  mode: VideoMode,
  width: integer,
  height: integer,
  colormode: ColorMode,
  interlace: Interlace,
  field: Field,
  zbuffering: boolean,
  zbuf_colormode: ColorModeZbuffer
)

@param mode - video mode to be used, if not sure, chose PAL or NTSC depending on console region

@param width - width of the image buffer

@param height - height of the image buffer

Changes the Screen mode, the last two params are optional, dont use them unless interested in 3D

@see VideoMode ColorMode Interlace Field ColorModeZbuffer

Screen.getMode


function Screen.getMode() -> MODE table

returns a lua table containing the current video configuration

the table contains the following elements, all of them integer - mode - interlace - field - dithering - doubleBuffering - zBuffering - width - height - aspect - colorMode - zColorMode

Screen.clear


function Screen.clear(color: color)

@param color - [optional]: if no parameter is passed, black is assumed

Clears the screen

Screen.flip


function Screen.flip()

Flip Screen

Screen.getFreeVRAM


function Screen.getFreeVRAM() -> freeVRAM integer

returns the ammount of free ram in bytes

Screen.waitVblankStart


function Screen.waitVblankStart()

Screen.getFPS


function Screen.getFPS(c: integer)