diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
commit | 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch) | |
tree | 6259593b8436178ad8d981a96a8fd71eab9e04cc /src/being/being.h | |
parent | 01773c71a4698c6f01fe70d864f922bda65506cb (diff) | |
download | manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2 manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip |
Add strong typed int type BeingId.
Diffstat (limited to 'src/being/being.h')
-rw-r--r-- | src/being/being.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/being/being.h b/src/being/being.h index 03a69b986..1b7db882a 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -105,7 +105,7 @@ class Being notfinal : public ActorSprite, * @param subtype partly determines the type of the being * @param map the map the being is on */ - Being(const int id, + Being(const BeingId id, const ActorType::Type type, const uint16_t subtype, Map *const map); @@ -571,7 +571,7 @@ class Being notfinal : public ActorSprite, static void reReadConfig(); - static BeingCacheEntry* getCacheEntry(const int id) A_WARN_UNUSED; + static BeingCacheEntry* getCacheEntry(const BeingId id) A_WARN_UNUSED; void addToCache() const; @@ -812,9 +812,9 @@ class Being notfinal : public ActorSprite, void addEffect(const std::string &name); - void addPet(const int id); + void addPet(const BeingId id); - void removePet(const int id); + void removePet(const BeingId id); void updatePets(); @@ -836,10 +836,12 @@ class Being notfinal : public ActorSprite, void removeAllPets(); - Being *findChildPet(const int id); + Being *findChildPet(const BeingId id); - void playSfx(const SoundInfo &sound, Being *const being, - const bool main, const int x, const int y) const; + void playSfx(const SoundInfo &sound, + Being *const being, + const bool main, + const int x, const int y) const; uint16_t getLook() const { return mLook; } |