2011-12-26 21:30:46 +01: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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This code is based on original Mortville Manor DOS source code
|
2012-03-29 16:39:18 +02:00
|
|
|
* Copyright (c) 1987-1989 Lankhor
|
2011-12-26 21:30:46 +01:00
|
|
|
*/
|
|
|
|
|
2011-12-30 22:40:45 +11:00
|
|
|
#include "common/scummsys.h"
|
2012-02-13 20:51:36 +11:00
|
|
|
#include "mortevielle/dialogs.h"
|
2011-12-31 21:29:41 +11:00
|
|
|
#include "mortevielle/menu.h"
|
2012-01-21 20:06:08 +11:00
|
|
|
#include "mortevielle/mortevielle.h"
|
2011-12-27 08:34:47 +01:00
|
|
|
#include "mortevielle/mouse.h"
|
|
|
|
#include "mortevielle/outtext.h"
|
2012-03-10 09:46:51 +01:00
|
|
|
#include "mortevielle/speech.h"
|
2011-12-26 23:50:26 +01:00
|
|
|
|
2011-12-26 22:08:18 +01:00
|
|
|
namespace Mortevielle {
|
2011-12-26 21:30:46 +01:00
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Move
|
|
|
|
* @remarks Originally called 'taller'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctMove() {
|
2012-03-23 00:35:19 +01:00
|
|
|
if ((_coreVar._currPlace == ROOM26) && (_msg[4] == _menu._moveMenu[6])) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = LANDING;
|
2012-03-23 23:26:27 +01:00
|
|
|
_caff = _coreVar._currPlace;
|
2012-10-11 00:45:46 +02:00
|
|
|
drawPictureWithText();
|
|
|
|
handleDescriptionText(2, _coreVar._currPlace);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-23 00:35:19 +01:00
|
|
|
if ((_coreVar._currPlace == LANDING) && (_msg[4] == _menu._moveMenu[6])) {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_GO_TO));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
|
|
|
|
if (_keyPressedEsc)
|
|
|
|
_okdes = false;
|
|
|
|
|
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-14 23:06:23 +01:00
|
|
|
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(1);
|
2012-03-14 18:25:17 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 0)
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-14 18:25:17 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 1) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = OWN_ROOM;
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(OWN_ROOM);
|
2012-03-23 23:26:27 +01:00
|
|
|
} else if (_num == 7) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = ATTIC;
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(ATTIC);
|
2012-03-29 17:55:18 +02:00
|
|
|
} else if (_num != 6)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = ROOM26;
|
2012-03-27 22:54:50 +02:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_num > 1) && (_num < 6))
|
2012-10-10 08:19:54 +02:00
|
|
|
_roomDoorId = _num - 1;
|
2012-03-23 23:26:27 +01:00
|
|
|
else if (_num > 7)
|
2012-10-10 08:19:54 +02:00
|
|
|
_roomDoorId = _num - 3;
|
2012-03-14 18:25:17 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 6)
|
2012-02-19 23:17:22 +01:00
|
|
|
affrep();
|
|
|
|
else
|
2012-03-20 22:52:59 +01:00
|
|
|
showMoveMenuAlert();
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-24 15:19:54 +01:00
|
|
|
exitRoom();
|
2012-03-14 23:06:23 +01:00
|
|
|
int menuChoice = 1;
|
2012-03-14 18:25:17 +01:00
|
|
|
|
2012-03-23 00:35:19 +01:00
|
|
|
while (_menu._moveMenu[menuChoice] != _msg[4])
|
2012-03-14 23:06:23 +01:00
|
|
|
++menuChoice;
|
2012-03-03 00:23:27 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == MOUNTAIN) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (menuChoice == 1)
|
2012-03-14 18:25:17 +01:00
|
|
|
gotoManorFront();
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 2)
|
2012-03-14 18:25:17 +01:00
|
|
|
checkManorDistance();
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2012-03-07 08:33:48 +01:00
|
|
|
return;
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if (_coreVar._currPlace == INSIDE_WELL) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (menuChoice == 1)
|
|
|
|
floodedInWell();
|
|
|
|
else if (menuChoice == 2)
|
2012-03-14 18:25:17 +01:00
|
|
|
gotoManorBack();
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2012-03-07 08:33:48 +01:00
|
|
|
return;
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if ((_coreVar._currPlace == BUREAU) && (menuChoice == 1))
|
2012-03-14 23:06:23 +01:00
|
|
|
menuChoice = 6;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._currPlace == KITCHEN) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (menuChoice == 2)
|
|
|
|
menuChoice = 6;
|
|
|
|
else if (menuChoice == 5)
|
|
|
|
menuChoice = 16;
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if ((_coreVar._currPlace == CELLAR) && (menuChoice == 3))
|
2012-03-14 23:06:23 +01:00
|
|
|
menuChoice = 6;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (((_coreVar._currPlace == LANDING) || (_coreVar._currPlace == ROOM26)) && (menuChoice == 4))
|
2012-03-14 23:06:23 +01:00
|
|
|
menuChoice = 6;
|
2012-03-27 22:54:50 +02:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace > MOUNTAIN) && (_coreVar._currPlace != ROOM26))
|
2012-03-14 23:06:23 +01:00
|
|
|
menuChoice += 10;
|
2012-03-27 22:54:50 +02:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == CHAPEL) && (menuChoice == 13))
|
2012-03-14 23:06:23 +01:00
|
|
|
menuChoice = 16;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._currPlace == MANOR_FRONT) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (menuChoice == 12)
|
|
|
|
menuChoice = 16;
|
|
|
|
else if (menuChoice > 13)
|
|
|
|
menuChoice = 15;
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if ((_coreVar._currPlace == MANOR_BACK) && (menuChoice > 14))
|
2012-03-14 23:06:23 +01:00
|
|
|
menuChoice = 15;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if ((_coreVar._currPlace == WELL) && (menuChoice > 13) && (menuChoice != 17))
|
2012-03-14 23:06:23 +01:00
|
|
|
menuChoice = 15;
|
|
|
|
|
|
|
|
if (menuChoice == 1)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = BUREAU;
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 2)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = KITCHEN;
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 3)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = CELLAR;
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 4)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = LANDING;
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 5)
|
|
|
|
menuChoice = 12;
|
|
|
|
else if (menuChoice == 6)
|
|
|
|
menuChoice = 11;
|
2012-03-14 18:25:17 +01:00
|
|
|
|
2012-03-14 23:06:23 +01:00
|
|
|
if (menuChoice == 11)
|
2012-03-14 18:25:17 +01:00
|
|
|
gotoDiningRoom();
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 12)
|
2012-03-14 18:25:17 +01:00
|
|
|
gotoManorFront();
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 13)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = CHAPEL;
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 14)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = WELL;
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 15)
|
2012-03-14 18:25:17 +01:00
|
|
|
checkManorDistance();
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 16)
|
2012-03-14 18:25:17 +01:00
|
|
|
gotoManorBack();
|
2012-03-14 23:06:23 +01:00
|
|
|
else if (menuChoice == 17) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._wellObjectId != 120) && (_coreVar._wellObjectId != 140))
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._wellObjectId == 120)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 181;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._faithScore > 80) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 1505;
|
2012-03-14 18:25:17 +01:00
|
|
|
loseGame();
|
2011-12-23 22:15:35 +00:00
|
|
|
} else {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = INSIDE_WELL;
|
2011-12-23 22:15:35 +00:00
|
|
|
affrep();
|
|
|
|
}
|
|
|
|
}
|
2012-03-14 23:06:23 +01:00
|
|
|
if ((menuChoice < 5) || (menuChoice == 13) || (menuChoice == 14))
|
2012-02-19 23:17:22 +01:00
|
|
|
affrep();
|
2012-03-24 09:47:36 +01:00
|
|
|
resetRoomVariables(_coreVar._currPlace);
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Take
|
|
|
|
* @remarks Originally called 'tprendre'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctTake() {
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff > 99) {
|
|
|
|
int cx = _caff;
|
2011-12-23 22:15:35 +00:00
|
|
|
avpoing(cx);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_crep != 139) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 3;
|
2012-03-14 18:25:17 +01:00
|
|
|
if (_obpart) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == PURPLE_ROOM)
|
|
|
|
_coreVar._purpleRoomObjectId = 0;
|
|
|
|
if (_coreVar._currPlace == ATTIC) {
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_coreVar._atticBallHoleObjectId == _caff)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._atticBallHoleObjectId = 0;
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_coreVar._atticRodHoleObjectId == _caff)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._atticRodHoleObjectId = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == CELLAR)
|
|
|
|
_coreVar._cellarObjectId = 0;
|
|
|
|
if (_coreVar._currPlace == CRYPT)
|
|
|
|
_coreVar._cryptObjectId = 0;
|
|
|
|
if (_coreVar._currPlace == SECRET_PASSAGE)
|
|
|
|
_coreVar._secretPassageObjectId = 0;
|
|
|
|
if (_coreVar._currPlace == WELL)
|
|
|
|
_coreVar._wellObjectId = 0;
|
2012-03-14 18:25:17 +01:00
|
|
|
_menu.unsetSearchMenu();
|
|
|
|
_obpart = false;
|
2011-12-23 22:15:35 +00:00
|
|
|
affrep();
|
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_tabdon[kAcha + ((_mchai - 1) * 10) + _cs - 1] = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
tsuiv();
|
2012-10-10 08:19:54 +02:00
|
|
|
++_takeObjCount;
|
|
|
|
if (_takeObjCount > 6) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 2;
|
2012-10-10 08:19:54 +02:00
|
|
|
_takeObjCount = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_TAKE));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == 3) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(2);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 1) {
|
|
|
|
_crep = 152;
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(5);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_num == 0) || ((_num == 1) && (_coreVar._currPlace == CRYPT))) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(8);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 3;
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == PURPLE_ROOM) && (_coreVar._purpleRoomObjectId != 0))
|
|
|
|
avpoing(_coreVar._purpleRoomObjectId);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_coreVar._currPlace == ATTIC) && (_num == 1) && (_coreVar._atticBallHoleObjectId != 0)) {
|
2012-03-22 08:36:59 +01:00
|
|
|
avpoing(_coreVar._atticBallHoleObjectId);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_crep != 997) && (_crep != 139))
|
2012-02-19 23:17:22 +01:00
|
|
|
aniof(2, 7);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_coreVar._currPlace == ATTIC) && (_num == 2) && (_coreVar._atticRodHoleObjectId != 0)) {
|
2012-03-22 08:36:59 +01:00
|
|
|
avpoing(_coreVar._atticRodHoleObjectId);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_crep != 997) && (_crep != 139))
|
2012-02-19 23:17:22 +01:00
|
|
|
aniof(2, 6);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == CELLAR) && (_coreVar._cellarObjectId != 0)) {
|
|
|
|
avpoing(_coreVar._cellarObjectId);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_crep != 997) && (_crep != 139))
|
2012-02-19 23:17:22 +01:00
|
|
|
aniof(2, 2);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == CRYPT) && (_coreVar._cryptObjectId != 0))
|
|
|
|
avpoing(_coreVar._cryptObjectId);
|
2012-03-05 00:00:48 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == SECRET_PASSAGE) && (_coreVar._secretPassageObjectId != 0)) {
|
|
|
|
avpoing(_coreVar._secretPassageObjectId);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_crep != 997) && (_crep != 139)) {
|
|
|
|
_crep = 182;
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(2, 1);
|
|
|
|
}
|
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == WELL) && (_coreVar._wellObjectId != 0)) {
|
|
|
|
avpoing(_coreVar._wellObjectId);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_crep != 997) && (_crep != 139))
|
2012-02-19 23:17:22 +01:00
|
|
|
aniof(2, 1);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_crep != 997) && (_crep != 182) && (_crep != 139))
|
|
|
|
_crep = 999;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
if ( ((_coreVar._currPlace == OWN_ROOM) && (_num == 3))
|
|
|
|
|| ((_coreVar._currPlace == GREEN_ROOM) && (_num == 4))
|
|
|
|
|| ((_coreVar._currPlace == PURPLE_ROOM) && (_num == 1))
|
|
|
|
|| ((_coreVar._currPlace == DARKBLUE_ROOM) && (_num == 3))
|
|
|
|
|| ((_coreVar._currPlace == BLUE_ROOM) && (_num == 6))
|
|
|
|
|| ((_coreVar._currPlace == RED_ROOM) && (_num == 2))
|
|
|
|
|| ((_coreVar._currPlace == BATHROOM) && (_num == 6))
|
|
|
|
|| ((_coreVar._currPlace == GREEN_ROOM2) && (_num == 4))
|
|
|
|
|| ((_coreVar._currPlace == ROOM9) && (_num == 4))
|
|
|
|
|| ((_coreVar._currPlace == DINING_ROOM) && (_num > 2))
|
|
|
|
|| ((_coreVar._currPlace == BUREAU) && (_num == 7))
|
|
|
|
|| ((_coreVar._currPlace == KITCHEN) && (_num == 6))
|
|
|
|
|| ((_coreVar._currPlace == ATTIC) && (_num > 4))
|
2012-03-22 08:36:59 +01:00
|
|
|
|| ((_coreVar._currPlace > ATTIC) && (_coreVar._currPlace != INSIDE_WELL)) )
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._currPlace == INSIDE_WELL) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 1504;
|
2012-03-14 18:25:17 +01:00
|
|
|
loseGame();
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 120;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
2012-02-29 08:15:54 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Inventory / Take
|
|
|
|
* @remarks Originally called 'tsprendre'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctInventoryTake() {
|
2012-03-24 15:19:54 +01:00
|
|
|
int cx = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
2012-02-19 23:17:22 +01:00
|
|
|
++cx;
|
2012-03-23 00:35:19 +01:00
|
|
|
} while (_menu._inventoryMenu[cx] != _msg[4]);
|
2012-03-24 15:19:54 +01:00
|
|
|
int cz = 0;
|
|
|
|
int cy = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
2012-02-19 23:17:22 +01:00
|
|
|
++cy;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (ord(_coreVar._sjer[cy]) != 0)
|
2012-02-19 23:17:22 +01:00
|
|
|
++cz;
|
2012-02-24 23:55:17 +01:00
|
|
|
} while (cz != cx);
|
2012-03-22 08:36:59 +01:00
|
|
|
cz = ord(_coreVar._sjer[cy]);
|
|
|
|
_coreVar._sjer[cy] = chr(0);
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setInventoryText();
|
2011-12-23 22:15:35 +00:00
|
|
|
avpoing(cz);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 998;
|
2012-10-11 00:45:46 +02:00
|
|
|
clearDescriptionBar();
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Lift
|
|
|
|
* @remarks Originally called 'tsoulever'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctLift() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_LIFT));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(3);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 0) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(8);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
++_coreVar._faithScore;
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == PURPLE_ROOM) && (_coreVar._purpleRoomObjectId != 0))
|
|
|
|
treg(_coreVar._purpleRoomObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
++_coreVar._faithScore;
|
|
|
|
int tmpPlace = _coreVar._currPlace;
|
|
|
|
if (_coreVar._currPlace == CRYPT)
|
2012-03-05 00:00:48 +01:00
|
|
|
tmpPlace = 14;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._currPlace == MOUNTAIN)
|
2012-03-05 00:00:48 +01:00
|
|
|
tmpPlace = 15;
|
2012-03-24 22:48:47 +01:00
|
|
|
_crep = _tabdon[kAsoul + (tmpPlace << 3) + (_num - 1)];
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_crep == 255)
|
|
|
|
_crep = 997;
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Read
|
|
|
|
* @remarks Originally called 'tlire'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctRead() {
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff > 99)
|
2012-03-24 15:19:54 +01:00
|
|
|
getReadDescription(_caff);
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_READ));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!(_anyone) && !(_keyPressedEsc)) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(4);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0)
|
|
|
|
_crep = 107;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-29 08:15:54 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Self / Read
|
|
|
|
* @remarks Originally called 'tslire'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSelfRead() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._selectedObjectId == 0)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 186;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-24 15:19:54 +01:00
|
|
|
getReadDescription(_coreVar._selectedObjectId);
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Look
|
|
|
|
* @remarks Originally called 'tregarder'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctLook() {
|
2011-12-26 17:57:54 +00:00
|
|
|
int cx;
|
2011-12-23 19:02:50 +00:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff > 99) {
|
|
|
|
_crep = 103;
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_LOOK));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(5);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 0) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(8);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 131;
|
|
|
|
if (_num != 0) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == ATTIC) {
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 1) {
|
|
|
|
_crep = 164;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._atticRodHoleObjectId != 0)
|
|
|
|
treg(_coreVar._atticRodHoleObjectId);
|
|
|
|
else if (_coreVar._atticBallHoleObjectId != 0)
|
|
|
|
treg(_coreVar._atticBallHoleObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 193;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._atticRodHoleObjectId != 0)
|
|
|
|
treg(_coreVar._atticRodHoleObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == CELLAR) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 164;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._cellarObjectId != 0)
|
|
|
|
treg(_coreVar._cellarObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == SECRET_PASSAGE) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 174;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._secretPassageObjectId != 0)
|
|
|
|
treg(_coreVar._secretPassageObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == WELL) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 131;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._wellObjectId != 0)
|
|
|
|
treg(_coreVar._wellObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
cx = _coreVar._currPlace;
|
|
|
|
if (_coreVar._currPlace == CHAPEL)
|
2012-02-19 23:17:22 +01:00
|
|
|
cx = 17;
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace > MANOR_FRONT) && (_coreVar._currPlace < DOOR))
|
2012-02-19 23:17:22 +01:00
|
|
|
cx -= 4;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == ROOM26)
|
2012-02-19 23:17:22 +01:00
|
|
|
cx = 21;
|
2012-03-24 22:48:47 +01:00
|
|
|
_crep = _tabdon[kArega + (cx * 7) + _num - 1];
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_coreVar._currPlace == ATTIC) && (_num == 8))
|
|
|
|
_crep = 126;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == MOUNTAIN)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 103;
|
|
|
|
if (_crep == 255)
|
|
|
|
_crep = 131;
|
|
|
|
if ((_coreVar._currPlace == GREEN_ROOM) && (_num == 1))
|
2012-02-19 23:17:22 +01:00
|
|
|
treg(144);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_coreVar._currPlace == BLUE_ROOM) && (_num == 3))
|
2012-02-19 23:17:22 +01:00
|
|
|
treg(147);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_coreVar._currPlace == GREEN_ROOM2) && (_num == 3))
|
2012-02-19 23:17:22 +01:00
|
|
|
treg(149);
|
2012-10-08 08:00:00 +02:00
|
|
|
if ((_coreVar._currPlace == ROOM9) && (_num == 2))
|
2012-02-19 23:17:22 +01:00
|
|
|
treg(30);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_coreVar._currPlace == DINING_ROOM) && (_num == 3))
|
2012-02-19 23:17:22 +01:00
|
|
|
treg(31);
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-29 08:15:54 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Self / Look
|
|
|
|
* @remarks Originally called 'tsregarder'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSelftLook() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._selectedObjectId != 0)
|
|
|
|
treg(_coreVar._selectedObjectId);
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 186;
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Search
|
|
|
|
* @remarks Originally called 'tfouiller'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSearch() {
|
2011-12-30 22:40:45 +11:00
|
|
|
const byte r[14] = {123, 104, 123, 131, 131, 123, 104, 131, 123, 123, 106, 123, 123, 107};
|
2011-12-23 19:02:50 +00:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff > 99) {
|
2012-03-24 15:19:54 +01:00
|
|
|
getSearchDescription(_caff);
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_SEARCH));
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (_anyone || _keyPressedEsc)
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == INSIDE_WELL) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 1504;
|
2012-03-14 18:25:17 +01:00
|
|
|
loseGame();
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(6);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 0) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(7);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
2012-02-29 23:50:49 +01:00
|
|
|
int cx = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
2012-02-19 23:17:22 +01:00
|
|
|
++cx;
|
2012-03-23 23:26:27 +01:00
|
|
|
} while ((cx <= 6) && (_num != ord(_touv[cx])));
|
|
|
|
if (_num != ord(_touv[cx]))
|
|
|
|
_crep = 187;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 3;
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-23 07:44:04 +01:00
|
|
|
rechai(_mchai);
|
|
|
|
if (_mchai != 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_cs = 0;
|
|
|
|
_is = 0;
|
2012-03-14 18:25:17 +01:00
|
|
|
_heroSearching = true;
|
|
|
|
_menu.setSearchMenu();
|
2011-12-23 22:15:35 +00:00
|
|
|
tsuiv();
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
} else {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(8);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
|
|
|
if (_num != 0) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 3;
|
|
|
|
if ((_coreVar._currPlace != WELL) && (_coreVar._currPlace != SECRET_PASSAGE) && (_coreVar._currPlace != ATTIC)) {
|
|
|
|
if (_coreVar._currPlace == PURPLE_ROOM) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 123;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._purpleRoomObjectId != 0)
|
|
|
|
treg(_coreVar._purpleRoomObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == CRYPT) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 123;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._cryptObjectId != 0)
|
|
|
|
treg(_coreVar._cryptObjectId);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 3;
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace < CELLAR)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = r[_coreVar._currPlace];
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_coreVar._currPlace == TOILETS) && (_num == 2))
|
|
|
|
_crep = 162;
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == KITCHEN) {
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_num == 3) || (_num == 4))
|
|
|
|
_crep = 162;
|
|
|
|
else if (_num == 5)
|
|
|
|
_crep = 159;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == MOUNTAIN)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 104;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._currPlace == CRYPT)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 155;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-29 08:15:54 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Self / Search
|
|
|
|
* @remarks Originally called 'tsfouiller'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSelfSearch() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._selectedObjectId != 0)
|
2012-03-24 15:19:54 +01:00
|
|
|
getSearchDescription(_coreVar._selectedObjectId);
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 186;
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Open
|
|
|
|
* @remarks Originally called 'touvrir'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctOpen() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_OPEN));
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == ROOM26) {
|
2012-10-10 08:19:54 +02:00
|
|
|
if (_roomDoorId != OWN_ROOM) {
|
2012-03-23 00:35:19 +01:00
|
|
|
_msg[4] = OPCODE_ENTER;
|
2012-03-14 18:25:17 +01:00
|
|
|
_syn = true;
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == 15) {
|
2012-03-20 22:52:59 +01:00
|
|
|
showMoveMenuAlert();
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(7);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex > 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 2;
|
2012-10-10 08:19:54 +02:00
|
|
|
++_openObjCount;
|
2012-03-05 00:00:48 +01:00
|
|
|
int tmpPlace = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
2012-03-05 00:00:48 +01:00
|
|
|
++tmpPlace;
|
2012-03-23 23:26:27 +01:00
|
|
|
} while (!((tmpPlace > 6) || (ord(_touv[tmpPlace]) == 0) || (ord(_touv[tmpPlace]) == _num)));
|
|
|
|
if (ord(_touv[tmpPlace]) != _num) {
|
2012-10-08 08:00:00 +02:00
|
|
|
if (!( ((_num == 3) && ((_coreVar._currPlace == OWN_ROOM) || (_coreVar._currPlace == ROOM9) || (_coreVar._currPlace == BLUE_ROOM) || (_coreVar._currPlace == BATHROOM)))
|
2012-03-23 23:26:27 +01:00
|
|
|
|| ((_num == 4) && ((_coreVar._currPlace == GREEN_ROOM) || (_coreVar._currPlace == PURPLE_ROOM) || (_coreVar._currPlace == RED_ROOM)))
|
|
|
|
|| ((_coreVar._currPlace == DARKBLUE_ROOM) && (_num == 5))
|
|
|
|
|| ((_num == 6) && ((_coreVar._currPlace == BATHROOM) || (_coreVar._currPlace == DINING_ROOM) || (_coreVar._currPlace == GREEN_ROOM2) || (_coreVar._currPlace == ATTIC)))
|
|
|
|
|| ((_coreVar._currPlace == GREEN_ROOM2) && (_num == 2))
|
|
|
|
|| ((_coreVar._currPlace == KITCHEN) && (_num == 7))) ) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if ( ((_coreVar._currPlace > DINING_ROOM) && (_coreVar._currPlace < CELLAR))
|
|
|
|
|| ((_coreVar._currPlace > RED_ROOM) && (_coreVar._currPlace < DINING_ROOM))
|
|
|
|
|| (_coreVar._currPlace == OWN_ROOM) || (_coreVar._currPlace == PURPLE_ROOM) || (_coreVar._currPlace == BLUE_ROOM)) {
|
2012-03-04 22:02:26 +01:00
|
|
|
if (getRandomNumber(1, 4) == 3)
|
2012-03-14 18:25:17 +01:00
|
|
|
_speechManager.startSpeech(7, 9, 1);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
_touv[tmpPlace] = chr(_num);
|
|
|
|
aniof(1, _num);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
tmpPlace = _coreVar._currPlace;
|
|
|
|
if (_coreVar._currPlace == CRYPT)
|
2012-03-05 00:00:48 +01:00
|
|
|
tmpPlace = CELLAR;
|
2012-03-24 22:48:47 +01:00
|
|
|
_crep = _tabdon[kAouvr + (tmpPlace * 7) + _num - 1];
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_crep == 254)
|
|
|
|
_crep = 999;
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 18;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Place
|
|
|
|
* @remarks Originally called 'tmettre'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctPlace() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._selectedObjectId == 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 186;
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-01 19:11:56 +01:00
|
|
|
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_PUT));
|
2012-03-01 19:11:56 +01:00
|
|
|
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (_keyPressedEsc)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 998;
|
2012-03-01 19:11:56 +01:00
|
|
|
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-01 19:11:56 +01:00
|
|
|
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(8);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
|
|
|
_crep = 999;
|
|
|
|
if (_caff == 13) {
|
|
|
|
if (_num == 1) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._atticBallHoleObjectId != 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-03-01 19:11:56 +01:00
|
|
|
} else {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._atticBallHoleObjectId = _coreVar._selectedObjectId;
|
|
|
|
if (_coreVar._selectedObjectId == 141)
|
2012-02-19 23:17:22 +01:00
|
|
|
aniof(1, 7);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if (_coreVar._atticRodHoleObjectId != 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-03-01 19:11:56 +01:00
|
|
|
} else {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._atticRodHoleObjectId = _coreVar._selectedObjectId;
|
|
|
|
if (_coreVar._selectedObjectId == 159)
|
2012-02-19 23:17:22 +01:00
|
|
|
aniof(1, 6);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2012-03-01 19:11:56 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == 14) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._cellarObjectId != 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-03-01 19:11:56 +01:00
|
|
|
} else {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._cellarObjectId = _coreVar._selectedObjectId;
|
|
|
|
if (_coreVar._selectedObjectId == 151) {
|
2012-02-24 10:54:43 +01:00
|
|
|
// Open hidden passage
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(1, 2);
|
|
|
|
aniof(1, 1);
|
2012-10-11 00:45:46 +02:00
|
|
|
handleDescriptionText(2, 165);
|
2012-03-24 09:47:36 +01:00
|
|
|
displayEmptyHand();
|
2012-03-14 18:25:17 +01:00
|
|
|
_speechManager.startSpeech(6, -9, 1);
|
2012-02-24 10:54:43 +01:00
|
|
|
|
|
|
|
// Do you want to enter the hidden passage?
|
2012-03-14 18:25:17 +01:00
|
|
|
int answer = Alert::show(getEngineString(S_YES_NO), 1);
|
2012-03-03 00:23:27 +01:00
|
|
|
if (answer == 1) {
|
2012-03-23 00:35:19 +01:00
|
|
|
Common::String alertTxt = getString(582);
|
2012-02-29 23:50:49 +01:00
|
|
|
Alert::show(alertTxt, 1);
|
2012-02-26 18:08:53 +01:00
|
|
|
|
2012-03-03 18:18:32 +01:00
|
|
|
bool enterPassageFl = KnowledgeCheck::show();
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.hideMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
2012-03-12 01:26:02 +01:00
|
|
|
drawRightFrame();
|
2012-10-11 00:45:46 +02:00
|
|
|
clearDescriptionBar();
|
|
|
|
clearVerbBar();
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.showMouse();
|
2012-03-22 08:36:59 +01:00
|
|
|
prepareRoom();
|
2012-02-21 00:33:48 +01:00
|
|
|
drawClock();
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex != 0)
|
|
|
|
showPeoplePresent(_currBitIndex);
|
2012-03-27 22:54:50 +02:00
|
|
|
else
|
2012-03-05 23:59:21 +01:00
|
|
|
displayAloneText();
|
2012-02-13 00:02:03 +11:00
|
|
|
|
2012-03-14 18:25:17 +01:00
|
|
|
_menu.displayMenu();
|
2012-02-24 10:54:43 +01:00
|
|
|
if (enterPassageFl) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = SECRET_PASSAGE;
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(SECRET_PASSAGE);
|
2011-12-23 22:15:35 +00:00
|
|
|
} else {
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2012-03-21 08:32:36 +01:00
|
|
|
setPal(14);
|
2012-10-11 00:45:46 +02:00
|
|
|
drawPicture();
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(1, 2);
|
|
|
|
aniof(1, 1);
|
2012-03-23 00:35:19 +01:00
|
|
|
alertTxt = getString(577);
|
2012-02-29 23:50:49 +01:00
|
|
|
Alert::show(alertTxt, 1);
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(2, 1);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 166;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
affrep();
|
|
|
|
} else {
|
|
|
|
aniof(2, 1);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 166;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == 16) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._cryptObjectId == 0)
|
|
|
|
_coreVar._cryptObjectId = _coreVar._selectedObjectId;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == 17) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._secretPassageObjectId != 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if (_coreVar._selectedObjectId == 143) {
|
|
|
|
_coreVar._secretPassageObjectId = 143;
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(1, 1);
|
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 1512;
|
2012-03-14 18:25:17 +01:00
|
|
|
loseGame();
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == 24) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._wellObjectId != 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if ((_coreVar._selectedObjectId == 140) || (_coreVar._selectedObjectId == 120)) {
|
|
|
|
_coreVar._wellObjectId = _coreVar._selectedObjectId;
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(1, 1);
|
2012-03-01 19:11:56 +01:00
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 185;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_crep != 188)
|
2012-03-24 09:47:36 +01:00
|
|
|
displayEmptyHand();
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Turn
|
|
|
|
* @remarks Originally called 'ttourner'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctTurn() {
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff > 99) {
|
|
|
|
_crep = 149;
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_TURN));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(9);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
|
|
|
_crep = 997;
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == ATTIC) && (_coreVar._atticRodHoleObjectId == 159) && (_coreVar._atticBallHoleObjectId == 141)) {
|
2012-10-11 00:45:46 +02:00
|
|
|
handleDescriptionText(2, 167);
|
2012-03-14 18:25:17 +01:00
|
|
|
_speechManager.startSpeech(7, 9, 1);
|
|
|
|
int answer = Alert::show(getEngineString(S_YES_NO), 1);
|
2012-02-21 00:33:48 +01:00
|
|
|
if (answer == 1)
|
2012-03-14 18:25:17 +01:00
|
|
|
_endGame = true;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 168;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == SECRET_PASSAGE) && (_coreVar._secretPassageObjectId == 143)) {
|
2012-10-11 00:45:46 +02:00
|
|
|
handleDescriptionText(2, 175);
|
|
|
|
clearVerbBar();
|
2012-03-14 18:25:17 +01:00
|
|
|
_speechManager.startSpeech(6, -9, 1);
|
|
|
|
int answer = Alert::show(getEngineString(S_YES_NO), 1);
|
2012-02-21 00:33:48 +01:00
|
|
|
if (answer == 1) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = CRYPT;
|
2011-12-23 22:15:35 +00:00
|
|
|
affrep();
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 176;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Hide Self
|
|
|
|
* @remarks Originally called 'tcacher'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSelfHide() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_HIDE_SELF));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!(_anyone) && !(_keyPressedEsc)) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(10);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num == 0)
|
2012-03-14 18:25:17 +01:00
|
|
|
_hiddenHero = false;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-14 18:25:17 +01:00
|
|
|
_hiddenHero = true;
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 999;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Attach
|
|
|
|
* @remarks Originally called 'tattacher'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctAttach() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._selectedObjectId == 0)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 186;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_TIE));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!(_anyone) && !(_keyPressedEsc)) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(8);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
|
|
|
if ((_num != 0) && (_coreVar._currPlace == WELL)) {
|
|
|
|
_crep = 999;
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._selectedObjectId == 120) || (_coreVar._selectedObjectId == 140)) {
|
|
|
|
_coreVar._wellObjectId = _coreVar._selectedObjectId;
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(1, 1);
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 185;
|
2012-03-24 09:47:36 +01:00
|
|
|
displayEmptyHand();
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Close
|
|
|
|
* @remarks Originally called 'tfermer'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctClose() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_CLOSE));
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff < ROOM26) {
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (_keyPressedEsc)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 998;
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(7);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
2012-02-29 23:50:49 +01:00
|
|
|
int cx = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
2012-02-19 23:17:22 +01:00
|
|
|
++cx;
|
2012-03-23 23:26:27 +01:00
|
|
|
} while ((cx <= 6) && (_num != ord(_touv[cx])));
|
|
|
|
if (_num == ord(_touv[cx])) {
|
|
|
|
aniof(2, _num);
|
|
|
|
_crep = 998;
|
2012-03-23 00:35:19 +01:00
|
|
|
_touv[cx] = chr(0);
|
2012-10-10 08:19:54 +02:00
|
|
|
--_openObjCount;
|
|
|
|
if (_openObjCount < 0)
|
|
|
|
_openObjCount = 0;
|
2012-02-29 23:50:49 +01:00
|
|
|
int chai = 9999;
|
2011-12-23 22:15:35 +00:00
|
|
|
rechai(chai);
|
2012-03-23 07:44:04 +01:00
|
|
|
if (_mchai == chai)
|
|
|
|
_mchai = 0;
|
2012-03-02 08:38:41 +01:00
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 187;
|
2012-03-02 08:38:41 +01:00
|
|
|
}
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == ROOM26)
|
|
|
|
_crep = 999;
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Knock
|
|
|
|
* @remarks Originally called 'tfrapper'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctKnock() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_HIT));
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == LANDING) {
|
2012-03-14 18:25:17 +01:00
|
|
|
Alert::show(getEngineString(S_BEFORE_USE_DEP_MENU), 1);
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace < DOOR) {
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!(_anyone) && !(_keyPressedEsc)) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace < MOUNTAIN) && (_coreVar._currPlace != LANDING))
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 133;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace == ROOM26) {
|
2012-03-04 22:02:26 +01:00
|
|
|
int rand = (getRandomNumber(0, 8)) - 4;
|
2012-03-14 18:25:17 +01:00
|
|
|
_speechManager.startSpeech(11, rand, 1);
|
2012-10-10 08:19:54 +02:00
|
|
|
int p = getPresenceStats(rand, _coreVar._faithScore, _roomDoorId);
|
|
|
|
int l = _roomDoorId;
|
2012-10-08 08:00:00 +02:00
|
|
|
if (l != OWN_ROOM) {
|
2011-12-23 22:15:35 +00:00
|
|
|
if (p != -500) {
|
2012-03-04 22:02:26 +01:00
|
|
|
if (rand > p)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 190;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-24 09:47:36 +01:00
|
|
|
setPresenceFlags(l);
|
2012-03-06 22:47:25 +01:00
|
|
|
getKnockAnswer();
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-06 22:47:25 +01:00
|
|
|
getKnockAnswer();
|
2012-02-29 23:50:49 +01:00
|
|
|
}
|
|
|
|
|
2012-10-10 08:19:54 +02:00
|
|
|
if (_roomDoorId == GREEN_ROOM2)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 190;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 23:56:32 +01:00
|
|
|
/**
|
2012-02-29 08:15:54 +01:00
|
|
|
* Engine function - Self / Put
|
2012-02-20 23:56:32 +01:00
|
|
|
* @remarks Originally called 'tposer'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSelfPut() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_POSE));
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._selectedObjectId == 0)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 186;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff > 99) {
|
|
|
|
_crep = 999;
|
2011-12-23 22:15:35 +00:00
|
|
|
ajchai();
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_crep != 192)
|
2012-03-24 09:47:36 +01:00
|
|
|
displayEmptyHand();
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((_anyone) || (_keyPressedEsc))
|
2012-02-19 23:17:22 +01:00
|
|
|
return;
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(7);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 124;
|
|
|
|
if (_num != 0) {
|
2012-02-29 23:50:49 +01:00
|
|
|
int chai;
|
2011-12-23 22:15:35 +00:00
|
|
|
rechai(chai);
|
2012-02-19 23:17:22 +01:00
|
|
|
if (chai == 0)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-02-29 23:50:49 +01:00
|
|
|
int cx = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
2012-02-19 23:17:22 +01:00
|
|
|
++cx;
|
2012-03-23 23:26:27 +01:00
|
|
|
} while ((cx <= 6) && (_num != ord(_touv[cx])));
|
|
|
|
if (_num != ord(_touv[cx]))
|
|
|
|
_crep = 187;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-23 07:44:04 +01:00
|
|
|
_mchai = chai;
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 999;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(8);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0) {
|
|
|
|
_crep = 998;
|
|
|
|
if (_caff == PURPLE_ROOM) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._purpleRoomObjectId != 0)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._purpleRoomObjectId = _coreVar._selectedObjectId;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == ATTIC) {
|
|
|
|
if (_num == 1) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._atticBallHoleObjectId != 0)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._atticBallHoleObjectId = _coreVar._selectedObjectId;
|
|
|
|
} else if (_coreVar._atticRodHoleObjectId != 0) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-03-01 19:11:56 +01:00
|
|
|
} else {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._atticRodHoleObjectId = _coreVar._selectedObjectId;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-01 19:11:56 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == CRYPT) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._cryptObjectId != 0)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 188;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._cryptObjectId = _coreVar._selectedObjectId;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == WELL)
|
|
|
|
_crep = 185;
|
|
|
|
if ((_caff == CELLAR) || (_caff == SECRET_PASSAGE))
|
|
|
|
_crep = 124;
|
2011-12-23 22:15:35 +00:00
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 124;
|
|
|
|
if (_caff == WELL) {
|
2012-03-24 15:19:54 +01:00
|
|
|
setCoordinates(5);
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_num != 0)
|
|
|
|
_crep = 185;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == INSIDE_WELL)
|
|
|
|
_crep = 185;
|
|
|
|
if ((_crep == 999) || (_crep == 185) || (_crep == 998)) {
|
|
|
|
if (_crep == 999)
|
2012-02-19 23:17:22 +01:00
|
|
|
ajchai();
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_crep != 192)
|
2012-03-24 09:47:36 +01:00
|
|
|
displayEmptyHand();
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Listen
|
|
|
|
* @remarks Originally called 'tecouter'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctListen() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace != ROOM26)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 101;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-14 23:06:23 +01:00
|
|
|
if (_currBitIndex != 0)
|
2012-03-22 08:36:59 +01:00
|
|
|
++_coreVar._faithScore;
|
2012-03-24 09:47:36 +01:00
|
|
|
int rand;
|
2012-10-10 08:19:54 +02:00
|
|
|
int p = getPresenceStats(rand, _coreVar._faithScore, _roomDoorId);
|
|
|
|
int l = _roomDoorId;
|
2012-10-08 08:00:00 +02:00
|
|
|
if (l != OWN_ROOM) {
|
2011-12-23 22:15:35 +00:00
|
|
|
if (p != -500) {
|
2012-03-04 22:02:26 +01:00
|
|
|
if (rand > p)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 101;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-24 09:47:36 +01:00
|
|
|
setPresenceFlags(l);
|
2012-02-29 23:50:49 +01:00
|
|
|
int j, h, m;
|
2012-03-05 23:59:21 +01:00
|
|
|
updateHour(j, h, m);
|
2012-03-04 22:02:26 +01:00
|
|
|
rand = getRandomNumber(1, 100);
|
2011-12-23 22:15:35 +00:00
|
|
|
if ((h >= 0) && (h < 8)) {
|
2012-03-04 22:02:26 +01:00
|
|
|
if (rand > 30)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 101;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 178;
|
2012-03-04 22:02:26 +01:00
|
|
|
} else if (rand > 70)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 101;
|
2012-02-19 23:17:22 +01:00
|
|
|
else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 178;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 178;
|
2012-02-19 23:17:22 +01:00
|
|
|
}
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Eat
|
|
|
|
* @remarks Originally called 'tmanger'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctEat() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace > LANDING) && (_coreVar._currPlace < ROOM26)) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 148;
|
2012-03-01 19:11:56 +01:00
|
|
|
} else {
|
2012-03-24 15:19:54 +01:00
|
|
|
exitRoom();
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = DINING_ROOM;
|
2012-03-23 23:26:27 +01:00
|
|
|
_caff = 10;
|
2012-03-24 09:47:36 +01:00
|
|
|
resetRoomVariables(_coreVar._currPlace);
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2012-02-29 23:50:49 +01:00
|
|
|
|
|
|
|
int j, h, m;
|
2012-03-05 23:59:21 +01:00
|
|
|
updateHour(j, h, m);
|
2011-12-23 22:15:35 +00:00
|
|
|
if ((h == 12) || (h == 13) || (h == 19)) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore -= (_coreVar._faithScore / 7);
|
2012-03-01 19:11:56 +01:00
|
|
|
if (h == 12) {
|
2012-02-19 23:17:22 +01:00
|
|
|
if (m == 0)
|
|
|
|
h = 4;
|
|
|
|
else
|
|
|
|
h = 3;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if ((h == 13) || (h == 19)) {
|
2012-02-19 23:17:22 +01:00
|
|
|
if (m == 0)
|
|
|
|
h = 2;
|
|
|
|
else
|
|
|
|
h = 1;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
2012-03-27 22:54:50 +02:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
_jh += h;
|
|
|
|
_crep = 135;
|
2012-03-22 08:36:59 +01:00
|
|
|
prepareRoom();
|
2012-03-01 19:11:56 +01:00
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 134;
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Enter
|
|
|
|
* @remarks Originally called 'tentrer'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctEnter() {
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == MANOR_FRONT) || (_coreVar._currPlace == MANOR_BACK)) {
|
2012-03-14 18:25:17 +01:00
|
|
|
gotoDiningRoom();
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if (_coreVar._currPlace == LANDING)
|
2012-03-20 22:52:59 +01:00
|
|
|
showMoveMenuAlert();
|
2012-10-10 08:19:54 +02:00
|
|
|
else if (_roomDoorId == OWN_ROOM)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2012-10-10 08:19:54 +02:00
|
|
|
else if ((_roomDoorId == ROOM9) && (_coreVar._selectedObjectId != 136)) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 189;
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._teauto[8] = '*';
|
2012-02-19 23:17:22 +01:00
|
|
|
} else {
|
2012-02-29 23:50:49 +01:00
|
|
|
int z = 0;
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_blo)
|
2012-10-10 08:19:54 +02:00
|
|
|
z = getPresence(_roomDoorId);
|
2012-02-19 23:17:22 +01:00
|
|
|
if (z != 0) {
|
2012-10-10 08:19:54 +02:00
|
|
|
if ((_roomDoorId == TOILETS) || (_roomDoorId == BATHROOM))
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 179;
|
2012-02-19 23:17:22 +01:00
|
|
|
else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_x = (getRandomNumber(0, 10)) - 5;
|
|
|
|
_speechManager.startSpeech(7, _x, 1);
|
2011-12-23 22:15:35 +00:00
|
|
|
aniof(1, 1);
|
2012-03-27 22:54:50 +02:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
_x = convertBitIndexToCharacterIndex(z);
|
2012-03-22 08:36:59 +01:00
|
|
|
++_coreVar._faithScore;
|
|
|
|
_coreVar._currPlace = LANDING;
|
2012-03-23 00:35:19 +01:00
|
|
|
_msg[3] = MENU_DISCUSS;
|
2012-03-23 23:26:27 +01:00
|
|
|
_msg[4] = _menu._discussMenu[_x];
|
2012-03-14 18:25:17 +01:00
|
|
|
_syn = true;
|
2012-10-10 08:19:54 +02:00
|
|
|
if (_roomDoorId == ROOM9) {
|
2012-03-14 18:25:17 +01:00
|
|
|
_col = true;
|
2012-03-23 23:26:27 +01:00
|
|
|
_caff = 70;
|
2012-10-11 00:45:46 +02:00
|
|
|
drawPictureWithText();
|
|
|
|
handleDescriptionText(2, _caff);
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
2012-03-14 18:25:17 +01:00
|
|
|
_col = false;
|
2012-10-10 08:19:54 +02:00
|
|
|
resetRoomVariables(_roomDoorId);
|
|
|
|
_roomDoorId = OWN_ROOM;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-02-19 23:17:22 +01:00
|
|
|
} else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_x = (getRandomNumber(0, 10)) - 5;
|
|
|
|
_speechManager.startSpeech(7, _x, 1);
|
2012-02-19 23:17:22 +01:00
|
|
|
aniof(1, 1);
|
2012-03-27 22:54:50 +02:00
|
|
|
|
2012-10-10 08:19:54 +02:00
|
|
|
_coreVar._currPlace = _roomDoorId;
|
2012-02-19 23:17:22 +01:00
|
|
|
affrep();
|
2012-03-24 09:47:36 +01:00
|
|
|
resetRoomVariables(_coreVar._currPlace);
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2012-10-10 08:19:54 +02:00
|
|
|
_roomDoorId = OWN_ROOM;
|
2012-03-23 23:26:27 +01:00
|
|
|
_savedBitIndex = 0;
|
2012-03-14 23:06:23 +01:00
|
|
|
_currBitIndex = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Sleep
|
|
|
|
* @remarks Originally called 'tdormir'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSleep() {
|
2012-02-21 00:33:48 +01:00
|
|
|
int z, j, h, m;
|
2011-12-23 19:02:50 +00:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace > LANDING) && (_coreVar._currPlace < ROOM26)) {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 148;
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace != OWN_ROOM) {
|
2012-03-24 15:19:54 +01:00
|
|
|
exitRoom();
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = OWN_ROOM;
|
2011-12-23 22:15:35 +00:00
|
|
|
affrep();
|
2012-10-11 00:45:46 +02:00
|
|
|
drawPictureWithText();
|
2012-03-24 09:47:36 +01:00
|
|
|
resetRoomVariables(_coreVar._currPlace);
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-10-11 00:45:46 +02:00
|
|
|
clearVerbBar();
|
|
|
|
clearDescriptionBar();
|
2012-03-16 07:32:43 +01:00
|
|
|
prepareScreenType2();
|
2012-03-14 18:25:17 +01:00
|
|
|
ecr2(getEngineString(S_WANT_TO_WAKE_UP));
|
2012-03-05 23:59:21 +01:00
|
|
|
updateHour(j, h, m);
|
2012-02-21 00:33:48 +01:00
|
|
|
|
|
|
|
int answer;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
|
|
|
if (h < 8) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore -= (_coreVar._faithScore / 20);
|
2011-12-23 22:15:35 +00:00
|
|
|
z = (7 - h) * 2;
|
2012-02-19 23:17:22 +01:00
|
|
|
if (m == 30)
|
|
|
|
--z;
|
2012-03-23 23:26:27 +01:00
|
|
|
_jh += z;
|
2011-12-23 22:15:35 +00:00
|
|
|
h = 7;
|
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
_jh += 2;
|
2012-02-19 23:17:22 +01:00
|
|
|
++h;
|
|
|
|
if (h > 23)
|
|
|
|
h = 0;
|
2012-03-22 08:36:59 +01:00
|
|
|
prepareRoom();
|
2012-03-14 18:25:17 +01:00
|
|
|
answer = Alert::show(getEngineString(S_YES_NO), 1);
|
|
|
|
_anyone = false;
|
2012-02-24 23:55:17 +01:00
|
|
|
} while (answer != 1);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 998;
|
|
|
|
_num = 0;
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Force
|
|
|
|
* @remarks Originally called 'tdefoncer'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctForce() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_SMASH));
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff < 25)
|
2012-02-19 23:17:22 +01:00
|
|
|
tfleche();
|
2012-03-01 19:11:56 +01:00
|
|
|
|
2012-03-14 18:25:17 +01:00
|
|
|
if ((!_anyone) && (!_keyPressedEsc)) {
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._currPlace != ROOM26)
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 143;
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 2;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-01 19:11:56 +01:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Leave
|
|
|
|
* @remarks Originally called 'tsortir'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctLeave() {
|
2012-03-24 15:19:54 +01:00
|
|
|
exitRoom();
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 0;
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == MOUNTAIN) || (_coreVar._currPlace == MANOR_FRONT) || (_coreVar._currPlace == MANOR_BACK) || (_coreVar._currPlace == WELL))
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 997;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
2012-03-14 18:25:17 +01:00
|
|
|
int nextPlace = OWN_ROOM;
|
2012-02-29 23:50:49 +01:00
|
|
|
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace < CRYPT) || (_coreVar._currPlace == ROOM26))
|
2012-03-14 18:25:17 +01:00
|
|
|
nextPlace = DINING_ROOM;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if ((_coreVar._currPlace == DINING_ROOM) || (_coreVar._currPlace == CHAPEL))
|
2012-03-14 18:25:17 +01:00
|
|
|
nextPlace = MANOR_FRONT;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if ((_coreVar._currPlace < DINING_ROOM) || (_coreVar._currPlace == ATTIC))
|
2012-03-14 18:25:17 +01:00
|
|
|
nextPlace = LANDING;
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._currPlace == CRYPT) {
|
2012-03-14 18:25:17 +01:00
|
|
|
nextPlace = SECRET_PASSAGE;
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 176;
|
2012-03-22 08:36:59 +01:00
|
|
|
} else if (_coreVar._currPlace == SECRET_PASSAGE)
|
2012-03-24 15:19:54 +01:00
|
|
|
nextPlace = checkLeaveSecretPassage();
|
2012-03-22 08:36:59 +01:00
|
|
|
else if (_coreVar._currPlace == INSIDE_WELL)
|
2012-03-14 18:25:17 +01:00
|
|
|
nextPlace = WELL;
|
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_crep != 997)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = nextPlace;
|
2012-03-14 18:25:17 +01:00
|
|
|
|
2012-03-23 23:26:27 +01:00
|
|
|
_caff = nextPlace;
|
|
|
|
if (_crep == 0)
|
|
|
|
_crep = nextPlace;
|
2012-03-24 09:47:36 +01:00
|
|
|
resetRoomVariables(nextPlace);
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(nextPlace);
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Wait
|
|
|
|
* @remarks Originally called 'tattendre'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctWait() {
|
2012-03-23 23:26:27 +01:00
|
|
|
_savedBitIndex = 0;
|
2012-10-11 00:45:46 +02:00
|
|
|
clearVerbBar();
|
2012-02-21 00:33:48 +01:00
|
|
|
|
|
|
|
int answer;
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
2012-03-23 23:26:27 +01:00
|
|
|
++_jh;
|
2012-03-22 08:36:59 +01:00
|
|
|
prepareRoom();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_blo)
|
2012-03-24 15:19:54 +01:00
|
|
|
getPresence(_coreVar._currPlace);
|
2012-03-23 23:26:27 +01:00
|
|
|
if ((_currBitIndex != 0) && (_savedBitIndex == 0)) {
|
|
|
|
_crep = 998;
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace == ATTIC) || (_coreVar._currPlace == CELLAR))
|
2012-03-23 23:26:27 +01:00
|
|
|
initCaveOrCellar();
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._currPlace > OWN_ROOM) && (_coreVar._currPlace < DINING_ROOM))
|
2012-03-14 18:25:17 +01:00
|
|
|
_anyone = true;
|
2012-03-23 23:26:27 +01:00
|
|
|
_savedBitIndex = _currBitIndex;
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_anyone)
|
2012-03-22 08:36:59 +01:00
|
|
|
prepareRoom();
|
2011-12-23 22:15:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-10-11 00:45:46 +02:00
|
|
|
handleDescriptionText(2, 102);
|
2012-03-14 18:25:17 +01:00
|
|
|
answer = Alert::show(getEngineString(S_YES_NO), 1);
|
2012-02-24 23:55:17 +01:00
|
|
|
} while (answer != 2);
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 998;
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_anyone)
|
2012-03-22 08:36:59 +01:00
|
|
|
prepareRoom();
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Sound
|
|
|
|
* @remarks Originally called 'tsonder'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSound() {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_PROBE2));
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff < 27) {
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!(_anyone) && (!_keyPressedEsc))
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 145;
|
|
|
|
_num = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 23:56:32 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Discuss
|
|
|
|
* @remarks Originally called 'tparler'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctDiscuss() {
|
2011-12-30 22:52:56 +11:00
|
|
|
bool te[47];
|
2012-03-04 22:02:26 +01:00
|
|
|
int cy, cx, max, suj, co, lig, icm, i, choi, x, y, c;
|
2011-12-23 22:15:35 +00:00
|
|
|
char tou;
|
2011-12-30 21:34:33 +11:00
|
|
|
Common::String lib[47];
|
2011-12-26 23:56:30 +01:00
|
|
|
bool f;
|
2011-12-23 19:02:50 +00:00
|
|
|
|
2012-03-04 10:17:27 +01:00
|
|
|
endSearch();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (_col)
|
2012-02-19 23:17:22 +01:00
|
|
|
suj = 128;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
|
|
|
cx = 0;
|
|
|
|
do {
|
2012-02-19 23:17:22 +01:00
|
|
|
++cx;
|
2012-03-23 00:35:19 +01:00
|
|
|
} while (_menu._discussMenu[cx] != _msg[4]);
|
2012-03-23 23:26:27 +01:00
|
|
|
_caff = 69 + cx;
|
2012-10-11 00:45:46 +02:00
|
|
|
drawPictureWithText();
|
|
|
|
handleDescriptionText(2, _caff);
|
2012-03-23 23:26:27 +01:00
|
|
|
suj = _caff + 60;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-24 15:19:54 +01:00
|
|
|
testKey(false);
|
2011-12-23 22:15:35 +00:00
|
|
|
mennor();
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.hideMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
|
|
|
premtet();
|
2012-03-19 07:44:56 +01:00
|
|
|
startDialog(suj);
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
2012-02-25 21:13:24 +01:00
|
|
|
for (int ix = 1; ix <= 46; ++ix)
|
2012-02-19 23:17:22 +01:00
|
|
|
te[ix] = false;
|
2012-02-25 21:13:24 +01:00
|
|
|
for (int ix = 1; ix <= 45; ++ix) {
|
2012-03-23 00:35:19 +01:00
|
|
|
lib[ix] = getString(ix + kQuestionStringIndex);
|
2012-02-26 18:08:53 +01:00
|
|
|
for (i = lib[ix].size(); i <= 40; ++i)
|
2012-02-19 23:17:22 +01:00
|
|
|
lib[ix] = lib[ix] + ' ';
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
lib[46] = lib[45];
|
|
|
|
lib[45] = ' ';
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.showMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
do {
|
|
|
|
choi = 0;
|
|
|
|
icm = 0;
|
|
|
|
co = 0;
|
|
|
|
lig = 0;
|
|
|
|
do {
|
2012-02-21 23:09:29 +01:00
|
|
|
++icm;
|
2012-03-14 18:25:17 +01:00
|
|
|
_screenSurface.putxy(co, lig);
|
2012-03-22 08:36:59 +01:00
|
|
|
if (_coreVar._teauto[icm] == '*') {
|
2012-02-19 23:17:22 +01:00
|
|
|
if (te[icm])
|
|
|
|
writetp(lib[icm], 1);
|
|
|
|
else
|
|
|
|
writetp(lib[icm], 0);
|
2012-03-02 02:04:43 +01:00
|
|
|
}
|
|
|
|
|
2011-12-23 22:15:35 +00:00
|
|
|
if (icm == 23) {
|
|
|
|
lig = 0;
|
|
|
|
co = 320;
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
|
|
|
lig = lig + 8;
|
2012-02-24 23:55:17 +01:00
|
|
|
} while (icm != 42);
|
2012-03-14 18:25:17 +01:00
|
|
|
_screenSurface.putxy(320, 176);
|
2011-12-23 22:15:35 +00:00
|
|
|
writetp(lib[46], 0);
|
|
|
|
tou = '\0';
|
|
|
|
do {
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.moveMouse(f, tou);
|
2012-01-22 09:16:41 +11:00
|
|
|
CHECK_QUIT;
|
|
|
|
|
2012-03-21 08:32:36 +01:00
|
|
|
_mouse.getMousePosition(x, y, c);
|
2012-03-23 23:26:27 +01:00
|
|
|
x *= (3 - _res);
|
2012-02-19 23:17:22 +01:00
|
|
|
if (x > 319)
|
|
|
|
cx = 41;
|
|
|
|
else
|
|
|
|
cx = 1;
|
2012-02-21 23:09:29 +01:00
|
|
|
cy = ((uint)y >> 3) + 1; // 0-199 => 1-25
|
2011-12-30 23:09:21 +11:00
|
|
|
if ((cy > 23) || ((cx == 41) && ((cy >= 20) && (cy <= 22)))) {
|
2011-12-23 22:15:35 +00:00
|
|
|
if (choi != 0) {
|
|
|
|
lig = ((choi - 1) % 23) << 3;
|
2012-02-19 23:17:22 +01:00
|
|
|
if (choi > 23)
|
|
|
|
co = 320;
|
|
|
|
else
|
|
|
|
co = 0;
|
2012-03-14 18:25:17 +01:00
|
|
|
_screenSurface.putxy(co, lig);
|
2012-02-19 23:17:22 +01:00
|
|
|
if (te[choi])
|
|
|
|
writetp(lib[choi], 0);
|
|
|
|
else
|
|
|
|
writetp(lib[choi], 1);
|
|
|
|
te[choi] = !te[choi];
|
2011-12-23 22:15:35 +00:00
|
|
|
choi = 0;
|
|
|
|
}
|
|
|
|
} else {
|
2012-02-25 21:13:24 +01:00
|
|
|
int ix = cy;
|
2012-02-19 23:17:22 +01:00
|
|
|
if (cx == 41)
|
2012-03-13 08:14:19 +01:00
|
|
|
ix += 23;
|
2011-12-23 22:15:35 +00:00
|
|
|
if (ix != choi) {
|
|
|
|
if (choi != 0) {
|
|
|
|
lig = ((choi - 1) % 23) << 3;
|
2012-02-19 23:17:22 +01:00
|
|
|
if (choi > 23)
|
|
|
|
co = 320;
|
|
|
|
else
|
|
|
|
co = 0;
|
2012-03-14 18:25:17 +01:00
|
|
|
_screenSurface.putxy(co, lig);
|
2012-02-19 23:17:22 +01:00
|
|
|
if (te[choi])
|
|
|
|
writetp(lib[choi], 0);
|
|
|
|
else
|
|
|
|
writetp(lib[choi], 1);
|
2011-12-23 22:15:35 +00:00
|
|
|
te[choi] = ! te[choi];
|
|
|
|
}
|
2012-03-22 08:36:59 +01:00
|
|
|
if ((_coreVar._teauto[ix] == '*') || (ix == 46)) {
|
2011-12-23 22:15:35 +00:00
|
|
|
lig = ((ix - 1) % 23) << 3;
|
2012-02-19 23:17:22 +01:00
|
|
|
if (ix > 23)
|
|
|
|
co = 320;
|
|
|
|
else
|
|
|
|
co = 0;
|
2012-03-14 18:25:17 +01:00
|
|
|
_screenSurface.putxy(co, lig);
|
2012-02-19 23:17:22 +01:00
|
|
|
if (te[ix])
|
|
|
|
writetp(lib[ix], 0);
|
|
|
|
else
|
|
|
|
writetp(lib[ix], 1);
|
2011-12-23 22:15:35 +00:00
|
|
|
te[ix] = ! te[ix];
|
|
|
|
choi = ix;
|
2012-02-19 23:17:22 +01:00
|
|
|
} else
|
|
|
|
choi = 0;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
}
|
2012-03-14 18:25:17 +01:00
|
|
|
} while (!((tou == '\15') || (((c != 0) || getMouseClick()) && (choi != 0))));
|
|
|
|
setMouseClick(false);
|
2011-12-23 22:15:35 +00:00
|
|
|
if (choi != 46) {
|
2012-02-25 21:13:24 +01:00
|
|
|
int ix = choi - 1;
|
2012-03-14 18:25:17 +01:00
|
|
|
if (_col) {
|
|
|
|
_col = false;
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = 15;
|
2012-10-10 08:19:54 +02:00
|
|
|
if (_openObjCount > 0)
|
2012-02-19 23:17:22 +01:00
|
|
|
max = 8;
|
|
|
|
else
|
|
|
|
max = 4;
|
2012-03-04 22:02:26 +01:00
|
|
|
if (getRandomNumber(1, max) == 2)
|
2012-02-19 23:17:22 +01:00
|
|
|
suj = 129;
|
2011-12-23 22:15:35 +00:00
|
|
|
else {
|
|
|
|
suj = 138;
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += (3 * (_coreVar._faithScore / 10));
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
} else if (_nbrep[_caff - 69] < _nbrepm[_caff - 69]) {
|
2012-03-24 22:48:47 +01:00
|
|
|
suj = _tabdon[kArep + (ix << 3) + (_caff - 70)];
|
|
|
|
_coreVar._faithScore += _tabdon[kArcf + ix];
|
2012-03-23 23:26:27 +01:00
|
|
|
++_nbrep[_caff - 69];
|
2011-12-23 22:15:35 +00:00
|
|
|
} else {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += 3;
|
2011-12-23 22:15:35 +00:00
|
|
|
suj = 139;
|
|
|
|
}
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.hideMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
|
|
|
premtet();
|
2012-03-19 07:44:56 +01:00
|
|
|
startDialog(suj);
|
|
|
|
_mouse.showMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
if ((suj == 84) || (suj == 86)) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._pourc[5] = '*';
|
|
|
|
_coreVar._teauto[7] = '*';
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
if ((suj == 106) || (suj == 108) || (suj == 94)) {
|
2012-03-01 19:11:56 +01:00
|
|
|
for (int indx = 29; indx <= 31; ++indx)
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._teauto[indx] = '*';
|
|
|
|
_coreVar._pourc[7] = '*';
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
|
|
|
if (suj == 70) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._pourc[8] = '*';
|
|
|
|
_coreVar._teauto[32] = '*';
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.hideMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.showMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-02-24 23:55:17 +01:00
|
|
|
} while ((choi != 46) && (suj != 138));
|
2012-03-14 18:25:17 +01:00
|
|
|
if (_col) {
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._faithScore += (3 * (_coreVar._faithScore / 10));
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.hideMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
|
|
|
premtet();
|
2012-03-19 07:44:56 +01:00
|
|
|
startDialog(138);
|
|
|
|
_mouse.showMouse();
|
2012-03-14 18:25:17 +01:00
|
|
|
_col = false;
|
2012-03-22 08:36:59 +01:00
|
|
|
_coreVar._currPlace = LANDING;
|
2011-12-23 22:15:35 +00:00
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
_controlMenu = 0;
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.hideMouse();
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
2012-03-12 01:26:02 +01:00
|
|
|
drawRightFrame();
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.showMouse();
|
2012-03-14 23:06:23 +01:00
|
|
|
showPeoplePresent(_currBitIndex);
|
2012-03-22 08:36:59 +01:00
|
|
|
prepareRoom();
|
2012-02-21 00:33:48 +01:00
|
|
|
drawClock();
|
2011-12-23 22:15:35 +00:00
|
|
|
affrep();
|
|
|
|
/* chech;*/
|
2012-03-24 15:19:54 +01:00
|
|
|
_menu.setDestinationText(_coreVar._currPlace);
|
2012-10-11 00:45:46 +02:00
|
|
|
clearVerbBar();
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Smell
|
|
|
|
* @remarks Originally called 'tsentir'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctSmell() {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 119;
|
|
|
|
if (_caff < ROOM26) {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_SMELL));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!(_anyone) && !(_keyPressedEsc))
|
2012-03-23 23:26:27 +01:00
|
|
|
if (_caff == 16)
|
|
|
|
_crep = 153;
|
|
|
|
} else if (_caff == 123)
|
|
|
|
_crep = 110;
|
|
|
|
_num = 0;
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-20 08:28:06 +01:00
|
|
|
/**
|
|
|
|
* Engine function - Scratch
|
|
|
|
* @remarks Originally called 'tgratter'
|
|
|
|
*/
|
2012-03-10 14:17:05 +01:00
|
|
|
void MortevielleEngine::fctScratch() {
|
2012-03-23 23:26:27 +01:00
|
|
|
_crep = 155;
|
|
|
|
if (_caff < 27) {
|
2012-03-14 18:25:17 +01:00
|
|
|
if (!_syn)
|
|
|
|
ecr3(getEngineString(S_SCRATCH));
|
2011-12-23 22:15:35 +00:00
|
|
|
tfleche();
|
|
|
|
}
|
2012-03-23 23:26:27 +01:00
|
|
|
_num = 0;
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-12 14:22:56 +11:00
|
|
|
/**
|
|
|
|
* The game is over
|
|
|
|
* @remarks Originally called 'tmaj1'
|
|
|
|
*/
|
|
|
|
void MortevielleEngine::endGame() {
|
|
|
|
_quitGame = true;
|
2011-12-23 22:15:35 +00:00
|
|
|
tlu(13, 152);
|
2012-03-24 09:47:36 +01:00
|
|
|
displayEmptyHand();
|
2012-10-11 00:45:46 +02:00
|
|
|
clearUpperLeftPart();
|
|
|
|
clearDescriptionBar();
|
|
|
|
clearVerbBar();
|
|
|
|
handleDescriptionText(9, 1509);
|
2012-03-24 15:19:54 +01:00
|
|
|
testKey(false);
|
2012-03-19 07:44:56 +01:00
|
|
|
_mouse.hideMouse();
|
2012-03-23 23:26:27 +01:00
|
|
|
_caff = 70;
|
2012-03-24 22:00:28 +01:00
|
|
|
_text.taffich();
|
2011-12-23 22:15:35 +00:00
|
|
|
hirs();
|
|
|
|
premtet();
|
2012-03-19 07:44:56 +01:00
|
|
|
startDialog(141);
|
|
|
|
_mouse.showMouse();
|
2012-10-11 00:45:46 +02:00
|
|
|
clearUpperLeftPart();
|
|
|
|
handleDescriptionText(9, 1509);
|
|
|
|
handleDescriptionText(2, 142);
|
2012-03-24 15:19:54 +01:00
|
|
|
testKey(false);
|
2012-03-23 23:26:27 +01:00
|
|
|
_caff = 32;
|
2012-10-11 00:45:46 +02:00
|
|
|
drawPictureWithText();
|
|
|
|
handleDescriptionText(6, 34);
|
|
|
|
handleDescriptionText(2, 35);
|
2012-03-16 07:32:43 +01:00
|
|
|
startMusicOrSpeech(0);
|
2012-03-24 15:19:54 +01:00
|
|
|
testKey(false);
|
2012-03-27 22:54:50 +02:00
|
|
|
// A wait message was displayed.
|
2012-03-24 15:19:54 +01:00
|
|
|
// testKey (aka tkey1) was called before and after.
|
2012-03-05 00:00:48 +01:00
|
|
|
// Most likely the double call is useless, thus removed
|
|
|
|
//
|
2012-03-24 15:19:54 +01:00
|
|
|
// testKey(false);
|
2012-03-06 08:29:06 +01:00
|
|
|
resetVariables();
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2012-02-12 14:22:56 +11:00
|
|
|
/**
|
|
|
|
* You lost!
|
|
|
|
* @remarks Originally called 'tencore'
|
|
|
|
*/
|
2012-03-14 18:25:17 +01:00
|
|
|
void MortevielleEngine::askRestart() {
|
2012-10-11 00:45:46 +02:00
|
|
|
clearDescriptionBar();
|
2012-03-16 07:32:43 +01:00
|
|
|
startMusicOrSpeech(0);
|
2012-03-24 15:19:54 +01:00
|
|
|
testKey(false);
|
2012-03-24 09:47:36 +01:00
|
|
|
displayEmptyHand();
|
2012-03-06 08:29:06 +01:00
|
|
|
resetVariables();
|
2012-03-13 00:06:15 +01:00
|
|
|
initGame();
|
2012-03-16 07:32:43 +01:00
|
|
|
_currHour = 10;
|
|
|
|
_currHalfHour = 0;
|
|
|
|
_currDay = 0;
|
|
|
|
_minute = 0;
|
|
|
|
_hour = 10;
|
|
|
|
_day = 0;
|
2012-10-11 00:45:46 +02:00
|
|
|
handleDescriptionText(2, 180);
|
2012-03-03 00:23:27 +01:00
|
|
|
|
2012-03-14 18:25:17 +01:00
|
|
|
int answer = Alert::show(getEngineString(S_YES_NO), 1);
|
2012-02-21 00:33:48 +01:00
|
|
|
_quitGame = (answer != 1);
|
2011-12-23 19:02:50 +00:00
|
|
|
}
|
2011-12-26 21:30:46 +01:00
|
|
|
|
2011-12-26 22:08:18 +01:00
|
|
|
} // End of namespace Mortevielle
|