aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-06-24 02:11:11 +0530
committerEugene Sandulenko2019-09-03 17:16:58 +0200
commitb3b5ef0b562060975e5a8e71eb4b1b7e538347fe (patch)
tree157d7603bdc066fe892f27f109d62717fed4aee1 /engines
parentd41983e83726ed2e5fd1dc1a683909777e27e113 (diff)
downloadscummvm-rg350-b3b5ef0b562060975e5a8e71eb4b1b7e538347fe.tar.gz
scummvm-rg350-b3b5ef0b562060975e5a8e71eb4b1b7e538347fe.tar.bz2
scummvm-rg350-b3b5ef0b562060975e5a8e71eb4b1b7e538347fe.zip
HDB: Add cineAbort() and cineCleanUp()
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-cinematic.cpp30
-rw-r--r--engines/hdb/ai.h2
2 files changed, 32 insertions, 0 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index 053ba3c492..c7a484169f 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -288,6 +288,36 @@ void AI::processCines() {
}
}
+void AI::cineCleanup() {
+ cineFreeGfx();
+ _cineActive = false;
+ // If aborted and abort function specified, call it
+ if (_cineAborted && _cineAbortFunc)
+ g_hdb->_lua->callFunction(_cineAbortFunc, 0);
+
+ _cameraLock = false;
+ _playerLock = false;
+ g_hdb->_window->setInfobarDark(0);
+ warning("STUB: DrawMan:: Set Pointer State");
+
+ int px, py;
+ getPlayerXY(&px, &py);
+ g_hdb->_map->centerMapXY(px + 16, py + 16);
+}
+
+void AI::cineAbort() {
+ for (Common::Array<CineCommand *>::iterator it = _cine.begin(); it != _cine.end(); it++) {
+ if ((*it)->cmdType == C_STARTMAP || (*it)->cmdType == C_STOPCINE)
+ _cine[0] = *it;
+ if (it != _cine.begin())
+ _cine.erase(it);
+ }
+ warning("STUB: Window: closeAll() required");
+ if (_player)
+ stopEntity(_player);
+ _cineAborted = true;
+}
+
void AI::cineAddToBlitList(const char *id, Picture *pic, int x, int y, bool masked) {
_cineBlitList[_numCineBlitList] = new CineBlit;
_cineBlitList[_numCineBlitList]->id = id;
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 072199d319..17e4241c61 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -725,6 +725,8 @@ public:
return _cineActive;
}
void processCines();
+ void cineCleanup();
+ void cineAbort();
void cineAddToBlitList(const char *id, Picture *pic, int x, int y, bool masked);
Picture *cineFindInBlitList(const char *name);
void cineRemoveFromBlitList(const char *name);