ISpriteLayer

General SpriteLayer interface.

Members

Functions

addSprite
void addSprite(ABitmap s, int n, Coordinate c, ushort paletteSel, int scaleHoriz, int scaleVert)

Adds a sprite to the layer.

addSprite
void addSprite(ABitmap s, int n, int x, int y, ushort paletteSel, int scaleHoriz, int scaleVert)

Adds a sprite to the layer.

editSpriteAttribute
void editSpriteAttribute(int n, T value)

Edits a sprite attribute.

getPaletteID
ushort getPaletteID(int n)

Returns the selected paletteID of the sprite.

getSlice
Coordinate getSlice(int n)

Returns the displayed portion of the sprite.

getSpriteCoordinate
Coordinate getSpriteCoordinate(int n)

Gets the coordinate of the sprite.

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

Moves the sprite to the given location.

readSpriteAttribute
T readSpriteAttribute(int n)

Reads a sprite attribute

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, Coordinate c)

Replaces the sprite and moves to the given position.

replaceSpriteAttribute
void replaceSpriteAttribute(int n, BitmapAttrib attr)

Replaces a sprite attribute. DEPRECATED

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
Coordinate setSlice(int n, Coordinate slice)

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

Meta