Tile4

struct Tile4

32 bytes Tile, 4 bit depth.  8x8, 64 dots.  Each nibble represents the color in the palette of the dot.

Summary
Tile432 bytes Tile, 4 bit depth.
Variables
dataActual data of the tile.
Functions
getLowerNibble
getHigherNibble
getByID
getByXY
drawDraws the tile
draw_objDraws the sprite tile.
draw_obj_rotDraws the sprite (rotated) tile
Tile864 bytes Tile, 8 bit depth.
Variables
dataActual tile data.
Functions
drawDraws the tile.
draw_objDraws the sprite tile
draw_obj_rotDraws the sprite (rotated) tile

Variables

data

uint8_t data[32]

Actual data of the tile.

Functions

getLowerNibble

inline int getLowerNibble(int i)

Parameters

iByte id.

Returns

Lower nibble value.

getHigherNibble

inline int getHigherNibble(int i)

Parameters

iByte id.

Returns

Higher nibble value.

getByID

inline int getByID(int i)

Parameters

iDot id.

Returns

Dot value.

getByXY

inline int getByXY(int x,
int y)

Parameters

xDot x-coord.
yDot y-coord.

Returns

Dot value.

draw

inline void draw(Palettes *palette,
int palID,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer)

Draws the tile

Parameters

palettePram pointer.
palIDThe palette that has to be used.
fromXX-coord from which the drawing shall start.
toXX-coord in which the drawing shall end.
fromYY-coord from which the drawing shall start.
toYY-coord in which the drawing shall end.
flipXHorizontally flip the tile?
flipYVertically flip the tile?
outBufferOutput buffer.

draw_obj

inline void draw_obj(Palettes *palette,
int palID,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)

Draws the sprite tile.

Parameters

palettePram pointer.
palIDThe palette that has to be used.
fromXX-coord from which the drawing shall start.
toXX-coord in which the drawing shall end.
fromYY-coord from which the drawing shall start.
toYY-coord in which the drawing shall end.
flipXHorizontally flip the tile?
flipYVertically flip the tile?
outBufferOutput buffer.
outPriorityOutput priority buffer.
priorityValuePriority value to set in the buffer.

draw_obj_rot

inline void draw_obj_rot(Palettes *palette,
int palID,
int xOff,
int yOff,
int pa,
int pb,
int pc,
int pd,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)

Draws the sprite (rotated) tile

Parameters

palettePram pointer.
palIDThe palette that has to be used.
xOffX-coord of the tile.
yOffY-coord of the tile.
paTransform dx.
pbTransform dmx.
pcTransform dy.
pdTransform dmy.
outBufferOutput buffer.
outPriorityOutput priority buffer.
priorityValueOutput priority value.

Tile8

struct Tile8

64 bytes Tile, 8 bit depth.  8x8, 64 dots.  Each byte represents the color in the palette of the dot.

Summary
Variables
dataActual tile data.
Functions
drawDraws the tile.
draw_objDraws the sprite tile
draw_obj_rotDraws the sprite (rotated) tile

Variables

data

uint8_t data[64]

Actual tile data.

Functions

draw

inline void draw(Palettes *palette,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer)

Draws the tile.

Parameters

palettePram pointer.
fromXX-coord from which the drawing shall start.
toXX-coord in which the drawing shall end.
fromYY-coord from which the drawing shall start.
toYY-coord in which the drawing shall end.
flipXHorizontally flip the tile?
flipYVertically flip the tile?
outBufferOutput buffer.

draw_obj

inline void draw_obj(Palettes *palette,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)

Draws the sprite tile

Parameters

palettePram pointer.
fromXX-coord from which the drawing shall start.
toXX-coord in which the drawing shall end.
fromYY-coord from which the drawing shall start.
toYY-coord in which the drawing shall end.
flipXHorizontally flip the tile?
flipYVertically flip the tile?
outBufferOutput buffer.
outPriorityOutput priority buffer.
priorityValueOutput priority Value.

draw_obj_rot

inline void draw_obj_rot(Palettes *palette,
int xOff,
int yOff,
int pa,
int pb,
int pc,
int pd,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)

Draws the sprite (rotated) tile

Parameters

palettePram pointer.
xOffX-coord of the tile.
yOffY-coord of the tile.
paTransform dx.
pbTransform dmx.
pcTransform dy.
pdTransform dmy.
outBufferOutput buffer.
outPriorityOutput priority buffer.
priorityValueOutput priority value.
struct Tile4
32 bytes Tile, 4 bit depth.
uint8_t data[32]
Actual data of the tile.
inline int getLowerNibble(int i)
inline int getHigherNibble(int i)
inline int getByID(int i)
inline int getByXY(int x,
int y)
inline void draw(Palettes *palette,
int palID,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer)
Draws the tile
inline void draw_obj(Palettes *palette,
int palID,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)
Draws the sprite tile.
inline void draw_obj_rot(Palettes *palette,
int palID,
int xOff,
int yOff,
int pa,
int pb,
int pc,
int pd,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)
Draws the sprite (rotated) tile
struct Tile8
64 bytes Tile, 8 bit depth.
uint8_t data[64]
Actual tile data.
inline void draw(Palettes *palette,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer)
Draws the tile.
inline void draw_obj(Palettes *palette,
int fromX,
int toX,
int fromY,
int toY,
bool flipX,
bool flipY,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)
Draws the sprite tile
inline void draw_obj_rot(Palettes *palette,
int xOff,
int yOff,
int pa,
int pb,
int pc,
int pd,
uint16_t *outBuffer,
uint8_t *outPriority,
int priorityValue)
Draws the sprite (rotated) tile
Close