diff options
author | Eugene Sandulenko | 2011-08-05 10:15:20 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2011-08-06 11:28:35 +0100 |
commit | 78f1ea769060cd631c210fc01020bb921afe3607 (patch) | |
tree | 3d12aedc45efe68e6e5d81ee24d90c428bfc186c /engines/saga | |
parent | e72c2fae8896b14553f2e2246726b2e426f0e9bb (diff) | |
download | scummvm-rg350-78f1ea769060cd631c210fc01020bb921afe3607.tar.gz scummvm-rg350-78f1ea769060cd631c210fc01020bb921afe3607.tar.bz2 scummvm-rg350-78f1ea769060cd631c210fc01020bb921afe3607.zip |
OSYSTEM: extended installTimerProc() with timer ID parameter
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/interface.cpp | 6 | ||||
-rw-r--r-- | engines/saga/music.cpp | 2 | ||||
-rw-r--r-- | engines/saga/puzzle.cpp | 18 | ||||
-rw-r--r-- | engines/saga/render.cpp | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index 08c5ddc6f9..fe37ed8995 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -320,7 +320,7 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) { _disableAbortSpeeches = false; // set save game reminder alarm - _vm->getTimerManager()->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); + _vm->getTimerManager()->installTimerProc(&saveReminderCallback, TIMETOSAVE, this, "sagaSaveReminder"); } Interface::~Interface() { @@ -335,7 +335,7 @@ void Interface::updateSaveReminder() { _saveReminderState = _saveReminderState % _vm->getDisplayInfo().saveReminderNumSprites + 1; drawStatusBar(); _vm->getTimerManager()->removeTimerProc(&saveReminderCallback); - _vm->getTimerManager()->installTimerProc(&saveReminderCallback, ((_vm->getGameId() == GID_ITE) ? TIMETOBLINK_ITE : TIMETOBLINK_IHNM), this); + _vm->getTimerManager()->installTimerProc(&saveReminderCallback, ((_vm->getGameId() == GID_ITE) ? TIMETOBLINK_ITE : TIMETOBLINK_IHNM), this, "sagaSaveReminder"); } } @@ -1390,7 +1390,7 @@ void Interface::setSave(PanelButton *panelButton) { void Interface::resetSaveReminder() { _vm->getTimerManager()->removeTimerProc(&saveReminderCallback); - _vm->getTimerManager()->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); + _vm->getTimerManager()->installTimerProc(&saveReminderCallback, TIMETOSAVE, this, "sagaSaveReminder"); setSaveReminderState(1); } diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 49d3f91d77..b195206209 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -213,7 +213,7 @@ void Music::setVolume(int volume, int time) { return; } - _vm->getTimerManager()->installTimerProc(&musicVolumeGaugeCallback, time * 3000L, this); + _vm->getTimerManager()->installTimerProc(&musicVolumeGaugeCallback, time * 3000L, this, "sagaMusicVolume"); } bool Music::isPlaying() { diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp index d5d83c706f..63d9a88fee 100644 --- a/engines/saga/puzzle.cpp +++ b/engines/saga/puzzle.cpp @@ -140,7 +140,7 @@ void Puzzle::initPieceInfo(int i, int16 curX, int16 curY, byte offX, byte offY, void Puzzle::execute() { _active = true; - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this, "sagaPuzzleHint"); initPieces(); @@ -408,12 +408,12 @@ void Puzzle::solicitHint() { switch (_hintRqState) { case kRQSpeaking: if (_vm->_actor->isSpeaking()) { - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 50 * 1000000, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 50 * 1000000, this, "sagaPuzzleHint"); break; } _hintRqState = _hintNextRqState; - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 100*1000000/3, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 100*1000000/3, this, "sagaPuzzleHint"); break; case kRQNoHint: @@ -436,11 +436,11 @@ void Puzzle::solicitHint() { // Roll to see if Sakka scolds if (_vm->_rnd.getRandomNumber(1)) { _hintRqState = kRQSakkaDenies; - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 200*1000000, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 200*1000000, this, "sagaPuzzleHint"); } else { _hintRqState = kRQSpeaking; _hintNextRqState = kRQHintRequested; - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 50*1000000, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 50*1000000, this, "sagaPuzzleHint"); } break; @@ -453,7 +453,7 @@ void Puzzle::solicitHint() { _hintRqState = kRQSpeaking; _hintNextRqState = kRQHintRequestedStage2; - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 50*1000000, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, 50*1000000, this, "sagaPuzzleHint"); _vm->_interface->converseClear(); _vm->_interface->converseAddText(optionsStr[_lang][kROAccept], 0, 1, 0, 0); @@ -480,7 +480,7 @@ void Puzzle::solicitHint() { _vm->_interface->converseAddText(optionsStr[_lang][kROLater], 0, 0, 0, 0); _vm->_interface->converseDisplayText(); - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this, "sagaPuzzleHint"); _hintRqState = kRQSkipEverything; break; @@ -504,7 +504,7 @@ void Puzzle::handleReply(int reply) { _vm->_actor->abortSpeech(); _hintRqState = kRQNoHint; _vm->getTimerManager()->removeTimerProc(&hintTimerCallback); - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime * 2, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime * 2, this, "sagaPuzzleHint"); clearHint(); break; } @@ -566,7 +566,7 @@ void Puzzle::giveHint() { _vm->_interface->converseDisplayText(); _vm->getTimerManager()->removeTimerProc(&hintTimerCallback); - _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this); + _vm->getTimerManager()->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this, "sagaPuzzleHint"); } void Puzzle::clearHint() { diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp index 757374a3a3..a9ef23381e 100644 --- a/engines/saga/render.cpp +++ b/engines/saga/render.cpp @@ -50,7 +50,7 @@ Render::Render(SagaEngine *vm, OSystem *system) { #ifdef SAGA_DEBUG // Initialize FPS timer callback - _vm->getTimerManager()->installTimerProc(&fpsTimerCallback, 1000000, this); + _vm->getTimerManager()->installTimerProc(&fpsTimerCallback, 1000000, this, "sagaFPS"); #endif _backGroundSurface.create(_vm->getDisplayInfo().width, _vm->getDisplayInfo().height, Graphics::PixelFormat::createFormatCLUT8()); |