aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-06 02:12:27 +0530
committerEugene Sandulenko2019-09-03 17:17:13 +0200
commit9b48e15b8eb1d1e140e46af377ee5d874dc3ad81 (patch)
tree91d74346cd51d9932c23521c18c229eef343642c
parentf6a3eac4972bd64c4e2c81c801a4924d892aeddd (diff)
downloadscummvm-rg350-9b48e15b8eb1d1e140e46af377ee5d874dc3ad81.tar.gz
scummvm-rg350-9b48e15b8eb1d1e140e46af377ee5d874dc3ad81.tar.bz2
scummvm-rg350-9b48e15b8eb1d1e140e46af377ee5d874dc3ad81.zip
HDB: Add cinePlayVoice() and cinePlaySound()
-rw-r--r--engines/hdb/ai-cinematic.cpp23
-rw-r--r--engines/hdb/ai.h2
2 files changed, 25 insertions, 0 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index 8f42a59374..e5062a821a 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -348,6 +348,14 @@ void AI::processCines() {
}
complete = true;
break;
+ case C_PLAYSOUND:
+ g_hdb->_sound->playSound((int)_cine[i]->start);
+ complete = true;
+ break;
+ case C_PLAYVOICE:
+ g_hdb->_sound->playVoice((int)_cine[i]->x, (int)_cine[i]->y);
+ complete = true;
+ break;
case C_FADEIN:
if (!_cine[i]->start) {
g_hdb->_gfx->setFade(true, (bool)_cine[i]->end, _cine[i]->speed);
@@ -695,6 +703,21 @@ void AI::cineUse(const char *entName) {
_cine.push_back(cmd);
}
+void AI::cinePlaySound(int index) {
+ CineCommand *cmd = new CineCommand;
+ cmd->start = index;
+ cmd->cmdType = C_PLAYSOUND;
+ _cine.push_back(cmd);
+}
+
+void AI::cinePlayVoice(int index, int actor) {
+ CineCommand *cmd = new CineCommand;
+ cmd->x = index;
+ cmd->y = actor;
+ cmd->cmdType = C_PLAYVOICE;
+ _cine.push_back(cmd);
+}
+
void AI::cineFadeIn(bool isBlack, int steps) {
CineCommand *cmd = new CineCommand;
cmd->speed = steps;
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index be7a530efe..02a928831a 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -970,6 +970,8 @@ public:
void cineCenterTextOut(const char *text, int y, int timer);
void cineMoveMaskedPic(const char *id, const char *pic, int x1, int y1, int x2, int y2, int speed);
void cineUse(const char *entName);
+ void cinePlaySound(int index);
+ void cinePlayVoice(int index, int actor);
void cineFadeIn(bool isBlack, int steps);
void cineFadeOut(bool isBlack, int steps);
void cineClearForeground(int x, int y);