summaryrefslogtreecommitdiff
path: root/src/being/being.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
commit0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch)
tree6259593b8436178ad8d981a96a8fd71eab9e04cc /src/being/being.h
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/being/being.h')
-rw-r--r--src/being/being.h16
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; }