aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorChristopher Page2008-06-05 21:20:35 +0000
committerChristopher Page2008-06-05 21:20:35 +0000
commitcae6396ce76991e240b1e23bbcff0b6d6960f9a0 (patch)
tree58ea9c6a42d7bf3655e775e3a26f6739e9daffe1 /engines/saga
parent18b892e534c9fedf60a57c71e0978965d353fd60 (diff)
parent3c7e0f5f8dc39e27619f7d23d060264db8d906d3 (diff)
downloadscummvm-rg350-cae6396ce76991e240b1e23bbcff0b6d6960f9a0.tar.gz
scummvm-rg350-cae6396ce76991e240b1e23bbcff0b6d6960f9a0.tar.bz2
scummvm-rg350-cae6396ce76991e240b1e23bbcff0b6d6960f9a0.zip
Merged revisions 32507-32513,32516,32518,32520-32521,32523-32524,32526-32548,32550-32562 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk svn-id: r32563
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/detection.cpp4
-rw-r--r--engines/saga/interface.cpp19
-rw-r--r--engines/saga/interface.h5
-rw-r--r--engines/saga/saga.h10
4 files changed, 31 insertions, 7 deletions
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/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;
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;