diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 17 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 3 |
5 files changed, 21 insertions, 17 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 7b317e45a1..33e232bb41 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -194,6 +194,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'useroutine', 'hangon', 'hangonp', + 'findnextcolon', ], skip_output = [ # These functions are processed but not output 'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 068f3fcff3..5c71dc97ed 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -4253,19 +4253,6 @@ foundmatch: bx = pop(); } -void DreamGenContext::findnextcolon() { - STACK_CHECK; -isntcolon: - al = es.byte(si); - _inc(si); - _cmp(al, 0); - if (flags.z()) - return /* (endofcolon) */; - _cmp(al, ':'); - if (!flags.z()) - goto isntcolon; -} - void DreamGenContext::inventory() { STACK_CHECK; _cmp(data.byte(kMandead), 1); @@ -17072,7 +17059,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_obsthatdothings: obsthatdothings(); break; case addr_getobtextstart: getobtextstart(); break; case addr_searchforsame: searchforsame(); break; - case addr_findnextcolon: findnextcolon(); break; case addr_inventory: inventory(); break; case addr_setpickup: setpickup(); break; case addr_examinventory: examinventory(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 6db6f73048..9e209f7f95 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -477,7 +477,6 @@ public: static const uint16 addr_examinventory = 0xc384; static const uint16 addr_setpickup = 0xc380; static const uint16 addr_inventory = 0xc37c; - static const uint16 addr_findnextcolon = 0xc378; static const uint16 addr_searchforsame = 0xc374; static const uint16 addr_getobtextstart = 0xc370; static const uint16 addr_obsthatdothings = 0xc36c; @@ -1852,7 +1851,7 @@ public: void soundonreels(); void usegun(); void autoappear(); - void findnextcolon(); + //void findnextcolon(); //void readmouse4(); void openryan(); void callhotellift(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 60bd317a2b..bd589b2d0d 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1899,5 +1899,22 @@ void DreamGenContext::hangonp(uint16 count) { data.byte(kPointermode) = 0; } +void DreamGenContext::findnextcolon() { + uint8 *initialString = es.ptr(si, 0); + uint8 *string = initialString; + al = findnextcolon(&string); + si += (string - initialString); +} + +uint8 DreamGenContext::findnextcolon(uint8 **string) { + uint8 c; + do { + c = **string; + ++(*string); + } while ((c != 0) && (c != ':')); + return c; +} + + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 943d890afa..3149363301 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -235,5 +235,6 @@ void hangon(uint16 frameCount); void hangonp(); void hangonp(uint16 count); - + uint8 findnextcolon(uint8 **string); + void findnextcolon(); |