diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-29 03:12:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-29 03:12:26 +0300 |
commit | 448ff09baf47387c9cfb6919028b1d4bbe2c8f0b (patch) | |
tree | 35258d1b669dd6fa83d0a4d21792337c6f6c228d /src/being/being.cpp | |
parent | 9993fbc1d1bec556143d974f148869e1fb4c6307 (diff) | |
download | mv-448ff09baf47387c9cfb6919028b1d4bbe2c8f0b.tar.gz mv-448ff09baf47387c9cfb6919028b1d4bbe2c8f0b.tar.bz2 mv-448ff09baf47387c9cfb6919028b1d4bbe2c8f0b.tar.xz mv-448ff09baf47387c9cfb6919028b1d4bbe2c8f0b.zip |
Add some missing tmwa defines.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 285ed8ca0..d762dee24 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -328,8 +328,10 @@ Being::~Being() if (mOwner) { +#ifdef TMWA_SUPPORT if (mType == ActorType::LocalPet) mOwner->unassignPet(this); +#endif mOwner = nullptr; } @@ -441,6 +443,7 @@ void Being::setSubtype(const BeingTypeId subtype, if (mInfo) setupSpriteDisplay(mInfo->getDisplay(), ForceDisplay_false); break; +#ifdef TMWA_SUPPORT case ActorType::LocalPet: mInfo = PETDB::get(fromInt(mId, BeingTypeId)); if (mInfo) @@ -462,6 +465,7 @@ void Being::setSubtype(const BeingTypeId subtype, } } break; +#endif case ActorType::Player: { int id = -100 - toInt(subtype, int); @@ -2553,12 +2557,14 @@ void Being::setSpriteId(const unsigned int slot, int startTime = 0; AnimatedSprite *restrict equipmentSprite = nullptr; +#ifdef TMWA_SUPPORT if (mType == ActorType::Player) { const BeingId pet = fromInt(info.getPet(), BeingId); if (pet != BeingId_zero) addPet(pet); } +#endif if (!filename.empty()) { @@ -2685,12 +2691,14 @@ void Being::setSpriteColor(const unsigned int slot, int startTime = 0; AnimatedSprite *restrict equipmentSprite = nullptr; +#ifdef TMWA_SUPPORT if (mType == ActorType::Player) { const BeingId pet = fromInt(info.getPet(), BeingId); if (pet != BeingId_zero) addPet(pet); } +#endif if (!filename.empty()) { @@ -2781,12 +2789,14 @@ void Being::setSpriteColorId(const unsigned int slot, int startTime = 0; AnimatedSprite *restrict equipmentSprite = nullptr; +#ifdef TMWA_SUPPORT if (mType == ActorType::Player) { const BeingId pet = fromInt(info.getPet(), BeingId); if (pet != BeingId_zero) addPet(pet); } +#endif if (!filename.empty()) { @@ -2879,12 +2889,14 @@ void Being::setSpriteCards(const unsigned int slot, int startTime = 0; AnimatedSprite *restrict equipmentSprite = nullptr; +#ifdef TMWA_SUPPORT if (mType == ActorType::Player) { const BeingId pet = fromInt(info.getPet(), BeingId); if (pet != BeingId_zero) addPet(pet); } +#endif if (!cards.isEmpty()) colorId = ItemColorManager::getColorFromCards(cards); @@ -3618,7 +3630,9 @@ void Being::draw(Graphics *restrict const graphics, break; case ActorType::Npc: case ActorType::FloorItem: +#ifdef TMWA_SUPPORT case ActorType::LocalPet: +#endif case ActorType::Avatar: default: drawOther(graphics, @@ -4412,7 +4426,9 @@ std::string Being::loadComment(const std::string &restrict name, case ActorType::Monster: case ActorType::FloorItem: case ActorType::Portal: +#ifdef TMWA_SUPPORT case ActorType::LocalPet: +#endif case ActorType::Avatar: case ActorType::Mercenary: case ActorType::Homunculus: @@ -4449,7 +4465,9 @@ void Being::saveComment(const std::string &restrict name, case ActorType::Monster: case ActorType::FloorItem: case ActorType::Portal: +#ifdef TMWA_SUPPORT case ActorType::LocalPet: +#endif case ActorType::Avatar: case ActorType::Unknown: case ActorType::Pet: @@ -4655,6 +4673,7 @@ void Being::addEffect(const std::string &restrict name) restrict2 paths.getStringValue("sprites") + name); } +#ifdef TMWA_SUPPORT void Being::addPet(const BeingId id) restrict2 { if (!actorManager || !config.getBoolValue("usepets")) @@ -4679,6 +4698,7 @@ void Being::addPet(const BeingId id) restrict2 being->setTileCoords(dstX, dstY); } } +#endif Being *Being::findChildPet(const BeingId id) restrict2 { @@ -4728,6 +4748,7 @@ void Being::removeAllPets() restrict2 mPets.clear(); } +#ifdef TMWA_SUPPORT void Being::updatePets() restrict2 { removeAllPets(); @@ -4742,6 +4763,7 @@ void Being::updatePets() restrict2 addPet(pet); } } +#endif void Being::unassignPet(const Being *restrict const pet1) restrict2 { |