29 #include "nomlib/graphics/sprite/SpriteBatch.hpp"
35 NOM_LOG_TRACE ( NOM );
40 NOM_LOG_TRACE ( NOM );
48 Sprite ( dims.width, dims.height );
55 NOM_LOG_TRACE ( NOM );
63 Sprite ( dims.width, dims.height );
71 this->coords = other.coords;
83 NOM_LOG_TRACE ( NOM );
97 const std::string& SpriteBatch::sheet_filename (
void )
const
113 dims.x * this->scale_factor,
114 dims.y * this->scale_factor
118 dims.width * this->scale_factor,
119 dims.height * this->scale_factor
Extended bitmap object rendering – utilizes sprite sheets.
int32 frames(void) const
Obtain the number of frames this object contains.
Coords offsets
Source (input) coordinates – used for sprite sheet positioning.
void set_position(const Point2i &pos)
int32 frames(void) const
Obtain the number of frames available.
int32 scale_factor
Scale factor applied if the resize method is called.
SpriteBatch & operator=(const SpriteBatch &other)
Copy assignment operator.
void setSheetID(int32 id)
Set a new frame ID to render.
virtual ~SpriteBatch(void)
Destructor.
bool load(const std::string &filename)
Texture sprite
Object that holds our sprite image.
int32 sheet_id
The sheet's frame ID presently in use.
uint32 state
Convenience instance variable (user-defined)
Specialized class container for the creation of sprite sheets via RFC 4627 JSON-compliant file input...
int32 getSheetID(void) const
Get the object's current sheet_id.
SpriteSheet sprite_sheet
Our attached sprite sheet object.
Coordinate values (x, y, z, width, height ) wrapper.
const Coords & dimensions(int32 index) const
Get the calculations made for a particular ID number.