ScummVM API documentation
Ultima::Shared::Gfx::Sprite Class Reference

Public Member Functions

 Sprite ()
 
 Sprite (const Sprite &src)
 
 Sprite (const byte *src, uint bpp, uint16 w=16, uint16 h=16)
 
Spriteoperator= (const Sprite &src)
 
void draw (Graphics::ManagedSurface &dest, const Common::Point &pt)
 
uint16 w () const
 
uint16 h () const
 
byte * getPixels ()
 
byte * getBasePtr (int16 x, int16 y)
 
const byte * getBasePtr (int16 x, int16 y) const
 

Constructor & Destructor Documentation

◆ Sprite() [1/3]

Ultima::Shared::Gfx::Sprite::Sprite ( )

Constructor

◆ Sprite() [2/3]

Ultima::Shared::Gfx::Sprite::Sprite ( const Sprite src)

Constructor, copying from another sprite

◆ Sprite() [3/3]

Ultima::Shared::Gfx::Sprite::Sprite ( const byte *  src,
uint  bpp,
uint16  w = 16,
uint16  h = 16 
)

Constructor, loading a sprite from passed data

Parameters
srcSource data
bppThe bits per pixel for tiles in the file
wWidth of tiles
hHeight of files

Member Function Documentation

◆ operator=()

Sprite& Ultima::Shared::Gfx::Sprite::operator= ( const Sprite src)

Copy assignment operator

◆ draw()

void Ultima::Shared::Gfx::Sprite::draw ( Graphics::ManagedSurface dest,
const Common::Point pt 
)

Draw a tile onto a passed surface

◆ w()

uint16 Ultima::Shared::Gfx::Sprite::w ( ) const
inline

Return the width of the sprite

◆ h()

uint16 Ultima::Shared::Gfx::Sprite::h ( ) const
inline

Return the height of the sprite

◆ getPixels()

byte* Ultima::Shared::Gfx::Sprite::getPixels ( )
inline

Get a reference to the sprite surface

◆ getBasePtr() [1/2]

byte* Ultima::Shared::Gfx::Sprite::getBasePtr ( int16  x,
int16  y 
)
inline

Get a reference to a specified position within the sprite

◆ getBasePtr() [2/2]

const byte* Ultima::Shared::Gfx::Sprite::getBasePtr ( int16  x,
int16  y 
) const
inline

Get a reference to a specified position within the sprite


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