SpriteObject

Implements a sprite object. Adds a sprite source identifier, X and Y coordinates, and two 1024 based scaling indicator.

Constructors

this
this(int pID, int gID, string name, int ssID, int x, int y, int scaleHoriz, int scaleVert, RenderingMode rendMode, ushort palSel, ubyte palShift, ubyte masterAlpha)

Creates a new instance from scratch.

this
this(Tag t, int gID)

Deserializes itself from a Tag.

Members

Functions

serialize
Tag serialize()

Serializes the object into an SDL tag

Variables

masterAlpha
ubyte masterAlpha;

The main alpha channel of the sprite.

palSel
ushort palSel;

Palette selector. Selects the given palette for the object.

palShift
ubyte palShift;

Palette shift value. Determines palette length (2^x).

rendMode
RenderingMode rendMode;

The rendering mode of the sprite

scaleHoriz
int scaleHoriz;

Horizontal scaling value

scaleVert
int scaleVert;

Vertical scaling value

ssID
int ssID;

Sprite source identifier

x
int x;

X position

y
int y;

Y position

Inherited Members

From MapObject

MapObjectType
enum MapObjectType

Enumerator used for differentiating between multiple kinds of objects. The value serialized as a string as the name of a tag.

MapObjectFlags
enum MapObjectFlags

Defines various flags for objects

pID
int pID;

priority identifier

gID
int gID;

group identifier (equals with layer number)

name
string name;

name of object

_type
MapObjectType _type;

type of the object

flags
BitFlags!MapObjectFlags flags;

Contains property flags

mainTag
Tag mainTag;

Tag that holds the data related to this mapobject + ancillary tags

type
MapObjectType type [@property getter]

Returns the type of this object

serialize
Tag serialize()

Serializes the object into an SDL tag

opEquals
bool opEquals(MapObject rhs)

Checks if two objects have the same identifier.

Meta