aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorBertrand Augereau2011-10-09 17:22:41 +0200
committerBertrand Augereau2011-10-09 17:53:09 +0200
commit14569bd62a7c09394269ff37203aee88a10bc3a1 (patch)
tree50ee0fa10b8f06491b83cbbe786ff742127ca02e /engines/dreamweb
parent8a41d5321322d0a59a36519535c089d170e64d28 (diff)
downloadscummvm-rg350-14569bd62a7c09394269ff37203aee88a10bc3a1.tar.gz
scummvm-rg350-14569bd62a7c09394269ff37203aee88a10bc3a1.tar.bz2
scummvm-rg350-14569bd62a7c09394269ff37203aee88a10bc3a1.zip
DREAMWEB: 'zoomonoff' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp41
-rw-r--r--engines/dreamweb/stubs.cpp31
-rw-r--r--engines/dreamweb/stubs.h1
3 files changed, 31 insertions, 42 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index a76a2697e3..e0bb1b1cb3 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -12360,47 +12360,6 @@ void DreamGenContext::findtext1() {
si = ax;
}
-void DreamGenContext::zoomonoff() {
- STACK_CHECK;
- _cmp(data.word(kWatchingtime), 0);
- if (!flags.z())
- { blank(); return; };
- _cmp(data.byte(kPointermode), 2);
- if (flags.z())
- { blank(); return; };
- _cmp(data.byte(kCommandtype), 222);
- if (flags.z())
- goto alreadyonoff;
- data.byte(kCommandtype) = 222;
- al = 39;
- commandonly();
-alreadyonoff:
- ax = data.word(kMousebutton);
- _cmp(ax, data.word(kOldbutton));
- if (flags.z())
- return /* (nozoomonoff) */;
- _and(ax, 1);
- if (!flags.z())
- goto dozoomonoff;
- return;
-dozoomonoff:
- al = data.byte(kZoomon);
- _xor(al, 1);
- data.byte(kZoomon) = al;
- createpanel();
- data.byte(kNewobs) = 0;
- drawfloor();
- printsprites();
- reelsonscreen();
- showicon();
- getunderzoom();
- undertextline();
- al = 39;
- commandonly();
- readmouse();
- worktoscreenm();
-}
-
void DreamGenContext::saveload() {
STACK_CHECK;
_cmp(data.word(kWatchingtime), 0);
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index acba57ae87..d81c7cd55c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1927,5 +1927,36 @@ uint8 *DreamGenContext::getobtextstartCPP() {
return result;
}
+void DreamGenContext::zoomonoff() {
+ if (data.word(kWatchingtime) != 0) {
+ blank();
+ return;
+ }
+ if (data.byte(kPointermode) == 2) {
+ blank();
+ return;
+ }
+ if (data.byte(kCommandtype) != 222) {
+ data.byte(kCommandtype) = 222;
+ commandonly(39);
+ }
+ if (data.word(kMousebutton) == data.word(kOldbutton))
+ return;
+ if ((data.word(kMousebutton) & 1) == 0)
+ return;
+ data.byte(kZoomon) ^= 1;
+ createpanel();
+ data.byte(kNewobs) = 0;
+ drawfloor();
+ printsprites();
+ reelsonscreen();
+ showicon();
+ getunderzoom();
+ undertextline();
+ commandonly(39);
+ readmouse();
+ worktoscreenm();
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index d25a8d13b7..f757c19449 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -246,4 +246,3 @@
void bresenhams();
void examineobtext();
-