ISpriteLayer

General SpriteLayer interface.

Members

Functions

addSprite
Box addSprite(ABitmap sprt, int n, int x, int y, ushort paletteSel, ubyte paletteSh, ubyte alpha, int scaleHoriz, int scaleVert, RenderingMode renderMode)

Creates a sprite from a bitmap with the given data, then places it to the display list. (New architecture)

clear
void clear()

Clears all sprite from the layer.

getPaletteID
ushort getPaletteID(int n)

Returns the selected paletteID of the sprite.

getScaleSpriteHoriz
int getScaleSpriteHoriz(int n)

Gets the sprite's current horizontal scale value

getScaleSpriteVert
int getScaleSpriteVert(int n)

Gets the sprite's current vertical scale value

getSlice
Box getSlice(int n)

Returns the displayed portion of the sprite.

getSpriteCoordinate
Box getSpriteCoordinate(int n)

Gets the coordinate of the sprite.

moveSprite
void moveSprite(int n, int x, int y)

Moves the sprite to the exact location.

relMoveSprite
void relMoveSprite(int n, int x, int y)

Relatively moves the sprite by the given values.

removeSprite
void removeSprite(int n)

Removes the sprite with the given ID.

replaceSprite
void replaceSprite(ABitmap s, int n)

Replaces the sprite. If the new sprite has a different dimension, the old sprite's upper-left corner will be used.

replaceSprite
void replaceSprite(ABitmap s, int n, int x, int y)

Replaces the sprite and moves to the given position.

replaceSprite
void replaceSprite(ABitmap s, int n, Box c)

Replaces the sprite and moves to the given position.

scaleSpriteHoriz
int scaleSpriteHoriz(int n, int hScl)

Scales bitmap horizontally

scaleSpriteVert
int scaleSpriteVert(int n, int vScl)

Scales bitmap vertically

setPaletteID
ushort setPaletteID(int n, ushort paletteID)

Sets the paletteID of the sprite. Returns the new ID, which is truncated to the possible values with a simple binary and operation Palette must exist in the parent Raster, otherwise AccessError might happen

setSlice
Box setSlice(int n, Box slice)

Writes the displayed portion of the sprite. Returns the new slice, if invalid (greater than the bitmap, etc.) returns the old one.

setSpriteRenderingMode
void setSpriteRenderingMode(int n, RenderingMode mode)

Sets the rendering function for the sprite (defaults to the layer's rendering function)

Meta