diff options
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/displayinfo.h | 8 | ||||
-rw-r--r-- | engines/saga/interface.cpp | 17 | ||||
-rw-r--r-- | engines/saga/interface.h | 5 |
3 files changed, 17 insertions, 13 deletions
diff --git a/engines/saga/displayinfo.h b/engines/saga/displayinfo.h index 3775e904ff..c85b5b830f 100644 --- a/engines/saga/displayinfo.h +++ b/engines/saga/displayinfo.h @@ -64,7 +64,7 @@ struct GameDisplayInfo { int saveReminderWidth; int saveReminderHeight; int saveReminderFirstSpriteNumber; - int saveReminderSecondSpriteNumber; + int saveReminderNumSprites; int leftPortraitXOffset; int leftPortraitYOffset; @@ -230,7 +230,8 @@ static const GameDisplayInfo ITE_DisplayInfo = { 15, // status BG color 308,137, // save reminder pos 12,12, // save reminder w & h - 6,7, // save reminder sprite numbers + 6, // save reminder first sprite number + 2, // number of save reminder sprites 5, 4, // left portrait x, y offset 274, 4, // right portrait x, y offset @@ -376,7 +377,8 @@ static const GameDisplayInfo IHNM_DisplayInfo = { 250, // status BG color 616, 304, // save reminder pos 24, 24, // save reminder w&h - 0,1, // save reminder sprite numbers + 0, // save reminder first sprite number + 16, // number of save reminder sprites 11, 12, // left portrait x, y offset -1, -1, // right portrait x, y offset diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index abf8094533..38d126c5d4 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -358,15 +358,12 @@ void Interface::saveReminderCallback(void *refCon) { } void Interface::updateSaveReminder() { - // TODO: finish this - /* if (_active && _panelMode == kPanelMain) { - _vm->_timer->removeTimerProc(&saveReminderCallback); - _saveReminderState = (_saveReminderState == 0) ? 1 : 0; + _saveReminderState = _saveReminderState % _vm->getDisplayInfo().saveReminderNumSprites + 1; drawStatusBar(); - _vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); + _vm->_timer->removeTimerProc(&saveReminderCallback); + _vm->_timer->installTimerProc(&saveReminderCallback, ((_vm->getGameType() == GType_ITE) ? TIMETOBLINK_ITE : TIMETOBLINK_IHNM), this); } - */ } int Interface::activate() { @@ -423,7 +420,7 @@ void Interface::setMode(int mode) { if (mode == kPanelMain) { _inMainMode = true; - _saveReminderState = 1; //TODO: blinking timeout + _saveReminderState = 1; } else if (mode == kPanelChapterSelection) { _saveReminderState = 1; } else if (mode == kPanelNull) { @@ -1420,6 +1417,10 @@ void Interface::setSave(PanelButton *panelButton) { fileName = _vm->calcSaveFileName(_vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber); _vm->save(fileName, _textInputString); } + _vm->_timer->removeTimerProc(&saveReminderCallback); + _vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); + setSaveReminderState(1); + _textInput = false; setMode(kPanelOption); break; @@ -1925,7 +1926,7 @@ void Interface::drawStatusBar() { rect.right = rect.left + _vm->getDisplayInfo().saveReminderWidth; rect.bottom = rect.top + _vm->getDisplayInfo().saveReminderHeight; _vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_saveReminderSprites, - _saveReminderState == 1 ? _vm->getDisplayInfo().saveReminderFirstSpriteNumber : _vm->getDisplayInfo().saveReminderSecondSpriteNumber, + _vm->getDisplayInfo().saveReminderFirstSpriteNumber + _saveReminderState - 1, rect, 256); } diff --git a/engines/saga/interface.h b/engines/saga/interface.h index 2091c9f071..46df12ed51 100644 --- a/engines/saga/interface.h +++ b/engines/saga/interface.h @@ -59,8 +59,9 @@ enum InterfaceUpdateFlags { #define RID_IHNM_BOSS_SCREEN 19 // not in demo #define RID_ITE_TYCHO_MAP 1686 #define RID_ITE_SPR_CROSSHAIR (73 + 9) -#define TIMETOSAVE (kScriptTimeTicksPerSecond * 1000 * 60 * 30) -#define TIMETOBLINK (kScriptTimeTicksPerSecond * 1000 * 1) +#define TIMETOSAVE (1000000 * 60 * 30) // 30 minutes +#define TIMETOBLINK_ITE (1000000 * 1) +#define TIMETOBLINK_IHNM (1000000 / 10) // Converse-specific stuff |