diff options
author | Vladimir Menshakov | 2011-06-14 23:21:17 +0400 |
---|---|---|
committer | Alyssa Milburn | 2011-06-15 17:35:00 +0200 |
commit | f4936e6b42a8a1a0346375928e8f74605780b729 (patch) | |
tree | b219afab45c9cf1450ee9f02dbb2b1b170105d5c | |
parent | 7d93f81aba271fea54bc739870d82d822ad5d363 (diff) | |
download | scummvm-rg350-f4936e6b42a8a1a0346375928e8f74605780b729.tar.gz scummvm-rg350-f4936e6b42a8a1a0346375928e8f74605780b729.tar.bz2 scummvm-rg350-f4936e6b42a8a1a0346375928e8f74605780b729.zip |
DREAMWEB: implemented stc/clc, fixed preliminary exit from the dialogue
-rw-r--r-- | devtools/tasmrecover/tasm/cpp.py | 6 | ||||
-rw-r--r-- | devtools/tasmrecover/tasm/op.py | 12 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 12 |
3 files changed, 27 insertions, 3 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index 9d42dd9cde..888f0bf9bd 100644 --- a/devtools/tasmrecover/tasm/cpp.py +++ b/devtools/tasmrecover/tasm/cpp.py @@ -413,6 +413,12 @@ namespace %s { def _movsw(self): self.body += "\tcontext._movsw();\n "; + def _stc(self): + self.body += "\tcontext.flags._c = true;\n "; + + def _clc(self): + self.body += "\tcontext.flags._c = false;\n "; + def __proc(self, name, def_skip = 0): try: skip = def_skip diff --git a/devtools/tasmrecover/tasm/op.py b/devtools/tasmrecover/tasm/op.py index c77eda2b7e..33f79c3e5c 100644 --- a/devtools/tasmrecover/tasm/op.py +++ b/devtools/tasmrecover/tasm/op.py @@ -386,6 +386,18 @@ class _nop(baseop): def visit(self, visitor): pass +class _stc(baseop): + def __init__(self, arg): + pass + def visit(self, visitor): + visitor._stc() + +class _clc(baseop): + def __init__(self, arg): + pass + def visit(self, visitor): + visitor._clc() + class label(baseop): def __init__(self, name): self.name = name diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 187f1f9981..2591c36564 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -9691,6 +9691,9 @@ noplay1: worktoscreenm(context); context.cx = 180; hangonpq(context); + if (!context.flags.c()) goto _tmp1; + {assert(stack_depth == context.stack.size()); return; } +_tmp1: context._inc(context.data.byte(kTalkpos)); context.al = context.data.byte(kTalkpos); context.al = context.data.byte(kCharacter); @@ -9752,6 +9755,8 @@ noplay2: worktoscreenm(context); context.cx = 180; hangonpq(context); + if (!context.flags.c()) goto skiptalk2; + {assert(stack_depth == context.stack.size()); return; } skiptalk2: context._inc(context.data.byte(kTalkpos)); goto dospeech; @@ -9795,13 +9800,14 @@ notspeaking: finishconv: delpointer(context); context.data.byte(kPointermode) = 0; - {assert(stack_depth == context.stack.size()); return; } + context.flags._c = false; + {assert(stack_depth == context.stack.size()); return; } quitconv: delpointer(context); context.data.byte(kPointermode) = 0; - context.ax = context.pop(); cancelch1(context); - {assert(stack_depth == context.stack.size()); return; } + context.flags._c = true; + {assert(stack_depth == context.stack.size()); return; } } void redes(Context & context) { |