aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-07-05 16:38:34 +0200
committeruruk2013-07-05 16:38:34 +0200
commitc6ff09a246dfa9049f917a36a3224f0d703b9c91 (patch)
tree4f0151ae90cb1f497f0b657e35a5f589780eff3c
parentcc5e4bbad04459a075e9afbbe4d1fee25c02a29d (diff)
downloadscummvm-rg350-c6ff09a246dfa9049f917a36a3224f0d703b9c91.tar.gz
scummvm-rg350-c6ff09a246dfa9049f917a36a3224f0d703b9c91.tar.bz2
scummvm-rg350-c6ff09a246dfa9049f917a36a3224f0d703b9c91.zip
AVALANCHE: Lucerna: implement thinkabout(). Modify newpointer() in Gyro.
-rw-r--r--engines/avalanche/gyro2.cpp13
-rw-r--r--engines/avalanche/lucerna2.cpp68
2 files changed, 81 insertions, 0 deletions
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index 7485648eea..2fe3b54920 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -271,7 +271,20 @@ void Gyro::setParent(AvalancheEngine *vm) {
}
void Gyro::newpointer(byte m) {
+ if (m == cmp) return;
+ cmp = m;
+
+ /*r.ax = 9;
+ r.bx = (word)(mps[m].horzhotspot);
+ r.cx = (word)(mps[m].verthotspot);
+ r.es = seg(mps[m].mask);
+ r.dx = ofs(mps[m].mask);
+ intr(0x33, r);
+
+ r is a 'registers' type variable of Gyro in the Pascal code.*/
+
warning("STUB: Gyro::newpointer()");
+ load_a_mouse(m);
}
void Gyro::wait() { /* makes hourglass */
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index d7e2814a74..29fac293e6 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -707,7 +707,75 @@ void Lucerna::enterroom(byte x, byte ped) {
}
void Lucerna::thinkabout(char z, bool th) { /* Hey!!! Get it and put it!!! */
+ const int16 x = 205;
+ const int16 y = 170;
+ const int16 picsize = 966;
+ const bytefield thinkspace = {25, 170, 32, 200};
+ byte *p;
+ byte fv;
+
+
+ _vm->_gyro.thinks = z;
+ z--;
+
+ if (th) {
+ /* Things */
+ _vm->_gyro.wait();
+
+ p = new byte[picsize];
+
+ if (!f.open("thinks.avd")) {
+ warning("AVALANCHE: Lucerna: File not found: thinks.avd");
+ return;
+ }
+
+ f.seek(z * picsize + 65);
+
+ for (int16 i = 0; i < picsize; i++)
+ p[i] = f.readByte();
+
+ _vm->_gyro.off();
+
+ f.close();
+ } else {
+ /* People */
+ _vm->_gyro.wait();
+
+ p = new byte[picsize];
+
+ if (!f.open("folk.avd")) {
+ warning("AVALANCHE: Lucerna: File not found: thinks.avd");
+ return;
+ }
+
+ fv = z - 149;
+ if (fv >= 25)
+ fv -= 8;
+ if (fv == 20)
+ fv--; /* Last time... */
+
+ f.seek(fv * picsize + 65);
+
+ for (int16 i = 0; i < picsize; i++)
+ p[i] = f.readByte();
+
+ _vm->_gyro.off();
+
+ f.close();
+ }
+
+ /*setactivepage(3);
+ putimage(x, y, p, 0);
+ setactivepage(1 - cp);*/
warning("STUB: Lucerna::thinkabout()");
+
+ for (fv = 0; fv <= 1; fv ++)
+ _vm->_trip.getset[fv].remember(thinkspace);
+
+ delete[] p;
+
+ _vm->_gyro.on();
+ _vm->_gyro.thinkthing = th;
}
void Lucerna::load_digits() { /* Load the scoring digits & rwlites */