aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-cinematic.cpp23
-rw-r--r--engines/hdb/ai.h1
-rw-r--r--engines/hdb/hdb.h2
3 files changed, 25 insertions, 1 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index 42ce0c6988..8f42a59374 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -104,6 +104,22 @@ void AI::processCines() {
if (func[0])
g_hdb->_lua->callFunction(func, 0);
break;
+ case C_STARTMAP:
+ cineFreeGfx(); // free all gfx alloc'ed during cine
+ _cineActive = false;
+ _playerLock = false;
+ _cameraLock = false;
+ g_hdb->_window->setInfobarDark(0);
+ g_hdb->_gfx->setPointerState(1);
+ _cine.resize(0);
+ _numCineFreeList = 0;
+ _numCineBlitList = 0;
+ // if cine is aborted and an abort function was specified, call it
+ if (_cineAborted && _cineAbortFunc)
+ g_hdb->_lua->callFunction(_cineAbortFunc, 0);
+ g_hdb->changeMap(_cine[i]->title);
+ return;
+ break;
case C_LOCKPLAYER:
_playerLock = true;
complete = true;
@@ -491,6 +507,13 @@ void AI::cineStop(const char *funcNext) {
_cine.push_back(cmd);
}
+void AI::cineStartMap(const char *mapName) {
+ CineCommand *cmd = new CineCommand;
+ cmd->cmdType = C_STARTMAP;
+ cmd->title = mapName;
+ _cine.push_back(cmd);
+}
+
void AI::cineLockPlayer() {
CineCommand *cmd = new CineCommand;
cmd->cmdType = C_LOCKPLAYER;
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 7c7c28e725..be7a530efe 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -950,6 +950,7 @@ public:
void cineFreeGfx();
void cineStart(bool abortable, const char *abortFunc);
void cineStop(const char *funcNext);
+ void cineStartMap(const char *mapName);
void cineLockPlayer();
void cineUnlockPlayer();
void cineSetCamera(int x, int y);
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index e936498157..3444fbf3d7 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -152,7 +152,7 @@ public:
bool restartMap();
bool startMap(const char *name);
- void changeMap(char *name) {
+ void changeMap(const char *name) {
strcpy(_changeMapname, name);
_changeLevel = true;
}