diff options
-rw-r--r-- | engines/hdb/ai-cinematic.cpp | 19 | ||||
-rw-r--r-- | engines/hdb/ai.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index cc66e08707..8251abc9be 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -220,6 +220,25 @@ void AI::processCines() { complete = true; } break; + case C_MOVEMASKEDPIC: + if (!_cine[i]->start) { + Picture *pic = cineFindInBlitList(_cine[i]->id); + if (!pic) { + pic = g_hdb->_drawMan->loadPic(_cine[i]->string); + cineAddToFreeList(pic); + } else + cineRemoveFromBlitList(_cine[i]->id); + _cine[i]->pic = pic; + _cine[i]->start = 1; + } + + cineRemoveFromBlitList(_cine[i]->id); + _cine[i]->x += _cine[i]->xv; + _cine[i]->y += _cine[i]->yv; + cineAddToBlitList(_cine[i]->id, _cine[i]->pic, (int)_cine[i]->x, (int)_cine[i]->y, true); + if (abs((int)(_cine[i]->x - _cine[i]->x2)) <= 1 && abs((int)(_cine[i]->y - _cine[i]->y2)) <= 1) + complete = true; + break; case C_USEENTITY: for (Common::Array<AIEntity *>::iterator it = _ents->begin(); it != _ents->end(); it++) { if ((*it)->entityName && Common::matchString((*it)->entityName, _cine[i]->string)) { diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 2e0a705c50..1f6a7bce6e 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -595,6 +595,7 @@ struct CineCommand { char string[32]; char *id; AIEntity *e; + Picture *pic; CineCommand() : cmdType(C_NO_COMMAND), x(0.0), y(0.0), x2(0.0), y2(0.0), xv(0.0), yv(0.0), start(0), end(0), delay(0), speed(0), title(""), string(""), id(NULL), e(NULL), pic(NULL) {} |