aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-06-24 02:12:39 +0530
committerEugene Sandulenko2019-09-03 17:16:58 +0200
commitd5778951b54c97406d31521ced24d506a1e363d4 (patch)
tree0deb2d947e9bc9f10f26625b30c1c2880d3fe906 /engines
parentb3b5ef0b562060975e5a8e71eb4b1b7e538347fe (diff)
downloadscummvm-rg350-d5778951b54c97406d31521ced24d506a1e363d4.tar.gz
scummvm-rg350-d5778951b54c97406d31521ced24d506a1e363d4.tar.bz2
scummvm-rg350-d5778951b54c97406d31521ced24d506a1e363d4.zip
HDB: Add cineMoveMaskedPic()
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-cinematic.cpp21
-rw-r--r--engines/hdb/ai.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index c7a484169f..cc66e08707 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -469,6 +469,27 @@ void AI::cineDialog(const char *title, const char *string, int seconds) {
_cine.push_back(cmd);
}
+void AI::cineMoveMaskedPic(const char *id, const char *pic, int x1, int y1, int x2, int y2, int speed) {
+ if (!pic || !id) {
+ warning("cineMoveMaskedPic: Missing ID or PIC");
+ return;
+ }
+
+ CineCommand *cmd = new CineCommand;
+ cmd->x = x1;
+ cmd->y = y1;
+ cmd->x2 = x2;
+ cmd->y2 = y2;
+ cmd->speed = speed;
+ cmd->xv = ((double)(x2-x1)) / (double)speed;
+ cmd->yv = ((double)(y2-y1)) / (double)speed;
+ cmd->start = 0;
+ strcpy(cmd->string, pic);
+ strcpy(cmd->id, id);
+ cmd->cmdType = C_MOVEMASKEDPIC;
+ _cine.push_back(cmd);
+}
+
void AI::cineUse(const char *entName) {
CineCommand *cmd = new CineCommand;
strcpy(cmd->string, entName);
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 17e4241c61..2e0a705c50 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -744,6 +744,7 @@ public:
void cineMoveEntity(const char *entName, int x, int y, int level, int speed);
void cineEntityFace(const char *luaName, double dir);
void cineDialog(const char *title, const char *string, int seconds);
+ void cineMoveMaskedPic(const char *id, const char *pic, int x1, int y1, int x2, int y2, int speed);
void cineUse(const char *entName);
void cineFadeIn(bool isBlack, int steps);
void cineFadeOut(bool isBlack, int steps);