From 4b5ed050f176588067a355506792d75b7958bf21 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jun 2008 21:20:55 +0000 Subject: Initial WIP and still non-working code for the blinking save reminder icon (bug reports #1981081 and #1971729) svn-id: r32521 --- engines/saga/interface.cpp | 19 +++++++++++++++++++ engines/saga/interface.h | 5 +++++ 2 files changed, 24 insertions(+) (limited to 'engines/saga') diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index fe1ee0eefc..7380570a99 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -326,6 +326,9 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) { _statusTextInputState = kStatusTextInputFirstRun; _disableAbortSpeeches = false; + + // set save game reminder alarm + _vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); } Interface::~Interface(void) { @@ -336,6 +339,22 @@ Interface::~Interface(void) { _scenePortraits.freeMem(); } +void Interface::saveReminderCallback(void *refCon) { + ((Interface *)refCon)->updateSaveReminder(); +} + +void Interface::updateSaveReminder() { + // TODO: finish this + /* + if (_active && _panelMode == kPanelMain) { + _vm->_timer->removeTimerProc(&saveReminderCallback); + _saveReminderState = (_saveReminderState == 0) ? 1 : 0; + drawStatusBar(); + _vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); + } + */ +} + int Interface::activate() { if (!_active) { _active = true; diff --git a/engines/saga/interface.h b/engines/saga/interface.h index 74cf5ace44..2091c9f071 100644 --- a/engines/saga/interface.h +++ b/engines/saga/interface.h @@ -59,6 +59,8 @@ 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) // Converse-specific stuff @@ -237,6 +239,9 @@ public: void disableAbortSpeeches(bool d) { _disableAbortSpeeches = d; } + static void saveReminderCallback(void *refCon); + void updateSaveReminder(); + bool _textInput; bool _statusTextInput; -- cgit v1.2.3 From 73da6ab51ef86b89adad28a935ac22bad257b834 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 4 Jun 2008 17:20:25 +0000 Subject: - Removed -Wconversion from compiler options for g++ 4.3, it's behavior has fundamently changed in g++ 4.3 - Added -Wno-empty-body and -Wno-parentheses as compiler flags for g++ 4.3 for *now* (we should think of removing -Wparentheses though) - Fixed some warnings for g++ 4.3 (only for the engines I'm using) svn-id: r32540 --- engines/saga/detection.cpp | 4 ++-- engines/saga/saga.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index 7fd1024405..9c897d8ebc 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -54,8 +54,8 @@ struct SAGAGameDescription { const GamePatchDescription *patchDescriptions; }; -const bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; } -const bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); } +bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; } +bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); } const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; } const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; } const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->sfxInfo; } diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 4fd789cb4e..4a5fae7ddb 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -580,15 +580,15 @@ public: _mouseClickCount = 0; } - const bool leftMouseButtonPressed() const { + bool leftMouseButtonPressed() const { return _leftMouseButtonPressed; } - const bool rightMouseButtonPressed() const { + bool rightMouseButtonPressed() const { return _rightMouseButtonPressed; } - const bool mouseButtonPressed() const { + bool mouseButtonPressed() const { return _leftMouseButtonPressed || _rightMouseButtonPressed; } @@ -622,8 +622,8 @@ public: public: bool initGame(void); - const bool isBigEndian() const; - const bool isMacResources() const; + bool isBigEndian() const; + bool isMacResources() const; const GameResourceDescription *getResourceDescription(); const GameSoundInfo *getVoiceInfo() const; const GameSoundInfo *getSfxInfo() const; -- cgit v1.2.3