DREAMWEB: 'grafittidoor', 'hotelcontrol', 'openhoteldoor', 'openhoteldoor2', 'opentomb' ported to C++
This commit is contained in:
parent
7566d2c985
commit
16c9620dba
5 changed files with 90 additions and 119 deletions
|
@ -330,6 +330,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
|||
'getundertimed',
|
||||
'getxad',
|
||||
'getyad',
|
||||
'grafittidoor',
|
||||
'handclap',
|
||||
'hangon',
|
||||
'hangoncurs',
|
||||
|
@ -337,6 +338,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
|||
'hangonp',
|
||||
'hangonw',
|
||||
'hotelbell',
|
||||
'hotelcontrol',
|
||||
'initialinv',
|
||||
'initman',
|
||||
'initrain',
|
||||
|
@ -425,11 +427,14 @@ generator = cpp(context, "DreamGen", blacklist = [
|
|||
'openeden',
|
||||
'openfile',
|
||||
'openforsave',
|
||||
'openhoteldoor',
|
||||
'openhoteldoor2',
|
||||
'openinv',
|
||||
'openlouis',
|
||||
'openpoolboss',
|
||||
'openryan'
|
||||
'opensarters',
|
||||
'opentomb',
|
||||
'opentvdoor',
|
||||
'openyourneighbour',
|
||||
'othersmoker',
|
||||
|
|
|
@ -5075,34 +5075,6 @@ cupfromtapfull:
|
|||
putBackObStuff();
|
||||
}
|
||||
|
||||
void DreamGenContext::hotelControl() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kReallocation), 21);
|
||||
if (!flags.z())
|
||||
goto notrightcont;
|
||||
_cmp(data.byte(kMapx), 33);
|
||||
if (!flags.z())
|
||||
goto notrightcont;
|
||||
showFirstUse();
|
||||
putBackObStuff();
|
||||
return;
|
||||
notrightcont:
|
||||
showSecondUse();
|
||||
putBackObStuff();
|
||||
}
|
||||
|
||||
void DreamGenContext::openTomb() {
|
||||
STACK_CHECK;
|
||||
_inc(data.byte(kProgresspoints));
|
||||
showFirstUse();
|
||||
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;
|
||||
}
|
||||
|
||||
void DreamGenContext::notHeldError() {
|
||||
STACK_CHECK;
|
||||
createPanel();
|
||||
|
@ -5336,92 +5308,6 @@ void DreamGenContext::drawItAll() {
|
|||
showIcon();
|
||||
}
|
||||
|
||||
void DreamGenContext::openHotelDoor() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kWithobject), 255);
|
||||
if (!flags.z())
|
||||
goto hoteldoorwith;
|
||||
withWhat();
|
||||
return;
|
||||
hoteldoorwith:
|
||||
al = data.byte(kWithobject);
|
||||
ah = data.byte(kWithtype);
|
||||
cl = 'K';
|
||||
ch = 'E';
|
||||
dl = 'Y';
|
||||
dh = 'A';
|
||||
compare();
|
||||
if (flags.z())
|
||||
goto keyonhotel1;
|
||||
cx = 300;
|
||||
al = 14;
|
||||
showPuzText();
|
||||
putBackObStuff();
|
||||
return;
|
||||
keyonhotel1:
|
||||
al = 16;
|
||||
playChannel1();
|
||||
showFirstUse();
|
||||
data.byte(kLockstatus) = 0;
|
||||
data.byte(kGetback) = 1;
|
||||
}
|
||||
|
||||
void DreamGenContext::openHotelDoor2() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kWithobject), 255);
|
||||
if (!flags.z())
|
||||
goto hoteldoorwith2;
|
||||
withWhat();
|
||||
return;
|
||||
hoteldoorwith2:
|
||||
al = data.byte(kWithobject);
|
||||
ah = data.byte(kWithtype);
|
||||
cl = 'K';
|
||||
ch = 'E';
|
||||
dl = 'Y';
|
||||
dh = 'A';
|
||||
compare();
|
||||
if (flags.z())
|
||||
goto keyonhotel2;
|
||||
cx = 300;
|
||||
al = 14;
|
||||
showPuzText();
|
||||
putBackObStuff();
|
||||
return;
|
||||
keyonhotel2:
|
||||
al = 16;
|
||||
playChannel1();
|
||||
showFirstUse();
|
||||
putBackObStuff();
|
||||
}
|
||||
|
||||
void DreamGenContext::grafittiDoor() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kWithobject), 255);
|
||||
if (!flags.z())
|
||||
goto grafwith;
|
||||
withWhat();
|
||||
return;
|
||||
grafwith:
|
||||
al = data.byte(kWithobject);
|
||||
ah = data.byte(kWithtype);
|
||||
cl = 'A';
|
||||
ch = 'P';
|
||||
dl = 'E';
|
||||
dh = 'N';
|
||||
compare();
|
||||
if (flags.z())
|
||||
goto dograf;
|
||||
cx = 300;
|
||||
al = 14;
|
||||
showPuzText();
|
||||
putBackObStuff();
|
||||
return;
|
||||
dograf:
|
||||
showFirstUse();
|
||||
putBackObStuff();
|
||||
}
|
||||
|
||||
void DreamGenContext::usePoolReader() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kWithobject), 255);
|
||||
|
|
|
@ -564,7 +564,6 @@ public:
|
|||
void isRyanHolding();
|
||||
void showSlots();
|
||||
void useCashCard();
|
||||
void openTomb();
|
||||
void doSomeTalk();
|
||||
void showSaveOps();
|
||||
void introMonks1();
|
||||
|
@ -625,7 +624,6 @@ public:
|
|||
void attendant();
|
||||
void cantDrop();
|
||||
void copper();
|
||||
void openHotelDoor();
|
||||
void drinker();
|
||||
void nextColon();
|
||||
void placeFreeObject();
|
||||
|
@ -727,11 +725,9 @@ public:
|
|||
void isSetObOnMap();
|
||||
void getDestInfo();
|
||||
void setupTimedUse();
|
||||
void grafittiDoor();
|
||||
void makeCaps();
|
||||
void read();
|
||||
void additionalText();
|
||||
void hotelControl();
|
||||
void mugger();
|
||||
void searchForString();
|
||||
void selectOpenOb();
|
||||
|
@ -771,7 +767,6 @@ public:
|
|||
void inToInv();
|
||||
void parser();
|
||||
void setMouse();
|
||||
void openHotelDoor2();
|
||||
void selectLocation();
|
||||
void underTextLine();
|
||||
void showNames();
|
||||
|
|
|
@ -547,6 +547,11 @@
|
|||
void sLabDoorE();
|
||||
void sLabDoorD();
|
||||
void sLabDoorF();
|
||||
void openHotelDoor();
|
||||
void openHotelDoor2();
|
||||
void grafittiDoor();
|
||||
void openTomb();
|
||||
void hotelControl();
|
||||
void obsThatDoThings();
|
||||
void makeMainScreen();
|
||||
void openInv();
|
||||
|
|
|
@ -1025,4 +1025,84 @@ void DreamGenContext::useHole() {
|
|||
}
|
||||
}
|
||||
|
||||
void DreamGenContext::openHotelDoor() {
|
||||
if (data.byte(kWithobject) == 255) {
|
||||
withWhat();
|
||||
return;
|
||||
}
|
||||
|
||||
char id[4] = { 'K', 'E', 'Y', 'A' }; // TODO: convert to string with trailing zero
|
||||
if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
|
||||
// Wrong item
|
||||
cx = 300;
|
||||
al = 14;
|
||||
showPuzText();
|
||||
putBackObStuff();
|
||||
} else {
|
||||
playChannel1(16);
|
||||
showFirstUse();
|
||||
data.byte(kLockstatus) = 0;
|
||||
data.byte(kGetback) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void DreamGenContext::openHotelDoor2() {
|
||||
if (data.byte(kWithobject) == 255) {
|
||||
withWhat();
|
||||
return;
|
||||
}
|
||||
|
||||
char id[4] = { 'K', 'E', 'Y', 'A' }; // TODO: convert to string with trailing zero
|
||||
if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
|
||||
// Wrong item
|
||||
cx = 300;
|
||||
al = 14;
|
||||
showPuzText();
|
||||
putBackObStuff();
|
||||
} else {
|
||||
playChannel1(16);
|
||||
showFirstUse();
|
||||
putBackObStuff();
|
||||
}
|
||||
}
|
||||
|
||||
void DreamGenContext::grafittiDoor() {
|
||||
if (data.byte(kWithobject) == 255) {
|
||||
withWhat();
|
||||
return;
|
||||
}
|
||||
|
||||
char id[4] = { 'A', 'P', 'E', 'N' }; // TODO: convert to string with trailing zero
|
||||
if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
|
||||
// Wrong item
|
||||
cx = 300;
|
||||
al = 14;
|
||||
showPuzText();
|
||||
putBackObStuff();
|
||||
} else {
|
||||
showFirstUse();
|
||||
putBackObStuff();
|
||||
}
|
||||
}
|
||||
|
||||
void DreamGenContext::openTomb() {
|
||||
data.byte(kProgresspoints)++;
|
||||
showFirstUse();
|
||||
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;
|
||||
}
|
||||
|
||||
void DreamGenContext::hotelControl() {
|
||||
if (data.byte(kReallocation) != 21 || data.byte(kMapx) != 33)
|
||||
showSecondUse(); // Not right control
|
||||
else
|
||||
showFirstUse();
|
||||
|
||||
putBackObStuff();
|
||||
}
|
||||
|
||||
} /*namespace dreamgen */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue