ManaPlus
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
AnimatedSprite Class Reference

#include <animatedsprite.h>

Inheritance diagram for AnimatedSprite:
Sprite

Public Member Functions

 AnimatedSprite (SpriteDef *const sprite)
 
 ~AnimatedSprite ()
 
bool reset ()
 
bool play (const std::string &spriteAction)
 
bool update (const int time)
 
void draw (Graphics *const graphics, const int posX, const int posY) const
 
void drawRescaled (Graphics *const graphics, const int posX, const int posY, const int dx, const int dy) const
 
void drawRaw (Graphics *const graphics, const int posX, const int posY) const
 
int getWidth () const
 
int getHeight () const
 
const ImagegetImage () const
 
bool setSpriteDirection (const SpriteDirection::Type direction)
 
int getNumberOfLayers () const
 
std::string getIdPath () const
 
unsigned int getCurrentFrame () const
 
unsigned int getFrameCount () const
 
void setAlpha (float alpha)
 
const void * getHash () const
 
bool updateNumber (const unsigned num)
 
void clearDelayLoad ()
 
void setSprite (SpriteDef *const sprite)
 
bool isTerminated () const
 
void setLastTime (const int time)
 
- Public Member Functions inherited from Sprite
virtual ~Sprite ()
 
virtual float getAlpha () const
 
virtual const void * getHash2 () const
 

Static Public Member Functions

static AnimatedSpriteload (const std::string &filename, const int variant)
 
static AnimatedSpritedelayedLoad (const std::string &filename, const int variant)
 
static AnimatedSpriteclone (const AnimatedSprite *const anim)
 
static void setEnableCache (const bool b)
 

Private Member Functions

bool updateCurrentAnimation (const unsigned int dt)
 
void setDelayLoad (const std::string &filename, const int variant)
 

Private Attributes

SpriteDirection::Type mDirection
 
int mLastTime
 
unsigned int mFrameIndex
 
unsigned int mFrameTime
 
SpriteDefmSprite
 
const ActionmAction
 
const AnimationmAnimation
 
const FramemFrame
 
unsigned mNumber
 
unsigned mNumber1
 
AnimationDelayLoadmDelayLoad
 
bool mTerminated
 

Static Private Attributes

static bool mEnableCache = false
 

Additional Inherited Members

- Protected Member Functions inherited from Sprite
 Sprite ()
 
- Protected Attributes inherited from Sprite
float mAlpha
 

Detailed Description

Animates a sprite by adding playback state.

Definition at line 36 of file animatedsprite.h.

Constructor & Destructor Documentation

◆ AnimatedSprite()

AnimatedSprite::AnimatedSprite ( SpriteDef *const  sprite)
explicit

Constructor.

Parameters
spritethe sprite to animate

Definition at line 51 of file animatedsprite.cpp.

51  :
53  mLastTime(0),
54  mFrameIndex(0),
55  mFrameTime(0),
56  mSprite(sprite),
57  mAction(nullptr),
58  mAnimation(nullptr),
59  mFrame(nullptr),
60  mNumber(100),
61  mNumber1(100),
62  mDelayLoad(nullptr),
63  mTerminated(false)
64 {
65  mAlpha = 1.0F;
66 
67  // Take possession of the sprite
68  if (mSprite != nullptr)
69  mSprite->incRef();
70 }
const Frame * mFrame
unsigned int mFrameTime
unsigned int mFrameIndex
SpriteDirection::Type mDirection
SpriteDef * mSprite
const Animation * mAnimation
AnimationDelayLoad * mDelayLoad
const Action * mAction
virtual void incRef()
Definition: resource.cpp:38
float mAlpha
Definition: sprite.h:130

References Resource::incRef(), Sprite::mAlpha, and mSprite.

Referenced by clone(), delayedLoad(), and load().

◆ ~AnimatedSprite()

AnimatedSprite::~AnimatedSprite ( )

Definition at line 127 of file animatedsprite.cpp.

128 {
129  if (mSprite != nullptr)
130  {
131  mSprite->decRef();
132  mSprite = nullptr;
133  }
134  if (mDelayLoad != nullptr)
135  {
139  }
140 }
static void removeDelayLoad(const AnimationDelayLoad *const delayedLoad)
virtual void decRef()
Definition: resource.cpp:50
#define delete2(var)
Definition: delete2.h:25

References AnimationDelayLoad::clearSprite(), Resource::decRef(), delete2, mDelayLoad, mSprite, and DelayedManager::removeDelayLoad().

Member Function Documentation

◆ clearDelayLoad()

void AnimatedSprite::clearDelayLoad ( )
inline

Definition at line 115 of file animatedsprite.h.

116  { mDelayLoad = nullptr; }

References mDelayLoad.

Referenced by AnimationDelayLoad::~AnimationDelayLoad().

◆ clone()

AnimatedSprite * AnimatedSprite::clone ( const AnimatedSprite *const  anim)
static

Definition at line 113 of file animatedsprite.cpp.

115 {
116  if (anim == nullptr)
117  return nullptr;
118  AnimatedSprite *restrict const sprite = new AnimatedSprite(anim->mSprite);
119 #ifdef DEBUG_ANIMATIONS
120  sprite->setSpriteName(anim->getSpriteName());
121 #endif // DEBUG_ANIMATIONS
122 
123  sprite->play(SpriteAction::STAND);
124  return sprite;
125 }
AnimatedSprite(SpriteDef *const sprite)
#define restrict
Definition: localconsts.h:165
static const std::string STAND("stand")

References AnimatedSprite(), restrict, and SpriteAction::STAND().

Referenced by Being::setEmote().

◆ delayedLoad()

AnimatedSprite * AnimatedSprite::delayedLoad ( const std::string &  filename,
const int  variant 
)
static

Definition at line 89 of file animatedsprite.cpp.

92 {
93  if (!mEnableCache)
94  return load(filename, variant);
96  filename, variant);
97  if (res != nullptr)
98  {
99  res->decRef();
100  return load(filename, variant);
101  }
102 
103  AnimatedSprite *restrict const as = new AnimatedSprite(nullptr);
104 #ifdef DEBUG_ANIMATIONS
105  as->setSpriteName(filename);
106 #endif // DEBUG_ANIMATIONS
107 
108  as->play(SpriteAction::STAND);
109  as->setDelayLoad(filename, variant);
110  return as;
111 }
static AnimatedSprite * load(const std::string &filename, const int variant)
static bool mEnableCache
Resource * getFromCache(const std::string &filename, const int variant)

References AnimatedSprite(), ResourceManager::getFromCache(), load(), mEnableCache, restrict, and SpriteAction::STAND().

Referenced by Being::setGender(), Being::setHairTempSprite(), Being::setSpriteCards(), Being::setSpriteColor(), Being::setSpriteColorId(), Being::setSpriteId(), Being::setTempSprite(), and ActorSprite::setupSpriteDisplay().

◆ draw()

void AnimatedSprite::draw ( Graphics *const  graphics,
const int  posX,
const int  posY 
) const
virtual

Draw the current animation frame at the coordinates given in screen pixels.

Implements Sprite.

Definition at line 328 of file animatedsprite.cpp.

331 {
332  FUNC_BLOCK("AnimatedSprite::draw", 1)
333  if ((mFrame == nullptr) || (mFrame->image == nullptr))
334  return;
335 
336  Image *restrict const image = mFrame->image;
337  image->setAlpha(mAlpha);
338  graphics->drawImage(image,
339  posX + mFrame->offsetX, posY + mFrame->offsetY);
340 }
void setAlpha(float alpha)
if(!vert) return
void drawImage(const Image *restrict const image, int dstX, int dstY) restrict2 override final
#define FUNC_BLOCK(name, id)
Definition: perfomance.h:81

References FUNC_BLOCK, and restrict.

Referenced by Being::drawBeingCursor(), and MiniStatusWindow::drawIcons().

◆ drawRaw()

void AnimatedSprite::drawRaw ( Graphics *const  graphics,
const int  posX,
const int  posY 
) const

Definition at line 363 of file animatedsprite.cpp.

366 {
367  if ((mFrame == nullptr) || (mFrame->image == nullptr))
368  return;
369 
370  Image *restrict const image = mFrame->image;
371  image->setAlpha(mAlpha);
372  graphics->drawImage(image,
373  posX,
374  posY);
375 }
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
Image * image
Definition: frame.h:42

References restrict.

Referenced by CutInWindow::draw2().

◆ drawRescaled()

void AnimatedSprite::drawRescaled ( Graphics *const  graphics,
const int  posX,
const int  posY,
const int  dx,
const int  dy 
) const

Definition at line 342 of file animatedsprite.cpp.

347 {
348  if (mFrame == nullptr ||
349  mFrame->image == nullptr)
350  {
351  return;
352  }
353 
354  Image *restrict const image = mFrame->image;
355  image->setAlpha(mAlpha);
356  graphics->drawRescaledImage(image,
357  posX + mFrame->offsetX,
358  posY + mFrame->offsetY,
359  dx,
360  dy);
361 }
virtual void drawRescaledImage(const Image *const image, int dstX, int dstY, const int desiredWidth, const int desiredHeight)=0
int offsetX
Definition: frame.h:44
int offsetY
Definition: frame.h:45

References restrict.

Referenced by CastingEffect::draw().

◆ getCurrentFrame()

unsigned int AnimatedSprite::getCurrentFrame ( ) const
inlinevirtual

Returns the current frame number for the sprite.

Implements Sprite.

Definition at line 102 of file animatedsprite.h.

104  { return mFrameIndex; }

References mFrameIndex.

◆ getFrameCount()

unsigned int AnimatedSprite::getFrameCount ( ) const
virtual

Returns the frame count for the sprite.

Implements Sprite.

Definition at line 404 of file animatedsprite.cpp.

405 {
406  if (mAnimation != nullptr)
407  return CAST_U32(mAnimation->getLength());
408  return 0;
409 }
#define CAST_U32
Definition: cast.h:31
size_t getLength() const
Definition: animation.h:70

References CAST_U32, Animation::getLength(), and mAnimation.

◆ getHash()

const void * AnimatedSprite::getHash ( ) const
virtual

Reimplemented from Sprite.

Definition at line 449 of file animatedsprite.cpp.

450 {
451  if (mFrame != nullptr)
452  return mFrame;
453  return this;
454 }

References mFrame.

◆ getHeight()

int AnimatedSprite::getHeight ( ) const
virtual

Gets the height in pixels of the image of the current frame

Implements Sprite.

Definition at line 418 of file animatedsprite.cpp.

419 {
420  if ((mFrame != nullptr) && (mFrame->image != nullptr))
421  return mFrame->image->mBounds.h;
422  return 0;
423 }

References Frame::image, and mFrame.

Referenced by CutInWindow::show().

◆ getIdPath()

std::string AnimatedSprite::getIdPath ( ) const

Definition at line 425 of file animatedsprite.cpp.

426 {
427  if (mSprite == nullptr)
428  return "";
429  return mSprite->mIdPath;
430 }
std::string mIdPath
Definition: resource.h:84

References Resource::mIdPath, and mSprite.

Referenced by LocalPlayer::imitateOutfit().

◆ getImage()

const Image * AnimatedSprite::getImage ( ) const
virtual

Returns a reference to the current image being drawn.

Implements Sprite.

Definition at line 432 of file animatedsprite.cpp.

433 {
434  return mFrame != nullptr ? mFrame->image : nullptr;
435 }

References Frame::image, and mFrame.

◆ getNumberOfLayers()

int AnimatedSprite::getNumberOfLayers ( ) const
inline

Definition at line 97 of file animatedsprite.h.

98  { return 1; }

◆ getWidth()

int AnimatedSprite::getWidth ( ) const
virtual

Gets the width in pixels of the image of the current frame

Implements Sprite.

Definition at line 411 of file animatedsprite.cpp.

412 {
413  if ((mFrame != nullptr) && (mFrame->image != nullptr))
414  return mFrame->image->mBounds.w;
415  return 0;
416 }

References Frame::image, and mFrame.

Referenced by MiniStatusWindow::drawIcons(), and CutInWindow::show().

◆ isTerminated()

bool AnimatedSprite::isTerminated ( ) const
inline

Definition at line 121 of file animatedsprite.h.

122  { return mTerminated; }

References mTerminated.

Referenced by CastingEffect::isTerminated(), and Being::logic().

◆ load()

AnimatedSprite * AnimatedSprite::load ( const std::string &  filename,
const int  variant 
)
static

An helper function, which will request the sprite to animate from the resource manager.

Parameters
filenamethe file of the sprite to animate
variantthe sprite variant

Definition at line 72 of file animatedsprite.cpp.

74 {
76  filename, variant);
77  if (s == nullptr)
78  return nullptr;
79  AnimatedSprite *restrict const as = new AnimatedSprite(s);
80 #ifdef DEBUG_ANIMATIONS
81  as->setSpriteName(filename);
82 #endif // DEBUG_ANIMATIONS
83 
84  as->play(SpriteAction::STAND);
85  s->decRef();
86  return as;
87 }
SpriteDef * getSprite(const std::string &path, const int variant)

References AnimatedSprite(), Loader::getSprite(), restrict, and SpriteAction::STAND().

Referenced by Being::addEffect(), delayedLoad(), StatusEffect::getIcon(), ActorSprite::initTargetCursor(), EmoteDB::load(), EmoteDB::loadSpecialXmlFile(), EmoteDB::loadXmlFile(), Being::setHorse(), Being::setLanguageId(), CutInWindow::show(), Being::showAwayBadge(), Being::showClanBadge(), Being::showGmBadge(), Being::showGuildBadge(), Being::showInactiveBadge(), Being::showNameBadge(), Being::showPartyBadge(), Being::showShopBadge(), and Being::showTeamBadge().

◆ play()

bool AnimatedSprite::play ( const std::string &  action)
virtual

Plays an action using the current direction.

Returns
true if the sprite changed, false otherwise

Implements Sprite.

Definition at line 159 of file animatedsprite.cpp.

160 {
161  if (mSprite == nullptr)
162  {
163  if (mDelayLoad == nullptr)
164  return false;
165  mDelayLoad->setAction(spriteAction);
166  return true;
167  }
168 
169  const Action *const action = mSprite->getAction(spriteAction, mNumber);
170  if (action == nullptr)
171  return false;
172 
173  mAction = action;
174  const Animation *const animation = mAction->getAnimation(mDirection);
175 
176  if ((animation != nullptr) &&
177  animation != mAnimation &&
178  animation->getLength() > 0)
179  {
180  mAnimation = animation;
181  reset();
182 
183  return true;
184  }
185 
186  return false;
187 }
Definition: action.h:41
const Animation * getAnimation(SpriteDirection::Type direction) const
Definition: action.cpp:46
void setAction(const std::string &action)
const Action * getAction(const std::string &action, const unsigned num) const
Definition: spritedef.cpp:52

References Animation::getLength().

Referenced by AnimationDelayLoad::load(), Being::setAction(), and Being::setHorse().

◆ reset()

bool AnimatedSprite::reset ( )
virtual

Resets the sprite.

Returns
true if the sprite changed, false otherwise

Implements Sprite.

Definition at line 142 of file animatedsprite.cpp.

143 {
144  const bool ret = mFrameIndex !=0 ||
145  mFrameTime != 0 ||
146  mLastTime != 0;
147 
148  mFrameIndex = 0;
149  mFrameTime = 0;
150  mLastTime = 0;
151 
152  if (mAnimation != nullptr)
153  mFrame = &mAnimation->mFrames[0];
154  else
155  mFrame = nullptr;
156  return ret;
157 }
Frames mFrames
Definition: animation.h:99

References mAnimation, mFrame, mFrameIndex, Animation::mFrames, mFrameTime, and mLastTime.

◆ setAlpha()

void AnimatedSprite::setAlpha ( float  alpha)
virtual

Sets the alpha value of the animated sprite

Reimplemented from Sprite.

Definition at line 437 of file animatedsprite.cpp.

438 {
439  mAlpha = alpha;
440 
441  if (mFrame != nullptr)
442  {
443  Image *restrict const image = mFrame->image;
444  if (image != nullptr)
445  image->setAlpha(mAlpha);
446  }
447 }

References restrict.

◆ setDelayLoad()

void AnimatedSprite::setDelayLoad ( const std::string &  filename,
const int  variant 
)
private

Definition at line 475 of file animatedsprite.cpp.

477 {
478  if (mDelayLoad != nullptr)
479  {
482  delete mDelayLoad;
483  }
484  mDelayLoad = new AnimationDelayLoad(filename, variant, this);
486 }
static void addDelayedAnimation(AnimationDelayLoad *const animation)

References DelayedManager::addDelayedAnimation(), and DelayedManager::removeDelayLoad().

◆ setEnableCache()

static void AnimatedSprite::setEnableCache ( const bool  b)
inlinestatic

Definition at line 124 of file animatedsprite.h.

125  { mEnableCache = b; }

References mEnableCache.

Referenced by Game::Game(), and Game::~Game().

◆ setLastTime()

void AnimatedSprite::setLastTime ( const int  time)
inline

Definition at line 127 of file animatedsprite.h.

128  { mLastTime = time; }

References mLastTime.

◆ setSprite()

void AnimatedSprite::setSprite ( SpriteDef *const  sprite)
inline

Definition at line 118 of file animatedsprite.h.

119  { mSprite = sprite; }

References mSprite.

Referenced by AnimationDelayLoad::load().

◆ setSpriteDirection()

bool AnimatedSprite::setSpriteDirection ( const SpriteDirection::Type  direction)
virtual

Sets the direction.

Returns
true if the sprite changed, false otherwise

Implements Sprite.

Definition at line 377 of file animatedsprite.cpp.

379 {
380  if (mDirection != direction)
381  {
382  mDirection = direction;
383 
384  if (mAction == nullptr)
385  return false;
386 
387  const Animation *restrict const animation =
389 
390  if ((animation != nullptr) &&
391  animation != mAnimation &&
392  animation->getLength() > 0)
393  {
394  mAnimation = animation;
395  reset();
396  }
397 
398  return true;
399  }
400 
401  return false;
402 }

References restrict.

Referenced by Being::setDirection(), and Being::setHorse().

◆ update()

bool AnimatedSprite::update ( const int  time)
virtual

Inform the animation of the passed time so that it can output the correct animation frame.

Returns
true if the sprite changed, false otherwise

Implements Sprite.

Definition at line 189 of file animatedsprite.cpp.

190 {
191  // Avoid freaking out at first frame or when tick_time overflows
192  if (A_UNLIKELY(time < mLastTime || mLastTime == 0))
193  mLastTime = time;
194 
195  // If not enough time has passed yet, do nothing
196  if (time <= mLastTime || (mAnimation == nullptr))
197  return false;
198 
199  const unsigned int dt = time - mLastTime;
200  mLastTime = time;
201 
202  const Animation *restrict const animation = mAnimation;
203  const Frame *restrict const frame = mFrame;
204 
206  {
207  // Animation finished, reset to default
209  mTerminated = true;
210  }
211 
212  // Make sure something actually changed
213  return animation != mAnimation || frame != mFrame;
214 }
bool updateCurrentAnimation(const unsigned int dt)
bool play(const std::string &spriteAction)
#define A_UNLIKELY(x)
Definition: likely.h:30
Definition: frame.h:39

References A_UNLIKELY, restrict, and SpriteAction::STAND().

Referenced by Being::drawBeingCursor(), Being::logic(), CutInWindow::logic(), MiniStatusWindow::logic(), CutInWindow::show(), and CastingEffect::update().

◆ updateCurrentAnimation()

bool AnimatedSprite::updateCurrentAnimation ( const unsigned int  dt)
private

Definition at line 216 of file animatedsprite.cpp.

217 {
218  // move code from Animation::isTerminator(*mFrame)
219  if (mFrame == nullptr ||
220  mAnimation == nullptr ||
221  (mFrame->image == nullptr && mFrame->type == FrameType::ANIMATION))
222  {
223  return false;
224  }
225 
226  mFrameTime += time;
227 
228  while ((mFrameTime > CAST_U32(mFrame->delay) &&
229  mFrame->delay > 0) ||
232  {
233  bool fail(true);
235  mFrameIndex++;
236 
238  mFrameIndex = 0;
239 
241  if (mFrame->type == FrameType::LABEL &&
242  !mFrame->nextAction.empty())
243  {
244  fail = false;
245  }
246  else if (mFrame->type == FrameType::GOTO &&
247  !mFrame->nextAction.empty())
248  {
249  const int rand = mFrame->rand;
250  if (rand == 100 ||
251  ((rand != 0) && rand >= mrand() % 100))
252  {
253  for (size_t i = 0; i < mAnimation->getLength(); i ++)
254  {
255  const Frame *restrict const frame =
256  &mAnimation->mFrames[i];
257  if (frame->type == FrameType::LABEL &&
258  mFrame->nextAction == frame->nextAction)
259  {
260  mFrameIndex = CAST_U32(i);
261  if (mFrameIndex >= CAST_U32(
262  mAnimation->getLength()))
263  {
264  mFrameIndex = 0;
265  }
266 
268 
269  fail = false;
270  break;
271  }
272  }
273  }
274  else
275  {
276  fail = false;
277  }
278  }
279  else if (mFrame->type == FrameType::JUMP &&
280  !mFrame->nextAction.empty())
281  {
282  const int rand = mFrame->rand;
283  if (rand == 100 ||
284  ((rand != 0) && rand >= mrand() % 100))
285  {
287  return true;
288  }
289  }
290  // copy code from Animation::isTerminator(*mFrame)
291  else if ((mFrame->image == nullptr) &&
293  {
294  const int rand = mFrame->rand;
295  if (rand == 100 ||
296  ((rand != 0) && rand >= mrand() % 100))
297  {
298  mAnimation = nullptr;
299  mFrame = nullptr;
300  return false;
301  }
302  }
303  else
304  {
305  const int rand = mFrame->rand;
306  if (rand == 100 ||
308  {
309  fail = false;
310  }
311  else
312  {
313  if ((rand != 0) && mrand() % 100 <= rand)
314  fail = false;
315  }
316  }
317  if (fail)
318  {
319  if (mFrame != nullptr)
320  mFrameTime = mFrame->delay + 1;
321  else
322  mFrameTime ++;
323  }
324  }
325  return true;
326 }
int mrand()
Definition: mrand.cpp:41
@ ANIMATION
Definition: frametype.h:33
int rand
Definition: frame.h:46
std::string nextAction
Definition: frame.h:48
FrameTypeT type
Definition: frame.h:47
int delay
Definition: frame.h:43

References FrameType::ANIMATION, CAST_U32, FrameType::GOTO, FrameType::JUMP, FrameType::LABEL, mrand(), FrameType::PAUSE, and restrict.

◆ updateNumber()

bool AnimatedSprite::updateNumber ( const unsigned  num)
virtual

Implements Sprite.

Definition at line 456 of file animatedsprite.cpp.

457 {
458  if (mSprite == nullptr)
459  return false;
460 
461  if (mNumber1 != num)
462  {
463  mNumber1 = num;
464  mNumber = mSprite->findNumber(num);
465  if (mNumber == 0U)
466  {
467  mNumber = 100;
468  return false;
469  }
470  return true;
471  }
472  return false;
473 }
unsigned findNumber(const unsigned num) const
Definition: spritedef.cpp:76

Field Documentation

◆ mAction

const Action* AnimatedSprite::mAction
private

The currently active animation.

Definition at line 174 of file animatedsprite.h.

◆ mAnimation

const Animation* AnimatedSprite::mAnimation
private

The currently active frame.

Definition at line 176 of file animatedsprite.h.

Referenced by getFrameCount(), and reset().

◆ mDelayLoad

AnimationDelayLoad* AnimatedSprite::mDelayLoad
private

Definition at line 181 of file animatedsprite.h.

Referenced by clearDelayLoad(), and ~AnimatedSprite().

◆ mDirection

SpriteDirection::Type AnimatedSprite::mDirection
private

The sprite direction.

Definition at line 165 of file animatedsprite.h.

◆ mEnableCache

bool AnimatedSprite::mEnableCache = false
staticprivate

Definition at line 183 of file animatedsprite.h.

Referenced by delayedLoad(), and setEnableCache().

◆ mFrame

const Frame* AnimatedSprite::mFrame
private

Definition at line 178 of file animatedsprite.h.

Referenced by getHash(), getHeight(), getImage(), getWidth(), and reset().

◆ mFrameIndex

unsigned int AnimatedSprite::mFrameIndex
private

The index of the current frame.

Definition at line 168 of file animatedsprite.h.

Referenced by getCurrentFrame(), and reset().

◆ mFrameTime

unsigned int AnimatedSprite::mFrameTime
private

The time since start of frame. The sprite definition.

Definition at line 169 of file animatedsprite.h.

Referenced by reset().

◆ mLastTime

int AnimatedSprite::mLastTime
private

The last time update was called.

Definition at line 166 of file animatedsprite.h.

Referenced by reset(), and setLastTime().

◆ mNumber

unsigned AnimatedSprite::mNumber
private

Definition at line 179 of file animatedsprite.h.

◆ mNumber1

unsigned AnimatedSprite::mNumber1
private

Definition at line 180 of file animatedsprite.h.

◆ mSprite

SpriteDef* AnimatedSprite::mSprite
private

The currently active action.

Definition at line 172 of file animatedsprite.h.

Referenced by AnimatedSprite(), getIdPath(), setSprite(), and ~AnimatedSprite().

◆ mTerminated

bool AnimatedSprite::mTerminated
private

Definition at line 182 of file animatedsprite.h.

Referenced by isTerminated().


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