[Scummvm-cvs-logs] scummvm master -> bd70cd9dff5666d7bcca69960ef4271c519d04f3
digitall
digitall at scummvm.org
Mon Dec 26 20:40:35 CET 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:
bd70cd9dff DREAMWEB: Ported 'read' to C++
Commit: bd70cd9dff5666d7bcca69960ef4271c519d04f3
https://github.com/scummvm/scummvm/commit/bd70cd9dff5666d7bcca69960ef4271c519d04f3
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-26T12:45:39-08:00
Commit Message:
DREAMWEB: Ported 'read' to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/monitor.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index d63c17e..0126425 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -763,6 +763,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'randomnum1',
'randomnum2',
'randomnumber',
+ 'read',
'readabyte',
'readcitypic',
'readdesticon',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 220304c..b44efe9 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -26,97 +26,6 @@
namespace DreamGen {
-void DreamGenContext::read() {
- STACK_CHECK;
- cx = 40;
- randomAccess();
- parser();
- _cmp(es.byte(di+1), 0);
- if (!flags.z())
- goto okcom;
- netError();
- return;
-okcom:
- es = cs;
- di = 408;
- ax = data.word(kTextfile1);
- data.word(kMonsource) = ax;
- ds = ax;
- si = (66*2);
- searchForString();
- _cmp(al, 0);
- if (flags.z())
- goto foundfile2;
- ax = data.word(kTextfile2);
- data.word(kMonsource) = ax;
- ds = ax;
- si = (66*2);
- searchForString();
- _cmp(al, 0);
- if (flags.z())
- goto foundfile2;
- ax = data.word(kTextfile3);
- data.word(kMonsource) = ax;
- ds = ax;
- si = (66*2);
- searchForString();
- _cmp(al, 0);
- if (flags.z())
- goto foundfile2;
- al = 7;
- monMessage();
- return;
-foundfile2:
- getKeyAndLogo();
- _cmp(al, 0);
- if (flags.z())
- goto keyok1;
- return;
-keyok1:
- es = cs;
- di = offset_operand1;
- ds = data.word(kMonsource);
- searchForString();
- _cmp(al, 0);
- if (flags.z())
- goto findtopictext;
- al = data.byte(kOldlogonum);
- data.byte(kLogonum) = al;
- al = 11;
- monMessage();
- return;
-findtopictext:
- _inc(bx);
- push(es);
- push(bx);
- monitorLogo();
- scrollMonitor();
- bx = pop();
- es = pop();
-moretopic:
- monPrint();
- al = es.byte(bx);
- _cmp(al, 34);
- if (flags.z())
- goto endoftopic;
- _cmp(al, '=');
- if (flags.z())
- goto endoftopic;
- _cmp(al, '*');
- if (flags.z())
- goto endoftopic;
- push(es);
- push(bx);
- processTrigger();
- cx = 24;
- randomAccess();
- bx = pop();
- es = pop();
- goto moretopic;
-endoftopic:
- scrollMonitor();
-}
-
void DreamGenContext::dirFile() {
STACK_CHECK;
al = 34;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 6ee65ad..6ec1946 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -418,7 +418,6 @@ public:
void dirFile();
void dreamweb();
- void read();
void searchForString();
void parser();
};
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index a877f17..953d1cb 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -475,6 +475,82 @@ void DreamGenContext::dirCom() {
scrollMonitor();
}
+void DreamGenContext::read() {
+ bool foundFile = false;
+
+ randomAccess(40);
+ parser();
+ if (es.byte(di+1) == 0) {
+ netError();
+ return;
+ }
+
+ es = cs;
+ di = kCurrentfile;
+
+ data.word(kMonsource) = data.word(kTextfile1);
+ ds = data.word(kMonsource);
+ si = kTextstart;
+ searchForString();
+ if (al == 0) {
+ foundFile = true;
+ } else {
+ data.word(kMonsource) = data.word(kTextfile2);
+ ds = data.word(kMonsource);
+ si = kTextstart;
+ searchForString();
+ if (al == 0) {
+ foundFile = true;
+ } else {
+ data.word(kMonsource) = data.word(kTextfile3);
+ ds = data.word(kMonsource);
+ si = kTextstart;
+ searchForString();
+ if (al == 0)
+ foundFile = true;
+ }
+ }
+
+ if (!foundFile) {
+ monMessage(7);
+ return;
+ }
+
+ // "foundfile2"
+ getKeyAndLogo();
+ if (al != 0)
+ return;
+
+ // "keyok1"
+ es = cs;
+ di = offset_operand1;
+ ds = data.word(kMonsource);
+ searchForString();
+ if (al != 0) {
+ data.byte(kLogonum) = data.byte(kOldlogonum);
+ monMessage(11);
+ return;
+ }
+
+ // "findtopictext"
+ bx++;
+
+ monitorLogo();
+ scrollMonitor();
+
+ while (true) {
+ monPrint();
+ if (es.byte(bx) == 34 || es.byte(bx) == '=' || es.byte(bx) == '*') {
+ // "endoftopic"
+ scrollMonitor();
+ return;
+ }
+
+ processTrigger();
+ randomAccess(24);
+ }
+}
+
void DreamGenContext::signOn() {
parser();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index feedef9..bda2be6 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -117,6 +117,7 @@
void getKeyAndLogo();
void signOn();
void searchForFiles(uint16 segment);
+ void read();
void dirCom();
#endif
More information about the Scummvm-git-logs
mailing list