aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-11-26 17:23:40 +0100
committerWillem Jan Palenstijn2011-11-26 18:21:15 +0100
commit77cb6d137550bd1a437577ebb1259fe574b2b4a6 (patch)
tree1066369bb4d5e144b87a48dc1124cb557c25b40c
parentb9d1718fe1fc9649515ff4415a8668044c8a7380 (diff)
downloadscummvm-rg350-77cb6d137550bd1a437577ebb1259fe574b2b4a6.tar.gz
scummvm-rg350-77cb6d137550bd1a437577ebb1259fe574b2b4a6.tar.bz2
scummvm-rg350-77cb6d137550bd1a437577ebb1259fe574b2b4a6.zip
DREAMWEB: Move 'actualsave' and 'actualload' from dreamgen
-rwxr-xr-xdevtools/tasmrecover/tasm-recover2
-rw-r--r--engines/dreamweb/dreamgen.cpp94
-rw-r--r--engines/dreamweb/dreamgen.h6
-rw-r--r--engines/dreamweb/saveload.cpp94
-rw-r--r--engines/dreamweb/stubs.h2
5 files changed, 100 insertions, 98 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 958c9ddfdf..4f05b28555 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -289,6 +289,8 @@ generator = cpp(context, "DreamGen", blacklist = [
'getbackfromob',
'showfirstuse',
'showseconduse',
+ 'actualload',
+ 'actualsave',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index fa25cda34e..2b8eb29eea 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -10914,100 +10914,6 @@ discopsloop:
goto discopsloop;
}
-void DreamGenContext::actualsave() {
- STACK_CHECK;
- _cmp(data.byte(kCommandtype), 222);
- if (flags.z())
- goto alreadyactsave;
- data.byte(kCommandtype) = 222;
- al = 44;
- commandonly();
-alreadyactsave:
- ax = data.word(kMousebutton);
- _and(ax, 1);
- if (flags.z())
- return /* (noactsave) */;
- dx = data;
- ds = dx;
- si = 8579;
- al = data.byte(kCurrentslot);
- ah = 0;
- cx = 17;
- _mul(cx);
- _add(si, ax);
- _inc(si);
- _cmp(ds.byte(si), 0);
- if (flags.z())
- return /* (noactsave) */;
- al = data.byte(kLocation);
- ah = 0;
- cx = 32;
- _mul(cx);
- ds = cs;
- si = 6187;
- _add(si, ax);
- di = 7979;
- bx = di;
- es = cs;
- cx = 16;
- _movsw(cx, true);
- al = data.byte(kRoomssample);
- es.byte(bx+13) = al;
- al = data.byte(kMapx);
- es.byte(bx+15) = al;
- al = data.byte(kMapy);
- es.byte(bx+16) = al;
- al = data.byte(kLiftflag);
- es.byte(bx+20) = al;
- al = data.byte(kManspath);
- es.byte(bx+21) = al;
- al = data.byte(kFacing);
- es.byte(bx+22) = al;
- al = 255;
- es.byte(bx+27) = al;
- saveposition();
- getridoftemp();
- restoreall();
- data.word(kTextaddressx) = 13;
- data.word(kTextaddressy) = 182;
- data.byte(kTextlen) = 240;
- redrawmainscrn();
- worktoscreenm();
- data.byte(kGetback) = 4;
-}
-
-void DreamGenContext::actualload() {
- STACK_CHECK;
- _cmp(data.byte(kCommandtype), 221);
- if (flags.z())
- goto alreadyactload;
- data.byte(kCommandtype) = 221;
- al = 41;
- commandonly();
-alreadyactload:
- ax = data.word(kMousebutton);
- _cmp(ax, data.word(kOldbutton));
- if (flags.z())
- return /* (notactload) */;
- _cmp(ax, 1);
- if (!flags.z())
- return /* (notactload) */;
- dx = data;
- ds = dx;
- si = 8579;
- al = data.byte(kCurrentslot);
- ah = 0;
- cx = 17;
- _mul(cx);
- _add(si, ax);
- _inc(si);
- _cmp(ds.byte(si), 0);
- if (flags.z())
- return /* (notactload) */;
- loadposition();
- data.byte(kGetback) = 1;
-}
-
void DreamGenContext::selectslot2() {
STACK_CHECK;
_cmp(data.word(kMousebutton), 0);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index abf6fe14d5..0e863257aa 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -158,8 +158,6 @@ public:
static const uint16 addr_getnamepos = 0xc864;
static const uint16 addr_checkinput = 0xc860;
static const uint16 addr_selectslot2 = 0xc85c;
- static const uint16 addr_actualload = 0xc858;
- static const uint16 addr_actualsave = 0xc854;
static const uint16 addr_savegame = 0xc850;
static const uint16 addr_discops = 0xc84c;
static const uint16 addr_getbacktoops = 0xc848;
@@ -1573,7 +1571,7 @@ public:
void folderexit();
void dosreturn();
void wheelsound();
- void actualsave();
+ //void actualsave();
//void autolook();
void playguitar();
//void showreelframe();
@@ -1810,7 +1808,7 @@ public:
void fadescreenup();
//void getnextword();
void generalerror();
- void actualload();
+ //void actualload();
void allocateload();
void saveposition();
void mode640x480();
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index c96dd51390..8100a25705 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -380,5 +380,99 @@ void DreamGenContext::showdiscops() {
showframe(tempGraphics(), kOpsx+176+2, kOpsy+60-4, 5, 0);
}
+void DreamGenContext::actualsave() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 222);
+ if (flags.z())
+ goto alreadyactsave;
+ data.byte(kCommandtype) = 222;
+ al = 44;
+ commandonly();
+alreadyactsave:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return /* (noactsave) */;
+ dx = data;
+ ds = dx;
+ si = 8579;
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ cx = 17;
+ _mul(cx);
+ _add(si, ax);
+ _inc(si);
+ _cmp(ds.byte(si), 0);
+ if (flags.z())
+ return /* (noactsave) */;
+ al = data.byte(kLocation);
+ ah = 0;
+ cx = 32;
+ _mul(cx);
+ ds = cs;
+ si = 6187;
+ _add(si, ax);
+ di = 7979;
+ bx = di;
+ es = cs;
+ cx = 16;
+ _movsw(cx, true);
+ al = data.byte(kRoomssample);
+ es.byte(bx+13) = al;
+ al = data.byte(kMapx);
+ es.byte(bx+15) = al;
+ al = data.byte(kMapy);
+ es.byte(bx+16) = al;
+ al = data.byte(kLiftflag);
+ es.byte(bx+20) = al;
+ al = data.byte(kManspath);
+ es.byte(bx+21) = al;
+ al = data.byte(kFacing);
+ es.byte(bx+22) = al;
+ al = 255;
+ es.byte(bx+27) = al;
+ saveposition();
+ getridoftemp();
+ restoreall();
+ data.word(kTextaddressx) = 13;
+ data.word(kTextaddressy) = 182;
+ data.byte(kTextlen) = 240;
+ redrawmainscrn();
+ worktoscreenm();
+ data.byte(kGetback) = 4;
+}
+
+void DreamGenContext::actualload() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 221);
+ if (flags.z())
+ goto alreadyactload;
+ data.byte(kCommandtype) = 221;
+ al = 41;
+ commandonly();
+alreadyactload:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notactload) */;
+ _cmp(ax, 1);
+ if (!flags.z())
+ return /* (notactload) */;
+ dx = data;
+ ds = dx;
+ si = 8579;
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ cx = 17;
+ _mul(cx);
+ _add(si, ax);
+ _inc(si);
+ _cmp(ds.byte(si), 0);
+ if (flags.z())
+ return /* (notactload) */;
+ loadposition();
+ data.byte(kGetback) = 1;
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 465a02611a..0d70844e0e 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -343,4 +343,6 @@
void getbackfromob();
void showfirstuse();
void showseconduse();
+ void actualsave();
+ void actualload();