ScummVM API documentation
Xeen::SpriteResource Class Reference

Public Member Functions

 SpriteResource (const Common::String &filename)
 
 SpriteResource (const Common::String &filename, int ccMode)
 
 SpriteResource (const SpriteResource &src)
 
SpriteResourceoperator= (const SpriteResource &src)
 
void load (const Common::String &filename)
 
void load (const Common::String &filename, int ccMode)
 
void clear ()
 
void draw (XSurface &dest, int frame, const Common::Point &destPos, uint flags=0, int scale=0)
 
void draw (Window &dest, int frame, const Common::Point &destPos, uint flags=0, int scale=0)
 
void draw (int windowIndex, int frame, const Common::Point &destPos, uint flags=0, int scale=0)
 
void draw (XSurface &dest, int frame)
 
void draw (int windowIndex, int frame)
 
Common::Point getFrameSize (int frame) const
 
size_t size () const
 
bool empty () const
 

Static Public Member Functions

static void setClippedBottom (int y)
 

Member Function Documentation

◆ operator=()

SpriteResource& Xeen::SpriteResource::operator= ( const SpriteResource src)

Copy operator for duplicating a sprite resource

◆ load() [1/2]

void Xeen::SpriteResource::load ( const Common::String filename)

Load a sprite resource from a given file

◆ load() [2/2]

void Xeen::SpriteResource::load ( const Common::String filename,
int  ccMode 
)

Load a sprite resource from a given file and archive

◆ clear()

void Xeen::SpriteResource::clear ( )

Clears the sprite resource

◆ draw() [1/5]

void Xeen::SpriteResource::draw ( XSurface dest,
int  frame,
const Common::Point destPos,
uint  flags = 0,
int  scale = 0 
)

Draw a sprite onto a surface

Parameters
destDestination surface
frameFrame number
destPosDestination position
flagsFlags
scaleScale: 0=No scale, SCALE_ENLARGE=Enlarge it 1..15 -> reduces the sprite: the higher, the smaller it'll be

◆ draw() [2/5]

void Xeen::SpriteResource::draw ( Window dest,
int  frame,
const Common::Point destPos,
uint  flags = 0,
int  scale = 0 
)

Draw a sprite onto a specific window

Parameters
destDestination window
frameFrame number
destPosDestination position
flagsFlags
scaleScale: 0=No scale, SCALE_ENLARGE=Enlarge it 1..15 -> reduces the sprite: the higher, the smaller it'll be

◆ draw() [3/5]

void Xeen::SpriteResource::draw ( int  windowIndex,
int  frame,
const Common::Point destPos,
uint  flags = 0,
int  scale = 0 
)

Draw a sprite onto a given window

Parameters
windowIndexDestination window number
frameFrame number
destPosDestination position
flagsFlags
scaleScale: 0=No scale, SCALE_ENLARGE=Enlarge it 1..15 -> reduces the sprite: the higher, the smaller it'll be

◆ draw() [4/5]

void Xeen::SpriteResource::draw ( XSurface dest,
int  frame 
)

Draw the sprite onto the given surface

Parameters
destDestination surface
frameFrame number

◆ draw() [5/5]

void Xeen::SpriteResource::draw ( int  windowIndex,
int  frame 
)

Draw the sprite onto the given window

Parameters
windowIndexDestination window number
frameFrame number

◆ getFrameSize()

Common::Point Xeen::SpriteResource::getFrameSize ( int  frame) const

Gets the size of a sprite

◆ size()

size_t Xeen::SpriteResource::size ( ) const
inline

Returns the number of frames the sprite resource has

◆ empty()

bool Xeen::SpriteResource::empty ( ) const
inline

Returns true if the sprite resource is empty (ie. nothing is loaded)

◆ setClippedBottom()

static void Xeen::SpriteResource::setClippedBottom ( int  y)
inlinestatic

Set the bottom Y position where sprites are clipped if SPRFLAG_BOTTOM_CLIPPED is applied


The documentation for this class was generated from the following file: