diff options
-rw-r--r-- | engines/hdb/ai-cinematic.cpp | 23 | ||||
-rw-r--r-- | engines/hdb/ai.h | 2 |
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); |