ManaPlus
actorsprite.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2010 The Mana Developers
4  * Copyright (C) 2011-2019 The ManaPlus Developers
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #include "being/actorsprite.h"
23 
24 #include "configuration.h"
25 #include "statuseffect.h"
26 
27 #include "being/localplayer.h"
28 
29 #include "const/utils/timer.h"
30 
31 #include "gui/theme.h"
32 
34 
35 #include "particle/particle.h"
36 
38 
40 
44 
45 #include "utils/checkutils.h"
46 #include "utils/delete2.h"
47 #include "utils/foreach.h"
48 #include "utils/timer.h"
49 
50 #include "debug.h"
51 
52 #define for_each_cursors() \
53  for (int size = CAST_S32(TargetCursorSize::SMALL); \
54  size < CAST_S32(TargetCursorSize::NUM_TC); \
55  size ++) \
56  { \
57  for (int type = CAST_S32(TargetCursorType::NORMAL); \
58  type < CAST_S32(TargetCursorType::NUM_TCT); \
59  type ++) \
60 
61 #define end_foreach }
62 
66 bool ActorSprite::loaded = false;
67 
70  Actor(),
71  mStatusEffects(),
72  mStatusParticleEffects(nullptr, true),
73  mChildParticleEffects(&mStatusParticleEffects, false),
74  mHorseId(0),
75  mId(id),
76  mUsedTargetCursor(nullptr),
77  mActorSpriteListeners(),
78  mCursorPaddingX(0),
79  mCursorPaddingY(0),
80  mMustResetParticles(false),
81  mPoison(false),
82  mHaveCart(false),
83  mTrickDead(false)
84 {
85 }
86 
88 {
90  mMustResetParticles = true;
91 
92  mUsedTargetCursor = nullptr;
93 
94  if (localPlayer != nullptr &&
95  localPlayer != this &&
96  localPlayer->getTarget() == this)
97  {
98  localPlayer->setTarget(nullptr);
99  }
100 
101  // Notify listeners of the destruction.
103  {
104  if (reportFalse(*iter))
105  (*iter)->actorSpriteDestroyed(*this);
106  }
107 }
108 
110 {
111  BLOCK_START("ActorSprite::logic")
112  // Update sprite animations
114 
115  // Restart status/particle effects, if needed
117  {
118  mMustResetParticles = false;
119  FOR_EACH (std::set<int32_t>::const_iterator, it, mStatusEffects)
120  {
121  const StatusEffect *const effect
123  if (effect != nullptr &&
124  effect->mIsPersistent)
125  {
126  updateStatusEffect(*it,
127  Enable_true,
128  IsStart_false);
129  }
130  }
131  }
132 
133  // Update particle effects
135  BLOCK_END("ActorSprite::logic")
136 }
137 
138 void ActorSprite::setMap(Map *const map)
139 {
140  Actor::setMap(map);
141 
142  // Clear particle effect list because child particles became invalid
144  mMustResetParticles = true; // Reset status particles on next redraw
145 }
146 
148 {
149  if (particle != nullptr)
150  {
151  particle->setActor(mId);
153  }
154 }
155 
157 {
158  if (particle != nullptr)
159  {
160  // The effect may not die without the beings permission or we segfault
161  particle->disableAutoDelete();
163  }
164 }
165 
167 {
168  if (particle != nullptr)
170 }
171 
173 {
174  if (type == TargetCursorType::NONE)
175  {
176  untarget();
177  }
178  else
179  {
180  const size_t sz = CAST_SIZE(getTargetCursorSize());
182  if (mUsedTargetCursor != nullptr)
183  {
184  static const int targetWidths[CAST_SIZE(
186  = {0, 0, 0};
187  static const int targetHeights[CAST_SIZE(
189  = {-mapTileSize / 2, -mapTileSize / 2, -mapTileSize};
190 
191  mCursorPaddingX = CAST_S32(targetWidths[sz]);
192  mCursorPaddingY = CAST_S32(targetHeights[sz]);
193  }
194  }
195 }
196 
197 void ActorSprite::setStatusEffect(const int32_t index,
198  const Enable active,
199  const IsStart start)
200 {
201  const Enable wasActive = fromBool(
202  mStatusEffects.find(index) != mStatusEffects.end(), Enable);
203 
204  if (active != wasActive)
205  {
206  updateStatusEffect(index, active, start);
207  if (active == Enable_true)
208  {
209  mStatusEffects.insert(index);
210  }
211  else
212  {
213  mStatusEffects.erase(index);
214  }
215  }
216 }
217 
218 static void applyEffectByOption(ActorSprite *const actor,
219  uint32_t option,
220  const char *const name,
221  const OptionsMap& options)
222 {
223  FOR_EACH (OptionsMapCIter, it, options)
224  {
225  const uint32_t opt = (*it).first;
226  const int32_t id = (*it).second;
227  const Enable enable = (opt & option) != 0 ? Enable_true : Enable_false;
228  option |= opt;
229  option ^= opt;
230  actor->setStatusEffect(id,
231  enable,
232  IsStart_false);
233  }
234  if (option != 0U &&
235  config.getBoolValue("unimplimentedLog"))
236  {
237  const std::string str = strprintf(
238  "Error: unknown effect by %s. "
239  "Left value: %u",
240  name,
241  option);
242  logger->log(str);
244  }
245 }
246 
247 static void applyEffectByOption1(ActorSprite *const actor,
248  uint32_t option,
249  const char *const name,
250  const OptionsMap& options)
251 {
252  FOR_EACH (OptionsMapCIter, it, options)
253  {
254  const uint32_t opt = (*it).first;
255  const int32_t id = (*it).second;
256  if (opt == option)
257  {
258  actor->setStatusEffect(id,
259  Enable_true,
260  IsStart_false);
261  option = 0U;
262  }
263  else
264  {
265  actor->setStatusEffect(id,
266  Enable_false,
267  IsStart_false);
268  }
269  }
270  if (option != 0 &&
271  config.getBoolValue("unimplimentedLog"))
272  {
273  const std::string str = strprintf(
274  "Error: unknown effect by %s. "
275  "Left value: %u",
276  name,
277  option);
278  logger->log(str);
280  }
281 }
282 
283 void ActorSprite::setStatusEffectOpitons(const uint32_t option,
284  const uint32_t opt1,
285  const uint32_t opt2,
286  const uint32_t opt3)
287 {
288  applyEffectByOption(this, option, "option",
290  applyEffectByOption1(this, opt1, "opt1",
292  applyEffectByOption(this, opt2, "opt2",
294  applyEffectByOption(this, opt3, "opt3",
296 }
297 
298 void ActorSprite::setStatusEffectOpitons(const uint32_t option,
299  const uint32_t opt1,
300  const uint32_t opt2)
301 {
302  applyEffectByOption(this, option, "option",
304  applyEffectByOption1(this, opt1, "opt1",
306  applyEffectByOption(this, opt2, "opt2",
308 }
309 
310 void ActorSprite::setStatusEffectOpiton0(const uint32_t option)
311 {
312  applyEffectByOption(this, option, "option",
314 }
315 
316 void ActorSprite::updateStatusEffect(const int32_t index,
317  const Enable newStatus,
318  const IsStart start)
319 {
321  index, newStatus);
322  if (effect == nullptr)
323  return;
324  if (effect->mIsPoison && getType() == ActorType::Player)
325  setPoison(newStatus == Enable_true);
326  else if (effect->mIsCart && localPlayer == this)
327  setHaveCart(newStatus == Enable_true);
328  else if (effect->mIsRiding)
329  setRiding(newStatus == Enable_true);
330  else if (effect->mIsTrickDead)
331  setTrickDead(newStatus == Enable_true);
332  else if (effect->mIsPostDelay)
333  stopCast(newStatus == Enable_true);
334  handleStatusEffect(effect, index, newStatus, start);
335 }
336 
338  const int32_t effectId,
339  const Enable newStatus,
340  const IsStart start)
341 {
342  if (effect == nullptr)
343  return;
344 
345  if (newStatus == Enable_true)
346  {
347  if (effectId >= 0)
348  {
349  Particle *particle = nullptr;
350  if (start == IsStart_true)
351  particle = effect->getStartParticle();
352  if (particle == nullptr)
353  particle = effect->getParticle();
354  if (particle != nullptr)
355  mStatusParticleEffects.setLocally(effectId, particle);
356  }
357  }
358  else
359  {
361  }
362 }
363 
365  const ForceDisplay forceDisplay,
366  const DisplayTypeT displayType,
367  const std::string &color)
368 {
369  clear();
370 
371  FOR_EACH (SpriteRefs, it, display.sprites)
372  {
373  if (*it == nullptr)
374  continue;
375  const std::string file = pathJoin(paths.getStringValue("sprites"),
376  combineDye3((*it)->sprite, color));
377 
378  const int variant = (*it)->variant;
379  addSprite(AnimatedSprite::delayedLoad(file, variant));
380  }
381 
382  // Ensure that something is shown, if desired
383  if (mSprites.empty() && forceDisplay == ForceDisplay_true)
384  {
385  if (display.image.empty())
386  {
388  paths.getStringValue("sprites"),
389  paths.getStringValue("spriteErrorFile")),
390  0));
391  }
392  else
393  {
394  std::string imagePath;
395  switch (displayType)
396  {
397  case DisplayType::Item:
398  default:
399  imagePath = pathJoin(paths.getStringValue("itemIcons"),
400  display.image);
401  break;
402  case DisplayType::Floor:
403  imagePath = pathJoin(paths.getStringValue("itemIcons"),
404  display.floor);
405  break;
406  }
407  imagePath = combineDye2(imagePath, color);
408  Image *img = Loader::getImage(imagePath);
409 
410  if (img == nullptr)
411  img = Theme::getImageFromTheme("unknown-item.png");
412 
413  addSprite(new ImageSprite(img));
414  if (img != nullptr)
415  img->decRef();
416  }
417  }
418 
420 
421  // setup particle effects
422  if (ParticleEngine::enabled && (particleEngine != nullptr))
423  {
424  FOR_EACH (StringVectCIter, itr, display.particles)
425  {
426  Particle *const p = particleEngine->addEffect(*itr, 0, 0, 0);
428  }
429  }
430 
431  mMustResetParticles = true;
432 }
433 
435 {
436  if (loaded)
437  unload();
438 
440 
441  loaded = true;
442 }
443 
445 {
446  if (reportTrue(!loaded))
447  return;
448 
450  loaded = false;
451 }
452 
454 {
455  mActorSpriteListeners.push_front(listener);
456 }
457 
459  listener)
460 {
462 }
463 
464 static const char *cursorType(const TargetCursorTypeT type)
465 {
466  switch (type)
467  {
469  return "in-range";
470  default:
474  return "normal";
475  }
476 }
477 
478 static const char *cursorSize(const TargetCursorSizeT size)
479 {
480  switch (size)
481  {
483  return "l";
485  return "m";
486  default:
489  return "s";
490  }
491 }
492 
494 {
495  static const std::string targetCursorFile("target-cursor-%s-%s.xml");
496 
497  // Load target cursors
499  {
502  targetCursorFile.c_str(),
503  cursorType(static_cast<TargetCursorTypeT>(type)),
504  cursorSize(static_cast<TargetCursorSizeT>(size)))),
505  0);
506  }
508 }
509 
511 {
513  {
514  delete2(targetCursor[type][size])
515  }
517 }
518 
520 {
521  std::string effectsStr;
522  if (!mStatusEffects.empty())
523  {
524  FOR_EACH (std::set<int32_t>::const_iterator, it, mStatusEffects)
525  {
526  const StatusEffect *const effect =
528  *it,
529  Enable_true);
530  if (effect == nullptr)
531  continue;
532  if (!effectsStr.empty())
533  effectsStr.append(", ");
534  effectsStr.append(effect->mName);
535  }
536  }
537  return effectsStr;
538 }
ActorSprite::mStatusEffects
std::set< int32_t > mStatusEffects
Definition: actorsprite.h:241
ForceDisplay_true
const bool ForceDisplay_true
Definition: forcedisplay.h:29
reportTrue
#define reportTrue(val)
Definition: checkutils.h:251
imageloader.h
debugmessagelistener.h
CompoundSprite
Definition: compoundsprite.h:36
ParticleVector::setLocally
void setLocally(const int index, Particle *const particle)
Definition: particlevector.cpp:37
SpriteRefs
std::vector< SpriteReference * >::const_iterator SpriteRefs
Definition: spritereference.h:51
Enable_true
const bool Enable_true
Definition: enable.h:29
CompoundSprite::update
bool update(const int time)
Definition: compoundsprite.cpp:133
TargetCursorType::NORMAL
@ NORMAL
Definition: targetcursortype.h:30
TargetCursorSize::SMALL
@ SMALL
Definition: targetcursorsize.h:29
BeingId
int BeingId
Definition: beingid.h:29
ActorSprite::mChildParticleEffects
ParticleList mChildParticleEffects
Definition: actorsprite.h:244
CAST_SIZE
#define CAST_SIZE
Definition: cast.h:33
ActorSprite::addActorSpriteListener
void addActorSpriteListener(ActorSpriteListener *const listener)
Definition: actorsprite.cpp:453
anonymous_namespace{stringutils.cpp}::start
unsigned int start
Definition: stringutils.cpp:227
TargetCursorSize::NUM_TC
@ NUM_TC
Definition: targetcursorsize.h:32
StatusEffect::mName
std::string mName
Definition: statuseffect.h:82
ActorSprite::handleStatusEffect
virtual void handleStatusEffect(const StatusEffect *const effect, const int32_t effectId, const Enable newStatus, const IsStart start)
Definition: actorsprite.cpp:337
Vector::x
float x
Definition: vector.h:208
Particle
Definition: particle.h:44
ActorSpriteListener
Definition: actorspritelistener.h:29
DebugMessageListener::distributeEvent
static void distributeEvent(const std::string &msg)
Definition: debugmessagelistener.cpp:29
Actor::mPos
Vector mPos
Definition: actor.h:139
ActorSprite::getTargetCursorSize
virtual TargetCursorSizeT getTargetCursorSize() const
Definition: actorsprite.h:98
StatusEffect::mIsTrickDead
bool mIsTrickDead
Definition: statuseffect.h:87
ParticleEngine::addEffect
Particle * addEffect(const std::string &particleEffectFile, const int pixelX, const int pixelY, const int rotation)
Definition: particleengine.cpp:129
SpriteDisplay::sprites
std::vector< SpriteReference * > sprites
Definition: spritedisplay.h:46
reportFalse
#define reportFalse(val)
Definition: checkutils.h:250
ImageSprite
Definition: imagesprite.h:31
combineDye3
std::string combineDye3(std::string file, const std::string &dye)
Definition: stringutils.cpp:562
TargetCursorType::NUM_TCT
@ NUM_TCT
Definition: targetcursortype.h:32
imagesprite.h
particleEngine
ParticleEngine * particleEngine
Definition: particleengine.cpp:41
TargetCursorType::IN_RANGE
@ IN_RANGE
Definition: targetcursortype.h:31
ActorSprite::loaded
static bool loaded
Definition: actorsprite.h:238
DisplayTypeT
DisplayType ::T DisplayTypeT
Definition: displaytype.h:31
paths
Configuration paths
Definition: configuration.cpp:55
ActorSprite::setupSpriteDisplay
void setupSpriteDisplay(const SpriteDisplay &display, const ForceDisplay forceDisplay, const DisplayTypeT displayType, const std::string &color)
Definition: actorsprite.cpp:364
statuseffectdb.h
statuseffect.h
StatusEffect::mIsPoison
bool mIsPoison
Definition: statuseffect.h:84
OptionsMapCIter
OptionsMap::const_iterator OptionsMapCIter
Definition: statuseffectdb.h:37
delete2.h
StatusEffectDB::getOptionMap
const OptionsMap & getOptionMap()
Definition: statuseffectdb.cpp:207
ActorSprite::setTrickDead
virtual void setTrickDead(const bool b)
Definition: actorsprite.h:180
Particle::disableAutoDelete
void disableAutoDelete()
Definition: particle.h:226
ActorSprite::ActorSprite
ActorSprite(const BeingId id)
Definition: actorsprite.cpp:68
ActorSprite::getStatusEffectsString
std::string getStatusEffectsString() const
Definition: actorsprite.cpp:519
ActorSprite::mCursorPaddingX
int mCursorPaddingX
Definition: actorsprite.h:255
end_foreach
#define end_foreach
Definition: actorsprite.cpp:61
ActorSprite::updateStatusEffect
virtual void updateStatusEffect(const int32_t index, const Enable newStatus, const IsStart start)
Definition: actorsprite.cpp:316
StatusEffectDB::getStatusEffect
StatusEffect * getStatusEffect(const int index, const Enable enabling)
Definition: statuseffectdb.cpp:46
StatusEffectDB::getOpt1Map
const OptionsMap & getOpt1Map()
Definition: statuseffectdb.cpp:212
Actor
Definition: actor.h:40
ParticleList::moveTo
void moveTo(const float x, const float y)
Definition: particlelist.cpp:86
ActorSprite::stopCast
virtual void stopCast(const bool b)
Definition: actorsprite.h:191
Image
Definition: image.h:67
AnimatedSprite::load
static AnimatedSprite * load(const std::string &filename, const int variant)
Definition: animatedsprite.cpp:71
cursorSize
static const char * cursorSize(const TargetCursorSizeT size)
Definition: actorsprite.cpp:478
Enable_false
const bool Enable_false
Definition: enable.h:29
fromBool
#define fromBool(val, name)
Definition: booldefines.h:48
pathJoin
std::string pathJoin(std::string str1, const std::string &str2)
Definition: stringutils.cpp:1036
TargetCursorSizeT
TargetCursorSize ::T TargetCursorSizeT
Definition: targetcursorsize.h:34
ActorSprite::removeActorSpriteListener
void removeActorSpriteListener(ActorSpriteListener *const listener)
Definition: actorsprite.cpp:458
ActorSprite::ActorSpriteListenerIterator
ActorSpriteListeners::iterator ActorSpriteListenerIterator
Definition: actorsprite.h:252
StatusEffect::getParticle
Particle * getParticle() const
Definition: statuseffect.cpp:84
delete2
#define delete2(var)
Definition: delete2.h:24
ActorSprite::setTargetType
void setTargetType(const TargetCursorTypeT type)
Definition: actorsprite.cpp:172
ActorType::Player
@ Player
Definition: actortype.h:30
bool
ParticleList::removeLocally
void removeLocally(const Particle *const particle)
Definition: particlelist.cpp:54
animatedsprite.h
logger
Logger * logger
Definition: logger.cpp:88
ActorSprite::mMustResetParticles
bool mMustResetParticles
Definition: actorsprite.h:259
Particle::setActor
void setActor(const BeingId actor)
Definition: particle.h:243
ActorSprite::controlCustomParticle
void controlCustomParticle(Particle *const particle)
Definition: actorsprite.cpp:156
localplayer.h
ActorSprite::controlAutoParticle
void controlAutoParticle(Particle *const particle)
Definition: actorsprite.cpp:147
localPlayer
LocalPlayer * localPlayer
Definition: localplayer.cpp:108
SpriteDisplay::floor
std::string floor
Definition: spritedisplay.h:45
cursorType
static const char * cursorType(const TargetCursorTypeT type)
Definition: actorsprite.cpp:464
ActorSprite::mUsedTargetCursor
AnimatedSprite * mUsedTargetCursor
Definition: actorsprite.h:249
IsStart_true
const bool IsStart_true
Definition: isstart.h:29
Theme::getImageFromTheme
static Image * getImageFromTheme(const std::string &path)
Definition: theme.cpp:654
nullptr
#define nullptr
Definition: localconsts.h:44
StatusEffect::mIsPersistent
bool mIsPersistent
Definition: statuseffect.h:83
checkutils.h
CompoundSprite::mSprites
std::vector< Sprite * > mSprites
Definition: compoundsprite.h:110
strprintf
std::string strprintf(const char *const format,...)
Definition: stringutils.cpp:99
ActorSprite::load
static void load()
Definition: actorsprite.cpp:434
ParticleList::addLocally
void addLocally(Particle *const particle)
Definition: particlelist.cpp:45
SpriteDisplay::image
std::string image
Definition: spritedisplay.h:44
StatusEffect::mIsRiding
bool mIsRiding
Definition: statuseffect.h:86
Loader::getImage
Image * getImage(const std::string &idPath)
Definition: imageloader.cpp:85
ActorSprite::setHaveCart
void setHaveCart(const bool b)
Definition: actorsprite.h:171
TargetCursorType::NONE
@ NONE
Definition: targetcursortype.h:29
ActorSprite
Definition: actorsprite.h:54
CompoundSprite::addSprite
void addSprite(Sprite *const sprite)
Definition: compoundsprite.cpp:270
applyEffectByOption1
static void applyEffectByOption1(ActorSprite *const actor, uint32_t option, const char *const name, const OptionsMap &options)
Definition: actorsprite.cpp:247
ParticleEngine::enabled
static bool enabled
Definition: particleengine.h:55
ParticleContainer::clear
void clear()
Definition: particlecontainer.cpp:44
ActorSprite::cleanupTargetCursors
static void cleanupTargetCursors()
Definition: actorsprite.cpp:510
ActorSprite::mCursorPaddingY
int mCursorPaddingY
Definition: actorsprite.h:256
StatusEffect
Definition: statuseffect.h:33
DisplayType::Floor
@ Floor
Definition: displaytype.h:29
for_each_cursors
#define for_each_cursors()
Definition: actorsprite.cpp:52
Configuration::getStringValue
std::string getStringValue(const std::string &key) const
Definition: configuration.cpp:487
ActorSprite::setStatusEffectOpiton0
void setStatusEffectOpiton0(const uint32_t option)
Definition: actorsprite.cpp:310
ActorSprite::logic
virtual void logic()
Definition: actorsprite.cpp:109
spritereference.h
tick_time
volatile int tick_time
Definition: timer.cpp:52
ActorSprite::setPoison
void setPoison(const bool b)
Definition: actorsprite.h:165
SpriteDisplay
Definition: spritedisplay.h:32
MILLISECONDS_IN_A_TICK
static const int MILLISECONDS_IN_A_TICK
Definition: timer.h:29
TargetCursorSize::LARGE
@ LARGE
Definition: targetcursorsize.h:31
config
Configuration config
Definition: configuration.cpp:51
SpriteDisplay::particles
StringVect particles
Definition: spritedisplay.h:47
StatusEffect::mIsCart
bool mIsCart
Definition: statuseffect.h:85
foreach.h
actorsprite.h
EmoteDB::size
int size()
Definition: emotedb.cpp:305
ActorSprite::setRiding
virtual void setRiding(const bool b)
Definition: actorsprite.h:177
AnimatedSprite::delayedLoad
static AnimatedSprite * delayedLoad(const std::string &filename, const int variant)
Definition: animatedsprite.cpp:88
LocalPlayer::getTarget
Being * getTarget() const
Definition: localplayer.cpp:561
Actor::setMap
virtual void setMap(Map *const map)
Definition: actor.cpp:47
particle.h
ActorSprite::setStatusEffect
void setStatusEffect(const int32_t index, const Enable active, const IsStart start)
Definition: actorsprite.cpp:197
TargetCursorTypeT
TargetCursorType ::T TargetCursorTypeT
Definition: targetcursortype.h:34
TargetCursorSize::MEDIUM
@ MEDIUM
Definition: targetcursorsize.h:30
applyEffectByOption
static void applyEffectByOption(ActorSprite *const actor, uint32_t option, const char *const name, const OptionsMap &options)
Definition: actorsprite.cpp:218
ActorSprite::mId
BeingId mId
Definition: actorsprite.h:246
configuration.h
StatusEffect::getStartParticle
Particle * getStartParticle() const
Definition: statuseffect.cpp:77
anonymous_namespace{itemlinkhandler.cpp}::listener
OpenUrlListener listener
Definition: itemlinkhandler.cpp:55
IsStart_false
const bool IsStart_false
Definition: isstart.h:29
Map
Definition: map.h:71
ActorSprite::setStatusEffectOpitons
void setStatusEffectOpitons(const uint32_t option, const uint32_t opt1, const uint32_t opt2, const uint32_t opt3)
Definition: actorsprite.cpp:283
Vector::y
float y
Definition: vector.h:208
ActorSprite::~ActorSprite
~ActorSprite()
Definition: actorsprite.cpp:87
ActorSprite::initTargetCursor
static void initTargetCursor()
Definition: actorsprite.cpp:493
BLOCK_START
#define BLOCK_START(name)
Definition: perfomance.h:78
AnimatedSprite
Definition: animatedsprite.h:35
BLOCK_END
#define BLOCK_END(name)
Definition: perfomance.h:79
StringVectCIter
StringVect::const_iterator StringVectCIter
Definition: stringvector.h:30
CAST_S32
#define CAST_S32
Definition: cast.h:29
ActorSprite::mActorSpriteListeners
ActorSpriteListeners mActorSpriteListeners
Definition: actorsprite.h:253
ActorSprite::mStatusParticleEffects
ParticleVector mStatusParticleEffects
Definition: actorsprite.h:243
ParticleVector::delLocally
void delLocally(const int index)
Definition: particlevector.cpp:52
CompoundSprite::clear
void clear()
Definition: compoundsprite.cpp:297
ActorSprite::setMap
void setMap(Map *const map)
Definition: actorsprite.cpp:138
OptionsMap
std::map< uint32_t, uint32_t > OptionsMap
Definition: statuseffectdb.h:34
StatusEffect::mIsPostDelay
bool mIsPostDelay
Definition: statuseffect.h:88
StatusEffectDB::getOpt3Map
const OptionsMap & getOpt3Map()
Definition: statuseffectdb.cpp:222
DisplayType::Item
@ Item
Definition: displaytype.h:28
LocalPlayer::setTarget
void setTarget(Being *const target)
Definition: localplayer.cpp:566
ActorSprite::getType
virtual ActorTypeT getType() const
Definition: actorsprite.h:72
ActorSprite::untarget
void untarget()
Definition: actorsprite.h:115
timer.h
combineDye2
std::string combineDye2(std::string file, const std::string &dye)
Definition: stringutils.cpp:537
Logger::log
void log(const char *const log_text,...)
Definition: logger.cpp:268
FOR_EACH
#define FOR_EACH(type, iter, array)
Definition: foreach.h:24
debug.h
StatusEffectDB::getOpt2Map
const OptionsMap & getOpt2Map()
Definition: statuseffectdb.cpp:217
Image::decRef
void decRef()
Definition: image.cpp:522
ActorSprite::controlParticleDeleted
void controlParticleDeleted(const Particle *const particle)
Definition: actorsprite.cpp:166
mapTileSize
static const int mapTileSize
Definition: map.h:26
Configuration::getBoolValue
bool getBoolValue(const std::string &key) const
Definition: configuration.cpp:596
Theme::resolveThemePath
static std::string resolveThemePath(const std::string &path)
Definition: theme.cpp:626
ActorSprite::targetCursor
static AnimatedSprite * targetCursor[static_cast< size_t >(TargetCursorType::NUM_TCT)][static_cast< size_t >(TargetCursorSize::NUM_TC)]
Definition: actorsprite.h:236
ActorSprite::unload
static void unload()
Definition: actorsprite.cpp:444