scummvm/engines/dreamweb/dreamgen.cpp

8588 lines
158 KiB
C++
Raw Normal View History

/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
2011-06-05 13:38:05 +04:00
#include "dreamgen.h"
2011-06-16 16:31:17 +04:00
namespace DreamGen {
2011-06-05 13:38:05 +04:00
void DreamGenContext::alleyBarkSound() {
STACK_CHECK;
ax = es.word(bx+3);
_dec(ax);
_cmp(ax, 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nobark;
push(bx);
push(es);
al = 14;
playChannel1();
es = pop();
bx = pop();
ax = 1000;
2011-06-05 13:38:05 +04:00
nobark:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::receptionist() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotrecep;
_cmp(data.byte(kCardpassflag), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsetcard;
_inc(data.byte(kCardpassflag));
es.byte(bx+7) = 1;
es.word(bx+3) = 64;
2011-06-05 13:38:05 +04:00
notsetcard:
_cmp(es.word(bx+3), 58);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdes1;
randomNumber();
_cmp(al, 30);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notdes2;
es.word(bx+3) = 55;
2011-06-05 13:38:05 +04:00
goto gotrecep;
notdes1:
_cmp(es.word(bx+3), 60);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdes2;
randomNumber();
_cmp(al, 240);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto gotrecep;
es.word(bx+3) = 53;
2011-06-05 13:38:05 +04:00
goto gotrecep;
notdes2:
_cmp(es.word(bx+3), 88);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendcard;
es.word(bx+3) = 53;
2011-06-05 13:38:05 +04:00
goto gotrecep;
notendcard:
_inc(es.word(bx+3));
2011-06-05 13:38:05 +04:00
gotrecep:
showGameReel();
addToPeopleList();
al = es.byte(bx+7);
_and(al, 128);
if (flags.z())
return /* (nottalkedrecep) */;
data.byte(kTalkedtorecep) = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::attendant() {
STACK_CHECK;
showGameReel();
addToPeopleList();
al = es.byte(bx+7);
_and(al, 128);
if (flags.z())
return /* (nottalked) */;
data.byte(kTalkedtoattendant) = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::louisChair() {
STACK_CHECK;
_cmp(data.byte(kRockstardead), 0);
if (flags.z())
return /* (notlouis2) */;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notlouisanim;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 191);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto restartlouis;
_cmp(ax, 185);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto randomlouis;
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
goto notlouisanim;
randomlouis:
es.word(bx+3) = ax;
randomNumber();
_cmp(al, 245);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto notlouisanim;
2011-06-05 13:38:05 +04:00
restartlouis:
ax = 182;
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
notlouisanim:
showGameReel();
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::manAsleep2() {
STACK_CHECK;
al = es.byte(bx+7);
_and(al, 127);
es.byte(bx+7) = al;
showGameReel();
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::drinker() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotdrinker;
_inc(es.word(bx+3));
_cmp(es.word(bx+3), 115);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdrinker1;
es.word(bx+3) = 105;
2011-06-05 13:38:05 +04:00
goto gotdrinker;
notdrinker1:
_cmp(es.word(bx+3), 106);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotdrinker;
randomNumber();
_cmp(al, 3);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto gotdrinker;
es.word(bx+3) = 105;
2011-06-05 13:38:05 +04:00
gotdrinker:
showGameReel();
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::bartender() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotsmoket;
_cmp(es.word(bx+3), 86);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsmoket1;
randomNumber();
_cmp(al, 18);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notsmoket2;
es.word(bx+3) = 81;
2011-06-05 13:38:05 +04:00
goto gotsmoket;
notsmoket1:
_cmp(es.word(bx+3), 103);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsmoket2;
es.word(bx+3) = 81;
2011-06-05 13:38:05 +04:00
goto gotsmoket;
notsmoket2:
_inc(es.word(bx+3));
2011-06-05 13:38:05 +04:00
gotsmoket:
showGameReel();
_cmp(data.byte(kGunpassflag), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notgotgun;
es.byte(bx+7) = 9;
2011-06-05 13:38:05 +04:00
notgotgun:
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::interviewer() {
STACK_CHECK;
_cmp(data.word(kReeltowatch), 68);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notgeneralstart;
_inc(es.word(bx+3));
2011-06-05 13:38:05 +04:00
notgeneralstart:
_cmp(es.word(bx+3), 250);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto talking;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto talking;
_cmp(es.word(bx+3), 259);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto talking;
_inc(es.word(bx+3));
2011-06-05 13:38:05 +04:00
talking:
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::soldier1() {
STACK_CHECK;
_cmp(es.word(bx+3), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto soldierwait;
data.word(kWatchingtime) = 10;
_cmp(es.word(bx+3), 30);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notaftersshot;
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 40);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotsoldframe;
data.byte(kMandead) = 2;
2011-06-05 13:38:05 +04:00
goto gotsoldframe;
notaftersshot:
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotsoldframe;
_inc(es.word(bx+3));
2011-06-05 13:38:05 +04:00
goto gotsoldframe;
soldierwait:
_cmp(data.byte(kLastweapon), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotsoldframe;
data.word(kWatchingtime) = 10;
_cmp(data.byte(kManspath), 2);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotsoldframe;
_cmp(data.byte(kFacing), 4);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotsoldframe;
_inc(es.word(bx+3));
data.byte(kLastweapon) = -1;
data.byte(kCombatcount) = 0;
2011-06-05 13:38:05 +04:00
gotsoldframe:
showGameReel();
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::helicopter() {
STACK_CHECK;
ax = es.word(bx+3);
_cmp(ax, 203);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto heliwon;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto helispeed;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 53);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notbeforehdead;
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 8);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto waitabit;
data.byte(kMandead) = 2;
2011-06-05 13:38:05 +04:00
waitabit:
ax = 49;
2011-06-05 13:38:05 +04:00
goto gotheliframe;
notbeforehdead:
_cmp(ax, 9);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotheliframe;
_dec(ax);
_cmp(data.byte(kLastweapon), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notgunonheli;
data.byte(kLastweapon) = -1;
ax = 55;
2011-06-05 13:38:05 +04:00
goto gotheliframe;
notgunonheli:
ax = 5;
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 20);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotheliframe;
data.byte(kCombatcount) = 0;
ax = 9;
2011-06-05 13:38:05 +04:00
gotheliframe:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
helispeed:
showGameReel();
al = data.byte(kMapx);
es.byte(bx+1) = al;
ax = es.word(bx+3);
_cmp(ax, 9);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto notwaitingheli;
_cmp(data.byte(kCombatcount), 7);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notwaitingheli;
data.byte(kPointermode) = 2;
data.word(kWatchingtime) = 0;
return;
2011-06-05 13:38:05 +04:00
notwaitingheli:
data.byte(kPointermode) = 0;
data.word(kWatchingtime) = 2;
return;
2011-06-05 13:38:05 +04:00
heliwon:
data.byte(kPointermode) = 0;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::mugger() {
STACK_CHECK;
ax = es.word(bx+3);
_cmp(ax, 138);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endmugger1;
_cmp(ax, 176);
if (flags.z())
return /* (endmugger2) */;
_cmp(ax, 2);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto havesetwatch;
data.word(kWatchingtime) = 175*2;
2011-06-05 13:38:05 +04:00
havesetwatch:
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notmugger;
_inc(es.word(bx+3));
2011-06-05 13:38:05 +04:00
notmugger:
showGameReel();
al = data.byte(kMapx);
es.byte(bx+1) = al;
return;
2011-06-05 13:38:05 +04:00
endmugger1:
push(es);
push(bx);
createPanel2();
showIcon();
al = 41;
findPuzText();
di = 33+20;
bx = 104;
dl = 241;
ah = 0;
printDirect();
workToScreen();
cx = 300;
hangOn();
bx = pop();
es = pop();
push(es);
push(bx);
es.word(bx+3) = 140;
data.byte(kManspath) = 2;
data.byte(kFinaldest) = 2;
findXYFromPath();
data.byte(kResetmanxy) = 1;
al = 'W';
ah = 'E';
cl = 'T';
ch = 'A';
findExObject();
data.byte(kCommand) = al;
data.byte(kObjecttype) = 4;
removeObFromInv();
al = 'W';
ah = 'E';
cl = 'T';
ch = 'B';
findExObject();
data.byte(kCommand) = al;
data.byte(kObjecttype) = 4;
removeObFromInv();
makeMainScreen();
al = 48;
bl = 68-32;
bh = 54+64;
cx = 70;
dx = 10;
setupTimedUse();
data.byte(kBeenmugged) = 1;
bx = pop();
es = pop();
}
void DreamGenContext::businessMan() {
STACK_CHECK;
data.byte(kPointermode) = 0;
data.word(kWatchingtime) = 2;
ax = es.word(bx+3);
_cmp(ax, 2);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notfirstbiz;
push(ax);
push(bx);
push(es);
al = 49;
cx = 30;
dx = 1;
bl = 68;
bh = 174;
setupTimedUse();
es = pop();
bx = pop();
ax = pop();
2011-06-05 13:38:05 +04:00
notfirstbiz:
_cmp(ax, 95);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto buscombatwonend;
_cmp(ax, 49);
if (flags.z())
return /* (buscombatend) */;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto busspeed;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 48);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notbeforedeadb;
data.byte(kMandead) = 2;
2011-06-05 13:38:05 +04:00
goto gotbusframe;
notbeforedeadb:
_cmp(ax, 15);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto buscombatwon;
_dec(ax);
_cmp(data.byte(kLastweapon), 3);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notshieldonbus;
data.byte(kLastweapon) = -1;
data.byte(kCombatcount) = 0;
ax = 51;
2011-06-05 13:38:05 +04:00
goto gotbusframe;
notshieldonbus:
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 20);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotbusframe;
data.byte(kCombatcount) = 0;
ax = 15;
2011-06-05 13:38:05 +04:00
goto gotbusframe;
buscombatwon:
_cmp(ax, 91);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotbusframe;
push(bx);
push(es);
al = 0;
turnPathOn();
al = 1;
turnPathOn();
al = 2;
turnPathOn();
al = 3;
turnPathOff();
data.byte(kManspath) = 5;
data.byte(kFinaldest) = 5;
findXYFromPath();
data.byte(kResetmanxy) = 1;
es = pop();
bx = pop();
ax = 92;
2011-06-05 13:38:05 +04:00
goto gotbusframe;
gotbusframe:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
busspeed:
showGameReel();
al = data.byte(kMapy);
es.byte(bx+2) = al;
ax = es.word(bx+3);
_cmp(ax, 14);
if (!flags.z())
return /* (buscombatend) */;
data.word(kWatchingtime) = 0;
data.byte(kPointermode) = 2;
return;
2011-06-05 13:38:05 +04:00
buscombatwonend:
data.byte(kPointermode) = 0;
data.word(kWatchingtime) = 0;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::poolGuard() {
STACK_CHECK;
ax = es.word(bx+3);
_cmp(ax, 214);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto combatover2;
_cmp(ax, 258);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto combatover2;
_cmp(ax, 185);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto combatover1;
_cmp(ax, 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notfirstpool;
al = 0;
turnPathOn();
2011-06-05 13:38:05 +04:00
notfirstpool:
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto guardspeed;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 122);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendguard1;
_dec(ax);
_cmp(data.byte(kLastweapon), 2);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notaxeonpool;
data.byte(kLastweapon) = -1;
ax = 122;
2011-06-05 13:38:05 +04:00
goto gotguardframe;
notaxeonpool:
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 40);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotguardframe;
data.byte(kCombatcount) = 0;
ax = 195;
2011-06-05 13:38:05 +04:00
goto gotguardframe;
notendguard1:
_cmp(ax, 147);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotguardframe;
_dec(ax);
_cmp(data.byte(kLastweapon), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notgunonpool;
data.byte(kLastweapon) = -1;
ax = 147;
2011-06-05 13:38:05 +04:00
goto gotguardframe;
notgunonpool:
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 40);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotguardframe;
data.byte(kCombatcount) = 0;
ax = 220;
2011-06-05 13:38:05 +04:00
gotguardframe:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
guardspeed:
showGameReel();
ax = es.word(bx+3);
_cmp(ax, 121);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto iswaitingpool;
_cmp(ax, 146);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto iswaitingpool;
data.byte(kPointermode) = 0;
data.word(kWatchingtime) = 2;
return;
2011-06-05 13:38:05 +04:00
iswaitingpool:
data.byte(kPointermode) = 2;
data.word(kWatchingtime) = 0;
return;
2011-06-05 13:38:05 +04:00
combatover1:
data.word(kWatchingtime) = 0;
data.byte(kPointermode) = 0;
al = 0;
turnPathOn();
al = 1;
turnPathOff();
return;
2011-06-05 13:38:05 +04:00
combatover2:
showGameReel();
data.word(kWatchingtime) = 2;
data.byte(kPointermode) = 0;
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 100);
if (flags.c())
return /* (doneover2) */;
data.word(kWatchingtime) = 0;
data.byte(kMandead) = 2;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::heavy() {
STACK_CHECK;
al = es.byte(bx+7);
_and(al, 127);
es.byte(bx+7) = al;
_cmp(es.word(bx+3), 43);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto heavywait;
data.word(kWatchingtime) = 10;
_cmp(es.word(bx+3), 70);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notafterhshot;
_inc(data.byte(kCombatcount));
_cmp(data.byte(kCombatcount), 80);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotheavyframe;
data.byte(kMandead) = 2;
2011-06-05 13:38:05 +04:00
goto gotheavyframe;
notafterhshot:
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotheavyframe;
_inc(es.word(bx+3));
2011-06-05 13:38:05 +04:00
goto gotheavyframe;
heavywait:
_cmp(data.byte(kLastweapon), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotheavyframe;
_cmp(data.byte(kManspath), 5);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotheavyframe;
_cmp(data.byte(kFacing), 4);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotheavyframe;
data.byte(kLastweapon) = -1;
_inc(es.word(bx+3));
data.byte(kCombatcount) = 0;
2011-06-05 13:38:05 +04:00
gotheavyframe:
showGameReel();
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::bossMan() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notboss;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto firstdes;
_cmp(ax, 20);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto secdes;
_cmp(ax, 41);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotallboss;
ax = 0;
_inc(data.byte(kGunpassflag));
es.byte(bx+7) = 10;
2011-06-05 13:38:05 +04:00
goto gotallboss;
firstdes:
_cmp(data.byte(kGunpassflag), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotallboss;
push(ax);
randomNumber();
cl = al;
ax = pop();
_cmp(cl, 10);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto gotallboss;
ax = 0;
2011-06-05 13:38:05 +04:00
goto gotallboss;
secdes:
_cmp(data.byte(kGunpassflag), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotallboss;
ax = 0;
2011-06-05 13:38:05 +04:00
gotallboss:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
notboss:
showGameReel();
addToPeopleList();
al = es.byte(bx+7);
_and(al, 128);
if (flags.z())
return /* (nottalkedboss) */;
data.byte(kTalkedtoboss) = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::keeper() {
STACK_CHECK;
_cmp(data.byte(kKeeperflag), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwaiting;
_cmp(data.word(kReeltowatch), 190);
if (flags.c())
return /* (waiting) */;
_inc(data.byte(kKeeperflag));
ah = es.byte(bx+7);
_and(ah, 127);
_cmp(ah, data.byte(kDreamnumber));
if (flags.z())
return /* (notdiff) */;
al = data.byte(kDreamnumber);
es.byte(bx+7) = al;
return;
2011-06-05 13:38:05 +04:00
notwaiting:
addToPeopleList();
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::candles1() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto candle1;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 44);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendcandle1;
ax = 39;
2011-06-05 13:38:05 +04:00
notendcandle1:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
candle1:
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::smallCandle() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto smallcandlef;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 37);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendsmallcandle;
ax = 25;
2011-06-05 13:38:05 +04:00
notendsmallcandle:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
smallcandlef:
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::candles2() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto candles2fin;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 238);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotcandles2;
ax = 233;
2011-06-05 13:38:05 +04:00
gotcandles2:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
candles2fin:
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::introMagic2() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto introm2fin;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 216);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotintrom2;
ax = 192;
2011-06-05 13:38:05 +04:00
gotintrom2:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
introm2fin:
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::introMagic3() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto introm3fin;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 218);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotintrom3;
data.byte(kGetback) = 1;
2011-06-05 13:38:05 +04:00
gotintrom3:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
introm3fin:
showGameReel();
al = data.byte(kMapx);
es.byte(bx+1) = al;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::introMonks1() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto intromonk1fin;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 80);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendmonk1;
_add(data.byte(kMapy), 10);
data.byte(kNowinnewroom) = 1;
showGameReel();
return;
2011-06-05 13:38:05 +04:00
notendmonk1:
_cmp(ax, 30);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotintromonk1;
_sub(data.byte(kMapy), 10);
data.byte(kNowinnewroom) = 1;
ax = 51;
2011-06-05 13:38:05 +04:00
gotintromonk1:
es.word(bx+3) = ax;
_cmp(ax, 5);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waitstep;
_cmp(ax, 15);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waitstep;
_cmp(ax, 25);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waitstep;
_cmp(ax, 61);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waitstep;
_cmp(ax, 71);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waitstep;
2011-06-05 13:38:05 +04:00
goto intromonk1fin;
waitstep:
push(es);
push(bx);
intro2Text();
bx = pop();
es = pop();
es.byte(bx+6) = -20;
2011-06-05 13:38:05 +04:00
intromonk1fin:
showGameReel();
al = data.byte(kMapy);
es.byte(bx+2) = al;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::introMonks2() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto intromonk2fin;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 87);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nottalk1;
_inc(data.byte(kIntrocount));
push(es);
push(bx);
monks2text();
bx = pop();
es = pop();
_cmp(data.byte(kIntrocount), 19);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notlasttalk1;
ax = 87;
2011-06-05 13:38:05 +04:00
goto gotintromonk2;
notlasttalk1:
ax = 74;
2011-06-05 13:38:05 +04:00
goto gotintromonk2;
nottalk1:
_cmp(ax, 110);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notraisearm;
_inc(data.byte(kIntrocount));
push(es);
push(bx);
monks2text();
bx = pop();
es = pop();
_cmp(data.byte(kIntrocount), 35);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notlastraise;
ax = 111;
2011-06-05 13:38:05 +04:00
goto gotintromonk2;
notlastraise:
ax = 98;
2011-06-05 13:38:05 +04:00
goto gotintromonk2;
notraisearm:
_cmp(ax, 176);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendmonk2;
data.byte(kGetback) = 1;
2011-06-05 13:38:05 +04:00
goto gotintromonk2;
notendmonk2:
_cmp(ax, 125);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotintromonk2;
ax = 140;
2011-06-05 13:38:05 +04:00
gotintromonk2:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
intromonk2fin:
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::monkAndRyan() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notmonkryan;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 83);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotmonkryan;
_inc(data.byte(kIntrocount));
push(es);
push(bx);
textForMonk();
bx = pop();
es = pop();
ax = 77;
_cmp(data.byte(kIntrocount), 57);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotmonkryan;
data.byte(kGetback) = 1;
return;
2011-06-05 13:38:05 +04:00
gotmonkryan:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
notmonkryan:
showGameReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::endGameSeq() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendseq;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 51);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotendseq;
_cmp(data.byte(kIntrocount), 140);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotendseq;
_inc(data.byte(kIntrocount));
push(es);
push(bx);
textForEnd();
bx = pop();
es = pop();
ax = 50;
2011-06-05 13:38:05 +04:00
gotendseq:
es.word(bx+3) = ax;
_cmp(ax, 134);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notfadedown;
push(es);
push(bx);
push(ax);
fadeScreenDownHalf();
ax = pop();
bx = pop();
es = pop();
2011-06-05 13:38:05 +04:00
goto notendseq;
notfadedown:
_cmp(ax, 324);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notfadeend;
push(es);
push(bx);
push(ax);
fadeScreenDowns();
data.byte(kVolumeto) = 7;
data.byte(kVolumedirection) = 1;
ax = pop();
bx = pop();
es = pop();
2011-06-05 13:38:05 +04:00
notfadeend:
_cmp(ax, 340);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendseq;
data.byte(kGetback) = 1;
2011-06-05 13:38:05 +04:00
notendseq:
showGameReel();
al = data.byte(kMapy);
es.byte(bx+2) = al;
ax = es.word(bx+3);
_cmp(ax, 145);
if (!flags.z())
return /* (notendcreds) */;
es.word(bx+3) = 146;
rollEndCredits();
}
void DreamGenContext::rollEndCredits() {
STACK_CHECK;
al = 16;
ah = 255;
playChannel0();
data.byte(kVolume) = 7;
data.byte(kVolumeto) = 0;
data.byte(kVolumedirection) = -1;
cl = 160;
ch = 160;
di = 75;
bx = 20;
ds = data.word(kMapstore);
si = 0;
multiGet();
es = data.word(kTextfile1);
si = 3*2;
ax = es.word(si);
si = ax;
_add(si, (66*2));
cx = 254;
2011-06-05 13:38:05 +04:00
endcredits1:
push(cx);
bx = 10;
cx = data.word(kLinespacing);
2011-06-05 13:38:05 +04:00
endcredits2:
push(cx);
push(si);
push(di);
push(es);
push(bx);
vSync();
cl = 160;
ch = 160;
di = 75;
bx = 20;
ds = data.word(kMapstore);
si = 0;
multiPut();
vSync();
bx = pop();
es = pop();
di = pop();
si = pop();
push(si);
push(di);
push(es);
push(bx);
cx = 18;
2011-06-05 13:38:05 +04:00
onelot:
push(cx);
di = 75;
dx = 161;
ax = 0;
printDirect();
_add(bx, data.word(kLinespacing));
cx = pop();
if (--cx)
2011-06-16 16:31:17 +04:00
goto onelot;
vSync();
cl = 160;
ch = 160;
di = 75;
bx = 20;
multiDump();
bx = pop();
es = pop();
di = pop();
si = pop();
cx = pop();
_dec(bx);
if (--cx)
2011-06-16 16:31:17 +04:00
goto endcredits2;
cx = pop();
2011-06-05 13:38:05 +04:00
looknext:
al = es.byte(si);
_inc(si);
_cmp(al, ':');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotnext;
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotnext;
2011-06-05 13:38:05 +04:00
goto looknext;
gotnext:
if (--cx)
2011-06-16 16:31:17 +04:00
goto endcredits1;
cx = 100;
hangOn();
panelToMap();
fadeScreenUpHalf();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::priest() {
STACK_CHECK;
_cmp(es.word(bx+3), 8);
if (flags.z())
return /* (priestspoken) */;
data.byte(kPointermode) = 0;
data.word(kWatchingtime) = 2;
checkSpeed();
if (!flags.z())
return /* (priestwait) */;
_inc(es.word(bx+3));
push(es);
push(bx);
priestText();
bx = pop();
es = pop();
}
void DreamGenContext::priestText() {
STACK_CHECK;
_cmp(es.word(bx+3), 2);
if (flags.c())
return /* (nopriesttext) */;
_cmp(es.word(bx+3), 7);
if (!flags.c())
return /* (nopriesttext) */;
al = es.byte(bx+3);
_and(al, 1);
if (!flags.z())
return /* (nopriesttext) */;
al = es.byte(bx+3);
_shr(al, 1);
_add(al, 50);
bl = 72;
bh = 80;
cx = 54;
dx = 1;
setupTimedUse();
}
void DreamGenContext::advisor() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto noadvisor;
2011-06-05 13:38:05 +04:00
goto noadvisor;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 123);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendadvis;
ax = 106;
2011-06-05 13:38:05 +04:00
goto gotadvframe;
notendadvis:
_cmp(ax, 108);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotadvframe;
push(ax);
randomNumber();
cl = al;
ax = pop();
_cmp(cl, 3);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto gotadvframe;
ax = 106;
2011-06-05 13:38:05 +04:00
gotadvframe:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
noadvisor:
showGameReel();
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::copper() {
STACK_CHECK;
checkSpeed();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nocopper;
ax = es.word(bx+3);
_inc(ax);
_cmp(ax, 94);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notendcopper;
ax = 64;
2011-06-05 13:38:05 +04:00
goto gotcopframe;
notendcopper:
_cmp(ax, 81);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto mightwait;
_cmp(ax, 66);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotcopframe;
2011-06-05 13:38:05 +04:00
mightwait:
push(ax);
randomNumber();
cl = al;
ax = pop();
_cmp(cl, 7);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto gotcopframe;
_dec(ax);
2011-06-05 13:38:05 +04:00
gotcopframe:
es.word(bx+3) = ax;
2011-06-05 13:38:05 +04:00
nocopper:
showGameReel();
addToPeopleList();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::checkForExit() {
STACK_CHECK;
cl = data.byte(kRyanx);
_add(cl, 12);
ch = data.byte(kRyany);
_add(ch, 12);
checkOne();
data.byte(kLastflag) = cl;
data.byte(kLastflagex) = ch;
data.byte(kFlagx) = dl;
data.byte(kFlagy) = dh;
al = data.byte(kLastflag);
_test(al, 64);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notnewdirect;
al = data.byte(kLastflagex);
data.byte(kAutolocation) = al;
return;
2011-06-05 13:38:05 +04:00
notnewdirect:
_test(al, 32);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notleave;
push(es);
push(bx);
_cmp(data.byte(kReallocation), 2);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notlouis;
bl = 0;
push(bx);
al = 'W';
ah = 'E';
cl = 'T';
ch = 'A';
isRyanHolding();
bx = pop();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noshoe1;
_inc(bl);
2011-06-05 13:38:05 +04:00
noshoe1:
push(bx);
al = 'W';
ah = 'E';
cl = 'T';
ch = 'B';
isRyanHolding();
bx = pop();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noshoe2;
_inc(bl);
2011-06-05 13:38:05 +04:00
noshoe2:
_cmp(bl, 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notlouis;
al = 42;
_cmp(bl, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notravmessage;
_inc(al);
2011-06-05 13:38:05 +04:00
notravmessage:
cx = 80;
dx = 10;
bl = 68;
bh = 64;
setupTimedUse();
al = data.byte(kFacing);
_add(al, 4);
_and(al, 7);
data.byte(kTurntoface) = al;
bx = pop();
es = pop();
return;
2011-06-05 13:38:05 +04:00
notlouis:
bx = pop();
es = pop();
data.byte(kNeedtotravel) = 1;
return;
2011-06-05 13:38:05 +04:00
notleave:
_test(al, 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notaleft;
adjustLeft();
return;
2011-06-05 13:38:05 +04:00
notaleft:
_test(al, 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notaright;
adjustRight();
return;
2011-06-05 13:38:05 +04:00
notaright:
_test(al, 8);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notadown;
adjustDown();
return;
2011-06-05 13:38:05 +04:00
notadown:
_test(al, 16);
if (flags.z())
return /* (notanup) */;
adjustUp();
}
void DreamGenContext::adjustDown() {
STACK_CHECK;
push(es);
push(bx);
_add(data.byte(kMapy), 10);
al = data.byte(kLastflagex);
cl = 16;
_mul(cl);
es.byte(bx+11) = al;
data.byte(kNowinnewroom) = 1;
bx = pop();
es = pop();
}
void DreamGenContext::adjustUp() {
STACK_CHECK;
push(es);
push(bx);
_sub(data.byte(kMapy), 10);
al = data.byte(kLastflagex);
cl = 16;
_mul(cl);
es.byte(bx+11) = al;
data.byte(kNowinnewroom) = 1;
bx = pop();
es = pop();
}
void DreamGenContext::adjustLeft() {
STACK_CHECK;
push(es);
push(bx);
data.byte(kLastflag) = 0;
_sub(data.byte(kMapx), 11);
al = data.byte(kLastflagex);
cl = 16;
_mul(cl);
es.byte(bx+10) = al;
data.byte(kNowinnewroom) = 1;
bx = pop();
es = pop();
}
void DreamGenContext::adjustRight() {
STACK_CHECK;
push(es);
push(bx);
_add(data.byte(kMapx), 11);
al = data.byte(kLastflagex);
cl = 16;
_mul(cl);
_sub(al, 2);
es.byte(bx+10) = al;
data.byte(kNowinnewroom) = 1;
bx = pop();
es = pop();
}
void DreamGenContext::reminders() {
STACK_CHECK;
_cmp(data.byte(kReallocation), 24);
if (!flags.z())
return /* (notinedenslift) */;
_cmp(data.byte(kMapx), 44);
if (!flags.z())
return /* (notinedenslift) */;
_cmp(data.byte(kProgresspoints), 0);
if (!flags.z())
return /* (notfirst) */;
al = 'D';
ah = 'K';
cl = 'E';
ch = 'Y';
isRyanHolding();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto forgotone;
al = 'C';
ah = 'S';
cl = 'H';
ch = 'R';
findExObject();
_cmp(al, (114));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto forgotone;
ax = es.word(bx+2);
_cmp(al, 4);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto forgotone;
_cmp(ah, 255);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto havegotcard;
cl = 'P';
ch = 'U';
dl = 'R';
dh = 'S';
_xchg(al, ah);
compare();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto forgotone;
2011-06-05 14:49:56 +04:00
havegotcard:
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
forgotone:
al = 50;
bl = 54;
bh = 70;
cx = 48;
dx = 8;
setupTimedUse();
}
void DreamGenContext::transferMap() {
STACK_CHECK;
di = data.word(kExframepos);
push(di);
al = data.byte(kExpos);
ah = 0;
bx = ax;
_add(ax, ax);
_add(ax, bx);
cx = 6;
_mul(cx);
es = data.word(kExtras);
bx = (0);
_add(bx, ax);
_add(di, (0+2080));
push(bx);
al = data.byte(kItemtotran);
ah = 0;
bx = ax;
_add(ax, ax);
_add(ax, bx);
cx = 6;
_mul(cx);
ds = data.word(kFreeframes);
bx = (0);
_add(bx, ax);
si = (0+2080);
al = ds.byte(bx);
ah = 0;
cl = ds.byte(bx+1);
ch = 0;
_add(si, ds.word(bx+2));
dx = ds.word(bx+4);
bx = pop();
es.byte(bx+0) = al;
es.byte(bx+1) = cl;
es.word(bx+4) = dx;
_mul(cx);
cx = ax;
push(cx);
_movsb(cx, true);
cx = pop();
ax = pop();
es.word(bx+2) = ax;
_add(data.word(kExframepos), cx);
}
void DreamGenContext::doFade() {
STACK_CHECK;
_cmp(data.byte(kFadedirection), 0);
if (flags.z())
return /* (finishfade) */;
cl = data.byte(kNumtofade);
ch = 0;
al = data.byte(kColourpos);
ah = 0;
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3));
_add(si, ax);
_add(si, ax);
_add(si, ax);
showGroup();
al = data.byte(kNumtofade);
_add(al, data.byte(kColourpos));
data.byte(kColourpos) = al;
_cmp(al, 0);
if (!flags.z())
return /* (finishfade) */;
fadeCalculation();
}
void DreamGenContext::fadeToWhite() {
STACK_CHECK;
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
cx = 768;
al = 63;
_stosb(cx, true);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
al = 0;
_stosb(3);
palToStartPal();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
}
void DreamGenContext::fadeFromWhite() {
STACK_CHECK;
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3));
cx = 768;
al = 63;
_stosb(cx, true);
di = (0+(228*13)+32+60+(32*32)+(11*10*3));
al = 0;
_stosb(3);
palToEndPal();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
}
void DreamGenContext::fadeScreenDownHalf() {
STACK_CHECK;
palToStartPal();
palToEndPal();
cx = 768;
es = data.word(kBuffers);
bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
2011-06-05 14:49:56 +04:00
halfend:
al = es.byte(bx);
_shr(al, 1);
es.byte(bx) = al;
_inc(bx);
if (--cx)
2011-06-16 16:31:17 +04:00
goto halfend;
ds = data.word(kBuffers);
es = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(56*3);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(56*3);
cx = 3*5;
_movsb(cx, true);
si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(77*3);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(77*3);
cx = 3*2;
_movsb(cx, true);
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 31;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 32;
}
void DreamGenContext::showGun() {
STACK_CHECK;
data.byte(kAddtored) = 0;
data.byte(kAddtogreen) = 0;
data.byte(kAddtoblue) = 0;
palToStartPal();
palToEndPal();
greyscaleSum();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
cx = 130;
hangOn();
endPalToStart();
clearEndPal();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
cx = 200;
hangOn();
data.byte(kRoomssample) = 34;
loadRoomsSample();
data.byte(kVolume) = 0;
dx = 1061;
loadIntoTemp();
createPanel2();
ds = data.word(kTempgraphics);
al = 0;
ah = 0;
di = 100;
bx = 4;
showFrame();
ds = data.word(kTempgraphics);
al = 1;
ah = 0;
di = 158;
bx = 106;
showFrame();
workToScreen();
getRidOfTemp();
fadeScreenUp();
cx = 160;
hangOn();
al = 12;
ah = 0;
playChannel0();
dx = 1035;
loadTempText();
rollEndCredits2();
getRidOfTempText();
}
void DreamGenContext::rollEndCredits2() {
STACK_CHECK;
rollEm();
}
void DreamGenContext::rollEm() {
STACK_CHECK;
cl = 160;
ch = 160;
di = 25;
bx = 20;
ds = data.word(kMapstore);
si = 0;
multiGet();
es = data.word(kTextfile1);
si = 49*2;
ax = es.word(si);
si = ax;
_add(si, (66*2));
cx = 80;
2011-06-05 14:49:56 +04:00
endcredits21:
push(cx);
bx = 10;
cx = data.word(kLinespacing);
2011-06-05 14:49:56 +04:00
endcredits22:
push(cx);
push(si);
push(di);
push(es);
push(bx);
vSync();
cl = 160;
ch = 160;
di = 25;
bx = 20;
ds = data.word(kMapstore);
si = 0;
multiPut();
vSync();
bx = pop();
es = pop();
di = pop();
si = pop();
push(si);
push(di);
push(es);
push(bx);
cx = 18;
2011-06-05 14:49:56 +04:00
onelot2:
push(cx);
di = 25;
dx = 161;
ax = 0;
printDirect();
_add(bx, data.word(kLinespacing));
cx = pop();
if (--cx)
2011-06-16 16:31:17 +04:00
goto onelot2;
vSync();
cl = 160;
ch = 160;
di = 25;
bx = 20;
multiDump();
bx = pop();
es = pop();
di = pop();
si = pop();
cx = pop();
_cmp(data.byte(kLasthardkey), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endearly2;
_dec(bx);
if (--cx)
2011-06-16 16:31:17 +04:00
goto endcredits22;
cx = pop();
2011-06-05 14:49:56 +04:00
looknext2:
al = es.byte(si);
_inc(si);
_cmp(al, ':');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotnext2;
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotnext2;
2011-06-05 14:49:56 +04:00
goto looknext2;
gotnext2:
_cmp(data.byte(kLasthardkey), 1);
if (flags.z())
return /* (endearly) */;
if (--cx)
2011-06-16 16:31:17 +04:00
goto endcredits21;
cx = 120;
hangOne();
return;
2011-06-05 14:49:56 +04:00
endearly2:
cx = pop();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::greyscaleSum() {
STACK_CHECK;
es = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
cx = 256;
2011-06-05 14:49:56 +04:00
greysumloop1:
push(cx);
bx = 0;
al = es.byte(si);
ah = 0;
cx = 20;
_mul(cx);
_add(bx, ax);
al = es.byte(si+1);
ah = 0;
cx = 59;
_mul(cx);
_add(bx, ax);
al = es.byte(si+2);
ah = 0;
cx = 11;
_mul(cx);
_add(bx, ax);
al = -1;
2011-06-05 14:49:56 +04:00
greysumloop2:
_inc(al);
_sub(bx, 100);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto greysumloop2;
bl = al;
al = bl;
ah = data.byte(kAddtored);
_cmp(al, 0);
_add(al, ah);
_stosb();
ah = data.byte(kAddtogreen);
al = bl;
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noaddg;
_add(al, ah);
2011-06-05 14:49:56 +04:00
noaddg:
_stosb();
ah = data.byte(kAddtoblue);
al = bl;
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noaddb;
_add(al, ah);
2011-06-05 14:49:56 +04:00
noaddb:
_stosb();
_add(si, 3);
cx = pop();
if (--cx)
2011-06-16 16:31:17 +04:00
goto greysumloop1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::allPalette() {
STACK_CHECK;
es = data.word(kBuffers);
ds = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3));
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
cx = 768/2;
_movsw(cx, true);
dumpCurrent();
}
void DreamGenContext::dumpCurrent() {
STACK_CHECK;
si = (0+(228*13)+32+60+(32*32)+(11*10*3));
ds = data.word(kBuffers);
vSync();
al = 0;
cx = 128;
showGroup();
vSync();
al = 128;
cx = 128;
showGroup();
}
void DreamGenContext::fadeDownMon() {
STACK_CHECK;
palToStartPal();
palToEndPal();
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
cx = 3*8;
ax = 0;
_stosb(cx, true);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
_stosb();
_stosw();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
cx = 64;
hangOn();
}
void DreamGenContext::fadeUpMon() {
STACK_CHECK;
palToStartPal();
palToEndPal();
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(231*3);
cx = 3*8;
ax = 0;
_stosb(cx, true);
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
_stosb();
_stosw();
data.byte(kFadedirection) = 1;
data.byte(kFadecount) = 63;
data.byte(kColourpos) = 0;
data.byte(kNumtofade) = 128;
cx = 128;
hangOn();
}
void DreamGenContext::initialMonCols() {
STACK_CHECK;
palToStartPal();
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
cx = 3*9;
ax = 0;
_stosb(cx, true);
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
_stosb();
_stosw();
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
al = 230;
cx = 18;
showGroup();
}
void DreamGenContext::endGame() {
STACK_CHECK;
dx = 1035;
loadTempText();
monkSpeaking();
gettingShot();
getRidOfTempText();
data.byte(kVolumeto) = 7;
data.byte(kVolumedirection) = 1;
cx = 200;
hangOn();
}
void DreamGenContext::monkSpeaking() {
STACK_CHECK;
data.byte(kRoomssample) = 35;
loadRoomsSample();
dx = 1074;
loadIntoTemp();
clearWork();
showMonk();
workToScreen();
data.byte(kVolume) = 7;
data.byte(kVolumedirection) = -1;
data.byte(kVolumeto) = 5;
al = 12;
ah = 255;
playChannel0();
fadeScreenUps();
cx = 300;
hangOn();
al = 40;
loadspeech2:
push(ax);
dl = 'T';
dh = 83;
cl = 'T';
ah = 0;
loadSpeech();
al = 50+12;
playChannel1();
notloadspeech2:
vSync();
_cmp(data.byte(kCh1playing), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notloadspeech2;
ax = pop();
_inc(al);
_cmp(al, 48);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto loadspeech2;
data.byte(kVolumedirection) = 1;
data.byte(kVolumeto) = 7;
fadeScreenDowns();
cx = 300;
hangOn();
getRidOfTemp();
}
void DreamGenContext::showMonk() {
STACK_CHECK;
al = 0;
ah = 128;
di = 160;
bx = 72;
ds = data.word(kTempgraphics);
showFrame();
}
void DreamGenContext::runIntroSeq() {
STACK_CHECK;
data.byte(kGetback) = 0;
2011-06-05 14:49:56 +04:00
moreintroseq:
vSync();
_cmp(data.byte(kLasthardkey), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto earlyendrun;
spriteUpdate();
vSync();
_cmp(data.byte(kLasthardkey), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto earlyendrun;
delEverything();
printSprites();
reelsOnScreen();
afterIntroRoom();
useTimedText();
vSync();
_cmp(data.byte(kLasthardkey), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto earlyendrun;
dumpMap();
dumpTimedText();
vSync();
_cmp(data.byte(kLasthardkey), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto earlyendrun;
_cmp(data.byte(kGetback), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto moreintroseq;
return;
2011-06-05 14:49:56 +04:00
earlyendrun:
getRidOfTempText();
clearBeforeLoad();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::runEndSeq() {
STACK_CHECK;
atmospheres();
data.byte(kGetback) = 0;
2011-06-05 14:49:56 +04:00
moreendseq:
vSync();
spriteUpdate();
vSync();
delEverything();
printSprites();
reelsOnScreen();
afterIntroRoom();
useTimedText();
vSync();
dumpMap();
dumpTimedText();
vSync();
_cmp(data.byte(kGetback), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto moreendseq;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::fillOpen() {
STACK_CHECK;
delTextLine();
getOpenedSize();
_cmp(ah, 4);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto lessthanapage;
ah = 4;
2011-06-05 14:49:56 +04:00
lessthanapage:
al = 1;
push(ax);
es = data.word(kBuffers);
di = (0+(228*13));
findAllOpen();
si = (0+(228*13));
di = (80);
bx = (58)+96;
cx = pop();
2011-06-05 14:49:56 +04:00
openloop1:
push(cx);
push(di);
push(bx);
ax = es.word(si);
_add(si, 2);
push(si);
push(es);
_cmp(ch, cl);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto nextopenslot;
obToInv();
2011-06-05 14:49:56 +04:00
nextopenslot:
es = pop();
si = pop();
bx = pop();
di = pop();
cx = pop();
_add(di, (44));
_inc(cl);
_cmp(cl, 5);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto openloop1;
underTextLine();
}
void DreamGenContext::findAllOpen() {
STACK_CHECK;
push(di);
cx = 16;
ax = 0x0ffff;
_stosw(cx, true);
di = pop();
cl = data.byte(kOpenedob);
dl = data.byte(kOpenedtype);
ds = data.word(kExtras);
bx = (0+2080+30000);
ch = 0;
2011-06-05 14:49:56 +04:00
findopen1:
_cmp(ds.byte(bx+3), cl);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findopen2;
_cmp(ds.byte(bx+2), dl);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findopen2;
_cmp(data.byte(kOpenedtype), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noloccheck;
al = ds.byte(bx+5);
_cmp(al, data.byte(kReallocation));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findopen2;
2011-06-05 14:49:56 +04:00
noloccheck:
al = ds.byte(bx+4);
ah = 0;
push(di);
_add(di, ax);
_add(di, ax);
al = ch;
ah = 4;
_stosw();
di = pop();
2011-06-05 14:49:56 +04:00
findopen2:
_add(bx, 16);
_inc(ch);
_cmp(ch, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findopen1;
cl = data.byte(kOpenedob);
dl = data.byte(kOpenedtype);
push(dx);
ds = data.word(kFreedat);
dx = pop();
bx = 0;
ch = 0;
2011-06-05 14:49:56 +04:00
findopen1a:
_cmp(ds.byte(bx+3), cl);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findopen2a;
_cmp(ds.byte(bx+2), dl);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findopen2a;
al = ds.byte(bx+4);
ah = 0;
push(di);
_add(di, ax);
_add(di, ax);
al = ch;
ah = 2;
_stosw();
di = pop();
2011-06-05 14:49:56 +04:00
findopen2a:
_add(bx, 16);
_inc(ch);
_cmp(ch, 80);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findopen1a;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::incRyanPage() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 222);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyincryan;
data.byte(kCommandtype) = 222;
al = 31;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyincryan:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (noincryan) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doincryan;
return;
2011-06-05 14:49:56 +04:00
doincryan:
ax = data.word(kMousex);
_sub(ax, (80)+167);
data.byte(kRyanpage) = -1;
2011-06-05 14:49:56 +04:00
findnewpage:
_inc(data.byte(kRyanpage));
_sub(ax, 18);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto findnewpage;
delPointer();
fillRyan();
readMouse();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::openOb() {
STACK_CHECK;
al = data.byte(kOpenedob);
ah = data.byte(kOpenedtype);
di = offset_commandline;
copyName();
di = (80);
bx = (58)+86;
al = 62;
dl = 240;
printMessage();
di = data.word(kLastxpos);
_add(di, 5);
bx = (58)+86;
es = cs;
si = offset_commandline;
dl = 220;
al = 0;
ah = 0;
printDirect();
fillOpen();
getOpenedSize();
al = ah;
ah = 0;
cx = (44);
_mul(cx);
_add(ax, (80));
bx = offset_openchangesize;
cs.word(bx) = ax;
}
void DreamGenContext::describeOb() {
STACK_CHECK;
getObTextStart();
di = 33;
bx = 92;
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto notsetd;
_cmp(data.byte(kObjecttype), 1);
if (!flags.z())
goto notsetd;
bx = 82;
notsetd:
dl = 241;
ah = 16;
data.word(kCharshift) = 91+91;
printDirect();
data.word(kCharshift) = 0;
di = 36;
bx = 104;
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto notsetd2;
_cmp(data.byte(kObjecttype), 1);
if (!flags.z())
goto notsetd2;
bx = 94;
notsetd2:
dl = 241;
ah = 0;
printDirect();
push(bx);
obsThatDoThings();
bx = pop();
additionalText();
}
void DreamGenContext::additionalText() {
STACK_CHECK;
_add(bx, 10);
push(bx);
al = data.byte(kCommand);
ah = data.byte(kObjecttype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'E';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto emptycup;
al = data.byte(kCommand);
ah = data.byte(kObjecttype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'F';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto fullcup;
bx = pop();
return;
2011-06-05 14:49:56 +04:00
emptycup:
al = 40;
findPuzText();
bx = pop();
di = 36;
dl = 241;
ah = 0;
printDirect();
return;
2011-06-05 14:49:56 +04:00
fullcup:
al = 39;
findPuzText();
bx = pop();
di = 36;
dl = 241;
ah = 0;
printDirect();
}
void DreamGenContext::getObTextStart() {
STACK_CHECK;
es = data.word(kFreedesc);
si = (0);
cx = (0+(82*2));
_cmp(data.byte(kObjecttype), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto describe;
es = data.word(kSetdesc);
si = (0);
cx = (0+(130*2));
_cmp(data.byte(kObjecttype), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto describe;
es = data.word(kExtras);
si = (0+2080+30000+(16*114));
cx = (0+2080+30000+(16*114)+((114+2)*2));
2011-06-05 14:49:56 +04:00
describe:
al = data.byte(kCommand);
ah = 0;
_add(ax, ax);
_add(si, ax);
ax = es.word(si);
_add(ax, cx);
si = ax;
bx = ax;
2011-06-05 14:49:56 +04:00
tryagain:
push(si);
findNextColon();
al = es.byte(si);
cx = si;
si = pop();
_cmp(data.byte(kObjecttype), 1);
if (!flags.z())
return /* (cantmakeoneup) */;
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto findsometext;
_cmp(al, ':');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto findsometext;
return;
2011-06-05 14:49:56 +04:00
findsometext:
searchForSame();
2011-06-05 14:49:56 +04:00
goto tryagain;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::searchForSame() {
STACK_CHECK;
si = cx;
2011-06-05 14:49:56 +04:00
searchagain:
_inc(si);
al = es.byte(bx);
2011-06-05 14:49:56 +04:00
search:
_cmp(es.byte(si), al);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotstartletter;
_inc(cx);
_inc(si);
_cmp(si, 8000);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto search;
si = bx;
ax = pop();
return;
2011-06-05 14:49:56 +04:00
gotstartletter:
push(bx);
push(si);
2011-06-05 14:49:56 +04:00
keepchecking:
_inc(si);
_inc(bx);
al = es.byte(bx);
ah = es.byte(si);
_cmp(al, ':');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundmatch;
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundmatch;
_cmp(al, ah);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto keepchecking;
si = pop();
bx = pop();
2011-06-05 14:49:56 +04:00
goto searchagain;
foundmatch:
si = pop();
bx = pop();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::setPickup() {
STACK_CHECK;
_cmp(data.byte(kObjecttype), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto cantpick;
_cmp(data.byte(kObjecttype), 3);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto cantpick;
getAnyAd();
al = es.byte(bx+2);
_cmp(al, 4);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto canpick;
2011-06-05 14:49:56 +04:00
cantpick:
blank();
return;
2011-06-05 14:49:56 +04:00
canpick:
_cmp(data.byte(kCommandtype), 209);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadysp;
data.byte(kCommandtype) = 209;
bl = data.byte(kCommand);
bh = data.byte(kObjecttype);
al = 33;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadysp:
ax = data.word(kMousebutton);
_cmp(ax, 1);
if (!flags.z())
return /* (nosetpick) */;
_cmp(ax, data.word(kOldbutton));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto dosetpick;
return;
2011-06-05 14:49:56 +04:00
dosetpick:
createPanel();
showPanel();
showMan();
showExit();
examIcon();
data.byte(kPickup) = 1;
data.byte(kInvopen) = 2;
_cmp(data.byte(kObjecttype), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto pickupexob;
al = data.byte(kCommand);
data.byte(kItemframe) = al;
data.byte(kOpenedob) = 255;
transferToEx();
data.byte(kItemframe) = al;
data.byte(kObjecttype) = 4;
getEitherAd();
es.byte(bx+2) = 20;
es.byte(bx+3) = 255;
openInv();
workToScreenM();
return;
2011-06-05 14:49:56 +04:00
pickupexob:
al = data.byte(kCommand);
data.byte(kItemframe) = al;
data.byte(kOpenedob) = 255;
openInv();
workToScreenM();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::examineInventory() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 249);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyexinv;
data.byte(kCommandtype) = 249;
al = 32;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyexinv:
ax = data.word(kMousebutton);
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doexinv;
return;
2011-06-05 14:49:56 +04:00
doexinv:
createPanel();
showPanel();
showMan();
showExit();
examIcon();
data.byte(kPickup) = 0;
data.byte(kInvopen) = 2;
openInv();
workToScreenM();
}
void DreamGenContext::reExFromInv() {
STACK_CHECK;
findInvPos();
ax = es.word(bx);
data.byte(kCommandtype) = ah;
data.byte(kCommand) = al;
data.byte(kExamagain) = 1;
data.byte(kPointermode) = 0;
}
void DreamGenContext::swapWithInv() {
STACK_CHECK;
al = data.byte(kItemframe);
ah = data.byte(kObjecttype);
_cmp(ax, data.word(kOldsubject));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto difsub7;
_cmp(data.byte(kCommandtype), 243);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyswap1;
data.byte(kCommandtype) = 243;
2011-06-05 14:49:56 +04:00
difsub7:
data.word(kOldsubject) = ax;
bx = ax;
al = 34;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadyswap1:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (cantswap1) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doswap1;
return;
2011-06-05 14:49:56 +04:00
doswap1:
ah = data.byte(kObjecttype);
al = data.byte(kItemframe);
push(ax);
findInvPos();
ax = es.word(bx);
data.byte(kItemframe) = al;
data.byte(kObjecttype) = ah;
getEitherAd();
es.byte(bx+2) = 20;
es.byte(bx+3) = 255;
bl = data.byte(kItemframe);
bh = data.byte(kObjecttype);
ax = pop();
data.byte(kObjecttype) = ah;
data.byte(kItemframe) = al;
push(bx);
findInvPos();
delPointer();
al = data.byte(kItemframe);
getEitherAd();
es.byte(bx+2) = 4;
es.byte(bx+3) = 255;
al = data.byte(kLastinvpos);
es.byte(bx+4) = al;
ax = pop();
data.byte(kObjecttype) = ah;
data.byte(kItemframe) = al;
fillRyan();
readMouse();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::swapWithOpen() {
STACK_CHECK;
al = data.byte(kItemframe);
ah = data.byte(kObjecttype);
_cmp(ax, data.word(kOldsubject));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto difsub8;
_cmp(data.byte(kCommandtype), 242);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyswap2;
data.byte(kCommandtype) = 242;
2011-06-05 14:49:56 +04:00
difsub8:
data.word(kOldsubject) = ax;
bx = ax;
al = 34;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadyswap2:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (cantswap2) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doswap2;
return;
2011-06-05 14:49:56 +04:00
doswap2:
getEitherAd();
isItWorn();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwornswap;
wornError();
return;
2011-06-05 14:49:56 +04:00
notwornswap:
delPointer();
al = data.byte(kItemframe);
_cmp(al, data.byte(kOpenedob));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto isntsame2;
al = data.byte(kObjecttype);
_cmp(al, data.byte(kOpenedtype));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto isntsame2;
errorMessage1();
return;
2011-06-05 14:49:56 +04:00
isntsame2:
checkObjectSize();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto sizeok2;
return;
2011-06-05 14:49:56 +04:00
sizeok2:
ah = data.byte(kObjecttype);
al = data.byte(kItemframe);
push(ax);
findOpenPos();
ax = es.word(bx);
data.byte(kItemframe) = al;
data.byte(kObjecttype) = ah;
_cmp(ah, 4);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto makeswapex;
getEitherAd();
es.byte(bx+2) = 20;
es.byte(bx+3) = 255;
2011-06-05 14:49:56 +04:00
goto actuallyswap;
makeswapex:
transferToEx();
data.byte(kItemframe) = al;
data.byte(kObjecttype) = 4;
getEitherAd();
es.byte(bx+2) = 20;
es.byte(bx+3) = 255;
2011-06-05 14:49:56 +04:00
actuallyswap:
bl = data.byte(kItemframe);
bh = data.byte(kObjecttype);
ax = pop();
data.byte(kObjecttype) = ah;
data.byte(kItemframe) = al;
push(bx);
findOpenPos();
getEitherAd();
al = data.byte(kOpenedtype);
es.byte(bx+2) = al;
al = data.byte(kOpenedob);
es.byte(bx+3) = al;
al = data.byte(kLastinvpos);
es.byte(bx+4) = al;
al = data.byte(kReallocation);
es.byte(bx+5) = al;
ax = pop();
data.byte(kObjecttype) = ah;
data.byte(kItemframe) = al;
fillOpen();
fillRyan();
underTextLine();
readMouse();
useOpened();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::inToInv() {
STACK_CHECK;
_cmp(data.byte(kPickup), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notout;
outOfInv();
return;
2011-06-05 14:49:56 +04:00
notout:
findInvPos();
ax = es.word(bx);
_cmp(al, 255);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto canplace1;
swapWithInv();
return;
2011-06-05 14:49:56 +04:00
canplace1:
al = data.byte(kItemframe);
ah = data.byte(kObjecttype);
_cmp(ax, data.word(kOldsubject));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto difsub1;
_cmp(data.byte(kCommandtype), 220);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyplce;
data.byte(kCommandtype) = 220;
2011-06-05 14:49:56 +04:00
difsub1:
data.word(kOldsubject) = ax;
bx = ax;
al = 35;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadyplce:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (notletgo2) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doplace;
return;
2011-06-05 14:49:56 +04:00
doplace:
delPointer();
al = data.byte(kItemframe);
getExAd();
es.byte(bx+2) = 4;
es.byte(bx+3) = 255;
al = data.byte(kLastinvpos);
es.byte(bx+4) = al;
data.byte(kPickup) = 0;
fillRyan();
readMouse();
showPointer();
outOfInv();
workToScreen();
delPointer();
}
void DreamGenContext::outOfInv() {
STACK_CHECK;
findInvPos();
ax = es.word(bx);
_cmp(al, 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto canpick2;
blank();
return;
2011-06-05 14:49:56 +04:00
canpick2:
bx = data.word(kMousebutton);
_cmp(bx, 2);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto canpick2a;
reExFromInv();
return;
2011-06-05 14:49:56 +04:00
canpick2a:
_cmp(ax, data.word(kOldsubject));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto difsub3;
_cmp(data.byte(kCommandtype), 221);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadygrab;
data.byte(kCommandtype) = 221;
2011-06-05 14:49:56 +04:00
difsub3:
data.word(kOldsubject) = ax;
bx = ax;
al = 36;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadygrab:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (notletgo) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto dograb;
return;
2011-06-05 14:49:56 +04:00
dograb:
delPointer();
data.byte(kPickup) = 1;
findInvPos();
ax = es.word(bx);
data.byte(kItemframe) = al;
data.byte(kObjecttype) = ah;
getExAd();
es.byte(bx+2) = 20;
es.byte(bx+3) = 255;
fillRyan();
readMouse();
showPointer();
inToInv();
workToScreen();
delPointer();
}
void DreamGenContext::getFreeAd() {
STACK_CHECK;
ah = 0;
cl = 4;
_shl(ax, cl);
bx = ax;
es = data.word(kFreedat);
}
void DreamGenContext::getExAd() {
STACK_CHECK;
ah = 0;
bx = 16;
_mul(bx);
bx = ax;
es = data.word(kExtras);
_add(bx, (0+2080+30000));
}
void DreamGenContext::getEitherAd() {
STACK_CHECK;
_cmp(data.byte(kObjecttype), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto isinexlist;
al = data.byte(kItemframe);
getFreeAd();
return;
2011-06-05 14:49:56 +04:00
isinexlist:
al = data.byte(kItemframe);
getExAd();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::getAnyAd() {
STACK_CHECK;
_cmp(data.byte(kObjecttype), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto isex;
_cmp(data.byte(kObjecttype), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto isfree;
al = data.byte(kCommand);
getSetAd();
ax = es.word(bx+4);
return;
2011-06-05 14:49:56 +04:00
isfree:
al = data.byte(kCommand);
getFreeAd();
ax = es.word(bx+7);
return;
2011-06-05 14:49:56 +04:00
isex:
al = data.byte(kCommand);
getExAd();
ax = es.word(bx+7);
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::getOpenedSize() {
STACK_CHECK;
_cmp(data.byte(kOpenedtype), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto isex2;
_cmp(data.byte(kOpenedtype), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto isfree2;
al = data.byte(kOpenedob);
getSetAd();
ax = es.word(bx+3);
return;
2011-06-05 14:49:56 +04:00
isfree2:
al = data.byte(kOpenedob);
getFreeAd();
ax = es.word(bx+7);
return;
2011-06-05 14:49:56 +04:00
isex2:
al = data.byte(kOpenedob);
getExAd();
ax = es.word(bx+7);
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::getSetAd() {
STACK_CHECK;
ah = 0;
bx = 64;
_mul(bx);
bx = ax;
es = data.word(kSetdat);
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::findInvPos() {
STACK_CHECK;
cx = data.word(kMousex);
_sub(cx, (80));
bx = -1;
2011-06-05 14:49:56 +04:00
findinv1:
_inc(bx);
_sub(cx, (44));
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto findinv1;
cx = data.word(kMousey);
_sub(cx, (58));
_sub(bx, 5);
2011-06-05 14:49:56 +04:00
findinv2:
_add(bx, 5);
_sub(cx, (44));
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto findinv2;
al = data.byte(kRyanpage);
ah = 0;
cx = 10;
_mul(cx);
_add(bx, ax);
al = bl;
data.byte(kLastinvpos) = al;
_add(bx, bx);
es = data.word(kBuffers);
_add(bx, (0+(228*13)+32));
}
void DreamGenContext::findOpenPos() {
STACK_CHECK;
cx = data.word(kMousex);
_sub(cx, (80));
bx = -1;
2011-06-05 14:49:56 +04:00
findopenp1:
_inc(bx);
_sub(cx, (44));
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto findopenp1;
al = bl;
data.byte(kLastinvpos) = al;
_add(bx, bx);
es = data.word(kBuffers);
_add(bx, (0+(228*13)));
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::dropObject() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 223);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadydrop;
data.byte(kCommandtype) = 223;
_cmp(data.byte(kPickup), 0);
if (flags.z())
{ blank(); return; };
bl = data.byte(kItemframe);
bh = data.byte(kObjecttype);
al = 37;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadydrop:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (nodrop) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto dodrop;
return;
2011-06-05 14:49:56 +04:00
dodrop:
getEitherAd();
isItWorn();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nowornerror;
wornError();
return;
2011-06-05 14:49:56 +04:00
nowornerror:
_cmp(data.byte(kReallocation), 47);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nodrop2;
cl = data.byte(kRyanx);
_add(cl, 12);
ch = data.byte(kRyany);
_add(ch, 12);
checkOne();
_cmp(cl, 2);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto nodroperror;
2011-06-05 14:49:56 +04:00
nodrop2:
dropError();
return;
2011-06-05 14:49:56 +04:00
nodroperror:
_cmp(data.byte(kMapxsize), 64);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinlift;
_cmp(data.byte(kMapysize), 64);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinlift;
dropError();
return;
2011-06-05 14:49:56 +04:00
notinlift:
al = data.byte(kItemframe);
ah = 4;
cl = 'G';
ch = 'U';
dl = 'N';
dh = 'A';
compare();
if (flags.z())
{ cantDrop(); return; };
al = data.byte(kItemframe);
ah = 4;
cl = 'S';
ch = 'H';
dl = 'L';
dh = 'D';
compare();
if (flags.z())
{ cantDrop(); return; };
data.byte(kObjecttype) = 4;
al = data.byte(kItemframe);
getExAd();
es.byte(bx+2) = 0;
al = data.byte(kRyanx);
_add(al, 4);
cl = 4;
_shr(al, cl);
_add(al, data.byte(kMapx));
ah = data.byte(kRyany);
_add(ah, 8);
cl = 4;
_shr(ah, cl);
_add(ah, data.byte(kMapy));
es.byte(bx+3) = al;
es.byte(bx+5) = ah;
al = data.byte(kRyanx);
_add(al, 4);
_and(al, 15);
ah = data.byte(kRyany);
_add(ah, 8);
_and(ah, 15);
es.byte(bx+4) = al;
es.byte(bx+6) = ah;
data.byte(kPickup) = 0;
al = data.byte(kReallocation);
es.byte(bx) = al;
}
void DreamGenContext::dropError() {
STACK_CHECK;
data.byte(kCommandtype) = 255;
delPointer();
di = 76;
bx = 21;
al = 56;
dl = 240;
printMessage();
workToScreenM();
cx = 50;
hangOnP();
showPanel();
showMan();
examIcon();
data.byte(kCommandtype) = 255;
workToScreenM();
}
void DreamGenContext::cantDrop() {
STACK_CHECK;
data.byte(kCommandtype) = 255;
delPointer();
di = 76;
bx = 21;
al = 24;
dl = 240;
printMessage();
workToScreenM();
cx = 50;
hangOnP();
showPanel();
showMan();
examIcon();
data.byte(kCommandtype) = 255;
workToScreenM();
}
void DreamGenContext::removeObFromInv() {
STACK_CHECK;
_cmp(data.byte(kCommand), 100);
if (flags.z())
return /* (obnotexist) */;
getAnyAd();
di = bx;
cl = data.byte(kCommand);
ch = 0;
deleteExObject();
}
void DreamGenContext::selectOpenOb() {
STACK_CHECK;
al = data.byte(kCommand);
getAnyAd();
_cmp(al, 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto canopenit1;
blank();
return;
2011-06-05 14:49:56 +04:00
canopenit1:
_cmp(data.byte(kCommandtype), 224);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyopob;
data.byte(kCommandtype) = 224;
bl = data.byte(kCommand);
bh = data.byte(kObjecttype);
al = 38;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadyopob:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (noopenob) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doopenob;
return;
2011-06-05 14:49:56 +04:00
doopenob:
al = data.byte(kCommand);
data.byte(kOpenedob) = al;
al = data.byte(kObjecttype);
data.byte(kOpenedtype) = al;
createPanel();
showPanel();
showMan();
examIcon();
showExit();
openInv();
openOb();
underTextLine();
readMouse();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::useOpened() {
STACK_CHECK;
_cmp(data.byte(kOpenedob), 255);
if (flags.z())
return /* (cannotuseopen) */;
_cmp(data.byte(kPickup), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notout2;
outOfOpen();
return;
2011-06-05 14:49:56 +04:00
notout2:
findOpenPos();
ax = es.word(bx);
_cmp(al, 255);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto canplace3;
swapWithOpen();
return;
2011-06-05 14:49:56 +04:00
canplace3:
_cmp(data.byte(kPickup), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto intoopen;
blank();
return;
2011-06-05 14:49:56 +04:00
intoopen:
al = data.byte(kItemframe);
ah = data.byte(kObjecttype);
_cmp(ax, data.word(kOldsubject));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto difsub2;
_cmp(data.byte(kCommandtype), 227);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyplc2;
data.byte(kCommandtype) = 227;
2011-06-05 14:49:56 +04:00
difsub2:
data.word(kOldsubject) = ax;
bx = ax;
al = 35;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadyplc2:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (notletgo3) */;
_cmp(ax, 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto doplace2;
return;
2011-06-05 14:49:56 +04:00
doplace2:
getEitherAd();
isItWorn();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notworntoopen;
wornError();
return;
2011-06-05 14:49:56 +04:00
notworntoopen:
delPointer();
al = data.byte(kItemframe);
_cmp(al, data.byte(kOpenedob));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto isntsame;
al = data.byte(kObjecttype);
_cmp(al, data.byte(kOpenedtype));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto isntsame;
errorMessage1();
return;
2011-06-05 14:49:56 +04:00
isntsame:
checkObjectSize();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto sizeok1;
return;
2011-06-05 14:49:56 +04:00
sizeok1:
data.byte(kPickup) = 0;
al = data.byte(kItemframe);
getEitherAd();
al = data.byte(kOpenedtype);
es.byte(bx+2) = al;
al = data.byte(kOpenedob);
es.byte(bx+3) = al;
al = data.byte(kLastinvpos);
es.byte(bx+4) = al;
al = data.byte(kReallocation);
es.byte(bx+5) = al;
fillOpen();
underTextLine();
readMouse();
useOpened();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::checkObjectSize() {
STACK_CHECK;
getOpenedSize();
push(ax);
al = data.byte(kItemframe);
getEitherAd();
al = es.byte(bx+9);
cx = pop();
_cmp(al, 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notunsized;
al = 6;
2011-06-05 14:49:56 +04:00
notunsized:
_cmp(al, 100);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto specialcase;
_cmp(cl, 100);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto isntspecial;
errorMessage3();
2011-06-05 14:49:56 +04:00
goto sizewrong;
isntspecial:
_cmp(cl, al);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto sizeok;
2011-06-05 14:49:56 +04:00
specialcase:
_sub(al, 100);
_cmp(cl, 100);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto bothspecial;
_cmp(cl, al);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto sizeok;
errorMessage2();
2011-06-05 14:49:56 +04:00
goto sizewrong;
bothspecial:
_sub(cl, 100);
_cmp(al, cl);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto sizeok;
errorMessage3();
2011-06-05 14:49:56 +04:00
sizewrong:
al = 1;
return;
2011-06-05 14:49:56 +04:00
sizeok:
al = 0;
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::outOfOpen() {
STACK_CHECK;
_cmp(data.byte(kOpenedob), 255);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto cantuseopen;
findOpenPos();
ax = es.word(bx);
_cmp(al, 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto canpick4;
2011-06-05 14:49:56 +04:00
cantuseopen:
blank();
return;
2011-06-05 14:49:56 +04:00
canpick4:
_cmp(ax, data.word(kOldsubject));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto difsub4;
_cmp(data.byte(kCommandtype), 228);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadygrb;
data.byte(kCommandtype) = 228;
2011-06-05 14:49:56 +04:00
difsub4:
data.word(kOldsubject) = ax;
bx = ax;
al = 36;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadygrb:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (notletgo4) */;
_cmp(ax, 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto dogrb;
_cmp(ax, 2);
if (!flags.z())
return /* (notletgo4) */;
reExFromOpen();
return;
2011-06-05 14:49:56 +04:00
dogrb:
delPointer();
data.byte(kPickup) = 1;
findOpenPos();
ax = es.word(bx);
data.byte(kItemframe) = al;
data.byte(kObjecttype) = ah;
_cmp(ah, 4);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto makeintoex;
getEitherAd();
es.byte(bx+2) = 20;
es.byte(bx+3) = 255;
2011-06-05 14:49:56 +04:00
goto actuallyout;
makeintoex:
transferToEx();
data.byte(kItemframe) = al;
data.byte(kObjecttype) = 4;
getEitherAd();
es.byte(bx+2) = 20;
es.byte(bx+3) = 255;
2011-06-05 14:49:56 +04:00
actuallyout:
fillOpen();
underTextLine();
readMouse();
useOpened();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::transferToEx() {
STACK_CHECK;
emergencyPurge();
getExPos();
al = data.byte(kExpos);
push(ax);
push(di);
al = data.byte(kItemframe);
ah = 0;
bx = 16;
_mul(bx);
ds = data.word(kFreedat);
si = ax;
cx = 8;
_movsw(cx, true);
di = pop();
al = data.byte(kReallocation);
es.byte(di) = al;
es.byte(di+11) = al;
al = data.byte(kItemframe);
es.byte(di+1) = al;
es.byte(di+2) = 4;
es.byte(di+3) = 255;
al = data.byte(kLastinvpos);
es.byte(di+4) = al;
al = data.byte(kItemframe);
data.byte(kItemtotran) = al;
transferMap();
transferInv();
transferText();
al = data.byte(kItemframe);
ah = 0;
bx = 16;
_mul(bx);
ds = data.word(kFreedat);
si = ax;
ds.byte(si+2) = 254;
pickupConts();
ax = pop();
}
void DreamGenContext::pickupConts() {
STACK_CHECK;
al = ds.byte(si+7);
_cmp(al, 255);
if (flags.z())
return /* (notopenable) */;
al = data.byte(kItemframe);
ah = data.byte(kObjecttype);
dl = data.byte(kExpos);
es = data.word(kFreedat);
bx = 0;
cx = 0;
2011-06-05 14:49:56 +04:00
pickupcontloop:
push(cx);
push(es);
push(bx);
push(dx);
push(ax);
_cmp(es.byte(bx+2), ah);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinsidethis;
_cmp(es.byte(bx+3), al);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinsidethis;
data.byte(kItemtotran) = cl;
transferConToEx();
2011-06-05 14:49:56 +04:00
notinsidethis:
ax = pop();
dx = pop();
bx = pop();
es = pop();
cx = pop();
_add(bx, 16);
_inc(cx);
_cmp(cx, 80);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto pickupcontloop;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::transferConToEx() {
STACK_CHECK;
push(es);
push(bx);
push(dx);
push(es);
push(bx);
getExPos();
si = pop();
ds = pop();
push(di);
cx = 8;
_movsw(cx, true);
di = pop();
dx = pop();
al = data.byte(kReallocation);
es.byte(di) = al;
es.byte(di+11) = al;
al = data.byte(kItemtotran);
es.byte(di+1) = al;
es.byte(di+3) = dl;
es.byte(di+2) = 4;
transferMap();
transferInv();
transferText();
si = pop();
ds = pop();
ds.byte(si+2) = 255;
}
void DreamGenContext::purgeALocation() {
STACK_CHECK;
push(ax);
es = data.word(kExtras);
di = (0+2080+30000);
bx = pop();
cx = 0;
2011-06-05 14:49:56 +04:00
purgeloc:
_cmp(bl, es.byte(di+0));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto dontpurge;
_cmp(es.byte(di+2), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto dontpurge;
push(di);
push(es);
push(bx);
push(cx);
deleteExObject();
cx = pop();
bx = pop();
es = pop();
di = pop();
2011-06-05 14:49:56 +04:00
dontpurge:
_add(di, 16);
_inc(cx);
_cmp(cx, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto purgeloc;
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::emergencyPurge() {
STACK_CHECK;
2011-06-05 14:49:56 +04:00
checkpurgeagain:
ax = data.word(kExframepos);
_add(ax, 4000);
_cmp(ax, (30000));
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notnearframeend;
purgeAnItem();
2011-06-05 14:49:56 +04:00
goto checkpurgeagain;
notnearframeend:
ax = data.word(kExtextpos);
_add(ax, 400);
_cmp(ax, (18000));
if (flags.c())
return /* (notneartextend) */;
purgeAnItem();
2011-06-05 14:49:56 +04:00
goto checkpurgeagain;
}
void DreamGenContext::purgeAnItem() {
STACK_CHECK;
es = data.word(kExtras);
di = (0+2080+30000);
bl = data.byte(kReallocation);
cx = 0;
2011-06-05 14:49:56 +04:00
lookforpurge:
al = es.byte(di+2);
_cmp(al, 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto cantpurge;
_cmp(es.byte(di+12), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto iscup;
_cmp(es.byte(di+12), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto cantpurge;
2011-06-05 14:49:56 +04:00
iscup:
_cmp(es.byte(di+11), bl);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto cantpurge;
deleteExObject();
return;
2011-06-05 14:49:56 +04:00
cantpurge:
_add(di, 16);
_inc(cx);
_cmp(cx, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto lookforpurge;
di = (0+2080+30000);
bl = data.byte(kReallocation);
cx = 0;
2011-06-05 14:49:56 +04:00
lookforpurge2:
al = es.byte(di+2);
_cmp(al, 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto cantpurge2;
_cmp(es.byte(di+12), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto cantpurge2;
deleteExObject();
return;
2011-06-05 14:49:56 +04:00
cantpurge2:
_add(di, 16);
_inc(cx);
_cmp(cx, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto lookforpurge2;
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::deleteExObject() {
STACK_CHECK;
push(cx);
push(cx);
push(cx);
push(cx);
al = 255;
cx = 16;
_stosb(cx, true);
ax = pop();
cl = al;
_add(al, al);
_add(al, cl);
deleteExFrame();
ax = pop();
cl = al;
_add(al, al);
_add(al, cl);
_inc(al);
deleteExFrame();
ax = pop();
deleteExText();
bx = pop();
bh = bl;
bl = 4;
di = (0+2080+30000);
cx = 0;
2011-06-05 14:49:56 +04:00
deleteconts:
_cmp(es.word(di+2), bx);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinsideex;
push(bx);
push(cx);
push(di);
deleteExObject();
di = pop();
cx = pop();
bx = pop();
2011-06-05 14:49:56 +04:00
notinsideex:
_add(di, 16);
_inc(cx);
_cmp(cx, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto deleteconts;
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::deleteExFrame() {
STACK_CHECK;
di = (0);
ah = 0;
_add(ax, ax);
_add(di, ax);
_add(ax, ax);
_add(di, ax);
al = es.byte(di);
ah = 0;
cl = es.byte(di+1);
ch = 0;
_mul(cx);
si = es.word(di+2);
push(si);
_add(si, (0+2080));
cx = (30000);
_sub(cx, es.word(di+2));
di = si;
_add(si, ax);
push(ax);
ds = es;
_movsb(cx, true);
bx = pop();
_sub(data.word(kExframepos), bx);
si = pop();
cx = (114)*3;
di = (0);
2011-06-05 14:49:56 +04:00
shuffleadsdown:
ax = es.word(di+2);
_cmp(ax, si);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto beforethisone;
_sub(ax, bx);
2011-06-05 14:49:56 +04:00
beforethisone:
es.word(di+2) = ax;
_add(di, 6);
if (--cx)
2011-06-16 16:31:17 +04:00
goto shuffleadsdown;
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::deleteExText() {
STACK_CHECK;
di = (0+2080+30000+(16*114));
ah = 0;
_add(ax, ax);
_add(di, ax);
ax = es.word(di);
si = ax;
di = ax;
_add(si, (0+2080+30000+(16*114)+((114+2)*2)));
_add(di, (0+2080+30000+(16*114)+((114+2)*2)));
ax = 0;
2011-06-05 14:49:56 +04:00
findlenextext:
cl = es.byte(si);
_inc(ax);
_inc(si);
_cmp(cl, 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findlenextext;
cx = (18000);
bx = si;
_sub(bx, (0+2080+30000+(16*114)+((114+2)*2)));
push(bx);
push(ax);
_sub(cx, bx);
_movsb(cx, true);
bx = pop();
_sub(data.word(kExtextpos), bx);
si = pop();
cx = (114);
di = (0+2080+30000+(16*114));
2011-06-05 14:49:56 +04:00
shuffletextads:
ax = es.word(di);
_cmp(ax, si);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto beforethistext;
_sub(ax, bx);
2011-06-05 14:49:56 +04:00
beforethistext:
es.word(di) = ax;
_add(di, 2);
if (--cx)
2011-06-16 16:31:17 +04:00
goto shuffletextads;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::getBack1() {
STACK_CHECK;
_cmp(data.byte(kPickup), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notgotobject;
blank();
return;
2011-06-05 14:49:56 +04:00
notgotobject:
_cmp(data.byte(kCommandtype), 202);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyget;
data.byte(kCommandtype) = 202;
al = 26;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyget:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (nogetback) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto dogetback;
return;
2011-06-05 14:49:56 +04:00
dogetback:
data.byte(kGetback) = 1;
data.byte(kPickup) = 0;
}
void DreamGenContext::talk() {
STACK_CHECK;
data.byte(kTalkpos) = 0;
data.byte(kInmaparea) = 0;
al = data.byte(kCommand);
data.byte(kCharacter) = al;
createPanel();
showPanel();
showMan();
showExit();
underTextLine();
convIcons();
startTalk();
data.byte(kCommandtype) = 255;
readMouse();
showPointer();
workToScreen();
2011-06-05 14:49:56 +04:00
waittalk:
delPointer();
readMouse();
animPointer();
showPointer();
vSync();
dumpPointer();
dumpTextLine();
data.byte(kGetback) = 0;
bx = offset_talklist;
checkCoords();
2011-06-24 00:01:59 +04:00
_cmp(data.byte(kQuitrequested), 0);
if (!flags.z())
goto finishtalk;
_cmp(data.byte(kGetback), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waittalk;
2011-06-24 00:01:59 +04:00
finishtalk:
bx = data.word(kPersondata);
es = cs;
_cmp(data.byte(kTalkpos), 4);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notnexttalk;
al = es.byte(bx+7);
_or(al, 128);
es.byte(bx+7) = al;
2011-06-05 14:49:56 +04:00
notnexttalk:
redrawMainScrn();
workToScreenM();
_cmp(data.byte(kSpeechloaded), 1);
if (!flags.z())
return /* (nospeech) */;
cancelCh1();
data.byte(kVolumedirection) = -1;
data.byte(kVolumeto) = 0;
}
void DreamGenContext::startTalk() {
STACK_CHECK;
data.byte(kTalkmode) = 0;
al = data.byte(kCharacter);
_and(al, 127);
getPersonText();
data.word(kCharshift) = 91+91;
di = 66;
bx = 64;
dl = 241;
al = 0;
ah = 79;
printDirect();
data.word(kCharshift) = 0;
di = 66;
bx = 80;
dl = 241;
al = 0;
ah = 0;
printDirect();
data.byte(kSpeechloaded) = 0;
al = data.byte(kCharacter);
_and(al, 127);
ah = 0;
cx = 64;
_mul(cx);
cl = 'C';
dl = 'R';
dh = data.byte(kReallocation);
loadSpeech();
_cmp(data.byte(kSpeechloaded), 1);
if (!flags.z())
return /* (nospeech1) */;
data.byte(kVolumedirection) = 1;
data.byte(kVolumeto) = 6;
al = 50+12;
playChannel1();
}
void DreamGenContext::getPersonText() {
STACK_CHECK;
ah = 0;
cx = 64*2;
_mul(cx);
si = ax;
es = data.word(kPeople);
_add(si, (0+24));
cx = (0+24+(1026*2));
ax = es.word(si);
_add(ax, cx);
si = ax;
}
void DreamGenContext::moreTalk() {
STACK_CHECK;
_cmp(data.byte(kTalkmode), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto canmore;
redes();
return;
2011-06-05 14:49:56 +04:00
canmore:
_cmp(data.byte(kCommandtype), 215);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadymore;
data.byte(kCommandtype) = 215;
al = 49;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadymore:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (nomore) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto domoretalk;
return;
2011-06-05 14:49:56 +04:00
domoretalk:
data.byte(kTalkmode) = 2;
data.byte(kTalkpos) = 4;
_cmp(data.byte(kCharacter), 100);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notsecondpart;
data.byte(kTalkpos) = 48;
2011-06-05 14:49:56 +04:00
notsecondpart:
doSomeTalk();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::doSomeTalk() {
STACK_CHECK;
dospeech:
al = data.byte(kTalkpos);
al = data.byte(kCharacter);
_and(al, 127);
ah = 0;
cx = 64;
_mul(cx);
cx = ax;
al = data.byte(kTalkpos);
ah = 0;
_add(ax, cx);
_add(ax, ax);
si = ax;
es = data.word(kPeople);
_add(si, (0+24));
cx = (0+24+(1026*2));
ax = es.word(si);
_add(ax, cx);
si = ax;
_cmp(es.byte(si), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endheartalk;
push(es);
push(si);
createPanel();
showPanel();
showMan();
showExit();
convIcons();
si = pop();
es = pop();
di = 164;
bx = 64;
dl = 144;
al = 0;
ah = 0;
printDirect();
al = data.byte(kCharacter);
_and(al, 127);
ah = 0;
cx = 64;
_mul(cx);
cl = data.byte(kTalkpos);
ch = 0;
_add(ax, cx);
cl = 'C';
dl = 'R';
dh = data.byte(kReallocation);
loadSpeech();
_cmp(data.byte(kSpeechloaded), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noplay1;
al = 62;
playChannel1();
noplay1:
data.byte(kPointermode) = 3;
workToScreenM();
cx = 180;
hangOnPQ();
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto _tmp1;
return;
_tmp1:
_inc(data.byte(kTalkpos));
al = data.byte(kTalkpos);
al = data.byte(kCharacter);
_and(al, 127);
ah = 0;
cx = 64;
_mul(cx);
cx = ax;
al = data.byte(kTalkpos);
ah = 0;
_add(ax, cx);
_add(ax, ax);
si = ax;
es = data.word(kPeople);
_add(si, (0+24));
cx = (0+24+(1026*2));
ax = es.word(si);
_add(ax, cx);
si = ax;
_cmp(es.byte(si), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endheartalk;
_cmp(es.byte(si), ':');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto skiptalk2;
_cmp(es.byte(si), 32);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto skiptalk2;
push(es);
push(si);
createPanel();
showPanel();
showMan();
showExit();
convIcons();
si = pop();
es = pop();
di = 48;
bx = 128;
dl = 144;
al = 0;
ah = 0;
printDirect();
al = data.byte(kCharacter);
_and(al, 127);
ah = 0;
cx = 64;
_mul(cx);
cl = data.byte(kTalkpos);
ch = 0;
_add(ax, cx);
cl = 'C';
dl = 'R';
dh = data.byte(kReallocation);
loadSpeech();
_cmp(data.byte(kSpeechloaded), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noplay2;
al = 62;
playChannel1();
noplay2:
data.byte(kPointermode) = 3;
workToScreenM();
cx = 180;
hangOnPQ();
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto skiptalk2;
return;
skiptalk2:
_inc(data.byte(kTalkpos));
goto dospeech;
endheartalk:
data.byte(kPointermode) = 0;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::hangOnPQ() {
STACK_CHECK;
data.byte(kGetback) = 0;
bx = 0;
2011-06-05 14:49:56 +04:00
hangloopq:
push(cx);
push(bx);
delPointer();
readMouse();
animPointer();
showPointer();
vSync();
dumpPointer();
dumpTextLine();
bx = offset_quitlist;
checkCoords();
bx = pop();
cx = pop();
_cmp(data.byte(kGetback), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto quitconv;
2011-06-24 00:01:59 +04:00
_cmp(data.byte(kQuitrequested), 0);
if (!flags.z())
goto quitconv;
_cmp(data.byte(kSpeechloaded), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notspeaking;
_cmp(data.byte(kCh1playing), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notspeaking;
_inc(bx);
_cmp(bx, 40);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto finishconv;
2011-06-05 14:49:56 +04:00
notspeaking:
_cmp(data.word(kMousebutton), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto hangloopq;
_cmp(data.word(kOldbutton), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto hangloopq;
2011-06-05 14:49:56 +04:00
finishconv:
delPointer();
data.byte(kPointermode) = 0;
flags._c = false;
return;
2011-06-05 14:49:56 +04:00
quitconv:
delPointer();
data.byte(kPointermode) = 0;
cancelCh1();
flags._c = true;
}
2011-06-05 13:38:05 +04:00
void DreamGenContext::redes() {
STACK_CHECK;
_cmp(data.byte(kCh1playing), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto cantredes;
_cmp(data.byte(kTalkmode), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto canredes;
2011-06-05 14:49:56 +04:00
cantredes:
blank();
return;
2011-06-05 14:49:56 +04:00
canredes:
_cmp(data.byte(kCommandtype), 217);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyreds;
data.byte(kCommandtype) = 217;
al = 50;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyreds:
ax = data.word(kMousebutton);
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doredes;
return;
2011-06-05 14:49:56 +04:00
doredes:
delPointer();
createPanel();
showPanel();
showMan();
showExit();
convIcons();
startTalk();
readMouse();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::newPlace() {
STACK_CHECK;
_cmp(data.byte(kNeedtotravel), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto istravel;
_cmp(data.byte(kAutolocation), -1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto isautoloc;
return;
2011-06-05 14:49:56 +04:00
isautoloc:
al = data.byte(kAutolocation);
data.byte(kNewlocation) = al;
data.byte(kAutolocation) = -1;
return;
2011-06-05 14:49:56 +04:00
istravel:
data.byte(kNeedtotravel) = 0;
selectLocation();
}
void DreamGenContext::selectLocation() {
STACK_CHECK;
data.byte(kInmaparea) = 0;
clearBeforeLoad();
data.byte(kGetback) = 0;
data.byte(kPointerframe) = 22;
readCityPic();
showCity();
getRidOfTemp();
readDestIcon();
loadTravelText();
showPanel();
showMan();
showArrows();
showExit();
locationPic();
underTextLine();
data.byte(kCommandtype) = 255;
readMouse();
data.byte(kPointerframe) = 0;
showPointer();
workToScreen();
al = 9;
ah = 255;
playChannel0();
data.byte(kNewlocation) = 255;
2011-06-05 14:49:56 +04:00
select:
2011-06-19 16:56:19 +04:00
_cmp(data.byte(kQuitrequested), 0);
if (!flags.z())
goto quittravel;
delPointer();
readMouse();
showPointer();
vSync();
dumpPointer();
dumpTextLine();
_cmp(data.byte(kGetback), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto quittravel;
bx = offset_destlist;
checkCoords();
_cmp(data.byte(kNewlocation), 255);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto select;
al = data.byte(kNewlocation);
_cmp(al, data.byte(kLocation));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto quittravel;
getRidOfTemp();
getRidOfTemp2();
getRidOfTemp3();
es = data.word(kTraveltext);
deallocateMem();
return;
2011-06-05 14:49:56 +04:00
quittravel:
al = data.byte(kReallocation);
data.byte(kNewlocation) = al;
data.byte(kGetback) = 0;
getRidOfTemp();
getRidOfTemp2();
getRidOfTemp3();
es = data.word(kTraveltext);
deallocateMem();
}
void DreamGenContext::lookAtPlace() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 224);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyinfo;
data.byte(kCommandtype) = 224;
al = 27;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyinfo:
ax = data.word(kMousebutton);
_and(ax, 1);
if (flags.z())
return /* (noinfo) */;
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (noinfo) */;
bl = data.byte(kDestpos);
_cmp(bl, 15);
if (!flags.c())
return /* (noinfo) */;
push(bx);
delPointer();
delTextLine();
getUnderCentre();
ds = data.word(kTempgraphics3);
al = 0;
ah = 0;
di = 60;
bx = 72;
showFrame();
al = 4;
ah = 0;
di = 60;
bx = 72+55;
showFrame();
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp1;
al = 4;
ah = 0;
di = 60;
bx = 72+55+21;
showFrame();
_tmp1:
bx = pop();
bh = 0;
_add(bx, bx);
es = data.word(kTraveltext);
si = es.word(bx);
_add(si, (66*2));
findNextColon();
di = 63;
bx = 84;
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp2;
bx = 84+4;
_tmp2:
dl = 191;
al = 0;
ah = 0;
printDirect();
workToScreenM();
cx = 500;
hangOnP();
data.byte(kPointermode) = 0;
data.byte(kPointerframe) = 0;
putUnderCentre();
workToScreenM();
}
void DreamGenContext::getUnderCentre() {
STACK_CHECK;
di = 58;
bx = 72;
ds = data.word(kMapstore);
si = 0;
cl = 254;
ch = 110;
multiGet();
}
void DreamGenContext::putUnderCentre() {
STACK_CHECK;
di = 58;
bx = 72;
ds = data.word(kMapstore);
si = 0;
cl = 254;
ch = 110;
multiPut();
}
void DreamGenContext::locationPic() {
STACK_CHECK;
getDestInfo();
al = es.byte(si);
push(es);
push(si);
di = 0;
_cmp(al, 6);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto secondlot;
ds = data.word(kTempgraphics);
_add(al, 4);
2011-06-05 14:49:56 +04:00
goto gotgraphic;
secondlot:
_sub(al, 6);
ds = data.word(kTempgraphics2);
2011-06-05 14:49:56 +04:00
gotgraphic:
_add(di, 104);
bx = 138+14;
ah = 0;
showFrame();
si = pop();
es = pop();
al = data.byte(kDestpos);
_cmp(al, data.byte(kReallocation));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinthisone;
al = 3;
di = 104;
bx = 140+14;
ds = data.word(kTempgraphics);
ah = 0;
showFrame();
2011-06-05 14:49:56 +04:00
notinthisone:
bl = data.byte(kDestpos);
bh = 0;
_add(bx, bx);
es = data.word(kTraveltext);
si = es.word(bx);
_add(si, (66*2));
di = 50;
bx = 20;
dl = 241;
al = 0;
ah = 0;
printDirect();
}
void DreamGenContext::getDestInfo() {
STACK_CHECK;
al = data.byte(kDestpos);
ah = 0;
push(ax);
dx = data;
es = dx;
si = 1723;
_add(si, ax);
cl = es.byte(si);
ax = pop();
push(cx);
dx = data;
es = dx;
si = 1739;
_add(si, ax);
ax = pop();
}
void DreamGenContext::showArrows() {
STACK_CHECK;
di = 116-12;
bx = 16;
ds = data.word(kTempgraphics);
al = 0;
ah = 0;
showFrame();
di = 226+12;
bx = 16;
ds = data.word(kTempgraphics);
al = 1;
ah = 0;
showFrame();
di = 280;
bx = 14;
ds = data.word(kTempgraphics);
al = 2;
ah = 0;
showFrame();
}
void DreamGenContext::resetLocation() {
STACK_CHECK;
push(ax);
_cmp(al, 5);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdelhotel;
purgeALocation();
al = 21;
purgeALocation();
al = 22;
purgeALocation();
al = 27;
purgeALocation();
2011-06-05 14:49:56 +04:00
goto clearedlocations;
notdelhotel:
_cmp(al, 8);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdeltvstud;
purgeALocation();
al = 28;
purgeALocation();
2011-06-05 14:49:56 +04:00
goto clearedlocations;
notdeltvstud:
_cmp(al, 6);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdelsarters;
purgeALocation();
al = 20;
purgeALocation();
al = 25;
purgeALocation();
2011-06-05 14:49:56 +04:00
goto clearedlocations;
notdelsarters:
_cmp(al, 13);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdelboathouse;
purgeALocation();
al = 29;
purgeALocation();
2011-06-05 14:49:56 +04:00
goto clearedlocations;
notdelboathouse:
clearedlocations:
ax = pop();
ah = 0;
bx = ax;
dx = data;
es = dx;
_add(bx, 1723);
es.byte(bx) = 0;
}
void DreamGenContext::printOuterMon() {
STACK_CHECK;
di = 40;
bx = 32;
ds = data.word(kTempgraphics);
al = 1;
ah = 0;
showFrame();
di = 264;
bx = 32;
ds = data.word(kTempgraphics);
al = 2;
ah = 0;
showFrame();
di = 40;
bx = 12;
ds = data.word(kTempgraphics);
al = 3;
ah = 0;
showFrame();
di = 40;
bx = 164;
ds = data.word(kTempgraphics);
al = 4;
ah = 0;
showFrame();
}
void DreamGenContext::lookInInterface() {
STACK_CHECK;
al = 'I';
ah = 'N';
cl = 'T';
ch = 'F';
findSetObject();
ah = 1;
checkInside();
_cmp(cl, (114));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto emptyinterface;
al = es.byte(bx+15);
_inc(al);
return;
2011-06-05 14:49:56 +04:00
emptyinterface:
al = 0;
2011-06-05 13:38:05 +04:00
}
2011-06-05 14:49:56 +04:00
void DreamGenContext::lockLightOn() {
STACK_CHECK;
di = 56;
bx = 182;
ds = data.word(kTempgraphics);
al = 10;
ah = 0;
push(di);
push(bx);
showFrame();
bx = pop();
di = pop();
cl = 12;
ch = 8;
multiDump();
}
void DreamGenContext::lockLightOff() {
STACK_CHECK;
di = 56;
bx = 182;
ds = data.word(kTempgraphics);
al = 9;
ah = 0;
push(di);
push(bx);
showFrame();
bx = pop();
di = pop();
cl = 12;
ch = 8;
multiDump();
}
void DreamGenContext::makeCaps() {
STACK_CHECK;
_cmp(al, 'a');
if (flags.c())
return /* (notupperc) */;
_sub(al, 32);
}
void DreamGenContext::execCommand() {
STACK_CHECK;
es = cs;
bx = offset_comlist;
ds = cs;
si = 1757;
al = ds.byte(si);
_cmp(al, 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notblankinp;
scrollMonitor();
return;
2011-06-05 14:49:56 +04:00
notblankinp:
cl = 0;
2011-06-05 14:49:56 +04:00
comloop:
push(bx);
push(si);
2011-06-05 14:49:56 +04:00
comloop2:
al = ds.byte(si);
_add(si, 2);
ah = es.byte(bx);
_inc(bx);
_cmp(ah, 32);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundcom;
_cmp(al, ah);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto comloop2;
si = pop();
bx = pop();
_add(bx, 10);
_inc(cl);
_cmp(cl, 6);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto comloop;
netError();
al = 0;
return;
2011-06-05 14:49:56 +04:00
foundcom:
si = pop();
bx = pop();
_cmp(cl, 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto testcom;
_cmp(cl, 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto directory;
_cmp(cl, 3);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto accesscom;
_cmp(cl, 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto signoncom;
_cmp(cl, 5);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto keyscom;
2011-06-05 14:49:56 +04:00
goto quitcom;
directory:
dirCom();
al = 0;
return;
2011-06-05 14:49:56 +04:00
signoncom:
signOn();
al = 0;
return;
2011-06-05 14:49:56 +04:00
accesscom:
read();
al = 0;
return;
2011-06-05 14:49:56 +04:00
keyscom:
showKeys();
al = 0;
return;
2011-06-05 14:49:56 +04:00
testcom:
al = 6;
monMessage();
al = 0;
return;
2011-06-05 14:49:56 +04:00
quitcom:
al = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::dirCom() {
STACK_CHECK;
cx = 30;
randomAccess();
parser();
_cmp(es.byte(di+1), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto dirroot;
dirFile();
return;
2011-06-05 14:49:56 +04:00
dirroot:
data.byte(kLogonum) = 0;
ds = cs;
si = offset_rootdir;
_inc(si);
es = cs;
di = 1412;
_inc(di);
cx = 12;
_movsb(cx, true);
monitorLogo();
scrollMonitor();
al = 9;
monMessage();
es = data.word(kTextfile1);
searchForFiles();
es = data.word(kTextfile2);
searchForFiles();
es = data.word(kTextfile3);
searchForFiles();
scrollMonitor();
}
void DreamGenContext::searchForFiles() {
STACK_CHECK;
bx = (66*2);
2011-06-05 14:49:56 +04:00
directloop1:
al = es.byte(bx);
_inc(bx);
_cmp(al, '*');
if (flags.z())
return /* (endofdir) */;
_cmp(al, 34);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto directloop1;
monPrint();
2011-06-05 14:49:56 +04:00
goto directloop1;
}
void DreamGenContext::signOn() {
STACK_CHECK;
parser();
_inc(di);
ds = cs;
si = offset_keys;
cx = 4;
2011-06-05 14:49:56 +04:00
signonloop:
push(cx);
push(si);
push(di);
_add(si, 14);
cx = 11;
2011-06-05 14:49:56 +04:00
signonloop2:
_lodsb();
_cmp(al, 32);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundsign;
makeCaps();
ah = es.byte(di);
_inc(di);
_cmp(al, ah);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nomatch;
if (--cx)
2011-06-16 16:31:17 +04:00
goto signonloop2;
2011-06-05 14:49:56 +04:00
nomatch:
di = pop();
si = pop();
cx = pop();
_add(si, 26);
if (--cx)
2011-06-16 16:31:17 +04:00
goto signonloop;
al = 13;
monMessage();
return;
2011-06-05 14:49:56 +04:00
foundsign:
di = pop();
si = pop();
cx = pop();
bx = si;
es = ds;
_cmp(es.byte(bx), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notyetassigned;
al = 17;
monMessage();
return;
2011-06-05 14:49:56 +04:00
notyetassigned:
push(es);
push(bx);
scrollMonitor();
al = 15;
monMessage();
di = data.word(kMonadx);
bx = data.word(kMonady);
push(di);
push(bx);
input();
bx = pop();
di = pop();
data.word(kMonadx) = di;
data.word(kMonady) = bx;
bx = pop();
es = pop();
push(es);
push(bx);
_add(bx, 2);
ds = cs;
si = 1757;
2011-06-05 14:49:56 +04:00
checkpass:
_lodsw();
ah = es.byte(bx);
_inc(bx);
_cmp(ah, 32);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto passpassed;
_cmp(al, ah);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto checkpass;
bx = pop();
es = pop();
scrollMonitor();
al = 16;
monMessage();
return;
2011-06-05 14:49:56 +04:00
passpassed:
al = 14;
monMessage();
bx = pop();
es = pop();
push(es);
push(bx);
_add(bx, 14);
monPrint();
scrollMonitor();
bx = pop();
es = pop();
es.byte(bx) = 1;
}
void DreamGenContext::showKeys() {
STACK_CHECK;
cx = 10;
randomAccess();
scrollMonitor();
al = 18;
monMessage();
es = cs;
bx = offset_keys;
cx = 4;
2011-06-05 14:49:56 +04:00
keysloop:
push(cx);
push(bx);
_cmp(es.byte(bx), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notheld;
_add(bx, 14);
monPrint();
2011-06-05 14:49:56 +04:00
notheld:
bx = pop();
cx = pop();
_add(bx, 26);
if (--cx)
2011-06-16 16:31:17 +04:00
goto keysloop;
scrollMonitor();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::read() {
STACK_CHECK;
cx = 40;
randomAccess();
parser();
_cmp(es.byte(di+1), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto okcom;
netError();
return;
2011-06-05 14:49:56 +04:00
okcom:
es = cs;
di = 1412;
ax = data.word(kTextfile1);
data.word(kMonsource) = ax;
ds = ax;
si = (66*2);
searchForString();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundfile2;
ax = data.word(kTextfile2);
data.word(kMonsource) = ax;
ds = ax;
si = (66*2);
searchForString();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundfile2;
ax = data.word(kTextfile3);
data.word(kMonsource) = ax;
ds = ax;
si = (66*2);
searchForString();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundfile2;
al = 7;
monMessage();
return;
2011-06-05 14:49:56 +04:00
foundfile2:
getKeyAndLogo();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto keyok1;
return;
2011-06-05 14:49:56 +04:00
keyok1:
es = cs;
di = offset_operand1;
ds = data.word(kMonsource);
searchForString();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto findtopictext;
al = data.byte(kOldlogonum);
data.byte(kLogonum) = al;
al = 11;
monMessage();
return;
2011-06-05 14:49:56 +04:00
findtopictext:
_inc(bx);
push(es);
push(bx);
monitorLogo();
scrollMonitor();
bx = pop();
es = pop();
2011-06-05 14:49:56 +04:00
moretopic:
monPrint();
al = es.byte(bx);
_cmp(al, 34);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endoftopic;
_cmp(al, '=');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endoftopic;
_cmp(al, '*');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endoftopic;
push(es);
push(bx);
processTrigger();
cx = 24;
randomAccess();
bx = pop();
es = pop();
2011-06-05 14:49:56 +04:00
goto moretopic;
endoftopic:
scrollMonitor();
}
void DreamGenContext::dirFile() {
STACK_CHECK;
al = 34;
es.byte(di) = al;
push(es);
push(di);
ds = data.word(kTextfile1);
si = (66*2);
searchForString();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundfile;
di = pop();
es = pop();
push(es);
push(di);
ds = data.word(kTextfile2);
si = (66*2);
searchForString();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundfile;
di = pop();
es = pop();
push(es);
push(di);
ds = data.word(kTextfile3);
si = (66*2);
searchForString();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto foundfile;
di = pop();
es = pop();
al = 7;
monMessage();
return;
2011-06-05 14:49:56 +04:00
foundfile:
ax = pop();
ax = pop();
getKeyAndLogo();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto keyok2;
return;
2011-06-05 14:49:56 +04:00
keyok2:
push(es);
push(bx);
ds = cs;
si = offset_operand1+1;
es = cs;
di = 1412+1;
cx = 12;
_movsb(cx, true);
monitorLogo();
scrollMonitor();
al = 10;
monMessage();
bx = pop();
es = pop();
2011-06-05 14:49:56 +04:00
directloop2:
al = es.byte(bx);
_inc(bx);
_cmp(al, 34);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endofdir2;
_cmp(al, '*');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto endofdir2;
_cmp(al, '=');
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto directloop2;
monPrint();
2011-06-05 14:49:56 +04:00
goto directloop2;
endofdir2:
scrollMonitor();
}
void DreamGenContext::getKeyAndLogo() {
STACK_CHECK;
_inc(bx);
al = es.byte(bx);
_sub(al, 48);
data.byte(kNewlogonum) = al;
_add(bx, 2);
al = es.byte(bx);
_sub(al, 48);
data.byte(kKeynum) = al;
_inc(bx);
push(es);
push(bx);
al = data.byte(kKeynum);
ah = 0;
cx = 26;
_mul(cx);
es = cs;
bx = offset_keys;
_add(bx, ax);
al = es.byte(bx);
_cmp(al, 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto keyok;
push(bx);
push(es);
al = 12;
monMessage();
es = pop();
bx = pop();
_add(bx, 14);
monPrint();
scrollMonitor();
bx = pop();
es = pop();
al = 1;
return;
2011-06-05 14:49:56 +04:00
keyok:
bx = pop();
es = pop();
al = data.byte(kNewlogonum);
data.byte(kLogonum) = al;
al = 0;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::searchForString() {
STACK_CHECK;
dl = es.byte(di);
cx = di;
2011-06-05 14:49:56 +04:00
restartlook:
di = cx;
bx = si;
dh = 0;
2011-06-05 14:49:56 +04:00
keeplooking:
_lodsb();
makeCaps();
_cmp(al, '*');
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notfound;
_cmp(dl, '=');
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindingtopic;
_cmp(al, 34);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notfound;
2011-06-05 14:49:56 +04:00
nofindingtopic:
ah = es.byte(di);
_cmp(al, dl);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notbracket;
_inc(dh);
_cmp(dh, 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto complete;
2011-06-05 14:49:56 +04:00
notbracket:
_cmp(al, ah);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto restartlook;
_inc(di);
2011-06-05 14:49:56 +04:00
goto keeplooking;
complete:
es = ds;
al = 0;
bx = si;
return;
2011-06-05 14:49:56 +04:00
notfound:
al = 1;
}
void DreamGenContext::parser() {
STACK_CHECK;
es = cs;
di = offset_operand1;
cx = 13;
al = 0;
_stosb(cx, true);
di = offset_operand1;
al = '=';
_stosb();
ds = cs;
si = 1757;
2011-06-05 14:49:56 +04:00
notspace1:
_lodsw();
_cmp(al, 32);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto stillspace1;
_cmp(al, 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notspace1;
2011-06-05 14:49:56 +04:00
goto finishpars;
stillspace1:
_lodsw();
_cmp(al, 32);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto stillspace1;
2011-06-05 14:49:56 +04:00
copyin1:
_stosb();
_lodsw();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto finishpars;
_cmp(al, 32);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto copyin1;
2011-06-05 14:49:56 +04:00
finishpars:
di = offset_operand1;
}
void DreamGenContext::monitorLogo() {
STACK_CHECK;
al = data.byte(kLogonum);
_cmp(al, data.byte(kOldlogonum));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notnewlogo;
data.byte(kOldlogonum) = al;
printLogo();
printUnderMon();
workToScreen();
printLogo();
printLogo();
al = 26;
playChannel1();
cx = 20;
randomAccess();
return;
2011-06-05 14:49:56 +04:00
notnewlogo:
printLogo();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::processTrigger() {
STACK_CHECK;
_cmp(data.byte(kLasttrigger), '1');
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notfirsttrigger;
al = 8;
setLocation();
al = 45;
triggerMessage();
return;
2011-06-05 14:49:56 +04:00
notfirsttrigger:
_cmp(data.byte(kLasttrigger), '2');
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsecondtrigger;
al = 9;
setLocation();
al = 55;
triggerMessage();
return;
2011-06-05 14:49:56 +04:00
notsecondtrigger:
_cmp(data.byte(kLasttrigger), '3');
if (!flags.z())
return /* (notthirdtrigger) */;
al = 2;
setLocation();
al = 59;
triggerMessage();
}
void DreamGenContext::triggerMessage() {
STACK_CHECK;
push(ax);
di = 174;
bx = 153;
cl = 200;
ch = 63;
ds = data.word(kMapstore);
si = 0;
multiGet();
ax = pop();
findPuzText();
di = 174;
bx = 156;
dl = 141;
ah = 16;
printDirect();
cx = 140;
hangOn();
workToScreen();
cx = 340;
hangOn();
di = 174;
bx = 153;
cl = 200;
ch = 63;
ds = data.word(kMapstore);
si = 0;
multiPut();
workToScreen();
data.byte(kLasttrigger) = 0;
}
void DreamGenContext::runTap() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto tapwith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
tapwith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'E';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto fillcupfromtap;
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'F';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto cupfromtapfull;
cx = 300;
al = 56;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
fillcupfromtap:
al = data.byte(kWithobject);
getExAd();
es.byte(bx+15) = 'F'-'A';
al = 8;
playChannel1();
cx = 300;
al = 57;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
cupfromtapfull:
cx = 300;
al = 58;
showPuzText();
putBackObStuff();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::notHeldError() {
STACK_CHECK;
createPanel();
showPanel();
showMan();
showExit();
obIcons();
di = 64;
bx = 100;
al = 63;
ah = 1;
dl = 201;
printmessage2();
workToScreenM();
cx = 50;
hangOnP();
putBackObStuff();
}
void DreamGenContext::usePipe() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto pipewith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
pipewith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'E';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto fillcup;
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'F';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyfull;
cx = 300;
al = 14;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
fillcup:
cx = 300;
al = 36;
showPuzText();
putBackObStuff();
al = data.byte(kWithobject);
getExAd();
es.byte(bx+15) = 'F'-'A';
return;
2011-06-05 14:49:56 +04:00
alreadyfull:
cx = 300;
al = 35;
showPuzText();
putBackObStuff();
}
void DreamGenContext::useSLab() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto slabwith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
slabwith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'J';
ch = 'E';
dl = 'W';
dh = 'L';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nextslab;
cx = 300;
al = 14;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
nextslab:
al = data.byte(kWithobject);
getExAd();
es.byte(bx+2) = 0;
al = data.byte(kCommand);
push(ax);
removeSetObject();
ax = pop();
_inc(al);
push(ax);
placeSetObject();
ax = pop();
_cmp(al, 54);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notlastslab;
al = 0;
turnPathOn();
data.word(kWatchingtime) = 22;
data.word(kReeltowatch) = 35;
data.word(kEndwatchreel) = 48;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
2011-06-05 14:49:56 +04:00
notlastslab:
_inc(data.byte(kProgresspoints));
showFirstUse();
data.byte(kGetback) = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useOpenBox() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto openboxwith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
openboxwith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'F';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto destoryopenbox;
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'U';
dl = 'P';
dh = 'E';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto openboxwrong;
showFirstUse();
return;
2011-06-05 14:49:56 +04:00
destoryopenbox:
_inc(data.byte(kProgresspoints));
cx = 300;
al = 37;
showPuzText();
al = data.byte(kWithobject);
getExAd();
es.byte(bx+15) = 'E'-'A';
data.word(kWatchingtime) = 140;
data.word(kReeltowatch) = 105;
data.word(kEndwatchreel) = 181;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
al = 4;
turnPathOn();
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
openboxwrong:
cx = 300;
al = 38;
showPuzText();
putBackObStuff();
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::useAltar() {
STACK_CHECK;
al = 'C';
ah = 'N';
cl = 'D';
ch = 'A';
findExObject();
_cmp(al, (114));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto thingsonaltar;
al = 'C';
ah = 'N';
cl = 'D';
ch = 'B';
findExObject();
_cmp(al, (114));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto thingsonaltar;
_cmp(data.byte(kCanmovealtar), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto movealtar;
cx = 300;
al = 23;
showPuzText();
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
movealtar:
_inc(data.byte(kProgresspoints));
showSecondUse();
data.word(kWatchingtime) = 160;
data.word(kReeltowatch) = 81;
data.word(kEndwatchreel) = 174;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
al = 47;
bl = 52;
bh = 76;
cx = 32;
dx = 98;
setupTimedUse();
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
thingsonaltar:
showFirstUse();
data.byte(kGetback) = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::nextColon() {
STACK_CHECK;
2011-06-05 14:49:56 +04:00
lookcolon:
al = es.byte(si);
_inc(si);
_cmp(al, ':');
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto lookcolon;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::drawItAll() {
STACK_CHECK;
createPanel();
drawFloor();
printSprites();
showIcon();
2011-06-05 14:09:44 +04:00
}
void DreamGenContext::usePoolReader() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto poolwith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
poolwith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'M';
ch = 'E';
dl = 'M';
dh = 'B';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto openpool;
cx = 300;
al = 14;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
openpool:
_cmp(data.byte(kTalkedtoattendant), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto canopenpool;
showSecondUse();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
canopenpool:
al = 17;
playChannel1();
showFirstUse();
data.byte(kCounttoopen) = 6;
data.byte(kGetback) = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useLighter() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotlighterwith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
gotlighterwith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'S';
ch = 'M';
dl = 'K';
dh = 'E';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto cigarette;
showFirstUse();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
cigarette:
cx = 300;
al = 9;
showPuzText();
al = data.byte(kWithobject);
getExAd();
es.byte(bx+2) = 255;
data.byte(kGetback) = 1;
}
void DreamGenContext::useCardReader1() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotreader1with;
withWhat();
return;
2011-06-05 14:49:56 +04:00
gotreader1with:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'S';
dl = 'H';
dh = 'R';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto correctcard;
cx = 300;
al = 14;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
correctcard:
_cmp(data.byte(kTalkedtosparky), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notyet;
_cmp(data.word(kCard1money), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto getscash;
cx = 300;
al = 17;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
getscash:
al = 16;
playChannel1();
cx = 300;
al = 18;
showPuzText();
_inc(data.byte(kProgresspoints));
data.word(kCard1money) = 12432;
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
notyet:
showFirstUse();
putBackObStuff();
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::useCardReader2() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotreader2with;
withWhat();
return;
2011-06-05 14:49:56 +04:00
gotreader2with:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'S';
dl = 'H';
dh = 'R';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto correctcard2;
cx = 300;
al = 14;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
correctcard2:
_cmp(data.byte(kTalkedtoboss), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notyetboss;
_cmp(data.word(kCard1money), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nocash;
_cmp(data.byte(kGunpassflag), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadygotnew;
al = 18;
playChannel1();
cx = 300;
al = 19;
showPuzText();
al = 94;
placeSetObject();
data.byte(kGunpassflag) = 1;
_sub(data.word(kCard1money), 2000);
_inc(data.byte(kProgresspoints));
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
nocash:
cx = 300;
al = 20;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
alreadygotnew:
cx = 300;
al = 22;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
notyetboss:
showFirstUse();
putBackObStuff();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useCardReader3() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotreader3with;
withWhat();
return;
2011-06-05 14:49:56 +04:00
gotreader3with:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'C';
ch = 'S';
dl = 'H';
dh = 'R';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto rightcard;
cx = 300;
al = 14;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
rightcard:
_cmp(data.byte(kTalkedtorecep), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notyetrecep;
_cmp(data.byte(kCardpassflag), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyusedit;
al = 16;
playChannel1();
cx = 300;
al = 25;
showPuzText();
_inc(data.byte(kProgresspoints));
_sub(data.word(kCard1money), 8300);
data.byte(kCardpassflag) = 1;
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
alreadyusedit:
cx = 300;
al = 26;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
notyetrecep:
showFirstUse();
putBackObStuff();
}
void DreamGenContext::useCashCard() {
STACK_CHECK;
getRidOfReels();
loadKeypad();
createPanel();
showPanel();
showExit();
showMan();
di = 114;
bx = 120;
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp1;
bx = 120-3;
_tmp1:
ds = data.word(kTempgraphics);
al = 39;
ah = 0;
showFrame();
ax = data.word(kCard1money);
moneyPoke();
getObTextStart();
nextColon();
nextColon();
di = 36;
bx = 98;
dl = 241;
al = 0;
ah = 0;
printDirect();
di = 160;
bx = 155;
es = cs;
si = offset_money1poke;
data.word(kCharshift) = 91*2+75;
al = 0;
ah = 0;
dl = 240;
printDirect();
di = 187;
bx = 155;
es = cs;
si = offset_money2poke;
data.word(kCharshift) = 91*2+85;
al = 0;
ah = 0;
dl = 240;
printDirect();
data.word(kCharshift) = 0;
workToScreenM();
cx = 400;
hangOnP();
getRidOfTemp();
restoreReels();
putBackObStuff();
}
void DreamGenContext::lookAtCard() {
STACK_CHECK;
data.byte(kManisoffscreen) = 1;
getRidOfReels();
loadKeypad();
createPanel2();
di = 160;
bx = 80;
ds = data.word(kTempgraphics);
al = 42;
ah = 128;
showFrame();
getObTextStart();
findNextColon();
findNextColon();
findNextColon();
di = 36;
bx = 124;
dl = 241;
al = 0;
ah = 0;
printDirect();
push(es);
push(si);
workToScreenM();
cx = 280;
hangOnW();
createPanel2();
di = 160;
bx = 80;
ds = data.word(kTempgraphics);
al = 42;
ah = 128;
showFrame();
si = pop();
es = pop();
di = 36;
bx = 130;
dl = 241;
al = 0;
ah = 0;
printDirect();
workToScreenM();
cx = 200;
hangOnW();
data.byte(kManisoffscreen) = 0;
getRidOfTemp();
restoreReels();
putBackObStuff();
}
void DreamGenContext::moneyPoke() {
STACK_CHECK;
bx = offset_money1poke;
cl = 48-1;
2011-06-05 14:49:56 +04:00
numberpoke0:
_inc(cl);
_sub(ax, 10000);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto numberpoke0;
_add(ax, 10000);
cs.byte(bx) = cl;
_inc(bx);
cl = 48-1;
2011-06-05 14:49:56 +04:00
numberpoke1:
_inc(cl);
_sub(ax, 1000);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto numberpoke1;
_add(ax, 1000);
cs.byte(bx) = cl;
_inc(bx);
cl = 48-1;
2011-06-05 14:49:56 +04:00
numberpoke2:
_inc(cl);
_sub(ax, 100);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto numberpoke2;
_add(ax, 100);
cs.byte(bx) = cl;
_inc(bx);
cl = 48-1;
2011-06-05 14:49:56 +04:00
numberpoke3:
_inc(cl);
_sub(ax, 10);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto numberpoke3;
_add(ax, 10);
cs.byte(bx) = cl;
bx = offset_money2poke;
_add(al, 48);
cs.byte(bx) = al;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useControl() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotcontrolwith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
gotcontrolwith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'K';
ch = 'E';
dl = 'Y';
dh = 'A';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto rightkey;
_cmp(data.byte(kReallocation), 21);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto balls;
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'K';
ch = 'N';
dl = 'F';
dh = 'E';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto jimmycontrols;
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'A';
ch = 'X';
dl = 'E';
dh = 'D';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto axeoncontrols;
2011-06-05 14:49:56 +04:00
balls:
showFirstUse();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
rightkey:
al = 16;
playChannel1();
_cmp(data.byte(kLocation), 21);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto goingdown;
cx = 300;
al = 0;
showPuzText();
data.byte(kNewlocation) = 21;
data.byte(kCounttoclose) = 8;
data.byte(kCounttoopen) = 0;
data.word(kWatchingtime) = 80;
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
goingdown:
cx = 300;
al = 3;
showPuzText();
data.byte(kNewlocation) = 30;
data.byte(kCounttoclose) = 8;
data.byte(kCounttoopen) = 0;
data.word(kWatchingtime) = 80;
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
jimmycontrols:
al = 50;
placeSetObject();
al = 51;
placeSetObject();
al = 26;
placeSetObject();
al = 30;
placeSetObject();
al = 16;
removeSetObject();
al = 17;
removeSetObject();
al = 14;
playChannel1();
cx = 300;
al = 10;
showPuzText();
_inc(data.byte(kProgresspoints));
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
axeoncontrols:
cx = 300;
al = 16;
showPuzText();
_inc(data.byte(kProgresspoints));
putBackObStuff();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useWire() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto gotwirewith;
withWhat();
return;
2011-06-05 14:49:56 +04:00
gotwirewith:
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'K';
ch = 'N';
dl = 'F';
dh = 'E';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto wireknife;
al = data.byte(kWithobject);
ah = data.byte(kWithtype);
cl = 'A';
ch = 'X';
dl = 'E';
dh = 'D';
compare();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto wireaxe;
cx = 300;
al = 14;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
wireaxe:
cx = 300;
al = 16;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
wireknife:
al = 51;
removeSetObject();
al = 52;
placeSetObject();
cx = 300;
al = 11;
showPuzText();
_inc(data.byte(kProgresspoints));
data.byte(kGetback) = 1;
}
void DreamGenContext::useHandle() {
STACK_CHECK;
al = 'C';
ah = 'U';
cl = 'T';
ch = 'W';
findSetObject();
al = es.byte(bx+58);
_cmp(al, 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto havecutwire;
cx = 300;
al = 12;
showPuzText();
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
havecutwire:
cx = 300;
al = 13;
showPuzText();
data.byte(kNewlocation) = 22;
data.byte(kGetback) = 1;
}
void DreamGenContext::useKey() {
STACK_CHECK;
_cmp(data.byte(kLocation), 5);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto usekey1;
_cmp(data.byte(kLocation), 30);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto usekey1;
_cmp(data.byte(kLocation), 21);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto usekey2;
cx = 200;
al = 1;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
usekey1:
_cmp(data.byte(kMapx), 22);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto wrongroom1;
_cmp(data.byte(kMapy), 10);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto wrongroom1;
cx = 300;
al = 0;
showPuzText();
data.byte(kCounttoclose) = 100;
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
usekey2:
_cmp(data.byte(kMapx), 11);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto wrongroom1;
_cmp(data.byte(kMapy), 10);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto wrongroom1;
cx = 300;
al = 3;
showPuzText();
data.byte(kNewlocation) = 30;
al = 2;
fadeScreenDown();
showFirstUse();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
wrongroom1:
cx = 200;
al = 2;
showPuzText();
putBackObStuff();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useStereo() {
STACK_CHECK;
_cmp(data.byte(kLocation), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto stereook;
cx = 400;
al = 4;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
stereook:
_cmp(data.byte(kMapx), 11);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto stereonotok;
_cmp(data.byte(kMapy), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto stereook2;
2011-06-05 14:49:56 +04:00
stereonotok:
cx = 400;
al = 5;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
stereook2:
al = 'C';
ah = 'D';
cl = 'P';
ch = 'L';
findSetObject();
ah = 1;
checkInside();
_cmp(cl, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto cdinside;
al = 6;
cx = 400;
showPuzText();
putBackObStuff();
getAnyAd();
al = 255;
es.byte(bx+10) = al;
return;
2011-06-05 14:49:56 +04:00
cdinside:
getAnyAd();
al = es.byte(bx+10);
_xor(al, 1);
es.byte(bx+10) = al;
_cmp(al, 255);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto stereoon;
al = 7;
cx = 400;
showPuzText();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
stereoon:
al = 8;
cx = 400;
showPuzText();
putBackObStuff();
}
void DreamGenContext::useCooker() {
STACK_CHECK;
al = data.byte(kCommand);
ah = data.byte(kObjecttype);
checkInside();
_cmp(cl, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto foodinside;
showFirstUse();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
foodinside:
showSecondUse();
putBackObStuff();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useAxe() {
STACK_CHECK;
_cmp(data.byte(kReallocation), 22);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinpool;
_cmp(data.byte(kMapy), 10);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto axeondoor;
showSecondUse();
_inc(data.byte(kProgresspoints));
data.byte(kLastweapon) = 2;
data.byte(kGetback) = 1;
removeObFromInv();
return;
2011-06-05 14:49:56 +04:00
notinpool:
showFirstUse();
return;
/*continuing to unbounded code: axeondoor from useelvdoor:19-30*/
2011-06-05 14:49:56 +04:00
axeondoor:
al = 15;
cx = 300;
showPuzText();
_inc(data.byte(kProgresspoints));
data.word(kWatchingtime) = 46*2;
data.word(kReeltowatch) = 31;
data.word(kEndwatchreel) = 77;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
data.byte(kGetback) = 1;
}
void DreamGenContext::withWhat() {
STACK_CHECK;
createPanel();
showPanel();
showMan();
showExit();
al = data.byte(kCommand);
ah = data.byte(kObjecttype);
es = cs;
di = offset_commandline;
copyName();
di = 100;
bx = 21;
dl = 200;
al = 63;
ah = 2;
printmessage2();
di = data.word(kLastxpos);
_add(di, 5);
bx = 21;
es = cs;
si = offset_commandline;
dl = 220;
al = 0;
ah = 0;
printDirect();
di = data.word(kLastxpos);
_add(di, 5);
bx = 21;
dl = 200;
al = 63;
ah = 3;
printmessage2();
fillRyan();
data.byte(kCommandtype) = 255;
readMouse();
showPointer();
workToScreen();
delPointer();
data.byte(kInvopen) = 2;
}
void DreamGenContext::selectOb() {
STACK_CHECK;
findInvPos();
ax = es.word(bx);
_cmp(al, 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto canselectob;
blank();
return;
2011-06-05 14:49:56 +04:00
canselectob:
data.byte(kWithobject) = al;
data.byte(kWithtype) = ah;
_cmp(ax, data.word(kOldsubject));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto diffsub3;
_cmp(data.byte(kCommandtype), 221);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyselob;
data.byte(kCommandtype) = 221;
2011-06-05 14:49:56 +04:00
diffsub3:
data.word(kOldsubject) = ax;
bx = ax;
al = 0;
commandWithOb();
2011-06-05 14:49:56 +04:00
alreadyselob:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (notselob) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doselob;
return;
2011-06-05 14:49:56 +04:00
doselob:
delPointer();
data.byte(kInvopen) = 0;
useRoutine();
}
void DreamGenContext::findSetObject() {
STACK_CHECK;
_sub(al, 'A');
_sub(ah, 'A');
_sub(cl, 'A');
_sub(ch, 'A');
es = data.word(kSetdat);
bx = 0;
dl = 0;
2011-06-05 14:49:56 +04:00
findsetloop:
_cmp(al, es.byte(bx+12));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofind;
_cmp(ah, es.byte(bx+13));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofind;
_cmp(cl, es.byte(bx+14));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofind;
_cmp(ch, es.byte(bx+15));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofind;
al = dl;
return;
2011-06-05 14:49:56 +04:00
nofind:
_add(bx, 64);
_inc(dl);
_cmp(dl, 128);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findsetloop;
al = dl;
}
void DreamGenContext::findExObject() {
STACK_CHECK;
_sub(al, 'A');
_sub(ah, 'A');
_sub(cl, 'A');
_sub(ch, 'A');
es = data.word(kExtras);
bx = (0+2080+30000);
dl = 0;
2011-06-05 14:49:56 +04:00
findexloop:
_cmp(al, es.byte(bx+12));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindex;
_cmp(ah, es.byte(bx+13));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindex;
_cmp(cl, es.byte(bx+14));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindex;
_cmp(ch, es.byte(bx+15));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindex;
al = dl;
return;
2011-06-05 14:49:56 +04:00
nofindex:
_add(bx, 16);
_inc(dl);
_cmp(dl, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto findexloop;
al = dl;
}
void DreamGenContext::isRyanHolding() {
STACK_CHECK;
_sub(al, 'A');
_sub(ah, 'A');
_sub(cl, 'A');
_sub(ch, 'A');
es = data.word(kExtras);
bx = (0+2080+30000);
dl = 0;
2011-06-05 14:49:56 +04:00
searchinv:
_cmp(es.byte(bx+2), 4);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindininv;
_cmp(al, es.byte(bx+12));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindininv;
_cmp(ah, es.byte(bx+13));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindininv;
_cmp(cl, es.byte(bx+14));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindininv;
_cmp(ch, es.byte(bx+15));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nofindininv;
al = dl;
_cmp(al, (114));
return;
2011-06-05 14:49:56 +04:00
nofindininv:
_add(bx, 16);
_inc(dl);
_cmp(dl, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto searchinv;
al = dl;
_cmp(al, (114));
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::checkInside() {
STACK_CHECK;
es = data.word(kExtras);
bx = (0+2080+30000);
cl = 0;
2011-06-05 14:49:56 +04:00
insideloop:
_cmp(al, es.byte(bx+3));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notfoundinside;
_cmp(ah, es.byte(bx+2));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notfoundinside;
return;
2011-06-05 14:49:56 +04:00
notfoundinside:
_add(bx, 16);
_inc(cl);
_cmp(cl, (114));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto insideloop;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::showPuzText() {
STACK_CHECK;
push(cx);
findPuzText();
push(es);
push(si);
createPanel();
showPanel();
showMan();
showExit();
obIcons();
si = pop();
es = pop();
di = 36;
bx = 104;
dl = 241;
ah = 0;
printDirect();
workToScreenM();
cx = pop();
hangOnP();
}
void DreamGenContext::findPuzText() {
STACK_CHECK;
ah = 0;
si = ax;
_add(si, si);
es = data.word(kPuzzletext);
ax = es.word(si);
_add(ax, (66*2));
si = ax;
}
void DreamGenContext::isSetObOnMap() {
STACK_CHECK;
push(es);
push(bx);
getSetAd();
al = es.byte(bx+58);
bx = pop();
es = pop();
_cmp(al, 0);
}
void DreamGenContext::placeFreeObject() {
STACK_CHECK;
push(es);
push(bx);
cl = 0;
ch = 1;
findOrMake();
getFreeAd();
es.byte(bx+2) = 0;
bx = pop();
es = pop();
}
void DreamGenContext::removeFreeObject() {
STACK_CHECK;
push(es);
push(bx);
getFreeAd();
es.byte(bx+2) = 255;
bx = pop();
es = pop();
}
void DreamGenContext::autoAppear() {
STACK_CHECK;
_cmp(data.byte(kLocation), 32);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinalley;
al = 5;
resetLocation();
al = 10;
setLocation();
data.byte(kDestpos) = 10;
return;
2011-06-05 14:49:56 +04:00
notinalley:
_cmp(data.byte(kReallocation), 24);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinedens;
_cmp(data.byte(kGeneraldead), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto edenspart2;
_inc(data.byte(kGeneraldead));
al = 44;
placeSetObject();
al = 18;
placeSetObject();
al = 93;
placeSetObject();
al = 92;
removeSetObject();
al = 55;
removeSetObject();
al = 75;
removeSetObject();
al = 84;
removeSetObject();
al = 85;
removeSetObject();
return;
2011-06-05 14:49:56 +04:00
edenspart2:
_cmp(data.byte(kSartaindead), 1);
if (!flags.z())
return /* (notedens2) */;
al = 44;
removeSetObject();
al = 93;
removeSetObject();
al = 55;
placeSetObject();
_inc(data.byte(kSartaindead));
return;
2011-06-05 14:49:56 +04:00
notinedens:
_cmp(data.byte(kReallocation), 25);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notonsartroof;
data.byte(kNewsitem) = 3;
al = 6;
resetLocation();
al = 11;
setLocation();
data.byte(kDestpos) = 11;
return;
2011-06-05 14:49:56 +04:00
notonsartroof:
_cmp(data.byte(kReallocation), 2);
if (!flags.z())
return /* (notinlouiss) */;
_cmp(data.byte(kRockstardead), 0);
if (flags.z())
return /* (notinlouiss) */;
al = 23;
placeSetObject();
}
void DreamGenContext::setupTimedUse() {
STACK_CHECK;
_cmp(data.word(kTimecount), 0);
if (!flags.z())
return /* (cantsetup) */;
data.byte(kTimedy) = bh;
data.byte(kTimedx) = bl;
data.word(kCounttotimed) = cx;
_add(dx, cx);
data.word(kTimecount) = dx;
bl = al;
bh = 0;
_add(bx, bx);
es = data.word(kPuzzletext);
cx = (66*2);
ax = es.word(bx);
_add(ax, cx);
bx = ax;
data.word(kTimedseg) = es;
data.word(kTimedoffset) = bx;
}
void DreamGenContext::useGun() {
STACK_CHECK;
_cmp(data.byte(kObjecttype), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto istakengun;
showSecondUse();
putBackObStuff();
return;
2011-06-05 14:49:56 +04:00
istakengun:
_cmp(data.byte(kReallocation), 22);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinpoolroom;
cx = 300;
al = 34;
showPuzText();
data.byte(kLastweapon) = 1;
data.byte(kCombatcount) = 39;
data.byte(kGetback) = 1;
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
notinpoolroom:
_cmp(data.byte(kReallocation), 25);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nothelicopter;
cx = 300;
al = 34;
showPuzText();
data.byte(kLastweapon) = 1;
data.byte(kCombatcount) = 19;
data.byte(kGetback) = 1;
data.byte(kDreamnumber) = 2;
data.byte(kRoomafterdream) = 38;
data.byte(kSartaindead) = 1;
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
nothelicopter:
_cmp(data.byte(kReallocation), 27);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinrockroom;
cx = 300;
al = 46;
showPuzText();
data.byte(kPointermode) = 2;
data.byte(kRockstardead) = 1;
data.byte(kLastweapon) = 1;
data.byte(kNewsitem) = 1;
data.byte(kGetback) = 1;
data.byte(kRoomafterdream) = 32;
data.byte(kDreamnumber) = 0;
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
notinrockroom:
_cmp(data.byte(kReallocation), 8);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notbystudio;
_cmp(data.byte(kMapx), 22);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notbystudio;
_cmp(data.byte(kMapy), 40);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notbystudio;
al = 92;
isSetObOnMap();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notbystudio;
_cmp(data.byte(kManspath), 9);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notbystudio;
data.byte(kDestination) = 9;
data.byte(kFinaldest) = 9;
autoSetWalk();
data.byte(kLastweapon) = 1;
data.byte(kGetback) = 1;
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
notbystudio:
_cmp(data.byte(kReallocation), 6);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsarters;
_cmp(data.byte(kMapx), 11);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsarters;
_cmp(data.byte(kMapy), 20);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsarters;
al = 5;
isSetObOnMap();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsarters;
data.byte(kDestination) = 1;
data.byte(kFinaldest) = 1;
autoSetWalk();
al = 5;
removeSetObject();
al = 6;
placeSetObject();
al = 1;
ah = data.byte(kRoomnum);
_dec(ah);
turnAnyPathOn();
data.byte(kLiftflag) = 1;
data.word(kWatchingtime) = 40*2;
data.word(kReeltowatch) = 4;
data.word(kEndwatchreel) = 43;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
data.byte(kGetback) = 1;
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
notsarters:
_cmp(data.byte(kReallocation), 29);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notaide;
data.byte(kGetback) = 1;
al = 13;
resetLocation();
al = 12;
setLocation();
data.byte(kDestpos) = 12;
data.byte(kDestination) = 2;
data.byte(kFinaldest) = 2;
autoSetWalk();
data.word(kWatchingtime) = 164*2;
data.word(kReeltowatch) = 3;
data.word(kEndwatchreel) = 164;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
data.byte(kAidedead) = 1;
data.byte(kDreamnumber) = 3;
data.byte(kRoomafterdream) = 33;
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
notaide:
_cmp(data.byte(kReallocation), 23);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwithboss;
_cmp(data.byte(kMapx), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwithboss;
_cmp(data.byte(kMapy), 50);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwithboss;
_cmp(data.byte(kManspath), 5);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto pathokboss;
data.byte(kDestination) = 5;
data.byte(kFinaldest) = 5;
autoSetWalk();
2011-06-05 14:49:56 +04:00
pathokboss:
data.byte(kLastweapon) = 1;
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
notwithboss:
_cmp(data.byte(kReallocation), 8);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nottvsoldier;
_cmp(data.byte(kMapx), 11);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nottvsoldier;
_cmp(data.byte(kMapy), 10);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nottvsoldier;
_cmp(data.byte(kManspath), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto pathoktv;
data.byte(kDestination) = 2;
data.byte(kFinaldest) = 2;
autoSetWalk();
2011-06-05 14:49:56 +04:00
pathoktv:
data.byte(kLastweapon) = 1;
data.byte(kGetback) = 1;
return;
2011-06-05 14:49:56 +04:00
nottvsoldier:
showFirstUse();
putBackObStuff();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::useButtonA() {
STACK_CHECK;
al = 95;
isSetObOnMap();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto donethisbit;
showFirstUse();
al = 0;
ah = data.byte(kRoomnum);
_dec(ah);
turnAnyPathOn();
al = 9;
removeSetObject();
al = 95;
placeSetObject();
data.word(kWatchingtime) = 15*2;
data.word(kReeltowatch) = 71;
data.word(kEndwatchreel) = 85;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
data.byte(kGetback) = 1;
_inc(data.byte(kProgresspoints));
return;
2011-06-05 14:49:56 +04:00
donethisbit:
showSecondUse();
putBackObStuff();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::quitKey() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 222);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyqk;
data.byte(kCommandtype) = 222;
al = 4;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyqk:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (notqk) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doqk;
return;
2011-06-05 14:49:56 +04:00
doqk:
data.byte(kGetback) = 1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::dumpKeypad() {
STACK_CHECK;
di = (36+112)-3;
bx = (72)-4;
cl = 120;
ch = 90;
multiDump();
}
void DreamGenContext::quitSymbol() {
STACK_CHECK;
_cmp(data.byte(kSymboltopx), 24);
if (!flags.z())
{ blank(); return; };
_cmp(data.byte(kSymbolbotx), 24);
if (!flags.z())
{ blank(); return; };
_cmp(data.byte(kCommandtype), 222);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyqs;
data.byte(kCommandtype) = 222;
al = 18;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyqs:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (notqs) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto doqs;
return;
2011-06-05 14:49:56 +04:00
doqs:
data.byte(kGetback) = 1;
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::dumpSymbol() {
STACK_CHECK;
data.byte(kNewtextline) = 0;
di = (64);
bx = (56)+20;
cl = 104;
ch = 60;
multiDump();
}
void DreamGenContext::updateSymbolTop() {
STACK_CHECK;
_cmp(data.byte(kSymboltopdir), 0);
if (flags.z())
return /* (topfinished) */;
_cmp(data.byte(kSymboltopdir), -1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto backwards;
_inc(data.byte(kSymboltopx));
_cmp(data.byte(kSymboltopx), 49);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwrapfor;
data.byte(kSymboltopx) = 0;
_dec(data.byte(kSymboltopnum));
_cmp(data.byte(kSymboltopnum), -1);
if (!flags.z())
return /* (topfinished) */;
data.byte(kSymboltopnum) = 5;
return;
2011-06-05 14:49:56 +04:00
notwrapfor:
_cmp(data.byte(kSymboltopx), 24);
if (!flags.z())
return /* (topfinished) */;
data.byte(kSymboltopdir) = 0;
return;
2011-06-05 14:49:56 +04:00
backwards:
_dec(data.byte(kSymboltopx));
_cmp(data.byte(kSymboltopx), -1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwrapback;
data.byte(kSymboltopx) = 48;
_inc(data.byte(kSymboltopnum));
_cmp(data.byte(kSymboltopnum), 6);
if (!flags.z())
return /* (topfinished) */;
data.byte(kSymboltopnum) = 0;
return;
2011-06-05 14:49:56 +04:00
notwrapback:
_cmp(data.byte(kSymboltopx), 24);
if (!flags.z())
return /* (topfinished) */;
data.byte(kSymboltopdir) = 0;
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::updateSymbolBot() {
STACK_CHECK;
_cmp(data.byte(kSymbolbotdir), 0);
if (flags.z())
return /* (botfinished) */;
_cmp(data.byte(kSymbolbotdir), -1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto backwardsbot;
_inc(data.byte(kSymbolbotx));
_cmp(data.byte(kSymbolbotx), 49);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwrapforb;
data.byte(kSymbolbotx) = 0;
_dec(data.byte(kSymbolbotnum));
_cmp(data.byte(kSymbolbotnum), -1);
if (!flags.z())
return /* (botfinished) */;
data.byte(kSymbolbotnum) = 5;
return;
2011-06-05 14:49:56 +04:00
notwrapforb:
_cmp(data.byte(kSymbolbotx), 24);
if (!flags.z())
return /* (botfinished) */;
data.byte(kSymbolbotdir) = 0;
return;
2011-06-05 14:49:56 +04:00
backwardsbot:
_dec(data.byte(kSymbolbotx));
_cmp(data.byte(kSymbolbotx), -1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notwrapbackb;
data.byte(kSymbolbotx) = 48;
_inc(data.byte(kSymbolbotnum));
_cmp(data.byte(kSymbolbotnum), 6);
if (!flags.z())
return /* (botfinished) */;
data.byte(kSymbolbotnum) = 0;
return;
2011-06-05 14:49:56 +04:00
notwrapbackb:
_cmp(data.byte(kSymbolbotx), 24);
if (!flags.z())
return /* (botfinished) */;
data.byte(kSymbolbotdir) = 0;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::dumpSymBox() {
STACK_CHECK;
_cmp(data.word(kDumpx), -1);
if (flags.z())
return /* (nodumpsym) */;
di = data.word(kDumpx);
bx = data.word(kDumpy);
cl = 30;
ch = 77;
multiDump();
data.word(kDumpx) = -1;
}
void DreamGenContext::useDiary() {
STACK_CHECK;
getRidOfReels();
2011-12-04 23:43:32 +01:00
dx = 1009;
loadIntoTemp();
2011-12-04 23:43:32 +01:00
dx = 1022;
loadTempText();
2011-12-04 23:43:32 +01:00
dx = 983;
loadTempCharset();
createPanel();
showIcon();
showDiary();
underTextLine();
showDiaryPage();
readMouse();
showPointer();
workToScreen();
delPointer();
data.byte(kGetback) = 0;
2011-06-05 14:49:56 +04:00
diaryloop:
delPointer();
readMouse();
showDiaryKeys();
showPointer();
vSync();
dumpPointer();
dumpDiaryKeys();
dumpTextLine();
bx = offset_diarylist;
checkCoords();
_cmp(data.byte(kGetback), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto diaryloop;
getRidOfTemp();
getRidOfTempText();
getRidOfTempCharset();
restoreReels();
data.byte(kManisoffscreen) = 0;
redrawMainScrn();
workToScreenM();
}
void DreamGenContext::showDiary() {
STACK_CHECK;
al = 1;
ah = 0;
di = (68+24);
bx = (48+12)+37;
ds = data.word(kTempgraphics);
showFrame();
al = 2;
ah = 0;
di = (68+24)+176;
bx = (48+12)+108;
ds = data.word(kTempgraphics);
showFrame();
}
void DreamGenContext::showDiaryKeys() {
STACK_CHECK;
_cmp(data.byte(kPresscount), 0);
if (flags.z())
return /* (nokeyatall) */;
_dec(data.byte(kPresscount));
_cmp(data.byte(kPresscount), 0);
if (flags.z())
return /* (nokeyatall) */;
_cmp(data.byte(kPressed), 'N');
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nokeyn;
al = 3;
_cmp(data.byte(kPresscount), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotkeyn;
al = 4;
2011-06-05 14:49:56 +04:00
gotkeyn:
ah = 0;
di = (68+24)+94;
bx = (48+12)+97;
ds = data.word(kTempgraphics);
showFrame();
_cmp(data.byte(kPresscount), 1);
if (!flags.z())
return /* (notshown) */;
showDiaryPage();
return;
2011-06-05 14:49:56 +04:00
nokeyn:
al = 5;
_cmp(data.byte(kPresscount), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto gotkeyp;
al = 6;
2011-06-05 14:49:56 +04:00
gotkeyp:
ah = 0;
di = (68+24)+151;
bx = (48+12)+71;
ds = data.word(kTempgraphics);
showFrame();
_cmp(data.byte(kPresscount), 1);
if (!flags.z())
return /* (notshowp) */;
showDiaryPage();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::dumpDiaryKeys() {
STACK_CHECK;
_cmp(data.byte(kPresscount), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdumpdiary;
_cmp(data.byte(kSartaindead), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notsartadd;
_cmp(data.byte(kDiarypage), 5);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsartadd;
_cmp(data.byte(kDiarypage), 5);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsartadd;
al = 6;
getLocation();
_cmp(al, 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notsartadd;
al = 6;
setLocation();
delPointer();
al = 12;
findText1();
di = 70;
bx = 106;
dl = 241;
ah = 16;
printDirect();
workToScreenM();
cx = 200;
hangOnP();
createPanel();
showIcon();
showDiary();
showDiaryPage();
workToScreenM();
showPointer();
return;
2011-06-05 14:49:56 +04:00
notsartadd:
di = (68+24)+48;
bx = (48+12)+15;
cl = 200;
ch = 16;
multiDump();
2011-06-05 14:49:56 +04:00
notdumpdiary:
di = (68+24)+94;
bx = (48+12)+97;
cl = 16;
ch = 16;
multiDump();
di = (68+24)+151;
bx = (48+12)+71;
cl = 16;
ch = 16;
multiDump();
}
void DreamGenContext::diaryKeyP() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 214);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadykeyp;
data.byte(kCommandtype) = 214;
al = 23;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadykeyp:
_cmp(data.word(kMousebutton), 0);
if (flags.z())
return /* (notkeyp) */;
ax = data.word(kOldbutton);
_cmp(ax, data.word(kMousebutton));
if (flags.z())
return /* (notkeyp) */;
_cmp(data.byte(kPresscount), 0);
if (!flags.z())
return /* (notkeyp) */;
al = 16;
playChannel1();
data.byte(kPresscount) = 12;
data.byte(kPressed) = 'P';
_dec(data.byte(kDiarypage));
_cmp(data.byte(kDiarypage), -1);
if (!flags.z())
return /* (notkeyp) */;
data.byte(kDiarypage) = 11;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::diaryKeyN() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 213);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadykeyn;
data.byte(kCommandtype) = 213;
al = 23;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadykeyn:
_cmp(data.word(kMousebutton), 0);
if (flags.z())
return /* (notkeyn) */;
ax = data.word(kOldbutton);
_cmp(ax, data.word(kMousebutton));
if (flags.z())
return /* (notkeyn) */;
_cmp(data.byte(kPresscount), 0);
if (!flags.z())
return /* (notkeyn) */;
al = 16;
playChannel1();
data.byte(kPresscount) = 12;
data.byte(kPressed) = 'N';
_inc(data.byte(kDiarypage));
_cmp(data.byte(kDiarypage), 12);
if (!flags.z())
return /* (notkeyn) */;
data.byte(kDiarypage) = 0;
}
void DreamGenContext::showDiaryPage() {
STACK_CHECK;
al = 0;
ah = 0;
di = (68+24);
bx = (48+12);
ds = data.word(kTempgraphics);
showFrame();
al = data.byte(kDiarypage);
findText1();
data.byte(kKerning) = 1;
useTempCharset();
di = (68+24)+48;
bx = (48+12)+16;
dl = 240;
ah = 16;
data.word(kCharshift) = 91+91;
printDirect();
di = (68+24)+129;
bx = (48+12)+16;
dl = 240;
ah = 16;
printDirect();
di = (68+24)+48;
bx = (48+12)+23;
dl = 240;
ah = 16;
printDirect();
data.byte(kKerning) = 0;
data.word(kCharshift) = 0;
useCharset1();
}
void DreamGenContext::findText1() {
STACK_CHECK;
ah = 0;
si = ax;
_add(si, si);
es = data.word(kTextfile1);
ax = es.word(si);
_add(ax, (66*2));
si = ax;
}
void DreamGenContext::doSaveLoad() {
STACK_CHECK;
data.byte(kPointerframe) = 0;
data.word(kTextaddressx) = 70;
data.word(kTextaddressy) = 182-8;
data.byte(kTextlen) = 181;
data.byte(kManisoffscreen) = 1;
clearWork();
createPanel2();
underTextLine();
getRidOfAll();
loadSaveBox();
showOpBox();
showMainOps();
workToScreen();
2011-06-05 14:49:56 +04:00
goto donefirstops;
restartops:
showOpBox();
showMainOps();
workToScreenM();
2011-06-05 14:49:56 +04:00
donefirstops:
data.byte(kGetback) = 0;
2011-06-05 14:49:56 +04:00
waitops:
_cmp(data.byte(kQuitrequested), 0);
if (!flags.z())
goto justret;
readMouse();
showPointer();
vSync();
dumpPointer();
dumpTextLine();
delPointer();
bx = offset_opslist;
checkCoords();
_cmp(data.byte(kGetback), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waitops;
_cmp(data.byte(kGetback), 2);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto restartops;
data.word(kTextaddressx) = 13;
data.word(kTextaddressy) = 182;
data.byte(kTextlen) = 240;
_cmp(data.byte(kGetback), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto justret;
getRidOfTemp();
restoreAll();
redrawMainScrn();
workToScreenM();
data.byte(kCommandtype) = 200;
2011-06-05 14:49:56 +04:00
justret:
data.byte(kManisoffscreen) = 0;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::discOps() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 249);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadydiscops;
data.byte(kCommandtype) = 249;
al = 43;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadydiscops:
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (nodiscops) */;
_and(ax, 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto dodiscops;
return;
2011-06-05 14:49:56 +04:00
dodiscops:
scanForNames();
data.byte(kLoadingorsave) = 2;
showOpBox();
showDiscOps();
data.byte(kCurrentslot) = 0;
workToScreenM();
data.byte(kGetback) = 0;
2011-06-05 14:49:56 +04:00
discopsloop:
_cmp(data.byte(kQuitrequested), 0);
if (!flags.z())
return /* (quitdiscops) */;
delPointer();
readMouse();
showPointer();
vSync();
dumpPointer();
dumpTextLine();
bx = offset_discopslist;
checkCoords();
_cmp(data.byte(kGetback), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto discopsloop;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::checkInput() {
STACK_CHECK;
_cmp(data.byte(kLoadingorsave), 3);
if (flags.z())
return /* (nokeypress) */;
readKey();
al = data.byte(kCurrentkey);
_cmp(al, 0);
if (flags.z())
return /* (nokeypress) */;
_cmp(al, 13);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notret;
data.byte(kLoadingorsave) = 3;
2011-06-05 14:49:56 +04:00
goto afterkey;
notret:
_cmp(al, 8);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nodel2;
_cmp(data.byte(kCursorpos), 0);
if (flags.z())
return /* (nokeypress) */;
getNamePos();
_dec(data.byte(kCursorpos));
es.byte(bx) = 0;
es.byte(bx+1) = 1;
2011-06-05 14:49:56 +04:00
goto afterkey;
nodel2:
_cmp(data.byte(kCursorpos), 14);
if (flags.z())
return /* (nokeypress) */;
getNamePos();
_inc(data.byte(kCursorpos));
al = data.byte(kCurrentkey);
es.byte(bx+1) = al;
es.byte(bx+2) = 0;
es.byte(bx+3) = 1;
2011-06-05 14:49:56 +04:00
goto afterkey;
return;
2011-06-05 14:49:56 +04:00
afterkey:
showOpBox();
showNames();
showSlots();
showSaveOps();
workToScreenM();
}
void DreamGenContext::getNamePos() {
STACK_CHECK;
al = data.byte(kCurrentslot);
ah = 0;
cx = 17;
_mul(cx);
dx = data;
es = dx;
bx = 1891;
_add(bx, ax);
al = data.byte(kCursorpos);
ah = 0;
_add(bx, ax);
}
void DreamGenContext::showOpBox() {
STACK_CHECK;
ds = data.word(kTempgraphics);
di = (60);
bx = (52);
al = 0;
ah = 0;
showFrame();
ds = data.word(kTempgraphics);
di = (60);
bx = (52)+55;
al = 4;
ah = 0;
showFrame();
}
void DreamGenContext::showLoadOps() {
STACK_CHECK;
ds = data.word(kTempgraphics);
di = (60)+128+4;
bx = (52)+12;
al = 1;
ah = 0;
showFrame();
ds = data.word(kTempgraphics);
di = (60)+176+2;
bx = (52)+60-4;
al = 5;
ah = 0;
showFrame();
di = (60)+104;
bx = (52)+14;
al = 55;
dl = 101;
printMessage();
}
void DreamGenContext::showSaveOps() {
STACK_CHECK;
ds = data.word(kTempgraphics);
di = (60)+128+4;
bx = (52)+12;
al = 1;
ah = 0;
showFrame();
ds = data.word(kTempgraphics);
di = (60)+176+2;
bx = (52)+60-4;
al = 5;
ah = 0;
showFrame();
di = (60)+104;
bx = (52)+14;
al = 54;
dl = 101;
printMessage();
}
void DreamGenContext::selectSlot() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 244);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadysel;
data.byte(kCommandtype) = 244;
al = 45;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadysel:
ax = data.word(kMousebutton);
_cmp(ax, 1);
if (!flags.z())
return /* (noselslot) */;
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (noselslot) */;
_cmp(data.byte(kLoadingorsave), 3);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notnocurs;
_dec(data.byte(kLoadingorsave));
2011-06-05 14:49:56 +04:00
notnocurs:
oldToNames();
ax = data.word(kMousey);
_sub(ax, (52)+4);
cl = -1;
2011-06-05 14:49:56 +04:00
getslotnum:
_inc(cl);
_sub(ax, 11);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto getslotnum;
data.byte(kCurrentslot) = cl;
delPointer();
showOpBox();
showSlots();
showNames();
_cmp(data.byte(kLoadingorsave), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto isloadmode;
showSaveOps();
readMouse();
showPointer();
workToScreen();
delPointer();
return;
2011-06-05 14:49:56 +04:00
isloadmode:
showLoadOps();
readMouse();
showPointer();
workToScreen();
delPointer();
}
void DreamGenContext::showSlots() {
STACK_CHECK;
di = (60)+7;
bx = (52)+8;
al = 2;
ds = data.word(kTempgraphics);
ah = 0;
showFrame();
di = (60)+10;
bx = (52)+11;
cl = 0;
2011-06-05 14:49:56 +04:00
slotloop:
push(cx);
push(di);
push(bx);
_cmp(cl, data.byte(kCurrentslot));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nomatchslot;
al = 3;
ds = data.word(kTempgraphics);
ah = 0;
showFrame();
2011-06-05 14:49:56 +04:00
nomatchslot:
bx = pop();
di = pop();
cx = pop();
_add(bx, 10);
_inc(cl);
_cmp(cl, 7);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto slotloop;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::showNames() {
STACK_CHECK;
dx = data;
es = dx;
si = 1891+1;
di = (60)+21;
bx = (52)+10;
cl = 0;
2011-06-05 14:49:56 +04:00
shownameloop:
push(cx);
push(di);
push(es);
push(bx);
push(si);
al = 4;
_cmp(cl, data.byte(kCurrentslot));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nomatchslot2;
_cmp(data.byte(kLoadingorsave), 2);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto loadmode;
dx = si;
cx = 15;
_add(si, 15);
2011-06-05 14:49:56 +04:00
zerostill:
_dec(si);
_dec(cl);
_cmp(es.byte(si), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto foundcharacter;
2011-06-05 14:49:56 +04:00
goto zerostill;
foundcharacter:
data.byte(kCursorpos) = cl;
es.byte(si) = '/';
es.byte(si+1) = 0;
push(si);
si = dx;
dl = 200;
ah = 0;
printDirect();
si = pop();
es.byte(si) = 0;
es.byte(si+1) = 1;
2011-06-05 14:49:56 +04:00
goto afterprintname;
loadmode:
al = 0;
dl = 200;
ah = 0;
data.word(kCharshift) = 91;
printDirect();
data.word(kCharshift) = 0;
2011-06-05 14:49:56 +04:00
goto afterprintname;
nomatchslot2:
dl = 200;
ah = 0;
printDirect();
2011-06-05 14:49:56 +04:00
afterprintname:
si = pop();
bx = pop();
es = pop();
di = pop();
cx = pop();
_add(si, 17);
_add(bx, 10);
_inc(cl);
_cmp(cl, 7);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto shownameloop;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::decide() {
STACK_CHECK;
setMode();
loadPalFromIFF();
clearPalette();
data.byte(kPointermode) = 0;
data.word(kWatchingtime) = 0;
data.byte(kPointerframe) = 0;
data.word(kTextaddressx) = 70;
data.word(kTextaddressy) = 182-8;
data.byte(kTextlen) = 181;
data.byte(kManisoffscreen) = 1;
loadSaveBox();
showDecisions();
workToScreen();
fadeScreenUp();
data.byte(kGetback) = 0;
2011-06-05 14:49:56 +04:00
waitdecide:
_cmp(data.byte(kQuitrequested), 0);
if (flags.z())
goto _tmp1;
return;
_tmp1:
readMouse();
showPointer();
vSync();
dumpPointer();
dumpTextLine();
delPointer();
bx = offset_decidelist;
checkCoords();
_cmp(data.byte(kGetback), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto waitdecide;
_cmp(data.byte(kGetback), 4);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto hasloadedroom;
getRidOfTemp();
2011-06-05 14:49:56 +04:00
hasloadedroom:
data.word(kTextaddressx) = 13;
data.word(kTextaddressy) = 182;
data.byte(kTextlen) = 240;
}
void DreamGenContext::showDecisions() {
STACK_CHECK;
createPanel2();
showOpBox();
ds = data.word(kTempgraphics);
di = (60)+17;
bx = (52)+13;
al = 6;
ah = 0;
showFrame();
underTextLine();
}
void DreamGenContext::createName() {
STACK_CHECK;
push(ax);
di = offset_speechfile;
cs.byte(di+0) = dl;
cs.byte(di+3) = cl;
al = dh;
ah = '0'-1;
2011-06-05 14:49:56 +04:00
findten:
_inc(ah);
_sub(al, 10);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto findten;
cs.byte(di+1) = ah;
_add(al, 10+'0');
cs.byte(di+2) = al;
ax = pop();
cl = '0'-1;
2011-06-05 14:49:56 +04:00
thousandsc:
_inc(cl);
_sub(ax, 1000);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto thousandsc;
_add(ax, 1000);
cs.byte(di+4) = cl;
cl = '0'-1;
2011-06-05 14:49:56 +04:00
hundredsc:
_inc(cl);
_sub(ax, 100);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto hundredsc;
_add(ax, 100);
cs.byte(di+5) = cl;
cl = '0'-1;
2011-06-05 14:49:56 +04:00
tensc:
_inc(cl);
_sub(ax, 10);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto tensc;
_add(ax, 10);
cs.byte(di+6) = cl;
_add(al, '0');
cs.byte(di+7) = al;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::volumeAdjust() {
STACK_CHECK;
al = data.byte(kVolumedirection);
_cmp(al, 0);
if (flags.z())
return /* (volok) */;
al = data.byte(kVolume);
_cmp(al, data.byte(kVolumeto));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto volfinish;
_add(data.byte(kVolumecount), 64);
if (!flags.z())
return /* (volok) */;
al = data.byte(kVolume);
_add(al, data.byte(kVolumedirection));
data.byte(kVolume) = al;
return;
2011-06-05 14:49:56 +04:00
volfinish:
data.byte(kVolumedirection) = 0;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::entryTexts() {
STACK_CHECK;
_cmp(data.byte(kLocation), 21);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notloc15;
al = 28;
cx = 60;
dx = 11;
bl = 68;
bh = 64;
setupTimedUse();
return;
2011-06-05 14:49:56 +04:00
notloc15:
_cmp(data.byte(kLocation), 30);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notloc43;
al = 27;
cx = 60;
dx = 11;
bl = 68;
bh = 64;
setupTimedUse();
return;
2011-06-05 14:49:56 +04:00
notloc43:
_cmp(data.byte(kLocation), 23);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notloc23;
al = 29;
cx = 60;
dx = 11;
bl = 68;
bh = 64;
setupTimedUse();
return;
2011-06-05 14:49:56 +04:00
notloc23:
_cmp(data.byte(kLocation), 31);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notloc44;
al = 30;
cx = 60;
dx = 11;
bl = 68;
bh = 64;
setupTimedUse();
return;
2011-06-05 14:49:56 +04:00
notloc44:
_cmp(data.byte(kLocation), 20);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsarters2;
al = 31;
cx = 60;
dx = 11;
bl = 68;
bh = 64;
setupTimedUse();
return;
2011-06-05 14:49:56 +04:00
notsarters2:
_cmp(data.byte(kLocation), 24);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notedenlob;
al = 32;
cx = 60;
dx = 3;
bl = 68;
bh = 64;
setupTimedUse();
return;
2011-06-05 14:49:56 +04:00
notedenlob:
_cmp(data.byte(kLocation), 34);
if (!flags.z())
return /* (noteden2) */;
al = 33;
cx = 60;
dx = 3;
bl = 68;
bh = 64;
setupTimedUse();
}
void DreamGenContext::entryAnims() {
STACK_CHECK;
data.word(kReeltowatch) = -1;
data.byte(kWatchmode) = -1;
_cmp(data.byte(kLocation), 33);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinthebeach;
switchRyanOff();
data.word(kWatchingtime) = 76*2;
data.word(kReeltowatch) = 0;
data.word(kEndwatchreel) = 76;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
return;
2011-06-05 14:49:56 +04:00
notinthebeach:
_cmp(data.byte(kLocation), 44);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notsparkys;
al = 8;
resetLocation();
data.word(kWatchingtime) = 50*2;
data.word(kReeltowatch) = 247;
data.word(kEndwatchreel) = 297;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
switchRyanOff();
return;
2011-06-05 14:49:56 +04:00
notsparkys:
_cmp(data.byte(kLocation), 22);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notinthelift;
data.word(kWatchingtime) = 31*2;
data.word(kReeltowatch) = 0;
data.word(kEndwatchreel) = 30;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
switchRyanOff();
return;
2011-06-05 14:49:56 +04:00
notinthelift:
_cmp(data.byte(kLocation), 26);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notunderchurch;
data.byte(kSymboltopnum) = 2;
data.byte(kSymbolbotnum) = 1;
return;
2011-06-05 14:49:56 +04:00
notunderchurch:
_cmp(data.byte(kLocation), 45);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notenterdream;
data.byte(kKeeperflag) = 0;
data.word(kWatchingtime) = 296;
data.word(kReeltowatch) = 45;
data.word(kEndwatchreel) = 198;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
switchRyanOff();
return;
2011-06-05 14:49:56 +04:00
notenterdream:
_cmp(data.byte(kReallocation), 46);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notcrystal;
_cmp(data.byte(kSartaindead), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notcrystal;
al = 0;
removeFreeObject();
return;
2011-06-05 14:49:56 +04:00
notcrystal:
_cmp(data.byte(kLocation), 9);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto nottopchurch;
al = 2;
checkIfPathIsOn();
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nottopchurch;
_cmp(data.byte(kAidedead), 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nottopchurch;
al = 3;
checkIfPathIsOn();
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto makedoorsopen;
al = 2;
turnPathOn();
2011-06-05 14:49:56 +04:00
makedoorsopen:
al = 4;
removeSetObject();
al = 5;
placeSetObject();
return;
2011-06-05 14:49:56 +04:00
nottopchurch:
_cmp(data.byte(kLocation), 47);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notdreamcentre;
al = 4;
placeSetObject();
al = 5;
placeSetObject();
return;
2011-06-05 14:49:56 +04:00
notdreamcentre:
_cmp(data.byte(kLocation), 38);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notcarpark;
data.word(kWatchingtime) = 57*2;
data.word(kReeltowatch) = 4;
data.word(kEndwatchreel) = 57;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
switchRyanOff();
return;
2011-06-05 14:49:56 +04:00
notcarpark:
_cmp(data.byte(kLocation), 32);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notalley;
data.word(kWatchingtime) = 66*2;
data.word(kReeltowatch) = 0;
data.word(kEndwatchreel) = 66;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
switchRyanOff();
return;
2011-06-05 14:49:56 +04:00
notalley:
_cmp(data.byte(kLocation), 24);
if (!flags.z())
return /* (notedensagain) */;
al = 2;
ah = data.byte(kRoomnum);
_dec(ah);
turnAnyPathOn();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::clearBuffers() {
STACK_CHECK;
es = data.word(kBuffers);
cx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526+68-0)/2;
ax = 0;
di = 0;
_stosw(cx, true);
es = data.word(kExtras);
cx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/2;
ax = 0x0ffff;
di = 0;
_stosw(cx, true);
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
ds = cs;
si = 526;
cx = (983-526);
_movsb(cx, true);
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526);
ds = cs;
si = 0;
cx = (68-0);
_movsb(cx, true);
clearChanges();
}
void DreamGenContext::clearChanges() {
STACK_CHECK;
es = data.word(kBuffers);
cx = (250)*2;
ax = 0x0ffff;
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
_stosw(cx, true);
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
es = cs;
di = 526;
cx = (983-526);
_movsb(cx, true);
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+983-526);
es = cs;
di = 0;
cx = (68-0);
_movsb(cx, true);
data.byte(kExpos) = 0;
data.word(kExframepos) = 0;
data.word(kExtextpos) = 0;
es = data.word(kExtras);
cx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/2;
ax = 0x0ffff;
di = 0;
_stosw(cx, true);
es = cs;
di = 1723;
al = 1;
_stosb(2);
al = 0;
_stosb();
al = 1;
_stosb();
ax = 0;
cx = 6;
_stosw(cx, true);
}
void DreamGenContext::clearRest() {
STACK_CHECK;
es = data.word(kMapdata);
cx = (66*60)/2;
ax = 0;
di = (0);
_stosw(cx, true);
es = data.word(kBackdrop);
deallocateMem();
es = data.word(kSetframes);
deallocateMem();
es = data.word(kReels);
deallocateMem();
es = data.word(kPeople);
deallocateMem();
es = data.word(kSetdesc);
deallocateMem();
es = data.word(kBlockdesc);
deallocateMem();
es = data.word(kRoomdesc);
deallocateMem();
es = data.word(kFreeframes);
deallocateMem();
es = data.word(kFreedesc);
deallocateMem();
}
void DreamGenContext::watchReel() {
STACK_CHECK;
_cmp(data.word(kReeltowatch), -1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notplayingreel;
al = data.byte(kManspath);
_cmp(al, data.byte(kFinaldest));
if (!flags.z())
return /* (waitstopwalk) */;
al = data.byte(kTurntoface);
_cmp(al, data.byte(kFacing));
if (flags.z())
2011-06-16 16:31:17 +04:00
goto notwatchpath;
return;
2011-06-05 14:49:56 +04:00
notwatchpath:
_dec(data.byte(kSpeedcount));
_cmp(data.byte(kSpeedcount), -1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto showwatchreel;
al = data.byte(kWatchspeed);
data.byte(kSpeedcount) = al;
ax = data.word(kReeltowatch);
_cmp(ax, data.word(kEndwatchreel));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto ismorereel;
_cmp(data.word(kWatchingtime), 0);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto showwatchreel;
data.word(kReeltowatch) = -1;
data.byte(kWatchmode) = -1;
_cmp(data.word(kReeltohold), -1);
if (flags.z())
return /* (nomorereel) */;
data.byte(kWatchmode) = 1;
2011-06-05 14:49:56 +04:00
goto notplayingreel;
ismorereel:
_inc(data.word(kReeltowatch));
2011-06-05 14:49:56 +04:00
showwatchreel:
ax = data.word(kReeltowatch);
data.word(kReelpointer) = ax;
plotReel();
ax = data.word(kReelpointer);
data.word(kReeltowatch) = ax;
checkForShake();
return;
2011-06-05 14:49:56 +04:00
notplayingreel:
_cmp(data.byte(kWatchmode), 1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notholdingreel;
ax = data.word(kReeltohold);
data.word(kReelpointer) = ax;
plotReel();
return;
2011-06-05 14:49:56 +04:00
notholdingreel:
_cmp(data.byte(kWatchmode), 2);
if (!flags.z())
return /* (notreleasehold) */;
_dec(data.byte(kSpeedcount));
_cmp(data.byte(kSpeedcount), -1);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto notlastspeed2;
al = data.byte(kWatchspeed);
data.byte(kSpeedcount) = al;
_inc(data.word(kReeltohold));
2011-06-05 14:49:56 +04:00
notlastspeed2:
ax = data.word(kReeltohold);
_cmp(ax, data.word(kEndofholdreel));
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto ismorereel2;
data.word(kReeltohold) = -1;
data.byte(kWatchmode) = -1;
al = data.byte(kDestafterhold);
data.byte(kDestination) = al;
data.byte(kFinaldest) = al;
autoSetWalk();
return;
2011-06-05 14:49:56 +04:00
ismorereel2:
ax = data.word(kReeltohold);
data.word(kReelpointer) = ax;
plotReel();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::checkForShake() {
STACK_CHECK;
_cmp(data.byte(kReallocation), 26);
if (!flags.z())
return /* (notstartshake) */;
_cmp(ax, 104);
if (!flags.z())
return /* (notstartshake) */;
data.byte(kShakecounter) = -1;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::madmanRun() {
STACK_CHECK;
_cmp(data.byte(kLocation), 14);
if (!flags.z())
{ identifyOb(); return; };
_cmp(data.byte(kMapx), 22);
if (!flags.z())
{ identifyOb(); return; };
_cmp(data.byte(kPointermode), 2);
if (!flags.z())
{ identifyOb(); return; };
_cmp(data.byte(kMadmanflag), 0);
if (!flags.z())
{ identifyOb(); return; };
_cmp(data.byte(kCommandtype), 211);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto alreadyrun;
data.byte(kCommandtype) = 211;
al = 52;
commandOnly();
2011-06-05 14:49:56 +04:00
alreadyrun:
_cmp(data.word(kMousebutton), 1);
if (!flags.z())
return /* (norun) */;
ax = data.word(kMousebutton);
_cmp(ax, data.word(kOldbutton));
if (flags.z())
return /* (norun) */;
data.byte(kLastweapon) = 8;
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::identifyOb() {
STACK_CHECK;
_cmp(data.word(kWatchingtime), 0);
if (!flags.z())
{ blank(); return; };
ax = data.word(kMousex);
_sub(ax, data.word(kMapadx));
_cmp(ax, 22*8);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notover1;
blank();
return;
2011-06-05 14:49:56 +04:00
notover1:
bx = data.word(kMousey);
_sub(bx, data.word(kMapady));
_cmp(bx, 20*8);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto notover2;
blank();
return;
2011-06-05 14:49:56 +04:00
notover2:
data.byte(kInmaparea) = 1;
ah = bl;
push(ax);
findPathOfPoint();
data.byte(kPointerspath) = dl;
ax = pop();
push(ax);
findFirstPath();
data.byte(kPointerfirstpath) = al;
ax = pop();
checkIfEx();
if (!flags.z())
return /* (finishidentify) */;
checkIfFree();
if (!flags.z())
return /* (finishidentify) */;
checkIfPerson();
if (!flags.z())
return /* (finishidentify) */;
checkIfSet();
if (!flags.z())
return /* (finishidentify) */;
ax = data.word(kMousex);
_sub(ax, data.word(kMapadx));
cl = al;
ax = data.word(kMousey);
_sub(ax, data.word(kMapady));
ch = al;
checkOne();
_cmp(al, 0);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nothingund;
_cmp(data.byte(kMandead), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nothingund;
ah = 3;
obName();
return;
2011-06-05 14:49:56 +04:00
nothingund:
blank();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::findPathOfPoint() {
STACK_CHECK;
push(ax);
bx = (0);
es = data.word(kReels);
al = data.byte(kRoomnum);
ah = 0;
cx = 144;
_mul(cx);
_add(bx, ax);
cx = pop();
dl = 0;
2011-06-05 14:49:56 +04:00
pathloop:
al = es.byte(bx+6);
_cmp(al, 255);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto flunkedit;
ax = es.word(bx+2);
_cmp(ax, 0x0ffff);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto flunkedit;
_cmp(cl, al);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto flunkedit;
_cmp(ch, ah);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto flunkedit;
ax = es.word(bx+4);
_cmp(cl, al);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto flunkedit;
_cmp(ch, ah);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto flunkedit;
return /* (gotvalidpath) */;
2011-06-05 14:49:56 +04:00
flunkedit:
_add(bx, 8);
_inc(dl);
_cmp(dl, 12);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto pathloop;
dl = 255;
}
void DreamGenContext::findFirstPath() {
STACK_CHECK;
push(ax);
bx = (0);
es = data.word(kReels);
al = data.byte(kRoomnum);
ah = 0;
cx = 144;
_mul(cx);
_add(bx, ax);
cx = pop();
dl = 0;
2011-06-05 14:49:56 +04:00
fpathloop:
ax = es.word(bx+2);
_cmp(ax, 0x0ffff);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto nofirst;
_cmp(cl, al);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto nofirst;
_cmp(ch, ah);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto nofirst;
ax = es.word(bx+4);
_cmp(cl, al);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto nofirst;
_cmp(ch, ah);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto nofirst;
2011-06-05 14:49:56 +04:00
goto gotfirst;
nofirst:
_add(bx, 8);
_inc(dl);
_cmp(dl, 12);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto fpathloop;
al = 0;
return;
2011-06-05 14:49:56 +04:00
gotfirst:
al = es.byte(bx+6);
}
void DreamGenContext::afterNewRoom() {
STACK_CHECK;
_cmp(data.byte(kNowinnewroom), 0);
if (flags.z())
return /* (notnew) */;
data.word(kTimecount) = 0;
createPanel();
data.byte(kCommandtype) = 0;
findRoomInLoc();
_cmp(data.byte(kRyanon), 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto ryansoff;
al = data.byte(kRyanx);
_add(al, 12);
ah = data.byte(kRyany);
_add(ah, 12);
findPathOfPoint();
data.byte(kManspath) = dl;
findXYFromPath();
data.byte(kResetmanxy) = 1;
2011-06-05 14:49:56 +04:00
ryansoff:
data.byte(kNewobs) = 1;
drawFloor();
data.word(kLookcounter) = 160;
data.byte(kNowinnewroom) = 0;
showIcon();
spriteUpdate();
printSprites();
underTextLine();
reelsOnScreen();
mainScreen();
getUnderZoom();
zoom();
workToScreenM();
walkIntoRoom();
reminders();
atmospheres();
2011-06-05 13:38:05 +04:00
}
void DreamGenContext::printmessage2() {
STACK_CHECK;
push(dx);
push(bx);
push(di);
push(ax);
ah = 0;
_add(ax, ax);
bx = ax;
es = data.word(kCommandtext);
ax = es.word(bx);
_add(ax, (66*2));
si = ax;
ax = pop();
2011-06-05 14:49:56 +04:00
searchmess:
push(ax);
findNextColon();
ax = pop();
_dec(ah);
if (!flags.z())
2011-06-16 16:31:17 +04:00
goto searchmess;
di = pop();
bx = pop();
dx = pop();
al = 0;
ah = 0;
printDirect();
}
void DreamGenContext::workoutFrames() {
STACK_CHECK;
bx = data.word(kLinestartx);
_add(bx, 32);
ax = data.word(kLineendx);
_add(ax, 32);
_sub(bx, ax);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto notneg1;
_neg(bx);
2011-06-05 14:49:56 +04:00
notneg1:
cx = data.word(kLinestarty);
_add(cx, 32);
ax = data.word(kLineendy);
_add(ax, 32);
_sub(cx, ax);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto notneg2;
_neg(cx);
2011-06-05 14:49:56 +04:00
notneg2:
_cmp(bx, cx);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto tendstohoriz;
dl = 2;
ax = cx;
_shr(ax, 1);
_cmp(bx, ax);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto gotquad;
dl = 1;
2011-06-05 14:49:56 +04:00
goto gotquad;
tendstohoriz:
dl = 0;
ax = bx;
_shr(ax, 1);
_cmp(cx, ax);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto gotquad;
dl = 1;
2011-06-05 14:49:56 +04:00
goto gotquad;
gotquad:
bx = data.word(kLinestartx);
_add(bx, 32);
ax = data.word(kLineendx);
_add(ax, 32);
_sub(bx, ax);
if (flags.c())
2011-06-16 16:31:17 +04:00
goto isinright;
cx = data.word(kLinestarty);
_add(cx, 32);
ax = data.word(kLineendy);
_add(ax, 32);
_sub(cx, ax);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto topleft;
_cmp(dl, 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noswap1;
_xor(dl, 2);
2011-06-05 14:49:56 +04:00
noswap1:
_add(dl, 4);
2011-06-05 14:49:56 +04:00
goto success;
topleft:
_add(dl, 6);
2011-06-05 14:49:56 +04:00
goto success;
isinright:
cx = data.word(kLinestarty);
_add(cx, 32);
ax = data.word(kLineendy);
_add(ax, 32);
_sub(cx, ax);
if (!flags.c())
2011-06-16 16:31:17 +04:00
goto botright;
_add(dl, 2);
2011-06-05 14:49:56 +04:00
goto success;
botright:
_cmp(dl, 1);
if (flags.z())
2011-06-16 16:31:17 +04:00
goto noswap2;
_xor(dl, 2);
2011-06-05 14:49:56 +04:00
noswap2:
success:
_and(dl, 7);
data.byte(kTurntoface) = dl;
data.byte(kTurndirection) = 0;
}
void DreamGenContext::middlePanel() {
STACK_CHECK;
ds = data.word(kTempsprites);
di = 72+47+20;
bx = 0;
al = 48;
ah = 0;
showFrame();
ds = data.word(kTempsprites);
di = 72+19;
bx = 21;
al = 47;
ah = 0;
showFrame();
ds = data.word(kTempsprites);
di = 160+23;
bx = 0;
al = 48;
ah = 4;
showFrame();
ds = data.word(kTempsprites);
di = 160+71;
bx = 21;
al = 47;
ah = 4;
showFrame();
}
void DreamGenContext::getUnderZoom() {
STACK_CHECK;
di = (8)+5;
bx = (132)+4;
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
cl = 46;
ch = 40;
multiGet();
2011-06-05 14:49:56 +04:00
}
void DreamGenContext::dumpZoom() {
STACK_CHECK;
_cmp(data.byte(kZoomon), 1);
if (!flags.z())
return /* (notzoomon) */;
di = (8)+5;
bx = (132)+4;
cl = 46;
ch = 40;
multiDump();
}
void DreamGenContext::putUnderZoom() {
STACK_CHECK;
di = (8)+5;
bx = (132)+4;
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
cl = 46;
ch = 40;
multiPut();
}
void DreamGenContext::underTextLine() {
STACK_CHECK;
di = data.word(kTextaddressx);
bx = data.word(kTextaddressy);
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp1;
_sub(bx, 3);
_tmp1:
ds = data.word(kBuffers);
si = (0);
cl = (228);
ch = (13);
multiGet();
}
void DreamGenContext::__start() {
2011-06-05 13:38:05 +04:00
static const uint8 src[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0000: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
//0x0010: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0020: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0xff, 0x00,
//0x0030: .... .... .... ....
0xff, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0xb6,
//0x0040: ...0 .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0050: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0060: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0070: .... ...h .&.. ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0080: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0090: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00a0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
//0x00b0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00c0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00d0: .... .... .... ....
0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00e0: .. .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00f0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0100: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0110: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0120: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0130: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0140: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0150: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
//0x0160: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0170: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0180: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0190: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
//0x01a0: .... .... .... ....
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
//0x01b0: .... .... .... ....
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00,
//0x01c0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x01d0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x01e0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x01f0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2c,
//0x0200: .... .... .... ...,
0x00, 0x14, 0x00, 0x02, 0x00, 0x01, 0x01, 0x37, 0x00, 0x00, 0x00, 0x32, 0x14, 0x00, 0x18, 0x16,
//0x0210: .... ...7 ...2 ....
0x00, 0x4a, 0x00, 0x01, 0x00, 0x00, 0x18, 0x21, 0x0a, 0x4b, 0x00, 0x01, 0x00, 0x01, 0x01, 0x2c,
//0x0220: .J.. ...! .K.. ...,
0x00, 0x1b, 0x00, 0x02, 0x00, 0x02, 0x01, 0x2c, 0x00, 0x60, 0x00, 0x03, 0x00, 0x04, 0x01, 0x2c,
//0x0230: .... ..., .`.. ...,
0x00, 0x76, 0x00, 0x02, 0x00, 0x05, 0x01, 0x2c, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x16,
//0x0240: .v.. ..., .... ....
0x14, 0x35, 0x00, 0x03, 0x00, 0x00, 0x05, 0x16, 0x14, 0x28, 0x00, 0x01, 0x00, 0x02, 0x05, 0x16,
//0x0250: .5.. .... .(.. ....
0x14, 0x32, 0x00, 0x01, 0x00, 0x03, 0x02, 0x0b, 0x0a, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x02, 0x0b,
//0x0260: .2.. .... .... ....
0x0a, 0xb6, 0x00, 0x02, 0x00, 0x01, 0x08, 0x0b, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x17, 0x00,
//0x0270: .... .... .... ....
0x32, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1c, 0x0b, 0x14, 0xfa, 0x00, 0x04, 0x00, 0x00, 0x17, 0x00,
//0x0280: 2... .... .... ....
0x32, 0x2b, 0x00, 0x02, 0x00, 0x08, 0x17, 0x0b, 0x28, 0x82, 0x00, 0x02, 0x00, 0x01, 0x17, 0x16,
//0x0290: 2+.. .... (... ....
0x28, 0x7a, 0x00, 0x02, 0x00, 0x02, 0x17, 0x16, 0x28, 0x69, 0x00, 0x02, 0x00, 0x03, 0x17, 0x16,
//0x02a0: (z.. .... (i.. ....
0x28, 0x51, 0x00, 0x02, 0x00, 0x04, 0x17, 0x0b, 0x28, 0x87, 0x00, 0x02, 0x00, 0x05, 0x17, 0x16,
//0x02b0: (Q.. .... (... ....
0x28, 0x91, 0x00, 0x02, 0x00, 0x06, 0x04, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16,
//0x02c0: (... .... .... ..-.
0x1e, 0xc8, 0x00, 0x00, 0x00, 0x14, 0x2d, 0x16, 0x1e, 0x27, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16,
//0x02d0: .... ..-. .'.. ..-.
0x1e, 0x19, 0x00, 0x02, 0x00, 0x00, 0x08, 0x16, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x07, 0x0b,
//0x02e0: .... .... ( .. ....
0x14, 0x40, 0x00, 0x02, 0x00, 0x00, 0x16, 0x16, 0x14, 0x52, 0x00, 0x02, 0x00, 0x00, 0x1b, 0x0b,
//0x02f0: .@.. .... .R.. ....
0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x14, 0x00, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x21,
//0x0300: .... .... .... ...!
0x28, 0x15, 0x00, 0x01, 0x00, 0x00, 0x1d, 0x0b, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x16,
//0x0310: (... .... .... ....
0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00, 0x32, 0x04, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16,
//0x0320: .... .... 2... ..2.
0x1e, 0x79, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x1e, 0x00, 0x00, 0x14, 0x00, 0x00, 0x34, 0x16,
//0x0330: .y.. ..2. .... ..4.
0x1e, 0xc0, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0xe9, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16,
//0x0340: .... ..4. .... ..2.
0x28, 0x68, 0x00, 0x37, 0x00, 0x00, 0x35, 0x21, 0x00, 0x63, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16,
//0x0350: (h.7 ..5! .c.. ..2.
0x28, 0x00, 0x00, 0x03, 0x00, 0x00, 0x32, 0x16, 0x1e, 0xa2, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16,
//0x0360: (... ..2. .... ..4.
0x1e, 0x39, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x36, 0x00,
//0x0370: .9.. ..4. .... ..6.
0x00, 0x48, 0x00, 0x03, 0x00, 0x00, 0x37, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x13, 0x00,
//0x0380: .H.. ..7, .... ....
0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0e, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x16,
//0x0390: .... .... .... ....
0x00, 0x2c, 0x01, 0x01, 0x00, 0x00, 0x0a, 0x16, 0x1e, 0xae, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x16,
//0x03a0: .,.. .... .... ....
0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x0b, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x0b,
//0x03b0: .... .... ...2 ....
0x1e, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x16, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0e, 0x21,
//0x03c0: ...2 .... ...2 ...!
2011-12-04 23:43:32 +01:00
0x28, 0x00, 0x00, 0x32, 0x14, 0x00, 0xff, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e,
//0x03d0: (..2 ...D REAM WEB.
0x43, 0x30, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39, 0x39,
//0x03e0: C02. DREA MWEB .V99
0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x34, 0x00, 0x44, 0x52,
//0x03f0: .DRE AMWE B.G1 4.DR
0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x35, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
//0x0400: EAMW EB.T 51.D REAM
0x57, 0x45, 0x42, 0x2e, 0x54, 0x38, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
//0x0410: WEB. T83. DREA MWEB
0x2e, 0x56, 0x4f, 0x4c, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31,
//0x0420: .VOL .DRE AMWE B.G1
0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44,
//0x0430: 3.DR EAMW EB.G 15.D
0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x11, 0x01,
//0x0440: REAM WEB. I07. ....
0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0xf0, 0x00, 0x22, 0x01, 0x02, 0x00, 0x2c, 0x00,
//0x0450: @... ..|. ..". ..,.
0x94, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01,
//0x0460: .... @... .... ....
0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
//0x0470: @... ..|. ..@. ....
0xa0, 0xca, 0xff, 0xff, 0xee, 0x00, 0x02, 0x01, 0x04, 0x00, 0x2c, 0x00, 0xc8, 0xc4, 0x68, 0x00,
//0x0480: .... .... ..,. ..h.
0x7c, 0x00, 0x04, 0x00, 0x2c, 0x00, 0xcc, 0xc4, 0x18, 0x01, 0x34, 0x01, 0x04, 0x00, 0x2c, 0x00,
//0x0490: |... ,... ..4. ..,.
0xb0, 0xc4, 0x68, 0x00, 0xd8, 0x00, 0x8a, 0x00, 0xc0, 0x00, 0xd0, 0xc4, 0x11, 0x01, 0x40, 0x01,
//0x04a0: ..h. .... .... ..@.
0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca,
//0x04b0: .... |... @... ....
0xff, 0xff, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50,
//0x04c0: ..EX IT HELP
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x04d0: LI ST
0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20,
//0x04e0: READ LO GON
0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00,
//0x04f0: KEYS ..
0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c,
//0x0500: PUBL IC PUBL
0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44,
//0x0510: IC . ..BL ACKD
0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0520: RAGO N RY AN
0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0530: ... HEND RIX
0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45,
//0x0540: LOUI S . ..SE
0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54,
//0x0550: PTIM US BE CKET
0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0560: T ...
0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0570: ."R OOT
0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0580: . "
0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0xba, 0x00, 0xca, 0x00, 0x9d, 0x00,
//0x0590: .00 00.0 0... ....
0xad, 0x00, 0x1c, 0xc8, 0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8, 0x0c, 0x01,
//0x05a0: .... .... .... ....
0x1c, 0x01, 0xa8, 0x00, 0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
//0x05b0: .... ..P. ..@. ....
0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8, 0x46, 0x00,
//0x05c0: .... w... R... 4.F.
0x89, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00, 0x98, 0x00,
//0x05d0: ..>. o... .... D...
0x4c, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00,
//0x05e0: L... @... .... ..w.
0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00, 0x6f, 0x00,
//0x05f0: ..R. ..D. F... >.o.
0x50, 0xc8, 0xec, 0x00, 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00, 0x40, 0x01,
//0x0600: P... ..p. ..H. ..@.
0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x81, 0x00, 0xb8,
//0x0610: .... .... .... $...
0x00, 0x52, 0x00, 0x80, 0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80,
//0x0620: .R.. ...P ...> .o..
0xc8, 0xb7, 0x00, 0xfa, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00,
//0x0630: .... .>.o .... .@..
0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, 0x34,
//0x0640: .... ...S PEEC HR24
0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54,
//0x0650: C000 5.RA W.OB JECT
0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0660: NAM E ON E
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
//0x0670:
0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0680: .. .... .... ....
0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00,
//0x0690: .... .... ...D :...
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x06a0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00,
//0x06b0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04,
//0x06c0: .... .... .... ....
0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x06d0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x06e0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2011-12-04 23:43:32 +01:00
//0x06f0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0700: .... .... .... ....
2011-12-04 17:24:16 +01:00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2011-12-04 23:43:32 +01:00
//0x0710: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2011-12-04 23:43:32 +01:00
//0x0720: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2011-12-05 00:45:42 +01:00
//0x0730: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2011-12-04 23:58:53 +01:00
//0x0740: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
2011-12-04 20:18:08 +01:00
//0x0750: .... .... .... ....
0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
2011-12-04 20:03:16 +01:00
//0x0760: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0770: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
2011-12-04 17:24:16 +01:00
//0x0780: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
2011-12-04 17:24:16 +01:00
//0x0790: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
2011-12-04 17:24:16 +01:00
//0x07a0: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x07b0: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
2011-12-04 17:24:16 +01:00
//0x07c0: .... .... .... ....
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, };
ds.assign(src, src + sizeof(src));
dreamweb();
2011-06-07 00:58:18 +04:00
}
2011-06-05 14:49:56 +04:00
2011-06-05 13:38:05 +04:00
} /*namespace*/