From 14569bd62a7c09394269ff37203aee88a10bc3a1 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Sun, 9 Oct 2011 17:22:41 +0200 Subject: DREAMWEB: 'zoomonoff' ported to C++ --- engines/dreamweb/dreamgen.cpp | 41 ----------------------------------------- engines/dreamweb/stubs.cpp | 31 +++++++++++++++++++++++++++++++ engines/dreamweb/stubs.h | 1 - 3 files changed, 31 insertions(+), 42 deletions(-) (limited to 'engines/dreamweb') 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(); - -- cgit v1.2.3