aboutsummaryrefslogtreecommitdiff
path: root/engines
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
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')
-rw-r--r--engines/dreamweb/dreamgen.cpp98
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/monitor.cpp97
-rw-r--r--engines/dreamweb/stubs.h3
4 files changed, 100 insertions, 101 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 7a66a05bc0..117f676998 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -5505,104 +5505,6 @@ void DreamGenContext::printOuterMon() {
showFrame();
}
-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();
-}
-
void DreamGenContext::lookInInterface() {
STACK_CHECK;
al = 'I';
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 01a1bd6571..592c0fe3c4 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -671,7 +671,6 @@ public:
void mouseCall();
void train();
void fadeDownMon();
- void loadCart();
void bartender();
void showDiary();
void sLabDoorF();
@@ -806,7 +805,6 @@ public:
void setKeyboardInt();
void priest();
void printmessage2();
- void loadNews();
void wearShades();
void hangOnPQ();
void findOpenPos();
@@ -905,7 +903,6 @@ public:
void fadeScreenUps();
void hotelControl();
void mugger();
- void loadPersonal();
void gettingShot();
void setTopLeft();
void searchForString();
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 */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 967c1f1737..d600c4238e 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -426,4 +426,7 @@
void zoomOnOff();
void doShake();
void atmospheres();
+ void loadPersonal();
+ void loadNews();
+ void loadCart();