aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-18 14:29:10 +0400
committerVladimir Menshakov2011-06-18 14:29:10 +0400
commit41a399231be1abe21ac561994f0f19bc0c37e8a1 (patch)
treef4ed3ba7092b0458c9cdfa5e39b6beedd6f634c9 /engines
parentcf671227fe52f7d87afeab65a90642d4aa6b7d73 (diff)
downloadscummvm-rg350-41a399231be1abe21ac561994f0f19bc0c37e8a1.tar.gz
scummvm-rg350-41a399231be1abe21ac561994f0f19bc0c37e8a1.tar.bz2
scummvm-rg350-41a399231be1abe21ac561994f0f19bc0c37e8a1.zip
DREAMWEB: added stubs for loading from lancher (disabled).
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/detection.cpp4
-rw-r--r--engines/dreamweb/dreamweb.cpp11
-rw-r--r--engines/dreamweb/dreamweb.h4
-rw-r--r--engines/dreamweb/stubs.cpp8
4 files changed, 21 insertions, 6 deletions
diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp
index 613bba153f..c3e99fed47 100644
--- a/engines/dreamweb/detection.cpp
+++ b/engines/dreamweb/detection.cpp
@@ -74,8 +74,8 @@ public:
bool DreamWebMetaEngine::hasFeature(MetaEngineFeature f) const {
switch(f) {
case kSupportsListSaves:
- case kSupportsLoadingDuringStartup:
- case kSupportsDeleteSave:
+ //case kSupportsLoadingDuringStartup:
+ //case kSupportsDeleteSave:
return true;
default:
return false;
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index a0e3bf0f9b..0dc25afab0 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -111,6 +111,15 @@ void DreamWebEngine::processEvents() {
quit();
return;
}
+
+ if (_enableSavingOrLoading && _loadSavefile >= 0 && _loadSavefile <= 6) {
+ debug(1, "loading save state %d", _loadSavefile);
+ _context.data.byte(_context.kCurrentslot) = _loadSavefile;
+ _loadSavefile = -1;
+ _context.loadposition();
+ _context.data.byte(_context.kGetback) = 1;
+ }
+
soundHandler();
Common::Event event;
int softKey, hardKey;
@@ -208,6 +217,8 @@ void DreamWebEngine::processEvents() {
Common::Error DreamWebEngine::run() {
_console = new DreamWebConsole(this);
+ _loadSavefile = Common::ConfigManager::instance().getInt("save_slot");
+
getTimerManager()->installTimerProc(vSyncInterrupt, 1000000 / 70, this);
//http://martin.hinner.info/vga/timing.html
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index fce4a082cc..e4e0b0453a 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -104,6 +104,8 @@ public:
void loadSounds(uint bank, const Common::String &file);
bool loadSpeech(const Common::String &filename);
+
+ void enableSavingOrLoading(bool enable = true) { _enableSavingOrLoading = enable; }
private:
void keyPressed(uint16 ascii);
@@ -121,6 +123,8 @@ private:
uint _speed;
bool _turbo;
uint _oldMouseState;
+ int _loadSavefile;
+ bool _enableSavingOrLoading;
struct Sample {
uint offset;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index b8c5fedccd..be6dab5b52 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -193,9 +193,6 @@ void DreamGenContext::mousecall() {
void DreamGenContext::setmouse() {
data.word(kOldpointerx) = 0xffff;
- //warning("setmouse: fixme: add range setting");
- //set vertical range to 15-184
- //set horizontal range to 15-298*2
}
void DreamGenContext::gettime() {
@@ -380,7 +377,10 @@ void DreamGenContext::dosreturn() {
engine->quit();
}
-void DreamGenContext::set16colpalette() {}
+void DreamGenContext::set16colpalette() {
+ //fixme: this is a bit hackish, set16colpalette called after initialization and nearly before main loop.
+ engine->enableSavingOrLoading();
+}
void DreamGenContext::mode640x480() {
// Video mode 12h: 640x480 pixels, 16 colors, I believe