diff options
author | Eugene Sandulenko | 2014-05-29 09:14:16 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-05-29 09:14:16 +0300 |
commit | 41ffd7ae6068497246f6713dd50a556828bd18a7 (patch) | |
tree | f3b82f5459964f062714b004ef5703b53f776b1e /engines | |
parent | 5903bacd2517a4f1e59b754baf5866b0d964ef65 (diff) | |
download | scummvm-rg350-41ffd7ae6068497246f6713dd50a556828bd18a7.tar.gz scummvm-rg350-41ffd7ae6068497246f6713dd50a556828bd18a7.tar.bz2 scummvm-rg350-41ffd7ae6068497246f6713dd50a556828bd18a7.zip |
FULLPIPE: Implement MessageQueue::messageQueueCallback1()
Diffstat (limited to 'engines')
-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) { |