aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-11-26 15:56:32 +0100
committerWillem Jan Palenstijn2011-11-26 18:21:15 +0100
commitde40ec5e9323fa8c6b601915d708a6ee2a83bbc9 (patch)
tree6f3e183a256a6279f26154f07f02fe6052dc2230
parent18b8d25696ccfa64fc9336e0b96482a8567fbf15 (diff)
downloadscummvm-rg350-de40ec5e9323fa8c6b601915d708a6ee2a83bbc9.tar.gz
scummvm-rg350-de40ec5e9323fa8c6b601915d708a6ee2a83bbc9.tar.bz2
scummvm-rg350-de40ec5e9323fa8c6b601915d708a6ee2a83bbc9.zip
DREAMWEB: Move 'loadposition' and 'saveposition' from dreamgen
-rwxr-xr-xdevtools/tasmrecover/tasm-recover2
-rw-r--r--engines/dreamweb/dreamgen.cpp98
-rw-r--r--engines/dreamweb/dreamgen.h6
-rw-r--r--engines/dreamweb/saveload.cpp98
-rw-r--r--engines/dreamweb/stubs.h2
5 files changed, 104 insertions, 102 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 4f05b28555..cfb3fe4261 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -291,6 +291,8 @@ generator = cpp(context, "DreamGen", blacklist = [
'showseconduse',
'actualload',
'actualsave',
+ 'loadposition',
+ 'saveposition',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 2b8eb29eea..7e2637b4af 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -11199,104 +11199,6 @@ afterprintname:
goto shownameloop;
}
-void DreamGenContext::saveposition() {
- STACK_CHECK;
- makeheader();
- al = data.byte(kCurrentslot);
- ah = 0;
- push(ax);
- cx = 13;
- _mul(cx);
- dx = data;
- ds = dx;
- dx = 8698;
- _add(dx, ax);
- openforsave();
- dx = data;
- ds = dx;
- dx = 6091;
- cx = (6187-6091);
- savefilewrite();
- dx = data;
- es = dx;
- di = 6141;
- ax = pop();
- cx = 17;
- _mul(cx);
- dx = data;
- ds = dx;
- dx = 8579;
- _add(dx, ax);
- saveseg();
- dx = data;
- ds = dx;
- dx = 0;
- saveseg();
- ds = data.word(kExtras);
- dx = (0);
- saveseg();
- ds = data.word(kBuffers);
- dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
- saveseg();
- dx = data;
- ds = dx;
- dx = 7979;
- saveseg();
- dx = data;
- ds = dx;
- dx = 534;
- saveseg();
- closefile();
-}
-
-void DreamGenContext::loadposition() {
- STACK_CHECK;
- data.word(kTimecount) = 0;
- clearchanges();
- al = data.byte(kCurrentslot);
- ah = 0;
- push(ax);
- cx = 13;
- _mul(cx);
- dx = data;
- ds = dx;
- dx = 8698;
- _add(dx, ax);
- openfilefromc();
- ds = cs;
- dx = 6091;
- cx = (6187-6091);
- savefileread();
- es = cs;
- di = 6141;
- ax = pop();
- cx = 17;
- _mul(cx);
- dx = data;
- ds = dx;
- dx = 8579;
- _add(dx, ax);
- loadseg();
- dx = data;
- ds = dx;
- dx = 0;
- loadseg();
- ds = data.word(kExtras);
- dx = (0);
- loadseg();
- ds = data.word(kBuffers);
- dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
- loadseg();
- dx = data;
- ds = dx;
- dx = 7979;
- loadseg();
- ds = cs;
- dx = 534;
- loadseg();
- closefile();
-}
-
void DreamGenContext::makeheader() {
STACK_CHECK;
dx = data;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 0e863257aa..ee34fb3d65 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -142,8 +142,6 @@ public:
static const uint16 addr_storeit = 0xc8a8;
static const uint16 addr_makeheader = 0xc8a4;
static const uint16 addr_loadseg = 0xc8a0;
- static const uint16 addr_loadposition = 0xc89c;
- static const uint16 addr_saveposition = 0xc898;
static const uint16 addr_savefileread = 0xc894;
static const uint16 addr_savefilewrite = 0xc890;
static const uint16 addr_error = 0xc884;
@@ -1394,7 +1392,7 @@ public:
//void dumpwatch();
//void saveload();
void monitorlogo();
- void loadposition();
+ //void loadposition();
//void wornerror();
void entersymbol();
//void showword();
@@ -1810,7 +1808,7 @@ public:
void generalerror();
//void actualload();
void allocateload();
- void saveposition();
+ //void saveposition();
void mode640x480();
void openeden();
void execcommand();
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 76ae5034da..5f5a847416 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -427,5 +427,103 @@ void DreamGenContext::actualload() {
data.byte(kGetback) = 1;
}
+void DreamGenContext::saveposition() {
+ STACK_CHECK;
+ makeheader();
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ push(ax);
+ cx = 13;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8698;
+ _add(dx, ax);
+ openforsave();
+ dx = data;
+ ds = dx;
+ dx = 6091;
+ cx = (6187-6091);
+ savefilewrite();
+ dx = data;
+ es = dx;
+ di = 6141;
+ ax = pop();
+ cx = 17;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8579;
+ _add(dx, ax);
+ saveseg();
+ dx = data;
+ ds = dx;
+ dx = 0;
+ saveseg();
+ ds = data.word(kExtras);
+ dx = (0);
+ saveseg();
+ ds = data.word(kBuffers);
+ dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ saveseg();
+ dx = data;
+ ds = dx;
+ dx = 7979;
+ saveseg();
+ dx = data;
+ ds = dx;
+ dx = 534;
+ saveseg();
+ closefile();
+}
+
+void DreamGenContext::loadposition() {
+ STACK_CHECK;
+ data.word(kTimecount) = 0;
+ clearchanges();
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ push(ax);
+ cx = 13;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8698;
+ _add(dx, ax);
+ openfilefromc();
+ ds = cs;
+ dx = 6091;
+ cx = (6187-6091);
+ savefileread();
+ es = cs;
+ di = 6141;
+ ax = pop();
+ cx = 17;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8579;
+ _add(dx, ax);
+ loadseg();
+ dx = data;
+ ds = dx;
+ dx = 0;
+ loadseg();
+ ds = data.word(kExtras);
+ dx = (0);
+ loadseg();
+ ds = data.word(kBuffers);
+ dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ loadseg();
+ dx = data;
+ ds = dx;
+ dx = 7979;
+ loadseg();
+ ds = cs;
+ dx = 534;
+ loadseg();
+ closefile();
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0d70844e0e..c0542af164 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -345,4 +345,6 @@
void showseconduse();
void actualsave();
void actualload();
+ void loadposition();
+ void saveposition();