Layer

The basis of all layer classes, containing function pointers for rendering.

Members

Aliases

main4BitColorLookupFunction
alias main4BitColorLookupFunction = colorLookup4Bit!uint
Undocumented in source.
main8BitColorLookupFunction
alias main8BitColorLookupFunction = colorLookup!(ubyte, uint)
Undocumented in source.
mainColorLookupFunction
alias mainColorLookupFunction = colorLookup!(ushort, uint)
Undocumented in source.

Functions

flipHorizontal
void flipHorizontal(T[] target)

Standard algorithm for horizontal mirroring, used for tile mirroring

getSX
int getSX()

Getter for the X scroll position.

getSY
int getSY()

Getter for the Y scroll position.

relScroll
void relScroll(int x, int y)

Relative scrolling. Positive values scrolls the layer left and up, negative values scrolls the layer down and right.

scroll
void scroll(int x, int y)

Absolute scrolling.

setRasterizer
void setRasterizer(int rX, int rY)

Sets the main rasterizer

setRenderingMode
void setRenderingMode(RenderingMode mode)

Sets the rendering mode

updateRaster
void updateRaster(void* workpad, int pitch, Color* palette)

Override this to enable output to the raster

Variables

mainRenderingFunction
RenderFunc mainRenderingFunction;

Used to implement changeable renderers for each layers

rasterX
int rasterX;

Raster width (visible)

rasterY
int rasterY;

Haster height

renderMode
RenderingMode renderMode;
Undocumented in source.
sX
int sX;

Horizontal scroll position

sY
int sY;

Vertical scroll position

Meta