Skip to content

Commit

Permalink
FULLPIPE: Implement MessageQueue::messageQueueCallback1()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed May 29, 2014
1 parent 5903bac commit 41ffd7a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions engines/fullpipe/messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "fullpipe/messages.h"
#include "fullpipe/modal.h"
#include "fullpipe/statics.h"
#include "fullpipe/gameloader.h"

namespace Fullpipe {

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 41ffd7a

Please sign in to comment.