Layer

The basis of all layer classes, containing functions for rendering. TODO: Move rendering functions to an external library.

Members

Functions

flipHorizontal
void flipHorizontal(uint* src, int length)

Standard algorithm for horizontal 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(LayerRenderingMode mode)

Sets the rendering mode

updateRaster
void updateRaster(void* workpad, int pitch, Color* palette, int[] threads)

Override this to enable output to the raster

Variables

main4BitColorLookupFunction
void function(ubyte* src, uint* dest, uint* palette, size_t length, int offset) main4BitColorLookupFunction;
Undocumented in source.
main8BitColorLookupFunction
void function(ubyte* src, uint* dest, uint* palette, size_t length) main8BitColorLookupFunction;
Undocumented in source.
mainColorLookupFunction
void function(ushort* src, uint* dest, uint* palette, size_t length) mainColorLookupFunction;
Undocumented in source.
mainRenderingFunction
void function(uint* src, uint* dest, size_t length) mainRenderingFunction;

Used to get around some readability issues. (void* src, void* dest, int length)

rasterX
int rasterX;
rasterY
int rasterY;
Undocumented in source.
renderMode
LayerRenderingMode renderMode;
Undocumented in source.
sX
int sX;
sY
int sY;
Undocumented in source.

Meta