aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorMax Horn2006-10-21 12:44:10 +0000
committerMax Horn2006-10-21 12:44:10 +0000
commit9edf1e6a1a95f45b9883e298edc7e578ff9495d1 (patch)
tree897a46c0e4bbc22c8422bd3b96545bfeea3a4a0f /engines/saga
parent86d3f30347d5ee7ee67a4f16d5043b9bef0539db (diff)
downloadscummvm-rg350-9edf1e6a1a95f45b9883e298edc7e578ff9495d1.tar.gz
scummvm-rg350-9edf1e6a1a95f45b9883e298edc7e578ff9495d1.tar.bz2
scummvm-rg350-9edf1e6a1a95f45b9883e298edc7e578ff9495d1.zip
cleanup
svn-id: r24407
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/interface.cpp10
-rw-r--r--engines/saga/music.cpp6
-rw-r--r--engines/saga/puzzle.cpp26
3 files changed, 21 insertions, 21 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index e0d905a015..0ff1396a49 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -546,8 +546,8 @@ void Interface::textInputRepeatCallback(void *refCon) {
void Interface::textInputStartRepeat(uint16 ascii) {
if (!_textInputRepeatPhase) {
_textInputRepeatPhase = 1;
- Common::g_timer->removeTimerProc(&textInputRepeatCallback);
- Common::g_timer->installTimerProc(&textInputRepeatCallback, KEYBOARD_REPEAT_DELAY1, this);
+ _vm->_timer->removeTimerProc(&textInputRepeatCallback);
+ _vm->_timer->installTimerProc(&textInputRepeatCallback, KEYBOARD_REPEAT_DELAY1, this);
}
_textInputRepeatChar = ascii;
@@ -556,8 +556,8 @@ void Interface::textInputStartRepeat(uint16 ascii) {
void Interface::textInputRepeat() {
if (_textInputRepeatPhase == 1) {
_textInputRepeatPhase = 2;
- Common::g_timer->removeTimerProc(&textInputRepeatCallback);
- Common::g_timer->installTimerProc(&textInputRepeatCallback, KEYBOARD_REPEAT_DELAY2, this);
+ _vm->_timer->removeTimerProc(&textInputRepeatCallback);
+ _vm->_timer->installTimerProc(&textInputRepeatCallback, KEYBOARD_REPEAT_DELAY2, this);
} else if (_textInputRepeatPhase == 2) {
processAscii(_textInputRepeatChar, true);
}
@@ -565,7 +565,7 @@ void Interface::textInputRepeat() {
void Interface::processKeyUp(uint16 ascii) {
if (_textInputRepeatPhase) {
- Common::g_timer->removeTimerProc(&textInputRepeatCallback);
+ _vm->_timer->removeTimerProc(&textInputRepeatCallback);
_textInputRepeatPhase = 0;
}
}
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index bacf726626..f4af44f826 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -346,7 +346,7 @@ void Music::musicVolumeGauge() {
_player->setVolume(volume);
if (_currentVolumePercent == 100) {
- Common::g_timer->removeTimerProc(&musicVolumeGaugeCallback);
+ _vm->_timer->removeTimerProc(&musicVolumeGaugeCallback);
_currentVolume = _targetVolume;
}
}
@@ -361,12 +361,12 @@ void Music::setVolume(int volume, int time) {
if (time == 1) {
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
_player->setVolume(volume);
- Common::g_timer->removeTimerProc(&musicVolumeGaugeCallback);
+ _vm->_timer->removeTimerProc(&musicVolumeGaugeCallback);
_currentVolume = volume;
return;
}
- Common::g_timer->installTimerProc(&musicVolumeGaugeCallback, time * 100L, this);
+ _vm->_timer->installTimerProc(&musicVolumeGaugeCallback, time * 100L, this);
}
bool Music::isPlaying() {
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 54ebf0bc3f..de519e4062 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -119,7 +119,7 @@ void Puzzle::initPieceInfo(int i, int16 curX, int16 curY, byte offX, byte offY,
void Puzzle::execute(void) {
_active = true;
- Common::g_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this);
+ _vm->_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this);
initPieces();
@@ -134,7 +134,7 @@ void Puzzle::execute(void) {
void Puzzle::exitPuzzle(void) {
_active = false;
- Common::g_timer->removeTimerProc(&hintTimerCallback);
+ _vm->_timer->removeTimerProc(&hintTimerCallback);
_vm->_scene->changeScene(ITE_SCENE_LODGE, 0, kTransitionNoFade);
_vm->_interface->setMode(kPanelMain);
@@ -383,17 +383,17 @@ void Puzzle::solicitHint(void) {
_vm->_actor->setSpeechColor(1, kITEColorBlack);
- Common::g_timer->removeTimerProc(&hintTimerCallback);
+ _vm->_timer->removeTimerProc(&hintTimerCallback);
switch (_hintRqState) {
case kRQSpeaking:
if (_vm->_actor->isSpeaking()) {
- Common::g_timer->installTimerProc(&hintTimerCallback, 50000, this);
+ _vm->_timer->installTimerProc(&hintTimerCallback, 50000, this);
break;
}
_hintRqState = _hintNextRqState;
- Common::g_timer->installTimerProc(&hintTimerCallback, 333333, this);
+ _vm->_timer->installTimerProc(&hintTimerCallback, 333333, this);
break;
case kRQNoHint:
@@ -416,11 +416,11 @@ void Puzzle::solicitHint(void) {
// Roll to see if Sakka scolds
if (_vm->_rnd.getRandomNumber(1)) {
_hintRqState = kRQSakkaDenies;
- Common::g_timer->installTimerProc(&hintTimerCallback, 200000, this);
+ _vm->_timer->installTimerProc(&hintTimerCallback, 200000, this);
} else {
_hintRqState = kRQSpeaking;
_hintNextRqState = kRQHintRequested;
- Common::g_timer->installTimerProc(&hintTimerCallback, 50000, this);
+ _vm->_timer->installTimerProc(&hintTimerCallback, 50000, this);
}
break;
@@ -433,7 +433,7 @@ void Puzzle::solicitHint(void) {
_hintRqState = kRQSpeaking;
_hintNextRqState = kRQHintRequestedStage2;
- Common::g_timer->installTimerProc(&hintTimerCallback, 50000, this);
+ _vm->_timer->installTimerProc(&hintTimerCallback, 50000, this);
_vm->_interface->converseClear();
_vm->_interface->converseAddText(optionsStr[_lang][kROAccept], 1, 0, 0 );
@@ -460,7 +460,7 @@ void Puzzle::solicitHint(void) {
_vm->_interface->converseAddText(optionsStr[_lang][kROLater], 0, 0, 0);
_vm->_interface->converseDisplayText();
- Common::g_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this);
+ _vm->_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this);
_hintRqState = kRQSkipEverything;
break;
@@ -483,8 +483,8 @@ void Puzzle::handleReply(int reply) {
case 2: // Decline the hint
_vm->_actor->abortSpeech();
_hintRqState = kRQNoHint;
- Common::g_timer->removeTimerProc(&hintTimerCallback);
- Common::g_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime * 2, this);
+ _vm->_timer->removeTimerProc(&hintTimerCallback);
+ _vm->_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime * 2, this);
clearHint();
break;
}
@@ -546,8 +546,8 @@ void Puzzle::giveHint(void) {
_vm->_interface->converseAddText(optionsStr[_lang][kROLater], 0, 0, 0);
_vm->_interface->converseDisplayText();
- Common::g_timer->removeTimerProc(&hintTimerCallback);
- Common::g_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this);
+ _vm->_timer->removeTimerProc(&hintTimerCallback);
+ _vm->_timer->installTimerProc(&hintTimerCallback, kPuzzleHintTime, this);
}
void Puzzle::clearHint(void) {