aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorD G Turner2011-12-26 05:46:01 +0000
committerD G Turner2011-12-26 05:46:01 +0000
commit6f8a4bb336e3a881fabe7eb857a227a6dcd3d026 (patch)
tree6bc209a88c32da2b138323b62a3f7ee344924b50 /engines/dreamweb
parent389afc46660918409d69458bfbb096a6ba128f63 (diff)
downloadscummvm-rg350-6f8a4bb336e3a881fabe7eb857a227a6dcd3d026.tar.gz
scummvm-rg350-6f8a4bb336e3a881fabe7eb857a227a6dcd3d026.tar.bz2
scummvm-rg350-6f8a4bb336e3a881fabe7eb857a227a6dcd3d026.zip
DREAMWEB: Ported 'searchforfiles' to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp16
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/monitor.cpp13
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 14 insertions, 17 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6c16274e32..66885d7623 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -384,22 +384,6 @@ dirroot:
scrollMonitor();
}
-void DreamGenContext::searchForFiles() {
- STACK_CHECK;
- bx = (66*2);
-directloop1:
- al = es.byte(bx);
- _inc(bx);
- _cmp(al, '*');
- if (flags.z())
- return /* (endofdir) */;
- _cmp(al, 34);
- if (!flags.z())
- goto directloop1;
- monPrint();
- goto directloop1;
-}
-
void DreamGenContext::read() {
STACK_CHECK;
cx = 40;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 6c5bf1918b..3d98f294ce 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -465,7 +465,6 @@ public:
void dreamweb();
void read();
void searchForString();
- void searchForFiles();
void getExAd();
void transferToEx();
void parser();
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 4627597ab0..f3aad7a496 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -514,4 +514,17 @@ void DreamGenContext::signOn() {
}
}
+void DreamGenContext::searchForFiles() {
+ bx = kTextstart;
+
+ while (true) {
+ al = es.byte(bx);
+ bx++;
+ if (al == '*')
+ return; // "endofdir"
+ if (al == 34)
+ monPrint();
+ }
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 2ed08f92c9..7301ba9158 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -143,5 +143,6 @@
void outOfOpen();
void swapWithOpen();
void swapWithInv();
+ void searchForFiles();
#endif