aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-12-03 19:20:52 +0100
committerWillem Jan Palenstijn2011-12-03 19:54:05 +0100
commit443ca37afd6fd29416ba0eccecf73e3411045deb (patch)
tree7f5825a6bbbcc35f73dfb07f38987e56362494ac /engines/dreamweb
parent3e1f048aea1387914fd9938d5fb3bacff9040c68 (diff)
downloadscummvm-rg350-443ca37afd6fd29416ba0eccecf73e3411045deb.tar.gz
scummvm-rg350-443ca37afd6fd29416ba0eccecf73e3411045deb.tar.bz2
scummvm-rg350-443ca37afd6fd29416ba0eccecf73e3411045deb.zip
DREAMWEB: Move 'atmospheres' from dreamgen
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp81
-rw-r--r--engines/dreamweb/stubs.cpp84
2 files changed, 84 insertions, 81 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index ce98b1aaf0..f0eb3ad627 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -10890,87 +10890,6 @@ ryansoff:
atmospheres();
}
-void DreamGenContext::atmospheres() {
- STACK_CHECK;
- cl = data.byte(kMapx);
- ch = data.byte(kMapy);
- bx = offset_atmospherelist;
-nextatmos:
- al = cs.byte(bx);
- _cmp(al, 255);
- if (flags.z())
- goto nomoreatmos;
- _cmp(al, data.byte(kReallocation));
- if (!flags.z())
- goto wrongatmos;
- ax = cs.word(bx+1);
- _cmp(ax, cx);
- if (!flags.z())
- goto wrongatmos;
- ax = cs.word(bx+3);
- _cmp(al, data.byte(kCh0playing));
- if (flags.z())
- goto playingalready;
- _cmp(data.byte(kLocation), 45);
- if (!flags.z())
- goto notweb;
- _cmp(data.word(kReeltowatch), 45);
- if (flags.z())
- goto wrongatmos;
-notweb:
- playChannel0();
- _cmp(data.byte(kReallocation), 2);
- _cmp(data.byte(kMapy), 0);
- if (flags.z())
- goto fullvol;
- if (!flags.z())
- goto notlouisvol;
- _cmp(data.byte(kMapy), 10);
- if (!flags.z())
- goto notlouisvol;
- _cmp(data.byte(kMapx), 22);
- if (!flags.z())
- goto notlouisvol;
- data.byte(kVolume) = 5;
-notlouisvol:
- _cmp(data.byte(kReallocation), 14);
- if (!flags.z())
- goto notmad1;
- _cmp(data.byte(kMapx), 33);
- if (flags.z())
- goto ismad2;
- _cmp(data.byte(kMapx), 22);
- if (!flags.z())
- goto notmad1;
- data.byte(kVolume) = 5;
- return;
-ismad2:
- data.byte(kVolume) = 0;
- return;
-notmad1:
-playingalready:
- _cmp(data.byte(kReallocation), 2);
- if (!flags.z())
- return /* (notlouisvol2) */;
- _cmp(data.byte(kMapx), 22);
- if (flags.z())
- goto louisvol;
- _cmp(data.byte(kMapx), 11);
- if (!flags.z())
- return /* (notlouisvol2) */;
-fullvol:
- data.byte(kVolume) = 0;
- return;
-louisvol:
- data.byte(kVolume) = 5;
- return;
-wrongatmos:
- _add(bx, 5);
- goto nextatmos;
-nomoreatmos:
- cancelCh0();
-}
-
void DreamGenContext::walkIntoRoom() {
STACK_CHECK;
_cmp(data.byte(kLocation), 14);
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index ca7401e7d8..7103697a51 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2850,5 +2850,89 @@ void DreamGenContext::useMenu() {
restoreReels();
workToScreenM();
}
+
+void DreamGenContext::atmospheres() {
+ STACK_CHECK;
+ cl = data.byte(kMapx);
+ ch = data.byte(kMapy);
+ bx = offset_atmospherelist;
+nextatmos:
+ al = cs.byte(bx);
+ _cmp(al, 255);
+ if (flags.z())
+ goto nomoreatmos;
+ _cmp(al, data.byte(kReallocation));
+ if (!flags.z())
+ goto wrongatmos;
+ ax = cs.word(bx+1);
+ _cmp(ax, cx);
+ if (!flags.z())
+ goto wrongatmos;
+ ax = cs.word(bx+3);
+ _cmp(al, data.byte(kCh0playing));
+ if (flags.z())
+ goto playingalready;
+ _cmp(data.byte(kLocation), 45);
+ if (!flags.z())
+ goto notweb;
+ _cmp(data.word(kReeltowatch), 45);
+ if (flags.z())
+ goto wrongatmos;
+notweb:
+ playChannel0();
+ _cmp(data.byte(kReallocation), 2);
+ _cmp(data.byte(kMapy), 0);
+ if (flags.z())
+ goto fullvol;
+ if (!flags.z())
+ goto notlouisvol;
+ _cmp(data.byte(kMapy), 10);
+ if (!flags.z())
+ goto notlouisvol;
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ goto notlouisvol;
+ data.byte(kVolume) = 5;
+notlouisvol:
+ _cmp(data.byte(kReallocation), 14);
+ if (!flags.z())
+ goto notmad1;
+ _cmp(data.byte(kMapx), 33);
+ if (flags.z())
+ goto ismad2;
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ goto notmad1;
+ data.byte(kVolume) = 5;
+ return;
+ismad2:
+ data.byte(kVolume) = 0;
+ return;
+notmad1:
+playingalready:
+ _cmp(data.byte(kReallocation), 2);
+ if (!flags.z())
+ return /* (notlouisvol2) */;
+ _cmp(data.byte(kMapx), 22);
+ if (flags.z())
+ goto louisvol;
+ _cmp(data.byte(kMapx), 11);
+ if (!flags.z())
+ return /* (notlouisvol2) */;
+fullvol:
+ data.byte(kVolume) = 0;
+ return;
+louisvol:
+ data.byte(kVolume) = 5;
+ return;
+wrongatmos:
+ _add(bx, 5);
+ goto nextatmos;
+nomoreatmos:
+ cancelCh0();
+}
+
+
+
} /*namespace dreamgen */