diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-18 01:32:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-18 23:29:17 +0300 |
commit | cef2952156ab09371ed04beec00d0f1e8615ada9 (patch) | |
tree | b5347f9025bdeafaafe38f41f796c97b58ba2656 /src/being.h | |
parent | 67d3b8c193b51bbf892fd965547746511e8ddf87 (diff) | |
download | manaverse-cef2952156ab09371ed04beec00d0f1e8615ada9.tar.gz manaverse-cef2952156ab09371ed04beec00d0f1e8615ada9.tar.bz2 manaverse-cef2952156ab09371ed04beec00d0f1e8615ada9.tar.xz manaverse-cef2952156ab09371ed04beec00d0f1e8615ada9.zip |
add support for using sound delays.
hurt sounds now can be delayed for "delay" of hit sound.
Diffstat (limited to 'src/being.h')
-rw-r--r-- | src/being.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/being.h b/src/being.h index c1adbbbcb..8a07330f5 100644 --- a/src/being.h +++ b/src/being.h @@ -72,6 +72,22 @@ enum Gender }; +struct NextSoundInfo +{ + NextSoundInfo() : + sound(nullptr), + x(0), + y(0), + time(0) + { + } + + const SoundInfo *sound; + int x; + int y; + int time; +}; + class BeingEquipBackend final : public Equipment::Backend { public: @@ -878,12 +894,15 @@ class Being : public ActorSprite, public ConfigListener void setOwner(Being *const owner) { mOwner = owner; } - void playSfx(const SoundInfo &sound, const int x, const int y); + void playSfx(const SoundInfo &sound, Being *const being, + const bool main, const int x, const int y); static uint8_t genderToInt(const Gender sex) A_WARN_UNUSED; static Gender intToGender(uint8_t sex) A_WARN_UNUSED; + NextSoundInfo mNextSound; + protected: /** * Sets the new path for this being. |