aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/dreamgen.cpp
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-12 17:44:07 +0400
committerAlyssa Milburn2011-06-15 17:34:20 +0200
commitf592fe188117e3f56cd19409afbed5b94c6d4d4a (patch)
treee2544735a0081cb6288e35fe0b2ca0c867305ce6 /engines/dreamweb/dreamgen.cpp
parentc5ab591b791d96783d9fdb7796a162cbe246b08b (diff)
downloadscummvm-rg350-f592fe188117e3f56cd19409afbed5b94c6d4d4a.tar.gz
scummvm-rg350-f592fe188117e3f56cd19409afbed5b94c6d4d4a.tar.bz2
scummvm-rg350-f592fe188117e3f56cd19409afbed5b94c6d4d4a.zip
DREAMWEB: unstubbed scanfornames
Diffstat (limited to 'engines/dreamweb/dreamgen.cpp')
-rw-r--r--engines/dreamweb/dreamgen.cpp50
1 files changed, 49 insertions, 1 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 10766a7599..604ff90aaf 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -7,6 +7,7 @@ void allocatebuffers(Context &context);
void clearbuffers(Context &context);
void clearpalette(Context &context);
void readsetdata(Context &context);
+void scanfornames(Context &context);
void loadpalfromiff(Context &context);
void titles(Context &context);
void credits(Context &context);
@@ -16374,7 +16375,6 @@ void loadposition(Context & context) {
context.dx = 8469;
context._add(context.dx, context.ax);
openfile(context);
- context.ah = 0x3f;
context.ds = context.cs;
context.dx = 5862;
context.cx = (5958-5862);
@@ -16452,6 +16452,54 @@ foundlen:
return;
}
+void scanfornames(Context & context) {
+ context.dx = context.data;
+ context.es = context.dx;
+ context.di = 8350;
+ context.dx = context.data;
+ context.ds = context.dx;
+ context.dx = 8469;
+ context.cx = 7;
+scanloop:
+ context.push(context.es);
+ context.push(context.ds);
+ context.push(context.di);
+ context.push(context.dx);
+ context.push(context.cx);
+ openfilenocheck(context);
+ if (context.flags.c()) goto notexist;
+ context.cx = context.pop();
+ context._add(context.ch, 1);
+ context.push(context.cx);
+ context.push(context.di);
+ context.push(context.es);
+ context.dx = context.data;
+ context.ds = context.dx;
+ context.dx = 5862;
+ context.cx = (5958-5862);
+ savefileread(context);
+ context.dx = context.data;
+ context.es = context.dx;
+ context.di = 5912;
+ context.ds = context.pop();
+ context.dx = context.pop();
+ loadseg(context);
+ context.bx = context.data.word(kHandle);
+ closefile(context);
+notexist:
+ context.cx = context.pop();
+ context.dx = context.pop();
+ context.di = context.pop();
+ context.ds = context.pop();
+ context.es = context.pop();
+ context._add(context.dx, 13);
+ context._add(context.di, 17);
+ context._sub(context.cl, 1);
+ if (!context.flags.z()) goto scanloop;
+ context.al = context.ch;
+ return;
+}
+
void decide(Context & context) {
setmode(context);
loadpalfromiff(context);