diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-cinematic.cpp | 21 | ||||
-rw-r--r-- | engines/hdb/ai.h | 1 |
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); |