AVALANCHE: Lucerna: implement thinkabout(). Modify newpointer() in Gyro.
This commit is contained in:
parent
cc5e4bbad0
commit
c6ff09a246
2 changed files with 81 additions and 0 deletions
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue