[Scummvm-cvs-logs] scummvm master -> 41a399231be1abe21ac561994f0f19bc0c37e8a1
whoozle
whoozle at yandex.ru
Sat Jun 18 12:31:04 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
41a399231b DREAMWEB: added stubs for loading from lancher (disabled).
Commit: 41a399231be1abe21ac561994f0f19bc0c37e8a1
https://github.com/scummvm/scummvm/commit/41a399231be1abe21ac561994f0f19bc0c37e8a1
Author: Vladimir Menshakov (whoozle at yandex.ru)
Date: 2011-06-18T03:29:10-07:00
Commit Message:
DREAMWEB: added stubs for loading from lancher (disabled).
Changed paths:
engines/dreamweb/detection.cpp
engines/dreamweb/dreamweb.cpp
engines/dreamweb/dreamweb.h
engines/dreamweb/stubs.cpp
diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp
index 613bba1..c3e99fe 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 a0e3bf0..0dc25af 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 fce4a08..e4e0b04 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 b8c5fed..be6dab5 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
More information about the Scummvm-git-logs
mailing list