Graphics#

Contains functions related to drawing and visual effects.

Access with Graphics->.

Variables#

const int[]

IsBlankTile

const int

NumDraws

const int

MaxDraws

const bool[]

Is8BitTile

Functions#

void

Wavy(bool style_in)

void

Zap(bool style_in)

void

Tint(int red, int green, int blue)

void

MonochromeHue(int red, int green, int blue, bool distributed = true)

void

ClearTint()

int

NumDraws() deprecated

int

MaxDraws() deprecated

int

GetPixel(untyped b, int x, int y)

paldata

CreatePalData() deprecated

paldata

CreatePalData(rgb color) deprecated

rgb

MixColor(rgb start, rgb end, int percent, int color_space = 0)

rgb

CreateRGB(long hexcode)

rgb

CreateRGB(int r, int g, int b)

void

ConvertFromRGB(int arg1, rgb arg2, int arg3)

rgb

ConvertToRGB(int color_space, int[] arr)

int

GetTilePixel(int tile, int x, int y, int cset = 0)

void

SetTilePixel(int tile, int x, int y, int color)

Variable descriptions#

const int[] IsBlankTile πŸ”— Source

True if the given tile is entirely blank (all color 0).


const int NumDraws πŸ”— Source

Returns the number of script drawing commands that are currently waiting in the draw queue.


const int MaxDraws πŸ”— Source

Returns the limit of the drawing queue. If NumDraws returns the same as this, no further drawing commands will work until the queue has been cleared (i.e. the next frame)


const bool[] Is8BitTile πŸ”— Source

True if the given tile uses 8-bit color.


Function descriptions#

void Wavy(bool style_in) πŸ”— Source

Creates a β€˜wave’ effect, as a β€˜Wavy’ warp type uses.


void Zap(bool style_in) πŸ”— Source

Creates a β€˜zap’ effect, as a β€˜Zap’ warp type uses.


void Tint(int red, int green, int blue) πŸ”— Source

Tints the palette by adding red, green, and blue to the respective values of every palette swatch. Subsequent calls to these functions will SUM the tint with all previous tints.


void MonochromeHue(int red, int green, int blue, bool distributed = true) πŸ”— Source

Tints the palette by adding red, green, and blue to the respective values of every palette swatch. Subsequent calls to these functions will SUM the tint with all previous tints.


void ClearTint() πŸ”— Source

Clears all tint effects.


int NumDraws() πŸ”— Source

Returns the number of script drawing commands that are currently waiting in the draw queue.

Warning

Deprecated! Use NumDraws instead!


int MaxDraws() πŸ”— Source

Returns the limit of the drawing queue. If NumDraws returns the same as this, no further drawing commands will work until the queue has been cleared (i.e. the next frame)

Warning

Deprecated! Use MaxDraws instead!


int GetPixel(untyped b, int x, int y) πŸ”— Source

Same as bitmap::GetPixel()


paldata CreatePalData() πŸ”— Source

Warning

Deprecated! Use new paldata() instead!


paldata CreatePalData(rgb color) πŸ”— Source

Warning

Deprecated! Use new paldata(color) instead!


rgb MixColor(rgb start, rgb end, int percent, int color_space = 0) πŸ”— Source

Interpolates a color between start and end and then returns the resulting rgb.


rgb CreateRGB(long hexcode) πŸ”— Source

Takes a long hexcode (0xRRGGBBL), with each rgb section 0 <= n <= 255.


rgb CreateRGB(int r, int g, int b) πŸ”— Source

Takes an (r,g,b) ranging 0 <= n <= 255.

0 <= n <= 63 if compat QR β€œScripts use 6-bit color (0-63) instead of 8-bit (0-255)” is enabled.


void ConvertFromRGB(int arg1, rgb arg2, int arg3) πŸ”— Source


rgb ConvertToRGB(int color_space, int[] arr) πŸ”— Source


int GetTilePixel(int tile, int x, int y, int cset = 0) πŸ”— Source

Returns the color index at an x,y coordinate of a tile.


void SetTilePixel(int tile, int x, int y, int color) πŸ”— Source

Sets the color index an an x,y coordinate of a tile.