ManaPlus
|
#include <sprite.h>
Public Member Functions | |
virtual | ~Sprite () |
virtual bool | reset ()=0 |
virtual bool | play (const std::string &action)=0 |
virtual bool | update (const int time)=0 |
virtual void | draw (Graphics *const graphics, const int posX, const int posY) const =0 |
virtual int | getWidth () const =0 |
virtual int | getHeight () const =0 |
virtual const Image * | getImage () const =0 |
virtual bool | setSpriteDirection (const SpriteDirection::Type direction)=0 |
virtual void | setAlpha (float alpha) |
virtual float | getAlpha () const |
virtual unsigned int | getCurrentFrame () const =0 |
virtual unsigned int | getFrameCount () const =0 |
virtual const void * | getHash () const |
virtual const void * | getHash2 () const |
virtual bool | updateNumber (const unsigned num)=0 |
Protected Member Functions | |
Sprite () | |
Protected Attributes | |
float | mAlpha |
|
inlineprotected |
|
pure virtual |
Draw the current animation frame at the coordinates given in screen pixels.
Implemented in ImageSprite, AnimatedSprite, FloorItem, and Being.
|
inlinevirtual |
Returns the current alpha opacity of the animated sprite.
Reimplemented in ActorSprite.
Definition at line 103 of file sprite.h.
References mAlpha.
Referenced by ActorSprite::getAlpha().
|
pure virtual |
Returns the current frame number for the sprite.
Implemented in ImageSprite, AnimatedSprite, and CompoundSprite.
|
pure virtual |
Returns the frame count for the sprite.
Implemented in ImageSprite, AnimatedSprite, and CompoundSprite.
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
Gets the height in pixels of the image of the current frame
Implemented in ImageSprite, AnimatedSprite, CompoundSprite, Being, and ActorSprite.
Referenced by NpcDialog::logic(), and NpcDialog::showAvatar().
|
pure virtual |
Returns a reference to the current image being drawn.
Implemented in ImageSprite, AnimatedSprite, and CompoundSprite.
|
pure virtual |
Gets the width in pixels of the image of the current frame
Implemented in ImageSprite, AnimatedSprite, CompoundSprite, Being, and ActorSprite.
Referenced by NpcDialog::logic(), and NpcDialog::showAvatar().
|
pure virtual |
Plays an action using the current direction.
Implemented in AnimatedSprite, ImageSprite, and CompoundSprite.
|
pure virtual |
Resets the sprite.
Implemented in ImageSprite, AnimatedSprite, and CompoundSprite.
|
inlinevirtual |
Sets the alpha value of the animated sprite
Reimplemented in AnimatedSprite, CompoundSprite, and ActorSprite.
Definition at line 97 of file sprite.h.
References mAlpha.
|
pure virtual |
Sets the direction.
Implemented in ImageSprite, AnimatedSprite, and CompoundSprite.
|
pure virtual |
Inform the animation of the passed time so that it can output the correct animation frame.
Implemented in ImageSprite, AnimatedSprite, and CompoundSprite.
|
pure virtual |
Implemented in ImageSprite, AnimatedSprite, and CompoundSprite.
|
protected |
The alpha opacity used to draw
Definition at line 130 of file sprite.h.
Referenced by AnimatedSprite::AnimatedSprite(), CompoundSprite::CompoundSprite(), ImageSprite::draw(), Being::drawCompound(), CompoundSprite::drawSimple(), CompoundSprite::drawSprites(), getAlpha(), ImageSprite::ImageSprite(), CompoundSprite::setAlpha(), and setAlpha().