summaryrefslogtreecommitdiff
path: root/src/being/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-21 15:07:40 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-21 15:07:40 +0300
commit8581934ba2f8ae80073cfabd08834df39a9c16bd (patch)
tree6708fcb485569707c2529346dac97a797fd21fee /src/being/actorsprite.cpp
parent98486abc3255f65f6d21df3359e0cf07992fbfc1 (diff)
downloadplus-8581934ba2f8ae80073cfabd08834df39a9c16bd.tar.gz
plus-8581934ba2f8ae80073cfabd08834df39a9c16bd.tar.bz2
plus-8581934ba2f8ae80073cfabd08834df39a9c16bd.tar.xz
plus-8581934ba2f8ae80073cfabd08834df39a9c16bd.zip
Move status effects start/end calls into separate functions in actorsprite.
Diffstat (limited to 'src/being/actorsprite.cpp')
-rw-r--r--src/being/actorsprite.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index e73397145..f444bdd71 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -212,6 +212,44 @@ void ActorSprite::setStatusEffectBlock(const int offset,
}
}
+void ActorSprite::setStatusEffectOpitons(const uint32_t option,
+ const uint32_t opt1,
+ const uint32_t opt2,
+ const uint32_t opt3)
+{
+ uint32_t statusEffects = opt2;
+ statusEffects |= option << 16;
+
+ setStunMode(opt1);
+ setStatusEffectBlock(0,
+ CAST_U16((statusEffects >> 16) & 0xffffU));
+ setStatusEffectBlock(16,
+ CAST_U16(statusEffects & 0xffffU));
+ setStatusEffectBlock(32,
+ opt3);
+}
+
+void ActorSprite::setStatusEffectOpitons(const uint32_t option,
+ const uint32_t opt1,
+ const uint32_t opt2)
+{
+ uint32_t statusEffects = opt2;
+ statusEffects |= option << 16;
+
+ setStunMode(opt1);
+ setStatusEffectBlock(0,
+ CAST_U16((statusEffects >> 16) & 0xffffU));
+ setStatusEffectBlock(16,
+ CAST_U16(statusEffects & 0xffffU));
+}
+
+void ActorSprite::setStatusEffectOpiton0(const uint32_t option)
+{
+ const uint32_t statusEffects = option << 16;
+ setStatusEffectBlock(0,
+ CAST_U16((statusEffects >> 16) & 0xffff));
+}
+
void ActorSprite::updateStunMode(const int oldMode, const int newMode)
{
handleStatusEffect(StatusEffect::getStatusEffect(