summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actorsprite.cpp38
-rw-r--r--src/being/actorsprite.h11
2 files changed, 49 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(
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index 68964d04d..5c5f5a80d 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -120,6 +120,17 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
void setStatusEffect(const int index, const Enable active);
+ void setStatusEffectOpitons(const uint32_t option,
+ const uint32_t opt1,
+ const uint32_t opt2,
+ const uint32_t opt3);
+
+ void setStatusEffectOpitons(const uint32_t option,
+ const uint32_t opt1,
+ const uint32_t opt2);
+
+ void setStatusEffectOpiton0(const uint32_t option);
+
/**
* A status effect block is a 16 bit mask of status effects. We assign
* each such flag a block ID of offset + bitnr.