aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devtools/tasmrecover/tasm/cpp.py6
-rw-r--r--devtools/tasmrecover/tasm/op.py12
-rw-r--r--engines/dreamweb/dreamgen.cpp12
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) {