aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-24 02:09:48 +0530
committerEugene Sandulenko2019-09-03 17:16:58 +0200
commit667641ed5740323b7b7edf48f724c87e98f45027 (patch)
treeb4d6ee1d72be091936bd1c4de5a33f44a2246622 /engines/hdb
parent7d4cc693b4df7e33f8afc5d068fc1afa79e27c0c (diff)
downloadscummvm-rg350-667641ed5740323b7b7edf48f724c87e98f45027.tar.gz
scummvm-rg350-667641ed5740323b7b7edf48f724c87e98f45027.tar.bz2
scummvm-rg350-667641ed5740323b7b7edf48f724c87e98f45027.zip
HDB: Add _cineBlitList functions
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/ai-cinematic.cpp30
-rw-r--r--engines/hdb/ai.h3
2 files changed, 33 insertions, 0 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index 0529fe92b6..4f30b9d7c6 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -288,6 +288,36 @@ void AI::processCines() {
}
}
+void AI::cineAddToBlitList(const char *id, Picture *pic, int x, int y, bool masked) {
+ _cineBlitList[_numCineBlitList] = new CineBlit;
+ _cineBlitList[_numCineBlitList]->id = id;
+ _cineBlitList[_numCineBlitList]->pic = pic;
+ _cineBlitList[_numCineBlitList]->x = x;
+ _cineBlitList[_numCineBlitList]->y = y;
+ _cineBlitList[_numCineBlitList]->masked = masked;
+ _numCineBlitList++;
+}
+
+Picture *AI::cineFindInBlitList(const char *name) {
+ for (int i = 0; i < _numCineBlitList;i++) {
+ if (Common::matchString(_cineBlitList[i]->id, name))
+ return _cineBlitList[i]->pic;
+ }
+ return NULL;
+}
+
+void AI::cineRemoveFromBlitList(const char *name) {
+ for (int i = 0; i < _numCineBlitList;i++) {
+ if (Common::matchString(_cineBlitList[i]->id, name))
+ delete _cineBlitList[i];
+ for (; i < _numCineBlitList - 1; i++)
+ _cineBlitList[i] = _cineBlitList[i + 1];
+ _numCineBlitList--;
+ _cineBlitList[_numCineBlitList] = NULL;
+ return;
+ }
+}
+
void AI::cineStart(bool abortable, const char *abortFunc) {
_cineAbortable = abortable;
_cineAborted = false;
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index ca3a3da3b4..f56cc62120 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -725,6 +725,9 @@ public:
return _cineActive;
}
void processCines();
+ void cineAddToBlitList(const char *id, Picture *pic, int x, int y, bool masked);
+ Picture *cineFindInBlitList(const char *name);
+ void cineRemoveFromBlitList(const char *name);
void cineStart(bool abortable, const char *abortFunc);
void cineLockPlayer();
void cineUnlockPlayer();