diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 26 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/saveload.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 17 insertions, 28 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 8b0797accb..a0a2ba9ed8 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -34,6 +34,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'screenupdate', 'startup', 'startup1', + 'saveload', 'switchryanon', 'switchryanoff', 'quickquit', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 0e242fcc83..507a8f80a9 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -10979,31 +10979,6 @@ void DreamGenContext::findtext1() { si = ax; } -void DreamGenContext::saveload() { - STACK_CHECK; - _cmp(data.word(kWatchingtime), 0); - if (!flags.z()) - { blank(); return; }; - _cmp(data.byte(kPointermode), 2); - if (flags.z()) - { blank(); return; }; - _cmp(data.byte(kCommandtype), 253); - if (flags.z()) - goto alreadyops; - data.byte(kCommandtype) = 253; - al = 43; - commandonly(); -alreadyops: - ax = data.word(kMousebutton); - _cmp(ax, data.word(kOldbutton)); - if (flags.z()) - return /* (noops) */; - _and(ax, 1); - if (flags.z()) - return /* (noops) */; - dosaveload(); -} - void DreamGenContext::dosaveload() { STACK_CHECK; data.byte(kPointerframe) = 0; @@ -15156,7 +15131,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_showdiarypage: showdiarypage(); break; case addr_findtext1: findtext1(); break; case addr_zoomonoff: zoomonoff(); break; - case addr_saveload: saveload(); break; case addr_dosaveload: dosaveload(); break; case addr_getbackfromops: getbackfromops(); break; case addr_showmainops: showmainops(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index d003a6ecb1..4311babb3b 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -181,7 +181,6 @@ public: static const uint16 addr_showmainops = 0xc838; static const uint16 addr_getbackfromops = 0xc834; static const uint16 addr_dosaveload = 0xc830; - static const uint16 addr_saveload = 0xc82c; static const uint16 addr_zoomonoff = 0xc828; static const uint16 addr_findtext1 = 0xc824; static const uint16 addr_showdiarypage = 0xc820; @@ -1419,7 +1418,7 @@ public: //void makebackob(); void middlepanel(); //void dumpwatch(); - void saveload(); + //void saveload(); void monitorlogo(); void loadposition(); //void wornerror(); diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index 6faab5554f..398d71e98b 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -360,4 +360,18 @@ void DreamGenContext::oldtonames() { memcpy(cs.ptr(kSavenames, 0), segRef(data.word(kBuffers)).ptr(kZoomspace, 0), 17*4); } +void DreamGenContext::saveload() { + if (data.word(kWatchingtime) || (data.byte(kPointermode) == 2)) { + blank(); + return; + } + if (data.byte(kCommandtype) != 253) { + data.byte(kCommandtype) = 253; + commandonly(43); + } + if ((data.word(kMousebutton) != data.word(kOldbutton)) && (data.word(kMousebutton) & 1)) + dosaveload(); +} + } /*namespace dreamgen */ + diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index c408ac2239..fe761530f0 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -42,6 +42,7 @@ void loadtempcharset(); void loadtempcharset(const char *fileName); Frame *tempCharset(); + void saveload(); void printcurs(); void delcurs(); void hangoncurs(uint16 frameCount); |