aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/monitor.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-12-03 20:47:12 +0100
committerWillem Jan Palenstijn2011-12-03 20:47:12 +0100
commitedd26e7b560b31c00635f54f64b63d05b45074ae (patch)
tree4ce9cc7c3b96db6517bdfc1e6b5cbe0c83279ca9 /engines/dreamweb/monitor.cpp
parent1fb892878fcfa6c38efc08e40e59676785147e70 (diff)
downloadscummvm-rg350-edd26e7b560b31c00635f54f64b63d05b45074ae.tar.gz
scummvm-rg350-edd26e7b560b31c00635f54f64b63d05b45074ae.tar.bz2
scummvm-rg350-edd26e7b560b31c00635f54f64b63d05b45074ae.zip
DREAMWEB: Move 'loadpersonal', 'loadnews', 'loadcart' out of dreamgen
Diffstat (limited to 'engines/dreamweb/monitor.cpp')
-rw-r--r--engines/dreamweb/monitor.cpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 405cb1143e..c1b22594fe 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -265,6 +265,103 @@ void DreamGenContext::turnOnPower() {
powerLightOn();
}
+void DreamGenContext::loadPersonal() {
+ STACK_CHECK;
+ al = data.byte(kLocation);
+ dx = 1669;
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundpersonal;
+ _cmp(al, 42);
+ if (flags.z())
+ goto foundpersonal;
+ dx = 1682;
+ _cmp(al, 2);
+ if (flags.z())
+ goto foundpersonal;
+foundpersonal:
+ openFile();
+ readHeader();
+ bx = es.word(di);
+ push(bx);
+ cl = 4;
+ _shr(bx, cl);
+ allocateMem();
+ data.word(kTextfile1) = ax;
+ ds = ax;
+ cx = pop();
+ dx = 0;
+ readFromFile();
+ closeFile();
+}
+
+void DreamGenContext::loadNews() {
+ STACK_CHECK;
+ al = data.byte(kNewsitem);
+ dx = 1695;
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundnews;
+ dx = 1708;
+ _cmp(al, 1);
+ if (flags.z())
+ goto foundnews;
+ dx = 1721;
+ _cmp(al, 2);
+ if (flags.z())
+ goto foundnews;
+ dx = 1734;
+foundnews:
+ openFile();
+ readHeader();
+ bx = es.word(di);
+ push(bx);
+ cl = 4;
+ _shr(bx, cl);
+ allocateMem();
+ data.word(kTextfile2) = ax;
+ ds = ax;
+ cx = pop();
+ dx = 0;
+ readFromFile();
+ closeFile();
+}
+
+void DreamGenContext::loadCart() {
+ STACK_CHECK;
+ lookInInterface();
+ dx = 1747;
+ _cmp(al, 0);
+ if (flags.z())
+ goto gotcart;
+ dx = 1760;
+ _cmp(al, 1);
+ if (flags.z())
+ goto gotcart;
+ dx = 1773;
+ _cmp(al, 2);
+ if (flags.z())
+ goto gotcart;
+ dx = 1786;
+ _cmp(al, 3);
+ if (flags.z())
+ goto gotcart;
+ dx = 1799;
+gotcart:
+ openFile();
+ readHeader();
+ bx = es.word(di);
+ push(bx);
+ cl = 4;
+ _shr(bx, cl);
+ allocateMem();
+ data.word(kTextfile3) = ax;
+ ds = ax;
+ cx = pop();
+ dx = 0;
+ readFromFile();
+ closeFile();
+}
} /*namespace dreamgen */