2011-06-15 23:00:05 +04:00
|
|
|
/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */
|
|
|
|
|
2011-07-20 13:15:30 +02:00
|
|
|
/* 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
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::alleyBarkSound() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
|
|
|
push(es);
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = pop();
|
|
|
|
bx = pop();
|
|
|
|
ax = 1000;
|
2011-06-05 13:38:05 +04:00
|
|
|
nobark:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::introMusic() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::foghornSound() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 198);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nofog) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 13;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::receptionist() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotrecep;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCardpassflag), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsetcard;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kCardpassflag));
|
|
|
|
es.byte(bx+7) = 1;
|
|
|
|
es.word(bx+3) = 64;
|
2011-06-05 13:38:05 +04:00
|
|
|
notsetcard:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 58);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdes1;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 30);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdes2;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 55;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotrecep;
|
|
|
|
notdes1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 60);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdes2;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 240);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotrecep;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 53;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotrecep;
|
|
|
|
notdes2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 88);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendcard;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 53;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotrecep;
|
|
|
|
notendcard:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
2011-06-05 13:38:05 +04:00
|
|
|
gotrecep:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+7);
|
|
|
|
_and(al, 128);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nottalkedrecep) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kTalkedtorecep) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::attendant() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+7);
|
|
|
|
_and(al, 128);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nottalked) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kTalkedtoattendant) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::edenInBath() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kGeneraldead), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:29:48 +02:00
|
|
|
return /* (notinbath) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSartaindead), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notinbath) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::louis() {
|
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kRockstardead), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notlouis1) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::louisChair() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kRockstardead), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notlouis2) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notlouisanim;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 191);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto restartlouis;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 185);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto randomlouis;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto notlouisanim;
|
|
|
|
randomlouis:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 182;
|
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
notlouisanim:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::manAsleep2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = es.byte(bx+7);
|
|
|
|
_and(al, 127);
|
|
|
|
es.byte(bx+7) = al;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::manSatStill() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::tattooMan() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::drinker() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotdrinker;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
|
|
|
_cmp(es.word(bx+3), 115);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdrinker1;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 105;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotdrinker;
|
|
|
|
notdrinker1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 106);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotdrinker;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 3);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotdrinker;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 105;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotdrinker:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::bartender() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotsmoket;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 86);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsmoket1;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 18);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsmoket2;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 81;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotsmoket;
|
|
|
|
notsmoket1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 103);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsmoket2;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 81;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotsmoket;
|
|
|
|
notsmoket2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
2011-06-05 13:38:05 +04:00
|
|
|
gotsmoket:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGunpassflag), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notgotgun;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+7) = 9;
|
2011-06-05 13:38:05 +04:00
|
|
|
notgotgun:
|
2011-12-01 19:38:46 +00:00
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
2011-06-05 13:38:05 +04:00
|
|
|
notgeneralstart:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 250);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto talking;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto talking;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 259);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto talking;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
2011-06-05 13:38:05 +04:00
|
|
|
talking:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +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;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 10;
|
|
|
|
_cmp(es.word(bx+3), 30);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notaftersshot;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 40);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotsoldframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kMandead) = 2;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotsoldframe;
|
|
|
|
notaftersshot:
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotsoldframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotsoldframe;
|
|
|
|
soldierwait:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLastweapon), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotsoldframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 10;
|
|
|
|
_cmp(data.byte(kManspath), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotsoldframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kFacing), 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotsoldframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
|
|
|
data.byte(kLastweapon) = -1;
|
|
|
|
data.byte(kCombatcount) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotsoldframe:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +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;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto helispeed;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 53);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbeforehdead;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 8);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto waitabit;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kMandead) = 2;
|
2011-06-05 13:38:05 +04:00
|
|
|
waitabit:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 49;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotheliframe;
|
|
|
|
notbeforehdead:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 9);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotheliframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(ax);
|
|
|
|
_cmp(data.byte(kLastweapon), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notgunonheli;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = -1;
|
|
|
|
ax = 55;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotheliframe;
|
|
|
|
notgunonheli:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 5;
|
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 20);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotheliframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCombatcount) = 0;
|
|
|
|
ax = 9;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotheliframe:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
helispeed:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCombatcount), 7);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwaitingheli;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 2;
|
|
|
|
data.word(kWatchingtime) = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notwaitingheli:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
data.word(kWatchingtime) = 2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
heliwon:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 176);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (endmugger2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto havesetwatch;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 175*2;
|
2011-06-05 13:38:05 +04:00
|
|
|
havesetwatch:
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmugger;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
2011-06-05 13:38:05 +04:00
|
|
|
notmugger:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kMapx);
|
|
|
|
es.byte(bx+1) = al;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
endmugger1:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel2();
|
|
|
|
showIcon();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 41;
|
2011-12-01 19:38:46 +00:00
|
|
|
findPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 33+20;
|
|
|
|
bx = 104;
|
|
|
|
dl = 241;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
|
|
|
workToScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
es.word(bx+3) = 140;
|
|
|
|
data.byte(kManspath) = 2;
|
|
|
|
data.byte(kFinaldest) = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
|
|
|
al = 'W';
|
|
|
|
ah = 'E';
|
|
|
|
cl = 'T';
|
|
|
|
ch = 'A';
|
2011-12-01 19:38:46 +00:00
|
|
|
findExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommand) = al;
|
|
|
|
data.byte(kObjecttype) = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeObFromInv();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 'W';
|
|
|
|
ah = 'E';
|
|
|
|
cl = 'T';
|
|
|
|
ch = 'B';
|
2011-12-01 19:38:46 +00:00
|
|
|
findExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommand) = al;
|
|
|
|
data.byte(kObjecttype) = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeObFromInv();
|
|
|
|
makeMainScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 48;
|
|
|
|
bl = 68-32;
|
|
|
|
bh = 54+64;
|
|
|
|
cx = 70;
|
|
|
|
dx = 10;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kBeenmugged) = 1;
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DreamGenContext::aide() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::businessMan() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
|
|
|
push(bx);
|
|
|
|
push(es);
|
|
|
|
al = 49;
|
|
|
|
cx = 30;
|
|
|
|
dx = 1;
|
|
|
|
bl = 68;
|
|
|
|
bh = 174;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = pop();
|
|
|
|
bx = pop();
|
|
|
|
ax = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
notfirstbiz:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 95);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto buscombatwonend;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 49);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (buscombatend) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto busspeed;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 48);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbeforedeadb;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kMandead) = 2;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotbusframe;
|
|
|
|
notbeforedeadb:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 15);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto buscombatwon;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(ax);
|
|
|
|
_cmp(data.byte(kLastweapon), 3);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notshieldonbus;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = -1;
|
|
|
|
data.byte(kCombatcount) = 0;
|
|
|
|
ax = 51;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotbusframe;
|
|
|
|
notshieldonbus:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 20);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotbusframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCombatcount) = 0;
|
|
|
|
ax = 15;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotbusframe;
|
|
|
|
buscombatwon:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 91);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotbusframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
|
|
|
push(es);
|
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManspath) = 5;
|
|
|
|
data.byte(kFinaldest) = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
|
|
|
es = pop();
|
|
|
|
bx = pop();
|
|
|
|
ax = 92;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotbusframe;
|
|
|
|
gotbusframe:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
busspeed:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kMapy);
|
|
|
|
es.byte(bx+2) = al;
|
|
|
|
ax = es.word(bx+3);
|
|
|
|
_cmp(ax, 14);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (buscombatend) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 0;
|
|
|
|
data.byte(kPointermode) = 2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
buscombatwonend:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
data.word(kWatchingtime) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::poolGuard() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ax = es.word(bx+3);
|
|
|
|
_cmp(ax, 214);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto combatover2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 258);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto combatover2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 185);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto combatover1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfirstpool;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-05 13:38:05 +04:00
|
|
|
notfirstpool:
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto guardspeed;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 122);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendguard1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(ax);
|
|
|
|
_cmp(data.byte(kLastweapon), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notaxeonpool;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = -1;
|
|
|
|
ax = 122;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotguardframe;
|
|
|
|
notaxeonpool:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 40);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotguardframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCombatcount) = 0;
|
|
|
|
ax = 195;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotguardframe;
|
|
|
|
notendguard1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 147);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotguardframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(ax);
|
|
|
|
_cmp(data.byte(kLastweapon), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notgunonpool;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = -1;
|
|
|
|
ax = 147;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotguardframe;
|
|
|
|
notgunonpool:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 40);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotguardframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCombatcount) = 0;
|
|
|
|
ax = 220;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotguardframe:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
guardspeed:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_cmp(ax, 121);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto iswaitingpool;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 146);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto iswaitingpool;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
data.word(kWatchingtime) = 2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
iswaitingpool:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 2;
|
|
|
|
data.word(kWatchingtime) = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
combatover1:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 0;
|
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
combatover2:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 2;
|
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 100);
|
|
|
|
if (flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (doneover2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 0;
|
|
|
|
data.byte(kMandead) = 2;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +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;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 10;
|
|
|
|
_cmp(es.word(bx+3), 70);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notafterhshot;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kCombatcount));
|
|
|
|
_cmp(data.byte(kCombatcount), 80);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotheavyframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kMandead) = 2;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotheavyframe;
|
|
|
|
notafterhshot:
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotheavyframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotheavyframe;
|
|
|
|
heavywait:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLastweapon), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotheavyframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kManspath), 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotheavyframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kFacing), 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotheavyframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = -1;
|
|
|
|
_inc(es.word(bx+3));
|
|
|
|
data.byte(kCombatcount) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotheavyframe:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::bossMan() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto firstdes;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 20);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto secdes;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 41);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotallboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 0;
|
|
|
|
_inc(data.byte(kGunpassflag));
|
|
|
|
es.byte(bx+7) = 10;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotallboss;
|
|
|
|
firstdes:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGunpassflag), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotallboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = al;
|
|
|
|
ax = pop();
|
|
|
|
_cmp(cl, 10);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotallboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotallboss;
|
|
|
|
secdes:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGunpassflag), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotallboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotallboss:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
notboss:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+7);
|
|
|
|
_and(al, 128);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nottalkedboss) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kTalkedtoboss) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::carParkDrip() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (cantdrip2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kReeltowatch), 190);
|
|
|
|
if (flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (waiting) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kKeeperflag));
|
|
|
|
ah = es.byte(bx+7);
|
|
|
|
_and(ah, 127);
|
|
|
|
_cmp(ah, data.byte(kDreamnumber));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notdiff) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kDreamnumber);
|
|
|
|
es.byte(bx+7) = al;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notwaiting:
|
2011-12-01 19:38:46 +00:00
|
|
|
addToPeopleList();
|
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::candles1() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto candle1;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 44);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendcandle1;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 39;
|
2011-06-05 13:38:05 +04:00
|
|
|
notendcandle1:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
candle1:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::smallCandle() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto smallcandlef;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 37);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendsmallcandle;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 25;
|
2011-06-05 13:38:05 +04:00
|
|
|
notendsmallcandle:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
smallcandlef:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::introMagic1() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto introm1fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 145);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotintrom1;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 121;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintrom1:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
|
|
|
_cmp(ax, 121);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto introm1fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kIntrocount));
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
intro1Text();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
_cmp(data.byte(kIntrocount), 8);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto introm1fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(data.byte(kMapy), 10);
|
|
|
|
data.byte(kNowinnewroom) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
introm1fin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::candles() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto candlesfin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 167);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotcandles;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 162;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotcandles:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
candlesfin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::candles2() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto candles2fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 238);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotcandles2;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 233;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotcandles2:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
candles2fin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::gates() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gatesfin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 116);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbang;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
|
|
|
push(bx);
|
|
|
|
push(es);
|
|
|
|
al = 17;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = pop();
|
|
|
|
bx = pop();
|
|
|
|
ax = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
notbang:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 110);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slowgates;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+5) = 2;
|
2011-06-05 13:38:05 +04:00
|
|
|
slowgates:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 120);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotgates;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
ax = 119;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotgates:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
intro3Text();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
gatesfin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::introMagic2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto introm2fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 216);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotintrom2;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 192;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintrom2:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
introm2fin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::introMagic3() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto introm3fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 218);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotintrom3;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintrom3:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
introm3fin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kMapx);
|
|
|
|
es.byte(bx+1) = al;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::introMonks1() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto intromonk1fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 80);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendmonk1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(data.byte(kMapy), 10);
|
|
|
|
data.byte(kNowinnewroom) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notendmonk1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 30);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotintromonk1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(data.byte(kMapy), 10);
|
|
|
|
data.byte(kNowinnewroom) = 1;
|
|
|
|
ax = 51;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintromonk1:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
|
|
|
_cmp(ax, 5);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto waitstep;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 15);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto waitstep;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 25);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto waitstep;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 61);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto waitstep;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
intro2Text();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
es.byte(bx+6) = -20;
|
2011-06-05 13:38:05 +04:00
|
|
|
intromonk1fin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kMapy);
|
|
|
|
es.byte(bx+2) = al;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::introMonks2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto intromonk2fin;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 87);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nottalk1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 87;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintromonk2;
|
|
|
|
notlasttalk1:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 74;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintromonk2;
|
|
|
|
nottalk1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 110);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notraisearm;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 111;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintromonk2;
|
|
|
|
notlastraise:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 98;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintromonk2;
|
|
|
|
notraisearm:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 176);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendmonk2;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintromonk2;
|
|
|
|
notendmonk2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 125);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotintromonk2;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 140;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintromonk2:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
intromonk2fin:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::handClap() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::monks2text() {
|
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kIntrocount), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text1;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 8;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 9;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 7);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text3;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 10;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text3:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 10);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text4;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kIntrocount) = 12;
|
|
|
|
al = 11;
|
|
|
|
bl = 0;
|
|
|
|
bh = 105;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text4:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 13);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text5;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kIntrocount) = 17;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 12;
|
|
|
|
bl = 0;
|
|
|
|
bh = 120;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text5:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 16);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text6;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 13;
|
|
|
|
bl = 0;
|
|
|
|
bh = 135;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text6:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 19);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text7;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 14;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
|
|
|
dx = 1;
|
|
|
|
ah = 82;
|
2011-12-01 19:38:46 +00:00
|
|
|
{ setupTimedTemp(); return; };
|
2011-06-05 13:38:05 +04:00
|
|
|
notmonk2text7:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 22);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text8;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 15;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text8:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 25);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text9;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text9:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 27);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonk2text10;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 17;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
|
|
|
notmonk2text10:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 31);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notmonk2text11) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 18;
|
|
|
|
bl = 36;
|
|
|
|
bh = 160;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotmonks2text;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotmonks2text:
|
2011-06-17 00:30:39 +04:00
|
|
|
dx = 1;
|
|
|
|
cx = 120;
|
|
|
|
ah = 82;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedTemp();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::intro1Text() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kIntrocount), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notintro1text1;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 40;
|
|
|
|
bl = 34;
|
|
|
|
bh = 130;
|
|
|
|
cx = 90;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintro1text;
|
|
|
|
notintro1text1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notintro1text2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 41;
|
|
|
|
bl = 34;
|
|
|
|
bh = 130;
|
|
|
|
cx = 90;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintro1text;
|
|
|
|
notintro1text2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 6);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notintro1text3) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 42;
|
|
|
|
bl = 34;
|
|
|
|
bh = 130;
|
|
|
|
cx = 90;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintro1text;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintro1text:
|
2011-06-17 00:30:39 +04:00
|
|
|
dx = 1;
|
|
|
|
ah = 82;
|
|
|
|
_cmp(data.byte(kCh1playing), 255);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto oktalk2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kIntrocount));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
oktalk2:
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedTemp();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::intro2Text() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(ax, 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notintro2text1;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 43;
|
|
|
|
bl = 34;
|
|
|
|
bh = 40;
|
|
|
|
cx = 90;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintro2text;
|
|
|
|
notintro2text1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 15);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notintro2text2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 44;
|
|
|
|
bl = 34;
|
|
|
|
bh = 40;
|
|
|
|
cx = 90;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintro2text;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintro2text:
|
2011-06-17 00:30:39 +04:00
|
|
|
dx = 1;
|
|
|
|
ah = 82;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedTemp();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::intro3Text() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(ax, 107);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notintro3text1;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 45;
|
|
|
|
bl = 36;
|
|
|
|
bh = 56;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintro3text;
|
|
|
|
notintro3text1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 108);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notintro3text2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 46;
|
|
|
|
bl = 36;
|
|
|
|
bh = 56;
|
|
|
|
cx = 100;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotintro3text;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotintro3text:
|
2011-06-17 00:30:39 +04:00
|
|
|
dx = 1;
|
|
|
|
ah = 82;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedTemp();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::monkAndRyan() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notmonkryan;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 83);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotmonkryan;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kIntrocount));
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
textForMonk();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
ax = 77;
|
|
|
|
_cmp(data.byte(kIntrocount), 57);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotmonkryan;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotmonkryan:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
notmonkryan:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::endGameSeq() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendseq;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 51);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotendseq;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kIntrocount), 140);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotendseq;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kIntrocount));
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
textForEnd();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
ax = 50;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotendseq:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
|
|
|
_cmp(ax, 134);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfadedown;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
fadeScreenDownHalf();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
goto notendseq;
|
|
|
|
notfadedown:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 324);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfadeend;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
fadeScreenDowns();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolumeto) = 7;
|
|
|
|
data.byte(kVolumedirection) = 1;
|
|
|
|
ax = pop();
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
notfadeend:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 340);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendseq;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
notendseq:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kMapy);
|
|
|
|
es.byte(bx+2) = al;
|
|
|
|
ax = es.word(bx+3);
|
|
|
|
_cmp(ax, 145);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notendcreds) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = 146;
|
2011-12-01 19:38:46 +00:00
|
|
|
rollEndCredits();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::rollEndCredits() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 16;
|
|
|
|
ah = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel0();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiGet();
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
bx = 10;
|
|
|
|
cx = data.word(kLinespacing);
|
2011-06-05 13:38:05 +04:00
|
|
|
endcredits2:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
push(si);
|
|
|
|
push(di);
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 160;
|
|
|
|
ch = 160;
|
|
|
|
di = 75;
|
|
|
|
bx = 20;
|
|
|
|
ds = data.word(kMapstore);
|
|
|
|
si = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiPut();
|
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
di = 75;
|
|
|
|
dx = 161;
|
|
|
|
ax = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, data.word(kLinespacing));
|
|
|
|
cx = pop();
|
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto onelot;
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 160;
|
|
|
|
ch = 160;
|
|
|
|
di = 75;
|
|
|
|
bx = 20;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
di = pop();
|
|
|
|
si = pop();
|
|
|
|
cx = pop();
|
|
|
|
_dec(bx);
|
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endcredits2;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
looknext:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(si);
|
|
|
|
_inc(si);
|
|
|
|
_cmp(al, ':');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotnext;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endcredits1;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 100;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
|
|
|
panelToMap();
|
|
|
|
fadeScreenUpHalf();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::priest() {
|
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(es.word(bx+3), 8);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (priestspoken) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
data.word(kWatchingtime) = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (priestwait) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(es.word(bx+3));
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
priestText();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::priestText() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(es.word(bx+3), 2);
|
|
|
|
if (flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nopriesttext) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(bx+3), 7);
|
|
|
|
if (!flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nopriesttext) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+3);
|
|
|
|
_and(al, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nopriesttext) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+3);
|
|
|
|
_shr(al, 1);
|
|
|
|
_add(al, 50);
|
|
|
|
bl = 72;
|
|
|
|
bh = 80;
|
|
|
|
cx = 54;
|
|
|
|
dx = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void DreamGenContext::advisor() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noadvisor;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto noadvisor;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 123);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendadvis;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 106;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotadvframe;
|
|
|
|
notendadvis:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 108);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotadvframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = al;
|
|
|
|
ax = pop();
|
|
|
|
_cmp(cl, 3);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotadvframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 106;
|
2011-06-05 13:38:05 +04:00
|
|
|
gotadvframe:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
noadvisor:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::copper() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkSpeed();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nocopper;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_inc(ax);
|
|
|
|
_cmp(ax, 94);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notendcopper;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 64;
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gotcopframe;
|
|
|
|
notendcopper:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 81);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto mightwait;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = al;
|
|
|
|
ax = pop();
|
|
|
|
_cmp(cl, 7);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotcopframe;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(ax);
|
2011-06-05 13:38:05 +04:00
|
|
|
gotcopframe:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-06-05 13:38:05 +04:00
|
|
|
nocopper:
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
|
|
|
addToPeopleList();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::train() {
|
|
|
|
STACK_CHECK;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
|
|
|
_cmp(ax, 21);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notrainyet;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(ax);
|
2011-06-05 13:38:05 +04:00
|
|
|
goto gottrainframe;
|
|
|
|
notrainyet:
|
2011-12-01 19:38:46 +00:00
|
|
|
randomNumber();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 253);
|
|
|
|
if (flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notrainatall) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kManspath), 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notrainatall) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kFinaldest), 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notrainatall) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 5;
|
2011-06-05 13:38:05 +04:00
|
|
|
gottrainframe:
|
2011-06-17 00:30:39 +04:00
|
|
|
es.word(bx+3) = ax;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGameReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::checkForExit() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
cl = data.byte(kRyanx);
|
|
|
|
_add(cl, 12);
|
|
|
|
ch = data.byte(kRyany);
|
|
|
|
_add(ch, 12);
|
2011-12-01 19:38:46 +00:00
|
|
|
checkOne();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kLastflagex);
|
|
|
|
data.byte(kAutolocation) = al;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notnewdirect:
|
2011-06-17 00:30:39 +04:00
|
|
|
_test(al, 32);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notleave;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
_cmp(data.byte(kReallocation), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notlouis;
|
2011-06-17 00:30:39 +04:00
|
|
|
bl = 0;
|
|
|
|
push(bx);
|
|
|
|
al = 'W';
|
|
|
|
ah = 'E';
|
|
|
|
cl = 'T';
|
|
|
|
ch = 'A';
|
2011-12-01 19:38:46 +00:00
|
|
|
isRyanHolding();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noshoe1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(bl);
|
2011-06-05 13:38:05 +04:00
|
|
|
noshoe1:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
|
|
|
al = 'W';
|
|
|
|
ah = 'E';
|
|
|
|
cl = 'T';
|
|
|
|
ch = 'B';
|
2011-12-01 19:38:46 +00:00
|
|
|
isRyanHolding();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noshoe2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(bl);
|
2011-06-05 13:38:05 +04:00
|
|
|
noshoe2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(bl, 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notlouis;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 42;
|
|
|
|
_cmp(bl, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notravmessage;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(al);
|
2011-06-05 13:38:05 +04:00
|
|
|
notravmessage:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 80;
|
|
|
|
dx = 10;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kFacing);
|
|
|
|
_add(al, 4);
|
|
|
|
_and(al, 7);
|
|
|
|
data.byte(kTurntoface) = al;
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notlouis:
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
data.byte(kNeedtotravel) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notleave:
|
2011-06-17 00:30:39 +04:00
|
|
|
_test(al, 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notaleft;
|
2011-12-01 19:38:46 +00:00
|
|
|
adjustLeft();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notaleft:
|
2011-06-17 00:30:39 +04:00
|
|
|
_test(al, 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notaright;
|
2011-12-01 19:38:46 +00:00
|
|
|
adjustRight();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notaright:
|
2011-06-17 00:30:39 +04:00
|
|
|
_test(al, 8);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notadown;
|
2011-12-01 19:38:46 +00:00
|
|
|
adjustDown();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 13:38:05 +04:00
|
|
|
notadown:
|
2011-06-17 00:30:39 +04:00
|
|
|
_test(al, 16);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notanup) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
adjustUp();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::adjustDown() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::adjustUp() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::adjustLeft() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::adjustRight() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notinedenslift) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 44);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notinedenslift) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kProgresspoints), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notfirst) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 'D';
|
|
|
|
ah = 'K';
|
|
|
|
cl = 'E';
|
|
|
|
ch = 'Y';
|
2011-12-01 19:38:46 +00:00
|
|
|
isRyanHolding();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto forgotone;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 'C';
|
|
|
|
ah = 'S';
|
|
|
|
cl = 'H';
|
|
|
|
ch = 'R';
|
2011-12-01 19:38:46 +00:00
|
|
|
findExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, (114));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto forgotone;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+2);
|
|
|
|
_cmp(al, 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto forgotone;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ah, 255);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto havegotcard;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
forgotone:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 50;
|
|
|
|
bl = 54;
|
|
|
|
bh = 70;
|
|
|
|
cx = 48;
|
|
|
|
dx = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::liftNoise() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kReallocation), 5);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto hissnoise;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 21);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto hissnoise;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
hissnoise:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 13;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::delEverything() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kMapysize);
|
|
|
|
ah = 0;
|
|
|
|
_add(ax, data.word(kMapoffsety));
|
|
|
|
_cmp(ax, 182);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto bigroom;
|
2011-12-01 19:38:46 +00:00
|
|
|
mapToPanel();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
bigroom:
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(data.byte(kMapysize), 8);
|
2011-12-01 19:38:46 +00:00
|
|
|
mapToPanel();
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(data.byte(kMapysize), 8);
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::transferMap() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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);
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = pop();
|
|
|
|
ax = pop();
|
|
|
|
es.word(bx+2) = ax;
|
|
|
|
_add(data.word(kExframepos), cx);
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::doFade() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kFadedirection), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (finishfade) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = data.byte(kNumtofade);
|
|
|
|
ch = 0;
|
|
|
|
al = data.byte(kColourpos);
|
|
|
|
ah = 0;
|
|
|
|
ds = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
si = (0+(228*13)+32+60+(32*32)+(11*10*3));
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(si, ax);
|
|
|
|
_add(si, ax);
|
|
|
|
_add(si, ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
showGroup();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kNumtofade);
|
|
|
|
_add(al, data.byte(kColourpos));
|
|
|
|
data.byte(kColourpos) = al;
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (finishfade) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
fadeCalculation();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::clearPalette() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kFadedirection) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearStartPal();
|
|
|
|
dumpCurrent();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeScreenUp() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearStartPal();
|
|
|
|
palToEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeToWhite() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 768;
|
|
|
|
al = 63;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosb(cx, true);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
|
|
|
_stosb(3);
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeFromWhite() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3));
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 768;
|
|
|
|
al = 63;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosb(cx, true);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3));
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
|
|
|
_stosb(3);
|
2011-12-01 19:38:46 +00:00
|
|
|
palToEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeScreenUps() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearStartPal();
|
|
|
|
palToEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 64;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeScreenDownHalf() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
|
|
|
palToEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 768;
|
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
|
2011-06-05 14:49:56 +04:00
|
|
|
halfend:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kBuffers);
|
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
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);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 3*5;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-25 17:28:51 +04:00
|
|
|
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);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 3*2;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 31;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 32;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeScreenUpHalf() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
endPalToStart();
|
|
|
|
palToEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 31;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 32;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeScreenDown() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
|
|
|
clearEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeScreenDowns() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
|
|
|
clearEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 64;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showGun() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kAddtored) = 0;
|
|
|
|
data.byte(kAddtogreen) = 0;
|
|
|
|
data.byte(kAddtoblue) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
|
|
|
palToEndPal();
|
|
|
|
greyscaleSum();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
cx = 130;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
|
|
|
endPalToStart();
|
|
|
|
clearEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
cx = 200;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kRoomssample) = 34;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadRoomsSample();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolume) = 0;
|
2011-12-04 23:43:32 +01:00
|
|
|
dx = 1074;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadIntoTemp();
|
|
|
|
createPanel2();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
|
|
|
di = 100;
|
|
|
|
bx = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 1;
|
|
|
|
ah = 0;
|
|
|
|
di = 158;
|
|
|
|
bx = 106;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
|
|
|
workToScreen();
|
|
|
|
getRidOfTemp();
|
|
|
|
fadeScreenUp();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 160;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 12;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel0();
|
2011-12-04 23:43:32 +01:00
|
|
|
dx = 1048;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadTempText();
|
|
|
|
rollEndCredits2();
|
|
|
|
getRidOfTempText();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::rollEndCredits2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
rollEm();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::rollEm() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
cl = 160;
|
|
|
|
ch = 160;
|
|
|
|
di = 25;
|
|
|
|
bx = 20;
|
|
|
|
ds = data.word(kMapstore);
|
|
|
|
si = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiGet();
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
bx = 10;
|
|
|
|
cx = data.word(kLinespacing);
|
2011-06-05 14:49:56 +04:00
|
|
|
endcredits22:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
push(si);
|
|
|
|
push(di);
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 160;
|
|
|
|
ch = 160;
|
|
|
|
di = 25;
|
|
|
|
bx = 20;
|
|
|
|
ds = data.word(kMapstore);
|
|
|
|
si = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiPut();
|
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
di = 25;
|
|
|
|
dx = 161;
|
|
|
|
ax = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, data.word(kLinespacing));
|
|
|
|
cx = pop();
|
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto onelot2;
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 160;
|
|
|
|
ch = 160;
|
|
|
|
di = 25;
|
|
|
|
bx = 20;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(bx);
|
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endcredits22;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
looknext2:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(si);
|
|
|
|
_inc(si);
|
|
|
|
_cmp(al, ':');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotnext2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLasthardkey), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (endearly) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endcredits21;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 120;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOne();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
endearly2:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::greyscaleSum() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
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);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 256;
|
2011-06-05 14:49:56 +04:00
|
|
|
greysumloop1:
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(al);
|
|
|
|
_sub(bx, 100);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto greysumloop2;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(al, ah);
|
2011-06-05 14:49:56 +04:00
|
|
|
noaddg:
|
2011-06-17 00:30:39 +04:00
|
|
|
_stosb();
|
|
|
|
ah = data.byte(kAddtoblue);
|
|
|
|
al = bl;
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noaddb;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(al, ah);
|
2011-06-05 14:49:56 +04:00
|
|
|
noaddb:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::allPalette() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kBuffers);
|
|
|
|
ds = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3));
|
|
|
|
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 768/2;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsw(cx, true);
|
2011-12-01 19:38:46 +00:00
|
|
|
dumpCurrent();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dumpCurrent() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-06-25 17:28:51 +04:00
|
|
|
si = (0+(228*13)+32+60+(32*32)+(11*10*3));
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kBuffers);
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
|
|
|
cx = 128;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGroup();
|
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 128;
|
|
|
|
cx = 128;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGroup();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeDownMon() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
|
|
|
palToEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 3*8;
|
|
|
|
ax = 0;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosb(cx, true);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
|
2011-06-17 00:30:39 +04:00
|
|
|
_stosb();
|
|
|
|
_stosw();
|
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
cx = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fadeUpMon() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
|
|
|
palToEndPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(231*3);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 3*8;
|
|
|
|
ax = 0;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosb(cx, true);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
|
2011-06-17 00:30:39 +04:00
|
|
|
_stosb();
|
|
|
|
_stosw();
|
|
|
|
data.byte(kFadedirection) = 1;
|
|
|
|
data.byte(kFadecount) = 63;
|
|
|
|
data.byte(kColourpos) = 0;
|
|
|
|
data.byte(kNumtofade) = 128;
|
|
|
|
cx = 128;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::initialMonCols() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
palToStartPal();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 3*9;
|
|
|
|
ax = 0;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosb(cx, true);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
|
2011-06-17 00:30:39 +04:00
|
|
|
_stosb();
|
|
|
|
_stosw();
|
|
|
|
ds = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 230;
|
|
|
|
cx = 18;
|
2011-12-01 19:38:46 +00:00
|
|
|
showGroup();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::endGame() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-04 23:43:32 +01:00
|
|
|
dx = 1048;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadTempText();
|
|
|
|
monkSpeaking();
|
|
|
|
gettingShot();
|
|
|
|
getRidOfTempText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolumeto) = 7;
|
|
|
|
data.byte(kVolumedirection) = 1;
|
|
|
|
cx = 200;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::monkSpeaking() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kRoomssample) = 35;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadRoomsSample();
|
2011-12-04 23:43:32 +01:00
|
|
|
dx = 1087;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadIntoTemp();
|
|
|
|
clearWork();
|
|
|
|
showMonk();
|
|
|
|
workToScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolume) = 7;
|
|
|
|
data.byte(kVolumedirection) = -1;
|
|
|
|
data.byte(kVolumeto) = 5;
|
|
|
|
al = 12;
|
|
|
|
ah = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel0();
|
|
|
|
fadeScreenUps();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 40;
|
2011-06-14 00:53:14 +04:00
|
|
|
loadspeech2:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
|
|
|
dl = 'T';
|
|
|
|
dh = 83;
|
|
|
|
cl = 'T';
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadSpeech();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 50+12;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-14 00:53:14 +04:00
|
|
|
notloadspeech2:
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCh1playing), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notloadspeech2;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
_inc(al);
|
|
|
|
_cmp(al, 48);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto loadspeech2;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolumedirection) = 1;
|
|
|
|
data.byte(kVolumeto) = 7;
|
2011-12-01 19:38:46 +00:00
|
|
|
fadeScreenDowns();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
|
|
|
getRidOfTemp();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showMonk() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 0;
|
|
|
|
ah = 128;
|
|
|
|
di = 160;
|
|
|
|
bx = 72;
|
|
|
|
ds = data.word(kTempgraphics);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::gettingShot() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kNewlocation) = 55;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearPalette();
|
|
|
|
loadIntroRoom();
|
|
|
|
fadeScreenUps();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolumeto) = 0;
|
|
|
|
data.byte(kVolumedirection) = -1;
|
2011-12-01 19:38:46 +00:00
|
|
|
runEndSeq();
|
|
|
|
clearBeforeLoad();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::runIntroSeq() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kGetback) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
moreintroseq:
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLasthardkey), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto earlyendrun;
|
2011-12-01 19:38:46 +00:00
|
|
|
spriteUpdate();
|
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLasthardkey), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto earlyendrun;
|
2011-12-01 19:38:46 +00:00
|
|
|
delEverything();
|
|
|
|
printSprites();
|
|
|
|
reelsOnScreen();
|
|
|
|
afterIntroRoom();
|
|
|
|
useTimedText();
|
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLasthardkey), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto earlyendrun;
|
2011-12-01 19:38:46 +00:00
|
|
|
dumpMap();
|
|
|
|
dumpTimedText();
|
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLasthardkey), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto earlyendrun;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGetback), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto moreintroseq;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
earlyendrun:
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfTempText();
|
|
|
|
clearBeforeLoad();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::runEndSeq() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
atmospheres();
|
|
|
|
data.byte(kGetback) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
moreendseq:
|
2011-12-01 19:38:46 +00:00
|
|
|
vSync();
|
|
|
|
spriteUpdate();
|
|
|
|
vSync();
|
|
|
|
delEverything();
|
|
|
|
printSprites();
|
|
|
|
reelsOnScreen();
|
|
|
|
afterIntroRoom();
|
|
|
|
useTimedText();
|
|
|
|
vSync();
|
|
|
|
dumpMap();
|
|
|
|
dumpTimedText();
|
|
|
|
vSync();
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::loadIntroRoom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kIntrocount) = 0;
|
|
|
|
data.byte(kLocation) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadRoom();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kMapoffsetx) = 72;
|
|
|
|
data.word(kMapoffsety) = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearSprites();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kThroughdoor) = 0;
|
|
|
|
data.byte(kCurrentkey) = '0';
|
|
|
|
data.byte(kMainmode) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearWork();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewobs) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
drawFloor();
|
|
|
|
reelsOnScreen();
|
|
|
|
spriteUpdate();
|
|
|
|
printSprites();
|
|
|
|
workToScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::fillOpen() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
delTextLine();
|
|
|
|
getOpenedSize();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ah, 4);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto lessthanapage;
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = 4;
|
2011-06-05 14:49:56 +04:00
|
|
|
lessthanapage:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
|
|
|
push(ax);
|
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
di = (0+(228*13));
|
2011-12-01 19:38:46 +00:00
|
|
|
findAllOpen();
|
2011-06-25 17:28:51 +04:00
|
|
|
si = (0+(228*13));
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (80);
|
|
|
|
bx = (58)+96;
|
|
|
|
cx = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
openloop1:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
obToInv();
|
2011-06-05 14:49:56 +04:00
|
|
|
nextopenslot:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
underTextLine();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findAllOpen() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(di);
|
|
|
|
cx = 16;
|
|
|
|
ax = 0x0ffff;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ds.byte(bx+3), cl);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findopen2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ds.byte(bx+2), dl);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findopen2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kOpenedtype), 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noloccheck;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 16);
|
|
|
|
_inc(ch);
|
|
|
|
_cmp(ch, (114));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findopen1;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ds.byte(bx+3), cl);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findopen2a;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ds.byte(bx+2), dl);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findopen2a;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::makeMainScreen() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewobs) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
drawFloor();
|
|
|
|
spriteUpdate();
|
|
|
|
printSprites();
|
|
|
|
reelsOnScreen();
|
|
|
|
showIcon();
|
|
|
|
getUnderZoom();
|
|
|
|
underTextLine();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
animPointer();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 200;
|
|
|
|
data.byte(kManisoffscreen) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::incRyanPage() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 222);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyincryan;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 222;
|
|
|
|
al = 31;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyincryan:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noincryan) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doincryan;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doincryan:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousex);
|
|
|
|
_sub(ax, (80)+167);
|
|
|
|
data.byte(kRyanpage) = -1;
|
2011-06-05 14:49:56 +04:00
|
|
|
findnewpage:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kRyanpage));
|
|
|
|
_sub(ax, 18);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findnewpage;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
fillRyan();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openInv() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kInvopen) = 1;
|
|
|
|
al = 61;
|
|
|
|
di = (80);
|
|
|
|
bx = (58)-10;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
|
|
|
fillRyan();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openOb() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kOpenedob);
|
|
|
|
ah = data.byte(kOpenedtype);
|
2011-08-17 23:22:49 +02:00
|
|
|
di = offset_commandline;
|
2011-12-01 19:38:46 +00:00
|
|
|
copyName();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (80);
|
|
|
|
bx = (58)+86;
|
|
|
|
al = 62;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = data.word(kLastxpos);
|
|
|
|
_add(di, 5);
|
|
|
|
bx = (58)+86;
|
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
si = offset_commandline;
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 220;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
|
|
|
fillOpen();
|
|
|
|
getOpenedSize();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = ah;
|
|
|
|
ah = 0;
|
|
|
|
cx = (44);
|
|
|
|
_mul(cx);
|
|
|
|
_add(ax, (80));
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_openchangesize;
|
2011-06-17 00:30:39 +04:00
|
|
|
cs.word(bx) = ax;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::describeOb() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
getObTextStart();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 33;
|
|
|
|
bx = 92;
|
2011-06-25 17:28:51 +04:00
|
|
|
_cmp(data.byte(kForeignrelease), 0);
|
|
|
|
if (flags.z())
|
|
|
|
goto notsetd;
|
|
|
|
_cmp(data.byte(kObjecttype), 1);
|
|
|
|
if (!flags.z())
|
|
|
|
goto notsetd;
|
|
|
|
bx = 82;
|
|
|
|
notsetd:
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 241;
|
|
|
|
ah = 16;
|
|
|
|
data.word(kCharshift) = 91+91;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kCharshift) = 0;
|
|
|
|
di = 36;
|
|
|
|
bx = 104;
|
2011-06-25 17:28:51 +04:00
|
|
|
_cmp(data.byte(kForeignrelease), 0);
|
|
|
|
if (flags.z())
|
|
|
|
goto notsetd2;
|
|
|
|
_cmp(data.byte(kObjecttype), 1);
|
|
|
|
if (!flags.z())
|
|
|
|
goto notsetd2;
|
|
|
|
bx = 94;
|
|
|
|
notsetd2:
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 241;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
obsThatDoThings();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
2011-12-01 19:38:46 +00:00
|
|
|
additionalText();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::additionalText() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
emptycup:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 40;
|
2011-12-01 19:38:46 +00:00
|
|
|
findPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
di = 36;
|
|
|
|
dl = 241;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
fullcup:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 39;
|
2011-12-01 19:38:46 +00:00
|
|
|
findPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
di = 36;
|
|
|
|
dl = 241;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::obsThatDoThings() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kCommand);
|
|
|
|
ah = data.byte(kObjecttype);
|
|
|
|
cl = 'M';
|
|
|
|
ch = 'E';
|
|
|
|
dl = 'M';
|
|
|
|
dh = 'B';
|
|
|
|
compare();
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notlouiscard) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
getLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (seencard) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
|
|
|
lookAtCard();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getObTextStart() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(si);
|
2011-12-01 19:38:46 +00:00
|
|
|
findNextColon();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(si);
|
|
|
|
cx = si;
|
|
|
|
si = pop();
|
|
|
|
_cmp(data.byte(kObjecttype), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (cantmakeoneup) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findsometext;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, ':');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findsometext;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
findsometext:
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForSame();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto tryagain;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::searchForSame() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
si = cx;
|
2011-06-05 14:49:56 +04:00
|
|
|
searchagain:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(si);
|
|
|
|
al = es.byte(bx);
|
2011-06-05 14:49:56 +04:00
|
|
|
search:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(si), al);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotstartletter;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cx);
|
|
|
|
_inc(si);
|
|
|
|
_cmp(si, 8000);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto search;
|
2011-06-17 00:30:39 +04:00
|
|
|
si = bx;
|
|
|
|
ax = pop();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotstartletter:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
|
|
|
push(si);
|
2011-06-05 14:49:56 +04:00
|
|
|
keepchecking:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundmatch;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, ah);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto keepchecking;
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
bx = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto searchagain;
|
|
|
|
foundmatch:
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
bx = pop();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::setPickup() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kObjecttype), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantpick;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kObjecttype), 3);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantpick;
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canpick:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 209);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadysp;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 209;
|
|
|
|
bl = data.byte(kCommand);
|
|
|
|
bh = data.byte(kObjecttype);
|
|
|
|
al = 33;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadysp:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nosetpick) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dosetpick;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dosetpick:
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
examIcon();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCommand);
|
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kOpenedob) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
transferToEx();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kObjecttype) = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 20;
|
|
|
|
es.byte(bx+3) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
openInv();
|
|
|
|
workToScreenM();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
pickupexob:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCommand);
|
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kOpenedob) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
openInv();
|
|
|
|
workToScreenM();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::examineInventory() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 249);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyexinv;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 249;
|
|
|
|
al = 32;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyexinv:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doexinv;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doexinv:
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
examIcon();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPickup) = 0;
|
|
|
|
data.byte(kInvopen) = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
openInv();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::reExFromInv() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
findInvPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
data.byte(kCommandtype) = ah;
|
|
|
|
data.byte(kCommand) = al;
|
|
|
|
data.byte(kExamagain) = 1;
|
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::reExFromOpen() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
return;
|
2011-12-01 19:38:46 +00:00
|
|
|
findOpenPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
data.byte(kCommandtype) = ah;
|
|
|
|
data.byte(kCommand) = al;
|
|
|
|
data.byte(kExamagain) = 1;
|
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::swapWithInv() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 243);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyswap1;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 243;
|
2011-06-05 14:49:56 +04:00
|
|
|
difsub7:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kOldsubject) = ax;
|
|
|
|
bx = ax;
|
|
|
|
al = 34;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyswap1:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (cantswap1) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doswap1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doswap1:
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = data.byte(kObjecttype);
|
|
|
|
al = data.byte(kItemframe);
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
findInvPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kObjecttype) = ah;
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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);
|
2011-12-01 19:38:46 +00:00
|
|
|
findInvPos();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
fillRyan();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::swapWithOpen() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 242);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyswap2;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 242;
|
2011-06-05 14:49:56 +04:00
|
|
|
difsub8:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kOldsubject) = ax;
|
|
|
|
bx = ax;
|
|
|
|
al = 34;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyswap2:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (cantswap2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doswap2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doswap2:
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
|
|
|
isItWorn();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwornswap;
|
2011-12-01 19:38:46 +00:00
|
|
|
wornError();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwornswap:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
|
|
|
_cmp(al, data.byte(kOpenedob));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isntsame2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kObjecttype);
|
|
|
|
_cmp(al, data.byte(kOpenedtype));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isntsame2;
|
2011-12-01 19:38:46 +00:00
|
|
|
errorMessage1();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isntsame2:
|
2011-12-01 19:38:46 +00:00
|
|
|
checkObjectSize();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto sizeok2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
sizeok2:
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = data.byte(kObjecttype);
|
|
|
|
al = data.byte(kItemframe);
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
findOpenPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 20;
|
|
|
|
es.byte(bx+3) = 255;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto actuallyswap;
|
|
|
|
makeswapex:
|
2011-12-01 19:38:46 +00:00
|
|
|
transferToEx();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kObjecttype) = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 20;
|
|
|
|
es.byte(bx+3) = 255;
|
2011-06-05 14:49:56 +04:00
|
|
|
actuallyswap:
|
2011-06-17 00:30:39 +04:00
|
|
|
bl = data.byte(kItemframe);
|
|
|
|
bh = data.byte(kObjecttype);
|
|
|
|
ax = pop();
|
|
|
|
data.byte(kObjecttype) = ah;
|
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
findOpenPos();
|
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
fillOpen();
|
|
|
|
fillRyan();
|
|
|
|
underTextLine();
|
|
|
|
readMouse();
|
|
|
|
useOpened();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::inToInv() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kPickup), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notout;
|
2011-12-01 19:38:46 +00:00
|
|
|
outOfInv();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notout:
|
2011-12-01 19:38:46 +00:00
|
|
|
findInvPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canplace1;
|
2011-12-01 19:38:46 +00:00
|
|
|
swapWithInv();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canplace1:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 220);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyplce;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 220;
|
2011-06-05 14:49:56 +04:00
|
|
|
difsub1:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kOldsubject) = ax;
|
|
|
|
bx = ax;
|
|
|
|
al = 35;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyplce:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notletgo2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doplace;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doplace:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 4;
|
|
|
|
es.byte(bx+3) = 255;
|
|
|
|
al = data.byte(kLastinvpos);
|
|
|
|
es.byte(bx+4) = al;
|
|
|
|
data.byte(kPickup) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
fillRyan();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
outOfInv();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::outOfInv() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
findInvPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canpick2;
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canpick2:
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = data.word(kMousebutton);
|
|
|
|
_cmp(bx, 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canpick2a;
|
2011-12-01 19:38:46 +00:00
|
|
|
reExFromInv();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canpick2a:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldsubject));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto difsub3;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 221);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadygrab;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 221;
|
2011-06-05 14:49:56 +04:00
|
|
|
difsub3:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kOldsubject) = ax;
|
|
|
|
bx = ax;
|
|
|
|
al = 36;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadygrab:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notletgo) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dograb;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dograb:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPickup) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
findInvPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kObjecttype) = ah;
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 20;
|
|
|
|
es.byte(bx+3) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
fillRyan();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
inToInv();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getFreeAd() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ah = 0;
|
|
|
|
cl = 4;
|
|
|
|
_shl(ax, cl);
|
|
|
|
bx = ax;
|
|
|
|
es = data.word(kFreedat);
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getExAd() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ah = 0;
|
|
|
|
bx = 16;
|
|
|
|
_mul(bx);
|
|
|
|
bx = ax;
|
|
|
|
es = data.word(kExtras);
|
|
|
|
_add(bx, (0+2080+30000));
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getEitherAd() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kObjecttype), 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isinexlist;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
2011-12-01 19:38:46 +00:00
|
|
|
getFreeAd();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isinexlist:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getAnyAd() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kObjecttype), 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isex;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kObjecttype), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isfree;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCommand);
|
2011-12-01 19:38:46 +00:00
|
|
|
getSetAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+4);
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isfree:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCommand);
|
2011-12-01 19:38:46 +00:00
|
|
|
getFreeAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+7);
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isex:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCommand);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+7);
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getAnyAdDir() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(ah, 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isex3;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ah, 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isfree3;
|
2011-12-01 19:38:46 +00:00
|
|
|
getSetAd();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isfree3:
|
2011-12-01 19:38:46 +00:00
|
|
|
getFreeAd();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isex3:
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getOpenedSize() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kOpenedtype), 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isex2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kOpenedtype), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isfree2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kOpenedob);
|
2011-12-01 19:38:46 +00:00
|
|
|
getSetAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+3);
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isfree2:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kOpenedob);
|
2011-12-01 19:38:46 +00:00
|
|
|
getFreeAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+7);
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isex2:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kOpenedob);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+7);
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getSetAd() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ah = 0;
|
|
|
|
bx = 64;
|
|
|
|
_mul(bx);
|
|
|
|
bx = ax;
|
|
|
|
es = data.word(kSetdat);
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findInvPos() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
cx = data.word(kMousex);
|
|
|
|
_sub(cx, (80));
|
|
|
|
bx = -1;
|
2011-06-05 14:49:56 +04:00
|
|
|
findinv1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(bx);
|
|
|
|
_sub(cx, (44));
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findinv1;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = data.word(kMousey);
|
|
|
|
_sub(cx, (58));
|
|
|
|
_sub(bx, 5);
|
2011-06-05 14:49:56 +04:00
|
|
|
findinv2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 5);
|
|
|
|
_sub(cx, (44));
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findinv2;
|
2011-06-17 00:30:39 +04:00
|
|
|
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);
|
2011-06-25 17:28:51 +04:00
|
|
|
_add(bx, (0+(228*13)+32));
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findOpenPos() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
cx = data.word(kMousex);
|
|
|
|
_sub(cx, (80));
|
|
|
|
bx = -1;
|
2011-06-05 14:49:56 +04:00
|
|
|
findopenp1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(bx);
|
|
|
|
_sub(cx, (44));
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findopenp1;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = bl;
|
|
|
|
data.byte(kLastinvpos) = al;
|
|
|
|
_add(bx, bx);
|
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
_add(bx, (0+(228*13)));
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dropObject() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 223);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadydrop;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 223;
|
|
|
|
_cmp(data.byte(kPickup), 0);
|
|
|
|
if (flags.z())
|
|
|
|
{ blank(); return; };
|
|
|
|
bl = data.byte(kItemframe);
|
|
|
|
bh = data.byte(kObjecttype);
|
|
|
|
al = 37;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadydrop:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nodrop) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dodrop;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dodrop:
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
|
|
|
isItWorn();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nowornerror;
|
2011-12-01 19:38:46 +00:00
|
|
|
wornError();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nowornerror:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 47);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nodrop2;
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = data.byte(kRyanx);
|
|
|
|
_add(cl, 12);
|
|
|
|
ch = data.byte(kRyany);
|
|
|
|
_add(ch, 12);
|
2011-12-01 19:38:46 +00:00
|
|
|
checkOne();
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-12-01 19:38:46 +00:00
|
|
|
dropError();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nodroperror:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapxsize), 64);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinlift;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapysize), 64);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinlift;
|
2011-12-01 19:38:46 +00:00
|
|
|
dropError();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinlift:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
|
|
|
ah = 4;
|
|
|
|
cl = 'G';
|
|
|
|
ch = 'U';
|
|
|
|
dl = 'N';
|
|
|
|
dh = 'A';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-12-01 19:38:46 +00:00
|
|
|
{ cantDrop(); return; };
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
|
|
|
ah = 4;
|
|
|
|
cl = 'S';
|
|
|
|
ch = 'H';
|
|
|
|
dl = 'L';
|
|
|
|
dh = 'D';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-12-01 19:38:46 +00:00
|
|
|
{ cantDrop(); return; };
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kObjecttype) = 4;
|
|
|
|
al = data.byte(kItemframe);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dropError() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 76;
|
|
|
|
bx = 21;
|
|
|
|
al = 56;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
examIcon();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::cantDrop() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 76;
|
|
|
|
bx = 21;
|
|
|
|
al = 24;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
examIcon();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::removeObFromInv() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommand), 100);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (obnotexist) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = bx;
|
|
|
|
cl = data.byte(kCommand);
|
|
|
|
ch = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::selectOpenOb() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kCommand);
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canopenit1;
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canopenit1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 224);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyopob;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 224;
|
|
|
|
bl = data.byte(kCommand);
|
|
|
|
bh = data.byte(kObjecttype);
|
|
|
|
al = 38;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyopob:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noopenob) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doopenob;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doopenob:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCommand);
|
|
|
|
data.byte(kOpenedob) = al;
|
|
|
|
al = data.byte(kObjecttype);
|
|
|
|
data.byte(kOpenedtype) = al;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
examIcon();
|
|
|
|
showExit();
|
|
|
|
openInv();
|
|
|
|
openOb();
|
|
|
|
underTextLine();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DreamGenContext::useOpened() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kOpenedob), 255);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (cannotuseopen) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPickup), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notout2;
|
2011-12-01 19:38:46 +00:00
|
|
|
outOfOpen();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notout2:
|
2011-12-01 19:38:46 +00:00
|
|
|
findOpenPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canplace3;
|
2011-12-01 19:38:46 +00:00
|
|
|
swapWithOpen();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canplace3:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPickup), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto intoopen;
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
intoopen:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 227);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyplc2;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 227;
|
2011-06-05 14:49:56 +04:00
|
|
|
difsub2:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kOldsubject) = ax;
|
|
|
|
bx = ax;
|
|
|
|
al = 35;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyplc2:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notletgo3) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doplace2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doplace2:
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
|
|
|
isItWorn();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notworntoopen;
|
2011-12-01 19:38:46 +00:00
|
|
|
wornError();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notworntoopen:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
|
|
|
_cmp(al, data.byte(kOpenedob));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isntsame;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kObjecttype);
|
|
|
|
_cmp(al, data.byte(kOpenedtype));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isntsame;
|
2011-12-01 19:38:46 +00:00
|
|
|
errorMessage1();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isntsame:
|
2011-12-01 19:38:46 +00:00
|
|
|
checkObjectSize();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto sizeok1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
sizeok1:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPickup) = 0;
|
|
|
|
al = data.byte(kItemframe);
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
fillOpen();
|
|
|
|
underTextLine();
|
|
|
|
readMouse();
|
|
|
|
useOpened();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::errorMessage1() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 76;
|
|
|
|
bx = 21;
|
|
|
|
al = 58;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
examIcon();
|
|
|
|
readMouse();
|
|
|
|
useOpened();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::errorMessage2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 76;
|
|
|
|
bx = 21;
|
|
|
|
al = 59;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
examIcon();
|
|
|
|
readMouse();
|
|
|
|
useOpened();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::errorMessage3() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 76;
|
|
|
|
bx = 21;
|
|
|
|
al = 60;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
examIcon();
|
|
|
|
readMouse();
|
|
|
|
useOpened();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::checkObjectSize() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
getOpenedSize();
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
|
|
|
al = data.byte(kItemframe);
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+9);
|
|
|
|
cx = pop();
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notunsized;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
2011-06-05 14:49:56 +04:00
|
|
|
notunsized:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 100);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto specialcase;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, 100);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isntspecial;
|
2011-12-01 19:38:46 +00:00
|
|
|
errorMessage3();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto sizewrong;
|
|
|
|
isntspecial:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(al, 100);
|
|
|
|
_cmp(cl, 100);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto bothspecial;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, al);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto sizeok;
|
2011-12-01 19:38:46 +00:00
|
|
|
errorMessage2();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto sizewrong;
|
|
|
|
bothspecial:
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(cl, 100);
|
|
|
|
_cmp(al, cl);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto sizeok;
|
2011-12-01 19:38:46 +00:00
|
|
|
errorMessage3();
|
2011-06-05 14:49:56 +04:00
|
|
|
sizewrong:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
sizeok:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::outOfOpen() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kOpenedob), 255);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantuseopen;
|
2011-12-01 19:38:46 +00:00
|
|
|
findOpenPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canpick4:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldsubject));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto difsub4;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 228);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadygrb;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 228;
|
2011-06-05 14:49:56 +04:00
|
|
|
difsub4:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kOldsubject) = ax;
|
|
|
|
bx = ax;
|
|
|
|
al = 36;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadygrb:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notletgo4) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dogrb;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notletgo4) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
reExFromOpen();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dogrb:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPickup) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
findOpenPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 20;
|
|
|
|
es.byte(bx+3) = 255;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto actuallyout;
|
|
|
|
makeintoex:
|
2011-12-01 19:38:46 +00:00
|
|
|
transferToEx();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kObjecttype) = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
getEitherAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 20;
|
|
|
|
es.byte(bx+3) = 255;
|
2011-06-05 14:49:56 +04:00
|
|
|
actuallyout:
|
2011-12-01 19:38:46 +00:00
|
|
|
fillOpen();
|
|
|
|
underTextLine();
|
|
|
|
readMouse();
|
|
|
|
useOpened();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::transferToEx() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
emergencyPurge();
|
|
|
|
getExPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
transferMap();
|
|
|
|
transferInv();
|
|
|
|
transferText();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kItemframe);
|
|
|
|
ah = 0;
|
|
|
|
bx = 16;
|
|
|
|
_mul(bx);
|
|
|
|
ds = data.word(kFreedat);
|
|
|
|
si = ax;
|
|
|
|
ds.byte(si+2) = 254;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupConts();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::pickupConts() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = ds.byte(si+7);
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notopenable) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(bx+3), al);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinsidethis;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kItemtotran) = cl;
|
2011-12-01 19:38:46 +00:00
|
|
|
transferConToEx();
|
2011-06-05 14:49:56 +04:00
|
|
|
notinsidethis:
|
2011-06-17 00:30:39 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::transferConToEx() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
push(dx);
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
ds = pop();
|
|
|
|
push(di);
|
|
|
|
cx = 8;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
transferMap();
|
|
|
|
transferInv();
|
|
|
|
transferText();
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
ds = pop();
|
|
|
|
ds.byte(si+2) = 255;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::purgeALocation() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(bl, es.byte(di+0));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dontpurge;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(di+2), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dontpurge;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(di);
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
push(cx);
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = pop();
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
di = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
dontpurge:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::emergencyPurge() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-06-05 14:49:56 +04:00
|
|
|
checkpurgeagain:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kExframepos);
|
|
|
|
_add(ax, 4000);
|
|
|
|
_cmp(ax, (30000));
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notnearframeend;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeAnItem();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto checkpurgeagain;
|
|
|
|
notnearframeend:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kExtextpos);
|
|
|
|
_add(ax, 400);
|
|
|
|
_cmp(ax, (18000));
|
|
|
|
if (flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notneartextend) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeAnItem();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto checkpurgeagain;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::purgeAnItem() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(di+2);
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantpurge;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(di+12), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto iscup;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(di+11), bl);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantpurge;
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExObject();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cantpurge:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(di, 16);
|
|
|
|
_inc(cx);
|
|
|
|
_cmp(cx, (114));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto lookforpurge;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (0+2080+30000);
|
|
|
|
bl = data.byte(kReallocation);
|
|
|
|
cx = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
lookforpurge2:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(di+2);
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantpurge2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(di+12), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantpurge2;
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExObject();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cantpurge2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::deleteExObject() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(cx);
|
|
|
|
push(cx);
|
|
|
|
push(cx);
|
|
|
|
push(cx);
|
|
|
|
al = 255;
|
|
|
|
cx = 16;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
cl = al;
|
|
|
|
_add(al, al);
|
|
|
|
_add(al, cl);
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
cl = al;
|
|
|
|
_add(al, al);
|
|
|
|
_add(al, cl);
|
|
|
|
_inc(al);
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExText();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
bh = bl;
|
|
|
|
bl = 4;
|
|
|
|
di = (0+2080+30000);
|
|
|
|
cx = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
deleteconts:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.word(di+2), bx);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinsideex;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
|
|
|
push(cx);
|
|
|
|
push(di);
|
2011-12-01 19:38:46 +00:00
|
|
|
deleteExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = pop();
|
|
|
|
cx = pop();
|
|
|
|
bx = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
notinsideex:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::deleteExFrame() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
_sub(data.word(kExframepos), bx);
|
|
|
|
si = pop();
|
|
|
|
cx = (114)*3;
|
|
|
|
di = (0);
|
2011-06-05 14:49:56 +04:00
|
|
|
shuffleadsdown:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(di+2);
|
|
|
|
_cmp(ax, si);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto beforethisone;
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(ax, bx);
|
2011-06-05 14:49:56 +04:00
|
|
|
beforethisone:
|
2011-06-17 00:30:39 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::deleteExText() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = es.byte(si);
|
|
|
|
_inc(ax);
|
|
|
|
_inc(si);
|
|
|
|
_cmp(cl, 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findlenextext;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = (18000);
|
|
|
|
bx = si;
|
|
|
|
_sub(bx, (0+2080+30000+(16*114)+((114+2)*2)));
|
|
|
|
push(bx);
|
|
|
|
push(ax);
|
|
|
|
_sub(cx, bx);
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(di);
|
|
|
|
_cmp(ax, si);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto beforethistext;
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(ax, bx);
|
2011-06-05 14:49:56 +04:00
|
|
|
beforethistext:
|
2011-06-17 00:30:39 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::redrawMainScrn() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.word(kTimecount) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewobs) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
drawFloor();
|
|
|
|
printSprites();
|
|
|
|
reelsOnScreen();
|
|
|
|
showIcon();
|
|
|
|
getUnderZoom();
|
|
|
|
underTextLine();
|
|
|
|
readMouse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getBack1() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kPickup), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notgotobject;
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notgotobject:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 202);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyget;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 202;
|
|
|
|
al = 26;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyget:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nogetback) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dogetback;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dogetback:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
underTextLine();
|
|
|
|
convIcons();
|
|
|
|
startTalk();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
2011-06-05 14:49:56 +04:00
|
|
|
waittalk:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
readMouse();
|
|
|
|
animPointer();
|
|
|
|
showPointer();
|
|
|
|
vSync();
|
|
|
|
dumpPointer();
|
|
|
|
dumpTextLine();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 0;
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_talklist;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkCoords();
|
2011-06-24 00:01:59 +04:00
|
|
|
_cmp(data.byte(kQuitrequested), 0);
|
|
|
|
if (!flags.z())
|
|
|
|
goto finishtalk;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = data.word(kPersondata);
|
|
|
|
es = cs;
|
|
|
|
_cmp(data.byte(kTalkpos), 4);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notnexttalk;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+7);
|
|
|
|
_or(al, 128);
|
|
|
|
es.byte(bx+7) = al;
|
2011-06-05 14:49:56 +04:00
|
|
|
notnexttalk:
|
2011-12-01 19:38:46 +00:00
|
|
|
redrawMainScrn();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSpeechloaded), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nospeech) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
cancelCh1();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolumedirection) = -1;
|
|
|
|
data.byte(kVolumeto) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::startTalk() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kTalkmode) = 0;
|
|
|
|
al = data.byte(kCharacter);
|
|
|
|
_and(al, 127);
|
2011-12-01 19:38:46 +00:00
|
|
|
getPersonText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kCharshift) = 91+91;
|
|
|
|
di = 66;
|
|
|
|
bx = 64;
|
|
|
|
dl = 241;
|
|
|
|
al = 0;
|
|
|
|
ah = 79;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kCharshift) = 0;
|
|
|
|
di = 66;
|
|
|
|
bx = 80;
|
|
|
|
dl = 241;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
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);
|
2011-12-01 19:38:46 +00:00
|
|
|
loadSpeech();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSpeechloaded), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nospeech1) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolumedirection) = 1;
|
|
|
|
data.byte(kVolumeto) = 6;
|
|
|
|
al = 50+12;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getPersonText() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::moreTalk() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kTalkmode), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canmore;
|
2011-06-17 00:30:39 +04:00
|
|
|
redes();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canmore:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 215);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadymore;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 215;
|
|
|
|
al = 49;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadymore:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nomore) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto domoretalk;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
domoretalk:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kTalkpos) = 48;
|
2011-06-05 14:49:56 +04:00
|
|
|
notsecondpart:
|
2011-12-01 19:38:46 +00:00
|
|
|
doSomeTalk();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::doSomeTalk() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-06-14 00:53:14 +04:00
|
|
|
dospeech:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(si);
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
convIcons();
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
es = pop();
|
|
|
|
di = 164;
|
|
|
|
bx = 64;
|
|
|
|
dl = 144;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
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);
|
2011-12-01 19:38:46 +00:00
|
|
|
loadSpeech();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSpeechloaded), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noplay1;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 62;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-14 00:53:14 +04:00
|
|
|
noplay1:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 180;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnPQ();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto _tmp1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-14 23:21:17 +04:00
|
|
|
_tmp1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(si), ':');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto skiptalk2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(si), 32);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto skiptalk2;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(si);
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
convIcons();
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
es = pop();
|
|
|
|
di = 48;
|
|
|
|
bx = 128;
|
|
|
|
dl = 144;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
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);
|
2011-12-01 19:38:46 +00:00
|
|
|
loadSpeech();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSpeechloaded), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noplay2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 62;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-14 00:53:14 +04:00
|
|
|
noplay2:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 180;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnPQ();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto skiptalk2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-14 00:53:14 +04:00
|
|
|
skiptalk2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kTalkpos));
|
2011-06-14 00:53:14 +04:00
|
|
|
goto dospeech;
|
|
|
|
endheartalk:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::hangOnPQ() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kGetback) = 0;
|
|
|
|
bx = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
hangloopq:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
readMouse();
|
|
|
|
animPointer();
|
|
|
|
showPointer();
|
|
|
|
vSync();
|
|
|
|
dumpPointer();
|
|
|
|
dumpTextLine();
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_quitlist;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkCoords();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSpeechloaded), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notspeaking;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCh1playing), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notspeaking;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto hangloopq;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
flags._c = false;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
quitconv:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
cancelCh1();
|
2011-06-17 00:30:39 +04:00
|
|
|
flags._c = true;
|
2011-06-15 22:25:16 +04:00
|
|
|
}
|
2011-06-05 13:38:05 +04:00
|
|
|
|
2011-06-17 00:30:39 +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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canredes:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 217);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyreds;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 217;
|
|
|
|
al = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyreds:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doredes;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doredes:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
convIcons();
|
|
|
|
startTalk();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::newPlace() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kNeedtotravel), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto istravel;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kAutolocation), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isautoloc;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isautoloc:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kAutolocation);
|
|
|
|
data.byte(kNewlocation) = al;
|
|
|
|
data.byte(kAutolocation) = -1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
istravel:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNeedtotravel) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
selectLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::selectLocation() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kInmaparea) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearBeforeLoad();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 0;
|
|
|
|
data.byte(kPointerframe) = 22;
|
2011-12-01 19:38:46 +00:00
|
|
|
readCityPic();
|
|
|
|
showCity();
|
|
|
|
getRidOfTemp();
|
|
|
|
readDestIcon();
|
|
|
|
loadTravelText();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showArrows();
|
|
|
|
showExit();
|
|
|
|
locationPic();
|
|
|
|
underTextLine();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
readMouse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointerframe) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 9;
|
|
|
|
ah = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel0();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
vSync();
|
|
|
|
dumpPointer();
|
|
|
|
dumpTextLine();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGetback), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto quittravel;
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_destlist;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkCoords();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kNewlocation), 255);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto select;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kNewlocation);
|
|
|
|
_cmp(al, data.byte(kLocation));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto quittravel;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfTemp();
|
|
|
|
getRidOfTemp2();
|
|
|
|
getRidOfTemp3();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kTraveltext);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
quittravel:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kReallocation);
|
|
|
|
data.byte(kNewlocation) = al;
|
|
|
|
data.byte(kGetback) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfTemp();
|
|
|
|
getRidOfTemp2();
|
|
|
|
getRidOfTemp3();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kTraveltext);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::lookAtPlace() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 224);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyinfo;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 224;
|
|
|
|
al = 27;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyinfo:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_and(ax, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noinfo) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noinfo) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
bl = data.byte(kDestpos);
|
|
|
|
_cmp(bl, 15);
|
|
|
|
if (!flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noinfo) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
delTextLine();
|
|
|
|
getUnderCentre();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics3);
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
|
|
|
di = 60;
|
|
|
|
bx = 72;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
|
|
|
ah = 0;
|
|
|
|
di = 60;
|
|
|
|
bx = 72+55;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-25 17:28:51 +04:00
|
|
|
_cmp(data.byte(kForeignrelease), 0);
|
|
|
|
if (flags.z())
|
|
|
|
goto _tmp1;
|
|
|
|
al = 4;
|
|
|
|
ah = 0;
|
|
|
|
di = 60;
|
|
|
|
bx = 72+55+21;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-25 17:28:51 +04:00
|
|
|
_tmp1:
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
bh = 0;
|
|
|
|
_add(bx, bx);
|
|
|
|
es = data.word(kTraveltext);
|
|
|
|
si = es.word(bx);
|
|
|
|
_add(si, (66*2));
|
2011-12-01 19:38:46 +00:00
|
|
|
findNextColon();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 63;
|
|
|
|
bx = 84;
|
2011-06-25 17:28:51 +04:00
|
|
|
_cmp(data.byte(kForeignrelease), 0);
|
|
|
|
if (flags.z())
|
|
|
|
goto _tmp2;
|
|
|
|
bx = 84+4;
|
|
|
|
_tmp2:
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 191;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 500;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointermode) = 0;
|
|
|
|
data.byte(kPointerframe) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
putUnderCentre();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getUnderCentre() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = 58;
|
|
|
|
bx = 72;
|
|
|
|
ds = data.word(kMapstore);
|
|
|
|
si = 0;
|
|
|
|
cl = 254;
|
|
|
|
ch = 110;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiGet();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::putUnderCentre() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = 58;
|
|
|
|
bx = 72;
|
|
|
|
ds = data.word(kMapstore);
|
|
|
|
si = 0;
|
|
|
|
cl = 254;
|
|
|
|
ch = 110;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiPut();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::locationPic() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
getDestInfo();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
_add(al, 4);
|
2011-06-05 14:49:56 +04:00
|
|
|
goto gotgraphic;
|
|
|
|
secondlot:
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(al, 6);
|
|
|
|
ds = data.word(kTempgraphics2);
|
2011-06-05 14:49:56 +04:00
|
|
|
gotgraphic:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(di, 104);
|
|
|
|
bx = 138+14;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 3;
|
|
|
|
di = 104;
|
|
|
|
bx = 140+14;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-05 14:49:56 +04:00
|
|
|
notinthisone:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getDestInfo() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kDestpos);
|
|
|
|
ah = 0;
|
|
|
|
push(ax);
|
|
|
|
dx = data;
|
|
|
|
es = dx;
|
2011-12-05 17:39:42 +00:00
|
|
|
si = 1736;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(si, ax);
|
|
|
|
cl = es.byte(si);
|
|
|
|
ax = pop();
|
|
|
|
push(cx);
|
|
|
|
dx = data;
|
|
|
|
es = dx;
|
2011-12-05 17:39:42 +00:00
|
|
|
si = 1752;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(si, ax);
|
|
|
|
ax = pop();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showArrows() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = 116-12;
|
|
|
|
bx = 16;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 226+12;
|
|
|
|
bx = 16;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 1;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 280;
|
|
|
|
bx = 14;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 2;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::nextDest() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 218);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadydu;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 218;
|
|
|
|
al = 28;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadydu:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_and(ax, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nodu) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nodu) */;
|
2011-06-05 14:49:56 +04:00
|
|
|
searchdestup:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kDestpos));
|
|
|
|
_cmp(data.byte(kDestpos), 15);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notlastdest;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestpos) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
notlastdest:
|
2011-12-01 19:38:46 +00:00
|
|
|
getDestInfo();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto searchdestup;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewtextline) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
delTextLine();
|
|
|
|
delPointer();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showArrows();
|
|
|
|
locationPic();
|
|
|
|
underTextLine();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::lastDest() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 219);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadydd;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 219;
|
|
|
|
al = 29;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadydd:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_and(ax, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nodd) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nodd) */;
|
2011-06-05 14:49:56 +04:00
|
|
|
searchdestdown:
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kDestpos));
|
|
|
|
_cmp(data.byte(kDestpos), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfirstdest;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestpos) = 15;
|
2011-06-05 14:49:56 +04:00
|
|
|
notfirstdest:
|
2011-12-01 19:38:46 +00:00
|
|
|
getDestInfo();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto searchdestdown;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewtextline) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
delTextLine();
|
|
|
|
delPointer();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showArrows();
|
|
|
|
locationPic();
|
|
|
|
underTextLine();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::destSelect() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 222);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadytrav;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 222;
|
|
|
|
al = 30;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadytrav:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_and(ax, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notrav) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notrav) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
getDestInfo();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kDestpos);
|
|
|
|
data.byte(kNewlocation) = al;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::resetLocation() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(ax);
|
|
|
|
_cmp(al, 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdelhotel;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 21;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 22;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 27;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto clearedlocations;
|
|
|
|
notdelhotel:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 8);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdeltvstud;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 28;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto clearedlocations;
|
|
|
|
notdeltvstud:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 6);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdelsarters;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 20;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 25;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto clearedlocations;
|
|
|
|
notdelsarters:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 13);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdelboathouse;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 29;
|
2011-12-01 19:38:46 +00:00
|
|
|
purgeALocation();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto clearedlocations;
|
|
|
|
notdelboathouse:
|
|
|
|
clearedlocations:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
ah = 0;
|
|
|
|
bx = ax;
|
|
|
|
dx = data;
|
|
|
|
es = dx;
|
2011-12-05 17:39:42 +00:00
|
|
|
_add(bx, 1736);
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::printOuterMon() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = 40;
|
|
|
|
bx = 32;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 1;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 264;
|
|
|
|
bx = 32;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 2;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 40;
|
|
|
|
bx = 12;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 3;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 40;
|
|
|
|
bx = 164;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 4;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::lookInInterface() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 'I';
|
|
|
|
ah = 'N';
|
|
|
|
cl = 'T';
|
|
|
|
ch = 'F';
|
2011-12-01 19:38:46 +00:00
|
|
|
findSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkInside();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, (114));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto emptyinterface;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+15);
|
|
|
|
_inc(al);
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
emptyinterface:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
2011-06-05 14:49:56 +04:00
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::lockLightOn() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = 56;
|
|
|
|
bx = 182;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 10;
|
|
|
|
ah = 0;
|
|
|
|
push(di);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
di = pop();
|
|
|
|
cl = 12;
|
|
|
|
ch = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::lockLightOff() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = 56;
|
|
|
|
bx = 182;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 9;
|
|
|
|
ah = 0;
|
|
|
|
push(di);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
di = pop();
|
|
|
|
cl = 12;
|
|
|
|
ch = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::makeCaps() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(al, 'a');
|
|
|
|
if (flags.c())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notupperc) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(al, 32);
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::execCommand() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_comlist;
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = cs;
|
2011-12-05 17:39:42 +00:00
|
|
|
si = 1770;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = ds.byte(si);
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notblankinp;
|
2011-12-01 19:38:46 +00:00
|
|
|
scrollMonitor();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notblankinp:
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
comloop:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
|
|
|
push(si);
|
2011-06-05 14:49:56 +04:00
|
|
|
comloop2:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, ah);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto comloop2;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
netError();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
foundcom:
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
bx = pop();
|
|
|
|
_cmp(cl, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto testcom;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto directory;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, 3);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto accesscom;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto signoncom;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-12-01 19:38:46 +00:00
|
|
|
dirCom();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
signoncom:
|
2011-12-01 19:38:46 +00:00
|
|
|
signOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
accesscom:
|
2011-06-17 00:30:39 +04:00
|
|
|
read();
|
|
|
|
al = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
keyscom:
|
2011-12-01 19:38:46 +00:00
|
|
|
showKeys();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
testcom:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
quitcom:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dirCom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
cx = 30;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomAccess();
|
2011-06-17 00:30:39 +04:00
|
|
|
parser();
|
|
|
|
_cmp(es.byte(di+1), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dirroot;
|
2011-12-01 19:38:46 +00:00
|
|
|
dirFile();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dirroot:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLogonum) = 0;
|
|
|
|
ds = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
si = offset_rootdir;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(si);
|
|
|
|
es = cs;
|
2011-12-05 17:39:42 +00:00
|
|
|
di = 1425;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(di);
|
|
|
|
cx = 12;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-12-01 19:38:46 +00:00
|
|
|
monitorLogo();
|
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 9;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kTextfile1);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForFiles();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kTextfile2);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForFiles();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kTextfile3);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForFiles();
|
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::searchForFiles() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
bx = (66*2);
|
2011-06-05 14:49:56 +04:00
|
|
|
directloop1:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx);
|
|
|
|
_inc(bx);
|
|
|
|
_cmp(al, '*');
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (endofdir) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 34);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto directloop1;
|
2011-12-01 19:38:46 +00:00
|
|
|
monPrint();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto directloop1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::signOn() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
parser();
|
|
|
|
_inc(di);
|
|
|
|
ds = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
si = offset_keys;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 4;
|
2011-06-05 14:49:56 +04:00
|
|
|
signonloop:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
push(si);
|
|
|
|
push(di);
|
|
|
|
_add(si, 14);
|
|
|
|
cx = 11;
|
2011-06-05 14:49:56 +04:00
|
|
|
signonloop2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_lodsb();
|
|
|
|
_cmp(al, 32);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundsign;
|
2011-12-01 19:38:46 +00:00
|
|
|
makeCaps();
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = es.byte(di);
|
|
|
|
_inc(di);
|
|
|
|
_cmp(al, ah);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nomatch;
|
2011-06-17 00:30:39 +04:00
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto signonloop2;
|
2011-06-05 14:49:56 +04:00
|
|
|
nomatch:
|
2011-06-17 00:30:39 +04:00
|
|
|
di = pop();
|
|
|
|
si = pop();
|
|
|
|
cx = pop();
|
|
|
|
_add(si, 26);
|
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto signonloop;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 13;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
foundsign:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 17;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notyetassigned:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 15;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-05 17:39:42 +00:00
|
|
|
si = 1770;
|
2011-06-05 14:49:56 +04:00
|
|
|
checkpass:
|
2011-06-17 00:30:39 +04:00
|
|
|
_lodsw();
|
|
|
|
ah = es.byte(bx);
|
|
|
|
_inc(bx);
|
|
|
|
_cmp(ah, 32);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto passpassed;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, ah);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto checkpass;
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-12-01 19:38:46 +00:00
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
passpassed:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
_add(bx, 14);
|
2011-12-01 19:38:46 +00:00
|
|
|
monPrint();
|
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
es.byte(bx) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showKeys() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
cx = 10;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomAccess();
|
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 18;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_keys;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 4;
|
2011-06-05 14:49:56 +04:00
|
|
|
keysloop:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
push(bx);
|
|
|
|
_cmp(es.byte(bx), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notheld;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 14);
|
2011-12-01 19:38:46 +00:00
|
|
|
monPrint();
|
2011-06-05 14:49:56 +04:00
|
|
|
notheld:
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
cx = pop();
|
|
|
|
_add(bx, 26);
|
|
|
|
if (--cx)
|
2011-06-16 16:31:17 +04:00
|
|
|
goto keysloop;
|
2011-12-01 19:38:46 +00:00
|
|
|
scrollMonitor();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::read() {
|
|
|
|
STACK_CHECK;
|
|
|
|
cx = 40;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomAccess();
|
2011-06-17 00:30:39 +04:00
|
|
|
parser();
|
|
|
|
_cmp(es.byte(di+1), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto okcom;
|
2011-12-01 19:38:46 +00:00
|
|
|
netError();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
okcom:
|
2011-06-17 00:30:39 +04:00
|
|
|
es = cs;
|
2011-12-05 17:39:42 +00:00
|
|
|
di = 1425;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kTextfile1);
|
|
|
|
data.word(kMonsource) = ax;
|
|
|
|
ds = ax;
|
|
|
|
si = (66*2);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForString();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundfile2;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kTextfile2);
|
|
|
|
data.word(kMonsource) = ax;
|
|
|
|
ds = ax;
|
|
|
|
si = (66*2);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForString();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundfile2;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kTextfile3);
|
|
|
|
data.word(kMonsource) = ax;
|
|
|
|
ds = ax;
|
|
|
|
si = (66*2);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForString();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundfile2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 7;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
foundfile2:
|
2011-12-01 19:38:46 +00:00
|
|
|
getKeyAndLogo();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto keyok1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
keyok1:
|
2011-06-17 00:30:39 +04:00
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
di = offset_operand1;
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kMonsource);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForString();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findtopictext;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kOldlogonum);
|
|
|
|
data.byte(kLogonum) = al;
|
|
|
|
al = 11;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
findtopictext:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(bx);
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
monitorLogo();
|
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
moretopic:
|
2011-12-01 19:38:46 +00:00
|
|
|
monPrint();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx);
|
|
|
|
_cmp(al, 34);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endoftopic;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, '=');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endoftopic;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, '*');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endoftopic;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
processTrigger();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 24;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomAccess();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto moretopic;
|
|
|
|
endoftopic:
|
2011-12-01 19:38:46 +00:00
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dirFile() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 34;
|
|
|
|
es.byte(di) = al;
|
|
|
|
push(es);
|
|
|
|
push(di);
|
|
|
|
ds = data.word(kTextfile1);
|
|
|
|
si = (66*2);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForString();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundfile;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = pop();
|
|
|
|
es = pop();
|
|
|
|
push(es);
|
|
|
|
push(di);
|
|
|
|
ds = data.word(kTextfile2);
|
|
|
|
si = (66*2);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForString();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundfile;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = pop();
|
|
|
|
es = pop();
|
|
|
|
push(es);
|
|
|
|
push(di);
|
|
|
|
ds = data.word(kTextfile3);
|
|
|
|
si = (66*2);
|
2011-12-01 19:38:46 +00:00
|
|
|
searchForString();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foundfile;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = pop();
|
|
|
|
es = pop();
|
|
|
|
al = 7;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
foundfile:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
ax = pop();
|
2011-12-01 19:38:46 +00:00
|
|
|
getKeyAndLogo();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto keyok2;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
keyok2:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
ds = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
si = offset_operand1+1;
|
2011-06-17 00:30:39 +04:00
|
|
|
es = cs;
|
2011-12-05 17:39:42 +00:00
|
|
|
di = 1425+1;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 12;
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-12-01 19:38:46 +00:00
|
|
|
monitorLogo();
|
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 10;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
2011-06-05 14:49:56 +04:00
|
|
|
directloop2:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx);
|
|
|
|
_inc(bx);
|
|
|
|
_cmp(al, 34);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endofdir2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, '*');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto endofdir2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, '=');
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto directloop2;
|
2011-12-01 19:38:46 +00:00
|
|
|
monPrint();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto directloop2;
|
|
|
|
endofdir2:
|
2011-12-01 19:38:46 +00:00
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getKeyAndLogo() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_keys;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, ax);
|
|
|
|
al = es.byte(bx);
|
|
|
|
_cmp(al, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto keyok;
|
2011-06-17 00:30:39 +04:00
|
|
|
push(bx);
|
|
|
|
push(es);
|
|
|
|
al = 12;
|
2011-12-01 19:38:46 +00:00
|
|
|
monMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = pop();
|
|
|
|
bx = pop();
|
|
|
|
_add(bx, 14);
|
2011-12-01 19:38:46 +00:00
|
|
|
monPrint();
|
|
|
|
scrollMonitor();
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
al = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
keyok:
|
2011-06-17 00:30:39 +04:00
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
al = data.byte(kNewlogonum);
|
|
|
|
data.byte(kLogonum) = al;
|
|
|
|
al = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::searchForString() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
dl = es.byte(di);
|
|
|
|
cx = di;
|
2011-06-05 14:49:56 +04:00
|
|
|
restartlook:
|
2011-06-17 00:30:39 +04:00
|
|
|
di = cx;
|
|
|
|
bx = si;
|
|
|
|
dh = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
keeplooking:
|
2011-06-17 00:30:39 +04:00
|
|
|
_lodsb();
|
2011-12-01 19:38:46 +00:00
|
|
|
makeCaps();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, '*');
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfound;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(dl, '=');
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindingtopic;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = es.byte(di);
|
|
|
|
_cmp(al, dl);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbracket;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, ah);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto restartlook;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(di);
|
2011-06-05 14:49:56 +04:00
|
|
|
goto keeplooking;
|
|
|
|
complete:
|
2011-06-17 00:30:39 +04:00
|
|
|
es = ds;
|
|
|
|
al = 0;
|
|
|
|
bx = si;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notfound:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DreamGenContext::parser() {
|
|
|
|
STACK_CHECK;
|
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
di = offset_operand1;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 13;
|
|
|
|
al = 0;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosb(cx, true);
|
2011-08-17 23:22:49 +02:00
|
|
|
di = offset_operand1;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = '=';
|
|
|
|
_stosb();
|
|
|
|
ds = cs;
|
2011-12-05 17:39:42 +00:00
|
|
|
si = 1770;
|
2011-06-05 14:49:56 +04:00
|
|
|
notspace1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_lodsw();
|
|
|
|
_cmp(al, 32);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto stillspace1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_stosb();
|
|
|
|
_lodsw();
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto finishpars;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-08-17 23:22:49 +02:00
|
|
|
di = offset_operand1;
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::monitorLogo() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kLogonum);
|
|
|
|
_cmp(al, data.byte(kOldlogonum));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notnewlogo;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kOldlogonum) = al;
|
2011-12-01 19:38:46 +00:00
|
|
|
printLogo();
|
|
|
|
printUnderMon();
|
|
|
|
workToScreen();
|
|
|
|
printLogo();
|
|
|
|
printLogo();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 26;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 20;
|
2011-12-01 19:38:46 +00:00
|
|
|
randomAccess();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notnewlogo:
|
2011-12-01 19:38:46 +00:00
|
|
|
printLogo();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::processTrigger() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLasttrigger), '1');
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfirsttrigger;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 45;
|
2011-12-01 19:38:46 +00:00
|
|
|
triggerMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notfirsttrigger:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLasttrigger), '2');
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsecondtrigger;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 9;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 55;
|
2011-12-01 19:38:46 +00:00
|
|
|
triggerMessage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notsecondtrigger:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLasttrigger), '3');
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notthirdtrigger) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 59;
|
2011-12-01 19:38:46 +00:00
|
|
|
triggerMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::triggerMessage() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(ax);
|
|
|
|
di = 174;
|
|
|
|
bx = 153;
|
|
|
|
cl = 200;
|
|
|
|
ch = 63;
|
|
|
|
ds = data.word(kMapstore);
|
|
|
|
si = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiGet();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
2011-12-01 19:38:46 +00:00
|
|
|
findPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 174;
|
|
|
|
bx = 156;
|
|
|
|
dl = 141;
|
|
|
|
ah = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 140;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
|
|
|
workToScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 340;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 174;
|
|
|
|
bx = 153;
|
|
|
|
cl = 200;
|
|
|
|
ch = 63;
|
|
|
|
ds = data.word(kMapstore);
|
|
|
|
si = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiPut();
|
|
|
|
workToScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLasttrigger) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useObject() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kWithobject) = 255;
|
|
|
|
_cmp(data.byte(kCommandtype), 229);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyuse;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 229;
|
|
|
|
bl = data.byte(kCommand);
|
|
|
|
bh = data.byte(kObjecttype);
|
|
|
|
al = 51;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyuse:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nouse) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto douse;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
douse:
|
2011-12-01 19:38:46 +00:00
|
|
|
useRoutine();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::wheelSound() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 17;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::runTap() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto tapwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
tapwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 56;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
fillcupfromtap:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+15) = 'F'-'A';
|
|
|
|
al = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 57;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cupfromtapfull:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 58;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::playGuitar() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::hotelControl() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kReallocation), 21);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notrightcont;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 33);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notrightcont;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notrightcont:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::hotelBell() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 12;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openTomb() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 35*2;
|
|
|
|
data.word(kReeltowatch) = 1;
|
|
|
|
data.word(kEndwatchreel) = 33;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useTrainer() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(bx+2), 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notheldtrainer;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
makeWorn();
|
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notheldtrainer:
|
2011-12-01 19:38:46 +00:00
|
|
|
notHeldError();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::notHeldError() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
obIcons();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 64;
|
|
|
|
bx = 100;
|
|
|
|
al = 63;
|
|
|
|
ah = 1;
|
|
|
|
dl = 201;
|
|
|
|
printmessage2();
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::usePipe() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto pipewith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
pipewith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
fillcup:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 36;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+15) = 'F'-'A';
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyfull:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 35;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useFullCart() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
al = 2;
|
|
|
|
ah = data.byte(kRoomnum);
|
|
|
|
_add(ah, 6);
|
2011-12-01 19:38:46 +00:00
|
|
|
turnAnyPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManspath) = 4;
|
|
|
|
data.byte(kFacing) = 4;
|
|
|
|
data.byte(kTurntoface) = 4;
|
|
|
|
data.byte(kFinaldest) = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 72*2;
|
|
|
|
data.word(kReeltowatch) = 58;
|
|
|
|
data.word(kEndwatchreel) = 142;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::usePlinth() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto plinthwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
plinthwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'D';
|
|
|
|
ch = 'K';
|
|
|
|
dl = 'E';
|
|
|
|
dh = 'Y';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isrightkey;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isrightkey:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 220;
|
|
|
|
data.word(kReeltowatch) = 0;
|
|
|
|
data.word(kEndwatchreel) = 104;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
al = data.byte(kRoomafterdream);
|
|
|
|
data.byte(kNewlocation) = al;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DreamGenContext::chewy() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
getAnyAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 255;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useLadder() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
_sub(data.byte(kMapx), 11);
|
2011-12-01 19:38:46 +00:00
|
|
|
findRoomInLoc();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFacing) = 6;
|
|
|
|
data.byte(kTurntoface) = 6;
|
|
|
|
data.byte(kManspath) = 0;
|
|
|
|
data.byte(kDestination) = 0;
|
|
|
|
data.byte(kFinaldest) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useLadderB() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(data.byte(kMapx), 11);
|
2011-12-01 19:38:46 +00:00
|
|
|
findRoomInLoc();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kFacing) = 2;
|
|
|
|
data.byte(kTurntoface) = 2;
|
|
|
|
data.byte(kManspath) = 1;
|
|
|
|
data.byte(kDestination) = 1;
|
|
|
|
data.byte(kFinaldest) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::sLabDoorA() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kReeltowatch) = 13;
|
|
|
|
_cmp(data.byte(kDreamnumber), 3);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slabawrong;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.word(kWatchingtime) = 60;
|
|
|
|
data.word(kEndwatchreel) = 42;
|
|
|
|
data.byte(kNewlocation) = 47;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
slabawrong:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 40;
|
|
|
|
data.word(kEndwatchreel) = 34;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::sLabDoorB() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kDreamnumber), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slabbwrong;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 'S';
|
|
|
|
ah = 'H';
|
|
|
|
cl = 'L';
|
|
|
|
ch = 'D';
|
2011-12-01 19:38:46 +00:00
|
|
|
isRyanHolding();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotcrystal;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 44;
|
|
|
|
cx = 200;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotcrystal:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kReeltowatch) = 44;
|
|
|
|
data.word(kWatchingtime) = 60;
|
|
|
|
data.word(kEndwatchreel) = 71;
|
|
|
|
data.byte(kNewlocation) = 47;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
slabbwrong:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kReeltowatch) = 44;
|
|
|
|
data.word(kWatchingtime) = 40;
|
|
|
|
data.word(kEndwatchreel) = 63;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::sLabDoorD() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kReeltowatch) = 75;
|
|
|
|
_cmp(data.byte(kDreamnumber), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slabcwrong;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.word(kWatchingtime) = 60;
|
|
|
|
data.word(kEndwatchreel) = 102;
|
|
|
|
data.byte(kNewlocation) = 47;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
slabcwrong:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 40;
|
|
|
|
data.word(kEndwatchreel) = 94;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::sLabDoorC() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kReeltowatch) = 108;
|
|
|
|
_cmp(data.byte(kDreamnumber), 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slabdwrong;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.word(kWatchingtime) = 60;
|
|
|
|
data.word(kEndwatchreel) = 135;
|
|
|
|
data.byte(kNewlocation) = 47;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
slabdwrong:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 40;
|
|
|
|
data.word(kEndwatchreel) = 127;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::sLabDoorE() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kReeltowatch) = 141;
|
|
|
|
_cmp(data.byte(kDreamnumber), 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slabewrong;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.word(kWatchingtime) = 60;
|
|
|
|
data.word(kEndwatchreel) = 168;
|
|
|
|
data.byte(kNewlocation) = 47;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
slabewrong:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 40;
|
|
|
|
data.word(kEndwatchreel) = 160;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::sLabDoorF() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kReeltowatch) = 171;
|
|
|
|
_cmp(data.byte(kDreamnumber), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slabfwrong;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.word(kWatchingtime) = 60;
|
|
|
|
data.word(kEndwatchreel) = 197;
|
|
|
|
data.byte(kNewlocation) = 47;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
slabfwrong:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 40;
|
|
|
|
data.word(kEndwatchreel) = 189;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useSLab() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto slabwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
slabwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nextslab:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 0;
|
|
|
|
al = data.byte(kCommand);
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
_inc(al);
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
_cmp(al, 54);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notlastslab;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useCart() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cartwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cartwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'R';
|
|
|
|
ch = 'O';
|
|
|
|
dl = 'C';
|
|
|
|
dh = 'K';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nextcart;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nextcart:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 0;
|
|
|
|
al = data.byte(kCommand);
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
_inc(al);
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
al = 17;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useClearBox() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto clearboxwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
clearboxwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'R';
|
|
|
|
ch = 'A';
|
|
|
|
dl = 'I';
|
|
|
|
dh = 'L';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto openbox;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
openbox:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.word(kReeltowatch) = 67;
|
|
|
|
data.word(kEndwatchreel) = 105;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useCoveredBox() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 50;
|
|
|
|
data.word(kReeltowatch) = 41;
|
|
|
|
data.word(kEndwatchreel) = 66;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useRailing() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.word(kReeltowatch) = 0;
|
|
|
|
data.word(kEndwatchreel) = 30;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kMandead) = 4;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useOpenBox() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto openboxwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
openboxwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
destoryopenbox:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
cx = 300;
|
|
|
|
al = 37;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
openboxwrong:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 38;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::wearWatch() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWatchon), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto wearingwatch;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kWatchon) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
|
|
|
makeWorn();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
wearingwatch:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::wearShades() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kShadeson), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto wearingshades;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kShadeson) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
|
|
|
makeWorn();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
wearingshades:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::sitDownInBar() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWatchmode), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto satdown;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 50;
|
|
|
|
data.word(kReeltowatch) = 55;
|
|
|
|
data.word(kEndwatchreel) = 71;
|
|
|
|
data.word(kReeltohold) = 73;
|
|
|
|
data.word(kEndofholdreel) = 83;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
satdown:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useChurchHole() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.word(kWatchingtime) = 28;
|
|
|
|
data.word(kReeltowatch) = 13;
|
|
|
|
data.word(kEndwatchreel) = 26;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useHole() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto holewith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
holewith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'H';
|
|
|
|
ch = 'N';
|
|
|
|
dl = 'D';
|
|
|
|
dh = 'A';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto righthand;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
righthand:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 86;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 255;
|
|
|
|
data.byte(kCanmovealtar) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useAltar() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 'C';
|
|
|
|
ah = 'N';
|
|
|
|
cl = 'D';
|
|
|
|
ch = 'A';
|
2011-12-01 19:38:46 +00:00
|
|
|
findExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, (114));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto thingsonaltar;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 'C';
|
|
|
|
ah = 'N';
|
|
|
|
cl = 'D';
|
|
|
|
ch = 'B';
|
2011-12-01 19:38:46 +00:00
|
|
|
findExObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, (114));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto thingsonaltar;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCanmovealtar), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto movealtar;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 23;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
movealtar:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
thingsonaltar:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openTVDoor() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto tvdoorwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
tvdoorwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'U';
|
|
|
|
ch = 'L';
|
|
|
|
dl = 'O';
|
|
|
|
dh = 'K';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto keyontv;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
keyontv:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLockstatus) = 0;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useDryer() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 12;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openLouis() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 5;
|
|
|
|
ah = 2;
|
|
|
|
cl = 3;
|
|
|
|
ch = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
enterCode();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::nextColon() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-06-05 14:49:56 +04:00
|
|
|
lookcolon:
|
2011-06-17 00:30:39 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openYourNeighbour() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 255;
|
|
|
|
ah = 255;
|
|
|
|
cl = 255;
|
|
|
|
ch = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
enterCode();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useWindow() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kManspath), 6);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notonbalc;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 29;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notonbalc:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useBalcony() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.byte(kManspath) = 6;
|
|
|
|
data.byte(kDestination) = 6;
|
|
|
|
data.byte(kFinaldest) = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
|
|
|
switchRyanOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
|
|
|
data.word(kWatchingtime) = 30*2;
|
|
|
|
data.word(kReeltowatch) = 183;
|
|
|
|
data.word(kEndwatchreel) = 212;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openRyan() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 5;
|
|
|
|
ah = 1;
|
|
|
|
cl = 0;
|
|
|
|
ch = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
enterCode();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openPoolBoss() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 5;
|
|
|
|
ah = 2;
|
|
|
|
cl = 2;
|
|
|
|
ch = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
enterCode();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openEden() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 2;
|
|
|
|
ah = 8;
|
|
|
|
cl = 6;
|
|
|
|
ch = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
enterCode();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openSarters() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 7;
|
|
|
|
ah = 8;
|
|
|
|
cl = 3;
|
|
|
|
ch = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
enterCode();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::drawItAll() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
drawFloor();
|
|
|
|
printSprites();
|
|
|
|
showIcon();
|
2011-06-05 14:09:44 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openHotelDoor() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto hoteldoorwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
hoteldoorwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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 keyonhotel1;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
keyonhotel1:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLockstatus) = 0;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 14:09:44 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::openHotelDoor2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto hoteldoorwith2;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
hoteldoorwith2:
|
2011-06-17 00:30:39 +04:00
|
|
|
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 keyonhotel2;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
keyonhotel2:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::grafittiDoor() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto grafwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
grafwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'A';
|
|
|
|
ch = 'P';
|
|
|
|
dl = 'E';
|
|
|
|
dh = 'N';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dograf;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dograf:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::trapDoor() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
switchRyanOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 20*2;
|
|
|
|
data.word(kReeltowatch) = 181;
|
|
|
|
data.word(kEndwatchreel) = 197;
|
|
|
|
data.byte(kNewlocation) = 26;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::callHotelLift() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 12;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCounttoopen) = 8;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kDestination) = 5;
|
|
|
|
data.byte(kFinaldest) = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::callEdensLift() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCounttoopen) = 8;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::callEdensDLift() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLiftflag), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto edensdhere;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCounttoopen) = 8;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
edensdhere:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::usePoolReader() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto poolwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
poolwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
openpool:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kTalkedtoattendant), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canopenpool;
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canopenpool:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 17;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCounttoopen) = 6;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useLighter() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotlighterwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotlighterwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cigarette:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 9;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
2011-12-01 19:38:46 +00:00
|
|
|
getExAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 255;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useCardReader1() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotreader1with;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotreader1with:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
correctcard:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kTalkedtosparky), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notyet;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kCard1money), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto getscash;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 17;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
getscash:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 18;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.word(kCard1money) = 12432;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notyet:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useCardReader2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotreader2with;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotreader2with:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
correctcard2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kTalkedtoboss), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notyetboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kCard1money), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nocash;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGunpassflag), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadygotnew;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 18;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 19;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 94;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGunpassflag) = 1;
|
|
|
|
_sub(data.word(kCard1money), 2000);
|
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nocash:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 20;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadygotnew:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 22;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notyetboss:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useCardReader3() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotreader3with;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotreader3with:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
rightcard:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kTalkedtorecep), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notyetrecep;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCardpassflag), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyusedit;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 25;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
_sub(data.word(kCard1money), 8300);
|
|
|
|
data.byte(kCardpassflag) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyusedit:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 26;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notyetrecep:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useCashCard() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfReels();
|
|
|
|
loadKeypad();
|
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showExit();
|
|
|
|
showMan();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 114;
|
|
|
|
bx = 120;
|
2011-06-25 17:28:51 +04:00
|
|
|
_cmp(data.byte(kForeignrelease), 0);
|
|
|
|
if (flags.z())
|
|
|
|
goto _tmp1;
|
|
|
|
bx = 120-3;
|
|
|
|
_tmp1:
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 39;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kCard1money);
|
2011-12-01 19:38:46 +00:00
|
|
|
moneyPoke();
|
|
|
|
getObTextStart();
|
|
|
|
nextColon();
|
|
|
|
nextColon();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 36;
|
|
|
|
bx = 98;
|
|
|
|
dl = 241;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 160;
|
|
|
|
bx = 155;
|
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
si = offset_money1poke;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kCharshift) = 91*2+75;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 187;
|
|
|
|
bx = 155;
|
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
si = offset_money2poke;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kCharshift) = 91*2+85;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
|
|
|
dl = 240;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kCharshift) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 400;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
getRidOfTemp();
|
|
|
|
restoreReels();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::lookAtCard() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kManisoffscreen) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfReels();
|
|
|
|
loadKeypad();
|
|
|
|
createPanel2();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 160;
|
|
|
|
bx = 80;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 42;
|
|
|
|
ah = 128;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
|
|
|
getObTextStart();
|
|
|
|
findNextColon();
|
|
|
|
findNextColon();
|
|
|
|
findNextColon();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 36;
|
|
|
|
bx = 124;
|
|
|
|
dl = 241;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(si);
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 280;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnW();
|
|
|
|
createPanel2();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 160;
|
|
|
|
bx = 80;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
al = 42;
|
|
|
|
ah = 128;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
es = pop();
|
|
|
|
di = 36;
|
|
|
|
bx = 130;
|
|
|
|
dl = 241;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 200;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnW();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManisoffscreen) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfTemp();
|
|
|
|
restoreReels();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::moneyPoke() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_money1poke;
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 48-1;
|
2011-06-05 14:49:56 +04:00
|
|
|
numberpoke0:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 10000);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto numberpoke0;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(ax, 10000);
|
|
|
|
cs.byte(bx) = cl;
|
|
|
|
_inc(bx);
|
|
|
|
cl = 48-1;
|
2011-06-05 14:49:56 +04:00
|
|
|
numberpoke1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 1000);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto numberpoke1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(ax, 1000);
|
|
|
|
cs.byte(bx) = cl;
|
|
|
|
_inc(bx);
|
|
|
|
cl = 48-1;
|
2011-06-05 14:49:56 +04:00
|
|
|
numberpoke2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 100);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto numberpoke2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(ax, 100);
|
|
|
|
cs.byte(bx) = cl;
|
|
|
|
_inc(bx);
|
|
|
|
cl = 48-1;
|
2011-06-05 14:49:56 +04:00
|
|
|
numberpoke3:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 10);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto numberpoke3;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(ax, 10);
|
|
|
|
cs.byte(bx) = cl;
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_money2poke;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(al, 48);
|
|
|
|
cs.byte(bx) = al;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useControl() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotcontrolwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotcontrolwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 21);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto balls;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
rightkey:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 21);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto goingdown;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 21;
|
|
|
|
data.byte(kCounttoclose) = 8;
|
|
|
|
data.byte(kCounttoopen) = 0;
|
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
goingdown:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 30;
|
|
|
|
data.byte(kCounttoclose) = 8;
|
|
|
|
data.byte(kCounttoopen) = 0;
|
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
jimmycontrols:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 50;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 51;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 26;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 30;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 17;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 10;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
axeoncontrols:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useHatch() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 40;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useWire() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotwirewith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotwirewith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
wireaxe:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
wireknife:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 51;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 52;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 11;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useHandle() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 'C';
|
|
|
|
ah = 'U';
|
|
|
|
cl = 'T';
|
|
|
|
ch = 'W';
|
2011-12-01 19:38:46 +00:00
|
|
|
findSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+58);
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto havecutwire;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 12;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
havecutwire:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 13;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 22;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useElevator1() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
selectLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useElevator3() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCounttoclose) = 20;
|
|
|
|
data.byte(kNewlocation) = 34;
|
|
|
|
data.word(kReeltowatch) = 46;
|
|
|
|
data.word(kEndwatchreel) = 63;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useElevator4() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kReeltowatch) = 0;
|
|
|
|
data.word(kEndwatchreel) = 11;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kCounttoclose) = 20;
|
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
data.byte(kNewlocation) = 24;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useElevator2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLocation), 23);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto inpoolhall;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 23;
|
|
|
|
data.byte(kCounttoclose) = 20;
|
|
|
|
data.byte(kCounttoopen) = 0;
|
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
inpoolhall:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 31;
|
|
|
|
data.byte(kCounttoclose) = 20;
|
|
|
|
data.byte(kCounttoopen) = 0;
|
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useElevator5() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 20;
|
|
|
|
data.word(kWatchingtime) = 80;
|
|
|
|
data.byte(kLiftflag) = 1;
|
|
|
|
data.byte(kCounttoclose) = 8;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useKey() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLocation), 5);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto usekey1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 30);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto usekey1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 21);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto usekey2;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 200;
|
|
|
|
al = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
usekey1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 22);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto wrongroom1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapy), 10);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto wrongroom1;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCounttoclose) = 100;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
usekey2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 11);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto wrongroom1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapy), 10);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto wrongroom1;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewlocation) = 30;
|
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
fadeScreenDown();
|
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
wrongroom1:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 200;
|
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useStereo() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLocation), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto stereook;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 400;
|
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
stereook:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 11);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto stereonotok;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 400;
|
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
stereook2:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 'C';
|
|
|
|
ah = 'D';
|
|
|
|
cl = 'P';
|
|
|
|
ch = 'L';
|
2011-12-01 19:38:46 +00:00
|
|
|
findSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkInside();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, (114));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cdinside;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
|
|
|
cx = 400;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
|
|
|
getAnyAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 255;
|
|
|
|
es.byte(bx+10) = al;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cdinside:
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 7;
|
|
|
|
cx = 400;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
stereoon:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 8;
|
|
|
|
cx = 400;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useCooker() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kCommand);
|
|
|
|
ah = data.byte(kObjecttype);
|
2011-12-01 19:38:46 +00:00
|
|
|
checkInside();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, (114));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto foodinside;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
foodinside:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useAxe() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kReallocation), 22);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinpool;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapy), 10);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto axeondoor;
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.byte(kLastweapon) = 2;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeObFromInv();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinpool:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-24 09:34:23 +04:00
|
|
|
return;
|
2011-06-21 23:50:01 +02:00
|
|
|
/*continuing to unbounded code: axeondoor from useelvdoor:19-30*/
|
2011-06-05 14:49:56 +04:00
|
|
|
axeondoor:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 15;
|
|
|
|
cx = 300;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
_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;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useElvDoor() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotdoorwith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotdoorwith:
|
2011-06-17 00:30:39 +04:00
|
|
|
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 axeondoor;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 14;
|
|
|
|
cx = 300;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
axeondoor:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 15;
|
|
|
|
cx = 300;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
_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;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::withWhat() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCommand);
|
|
|
|
ah = data.byte(kObjecttype);
|
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
di = offset_commandline;
|
2011-12-01 19:38:46 +00:00
|
|
|
copyName();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 100;
|
|
|
|
bx = 21;
|
|
|
|
dl = 200;
|
|
|
|
al = 63;
|
|
|
|
ah = 2;
|
|
|
|
printmessage2();
|
|
|
|
di = data.word(kLastxpos);
|
|
|
|
_add(di, 5);
|
|
|
|
bx = 21;
|
|
|
|
es = cs;
|
2011-08-17 23:22:49 +02:00
|
|
|
si = offset_commandline;
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 220;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = data.word(kLastxpos);
|
|
|
|
_add(di, 5);
|
|
|
|
bx = 21;
|
|
|
|
dl = 200;
|
|
|
|
al = 63;
|
|
|
|
ah = 3;
|
|
|
|
printmessage2();
|
2011-12-01 19:38:46 +00:00
|
|
|
fillRyan();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kInvopen) = 2;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::selectOb() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
findInvPos();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx);
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto canselectob;
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
canselectob:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 221);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyselob;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 221;
|
2011-06-05 14:49:56 +04:00
|
|
|
diffsub3:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kOldsubject) = ax;
|
|
|
|
bx = ax;
|
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandWithOb();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyselob:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notselob) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doselob;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doselob:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kInvopen) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
useRoutine();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findSetObject() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, es.byte(bx+12));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofind;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ah, es.byte(bx+13));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofind;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, es.byte(bx+14));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofind;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ch, es.byte(bx+15));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofind;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = dl;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nofind:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 64);
|
|
|
|
_inc(dl);
|
|
|
|
_cmp(dl, 128);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findsetloop;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = dl;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findExObject() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, es.byte(bx+12));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindex;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ah, es.byte(bx+13));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindex;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, es.byte(bx+14));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindex;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ch, es.byte(bx+15));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindex;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = dl;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nofindex:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 16);
|
|
|
|
_inc(dl);
|
|
|
|
_cmp(dl, (114));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findexloop;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = dl;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::isRyanHolding() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(es.byte(bx+2), 4);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindininv;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, es.byte(bx+12));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindininv;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ah, es.byte(bx+13));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindininv;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, es.byte(bx+14));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindininv;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ch, es.byte(bx+15));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofindininv;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = dl;
|
|
|
|
_cmp(al, (114));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nofindininv:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 16);
|
|
|
|
_inc(dl);
|
|
|
|
_cmp(dl, (114));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto searchinv;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = dl;
|
|
|
|
_cmp(al, (114));
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::checkInside() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kExtras);
|
|
|
|
bx = (0+2080+30000);
|
|
|
|
cl = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
insideloop:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, es.byte(bx+3));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfoundinside;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ah, es.byte(bx+2));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notfoundinside;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notfoundinside:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::putBackObStuff() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
obIcons();
|
|
|
|
showExit();
|
|
|
|
obPicture();
|
|
|
|
describeOb();
|
|
|
|
underTextLine();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 255;
|
2011-12-01 19:38:46 +00:00
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showPuzText() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(cx);
|
2011-12-01 19:38:46 +00:00
|
|
|
findPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
push(es);
|
|
|
|
push(si);
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
|
|
|
showPanel();
|
|
|
|
showMan();
|
|
|
|
showExit();
|
|
|
|
obIcons();
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
es = pop();
|
|
|
|
di = 36;
|
|
|
|
bx = 104;
|
|
|
|
dl = 241;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = pop();
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findPuzText() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ah = 0;
|
|
|
|
si = ax;
|
|
|
|
_add(si, si);
|
|
|
|
es = data.word(kPuzzletext);
|
|
|
|
ax = es.word(si);
|
|
|
|
_add(ax, (66*2));
|
|
|
|
si = ax;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::isSetObOnMap() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
getSetAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+58);
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
_cmp(al, 0);
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::placeFreeObject() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
|
|
|
cl = 0;
|
|
|
|
ch = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
findOrMake();
|
|
|
|
getFreeAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 0;
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::removeFreeObject() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(es);
|
|
|
|
push(bx);
|
2011-12-01 19:38:46 +00:00
|
|
|
getFreeAd();
|
2011-06-17 00:30:39 +04:00
|
|
|
es.byte(bx+2) = 255;
|
|
|
|
bx = pop();
|
|
|
|
es = pop();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::autoAppear() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLocation), 32);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinalley;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
resetLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 10;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestpos) = 10;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinalley:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 24);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinedens;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGeneraldead), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto edenspart2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kGeneraldead));
|
|
|
|
al = 44;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 18;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 93;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 92;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 55;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 75;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 84;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 85;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
edenspart2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSartaindead), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notedens2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 44;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 93;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 55;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kSartaindead));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinedens:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 25);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notonsartroof;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewsitem) = 3;
|
|
|
|
al = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
resetLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 11;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestpos) = 11;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notonsartroof:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notinlouiss) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kRockstardead), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notinlouiss) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 23;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::setupTimedUse() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.word(kTimecount), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (cantsetup) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::edensCDPlayer() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 18*2;
|
|
|
|
data.word(kReeltowatch) = 25;
|
|
|
|
data.word(kEndwatchreel) = 42;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useWall() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kManspath), 3);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gobackover;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 30*2;
|
|
|
|
data.word(kReeltowatch) = 2;
|
|
|
|
data.word(kEndwatchreel) = 31;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManspath) = 3;
|
|
|
|
data.byte(kFinaldest) = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gobackover:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 30*2;
|
|
|
|
data.word(kReeltowatch) = 34;
|
|
|
|
data.word(kEndwatchreel) = 60;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManspath) = 5;
|
|
|
|
data.byte(kFinaldest) = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useChurchGate() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gatewith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gatewith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'C';
|
|
|
|
ch = 'U';
|
|
|
|
dl = 'T';
|
|
|
|
dh = 'T';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cutgate;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cutgate:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 64*2;
|
|
|
|
data.word(kReeltowatch) = 4;
|
|
|
|
data.word(kEndwatchreel) = 70;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kAidedead), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notopenchurch) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useGun() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kObjecttype), 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto istakengun;
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
istakengun:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 22);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinpoolroom;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 34;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = 1;
|
|
|
|
data.byte(kCombatcount) = 39;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinpoolroom:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 25);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nothelicopter;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 34;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
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));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nothelicopter:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 27);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinrockroom;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 46;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
2011-06-17 00:30:39 +04:00
|
|
|
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));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinrockroom:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 8);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbystudio;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 22);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbystudio;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapy), 40);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbystudio;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 92;
|
2011-12-01 19:38:46 +00:00
|
|
|
isSetObOnMap();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbystudio;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kManspath), 9);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notbystudio;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestination) = 9;
|
|
|
|
data.byte(kFinaldest) = 9;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notbystudio:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 6);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsarters;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 11);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsarters;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapy), 20);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsarters;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
isSetObOnMap();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsarters;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestination) = 1;
|
|
|
|
data.byte(kFinaldest) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
|
|
|
ah = data.byte(kRoomnum);
|
|
|
|
_dec(ah);
|
2011-12-01 19:38:46 +00:00
|
|
|
turnAnyPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
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));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notsarters:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 29);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notaide;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
al = 13;
|
2011-12-01 19:38:46 +00:00
|
|
|
resetLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 12;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestpos) = 12;
|
|
|
|
data.byte(kDestination) = 2;
|
|
|
|
data.byte(kFinaldest) = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-17 00:30:39 +04:00
|
|
|
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));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notaide:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 23);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwithboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwithboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapy), 50);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwithboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kManspath), 5);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto pathokboss;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestination) = 5;
|
|
|
|
data.byte(kFinaldest) = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-05 14:49:56 +04:00
|
|
|
pathokboss:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwithboss:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 8);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nottvsoldier;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 11);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nottvsoldier;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapy), 10);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nottvsoldier;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kManspath), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto pathoktv;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestination) = 2;
|
|
|
|
data.byte(kFinaldest) = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-05 14:49:56 +04:00
|
|
|
pathoktv:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = 1;
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nottvsoldier:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useShield() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kReallocation), 20);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinsartroom;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCombatcount), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinsartroom;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-12-01 19:38:46 +00:00
|
|
|
removeObFromInv();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinsartroom:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useButtonA() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 95;
|
2011-12-01 19:38:46 +00:00
|
|
|
isSetObOnMap();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto donethisbit;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
|
|
|
ah = data.byte(kRoomnum);
|
|
|
|
_dec(ah);
|
2011-12-01 19:38:46 +00:00
|
|
|
turnAnyPathOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 9;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 95;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
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));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
donethisbit:
|
2011-12-01 19:38:46 +00:00
|
|
|
showSecondUse();
|
|
|
|
putBackObStuff();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::usePlate() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kWithobject), 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto platewith;
|
2011-12-01 19:38:46 +00:00
|
|
|
withWhat();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
platewith:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWithobject);
|
|
|
|
ah = data.byte(kWithtype);
|
|
|
|
cl = 'S';
|
|
|
|
ch = 'C';
|
|
|
|
dl = 'R';
|
|
|
|
dh = 'W';
|
|
|
|
compare();
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto unscrewplate;
|
2011-06-17 00:30:39 +04:00
|
|
|
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 triedknife;
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 14;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
unscrewplate:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 20;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
|
|
|
showFirstUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 28;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 24;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 25;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeFreeObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kProgresspoints));
|
|
|
|
data.byte(kGetback) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
triedknife:
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 300;
|
|
|
|
al = 54;
|
2011-12-01 19:38:46 +00:00
|
|
|
showPuzText();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useWinch() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 40;
|
|
|
|
ah = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkInside();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, (114));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nowinch;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = cl;
|
|
|
|
ah = 4;
|
|
|
|
cl = 'F';
|
|
|
|
ch = 'U';
|
|
|
|
dl = 'S';
|
|
|
|
dh = 'E';
|
|
|
|
compare();
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nowinch;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 217*2;
|
|
|
|
data.word(kReeltowatch) = 0;
|
|
|
|
data.word(kEndwatchreel) = 217;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
|
|
|
data.byte(kDestpos) = 1;
|
|
|
|
data.byte(kNewlocation) = 45;
|
|
|
|
data.byte(kDreamnumber) = 1;
|
|
|
|
data.byte(kRoomafterdream) = 44;
|
|
|
|
data.byte(kGeneraldead) = 1;
|
|
|
|
data.byte(kNewsitem) = 2;
|
|
|
|
data.byte(kGetback) = 1;
|
|
|
|
_inc(data.byte(kProgresspoints));
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nowinch:
|
2011-12-01 19:38:46 +00:00
|
|
|
showFirstUse();
|
|
|
|
putBackObStuff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::quitKey() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 222);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyqk;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 222;
|
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyqk:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notqk) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doqk;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doqk:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dumpKeypad() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = (36+112)-3;
|
|
|
|
bx = (72)-4;
|
|
|
|
cl = 120;
|
|
|
|
ch = 90;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::quitSymbol() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 222;
|
|
|
|
al = 18;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyqs:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notqs) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto doqs;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
doqs:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::setTopLeft() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kSymboltopdir), 0);
|
|
|
|
if (!flags.z())
|
|
|
|
{ blank(); return; };
|
|
|
|
_cmp(data.byte(kCommandtype), 210);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadytopl;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 210;
|
|
|
|
al = 19;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadytopl:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notopleft) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopdir) = -1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::setTopRight() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kSymboltopdir), 0);
|
|
|
|
if (!flags.z())
|
|
|
|
{ blank(); return; };
|
|
|
|
_cmp(data.byte(kCommandtype), 211);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadytopr;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 211;
|
|
|
|
al = 20;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadytopr:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notopright) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopdir) = 1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::setBotLeft() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kSymbolbotdir), 0);
|
|
|
|
if (!flags.z())
|
|
|
|
{ blank(); return; };
|
|
|
|
_cmp(data.byte(kCommandtype), 212);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadybotl;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 212;
|
|
|
|
al = 21;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadybotl:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nobotleft) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotdir) = -1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::setBotRight() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kSymbolbotdir), 0);
|
|
|
|
if (!flags.z())
|
|
|
|
{ blank(); return; };
|
|
|
|
_cmp(data.byte(kCommandtype), 213);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadybotr;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 213;
|
|
|
|
al = 22;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadybotr:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nobotright) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotdir) = 1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dumpSymbol() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kNewtextline) = 0;
|
|
|
|
di = (64);
|
|
|
|
bx = (56)+20;
|
|
|
|
cl = 104;
|
|
|
|
ch = 60;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::updateSymbolTop() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kSymboltopdir), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (topfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSymboltopdir), -1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto backwards;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kSymboltopx));
|
|
|
|
_cmp(data.byte(kSymboltopx), 49);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwrapfor;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopx) = 0;
|
|
|
|
_dec(data.byte(kSymboltopnum));
|
|
|
|
_cmp(data.byte(kSymboltopnum), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (topfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopnum) = 5;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwrapfor:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSymboltopx), 24);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (topfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopdir) = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
backwards:
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kSymboltopx));
|
|
|
|
_cmp(data.byte(kSymboltopx), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwrapback;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopx) = 48;
|
|
|
|
_inc(data.byte(kSymboltopnum));
|
|
|
|
_cmp(data.byte(kSymboltopnum), 6);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (topfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopnum) = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwrapback:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSymboltopx), 24);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (topfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopdir) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::updateSymbolBot() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kSymbolbotdir), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (botfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSymbolbotdir), -1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto backwardsbot;
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.byte(kSymbolbotx));
|
|
|
|
_cmp(data.byte(kSymbolbotx), 49);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwrapforb;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotx) = 0;
|
|
|
|
_dec(data.byte(kSymbolbotnum));
|
|
|
|
_cmp(data.byte(kSymbolbotnum), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (botfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotnum) = 5;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwrapforb:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSymbolbotx), 24);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (botfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotdir) = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
backwardsbot:
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kSymbolbotx));
|
|
|
|
_cmp(data.byte(kSymbolbotx), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwrapbackb;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotx) = 48;
|
|
|
|
_inc(data.byte(kSymbolbotnum));
|
|
|
|
_cmp(data.byte(kSymbolbotnum), 6);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (botfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotnum) = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwrapbackb:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSymbolbotx), 24);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (botfinished) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymbolbotdir) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dumpSymBox() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.word(kDumpx), -1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nodumpsym) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = data.word(kDumpx);
|
|
|
|
bx = data.word(kDumpy);
|
|
|
|
cl = 30;
|
|
|
|
ch = 77;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kDumpx) = -1;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::useDiary() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfReels();
|
2011-12-04 23:43:32 +01:00
|
|
|
dx = 1009;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadIntoTemp();
|
2011-12-04 23:43:32 +01:00
|
|
|
dx = 1022;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadTempText();
|
2011-12-04 23:43:32 +01:00
|
|
|
dx = 983;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadTempCharset();
|
|
|
|
createPanel();
|
|
|
|
showIcon();
|
|
|
|
showDiary();
|
|
|
|
underTextLine();
|
|
|
|
showDiaryPage();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
diaryloop:
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
readMouse();
|
|
|
|
showDiaryKeys();
|
|
|
|
showPointer();
|
|
|
|
vSync();
|
|
|
|
dumpPointer();
|
|
|
|
dumpDiaryKeys();
|
|
|
|
dumpTextLine();
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_diarylist;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkCoords();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGetback), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto diaryloop;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfTemp();
|
|
|
|
getRidOfTempText();
|
|
|
|
getRidOfTempCharset();
|
|
|
|
restoreReels();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManisoffscreen) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
redrawMainScrn();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showDiary() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 1;
|
|
|
|
ah = 0;
|
|
|
|
di = (68+24);
|
|
|
|
bx = (48+12)+37;
|
|
|
|
ds = data.word(kTempgraphics);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
|
|
|
ah = 0;
|
|
|
|
di = (68+24)+176;
|
|
|
|
bx = (48+12)+108;
|
|
|
|
ds = data.word(kTempgraphics);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showDiaryKeys() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kPresscount), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nokeyatall) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kPresscount));
|
|
|
|
_cmp(data.byte(kPresscount), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nokeyatall) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPressed), 'N');
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nokeyn;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 3;
|
|
|
|
_cmp(data.byte(kPresscount), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotkeyn;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotkeyn:
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = 0;
|
|
|
|
di = (68+24)+94;
|
|
|
|
bx = (48+12)+97;
|
|
|
|
ds = data.word(kTempgraphics);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPresscount), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notshown) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
showDiaryPage();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nokeyn:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
|
|
|
_cmp(data.byte(kPresscount), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotkeyp;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotkeyp:
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = 0;
|
|
|
|
di = (68+24)+151;
|
|
|
|
bx = (48+12)+71;
|
|
|
|
ds = data.word(kTempgraphics);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPresscount), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notshowp) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
showDiaryPage();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dumpDiaryKeys() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kPresscount), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdumpdiary;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSartaindead), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsartadd;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kDiarypage), 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsartadd;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kDiarypage), 5);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsartadd;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
getLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsartadd;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
setLocation();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 12;
|
2011-12-01 19:38:46 +00:00
|
|
|
findText1();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = 70;
|
|
|
|
bx = 106;
|
|
|
|
dl = 241;
|
|
|
|
ah = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
cx = 200;
|
2011-12-01 19:38:46 +00:00
|
|
|
hangOnP();
|
|
|
|
createPanel();
|
|
|
|
showIcon();
|
|
|
|
showDiary();
|
|
|
|
showDiaryPage();
|
|
|
|
workToScreenM();
|
|
|
|
showPointer();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notsartadd:
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (68+24)+48;
|
|
|
|
bx = (48+12)+15;
|
|
|
|
cl = 200;
|
|
|
|
ch = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-05 14:49:56 +04:00
|
|
|
notdumpdiary:
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (68+24)+94;
|
|
|
|
bx = (48+12)+97;
|
|
|
|
cl = 16;
|
|
|
|
ch = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (68+24)+151;
|
|
|
|
bx = (48+12)+71;
|
|
|
|
cl = 16;
|
|
|
|
ch = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::diaryKeyP() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 214);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadykeyp;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 214;
|
|
|
|
al = 23;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadykeyp:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyp) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kOldbutton);
|
|
|
|
_cmp(ax, data.word(kMousebutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyp) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPresscount), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyp) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPresscount) = 12;
|
|
|
|
data.byte(kPressed) = 'P';
|
|
|
|
_dec(data.byte(kDiarypage));
|
|
|
|
_cmp(data.byte(kDiarypage), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyp) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDiarypage) = 11;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::diaryKeyN() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 213);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadykeyn;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 213;
|
|
|
|
al = 23;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadykeyn:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyn) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kOldbutton);
|
|
|
|
_cmp(ax, data.word(kMousebutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyn) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPresscount), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyn) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
playChannel1();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPresscount) = 12;
|
|
|
|
data.byte(kPressed) = 'N';
|
|
|
|
_inc(data.byte(kDiarypage));
|
|
|
|
_cmp(data.byte(kDiarypage), 12);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notkeyn) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDiarypage) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showDiaryPage() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
|
|
|
di = (68+24);
|
|
|
|
bx = (48+12);
|
|
|
|
ds = data.word(kTempgraphics);
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kDiarypage);
|
2011-12-01 19:38:46 +00:00
|
|
|
findText1();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kKerning) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
useTempCharset();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (68+24)+48;
|
|
|
|
bx = (48+12)+16;
|
|
|
|
dl = 240;
|
|
|
|
ah = 16;
|
|
|
|
data.word(kCharshift) = 91+91;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (68+24)+129;
|
|
|
|
bx = (48+12)+16;
|
|
|
|
dl = 240;
|
|
|
|
ah = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (68+24)+48;
|
|
|
|
bx = (48+12)+23;
|
|
|
|
dl = 240;
|
|
|
|
ah = 16;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kKerning) = 0;
|
|
|
|
data.word(kCharshift) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
useCharset1();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findText1() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ah = 0;
|
|
|
|
si = ax;
|
|
|
|
_add(si, si);
|
|
|
|
es = data.word(kTextfile1);
|
|
|
|
ax = es.word(si);
|
|
|
|
_add(ax, (66*2));
|
|
|
|
si = ax;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::doSaveLoad() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kPointerframe) = 0;
|
|
|
|
data.word(kTextaddressx) = 70;
|
|
|
|
data.word(kTextaddressy) = 182-8;
|
|
|
|
data.byte(kTextlen) = 181;
|
|
|
|
data.byte(kManisoffscreen) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearWork();
|
|
|
|
createPanel2();
|
|
|
|
underTextLine();
|
|
|
|
getRidOfAll();
|
|
|
|
loadSaveBox();
|
|
|
|
showOpBox();
|
|
|
|
showMainOps();
|
|
|
|
workToScreen();
|
2011-06-05 14:49:56 +04:00
|
|
|
goto donefirstops;
|
|
|
|
restartops:
|
2011-12-01 19:38:46 +00:00
|
|
|
showOpBox();
|
|
|
|
showMainOps();
|
|
|
|
workToScreenM();
|
2011-06-05 14:49:56 +04:00
|
|
|
donefirstops:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
waitops:
|
2011-06-19 15:49:49 +04:00
|
|
|
_cmp(data.byte(kQuitrequested), 0);
|
|
|
|
if (!flags.z())
|
|
|
|
goto justret;
|
2011-12-01 19:38:46 +00:00
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
vSync();
|
|
|
|
dumpPointer();
|
|
|
|
dumpTextLine();
|
|
|
|
delPointer();
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_opslist;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkCoords();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGetback), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto waitops;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGetback), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto restartops;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfTemp();
|
|
|
|
restoreAll();
|
|
|
|
redrawMainScrn();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 200;
|
2011-06-05 14:49:56 +04:00
|
|
|
justret:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManisoffscreen) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getBackFromOps() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kMandead), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto opsblock1;
|
2011-12-01 19:38:46 +00:00
|
|
|
getBack1();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
opsblock1:
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getBackToOps() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 201);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadygetops;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 201;
|
|
|
|
al = 42;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadygetops:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nogetbackops) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dogetbackops;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dogetbackops:
|
2011-12-01 19:38:46 +00:00
|
|
|
oldToNames();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 2;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::discOps() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 249);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadydiscops;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 249;
|
|
|
|
al = 43;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadydiscops:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nodiscops) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto dodiscops;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
dodiscops:
|
2011-12-01 19:38:46 +00:00
|
|
|
scanForNames();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLoadingorsave) = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
showOpBox();
|
|
|
|
showDiscOps();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCurrentslot) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
discopsloop:
|
2011-06-19 15:49:49 +04:00
|
|
|
_cmp(data.byte(kQuitrequested), 0);
|
|
|
|
if (!flags.z())
|
|
|
|
return /* (quitdiscops) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
vSync();
|
|
|
|
dumpPointer();
|
|
|
|
dumpTextLine();
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_discopslist;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkCoords();
|
2011-06-17 00:30:39 +04:00
|
|
|
_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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::selectSlot2() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.word(kMousebutton), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noselslot2;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLoadingorsave) = 2;
|
2011-06-05 14:49:56 +04:00
|
|
|
noselslot2:
|
2011-12-01 19:38:46 +00:00
|
|
|
selectSlot();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::checkInput() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLoadingorsave), 3);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nokeypress) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
readKey();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kCurrentkey);
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nokeypress) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 13);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notret;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLoadingorsave) = 3;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto afterkey;
|
|
|
|
notret:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 8);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nodel2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCursorpos), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nokeypress) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
getNamePos();
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kCursorpos));
|
|
|
|
es.byte(bx) = 0;
|
|
|
|
es.byte(bx+1) = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto afterkey;
|
|
|
|
nodel2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCursorpos), 14);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nokeypress) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
getNamePos();
|
2011-06-17 00:30:39 +04:00
|
|
|
_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;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
afterkey:
|
2011-12-01 19:38:46 +00:00
|
|
|
showOpBox();
|
|
|
|
showNames();
|
|
|
|
showSlots();
|
|
|
|
showSaveOps();
|
|
|
|
workToScreenM();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getNamePos() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kCurrentslot);
|
|
|
|
ah = 0;
|
|
|
|
cx = 17;
|
|
|
|
_mul(cx);
|
|
|
|
dx = data;
|
|
|
|
es = dx;
|
2011-12-05 17:39:42 +00:00
|
|
|
bx = 1904;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, ax);
|
|
|
|
al = data.byte(kCursorpos);
|
|
|
|
ah = 0;
|
|
|
|
_add(bx, ax);
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showOpBox() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
di = (60);
|
|
|
|
bx = (52);
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
di = (60);
|
|
|
|
bx = (52)+55;
|
|
|
|
al = 4;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showLoadOps() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
di = (60)+128+4;
|
|
|
|
bx = (52)+12;
|
|
|
|
al = 1;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
di = (60)+176+2;
|
|
|
|
bx = (52)+60-4;
|
|
|
|
al = 5;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (60)+104;
|
|
|
|
bx = (52)+14;
|
|
|
|
al = 55;
|
|
|
|
dl = 101;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showSaveOps() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
di = (60)+128+4;
|
|
|
|
bx = (52)+12;
|
|
|
|
al = 1;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
di = (60)+176+2;
|
|
|
|
bx = (52)+60-4;
|
|
|
|
al = 5;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (60)+104;
|
|
|
|
bx = (52)+14;
|
|
|
|
al = 54;
|
|
|
|
dl = 101;
|
2011-12-01 19:38:46 +00:00
|
|
|
printMessage();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::selectSlot() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 244);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadysel;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 244;
|
|
|
|
al = 45;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadysel:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noselslot) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noselslot) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLoadingorsave), 3);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notnocurs;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kLoadingorsave));
|
2011-06-05 14:49:56 +04:00
|
|
|
notnocurs:
|
2011-12-01 19:38:46 +00:00
|
|
|
oldToNames();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousey);
|
|
|
|
_sub(ax, (52)+4);
|
|
|
|
cl = -1;
|
2011-06-05 14:49:56 +04:00
|
|
|
getslotnum:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 11);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto getslotnum;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCurrentslot) = cl;
|
2011-12-01 19:38:46 +00:00
|
|
|
delPointer();
|
|
|
|
showOpBox();
|
|
|
|
showSlots();
|
|
|
|
showNames();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLoadingorsave), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isloadmode;
|
2011-12-01 19:38:46 +00:00
|
|
|
showSaveOps();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isloadmode:
|
2011-12-01 19:38:46 +00:00
|
|
|
showLoadOps();
|
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
workToScreen();
|
|
|
|
delPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showSlots() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = (60)+7;
|
|
|
|
bx = (52)+8;
|
|
|
|
al = 2;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (60)+10;
|
|
|
|
bx = (52)+11;
|
|
|
|
cl = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
slotloop:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(cx);
|
|
|
|
push(di);
|
|
|
|
push(bx);
|
|
|
|
_cmp(cl, data.byte(kCurrentslot));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nomatchslot;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 3;
|
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-05 14:49:56 +04:00
|
|
|
nomatchslot:
|
2011-06-17 00:30:39 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showNames() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
dx = data;
|
|
|
|
es = dx;
|
2011-12-05 17:39:42 +00:00
|
|
|
si = 1904+1;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (60)+21;
|
|
|
|
bx = (52)+10;
|
|
|
|
cl = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
shownameloop:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLoadingorsave), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto loadmode;
|
2011-06-17 00:30:39 +04:00
|
|
|
dx = si;
|
|
|
|
cx = 15;
|
|
|
|
_add(si, 15);
|
2011-06-05 14:49:56 +04:00
|
|
|
zerostill:
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCursorpos) = cl;
|
|
|
|
es.byte(si) = '/';
|
|
|
|
es.byte(si+1) = 0;
|
|
|
|
push(si);
|
|
|
|
si = dx;
|
|
|
|
dl = 200;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
si = pop();
|
|
|
|
es.byte(si) = 0;
|
|
|
|
es.byte(si+1) = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto afterprintname;
|
|
|
|
loadmode:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
|
|
|
dl = 200;
|
|
|
|
ah = 0;
|
|
|
|
data.word(kCharshift) = 91;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kCharshift) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto afterprintname;
|
|
|
|
nomatchslot2:
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 200;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-05 14:49:56 +04:00
|
|
|
afterprintname:
|
2011-06-17 00:30:39 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2011-06-17 00:30:39 +04:00
|
|
|
void DreamGenContext::decide() {
|
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
setMode();
|
|
|
|
loadPalFromIFF();
|
|
|
|
clearPalette();
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
loadSaveBox();
|
|
|
|
showDecisions();
|
|
|
|
workToScreen();
|
|
|
|
fadeScreenUp();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 0;
|
2011-06-05 14:49:56 +04:00
|
|
|
waitdecide:
|
2011-06-19 15:49:49 +04:00
|
|
|
_cmp(data.byte(kQuitrequested), 0);
|
|
|
|
if (flags.z())
|
|
|
|
goto _tmp1;
|
|
|
|
return;
|
|
|
|
_tmp1:
|
2011-12-01 19:38:46 +00:00
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
vSync();
|
|
|
|
dumpPointer();
|
|
|
|
dumpTextLine();
|
|
|
|
delPointer();
|
2011-08-17 23:22:49 +02:00
|
|
|
bx = offset_decidelist;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkCoords();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGetback), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto waitdecide;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kGetback), 4);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto hasloadedroom;
|
2011-12-01 19:38:46 +00:00
|
|
|
getRidOfTemp();
|
2011-06-05 14:49:56 +04:00
|
|
|
hasloadedroom:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kTextaddressx) = 13;
|
|
|
|
data.word(kTextaddressy) = 182;
|
|
|
|
data.byte(kTextlen) = 240;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::showDecisions() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel2();
|
|
|
|
showOpBox();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempgraphics);
|
|
|
|
di = (60)+17;
|
|
|
|
bx = (52)+13;
|
|
|
|
al = 6;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
|
|
|
underTextLine();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::newGame() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 251);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadynewgame;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 251;
|
|
|
|
al = 47;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadynewgame:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nonewgame) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kGetback) = 3;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::createName() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
push(ax);
|
2011-08-17 23:22:49 +02:00
|
|
|
di = offset_speechfile;
|
2011-06-17 00:30:39 +04:00
|
|
|
cs.byte(di+0) = dl;
|
|
|
|
cs.byte(di+3) = cl;
|
|
|
|
al = dh;
|
|
|
|
ah = '0'-1;
|
2011-06-05 14:49:56 +04:00
|
|
|
findten:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(ah);
|
|
|
|
_sub(al, 10);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto findten;
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 1000);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto thousandsc;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(ax, 1000);
|
|
|
|
cs.byte(di+4) = cl;
|
|
|
|
cl = '0'-1;
|
2011-06-05 14:49:56 +04:00
|
|
|
hundredsc:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 100);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto hundredsc;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(ax, 100);
|
|
|
|
cs.byte(di+5) = cl;
|
|
|
|
cl = '0'-1;
|
2011-06-05 14:49:56 +04:00
|
|
|
tensc:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(cl);
|
|
|
|
_sub(ax, 10);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto tensc;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(ax, 10);
|
|
|
|
cs.byte(di+6) = cl;
|
|
|
|
_add(al, '0');
|
|
|
|
cs.byte(di+7) = al;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::volumeAdjust() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
al = data.byte(kVolumedirection);
|
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (volok) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kVolume);
|
|
|
|
_cmp(al, data.byte(kVolumeto));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto volfinish;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(data.byte(kVolumecount), 64);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (volok) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kVolume);
|
|
|
|
_add(al, data.byte(kVolumedirection));
|
|
|
|
data.byte(kVolume) = al;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
volfinish:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kVolumedirection) = 0;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::entryTexts() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLocation), 21);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notloc15;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 28;
|
|
|
|
cx = 60;
|
|
|
|
dx = 11;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notloc15:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 30);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notloc43;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 27;
|
|
|
|
cx = 60;
|
|
|
|
dx = 11;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notloc43:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 23);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notloc23;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 29;
|
|
|
|
cx = 60;
|
|
|
|
dx = 11;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notloc23:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 31);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notloc44;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 30;
|
|
|
|
cx = 60;
|
|
|
|
dx = 11;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notloc44:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 20);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsarters2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 31;
|
|
|
|
cx = 60;
|
|
|
|
dx = 11;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notsarters2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 24);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notedenlob;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 32;
|
|
|
|
cx = 60;
|
|
|
|
dx = 3;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notedenlob:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 34);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noteden2) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 33;
|
|
|
|
cx = 60;
|
|
|
|
dx = 3;
|
|
|
|
bl = 68;
|
|
|
|
bh = 64;
|
2011-12-01 19:38:46 +00:00
|
|
|
setupTimedUse();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::entryAnims() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 76*2;
|
|
|
|
data.word(kReeltowatch) = 0;
|
|
|
|
data.word(kEndwatchreel) = 76;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinthebeach:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 44);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notsparkys;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
resetLocation();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 50*2;
|
|
|
|
data.word(kReeltowatch) = 247;
|
|
|
|
data.word(kEndwatchreel) = 297;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notsparkys:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 22);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notinthelift;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 31*2;
|
|
|
|
data.word(kReeltowatch) = 0;
|
|
|
|
data.word(kEndwatchreel) = 30;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notinthelift:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 26);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notunderchurch;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kSymboltopnum) = 2;
|
|
|
|
data.byte(kSymbolbotnum) = 1;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notunderchurch:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 45);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notenterdream;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kKeeperflag) = 0;
|
|
|
|
data.word(kWatchingtime) = 296;
|
|
|
|
data.word(kReeltowatch) = 45;
|
|
|
|
data.word(kEndwatchreel) = 198;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notenterdream:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kReallocation), 46);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notcrystal;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kSartaindead), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notcrystal;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeFreeObject();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notcrystal:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 9);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nottopchurch;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkIfPathIsOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nottopchurch;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kAidedead), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nottopchurch;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkIfPathIsOn();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto makedoorsopen;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
turnPathOn();
|
2011-06-05 14:49:56 +04:00
|
|
|
makedoorsopen:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
removeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nottopchurch:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 47);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notdreamcentre;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
placeSetObject();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notdreamcentre:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 38);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notcarpark;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 57*2;
|
|
|
|
data.word(kReeltowatch) = 4;
|
|
|
|
data.word(kEndwatchreel) = 57;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notcarpark:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 32);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notalley;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kWatchingtime) = 66*2;
|
|
|
|
data.word(kReeltowatch) = 0;
|
|
|
|
data.word(kEndwatchreel) = 66;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notalley:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kLocation), 24);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notedensagain) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 2;
|
|
|
|
ah = data.byte(kRoomnum);
|
|
|
|
_dec(ah);
|
2011-12-01 19:38:46 +00:00
|
|
|
turnAnyPathOn();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::initialInv() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kReallocation), 24);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto isedens;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
isedens:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 11;
|
|
|
|
ah = 5;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 12;
|
|
|
|
ah = 6;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 13;
|
|
|
|
ah = 7;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 14;
|
|
|
|
ah = 8;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 18;
|
|
|
|
al = 18;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 19;
|
|
|
|
ah = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 20;
|
|
|
|
ah = 9;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 16;
|
|
|
|
ah = 2;
|
2011-12-01 19:38:46 +00:00
|
|
|
pickupOb();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kWatchmode) = 1;
|
|
|
|
data.word(kReeltohold) = 0;
|
|
|
|
data.word(kEndofholdreel) = 6;
|
|
|
|
data.byte(kWatchspeed) = 1;
|
|
|
|
data.byte(kSpeedcount) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
switchRyanOff();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::pickupOb() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
data.byte(kLastinvpos) = ah;
|
|
|
|
data.byte(kObjecttype) = 2;
|
|
|
|
data.byte(kItemframe) = al;
|
|
|
|
data.byte(kCommand) = al;
|
2011-12-01 19:38:46 +00:00
|
|
|
getAnyAd();
|
|
|
|
transferToEx();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::clearBuffers() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kBuffers);
|
2011-12-04 18:44:58 +01:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = 0;
|
|
|
|
di = 0;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kExtras);
|
|
|
|
cx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/2;
|
|
|
|
ax = 0x0ffff;
|
|
|
|
di = 0;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
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));
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = cs;
|
2011-12-04 18:44:58 +01:00
|
|
|
si = 526;
|
|
|
|
cx = (983-526);
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kBuffers);
|
2011-12-04 18:44:58 +01:00
|
|
|
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);
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = cs;
|
|
|
|
si = 0;
|
|
|
|
cx = (68-0);
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-12-01 19:38:46 +00:00
|
|
|
clearChanges();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::clearChanges() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kBuffers);
|
|
|
|
cx = (250)*2;
|
|
|
|
ax = 0x0ffff;
|
2011-06-25 17:28:51 +04:00
|
|
|
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));
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
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));
|
2011-06-17 00:30:39 +04:00
|
|
|
es = cs;
|
2011-12-04 18:44:58 +01:00
|
|
|
di = 526;
|
|
|
|
cx = (983-526);
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kBuffers);
|
2011-12-04 18:44:58 +01:00
|
|
|
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);
|
2011-06-17 00:30:39 +04:00
|
|
|
es = cs;
|
|
|
|
di = 0;
|
|
|
|
cx = (68-0);
|
2011-06-17 21:15:06 +04:00
|
|
|
_movsb(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
es = cs;
|
2011-12-05 17:39:42 +00:00
|
|
|
di = 1736;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 1;
|
|
|
|
_stosb(2);
|
|
|
|
al = 0;
|
|
|
|
_stosb();
|
|
|
|
al = 1;
|
|
|
|
_stosb();
|
|
|
|
ax = 0;
|
|
|
|
cx = 6;
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::clearBeforeLoad() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kRoomloaded), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (noclear) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearReels();
|
|
|
|
clearRest();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kRoomloaded) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::clearReels() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kReel1);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kReel2);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kReel3);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::clearRest() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
es = data.word(kMapdata);
|
|
|
|
cx = (66*60)/2;
|
|
|
|
ax = 0;
|
|
|
|
di = (0);
|
2011-06-17 21:15:06 +04:00
|
|
|
_stosw(cx, true);
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kBackdrop);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kSetframes);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kReels);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kPeople);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kSetdesc);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kBlockdesc);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kRoomdesc);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kFreeframes);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kFreedesc);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::watchReel() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.word(kReeltowatch), -1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notplayingreel;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kManspath);
|
|
|
|
_cmp(al, data.byte(kFinaldest));
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (waitstopwalk) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kTurntoface);
|
|
|
|
_cmp(al, data.byte(kFacing));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwatchpath;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwatchpath:
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kSpeedcount));
|
|
|
|
_cmp(data.byte(kSpeedcount), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto showwatchreel;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kWatchingtime), 0);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto showwatchreel;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kReeltowatch) = -1;
|
|
|
|
data.byte(kWatchmode) = -1;
|
|
|
|
_cmp(data.word(kReeltohold), -1);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (nomorereel) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kWatchmode) = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto notplayingreel;
|
|
|
|
ismorereel:
|
2011-06-17 00:30:39 +04:00
|
|
|
_inc(data.word(kReeltowatch));
|
2011-06-05 14:49:56 +04:00
|
|
|
showwatchreel:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kReeltowatch);
|
|
|
|
data.word(kReelpointer) = ax;
|
2011-12-01 19:38:46 +00:00
|
|
|
plotReel();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kReelpointer);
|
|
|
|
data.word(kReeltowatch) = ax;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkForShake();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notplayingreel:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kWatchmode), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notholdingreel;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kReeltohold);
|
|
|
|
data.word(kReelpointer) = ax;
|
2011-12-01 19:38:46 +00:00
|
|
|
plotReel();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notholdingreel:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kWatchmode), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notreleasehold) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_dec(data.byte(kSpeedcount));
|
|
|
|
_cmp(data.byte(kSpeedcount), -1);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notlastspeed2;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kWatchspeed);
|
|
|
|
data.byte(kSpeedcount) = al;
|
|
|
|
_inc(data.word(kReeltohold));
|
2011-06-05 14:49:56 +04:00
|
|
|
notlastspeed2:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kReeltohold);
|
|
|
|
_cmp(ax, data.word(kEndofholdreel));
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto ismorereel2;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kReeltohold) = -1;
|
|
|
|
data.byte(kWatchmode) = -1;
|
|
|
|
al = data.byte(kDestafterhold);
|
|
|
|
data.byte(kDestination) = al;
|
|
|
|
data.byte(kFinaldest) = al;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
ismorereel2:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kReeltohold);
|
|
|
|
data.word(kReelpointer) = ax;
|
2011-12-01 19:38:46 +00:00
|
|
|
plotReel();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::checkForShake() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kReallocation), 26);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notstartshake) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ax, 104);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notstartshake) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kShakecounter) = -1;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::madmanRun() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLocation), 14);
|
|
|
|
if (!flags.z())
|
2011-12-01 19:38:46 +00:00
|
|
|
{ identifyOb(); return; };
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 22);
|
|
|
|
if (!flags.z())
|
2011-12-01 19:38:46 +00:00
|
|
|
{ identifyOb(); return; };
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kPointermode), 2);
|
|
|
|
if (!flags.z())
|
2011-12-01 19:38:46 +00:00
|
|
|
{ identifyOb(); return; };
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMadmanflag), 0);
|
|
|
|
if (!flags.z())
|
2011-12-01 19:38:46 +00:00
|
|
|
{ identifyOb(); return; };
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 211);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadyrun;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 211;
|
|
|
|
al = 52;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadyrun:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.word(kMousebutton), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (norun) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousebutton);
|
|
|
|
_cmp(ax, data.word(kOldbutton));
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (norun) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kLastweapon) = 8;
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::identifyOb() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notover1:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
notover2:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kInmaparea) = 1;
|
|
|
|
ah = bl;
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
findPathOfPoint();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointerspath) = dl;
|
|
|
|
ax = pop();
|
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
findFirstPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kPointerfirstpath) = al;
|
|
|
|
ax = pop();
|
2011-12-01 19:38:46 +00:00
|
|
|
checkIfEx();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (finishidentify) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkIfFree();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (finishidentify) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkIfPerson();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (finishidentify) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkIfSet();
|
2011-06-17 00:30:39 +04:00
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (finishidentify) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = data.word(kMousex);
|
|
|
|
_sub(ax, data.word(kMapadx));
|
|
|
|
cl = al;
|
|
|
|
ax = data.word(kMousey);
|
|
|
|
_sub(ax, data.word(kMapady));
|
|
|
|
ch = al;
|
2011-12-01 19:38:46 +00:00
|
|
|
checkOne();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(al, 0);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nothingund;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMandead), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nothingund;
|
2011-06-17 00:30:39 +04:00
|
|
|
ah = 3;
|
2011-12-01 19:38:46 +00:00
|
|
|
obName();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
nothingund:
|
2011-06-17 00:30:39 +04:00
|
|
|
blank();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findPathOfPoint() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+6);
|
|
|
|
_cmp(al, 255);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto flunkedit;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+2);
|
|
|
|
_cmp(ax, 0x0ffff);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto flunkedit;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, al);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto flunkedit;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ch, ah);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto flunkedit;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+4);
|
|
|
|
_cmp(cl, al);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto flunkedit;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ch, ah);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto flunkedit;
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (gotvalidpath) */;
|
2011-06-05 14:49:56 +04:00
|
|
|
flunkedit:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 8);
|
|
|
|
_inc(dl);
|
|
|
|
_cmp(dl, 12);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto pathloop;
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 255;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::findFirstPath() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+2);
|
|
|
|
_cmp(ax, 0x0ffff);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofirst;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(cl, al);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofirst;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(ch, ah);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofirst;
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = es.word(bx+4);
|
|
|
|
_cmp(cl, al);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto nofirst;
|
2011-06-17 00:30:39 +04:00
|
|
|
_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:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(bx, 8);
|
|
|
|
_inc(dl);
|
|
|
|
_cmp(dl, 12);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto fpathloop;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = 0;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
gotfirst:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = es.byte(bx+6);
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::afterNewRoom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kNowinnewroom), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notnew) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kTimecount) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
createPanel();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
findRoomInLoc();
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kRyanon), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto ryansoff;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kRyanx);
|
|
|
|
_add(al, 12);
|
|
|
|
ah = data.byte(kRyany);
|
|
|
|
_add(ah, 12);
|
2011-12-01 19:38:46 +00:00
|
|
|
findPathOfPoint();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kManspath) = dl;
|
2011-12-01 19:38:46 +00:00
|
|
|
findXYFromPath();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kResetmanxy) = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
ryansoff:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewobs) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
drawFloor();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.word(kLookcounter) = 160;
|
|
|
|
data.byte(kNowinnewroom) = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showIcon();
|
|
|
|
spriteUpdate();
|
|
|
|
printSprites();
|
|
|
|
underTextLine();
|
|
|
|
reelsOnScreen();
|
|
|
|
mainScreen();
|
|
|
|
getUnderZoom();
|
2011-06-17 00:30:39 +04:00
|
|
|
zoom();
|
2011-12-01 19:38:46 +00:00
|
|
|
workToScreenM();
|
|
|
|
walkIntoRoom();
|
2011-06-17 00:30:39 +04:00
|
|
|
reminders();
|
|
|
|
atmospheres();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::walkIntoRoom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLocation), 14);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notlair) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kMapx), 22);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notlair) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestination) = 1;
|
|
|
|
data.byte(kFinaldest) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-05 13:38:05 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::afterIntroRoom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kNowinnewroom), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notnewintro) */;
|
2011-12-01 19:38:46 +00:00
|
|
|
clearWork();
|
|
|
|
findRoomInLoc();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNewobs) = 1;
|
2011-12-01 19:38:46 +00:00
|
|
|
drawFloor();
|
|
|
|
reelsOnScreen();
|
|
|
|
spriteUpdate();
|
|
|
|
printSprites();
|
|
|
|
workToScreen();
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kNowinnewroom) = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
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:
|
2011-06-17 00:30:39 +04:00
|
|
|
push(ax);
|
2011-12-01 19:38:46 +00:00
|
|
|
findNextColon();
|
2011-06-17 00:30:39 +04:00
|
|
|
ax = pop();
|
|
|
|
_dec(ah);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto searchmess;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = pop();
|
|
|
|
bx = pop();
|
|
|
|
dx = pop();
|
|
|
|
al = 0;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
printDirect();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::setWalk() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kLinepointer), 254);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto alreadywalking;
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kPointerspath);
|
|
|
|
_cmp(al, data.byte(kManspath));
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto cantwalk2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kWatchmode), 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto holdingreel;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kWatchmode), 2);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (cantwalk) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestination) = al;
|
|
|
|
data.byte(kFinaldest) = al;
|
|
|
|
_cmp(data.word(kMousebutton), 2);
|
|
|
|
if (!flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwalkandexam;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(data.byte(kCommandtype), 3);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto notwalkandexam;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kWalkandexam) = 1;
|
|
|
|
al = data.byte(kCommandtype);
|
|
|
|
data.byte(kWalkexamtype) = al;
|
|
|
|
al = data.byte(kCommand);
|
|
|
|
data.byte(kWalkexamnum) = al;
|
2011-06-05 14:49:56 +04:00
|
|
|
notwalkandexam:
|
2011-12-01 19:38:46 +00:00
|
|
|
autoSetWalk();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
cantwalk2:
|
2011-12-01 19:38:46 +00:00
|
|
|
faceRightWay();
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
alreadywalking:
|
2011-06-17 00:30:39 +04:00
|
|
|
al = data.byte(kPointerspath);
|
|
|
|
data.byte(kFinaldest) = al;
|
2011-06-15 22:02:18 +04:00
|
|
|
return;
|
2011-06-05 14:49:56 +04:00
|
|
|
holdingreel:
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kDestafterhold) = al;
|
|
|
|
data.byte(kWatchmode) = 2;
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::workoutFrames() {
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_neg(bx);
|
2011-06-05 14:49:56 +04:00
|
|
|
notneg1:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_neg(cx);
|
2011-06-05 14:49:56 +04:00
|
|
|
notneg2:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(bx, cx);
|
|
|
|
if (!flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto tendstohoriz;
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 2;
|
|
|
|
ax = cx;
|
|
|
|
_shr(ax, 1);
|
|
|
|
_cmp(bx, ax);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotquad;
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto gotquad;
|
|
|
|
tendstohoriz:
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 0;
|
|
|
|
ax = bx;
|
|
|
|
_shr(ax, 1);
|
|
|
|
_cmp(cx, ax);
|
|
|
|
if (flags.c())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto gotquad;
|
2011-06-17 00:30:39 +04:00
|
|
|
dl = 1;
|
2011-06-05 14:49:56 +04:00
|
|
|
goto gotquad;
|
|
|
|
gotquad:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(dl, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noswap1;
|
2011-06-17 00:30:39 +04:00
|
|
|
_xor(dl, 2);
|
2011-06-05 14:49:56 +04:00
|
|
|
noswap1:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(dl, 4);
|
2011-06-05 14:49:56 +04:00
|
|
|
goto success;
|
|
|
|
topleft:
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(dl, 6);
|
2011-06-05 14:49:56 +04:00
|
|
|
goto success;
|
|
|
|
isinright:
|
2011-06-17 00:30:39 +04:00
|
|
|
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;
|
2011-06-17 00:30:39 +04:00
|
|
|
_add(dl, 2);
|
2011-06-05 14:49:56 +04:00
|
|
|
goto success;
|
|
|
|
botright:
|
2011-06-17 00:30:39 +04:00
|
|
|
_cmp(dl, 1);
|
|
|
|
if (flags.z())
|
2011-06-16 16:31:17 +04:00
|
|
|
goto noswap2;
|
2011-06-17 00:30:39 +04:00
|
|
|
_xor(dl, 2);
|
2011-06-05 14:49:56 +04:00
|
|
|
noswap2:
|
|
|
|
success:
|
2011-06-17 00:30:39 +04:00
|
|
|
_and(dl, 7);
|
|
|
|
data.byte(kTurntoface) = dl;
|
|
|
|
data.byte(kTurndirection) = 0;
|
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::middlePanel() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
ds = data.word(kTempsprites);
|
|
|
|
di = 72+47+20;
|
|
|
|
bx = 0;
|
|
|
|
al = 48;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempsprites);
|
|
|
|
di = 72+19;
|
|
|
|
bx = 21;
|
|
|
|
al = 47;
|
|
|
|
ah = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempsprites);
|
|
|
|
di = 160+23;
|
|
|
|
bx = 0;
|
|
|
|
al = 48;
|
|
|
|
ah = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kTempsprites);
|
|
|
|
di = 160+71;
|
|
|
|
bx = 21;
|
|
|
|
al = 47;
|
|
|
|
ah = 4;
|
2011-12-01 19:38:46 +00:00
|
|
|
showFrame();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void DreamGenContext::blank() {
|
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kCommandtype), 199);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (alreadyblnk) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
data.byte(kCommandtype) = 199;
|
|
|
|
al = 0;
|
2011-12-01 19:38:46 +00:00
|
|
|
commandOnly();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::allPointer() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
2011-12-01 19:38:46 +00:00
|
|
|
readMouse();
|
|
|
|
showPointer();
|
|
|
|
dumpPointer();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getUnderZoom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = (8)+5;
|
|
|
|
bx = (132)+4;
|
|
|
|
ds = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 46;
|
|
|
|
ch = 40;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiGet();
|
2011-06-05 14:49:56 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::dumpZoom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kZoomon), 1);
|
|
|
|
if (!flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (notzoomon) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
di = (8)+5;
|
|
|
|
bx = (132)+4;
|
|
|
|
cl = 46;
|
|
|
|
ch = 40;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiDump();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::putUnderZoom() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = (8)+5;
|
|
|
|
bx = (132)+4;
|
|
|
|
ds = data.word(kBuffers);
|
2011-06-25 17:28:51 +04:00
|
|
|
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
|
2011-06-17 00:30:39 +04:00
|
|
|
cl = 46;
|
|
|
|
ch = 40;
|
2011-12-01 19:38:46 +00:00
|
|
|
multiPut();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::underTextLine() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
di = data.word(kTextaddressx);
|
|
|
|
bx = data.word(kTextaddressy);
|
2011-06-25 17:28:51 +04:00
|
|
|
_cmp(data.byte(kForeignrelease), 0);
|
|
|
|
if (flags.z())
|
|
|
|
goto _tmp1;
|
|
|
|
_sub(bx, 3);
|
|
|
|
_tmp1:
|
2011-06-17 00:30:39 +04:00
|
|
|
ds = data.word(kBuffers);
|
|
|
|
si = (0);
|
2011-06-25 17:28:51 +04:00
|
|
|
cl = (228);
|
|
|
|
ch = (13);
|
2011-12-01 19:38:46 +00:00
|
|
|
multiGet();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-12-01 19:38:46 +00:00
|
|
|
void DreamGenContext::getRidOfReels() {
|
2011-06-17 00:30:39 +04:00
|
|
|
STACK_CHECK;
|
|
|
|
_cmp(data.byte(kRoomloaded), 0);
|
|
|
|
if (flags.z())
|
2011-06-16 15:33:26 +02:00
|
|
|
return /* (dontgetrid) */;
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kReel1);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kReel2);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
es = data.word(kReel3);
|
2011-12-01 19:38:46 +00:00
|
|
|
deallocateMem();
|
2011-06-17 00:30:39 +04:00
|
|
|
}
|
|
|
|
|
2011-06-20 20:00:09 +02:00
|
|
|
void DreamGenContext::__start() {
|
2011-06-05 13:38:05 +04:00
|
|
|
static const uint8 src[] = {
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0000: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0010: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0020: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0xff, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0030: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0xff, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0xb6,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0040: ...0 .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0050: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0060: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0070: .... ...h .&.. ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0080: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0090: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x00a0: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x00b0: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x00c0: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x00d0: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x00e0: .. .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x00f0: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0100: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0110: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0120: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0130: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0140: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0150: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0160: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0170: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0180: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0190: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x01a0: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x01b0: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x01c0: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x01d0: .... .... .... ....
|
2011-06-20 20:00:09 +02:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x01e0: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x01f0: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
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,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0270: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
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,
|
2011-08-24 23:34:46 +04:00
|
|
|
//0x0390: .... .... .... ....
|
2011-12-04 18:44:58 +01:00
|
|
|
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, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
|
|
|
|
//0x0410: WEB. T82. DREA MWEB
|
|
|
|
0x2e, 0x54, 0x38, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x4f,
|
|
|
|
//0x0420: .T83 .DRE AMWE B.VO
|
|
|
|
0x4c, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x33, 0x00, 0x44,
|
|
|
|
//0x0430: L.DR EAMW EB.G 13.D
|
|
|
|
0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41,
|
|
|
|
//0x0440: REAM WEB. G15. DREA
|
2011-12-05 17:39:42 +00:00
|
|
|
0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x11, 0x01, 0x40, 0x01, 0x9d,
|
|
|
|
//0x0450: MWEB .I07 .... .@..
|
|
|
|
0x00, 0xc6, 0x00, 0x7c, 0xc4, 0xf0, 0x00, 0x22, 0x01, 0x02, 0x00, 0x2c, 0x00, 0x94, 0xc4, 0x00,
|
|
|
|
//0x0460: ...| ..." ..., ....
|
|
|
|
0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 0x40, 0x01, 0x9d,
|
|
|
|
//0x0470: .@.. .... .... .@..
|
|
|
|
0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff,
|
|
|
|
//0x0480: ...| ...@ .... ....
|
|
|
|
0xff, 0xee, 0x00, 0x02, 0x01, 0x04, 0x00, 0x2c, 0x00, 0xc8, 0xc4, 0x68, 0x00, 0x7c, 0x00, 0x04,
|
|
|
|
//0x0490: .... ..., ...h .|..
|
|
|
|
0x00, 0x2c, 0x00, 0xcc, 0xc4, 0x18, 0x01, 0x34, 0x01, 0x04, 0x00, 0x2c, 0x00, 0xb0, 0xc4, 0x68,
|
|
|
|
//0x04a0: .,.. ...4 ..., ...h
|
|
|
|
0x00, 0xd8, 0x00, 0x8a, 0x00, 0xc0, 0x00, 0xd0, 0xc4, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6,
|
|
|
|
//0x04b0: .... .... ...@ ....
|
|
|
|
0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x45,
|
|
|
|
//0x04c0: .|.. .@.. .... ...E
|
|
|
|
0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20,
|
|
|
|
//0x04d0: XIT HEL P
|
|
|
|
0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41,
|
|
|
|
//0x04e0: L IST REA
|
|
|
|
0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20,
|
|
|
|
//0x04f0: D L OGON
|
|
|
|
0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42,
|
|
|
|
//0x0500: KEY S . .PUB
|
|
|
|
0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20,
|
|
|
|
//0x0510: LIC PUB LIC
|
|
|
|
0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47,
|
|
|
|
//0x0520: ...B LACK DRAG
|
|
|
|
0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00,
|
|
|
|
//0x0530: ON R YAN ..
|
|
|
|
0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55,
|
|
|
|
//0x0540: .HEN DRIX LOU
|
|
|
|
0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49,
|
|
|
|
//0x0550: IS ...S EPTI
|
|
|
|
0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20,
|
|
|
|
//0x0560: MUS B ECKE TT
|
|
|
|
0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
|
|
|
//0x0570: .. .
|
|
|
|
0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
|
|
|
//0x0580: ." ROOT
|
|
|
|
0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30,
|
|
|
|
//0x0590: ." .0
|
|
|
|
0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0xba, 0x00, 0xca, 0x00, 0x9d, 0x00, 0xad, 0x00, 0x1c,
|
|
|
|
//0x05a0: 000. 00.. .... ....
|
|
|
|
0xc8, 0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8, 0x0c, 0x01, 0x1c, 0x01, 0xa8,
|
|
|
|
//0x05b0: .... .... .... ....
|
|
|
|
0x00, 0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff,
|
|
|
|
//0x05c0: ...P ...@ .... ....
|
|
|
|
0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8, 0x46, 0x00, 0x89, 0x00, 0x3e,
|
|
|
|
//0x05d0: .w.. .R.. .4.F ...>
|
|
|
|
0x00, 0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00, 0x98, 0x00, 0x4c, 0xc8, 0x00,
|
|
|
|
//0x05e0: .o.. .... .D.. .L..
|
|
|
|
0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52,
|
|
|
|
//0x05f0: .@.. .... ...w ...R
|
|
|
|
0x00, 0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x50, 0xc8, 0xec,
|
|
|
|
//0x0600: ...D .F.. .>.o .P..
|
|
|
|
0x00, 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8,
|
|
|
|
//0x0610: ...p ...H ...@ ....
|
|
|
|
0x00, 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x81, 0x00, 0xb8, 0x00, 0x52, 0x00,
|
|
|
|
//0x0620: .... .... .$.. ..R.
|
|
|
|
0x80, 0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xb7, 0x00,
|
|
|
|
//0x0630: .... P... >.o. ....
|
|
|
|
0xfa, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
|
|
|
|
//0x0640: ..>. o... ..@. ....
|
|
|
|
0xa0, 0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, 0x34, 0x43, 0x30, 0x30,
|
|
|
|
//0x0650: .... SPEE CHR2 4C00
|
|
|
|
0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 0x41,
|
|
|
|
//0x0660: 05.R AW.O BJEC T NA
|
|
|
|
0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
|
|
|
//0x0670: ME O NE
|
|
|
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
|
|
|
|
//0x0680: .
|
|
|
|
0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
|
|
//0x0690: .... .... .... ....
|
|
|
|
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
//0x06a0: .... .... D:.. ....
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
//0x06b0: .... .... .... ....
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
//0x06c0: .... .... .... ....
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09,
|
|
|
|
//0x06d0: .... .... .... ....
|
|
|
|
0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 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: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
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: .... .... .... ....
|
2011-12-05 17:39:42 +00: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
|
|
|
//0x0720: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
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: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
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: .... .... .... ....
|
2011-12-04 23:43:32 +01:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-12-04 20:18:08 +01:00
|
|
|
//0x0750: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
2011-12-04 20:03:16 +01:00
|
|
|
//0x0760: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
2011-12-04 17:53:55 +01:00
|
|
|
//0x0770: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
2011-12-04 17:24:16 +01:00
|
|
|
//0x0780: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
2011-12-04 17:24:16 +01:00
|
|
|
//0x0790: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
2011-12-04 17:24:16 +01:00
|
|
|
//0x07a0: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
2011-12-03 22:09:21 +01:00
|
|
|
//0x07b0: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
2011-12-04 17:24:16 +01:00
|
|
|
//0x07c0: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
2011-12-04 10:11:28 +01:00
|
|
|
//0x07d0: .... .... .... ....
|
2011-12-05 17:39:42 +00:00
|
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, };
|
2011-06-17 00:30:39 +04:00
|
|
|
ds.assign(src, src + sizeof(src));
|
2011-12-02 11:48:51 +00:00
|
|
|
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*/
|