diff options
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/gyro2.cpp | 13 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 68 |
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 */ |