diff options
author | uruk | 2014-05-30 11:14:47 +0200 |
---|---|---|
committer | uruk | 2014-05-30 11:14:47 +0200 |
commit | bb2f8dd68e1d6b2b30b07f60c0cd4e125b47ea4d (patch) | |
tree | 9a1e28cfb1eb1a322225c05adc0962a2f96ea521 /engines/fullpipe/messages.cpp | |
parent | 5ad4e157e5398347651a0da0db07f9daf01bf373 (diff) | |
parent | 0a46d67baea121bed0511ce45bfdd8438a43d35d (diff) | |
download | scummvm-rg350-bb2f8dd68e1d6b2b30b07f60c0cd4e125b47ea4d.tar.gz scummvm-rg350-bb2f8dd68e1d6b2b30b07f60c0cd4e125b47ea4d.tar.bz2 scummvm-rg350-bb2f8dd68e1d6b2b30b07f60c0cd4e125b47ea4d.zip |
Merge branch 'master' of https://github.com/scummvm/scummvm into cge2
Diffstat (limited to 'engines/fullpipe/messages.cpp')
-rw-r--r-- | engines/fullpipe/messages.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 8257d1459f..b643ff9b8f 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -26,6 +26,7 @@ #include "fullpipe/messages.h" #include "fullpipe/modal.h" #include "fullpipe/statics.h" +#include "fullpipe/gameloader.h" namespace Fullpipe { @@ -394,8 +395,18 @@ void MessageQueue::update() { } void MessageQueue::messageQueueCallback1(int par) { - // Autosave - debug(3, "STUB: MessageQueue::messageQueueCallback1()"); + if (g_fp->_isSaveAllowed && par == 16) { + if (g_fp->_globalMessageQueueList->size() && (*g_fp->_globalMessageQueueList)[0] != 0) { + for (int i = 0; i < g_fp->_globalMessageQueueList->size(); i++) { + if ((*g_fp->_globalMessageQueueList)[i]->_flags & 1) + if ((*g_fp->_globalMessageQueueList)[i] != this && !(*g_fp->_globalMessageQueueList)[i]->_isFinished) + return; + } + } + + if (g_fp->_currentScene) + g_fp->_gameLoader->writeSavegame(g_fp->_currentScene, "savetmp.sav"); + } } void MessageQueue::addExCommand(ExCommand *ex) { |