From e1b5fca018fc00974d11098915740b8a0262d57d Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Mon, 24 Jun 2019 03:15:14 +0530 Subject: HDB: Add cineSetAnimFrame() --- engines/hdb/ai-cinematic.cpp | 9 +++++++++ engines/hdb/ai.h | 1 + 2 files changed, 10 insertions(+) (limited to 'engines') diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index 45b58b4910..ac2c785626 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -530,6 +530,15 @@ void AI::cineAnimEntity(const char *entName, AIState state, int loop) { _cine.push_back(cmd); } +void AI::cineSetAnimFrame(const char *entName, AIState state, int frame) { + CineCommand *cmd = new CineCommand; + cmd->start = state; + strcpy(cmd->title, entName); + cmd->end = frame; + cmd->cmdType = C_SETANIMFRAME; + _cine.push_back(cmd); +} + void AI::cineEntityFace(const char *luaName, double dir) { CineCommand *cmd = new CineCommand; strcpy(cmd->title, luaName); diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 6269697bfa..c2efd02b48 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -745,6 +745,7 @@ public: void cineSetEntity(const char *entName, int x, int y, int level); void cineMoveEntity(const char *entName, int x, int y, int level, int speed); void cineAnimEntity(const char *entName, AIState state, int loop); + void cineSetAnimFrame(const char *entName, AIState state, int frame); 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); -- cgit v1.2.3