ManaPlus
|
#include <actorsprite.h>
Public Member Functions | |
ActorSprite (const BeingId id) | |
~ActorSprite () | |
BeingId | getId () const |
void | setId (const BeingId id) |
virtual ActorTypeT | getType () const |
virtual void | logic () |
void | setMap (Map *const map) |
virtual BlockTypeT | getBlockType () const |
void | controlAutoParticle (Particle *const particle) |
void | controlCustomParticle (Particle *const particle) |
virtual TargetCursorSizeT | getTargetCursorSize () const |
virtual int | getTargetOffsetX () const |
virtual int | getTargetOffsetY () const |
void | setTargetType (const TargetCursorTypeT type) |
void | untarget () |
void | setStatusEffect (const int32_t index, const Enable active, const IsStart start) |
void | setStatusEffectOpitons (const uint32_t option, const uint32_t opt1, const uint32_t opt2, const uint32_t opt3) |
void | setStatusEffectOpitons (const uint32_t option, const uint32_t opt1, const uint32_t opt2) |
void | setStatusEffectOpiton0 (const uint32_t option) |
void | setAlpha (const float alpha) |
float | getAlpha () const |
int | getWidth () const |
int | getHeight () const |
void | addActorSpriteListener (ActorSpriteListener *const listener) |
void | removeActorSpriteListener (ActorSpriteListener *const listener) |
int | getActorX () const |
int | getActorY () const |
void | setPoison (const bool b) |
bool | getPoison () const |
void | setHaveCart (const bool b) |
bool | getHaveCart () const |
virtual void | setRiding (const bool b) |
virtual void | setTrickDead (const bool b) |
bool | isTrickDead () const |
const std::set< int32_t > & | getStatusEffects () const |
std::string | getStatusEffectsString () const |
virtual void | stopCast (const bool b) |
size_t | getParticlesCount () const |
void | controlParticleDeleted (const Particle *const particle) |
Public Member Functions inherited from CompoundSprite | |
CompoundSprite () | |
~CompoundSprite () | |
bool | reset () |
bool | play (const std::string &action) |
bool | update (const int time) |
void | drawSimple (Graphics *const graphics, const int posX, const int posY) const |
int | getWidth () const |
int | getHeight () const |
const Image * | getImage () const |
bool | setSpriteDirection (const SpriteDirection::Type direction) |
int | getNumberOfLayers () const |
unsigned int | getCurrentFrame () const |
unsigned int | getFrameCount () const |
void | addSprite (Sprite *const sprite) |
void | setSprite (const size_t layer, Sprite *const sprite) |
void | removeSprite (const int layer) |
void | clear () |
void | ensureSize (const size_t layerCount) |
void | drawSprites (Graphics *const graphics, const int posX, const int posY) const |
virtual void | drawSpritesSDL (Graphics *const graphics, const int posX, const int posY) const |
void | setAlpha (float alpha) |
bool | updateNumber (const unsigned num) |
int | getLastTime () const |
int | getStartTime () const |
Public Member Functions inherited from Sprite | |
virtual | ~Sprite () |
virtual void | draw (Graphics *const graphics, const int posX, const int posY) const =0 |
virtual const void * | getHash () const |
virtual const void * | getHash2 () const |
Public Member Functions inherited from Actor | |
virtual | ~Actor () |
virtual void | draw (Graphics *const graphics, const int offsetX, const int offsetY) const =0 |
const Vector & | getPixelPositionF () const |
virtual void | setPixelPositionF (const Vector &pos) |
int | getPixelX () const |
virtual int | getPixelY () const |
virtual int | getSortPixelY () const |
virtual int | getTileX () const |
virtual int | getTileY () const |
virtual int | getNumberOfLayers () const |
const Map * | getMap () const |
Static Public Member Functions | |
static void | load () |
static void | unload () |
Static Public Member Functions inherited from CompoundSprite | |
static void | setEnableDelay (bool b) |
Protected Types | |
typedef std::list< ActorSpriteListener * > | ActorSpriteListeners |
typedef ActorSpriteListeners::iterator | ActorSpriteListenerIterator |
Protected Types inherited from CompoundSprite | |
typedef std::list< CompoundItem * > | ImagesCache |
Protected Member Functions | |
virtual void | updateStatusEffect (const int32_t index, const Enable newStatus, const IsStart start) |
virtual void | handleStatusEffect (const StatusEffect *const effect, const int32_t effectId, const Enable newStatus, const IsStart start) |
void | setupSpriteDisplay (const SpriteDisplay &display, const ForceDisplay forceDisplay, const DisplayTypeT displayType, const std::string &color) |
Protected Member Functions inherited from CompoundSprite | |
void | redraw () const |
void | updateImages () const |
bool | updateFromCache () const |
void | initCurrentCacheItem () const |
Protected Member Functions inherited from Sprite | |
Sprite () | |
Protected Member Functions inherited from Actor | |
Actor () | |
Static Protected Member Functions | |
static void | initTargetCursor () |
static void | cleanupTargetCursors () |
Protected Attributes | |
std::set< int32_t > | mStatusEffects |
ParticleVector | mStatusParticleEffects |
ParticleList | mChildParticleEffects |
int | mHorseId |
BeingId | mId |
AnimatedSprite * | mUsedTargetCursor |
ActorSpriteListeners | mActorSpriteListeners |
int | mCursorPaddingX |
int | mCursorPaddingY |
bool | mMustResetParticles |
bool | mPoison |
bool | mHaveCart |
bool | mTrickDead |
Protected Attributes inherited from CompoundSprite | |
ImagesCache | imagesCache |
CompoundItem * | mCacheItem |
Image * | mImage |
Image * | mAlphaImage |
int | mOffsetX |
int | mOffsetY |
int | mStartTime |
int | mLastTime |
int | mNextRedrawTime |
bool | mNeedsRedraw |
bool | mEnableAlphaFix |
bool | mDisableAdvBeingCaching |
bool | mDisableBeingCaching |
Protected Attributes inherited from Sprite | |
float | mAlpha |
Protected Attributes inherited from Actor | |
Map * | mMap |
Vector | mPos |
int | mYDiff |
Static Protected Attributes | |
static AnimatedSprite * | targetCursor [static_cast< size_t >(TargetCursorType::NUM_TCT)][static_cast< size_t >(TargetCursorSize::NUM_TC)] |
static bool | loaded = false |
Static Protected Attributes inherited from CompoundSprite | |
static bool | mEnableDelay = true |
Additional Inherited Members | |
Public Types inherited from CompoundSprite | |
typedef std::vector< Sprite * >::iterator | SpriteIterator |
typedef std::vector< Sprite * >::const_iterator | SpriteConstIterator |
Data Fields inherited from CompoundSprite | |
std::vector< Sprite * > | mSprites |
Data Fields inherited from Actor | |
int | mPixelX |
int | mPixelY |
Definition at line 55 of file actorsprite.h.
|
protected |
Definition at line 253 of file actorsprite.h.
|
protected |
Definition at line 252 of file actorsprite.h.
|
explicit |
Definition at line 69 of file actorsprite.cpp.
ActorSprite::~ActorSprite | ( | ) |
Definition at line 88 of file actorsprite.cpp.
References ParticleContainer::clear(), FOR_EACH, LocalPlayer::getTarget(), localPlayer, mActorSpriteListeners, mChildParticleEffects, mMustResetParticles, mUsedTargetCursor, reportFalse, and LocalPlayer::setTarget().
void ActorSprite::addActorSpriteListener | ( | ActorSpriteListener *const | listener | ) |
Add an ActorSprite listener.
Definition at line 454 of file actorsprite.cpp.
References anonymous_namespace{itemlinkhandler.cpp}::listener, and mActorSpriteListeners.
Referenced by LocalPlayer::pickUp().
|
staticprotected |
Remove the target cursors from memory
Definition at line 511 of file actorsprite.cpp.
References delete2, end_foreach, for_each_cursors, EmoteDB::size(), and targetCursor.
Referenced by unload().
void ActorSprite::controlAutoParticle | ( | Particle *const | particle | ) |
Take control of a particle. Particle can be auto deleted.
Definition at line 148 of file actorsprite.cpp.
References ParticleList::addLocally(), mChildParticleEffects, mId, and Particle::setActor().
Referenced by setupSpriteDisplay(), and EffectManager::trigger().
void ActorSprite::controlCustomParticle | ( | Particle *const | particle | ) |
Take control of a particle. Owner must remove particle by self.
Definition at line 157 of file actorsprite.cpp.
References ParticleList::addLocally(), Particle::disableAutoDelete(), and mChildParticleEffects.
Referenced by Being::recreateItemParticles(), LocalPlayer::setTestParticle(), and EffectManager::triggerReturn().
void ActorSprite::controlParticleDeleted | ( | const Particle *const | particle | ) |
Definition at line 167 of file actorsprite.cpp.
References mChildParticleEffects, and ParticleList::removeLocally().
Referenced by Particle::~Particle().
|
inline |
Definition at line 160 of file actorsprite.h.
References Actor::getPixelX(), and mapTileSize.
Referenced by FloorItem::draw().
|
inline |
Definition at line 163 of file actorsprite.h.
References Actor::getPixelY(), and mapTileSize.
Referenced by FloorItem::draw().
|
inlinevirtual |
Returns the current alpha value used to draw the actor.
Implements Actor.
Definition at line 137 of file actorsprite.h.
References Sprite::getAlpha().
|
inlinevirtual |
Gets the way the object blocks pathfinding for other objects
Reimplemented in Being.
Definition at line 83 of file actorsprite.h.
References BlockType::NONE.
|
inline |
Definition at line 175 of file actorsprite.h.
References mHaveCart.
Referenced by ShopWindow::updateButtonsAndLabels().
|
inlinevirtual |
Returns the vertical size of the actors graphical representation in pixels or 0 when it is undefined.
Reimplemented from Actor.
Reimplemented in Being.
Definition at line 143 of file actorsprite.h.
References CompoundSprite::getHeight().
|
inline |
Definition at line 64 of file actorsprite.h.
References mId.
Referenced by CharSelectDialog::action(), Being::addToCache(), EAthena::FamilyHandler::askForChild(), LocalPlayer::attack(), Being::botLogic(), EAthena::NpcHandler::buy(), TmwAthena::NpcHandler::buy(), EAthena::VendingHandler::buy(), EAthena::VendingHandler::buy2(), EAthena::VendingHandler::buyItems(), EAthena::PetHandler::catchPet(), EAthena::PartyHandler::changeLeader(), ActorManager::clear(), ActorManager::cloneBeing(), EAthena::GameHandler::connect(), TmwAthena::GameHandler::connect(), ActorManager::createBeing(), ActorManager::createItem(), EAthena::CharServerHandler::deleteCharacter(), TmwAthena::CharServerHandler::deleteCharacter(), ActorManager::erase(), ActorManager::findActor(), ActorManager::findBeing(), ActorManager::findItem(), PopupMenu::handleLink(), EAthena::GuildHandler::invite(), EAthena::PartyHandler::invite(), TmwAthena::PartyHandler::invite(), TmwAthena::PartyHandler::inviteResponse(), EAthena::PartyHandler::kick(), TmwAthena::PartyHandler::kick(), EAthena::GuildHandler::leave(), ActorManager::logic(), TargetDebugTab::logic(), EAthena::AdminHandler::mute(), EAthena::BuyingStoreHandler::open(), EAthena::VendingHandler::open(), FindBeingEqualFunctor::operator()(), SpellManager::parseCommand(), EAthena::PlayerHandler::pickUp(), TmwAthena::PlayerHandler::pickUp(), LocalPlayer::pingRequest(), ActorManager::printBeingsToChat(), EAthena::BeingRecv::processBeingChangeLookCards(), TmwAthena::BeingRecv::processBeingMove(), TmwAthena::BeingRecv::processBeingVisible(), EAthena::BuyingStoreRecv::processBuyingStoreItemsList(), EAthena::ChatRecv::processChatRoomCreateAck(), EAthena::MercenaryRecv::processMercenaryInfo(), Ea::BeingRecv::processNameResponse(), EAthena::BeingRecv::processNameResponse2(), EAthena::BeingRecv::processNameResponseTitle(), Ea::PartyRecv::processPartyLeave(), EAthena::PlayerRecv::processPlayerGetExp(), EAthena::PlayerRecv::processPlayerGetExp2(), EAthena::BeingRecv::processPlayerGuilPartyInfo(), EAthena::BeingRecv::processPlayerGuilPartyInfo2(), EAthena::PlayerRecv::processPlayerHeal(), EAthena::TradeHandler::request(), TmwAthena::TradeHandler::request(), EAthena::GuildHandler::requestAlliance(), EAthena::AdminHandler::requestLogin(), EAthena::GuildHandler::requestOpposition(), EAthena::BuyingStoreHandler::sell(), CharSelectDialog::setName(), PlayerInfo::setPetBeing(), ActorManager::setPlayer(), EAthena::PlayerHandler::setStat(), TmwAthena::PlayerHandler::setStat(), BeingPopup::show(), PopupMenu::showChatPopup(), PopupMenu::showPopup(), PopupMenu::showUndressPopup(), EAthena::NpcHandler::talk(), TmwAthena::NpcHandler::talk(), EAthena::AdminHandler::unequipAll(), Being::updateFromCache(), SkillDialog::useSkillDefault(), SkillDialog::useSkillPosition(), SkillDialog::useSkillTarget(), and EAthena::BeingHandler::viewPlayerEquipment().
|
inline |
Definition at line 195 of file actorsprite.h.
References mChildParticleEffects, mStatusParticleEffects, ParticleList::size(), and ParticleVector::usedSize().
Referenced by BeingPopup::show().
|
inline |
Definition at line 169 of file actorsprite.h.
References mPoison.
Referenced by SocialPlayersTab::updateAvatar().
|
inline |
std::string ActorSprite::getStatusEffectsString | ( | ) | const |
Definition at line 520 of file actorsprite.cpp.
References Enable_true, FOR_EACH, StatusEffectDB::getStatusEffect(), StatusEffect::mName, and mStatusEffects.
Referenced by TargetDebugTab::logic(), and BeingPopup::show().
|
inlinevirtual |
Returns the required size of a target cursor for this being.
Reimplemented in Being.
Definition at line 99 of file actorsprite.h.
References TargetCursorSize::MEDIUM.
Referenced by setTargetType().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Returns the type of the ActorSprite.
Reimplemented in FloorItem, and Being.
Definition at line 73 of file actorsprite.h.
References ActorType::Unknown.
Referenced by ActorManager::findBeing(), ActorManager::findBeingsByPixel(), ActorManager::findItem(), ActorManager::logic(), ActorManager::removeRoom(), PopupMenu::showPopup(), ActorManager::updateBadges(), ActorManager::updateRoom(), and updateStatusEffect().
|
inlinevirtual |
Returns the horizontal size of the actors graphical representation in pixels or 0 when it is undefined.
Reimplemented from Actor.
Reimplemented in Being.
Definition at line 140 of file actorsprite.h.
References CompoundSprite::getWidth().
|
protectedvirtual |
Handle an update to a status or stun effect
The | StatusEffect to effect |
effectId | -1 for stun, otherwise the effect index |
Reimplemented in LocalPlayer.
Definition at line 338 of file actorsprite.cpp.
References ParticleVector::delLocally(), Enable_true, StatusEffect::getParticle(), StatusEffect::getStartParticle(), IsStart_true, mStatusParticleEffects, ParticleVector::setLocally(), and anonymous_namespace{stringutils.cpp}::start.
Referenced by LocalPlayer::handleStatusEffect(), and updateStatusEffect().
|
staticprotected |
Load the target cursors into memory
Definition at line 494 of file actorsprite.cpp.
References cursorSize(), cursorType(), end_foreach, for_each_cursors, AnimatedSprite::load(), Theme::resolveThemePath(), EmoteDB::size(), strprintf(), and targetCursor.
Referenced by load().
|
inline |
Definition at line 184 of file actorsprite.h.
References mTrickDead.
Referenced by InputManager::updateConditionMask().
|
static |
Definition at line 435 of file actorsprite.cpp.
References initTargetCursor(), loaded, and unload().
Referenced by Client::loadData(), and DbManager::loadDb().
|
virtual |
Reimplemented in LocalPlayer, and Being.
Definition at line 110 of file actorsprite.cpp.
References BLOCK_END, BLOCK_START, Enable_true, FOR_EACH, StatusEffectDB::getStatusEffect(), IsStart_false, mChildParticleEffects, MILLISECONDS_IN_A_TICK, StatusEffect::mIsPersistent, mMustResetParticles, ParticleList::moveTo(), Actor::mPos, mStatusEffects, tick_time, CompoundSprite::update(), updateStatusEffect(), Vector::x, and Vector::y.
Referenced by Being::logic().
void ActorSprite::removeActorSpriteListener | ( | ActorSpriteListener *const | listener | ) |
Remove an ActorSprite listener.
Definition at line 459 of file actorsprite.cpp.
References anonymous_namespace{itemlinkhandler.cpp}::listener, and mActorSpriteListeners.
|
inlinevirtual |
Sets the alpha value used to draw the actor.
Implements Actor.
Definition at line 134 of file actorsprite.h.
References CompoundSprite::setAlpha().
|
inline |
Definition at line 172 of file actorsprite.h.
References mHaveCart.
Referenced by updateStatusEffect().
|
inline |
Definition at line 67 of file actorsprite.h.
References mId.
Referenced by EAthena::GameHandler::connect(), and TmwAthena::GameHandler::connect().
|
virtual |
Reimplemented from Actor.
Reimplemented in LocalPlayer, and Being.
Definition at line 139 of file actorsprite.cpp.
References ParticleContainer::clear(), mChildParticleEffects, mMustResetParticles, and Actor::setMap().
Referenced by FloorItem::postInit(), and Being::setMap().
|
inline |
Definition at line 166 of file actorsprite.h.
References mPoison.
Referenced by updateStatusEffect().
|
inlinevirtual |
Reimplemented in Being.
Definition at line 178 of file actorsprite.h.
References mHorseId.
Referenced by updateStatusEffect().
Definition at line 198 of file actorsprite.cpp.
References Enable_true, fromBool, mStatusEffects, anonymous_namespace{stringutils.cpp}::start, and updateStatusEffect().
Referenced by applyEffectByOption(), applyEffectByOption1(), EAthena::BeingRecv::processBeingStatusChange(), and TmwAthena::BeingRecv::processBeingStatusChange().
void ActorSprite::setStatusEffectOpiton0 | ( | const uint32_t | option | ) |
Definition at line 311 of file actorsprite.cpp.
References applyEffectByOption(), and StatusEffectDB::getOptionMap().
Referenced by EAthena::BeingRecv::processPlayerStatusChange2().
void ActorSprite::setStatusEffectOpitons | ( | const uint32_t | option, |
const uint32_t | opt1, | ||
const uint32_t | opt2 | ||
) |
Definition at line 299 of file actorsprite.cpp.
References applyEffectByOption(), applyEffectByOption1(), StatusEffectDB::getOpt1Map(), StatusEffectDB::getOpt2Map(), and StatusEffectDB::getOptionMap().
void ActorSprite::setStatusEffectOpitons | ( | const uint32_t | option, |
const uint32_t | opt1, | ||
const uint32_t | opt2, | ||
const uint32_t | opt3 | ||
) |
Definition at line 284 of file actorsprite.cpp.
References applyEffectByOption(), applyEffectByOption1(), StatusEffectDB::getOpt1Map(), StatusEffectDB::getOpt2Map(), StatusEffectDB::getOpt3Map(), and StatusEffectDB::getOptionMap().
Referenced by EAthena::BeingRecv::processBeingMove(), TmwAthena::BeingRecv::processBeingMove(), EAthena::BeingRecv::processBeingSpawn(), EAthena::BeingRecv::processBeingVisible(), TmwAthena::BeingRecv::processBeingVisible(), TmwAthena::BeingRecv::processPlayerMove(), EAthena::BeingRecv::processPlayerStatusChange(), TmwAthena::BeingRecv::processPlayerStatusChange(), TmwAthena::BeingRecv::processPlayerUpdate1(), and TmwAthena::BeingRecv::processPlayerUpdate2().
void ActorSprite::setTargetType | ( | const TargetCursorTypeT | type | ) |
Sets the target animation for this actor.
Definition at line 173 of file actorsprite.cpp.
References CAST_S32, CAST_SIZE, getTargetCursorSize(), mapTileSize, mCursorPaddingX, mCursorPaddingY, mUsedTargetCursor, TargetCursorType::NONE, TargetCursorSize::NUM_TC, targetCursor, and untarget().
Referenced by LocalPlayer::logic().
|
inlinevirtual |
Reimplemented in Being.
Definition at line 181 of file actorsprite.h.
References mTrickDead.
Referenced by updateStatusEffect().
|
protected |
Definition at line 365 of file actorsprite.cpp.
References ParticleEngine::addEffect(), CompoundSprite::addSprite(), CompoundSprite::clear(), ParticleContainer::clear(), combineDye2(), combineDye3(), controlAutoParticle(), AnimatedSprite::delayedLoad(), ParticleEngine::enabled, DisplayType::Floor, SpriteDisplay::floor, FOR_EACH, ForceDisplay_true, Loader::getImage(), Theme::getImageFromTheme(), Configuration::getStringValue(), SpriteDisplay::image, DisplayType::Item, mChildParticleEffects, mMustResetParticles, CompoundSprite::mSprites, particleEngine, SpriteDisplay::particles, pathJoin(), paths, and SpriteDisplay::sprites.
Referenced by FloorItem::postInit().
|
inlinevirtual |
Reimplemented in Being.
Definition at line 192 of file actorsprite.h.
Referenced by updateStatusEffect().
|
static |
Definition at line 445 of file actorsprite.cpp.
References cleanupTargetCursors(), loaded, and reportTrue.
Referenced by load().
|
inline |
Untargets the actor.
Definition at line 116 of file actorsprite.h.
References mUsedTargetCursor.
Referenced by LocalPlayer::setTarget(), and setTargetType().
|
protectedvirtual |
Notify self that a status effect has flipped. The new flag is passed.
Definition at line 317 of file actorsprite.cpp.
References Enable_true, StatusEffectDB::getStatusEffect(), getType(), handleStatusEffect(), localPlayer, StatusEffect::mIsCart, StatusEffect::mIsPoison, StatusEffect::mIsPostDelay, StatusEffect::mIsRiding, StatusEffect::mIsTrickDead, ActorType::Player, setHaveCart(), setPoison(), setRiding(), setTrickDead(), anonymous_namespace{stringutils.cpp}::start, and stopCast().
Referenced by logic(), and setStatusEffect().
|
staticprotected |
set of active status effects
Definition at line 239 of file actorsprite.h.
|
protected |
Definition at line 254 of file actorsprite.h.
Referenced by addActorSpriteListener(), removeActorSpriteListener(), and ~ActorSprite().
|
protected |
Definition at line 245 of file actorsprite.h.
Referenced by controlAutoParticle(), controlCustomParticle(), controlParticleDeleted(), getParticlesCount(), logic(), Being::recreateItemParticles(), Being::removeSpecialEffect(), setMap(), LocalPlayer::setTestParticle(), setupSpriteDisplay(), and ~ActorSprite().
|
protected |
Definition at line 256 of file actorsprite.h.
Referenced by Being::drawBeingCursor(), and setTargetType().
|
protected |
Definition at line 257 of file actorsprite.h.
Referenced by Being::drawBeingCursor(), and setTargetType().
|
protected |
Definition at line 262 of file actorsprite.h.
Referenced by getHaveCart(), and setHaveCart().
|
protected |
Definition at line 246 of file actorsprite.h.
Referenced by Being::getMoveAction(), Being::getSitAction(), and setRiding().
|
protected |
Definition at line 247 of file actorsprite.h.
Referenced by Being::clearGuilds(), controlAutoParticle(), getId(), setId(), and Being::talkTo().
|
protected |
Reset particle status effects on next redraw?
Definition at line 260 of file actorsprite.h.
Referenced by logic(), setMap(), setupSpriteDisplay(), and ~ActorSprite().
|
protected |
Definition at line 261 of file actorsprite.h.
Referenced by getPoison(), and setPoison().
|
protected |
Definition at line 242 of file actorsprite.h.
Referenced by getStatusEffects(), getStatusEffectsString(), logic(), and setStatusEffect().
|
protected |
Definition at line 244 of file actorsprite.h.
Referenced by getParticlesCount(), and handleStatusEffect().
|
protected |
Definition at line 263 of file actorsprite.h.
Referenced by isTrickDead(), Being::serverRemove(), and setTrickDead().
|
protected |
Target cursor being used
Definition at line 250 of file actorsprite.h.
Referenced by Being::drawBeingCursor(), setTargetType(), untarget(), and ~ActorSprite().
|
staticprotected |
Animated target cursors.
Definition at line 235 of file actorsprite.h.
Referenced by cleanupTargetCursors(), initTargetCursor(), and setTargetType().