aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/engine
diff options
context:
space:
mode:
authorathrxx2019-02-27 22:34:47 +0100
committerathrxx2019-03-06 20:48:27 +0100
commit1cb85808318cc560a045068b48d981d1695ed4bc (patch)
tree9755740e10c0fa2bd30542e9ae12d288014fbce9 /engines/kyra/engine
parentea6f44871ba00da50b26e64d36b301dc48b1a2b7 (diff)
downloadscummvm-rg350-1cb85808318cc560a045068b48d981d1695ed4bc.tar.gz
scummvm-rg350-1cb85808318cc560a045068b48d981d1695ed4bc.tar.bz2
scummvm-rg350-1cb85808318cc560a045068b48d981d1695ed4bc.zip
KYRA: (EOB1/Amiga) - fix spell sounds
Diffstat (limited to 'engines/kyra/engine')
-rw-r--r--engines/kyra/engine/darkmoon.cpp4
-rw-r--r--engines/kyra/engine/darkmoon.h3
-rw-r--r--engines/kyra/engine/eob.cpp1
-rw-r--r--engines/kyra/engine/eobcommon.h2
-rw-r--r--engines/kyra/engine/magic_eob.cpp4
5 files changed, 12 insertions, 2 deletions
diff --git a/engines/kyra/engine/darkmoon.cpp b/engines/kyra/engine/darkmoon.cpp
index d8cb1254d5..617cd09252 100644
--- a/engines/kyra/engine/darkmoon.cpp
+++ b/engines/kyra/engine/darkmoon.cpp
@@ -358,6 +358,10 @@ void DarkMoonEngine::drawDoorIntern(int type, int, int x, int y, int w, int wall
drawBlockObject(0, 2, _doorSwitches[shapeIndex].shp, _doorSwitches[shapeIndex].x + w, _doorSwitches[shapeIndex].y, 5);
}
+void DarkMoonEngine::turnUndeadAutoHit() {
+ snd_playSoundEffect(95);
+}
+
void DarkMoonEngine::restParty_npc() {
int insalId = -1;
int numChar = 0;
diff --git a/engines/kyra/engine/darkmoon.h b/engines/kyra/engine/darkmoon.h
index ab8d93f4f2..16fe8561c5 100644
--- a/engines/kyra/engine/darkmoon.h
+++ b/engines/kyra/engine/darkmoon.h
@@ -104,6 +104,9 @@ private:
const uint8 *_dscDoorType5Offs;
+ // Magic
+ void turnUndeadAutoHit();
+
// Fight
static const uint8 _monsterAcHitChanceTbl1[];
static const uint8 _monsterAcHitChanceTbl2[];
diff --git a/engines/kyra/engine/eob.cpp b/engines/kyra/engine/eob.cpp
index 8c59d4de0c..f2d06e0a59 100644
--- a/engines/kyra/engine/eob.cpp
+++ b/engines/kyra/engine/eob.cpp
@@ -509,6 +509,7 @@ void EoBEngine::turnUndeadAuto() {
void EoBEngine::turnUndeadAutoHit() {
_txt->printMessage(_turnUndeadString[0], -1, _characters[_openBookChar].name);
+ snd_playSoundEffect(_flags.platform == Common::kPlatformAmiga ? 16 : 95);
sparkEffectOffensive();
}
diff --git a/engines/kyra/engine/eobcommon.h b/engines/kyra/engine/eobcommon.h
index b9785ac1bf..293878cd52 100644
--- a/engines/kyra/engine/eobcommon.h
+++ b/engines/kyra/engine/eobcommon.h
@@ -942,7 +942,7 @@ protected:
void useWand(int charIndex, int weaponSlot);
virtual void turnUndeadAuto() {}
- virtual void turnUndeadAutoHit() {}
+ virtual void turnUndeadAutoHit() = 0;
void castSpell(int spell, int weaponSlot);
void removeCharacterEffect(int spell, int charIndex, int showWarning);
diff --git a/engines/kyra/engine/magic_eob.cpp b/engines/kyra/engine/magic_eob.cpp
index 814e92d1f4..448f7f0db1 100644
--- a/engines/kyra/engine/magic_eob.cpp
+++ b/engines/kyra/engine/magic_eob.cpp
@@ -385,6 +385,9 @@ void EoBCoreEngine::sparkEffectDefensive(int charIndex) {
first = 0;
last = 5;
}
+
+ if (_flags.gameID == GI_EOB1 && _flags.platform == Common::kPlatformAmiga)
+ snd_playSoundEffect(104);
for (int i = 0; i < 8; i++) {
for (int ii = first; ii <= last; ii++) {
@@ -1282,7 +1285,6 @@ void EoBCoreEngine::spellCallback_start_turnUndead() {
if (hit) {
turnUndeadAutoHit();
- snd_playSoundEffect(95);
updateAllMonsterShapes();
}