Initial commit
This commit is contained in:
949
engines/mads/phantom/game_phantom.cpp
Normal file
949
engines/mads/phantom/game_phantom.cpp
Normal file
@@ -0,0 +1,949 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#include "mads/mads.h"
|
||||
#include "mads/game.h"
|
||||
#include "mads/screen.h"
|
||||
#include "mads/msurface.h"
|
||||
#include "mads/phantom/game_phantom.h"
|
||||
//#include "mads/nebular/dialogs_nebular.h"
|
||||
#include "mads/phantom/globals_phantom.h"
|
||||
#include "mads/phantom/phantom_scenes.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
Catacombs _easyCatacombs[32] = {
|
||||
{ 401, { -1, 1, 2, 6 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 404, { 10, 11, 3, 0 }, { 2, 3, 0, 1 }, MAZE_EVENT_PUDDLE },
|
||||
{ 404, { 0, 3, 4, -2 }, { 2, 3, 0, 1 }, MAZE_EVENT_BLOCK },
|
||||
{ 401, { 1, 14, 5, 2 }, { 2, 3, 0, 1 }, MAZE_EVENT_POT },
|
||||
{ 453, { 2, 4, -1, 4 }, { 2, 3, 0, 1 }, MAZE_EVENT_DRAIN },
|
||||
{ 403, { 3, 6, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_PLANK },
|
||||
{ 406, { -1, 0, -1, 5 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 453, { -1, 8, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 406, { -1, 9, -1, 7 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 401, { 1, -1, 10, 8 }, { 2, 3, 0, 1 }, MAZE_EVENT_RAT_NEST | MAZE_EVENT_SKULL },
|
||||
{ 408, { 9, -1, 1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 453, { 12, -1, -1, 1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_STONE },
|
||||
{ 408, { 13, -1, 11, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 401, { 13, 20, 12, 13 }, { 3, 3, 0, 0 }, MAZE_EVENT_BRICK },
|
||||
{ 453, { 16, 15, -1, 3 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_RAT_NEST },
|
||||
{ 456, { -1, -1, -1, 14 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 404, { -1, 17, 14, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_WEB | MAZE_EVENT_POT },
|
||||
{ 401, { 18, -1, 19, 16 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 408, { -1, -1, 17, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 403, { 17, -1, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_HOLE | MAZE_EVENT_WEB },
|
||||
{ 403, { 21, 22, -1, 13 }, { 2, 3, 0, 1 }, MAZE_EVENT_WEB | MAZE_EVENT_SKULL },
|
||||
{ 404, { -1, -1, 20, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 406, { -1, 23, -1, 20 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 404, { 24, 23, 23, 22 }, { 2, 2, 1, 1 }, MAZE_EVENT_RAT_NEST | MAZE_EVENT_BRICK },
|
||||
{ 401, { -1, 1, 23, 25 }, { 2, 1, 0, 1 }, MAZE_EVENT_PUDDLE | MAZE_EVENT_POT | MAZE_EVENT_BRICK },
|
||||
{ 407, { 29, 24, 28, 26 }, { 3, 3, 1, 1 }, MAZE_EVENT_NONE },
|
||||
{ 401, { 27, 25, 23, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_SKULL },
|
||||
{ 404, { -1, 28, 26, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_WEB | MAZE_EVENT_FALLEN_BLOCK },
|
||||
{ 456, { -1, 25, -1, 27 }, { 2, 2, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 406, { -1, 30, -1, 25 }, { 2, 3, 0, 0 }, MAZE_EVENT_NONE },
|
||||
{ 453, { -3, 30, -1, 29 }, { 2, 3, 0, 1 }, MAZE_EVENT_STONE | MAZE_EVENT_RAT_NEST | MAZE_EVENT_WEB },
|
||||
{ 408, { -5, -1, -4, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_WEB | MAZE_EVENT_BRICK }
|
||||
};
|
||||
|
||||
Catacombs _hardCatacombs[62] = {
|
||||
{ 401, { -1, 1, 2, 6 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 404, { 10, 11, 3, 0 }, { 2, 3, 0, 1 }, MAZE_EVENT_PUDDLE },
|
||||
{ 404, { 0, 3, 4, -2 }, { 2, 3, 0, 1 }, MAZE_EVENT_BLOCK },
|
||||
{ 401, { 1, 20, 5, 2 }, { 2, 0, 0, 1 }, MAZE_EVENT_POT },
|
||||
{ 453, { 2, 4, -1, 4 }, { 2, 3, 0, 1 }, MAZE_EVENT_DRAIN },
|
||||
{ 403, { 3, 6, -1, 4 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_PLANK },
|
||||
{ 406, { -1, 0, -1, 5 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 453, { -1, 8, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 406, { -1, 9, -1, 7 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 401, { 1, -1, 10, 8 }, { 0, 3, 0, 1 }, MAZE_EVENT_RAT_NEST | MAZE_EVENT_SKULL },
|
||||
{ 408, { 9, -1, 1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 453, { 12, -1, -1, 1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_STONE },
|
||||
{ 408, { 13, -1, 11, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 401, { 13, 21, 12, 13 }, { 3, 3, 0, 0 }, MAZE_EVENT_BRICK },
|
||||
{ 453, { 16, 15, -1, 20 }, { 2, 3, 0, 2 }, MAZE_EVENT_RAT_NEST | MAZE_EVENT_BRICK },
|
||||
{ 456, { -1, -1, -1, 14 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 404, { -1, 17, 14, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_WEB | MAZE_EVENT_POT },
|
||||
{ 401, { 18, -1, 19, 16 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 408, { -1, -1, 17, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 403, { 17, -1, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_HOLE | MAZE_EVENT_WEB },
|
||||
{ 408, { 3, -1, 14, -1 }, { 1, 3, 3, 1 }, MAZE_EVENT_NONE },
|
||||
{ 404, { 9, 30, 22, 13 }, { 0, 3, 0, 1 }, MAZE_EVENT_RAT_NEST },
|
||||
{ 403, { 21, 23, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_HOLE | MAZE_EVENT_WEB },
|
||||
{ 401, { -1, -1, 24, 22 }, { 2, 3, 3, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 406, { -1, 26, -1, 23 }, { 2, 0, 0, 2 }, MAZE_EVENT_NONE },
|
||||
{ 407, { 36, 33, 35, 34 }, { 3, 3, 1, 1 }, MAZE_EVENT_NONE },
|
||||
{ 453, { 24, 27, -1, -1 }, { 1, 0, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 403, { 26, -1, -1, 28 }, { 1, 3, 0, 0 }, MAZE_EVENT_BRICK | MAZE_EVENT_SKULL },
|
||||
{ 404, { 27, 28, 28, 29 }, { 3, 2, 1, 2 }, MAZE_EVENT_NONE },
|
||||
{ 408, { -1, -1, 28, -1 }, { 2, 3, 3, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 406, { -1, 31, -1, 21 }, { 2, 0, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 401, { 30, 33, 1, -1 }, { 1, 2, 1, 1 }, MAZE_EVENT_PUDDLE | MAZE_EVENT_POT },
|
||||
{ 456, { -1, 31, -1, 33 }, { 2, 1, 0, 0 }, MAZE_EVENT_NONE },
|
||||
{ 404, { 32, -1, 31, 25 }, { 3, 3, 1, 1 }, MAZE_EVENT_NONE },
|
||||
{ 401, { 46, 25, 31, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_SKULL },
|
||||
{ 401, { -1, 25, 41, -1 }, { 2, 2, 1, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_POT },
|
||||
{ 406, { -1, 37, -1, 25 }, { 2, 3, 0, 0 }, MAZE_EVENT_NONE },
|
||||
{ 453, { -3, 37, -1, 36 }, { 2, 3, 0, 1 }, MAZE_EVENT_STONE | MAZE_EVENT_RAT_NEST | MAZE_EVENT_WEB },
|
||||
{ 408, { 57, -1, 54, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 408, { 40, -1, -4, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_WEB },
|
||||
{ 404, { 40, 40, 39, 53 }, { 1, 0, 0, 1 }, MAZE_EVENT_BLOCK | MAZE_EVENT_FALLEN_BLOCK },
|
||||
{ 456, { -1, 35, -1, 42 }, { 2, 2, 0, 2 }, MAZE_EVENT_NONE },
|
||||
{ 408, { 43, -1, 41, -1 }, { 1, 3, 3, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 406, { -1, 42, -1, 61 }, { 2, 0, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 403, { 58, 45, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_RAT_NEST },
|
||||
{ 401, { 34, -1, 46, 44 }, { 0, 3, 0, 1 }, MAZE_EVENT_RAT_NEST | MAZE_EVENT_BRICK },
|
||||
{ 404, { 45, -1, 34, 47 }, { 2, 3, 0, 1 }, MAZE_EVENT_WEB | MAZE_EVENT_FALLEN_BLOCK },
|
||||
{ 406, { -1, 46, -1, 48 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 403, { 49, 47, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_SKULL | MAZE_EVENT_WEB },
|
||||
{ 408, { 50, -1, 48, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 408, { 51, -1, 49, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 408, { 52, -1, 50, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 408, { -1, -1, 51, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK },
|
||||
{ 406, { -1, 40, -1, 54 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 403, { 38, 53, -1, 55 }, { 2, 3, 0, 1 }, MAZE_EVENT_SKULL },
|
||||
{ 453, { 56, 54, -1, -1 }, { 2, 3, 0, 1 }, MAZE_EVENT_BRICK | MAZE_EVENT_WEB },
|
||||
{ 401, { 56, -5, 55, 56 }, { 3, 3, 0, 0 }, MAZE_EVENT_BRICK | MAZE_EVENT_SKULL },
|
||||
{ 404, { -1, 57, 38, 57 }, { 2, 3, 0, 1 }, MAZE_EVENT_POT | MAZE_EVENT_BLOCK },
|
||||
{ 404, { 59, 59, 44, 60 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 404, { 59, 60, 59, 58 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 404, { 61, 58, 59, 59 }, { 2, 3, 0, 1 }, MAZE_EVENT_NONE },
|
||||
{ 404, { 34, 43, 60, 44 }, { 0, 3, 0, 1 }, MAZE_EVENT_NONE }
|
||||
};
|
||||
|
||||
GamePhantom::GamePhantom(MADSEngine *vm) : Game(vm) {
|
||||
_surface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
|
||||
_difficulty = DIFFICULTY_HARD;
|
||||
_catacombs = nullptr;
|
||||
_catacombSize = -1;
|
||||
}
|
||||
|
||||
void GamePhantom::startGame() {
|
||||
_scene._priorSceneId = 0;
|
||||
_scene._currentSceneId = -1;
|
||||
_scene._nextSceneId = 101;
|
||||
|
||||
initializeGlobals();
|
||||
}
|
||||
|
||||
void GamePhantom::initializeGlobals() {
|
||||
_globals.reset();
|
||||
setupCatacombs();
|
||||
|
||||
_player._facing = FACING_NORTH;
|
||||
_player._turnToFacing = FACING_NORTH;
|
||||
|
||||
_globals[kTempVar] = false;
|
||||
_globals[kRoom103104Transition] = 1; // new room
|
||||
_globals[kCurrentYear] = 1993;
|
||||
_globals[kTrapDoorStatus] = 0; // open
|
||||
_globals[kChristineDoorStatus] = 0; // Christine is in her room
|
||||
_globals[kSandbagStatus] = 0; // sandbag is secure
|
||||
_globals[kJacquesStatus] = 0; // alive
|
||||
_globals[kChrisFStatus] = 1; // Christine F. is alive in 1993
|
||||
_globals[kBrieTalkStatus] = 0; // before Brie motions
|
||||
_globals[kPanelIn206] = 0; // not discovered
|
||||
_globals[kFightStatus] = 0;
|
||||
_globals[kJuliesDoor] = 1; // cracked open
|
||||
_globals[kPrompterStandStatus] = 0;
|
||||
_globals[kChrisDStatus] = 0; // before love
|
||||
_globals[kJulieNameIsKnown] = 0;
|
||||
_globals[kDoorsIn205] = 0; // both locked
|
||||
_globals[kMadameGiryLocation] = 1; // middle
|
||||
_globals[kTicketPeoplePresent] = 0;
|
||||
_globals[kCoffinStatus] = 0; // closed and locked
|
||||
_globals[kDoneBrieConv203] = 0;
|
||||
_globals[kFlorentNameIsKnown] = 0;
|
||||
_globals[kDegasNameIsKnown] = 0;
|
||||
_globals[kMadameGiryShowsUp] = false;
|
||||
_globals[kJacquesNameIsKnown] = 0;
|
||||
_globals[kCharlesNameIsKnown] = false;
|
||||
_globals[kTopFloorLocked] = true;
|
||||
_globals[kMadameNameIsKnown] = 0;
|
||||
_globals[kChrisKickedRaoulOut] = false;
|
||||
_globals[kLookedAtCase] = false;
|
||||
_globals[kRingIsOnFinger] = false;
|
||||
_globals[kHeListened] = false;
|
||||
_globals[kKnockedOverHead] = false;
|
||||
_globals[kObservedPhan104] = false;
|
||||
_globals[kReadBook] = false;
|
||||
_globals[kCanFindBookInLibrary] = false;
|
||||
_globals[kLookedAtSkullFace] = false;
|
||||
_globals[kScannedBookcase] = false;
|
||||
_globals[kRanConvIn205] = false;
|
||||
_globals[kDoneRichConv203] = false;
|
||||
_globals[kHintThatDaaeIsHome1] = false;
|
||||
_globals[kHintThatDaaeIsHome2] = false;
|
||||
_globals[kMakeBrieLeave203] = false;
|
||||
_globals[kMakeRichLeave203] = false;
|
||||
_globals[kCameFromFade] = false;
|
||||
_globals[kChristineToldEnvelope] = false;
|
||||
_globals[kLeaveAngelMusicOn] = false;
|
||||
_globals[kDoorIn409IsOpen] = false;
|
||||
_globals[kPriestPistonPuke] = false;
|
||||
_globals[kCobwebIsCut] = false;
|
||||
_globals[kChristineIsInBoat] = false;
|
||||
_globals[kRightDoorIsOpen504] = false;
|
||||
_globals[kChrisLeft505] = false;
|
||||
_globals[kChrisWillTakeSeat] = true;
|
||||
_globals[kFlickedLever1] = 0;
|
||||
_globals[kFlickedLever2] = 0;
|
||||
_globals[kFlickedLever3] = 0;
|
||||
_globals[kFlickedLever4] = 0;
|
||||
_globals[kPlayerScore] = 0;
|
||||
_globals[kPlayerScoreFlags] = 0;
|
||||
|
||||
_globals[kMusicSelected] = _vm->getRandomNumber(1, 4);
|
||||
|
||||
_player._spritesPrefix = "RAL"; // Fixed prefix
|
||||
Player::preloadSequences("RAL", 1);
|
||||
}
|
||||
|
||||
void GamePhantom::setSectionHandler() {
|
||||
delete _sectionHandler;
|
||||
|
||||
switch (_sectionNumber) {
|
||||
case 1:
|
||||
_sectionHandler = new Section1Handler(_vm);
|
||||
break;
|
||||
case 2:
|
||||
_sectionHandler = new Section2Handler(_vm);
|
||||
break;
|
||||
case 3:
|
||||
_sectionHandler = new Section3Handler(_vm);
|
||||
break;
|
||||
case 4:
|
||||
_sectionHandler = new Section4Handler(_vm);
|
||||
break;
|
||||
case 5:
|
||||
_sectionHandler = new Section5Handler(_vm);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void GamePhantom::checkShowDialog() {
|
||||
// TODO: Copied from Nebular
|
||||
if (_vm->_dialogs->_pendingDialog && _player._stepEnabled && !_globals[5]) {
|
||||
_player.releasePlayerSprites();
|
||||
|
||||
// HACK: Skip the main menu (since it'll then try to show Rex's main menu)
|
||||
if (_vm->_dialogs->_pendingDialog == DIALOG_MAIN_MENU)
|
||||
_vm->_dialogs->_pendingDialog = DIALOG_NONE;
|
||||
|
||||
_vm->_dialogs->showDialog();
|
||||
_vm->_dialogs->_pendingDialog = DIALOG_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void GamePhantom::genericObjectExamine() {
|
||||
MADSAction &action = _scene._action;
|
||||
int id = _objects.getIdFromDesc(action._activeAction._objectNameId);
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_RED_FRAME))
|
||||
_vm->_dialogs->showItem(id, (_globals[kCurrentYear] == 1993) ? 802 : 842, 0);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_YELLOW_FRAME))
|
||||
_vm->_dialogs->showItem(id, (_globals[kCurrentYear] == 1993) ? 804 : 843, 0);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_BLUE_FRAME))
|
||||
_vm->_dialogs->showItem(id, (_globals[kCurrentYear] == 1993) ? 817 : 844, 0);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_GREEN_FRAME))
|
||||
_vm->_dialogs->showItem(id, (_globals[kCurrentYear] == 1993) ? 819 : 845, 0);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_LANTERN))
|
||||
_vm->_dialogs->showItem(id, (_globals[kLanternStatus] == 1) ? 831 : 801, 0);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_SMALL_NOTE))
|
||||
_vm->_dialogs->showItem(OBJ_SMALL_NOTE, 846, 2);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_PARCHMENT))
|
||||
_vm->_dialogs->showItem(OBJ_PARCHMENT, 812, 3);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_LETTER))
|
||||
_vm->_dialogs->showItem(OBJ_LETTER, 813, 4);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_NOTICE))
|
||||
_vm->_dialogs->showItem(OBJ_NOTICE, 814, 5);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_CRUMPLED_NOTE))
|
||||
_vm->_dialogs->showItem(OBJ_CRUMPLED_NOTE, 816, 6);
|
||||
else if (action.isAction(VERB_LOOK, NOUN_LARGE_NOTE))
|
||||
_vm->_dialogs->showItem(OBJ_LARGE_NOTE, 818, 7);
|
||||
else
|
||||
_vm->_dialogs->showItem(id, 800 + id, 0);
|
||||
}
|
||||
|
||||
void GamePhantom::doObjectAction() {
|
||||
MADSAction &action = _scene._action;
|
||||
|
||||
if ((_scene._currentSceneId >= 401) && (_scene._currentSceneId <= 456)
|
||||
&& (action.isObject(NOUN_RED_FRAME) || action.isObject(NOUN_YELLOW_FRAME) || action.isObject(NOUN_GREEN_FRAME) || action.isObject(NOUN_BLUE_FRAME))
|
||||
&& action.isAction(VERB_PUT)) {
|
||||
if (action.isTarget(NOUN_UNLUCKY_ADVENTURER)) {
|
||||
_vm->_dialogs->show(35);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
} else if (action.isTarget(NOUN_HOLE)) {
|
||||
_vm->_dialogs->show(36);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
} else if (action.isTarget(NOUN_GRATE)) {
|
||||
_vm->_dialogs->show(37);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
} else if (action.isTarget(NOUN_WALL)) {
|
||||
_vm->_dialogs->show(38);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (action._lookFlag) {
|
||||
_vm->_dialogs->show(810);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_PUT, NOUN_RED_FRAME) || action.isAction(VERB_PUT, NOUN_BLUE_FRAME) || action.isAction(VERB_PUT, NOUN_YELLOW_FRAME) || action.isAction(VERB_PUT, NOUN_GREEN_FRAME)) {
|
||||
_vm->_dialogs->show((action.isTarget(NOUN_PUDDLE)) ? 40124 : 40125);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_WEAR, NOUN_WEDDING_RING)) {
|
||||
if (_globals[kRingIsOnFinger])
|
||||
_vm->_dialogs->show(849);
|
||||
else {
|
||||
_vm->_dialogs->show(835);
|
||||
_globals[kRingIsOnFinger] = true;
|
||||
}
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_REMOVE, NOUN_WEDDING_RING)) {
|
||||
if (!_globals[kRingIsOnFinger])
|
||||
_vm->_dialogs->show(848);
|
||||
else {
|
||||
_vm->_dialogs->show(836);
|
||||
_globals[kRingIsOnFinger] = false;
|
||||
}
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_ARCHWAY_TO_WEST) || action.isAction(VERB_LOOK, NOUN_ARCHWAY_TO_EAST) || action.isAction(VERB_LOOK, NOUN_ARCHWAY_TO_NORTH)) {
|
||||
_vm->_dialogs->show(34);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_ATTACK, NOUN_CHRISTINE)) {
|
||||
_vm->_dialogs->show(33);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_KEY)) {
|
||||
_vm->_dialogs->showItem(OBJ_KEY, 800, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_SANDBAG)) {
|
||||
_vm->_dialogs->showItem(OBJ_SANDBAG, 803, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_SMALL_NOTE) || action.isAction(VERB_READ, NOUN_SMALL_NOTE)) {
|
||||
_vm->_dialogs->showItem(OBJ_SMALL_NOTE, 806, 2);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_ROPE)) {
|
||||
_vm->_dialogs->showItem(OBJ_ROPE, 807, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_SWORD)) {
|
||||
_vm->_dialogs->showItem(OBJ_SWORD, 808, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_ENVELOPE) || action.isAction(VERB_READ, NOUN_ENVELOPE)) {
|
||||
_vm->_dialogs->showItem(OBJ_ENVELOPE, 809, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_TICKET) || action.isAction(VERB_READ, NOUN_TICKET)) {
|
||||
_vm->_dialogs->showItem(OBJ_TICKET, 810, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_PIECE_OF_PAPER) || action.isAction(VERB_READ, NOUN_PIECE_OF_PAPER)) {
|
||||
_vm->_dialogs->showItem(OBJ_PIECE_OF_PAPER, 811, 1);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_PARCHMENT) || action.isAction(VERB_READ, NOUN_PARCHMENT)) {
|
||||
_vm->_dialogs->showItem(OBJ_PARCHMENT, 812, 3);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_LETTER) || action.isAction(VERB_READ, NOUN_LETTER)) {
|
||||
_vm->_dialogs->showItem(OBJ_LETTER, 813, 4);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_NOTICE) || action.isAction(VERB_READ, NOUN_NOTICE)) {
|
||||
_vm->_dialogs->showItem(OBJ_NOTICE, 814, 5);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_BOOK) || action.isAction(VERB_READ, NOUN_BOOK)) {
|
||||
_vm->_dialogs->showItem(OBJ_BOOK, 815, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_CRUMPLED_NOTE) || action.isAction(VERB_READ, NOUN_CRUMPLED_NOTE)) {
|
||||
_vm->_dialogs->showItem(OBJ_CRUMPLED_NOTE, 816, 6);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_LARGE_NOTE) || action.isAction(VERB_READ, NOUN_LARGE_NOTE)) {
|
||||
_vm->_dialogs->showItem(OBJ_LARGE_NOTE, 818, 7);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_MUSIC_SCORE) || action.isAction(VERB_READ, NOUN_MUSIC_SCORE)) {
|
||||
_vm->_dialogs->showItem(OBJ_MUSIC_SCORE, 820, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_WEDDING_RING)) {
|
||||
_vm->_dialogs->showItem(OBJ_WEDDING_RING, 821, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_CABLE_HOOK)) {
|
||||
_vm->_dialogs->showItem(OBJ_CABLE_HOOK, 822, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_ROPE_WITH_HOOK)) {
|
||||
_vm->_dialogs->showItem(OBJ_ROPE_WITH_HOOK, 823, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK, NOUN_OAR)) {
|
||||
_vm->_dialogs->showItem(OBJ_OAR, 824, 0);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_LOOK) && _objects.isInInventory(_objects.getIdFromDesc(action._activeAction._objectNameId))) {
|
||||
genericObjectExamine();
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_TURN_ON, NOUN_LANTERN)) {
|
||||
if ((_globals[kLanternStatus] == 1) && !_trigger)
|
||||
_vm->_dialogs->show(828);
|
||||
else {
|
||||
switch (_trigger) {
|
||||
case 0:
|
||||
_scene._sequences.addTimer(4, 1);
|
||||
_globals[kLanternStatus] = 1;
|
||||
_vm->_dialogs->spinObject(OBJ_LANTERN);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
_vm->_dialogs->show(825);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_TURN_OFF, NOUN_LANTERN)) {
|
||||
if ((_globals[kLanternStatus] == 0) && !_trigger)
|
||||
_vm->_dialogs->show(829);
|
||||
else if ((_scene._currentSceneId / 100) == 4)
|
||||
_vm->_dialogs->show(826);
|
||||
else {
|
||||
switch (_trigger) {
|
||||
case 0:
|
||||
_scene._sequences.addTimer(4, 1);
|
||||
_globals[kLanternStatus] = 0;
|
||||
_vm->_dialogs->spinObject(OBJ_LANTERN);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
_vm->_dialogs->show(827);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_OPEN, NOUN_ENVELOPE)) {
|
||||
_objects.setRoom(OBJ_ENVELOPE, NOWHERE);
|
||||
_objects.addToInventory(OBJ_TICKET);
|
||||
_objects.addToInventory(OBJ_PIECE_OF_PAPER);
|
||||
_vm->_dialogs->show(833);
|
||||
action._inProgress = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.isAction(VERB_ATTACH, NOUN_CABLE_HOOK, NOUN_ROPE)) {
|
||||
if (!_objects.isInInventory(OBJ_ROPE))
|
||||
_vm->_dialogs->show(11438);
|
||||
else {
|
||||
_objects.setRoom(OBJ_CABLE_HOOK, NOWHERE);
|
||||
_objects.setRoom(OBJ_ROPE, NOWHERE);
|
||||
_objects.addToInventory(OBJ_ROPE_WITH_HOOK);
|
||||
_vm->_dialogs->showItem(OBJ_ROPE_WITH_HOOK, 823, 0);
|
||||
}
|
||||
action._inProgress = false;
|
||||
}
|
||||
}
|
||||
|
||||
void GamePhantom::unhandledAction() {
|
||||
int messageId = 0;
|
||||
int rndNum = _vm->getRandomNumber(1, 1000);
|
||||
MADSAction &action = _scene._action;
|
||||
|
||||
if (action.isAction(VERB_PUT, NOUN_CHANDELIER, NOUN_SEATS))
|
||||
_vm->_dialogs->show(10123);
|
||||
else if (action.isAction(VERB_TAKE)) {
|
||||
if (_objects.isInInventory(_objects.getIdFromDesc(action._activeAction._objectNameId)))
|
||||
messageId = 25;
|
||||
else {
|
||||
if (rndNum <= 333)
|
||||
messageId = 1;
|
||||
else if (rndNum <= 666)
|
||||
messageId = 2;
|
||||
else
|
||||
messageId = 3;
|
||||
}
|
||||
} else if (action.isAction(VERB_PUSH)) {
|
||||
if (rndNum < 750)
|
||||
messageId = 4;
|
||||
else
|
||||
messageId = 5;
|
||||
} else if (action.isAction(VERB_PULL)) {
|
||||
if (rndNum < 750)
|
||||
messageId = 6;
|
||||
else
|
||||
messageId = 7;
|
||||
} else if (action.isAction(VERB_OPEN)) {
|
||||
if (rndNum <= 500)
|
||||
messageId = 8;
|
||||
else if (rndNum <= 750)
|
||||
messageId = 9;
|
||||
else
|
||||
messageId = 10;
|
||||
} else if (action.isAction(VERB_CLOSE)) {
|
||||
if (rndNum <= 500)
|
||||
messageId = 11;
|
||||
else if (rndNum <= 750)
|
||||
messageId = 12;
|
||||
else
|
||||
messageId = 13;
|
||||
} else if (action.isAction(VERB_PUT)) {
|
||||
if (_objects.isInInventory(_objects.getIdFromDesc(action._activeAction._objectNameId)))
|
||||
messageId = 26;
|
||||
else if (rndNum < 500)
|
||||
messageId = 14;
|
||||
else
|
||||
messageId = 15;
|
||||
} else if (action.isAction(VERB_TALK_TO)) {
|
||||
if (rndNum <= 500)
|
||||
messageId = 16;
|
||||
else
|
||||
messageId = 17;
|
||||
} else if (action.isAction(VERB_GIVE)) {
|
||||
if (_objects.isInInventory(_objects.getIdFromDesc(action._activeAction._objectNameId)))
|
||||
messageId = 27;
|
||||
else
|
||||
messageId = 18;
|
||||
} else if (action.isAction(VERB_THROW)) {
|
||||
if (_objects.isInInventory(_objects.getIdFromDesc(action._activeAction._objectNameId)))
|
||||
messageId = 19;
|
||||
else
|
||||
messageId = 28;
|
||||
} else if (action.isAction(VERB_LOOK)) {
|
||||
if (rndNum <= 333)
|
||||
messageId = 20;
|
||||
else if (rndNum <= 666)
|
||||
messageId = 21;
|
||||
else
|
||||
messageId = 22;
|
||||
} else if ((action.isAction(VERB_UNLOCK) || action.isAction(VERB_LOCK))
|
||||
&& (action.isObject(NOUN_DOOR) || action.isObject(NOUN_LEFT_DOOR) || action.isObject(NOUN_MIDDLE_DOOR) || action.isObject(NOUN_RIGHT_DOOR) || action.isObject(NOUN_TRAP_DOOR)))
|
||||
messageId = 32;
|
||||
else if (!action.isAction(VERB_WALK_TO) && !action.isAction(VERB_WALK_ACROSS) && !action.isAction(VERB_WALK_DOWN) && !action.isAction(VERB_WALK_UP)) {
|
||||
if (rndNum < 500)
|
||||
messageId = 23;
|
||||
else
|
||||
messageId = 24;
|
||||
}
|
||||
|
||||
if (messageId)
|
||||
_vm->_dialogs->show(messageId);
|
||||
}
|
||||
|
||||
void GamePhantom::stopWalker() {
|
||||
int state = _globals[kWalkerConverseState];
|
||||
int command = _globals[kWalkerConverse];
|
||||
|
||||
_globals[kWalkerConverseNow] = state;
|
||||
|
||||
if ((_player._facing != FACING_NORTHEAST) && (_player._facing != FACING_NORTHWEST)) {
|
||||
state = 0;
|
||||
command = 0;
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
case 1:
|
||||
switch (command) {
|
||||
case 1:
|
||||
_player.addWalker(3, 0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
_player.addWalker(6, 0);
|
||||
_player.addWalker(5, 0);
|
||||
_player.addWalker(4, 0);
|
||||
state = 2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
_player.addWalker(8, 0);
|
||||
_player.addWalker(4, 0);
|
||||
state = 4;
|
||||
break;
|
||||
|
||||
default:
|
||||
_player.addWalker(-2, 0);
|
||||
state = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
switch (command) {
|
||||
case 2:
|
||||
case 3:
|
||||
if (state == 2) {
|
||||
if (_vm->getRandomNumber(1, 30000) < 2000) {
|
||||
_player.addWalker(10, 0);
|
||||
_player.addWalker(7, 0);
|
||||
state = 3;
|
||||
} else
|
||||
_player.addWalker(6, 0);
|
||||
} else {
|
||||
if (_vm->getRandomNumber(1, 30000) < 1000) {
|
||||
_player.addWalker(6, 0);
|
||||
_player.addWalker(7, 0);
|
||||
state = 2;
|
||||
} else
|
||||
_player.addWalker(10, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
_player.addWalker(-4, 0);
|
||||
_player.addWalker(-5, 0);
|
||||
if (state == 3) {
|
||||
_player.addWalker(6, 0);
|
||||
_player.addWalker(7, 0);
|
||||
}
|
||||
state = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (command == 4)
|
||||
_player.addWalker(9, 0);
|
||||
else {
|
||||
_player.addWalker(-4, 0);
|
||||
_player.addWalker(-8, 0);
|
||||
state = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
switch (command) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
_player.addWalker(2, 0);
|
||||
state = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
stopWalkerBasic();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
_globals[kWalkerConverse] = command;
|
||||
_globals[kWalkerConverseState] = state;
|
||||
}
|
||||
|
||||
void GamePhantom::step() {
|
||||
if (_player._visible && !_globals[kStopWalkerDisabled]
|
||||
&& (_player._stepEnabled || (_vm->_gameConv->activeConvId() >= 0))
|
||||
&& !_player._moving && (_player._facing == _player._turnToFacing)
|
||||
&& (_scene._frameStartTime >= (uint32)_globals[kWalkerTiming])) {
|
||||
if (_player._stopWalkers.empty())
|
||||
stopWalker();
|
||||
|
||||
_globals[kWalkerTiming] += 6;
|
||||
}
|
||||
}
|
||||
|
||||
void GamePhantom::stopWalkerBasic() {
|
||||
int rndVal = _vm->getRandomNumber(1, 30000);
|
||||
|
||||
switch (_player._facing) {
|
||||
case FACING_SOUTH:
|
||||
if (rndVal < 500) {
|
||||
int maxSteps = _vm->getRandomNumber(4, 10);
|
||||
for (int i = 0; i < maxSteps; i++)
|
||||
_player.addWalker((rndVal < 250) ? 1 : 2, 0);
|
||||
} else if (rndVal < 750) {
|
||||
for (int i = 0; i < 4; i++)
|
||||
_player.addWalker(1, 0);
|
||||
|
||||
_player.addWalker(0, 0);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
_player.addWalker(2, 0);
|
||||
|
||||
_player.addWalker(0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case FACING_SOUTHEAST:
|
||||
case FACING_SOUTHWEST:
|
||||
case FACING_NORTHEAST:
|
||||
case FACING_NORTHWEST:
|
||||
if (rndVal < 150) {
|
||||
_player.addWalker(-1, 0);
|
||||
_player.addWalker(1, 0);
|
||||
for (int i = 0; i < 6; i++)
|
||||
_player.addWalker(0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case FACING_EAST:
|
||||
case FACING_WEST:
|
||||
if (rndVal < 250) {
|
||||
_player.addWalker(-1, 0);
|
||||
int maxSteps = _vm->getRandomNumber(2, 6);
|
||||
for (int i = 0; i < maxSteps; i++)
|
||||
_player.addWalker(2, 0);
|
||||
_player.addWalker(1, 0);
|
||||
_player.addWalker(0, 0);
|
||||
_player.addWalker(0, 0);
|
||||
} else if (rndVal < 500)
|
||||
_globals[kWalkerTiming] = (int)_scene._frameStartTime;
|
||||
break;
|
||||
|
||||
case FACING_NORTH:
|
||||
if (rndVal < 250) {
|
||||
_player.addWalker(-1, 0);
|
||||
int maxSteps = _vm->getRandomNumber(3, 7);
|
||||
for (int i = 0; i < maxSteps; i++)
|
||||
_player.addWalker(2, 0);
|
||||
_player.addWalker(1, 0);
|
||||
_player.addWalker(0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void GamePhantom::synchronize(Common::Serializer &s, bool phase1) {
|
||||
Game::synchronize(s, phase1);
|
||||
|
||||
// TODO: Copied from Nebular
|
||||
if (!phase1) {
|
||||
_globals.synchronize(s);
|
||||
}
|
||||
}
|
||||
|
||||
void GamePhantom::enterCatacombs(bool val) {
|
||||
setupCatacombs();
|
||||
|
||||
int var4, var2;
|
||||
if (_scene._currentSceneId == 409) {
|
||||
if (val) {
|
||||
var4 = _globals[kCatacombs409b];
|
||||
var2 = _globals[kCatacombs409bFrom];
|
||||
} else {
|
||||
var4 = _globals[kCatacombs409a];
|
||||
var2 = _globals[kCatacombs409aFrom];
|
||||
}
|
||||
} else if (_scene._currentSceneId == 501) {
|
||||
var4 = _globals[kCatacombs501];
|
||||
var2 = _globals[kCatacombs501From];
|
||||
} else {
|
||||
var4 = _globals[kCatacombs309];
|
||||
var2 = _globals[kCatacombs309From];
|
||||
}
|
||||
|
||||
newCatacombRoom(var4, var2);
|
||||
}
|
||||
|
||||
void GamePhantom::initCatacombs() {
|
||||
_globals[kCatacombsRoom] = _globals[kCatacombsNextRoom];
|
||||
}
|
||||
|
||||
void GamePhantom::setupCatacombs() {
|
||||
switch (_difficulty) {
|
||||
case DIFFICULTY_EASY:
|
||||
_catacombs = _easyCatacombs;
|
||||
_catacombSize = 32;
|
||||
|
||||
_globals[kCatacombs309] = 2;
|
||||
_globals[kCatacombs309From] = 3;
|
||||
_globals[kCatacombs409a] = 30;
|
||||
_globals[kCatacombs409aFrom] = 0;
|
||||
_globals[kCatacombs409b] = 31;
|
||||
_globals[kCatacombs409bFrom] = 2;
|
||||
_globals[kCatacombs501] = 31;
|
||||
_globals[kCatacombs501From] = 0;
|
||||
break;
|
||||
|
||||
case DIFFICULTY_MEDIUM:
|
||||
// TODO: FIXME. Do we need to set something here?
|
||||
break;
|
||||
|
||||
case DIFFICULTY_HARD:
|
||||
default:
|
||||
_catacombs = _hardCatacombs;
|
||||
_catacombSize = 62;
|
||||
|
||||
_globals[kCatacombs309] = 2;
|
||||
_globals[kCatacombs309From] = 3;
|
||||
_globals[kCatacombs409a] = 37;
|
||||
_globals[kCatacombs409aFrom] = 0;
|
||||
_globals[kCatacombs409b] = 39;
|
||||
_globals[kCatacombs409bFrom] = 2;
|
||||
_globals[kCatacombs501] = 56;
|
||||
_globals[kCatacombs501From] = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int GamePhantom::exitCatacombs(int dir) {
|
||||
assert(_globals[kCatacombsRoom] == CLIP(_globals[kCatacombsRoom], 0, _catacombSize - 1));
|
||||
assert(dir == CLIP(dir, 0, 3));
|
||||
|
||||
return (_catacombs[_globals[kCatacombsRoom]]._exit[dir]);
|
||||
}
|
||||
|
||||
void GamePhantom::moveCatacombs(int dir) {
|
||||
assert(_globals[kCatacombsRoom] == CLIP(_globals[kCatacombsRoom], 0, _catacombSize - 1));
|
||||
assert(dir == CLIP(dir, 0, 3));
|
||||
|
||||
newCatacombRoom(_catacombs[_globals[kCatacombsRoom]]._fromDirection[dir], _catacombs[_globals[kCatacombsRoom]]._exit[dir]);
|
||||
}
|
||||
|
||||
void GamePhantom::newCatacombRoom(int toRoom, int fromExit) {
|
||||
_globals[kCatacombsNextRoom] = toRoom;
|
||||
_globals[kCatacombsFrom] = fromExit & 0x03;
|
||||
_globals[kCatacombsFlag] = fromExit & 0xFC;
|
||||
|
||||
int newSceneNum = -1;
|
||||
|
||||
if (toRoom < 0) {
|
||||
switch (toRoom) {
|
||||
case -5:
|
||||
newSceneNum = 501;
|
||||
break;
|
||||
|
||||
case -4:
|
||||
case -3:
|
||||
newSceneNum = 409;
|
||||
break;
|
||||
|
||||
case -2:
|
||||
newSceneNum = 309;
|
||||
break;
|
||||
|
||||
default:
|
||||
error("Unexpected room in newCatacombRoom");
|
||||
}
|
||||
} else {
|
||||
newSceneNum = _catacombs[toRoom]._sceneNum;
|
||||
_globals[81] = _catacombs[toRoom]._flags;
|
||||
}
|
||||
|
||||
if (_triggerSetupMode == SEQUENCE_TRIGGER_PREPARE) {
|
||||
_player._walkOffScreenSceneId = newSceneNum;
|
||||
} else {
|
||||
_scene._reloadSceneFlag = true;
|
||||
_scene._nextSceneId = newSceneNum;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Phantom
|
||||
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif
|
||||
156
engines/mads/phantom/game_phantom.h
Normal file
156
engines/mads/phantom/game_phantom.h
Normal file
@@ -0,0 +1,156 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_GAME_PHANTOM_H
|
||||
#define MADS_GAME_PHANTOM_H
|
||||
|
||||
#include "mads/game.h"
|
||||
#include "mads/globals.h"
|
||||
#include "mads/phantom/globals_phantom.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
enum Difficulty {
|
||||
DIFFICULTY_HARD = 1, DIFFICULTY_MEDIUM = 2, DIFFICULTY_EASY = 3
|
||||
};
|
||||
|
||||
enum InventoryObject {
|
||||
OBJ_NONE = -1,
|
||||
OBJ_KEY = 0,
|
||||
OBJ_LANTERN = 1,
|
||||
OBJ_RED_FRAME = 2,
|
||||
OBJ_SANDBAG = 3,
|
||||
OBJ_YELLOW_FRAME = 4,
|
||||
OBJ_FIRE_AXE = 5,
|
||||
OBJ_SMALL_NOTE = 6,
|
||||
OBJ_ROPE = 7,
|
||||
OBJ_SWORD = 8,
|
||||
OBJ_ENVELOPE = 9,
|
||||
OBJ_TICKET = 10,
|
||||
OBJ_PIECE_OF_PAPER = 11,
|
||||
OBJ_PARCHMENT = 12,
|
||||
OBJ_LETTER = 13,
|
||||
OBJ_NOTICE = 14,
|
||||
OBJ_BOOK = 15,
|
||||
OBJ_CRUMPLED_NOTE = 16,
|
||||
OBJ_BLUE_FRAME = 17,
|
||||
OBJ_LARGE_NOTE = 18,
|
||||
OBJ_GREEN_FRAME = 19,
|
||||
OBJ_MUSIC_SCORE = 20,
|
||||
OBJ_WEDDING_RING = 21,
|
||||
OBJ_CABLE_HOOK = 22,
|
||||
OBJ_ROPE_WITH_HOOK = 23,
|
||||
OBJ_OAR = 24
|
||||
};
|
||||
|
||||
enum MazeEvent {
|
||||
MAZE_EVENT_NONE = 0,
|
||||
MAZE_EVENT_PUDDLE = 0x0001,
|
||||
MAZE_EVENT_RAT_NEST = 0x0002,
|
||||
MAZE_EVENT_SKULL = 0x0004,
|
||||
MAZE_EVENT_POT = 0x0008,
|
||||
MAZE_EVENT_BRICK = 0x0010,
|
||||
MAZE_EVENT_HOLE = 0x0020,
|
||||
MAZE_EVENT_WEB = 0x0040,
|
||||
MAZE_EVENT_PLANK = 0x0080,
|
||||
MAZE_EVENT_DRAIN = 0x0100,
|
||||
MAZE_EVENT_STONE = 0x0200,
|
||||
MAZE_EVENT_BLOCK = 0x0400,
|
||||
MAZE_EVENT_FALLEN_BLOCK = 0x0800
|
||||
};
|
||||
|
||||
struct Catacombs {
|
||||
int _sceneNum;
|
||||
int _exit[4];
|
||||
int _fromDirection[4];
|
||||
int _flags;
|
||||
};
|
||||
|
||||
class GamePhantom : public Game {
|
||||
friend class Game;
|
||||
|
||||
private:
|
||||
void genericObjectExamine();
|
||||
void stopWalker();
|
||||
void stopWalkerBasic();
|
||||
|
||||
Catacombs *_catacombs;
|
||||
int _catacombSize;
|
||||
|
||||
protected:
|
||||
GamePhantom(MADSEngine *vm);
|
||||
|
||||
void startGame() override;
|
||||
|
||||
void initializeGlobals() override;
|
||||
|
||||
void setSectionHandler() override;
|
||||
|
||||
void checkShowDialog() override;
|
||||
public:
|
||||
PhantomGlobals _globals;
|
||||
Difficulty _difficulty;
|
||||
|
||||
|
||||
Globals &globals() override { return _globals; }
|
||||
|
||||
void doObjectAction() override;
|
||||
|
||||
void unhandledAction() override;
|
||||
|
||||
void step() override;
|
||||
|
||||
void synchronize(Common::Serializer &s, bool phase1) override;
|
||||
|
||||
void setupCatacombs();
|
||||
void enterCatacombs(bool val);
|
||||
void initCatacombs();
|
||||
void moveCatacombs(int dir);
|
||||
int exitCatacombs(int dir);
|
||||
void newCatacombRoom(int fromRoom, int fromExit);
|
||||
};
|
||||
|
||||
// Section handlers aren't needed in ScummVM implementation
|
||||
class Section1Handler : public SectionHandler {
|
||||
public:
|
||||
Section1Handler(MADSEngine *vm) : SectionHandler(vm) {}
|
||||
|
||||
void preLoadSection() override {}
|
||||
void sectionPtr2() override {}
|
||||
void postLoadSection() override {}
|
||||
};
|
||||
|
||||
typedef Section1Handler Section2Handler;
|
||||
typedef Section1Handler Section3Handler;
|
||||
typedef Section1Handler Section4Handler;
|
||||
typedef Section1Handler Section5Handler;
|
||||
|
||||
} // End of namespace Nebular
|
||||
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_GAME_PHANTOM_H */
|
||||
|
||||
#endif
|
||||
51
engines/mads/phantom/globals_phantom.cpp
Normal file
51
engines/mads/phantom/globals_phantom.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#include "mads/phantom/globals_phantom.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
PhantomGlobals::PhantomGlobals() : Globals() {
|
||||
// Initialize lists
|
||||
resize(210);
|
||||
_spriteIndexes.resize(30);
|
||||
_sequenceIndexes.resize(30);
|
||||
_animationIndexes.resize(30);
|
||||
}
|
||||
|
||||
void PhantomGlobals::synchronize(Common::Serializer &s) {
|
||||
Globals::synchronize(s);
|
||||
|
||||
_spriteIndexes.synchronize(s);
|
||||
_sequenceIndexes.synchronize(s);
|
||||
_animationIndexes.synchronize(s);
|
||||
}
|
||||
|
||||
|
||||
} // End of namespace Phantom
|
||||
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif
|
||||
156
engines/mads/phantom/globals_phantom.h
Normal file
156
engines/mads/phantom/globals_phantom.h
Normal file
@@ -0,0 +1,156 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_GLOBALS_PHANTOM_H
|
||||
#define MADS_GLOBALS_PHANTOM_H
|
||||
|
||||
#include "mads/game.h"
|
||||
#include "mads/resources.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
enum GlobalId {
|
||||
// Global variables
|
||||
|
||||
kWalkerTiming = 0,
|
||||
kWalkerTiming2 = 1,
|
||||
kStopWalkerDisabled = 2, // disable walker idle animations
|
||||
kTempInterface = 3,
|
||||
kWalkerConverse = 4, // conversation started with an NPC
|
||||
kWalkerConverseState = 5,
|
||||
kWalkerConverseNow = 6,
|
||||
|
||||
kCurrentYear = 10, // current year (1881 or 1993)
|
||||
kMusicSelected = 11,
|
||||
kPlayerScore = 12,
|
||||
kPlayerScoreFlags = 13,
|
||||
kDoneBrieConv203 = 14,
|
||||
kLanternStatus = 15,
|
||||
|
||||
// Section #1 variables
|
||||
kLeaveAngelMusicOn = 19,
|
||||
kTrapDoorStatus = 20,
|
||||
kChristineDoorStatus = 21,
|
||||
kSandbagStatus = 22,
|
||||
kChrisFStatus = 23,
|
||||
kBrieTalkStatus = 24,
|
||||
kJuliesDoor = 25,
|
||||
kPrompterStandStatus = 26,
|
||||
kChrisDStatus = 27,
|
||||
kJulieNameIsKnown = 28,
|
||||
kChrisKickedRaoulOut = 29,
|
||||
kJacquesNameIsKnown = 30,
|
||||
kJacquesStatus = 31,
|
||||
kFlorentNameIsKnown = 32,
|
||||
kCharlesNameIsKnown = 33,
|
||||
kRoom103104Transition = 34,
|
||||
kObservedPhan104 = 35,
|
||||
kDeathLocation = 36,
|
||||
kMakeBrieLeave203 = 37,
|
||||
kHintThatDaaeIsHome1 = 38,
|
||||
kHintThatDaaeIsHome2 = 39,
|
||||
|
||||
// Section #2 variables
|
||||
kChristineToldEnvelope = 40,
|
||||
kReadBook = 41,
|
||||
kScannedBookcase = 42,
|
||||
kRanConvIn205 = 43,
|
||||
kDoorsIn205 = 44,
|
||||
kPanelIn206 = 45,
|
||||
kMadameNameIsKnown = 46,
|
||||
kMadameGiryLocation = 47,
|
||||
kLookedAtCase = 48,
|
||||
kMadameGiryShowsUp = 49,
|
||||
kDoneRichConv203 = 50,
|
||||
kCameFromFade = 51,
|
||||
kTicketPeoplePresent = 52,
|
||||
kDegasNameIsKnown = 53,
|
||||
kTempVar = 54,
|
||||
kFlickedLever1 = 55,
|
||||
kFlickedLever2 = 56,
|
||||
kFlickedLever3 = 57,
|
||||
kFlickedLever4 = 58,
|
||||
|
||||
// Section #3 Variables
|
||||
kTopFloorLocked = 60,
|
||||
|
||||
// Section #4 Variables
|
||||
kCatacombsRoom = 80,
|
||||
kCatacombsMisc = 81,
|
||||
kCatacombsFlag = 82,
|
||||
kCatacombsFrom = 83,
|
||||
kCatacombs309 = 84,
|
||||
kCatacombs409a = 85,
|
||||
kCatacombs409b = 86,
|
||||
kCatacombs501 = 87,
|
||||
kCatacombs309From = 88,
|
||||
kCatacombs409aFrom = 89,
|
||||
kCatacombs409bFrom = 90,
|
||||
kCatacombs501From = 91,
|
||||
kCatacombsNextRoom = 92,
|
||||
kDoorIn409IsOpen = 93,
|
||||
kPriestPistonPuke = 94,
|
||||
kCobwebIsCut = 95,
|
||||
|
||||
// Section #5 Variables
|
||||
kChristineIsInBoat = 100,
|
||||
kChrisWillTakeSeat = 101,
|
||||
kRightDoorIsOpen504 = 102,
|
||||
kCoffinStatus = 103,
|
||||
kChrisLeft505 = 104,
|
||||
kKnockedOverHead = 105,
|
||||
kFightStatus = 106,
|
||||
kHeListened = 107,
|
||||
kCanFindBookInLibrary = 108,
|
||||
kRingIsOnFinger = 109,
|
||||
kLookedAtSkullFace = 110,
|
||||
kCableHookWasSeparate = 111,
|
||||
kMakeRichLeave203 = 112
|
||||
};
|
||||
|
||||
class PhantomGlobals : public Globals {
|
||||
public:
|
||||
SynchronizedList _spriteIndexes;
|
||||
SynchronizedList _sequenceIndexes;
|
||||
SynchronizedList _animationIndexes;
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
PhantomGlobals();
|
||||
|
||||
/**
|
||||
* Synchronize the globals data
|
||||
*/
|
||||
virtual void synchronize(Common::Serializer &s);
|
||||
};
|
||||
|
||||
} // End of namespace Phantom
|
||||
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_GLOBALS_PHANTOM_H */
|
||||
|
||||
#endif
|
||||
215
engines/mads/phantom/phantom_scenes.cpp
Normal file
215
engines/mads/phantom/phantom_scenes.cpp
Normal file
@@ -0,0 +1,215 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "mads/mads.h"
|
||||
#include "mads/compression.h"
|
||||
#include "mads/resources.h"
|
||||
#include "mads/scene.h"
|
||||
#include "mads/phantom/game_phantom.h"
|
||||
#include "mads/phantom/phantom_scenes.h"
|
||||
#include "mads/phantom/phantom_scenes1.h"
|
||||
#include "mads/phantom/phantom_scenes2.h"
|
||||
#include "mads/phantom/phantom_scenes3.h"
|
||||
#include "mads/phantom/phantom_scenes4.h"
|
||||
#include "mads/phantom/phantom_scenes5.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
|
||||
Scene &scene = vm->_game->_scene;
|
||||
|
||||
// When changing from one section to the other, set the scaling velocity
|
||||
if ((scene._nextSceneId / 100) != (scene._priorSceneId / 100))
|
||||
vm->_game->_player._scalingVelocity = true;
|
||||
|
||||
switch (scene._nextSceneId) {
|
||||
// Scene group #1 (theater, stage and dressing rooms)
|
||||
case 101: // seats
|
||||
return new Scene101(vm);
|
||||
case 102: // music stands
|
||||
return new Scene102(vm);
|
||||
case 103: // below stage
|
||||
return new Scene103(vm);
|
||||
case 104: // stage
|
||||
return new Scene104(vm);
|
||||
case 105: // ground floor, storage room
|
||||
return new Scene105(vm);
|
||||
case 106: // behind stage
|
||||
return new Scene106(vm);
|
||||
case 107: // stage right wing
|
||||
return new Scene107(vm);
|
||||
case 108: // stage left wing
|
||||
return new Scene108(vm);
|
||||
case 109: // upper floor, staircase
|
||||
return new Scene109(vm);
|
||||
case 110: // outside dressing rooms 1
|
||||
return new Scene110(vm);
|
||||
case 111: // outside dressing rooms 2
|
||||
return new Scene111(vm);
|
||||
case 112: // inside dressing room 1
|
||||
return new Scene112(vm);
|
||||
case 113: // inside dressing room 2
|
||||
return new Scene113(vm);
|
||||
case 114: // lower floor, storage room
|
||||
return new Scene114(vm);
|
||||
case 150: // cutscene
|
||||
return new Scene150(vm);
|
||||
|
||||
// Scene group #2 (theater entrance, offices, balcony)
|
||||
case 201: // entrance / ticket office
|
||||
return new Scene201(vm);
|
||||
case 202: // outside offices / paintings room
|
||||
return new Scene202(vm);
|
||||
case 203: // office
|
||||
return new Scene203(vm);
|
||||
case 204: // library
|
||||
return new Scene204(vm);
|
||||
case 205: // upper floor, outside balcony boxes
|
||||
return new Scene205(vm);
|
||||
case 206: // balcony box #1
|
||||
return new Scene206(vm);
|
||||
case 207: // balcony box #2
|
||||
return new Scene207(vm);
|
||||
case 208: // stage and balcony view
|
||||
return new Scene208(vm);
|
||||
case 250: // cutscene
|
||||
return new Scene250(vm);
|
||||
|
||||
// Scene group #3 (catwalks, chandelier, lake / catacombs entrance)
|
||||
case 301: // catwalk #1 above stage
|
||||
return new Scene301(vm);
|
||||
case 302: // catwalk #2 above stage
|
||||
return new Scene302(vm);
|
||||
case 303: // above chandelier
|
||||
return new Scene303(vm);
|
||||
case 304: // chandelier
|
||||
return new Scene304(vm);
|
||||
case 305: // chandelier fight, phantom closeup
|
||||
return new Scene305(vm);
|
||||
case 306: // chandelier #2
|
||||
return new Scene306(vm);
|
||||
case 307: // catwalk #3 above stage
|
||||
return new Scene307(vm);
|
||||
case 308: // hidden staircase behind balcony box
|
||||
return new Scene308(vm);
|
||||
case 309: // lake and archway
|
||||
return new Scene309(vm);
|
||||
case 310: // lake
|
||||
return new Scene310(vm);
|
||||
|
||||
// Scene group #4 (labyrinth)
|
||||
case 401: // labyrinth room, 3 exits
|
||||
return new Scene401(vm);
|
||||
case 403: // labyrinth room (big), 4 exits + 1 bricked door, left
|
||||
return new Scene403(vm);
|
||||
case 404: // labyrinth room, 3 exits
|
||||
return new Scene404(vm);
|
||||
case 406: // labyrinth room, 2 exits
|
||||
return new Scene406(vm);
|
||||
case 407: // catacomb room / lake
|
||||
return new Scene407(vm);
|
||||
case 408: // catacomb corridor
|
||||
return new Scene408(vm);
|
||||
case 409: // catacomb room, door with switch panel
|
||||
return new Scene409(vm);
|
||||
case 410: // skull switch panel
|
||||
return new Scene410(vm);
|
||||
case 453: // Labyrinth room (big), 4 exits + 1 bricked door, right
|
||||
return new Scene453(vm);
|
||||
case 456: // Labyrinth room, 2 exits
|
||||
return new Scene456(vm);
|
||||
|
||||
// Scene group #5 (Phantom's hideout)
|
||||
case 501: // catacombs, outside phantom's hideout, lake and boat
|
||||
return new Scene501(vm);
|
||||
case 502: // push panel trap
|
||||
return new Scene502(vm);
|
||||
case 504: // Phantom's hideout, church organ
|
||||
return new Scene504(vm);
|
||||
case 505: // Phantom's hideout, sarcophagus
|
||||
return new Scene505(vm);
|
||||
case 506: // catacomb room with ramp
|
||||
return new Scene506(vm);
|
||||
|
||||
default:
|
||||
error("Invalid scene %d called", scene._nextSceneId);
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
PhantomScene::PhantomScene(MADSEngine *vm) : SceneLogic(vm),
|
||||
_globals(static_cast<GamePhantom *>(vm->_game)->_globals),
|
||||
_game(*static_cast<GamePhantom *>(vm->_game)),
|
||||
_action(vm->_game->_scene._action) {
|
||||
}
|
||||
|
||||
Common::Path PhantomScene::formAnimName(char sepChar, int suffixNum) {
|
||||
return Resources::formatName(_scene->_currentSceneId, sepChar, suffixNum,
|
||||
EXT_NONE, "");
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
void SceneInfoPhantom::loadCodes(BaseSurface &depthSurface, int variant) {
|
||||
Common::String ext = Common::String::format(".WW%d", variant);
|
||||
Common::Path fileName = Resources::formatName(RESPREFIX_RM, _sceneId, ext);
|
||||
if (!Common::File::exists(fileName))
|
||||
return;
|
||||
|
||||
File f(fileName);
|
||||
MadsPack codesPack(&f);
|
||||
Common::SeekableReadStream *stream = codesPack.getItemStream(0);
|
||||
|
||||
loadCodes(depthSurface, stream);
|
||||
|
||||
delete stream;
|
||||
f.close();
|
||||
}
|
||||
|
||||
void SceneInfoPhantom::loadCodes(BaseSurface &depthSurface, Common::SeekableReadStream *stream) {
|
||||
byte *destP = (byte *)depthSurface.getPixels();
|
||||
byte *walkMap = new byte[stream->size()];
|
||||
stream->read(walkMap, stream->size());
|
||||
|
||||
for (int y = 0; y < 156; ++y) {
|
||||
for (int x = 0; x < 320; ++x) {
|
||||
int offset = x + (y * 320);
|
||||
if ((walkMap[offset / 8] << (offset % 8)) & 0x80)
|
||||
*destP++ = 1; // walkable
|
||||
else
|
||||
*destP++ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] walkMap;
|
||||
}
|
||||
|
||||
} // End of namespace Phantom
|
||||
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif
|
||||
491
engines/mads/phantom/phantom_scenes.h
Normal file
491
engines/mads/phantom/phantom_scenes.h
Normal file
@@ -0,0 +1,491 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_PHANTOM_SCENES_H
|
||||
#define MADS_PHANTOM_SCENES_H
|
||||
|
||||
#include "mads/scene.h"
|
||||
#include "mads/phantom/game_phantom.h"
|
||||
//#include "mads/phantom/globals_phantom.h"
|
||||
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
enum Verb {
|
||||
VERB_LOOK = 0x3,
|
||||
VERB_TAKE = 0x4,
|
||||
VERB_PUSH = 0x5,
|
||||
VERB_OPEN = 0x6,
|
||||
VERB_PUT = 0x7,
|
||||
VERB_TALK_TO = 0x8,
|
||||
VERB_GIVE = 0x9,
|
||||
VERB_PULL = 0xA,
|
||||
VERB_CLOSE = 0xB,
|
||||
VERB_THROW = 0xC,
|
||||
VERB_WALK_TO = 0xD,
|
||||
VERB_ATTACK = 0x14,
|
||||
VERB_CLIMB_DOWN = 0x21,
|
||||
VERB_CLIMB_INTO = 0x22,
|
||||
VERB_CLIMB_THROUGH = 0x23,
|
||||
VERB_EXIT = 0x34,
|
||||
VERB_EXIT_TO = 0x37,
|
||||
VERB_JUMP_INTO = 0x53,
|
||||
VERB_LASSO = 0x59,
|
||||
VERB_LOCK = 0x5D,
|
||||
VERB_LOOK_AT = 0x60,
|
||||
VERB_LOOK_THROUGH = 0x61,
|
||||
VERB_READ = 0x7A,
|
||||
VERB_REMOVE = 0x7C,
|
||||
VERB_TURN_OFF = 0x95,
|
||||
VERB_TURN_ON = 0x96,
|
||||
VERB_UNLOCK = 0x97,
|
||||
VERB_WALK_ACROSS = 0x99,
|
||||
VERB_WALK_DOWN = 0x9A,
|
||||
VERB_WALK_THROUGH = 0x9B,
|
||||
VERB_WALK_UP = 0x9C,
|
||||
VERB_WEAR = 0xA1,
|
||||
VERB_CLIMB_UP = 0xA5,
|
||||
VERB_WALK_ONTO = 0xA6,
|
||||
VERB_WALK = 0xA7,
|
||||
VERB_ENTER = 0xEC,
|
||||
VERB_WALK_BEHIND = 0xF3,
|
||||
VERB_CLIMB = 0x120,
|
||||
VERB_ATTACH = 0x131,
|
||||
VERB_GRAPPLE = 0x133,
|
||||
VERB_SIT_ON = 0x138,
|
||||
VERB_SIT_IN = 0x13A,
|
||||
VERB_WALK_DOWN_STAIRS_TO = 0x153
|
||||
};
|
||||
|
||||
enum Noun {
|
||||
NOUN_GAME = 0x1,
|
||||
NOUN_QSAVE = 0x2,
|
||||
NOUN_ = 0xE,
|
||||
NOUN_IN_ONE = 0xF,
|
||||
NOUN_IN_TWO = 0x10,
|
||||
NOUN_ACT_CURTAIN = 0x11,
|
||||
NOUN_AISLE = 0x12,
|
||||
NOUN_APRON = 0x13,
|
||||
NOUN_BACKSTAGE = 0x15,
|
||||
NOUN_BEAR_PROP = 0x16,
|
||||
NOUN_BLUE_FRAME = 0x17,
|
||||
NOUN_BOOK = 0x18,
|
||||
NOUN_BUST = 0x19,
|
||||
NOUN_CABLE = 0x1A,
|
||||
NOUN_CARPET = 0x1B,
|
||||
NOUN_CARTON = 0x1C,
|
||||
NOUN_CARTONS = 0x1D,
|
||||
NOUN_CEILING = 0x1E,
|
||||
NOUN_CHAIR = 0x1F,
|
||||
NOUN_CIRCULAR_STAIRCASE = 0x20,
|
||||
NOUN_COLUMN_PROP = 0x24,
|
||||
NOUN_CONDUCTORS_STAND = 0x25,
|
||||
NOUN_CORRIDOR = 0x26,
|
||||
NOUN_COUCH = 0x27,
|
||||
NOUN_COUNTERWEIGHT_SYSTEM = 0x28,
|
||||
NOUN_CRATE = 0x29,
|
||||
NOUN_CRATES = 0x2A,
|
||||
NOUN_CRUMPLED_NOTE = 0x2B,
|
||||
NOUN_CYCLORAMA = 0x2C,
|
||||
NOUN_CYLINDER = 0x2D,
|
||||
NOUN_DOOR = 0x2E,
|
||||
NOUN_DRESSING_ROOM_DOOR = 0x2F,
|
||||
NOUN_DRESSING_SCREEN = 0x30,
|
||||
NOUN_DRESSING_TABLE = 0x31,
|
||||
NOUN_ELEPHANT_PROP = 0x32,
|
||||
NOUN_ENVELOPE = 0x33,
|
||||
NOUN_EXIT_DOWN = 0x35,
|
||||
NOUN_EXIT_SIGN = 0x36,
|
||||
NOUN_EXIT_TO_BACKSTAGE = 0x38,
|
||||
NOUN_EXIT_TO_CELLAR = 0x39,
|
||||
NOUN_EXIT_TO_CORRIDOR = 0x3A,
|
||||
NOUN_EXIT_TO_DRESSING_RMS = 0x3B,
|
||||
NOUN_EXIT_TO_LEFT_WING = 0x3C,
|
||||
NOUN_EXIT_TO_PIT = 0x3D,
|
||||
NOUN_EXIT_TO_RIGHT_WING = 0x3E,
|
||||
NOUN_EXIT_TO_STAGE = 0x3F,
|
||||
NOUN_EXIT_TO_STAIRWELL = 0x40,
|
||||
NOUN_EXIT_TO_TRAP_ROOM = 0x41,
|
||||
NOUN_EXIT_UP = 0x42,
|
||||
NOUN_EXPOSED_BRICK = 0x43,
|
||||
NOUN_FAN = 0x44,
|
||||
NOUN_FIRE_AXE = 0x45,
|
||||
NOUN_FL = 0x46,
|
||||
NOUN_FLAT = 0x47,
|
||||
NOUN_FLATS = 0x48,
|
||||
NOUN_FLOOR = 0x49,
|
||||
NOUN_FOLDING_CHAIRS = 0x4A,
|
||||
NOUN_GARBAGE_CAN = 0x4B,
|
||||
NOUN_GRAFFITI = 0x4C,
|
||||
NOUN_GREEN_FRAME = 0x4D,
|
||||
NOUN_HEMP = 0x4E,
|
||||
NOUN_HOLE = 0x4F,
|
||||
NOUN_HOUSE = 0x50,
|
||||
NOUN_IN_ONE2 = 0x51,
|
||||
NOUN_IN_TWO2 = 0x52,
|
||||
NOUN_JUNK = 0x54,
|
||||
NOUN_KEY = 0x55,
|
||||
NOUN_LAMP = 0x56,
|
||||
NOUN_LANTERN = 0x57,
|
||||
NOUN_LARGE_NOTE = 0x58,
|
||||
NOUN_LEG = 0x5A,
|
||||
NOUN_LETTER = 0x5B,
|
||||
NOUN_LIGHT_FIXTURE = 0x5C,
|
||||
NOUN_LOCKING_RAIL = 0x5E,
|
||||
NOUN_LOCKRAIL = 0x5F,
|
||||
NOUN_MANNEQUINS = 0x62,
|
||||
NOUN_MIRROR = 0x63,
|
||||
NOUN_MUMMY_PROP = 0x64,
|
||||
NOUN_MURAL = 0x65,
|
||||
NOUN_MUSIC_SCORE = 0x66,
|
||||
NOUN_MUSIC_STAND = 0x67,
|
||||
NOUN_MUSIC_STANDS = 0x68,
|
||||
NOUN_NOTHING = 0x69,
|
||||
NOUN_NOTICE = 0x6A,
|
||||
NOUN_ORCHESTRA_DOOR = 0x6B,
|
||||
NOUN_ORCHESTRA_PIT = 0x6C,
|
||||
NOUN_PAINTING = 0x6D,
|
||||
NOUN_PARCHMENT = 0x6E,
|
||||
NOUN_PIECE_OF_PAPER = 0x6F,
|
||||
NOUN_PIPE = 0x70,
|
||||
NOUN_PIT = 0x71,
|
||||
NOUN_PLANT = 0x72,
|
||||
NOUN_POSTER = 0x73,
|
||||
NOUN_PROMPTERS_BOX = 0x74,
|
||||
NOUN_PROP_TABLE = 0x75,
|
||||
NOUN_PROPS = 0x76,
|
||||
NOUN_PROSCENIUM_ARCH = 0x77,
|
||||
NOUN_PURCHASE_LINES = 0x78,
|
||||
NOUN_RAILING = 0x79,
|
||||
NOUN_RED_FRAME = 0x7B,
|
||||
NOUN_ROPE = 0x7D,
|
||||
NOUN_RUG = 0x7E,
|
||||
NOUN_SANDBAG = 0x7F,
|
||||
NOUN_SCAFFOLDING = 0x80,
|
||||
NOUN_SEATS = 0x81,
|
||||
NOUN_SIDE_WALL = 0x82,
|
||||
NOUN_SMALL_NOTE = 0x83,
|
||||
NOUN_STAGE = 0x84,
|
||||
NOUN_STAGE_EXIT = 0x85,
|
||||
NOUN_STAGE_LEFT = 0x86,
|
||||
NOUN_STAGE_RIGHT = 0x87,
|
||||
NOUN_STAGEMANAGERS_POST = 0x88,
|
||||
NOUN_STAIR_UNIT = 0x89,
|
||||
NOUN_STAIRCASE = 0x8A,
|
||||
NOUN_STAIRWELL = 0x8B,
|
||||
NOUN_STOOL = 0x8C,
|
||||
NOUN_STRIKE = 0x8D,
|
||||
NOUN_SWORD = 0x8E,
|
||||
NOUN_TABLE = 0x8F,
|
||||
NOUN_THE_HOUSE = 0x90,
|
||||
NOUN_THUNDER_MACHINE = 0x91,
|
||||
NOUN_TICKET = 0x92,
|
||||
NOUN_TRAP_CEILING = 0x93,
|
||||
NOUN_TRAP_DOOR = 0x94,
|
||||
NOUN_URN = 0x98,
|
||||
NOUN_WALL = 0x9D,
|
||||
NOUN_WARDROBE = 0x9E,
|
||||
NOUN_WASTE_BASKET = 0x9F,
|
||||
NOUN_WATER_PIPE = 0xA0,
|
||||
NOUN_WEDDING_RING = 0xA2,
|
||||
NOUN_YELLOW_FRAME = 0xA3,
|
||||
NOUN_PROP = 0xA4,
|
||||
NOUN_LEFT_DOOR = 0xA8,
|
||||
NOUN_RIGHT_DOOR = 0xA9,
|
||||
NOUN_DOOR_TO_PIT = 0xAA,
|
||||
NOUN_HEADPHONES = 0xAB,
|
||||
NOUN_BOXES = 0xAC,
|
||||
NOUN_MUG = 0xAD,
|
||||
NOUN_DINETTE_SET = 0xAE,
|
||||
NOUN_BOX = 0xAF,
|
||||
NOUN_CASES = 0xB0,
|
||||
NOUN_TRASH_BUCKET = 0xB1,
|
||||
NOUN_CORK_BOARD = 0xB2,
|
||||
NOUN_HEADSET = 0xB3,
|
||||
NOUN_GRAND_FOYER = 0xB4,
|
||||
NOUN_BACK_WALL = 0xB5,
|
||||
NOUN_BALLET_BAR = 0xB6,
|
||||
NOUN_THROW_RUGS = 0xB7,
|
||||
NOUN_COSTUME_RACK = 0xB8,
|
||||
NOUN_COAT_RACK = 0xB9,
|
||||
NOUN_PAINTINGS = 0xBA,
|
||||
NOUN_UMBRELLA = 0xBB,
|
||||
NOUN_SHELF = 0xBC,
|
||||
NOUN_CONTAINER = 0xBD,
|
||||
NOUN_TORN_POSTER = 0xBE,
|
||||
NOUN_REVIEW = 0xBF,
|
||||
NOUN_REVIEWS = 0xC0,
|
||||
NOUN_STAGE_RIGHT_WING = 0xC1,
|
||||
NOUN_STAGE_LEFT_WING = 0xC2,
|
||||
NOUN_PEDESTAL = 0xC3,
|
||||
NOUN_PLANT_PROP = 0xC4,
|
||||
NOUN_STATUE = 0xC5,
|
||||
NOUN_BATTEN = 0xC6,
|
||||
NOUN_BIG_PROP = 0xC7,
|
||||
NOUN_VENTILATION_DUCT = 0xC8,
|
||||
NOUN_CHANDELIER = 0xC9,
|
||||
NOUN_BARRIER = 0xCA,
|
||||
NOUN_PLACARD = 0xCB,
|
||||
NOUN_TICKET_WINDOW = 0xCC,
|
||||
NOUN_ARCHWAY = 0xCD,
|
||||
NOUN_COLUMN = 0xCE,
|
||||
NOUN_RAIL = 0xCF,
|
||||
NOUN_SEAT = 0xD0,
|
||||
NOUN_LOGE_CORRIDOR = 0xD1,
|
||||
NOUN_HOUSE_LIGHT = 0xD2,
|
||||
NOUN_FLOV = 0xD3,
|
||||
NOUN_LEFT_COLUMN = 0xD4,
|
||||
NOUN_RIGHT_COLUMN = 0xD5,
|
||||
NOUN_BOOKCASE = 0xD6,
|
||||
NOUN_DOORWAY = 0xD7,
|
||||
NOUN_COMFY_CHAIR = 0xD8,
|
||||
NOUN_DESK = 0xD9,
|
||||
NOUN_MANAGERS_CHAIR = 0xDA,
|
||||
NOUN_DESK_LAMP = 0xDB,
|
||||
NOUN_WINDOW = 0xDC,
|
||||
NOUN_SHEERS = 0xDD,
|
||||
NOUN_TAPESTRY = 0xDE,
|
||||
NOUN_OVERDOOR_MEDALLION = 0xDF,
|
||||
NOUN_LATTICEWORK = 0xE0,
|
||||
NOUN_DECORATIVE_MOLDING = 0xE1,
|
||||
NOUN_LEFT_DOORWAY = 0xE2,
|
||||
NOUN_LEFT_ARCHWAY = 0xE3,
|
||||
NOUN_RIGHT_DOORWAY = 0xE4,
|
||||
NOUN_RIGHT_ARCHWAY = 0xE5,
|
||||
NOUN_SOFA = 0xE6,
|
||||
NOUN_END_TABLE = 0xE7,
|
||||
NOUN_COFFEE_TABLE = 0xE8,
|
||||
NOUN_DECORATIVE_VASE = 0xE9,
|
||||
NOUN_MARBLE_COLUMN = 0xEA,
|
||||
NOUN_BOX_FIVE = 0xEB,
|
||||
NOUN_BOX_SIX = 0xED,
|
||||
NOUN_BOX_SEVEN = 0xEE,
|
||||
NOUN_BOX_EIGHT = 0xEF,
|
||||
NOUN_BOX_NINE = 0xF0,
|
||||
NOUN_STEP = 0xF1,
|
||||
NOUN_PANEL = 0xF2,
|
||||
NOUN_MIDDLE_DOORWAY = 0xF4,
|
||||
NOUN_LIGHT = 0xF5,
|
||||
NOUN_CANDLE = 0xF6,
|
||||
NOUN_CASE = 0xF7,
|
||||
NOUN_HANDLE = 0xF8,
|
||||
NOUN_AXE = 0xF9,
|
||||
NOUN_DOOR_CHUNKS = 0xFA,
|
||||
NOUN_FLO = 0xFB,
|
||||
NOUN_BULLETIN_BOARD = 0xFC,
|
||||
NOUN_JULIE = 0xFD,
|
||||
NOUN_GLASS_CASE = 0xFE,
|
||||
NOUN_KEYHOLE = 0xFF,
|
||||
NOUN_MIDDLE_DOOR = 0x100,
|
||||
NOUN_DRESSING_GOWN = 0x101,
|
||||
NOUN_MONSIEUR_BRIE = 0x102,
|
||||
NOUN_CATWALK = 0x103,
|
||||
NOUN_GRID = 0x104,
|
||||
NOUN_GIRDER = 0x105,
|
||||
NOUN_GRIDWORK = 0x106,
|
||||
NOUN_DUCTWORK = 0x107,
|
||||
NOUN_OPENING = 0x108,
|
||||
NOUN_DOME = 0x109,
|
||||
NOUN_ALCOVE = 0x10A,
|
||||
NOUN_CHRISTINE_DAAE = 0x10B,
|
||||
NOUN_CHRISTINE = 0x10C,
|
||||
NOUN_WOMAN = 0x10D,
|
||||
NOUN_PROMPTERS_STAND = 0x10E,
|
||||
NOUN_SUPPORT = 0x10F,
|
||||
NOUN_OTHER_CATWALK = 0x110,
|
||||
NOUN_SLOT = 0x111,
|
||||
NOUN_BEAM_POSITION = 0x112,
|
||||
NOUN_LIGHTING_INSTRUMENT = 0x113,
|
||||
NOUN_TARP = 0x114,
|
||||
NOUN_FACE = 0x115,
|
||||
NOUN_CATWALK_OVER_HOUSE = 0x116,
|
||||
NOUN_STAIRCASE_POST = 0x117,
|
||||
NOUN_JACQUES = 0x118,
|
||||
NOUN_GENTLEMAN = 0x119,
|
||||
NOUN_BODY = 0x11A,
|
||||
NOUN_HOLLOW_COLUMN = 0x11B,
|
||||
NOUN_UPPER_LEVEL = 0x11C,
|
||||
NOUN_MIDDLE_LEVEL = 0x11D,
|
||||
NOUN_LOWER_LEVEL = 0x11E,
|
||||
NOUN_LADDER = 0x11F,
|
||||
NOUN_CHANDELIER_TRAP = 0x121,
|
||||
NOUN_PIECE_OF_WOOD = 0x122,
|
||||
NOUN_CUT_HEMP = 0x123,
|
||||
NOUN_STONE_WALL = 0x124,
|
||||
NOUN_LAKE = 0x125,
|
||||
NOUN_STONE_COLUMN = 0x126,
|
||||
NOUN_EXIT_THROUGH = 0x127,
|
||||
NOUN_STONE_FLOOR = 0x128,
|
||||
NOUN_STONE_ARCHWAY = 0x129,
|
||||
NOUN_CHARLES = 0x12A,
|
||||
NOUN_SWITCH = 0x12B,
|
||||
NOUN_PROMPTERS_SEAT = 0x12C,
|
||||
NOUN_LEVER = 0x12D,
|
||||
NOUN_MONSIEUR_RICHARD = 0x12E,
|
||||
NOUN_JULIE2 = 0x12F,
|
||||
NOUN_CABLE_HOOK = 0x130,
|
||||
NOUN_ROPE_WITH_HOOK = 0x132,
|
||||
NOUN_OAR = 0x134,
|
||||
NOUN_ORGAN = 0x135,
|
||||
NOUN_SIT_AT = 0x136,
|
||||
NOUN_ORGAN_BENCH = 0x137,
|
||||
NOUN_LARGE_CHAIR = 0x139,
|
||||
NOUN_SARCOPHAGUS = 0x13B,
|
||||
NOUN_SKULL = 0x13C,
|
||||
NOUN_SKULLS = 0x13D,
|
||||
NOUN_TOTEM = 0x13E,
|
||||
NOUN_POLE = 0x13F,
|
||||
NOUN_CURTAIN = 0x140,
|
||||
NOUN_TORCH = 0x141,
|
||||
NOUN_RAMP = 0x142,
|
||||
NOUN_MADAME_GIRY = 0x143,
|
||||
NOUN_PANELS = 0x144,
|
||||
NOUN_MORE_CATACOMBS = 0x145,
|
||||
NOUN_BLOCKED_ARCHWAY = 0x146,
|
||||
NOUN_GRATE = 0x147,
|
||||
NOUN_CATACOMBS = 0x148,
|
||||
NOUN_TICKET_SELLER = 0x149,
|
||||
NOUN_USHER = 0x14A,
|
||||
NOUN_UNLUCKY_ADVENTURER = 0x14B,
|
||||
NOUN_SWITCH_PANEL = 0x14C,
|
||||
NOUN_SKULL_SWITCH = 0x14D,
|
||||
NOUN_TOGGLE = 0x14E,
|
||||
NOUN_CATACOMB_ROOM = 0x14F,
|
||||
NOUN_BOX_TEN = 0x150,
|
||||
NOUN_FOYER = 0x151,
|
||||
NOUN_WALK_DOWN_STAIRCASE = 0x152,
|
||||
NOUN_HAT_RACK = 0x154,
|
||||
NOUN_VASE = 0x155,
|
||||
NOUN_CLOTHES_DUMMY = 0x156,
|
||||
NOUN_NOTICES = 0x157,
|
||||
NOUN_ARCHWAY_TO_NORTH = 0x158,
|
||||
NOUN_ARCHWAY_TO_WEST = 0x159,
|
||||
NOUN_ARCHWAY_TO_EAST = 0x15A,
|
||||
NOUN_GATE = 0x15B,
|
||||
NOUN_NEST = 0x15C,
|
||||
NOUN_POT = 0x15D,
|
||||
NOUN_PUDDLE = 0x15E,
|
||||
NOUN_WEB = 0x15F,
|
||||
NOUN_PLANK = 0x160,
|
||||
NOUN_BLOCK = 0x161,
|
||||
NOUN_RATS_NEST = 0x162,
|
||||
NOUN_BROKEN_POT = 0x163,
|
||||
NOUN_STONE = 0x164,
|
||||
NOUN_DRAIN = 0x165,
|
||||
NOUN_FATE = 0x166,
|
||||
NOUN_SKULL_SWITCH_1 = 0x167,
|
||||
NOUN_SKULL_SWITCH_2 = 0x168,
|
||||
NOUN_SKULL_SWITCH_3 = 0x169,
|
||||
NOUN_SKULL_SWITCH_4 = 0x16A,
|
||||
NOUN_SKULL_SWITCH_5 = 0x16B,
|
||||
NOUN_SKULL_SWITCH_6 = 0x16C,
|
||||
NOUN_SKULL_SWITCH_7 = 0x16D,
|
||||
NOUN_SKULL_SWITCH_8 = 0x16E,
|
||||
NOUN_SKULL_SWITCH_9 = 0x16F,
|
||||
NOUN_SKULL_SWITCH_10 = 0x170,
|
||||
NOUN_SKULL_SWITCH_11 = 0x171,
|
||||
NOUN_SKULL_SWITCH_12 = 0x172,
|
||||
NOUN_SKULL_SWITCH_13 = 0x173,
|
||||
NOUN_SKULL_SWITCH_14 = 0x174,
|
||||
NOUN_SKULL_SWITCH_15 = 0x175,
|
||||
NOUN_SKULL_SWITCH_16 = 0x176,
|
||||
NOUN_SKULL_SWITCH_17 = 0x177,
|
||||
NOUN_SKULL_SWITCH_18 = 0x178,
|
||||
NOUN_SKULL_SWITCH_19 = 0x179,
|
||||
NOUN_SKULL_SWITCH_20 = 0x17A,
|
||||
NOUN_SKULL_SWITCH_21 = 0x17B,
|
||||
NOUN_SKULL_SWITCH_22 = 0x17C,
|
||||
NOUN_SKULL_SWITCH_23 = 0x17D,
|
||||
NOUN_SKULL_SWITCH_24 = 0x17E,
|
||||
NOUN_SKULL_SWITCH_25 = 0x17F,
|
||||
NOUN_SKULL_SWITCH_26 = 0x180,
|
||||
NOUN_EDGAR_DEGAS = 0x181,
|
||||
NOUN_CHANDELIER_CABLE = 0x182,
|
||||
NOUN_COB_WEB = 0x183,
|
||||
NOUN_SKULL_FACE = 0x184,
|
||||
NOUN_BOAT = 0x185,
|
||||
NOUN_HOOK = 0x186,
|
||||
NOUN_AROUND = 0x187,
|
||||
NOUN_CANE = 0x188,
|
||||
NOUN_MASK = 0x189,
|
||||
NOUN_COVER = 0x18A,
|
||||
NOUN_PADLOCK = 0x18B,
|
||||
NOUN_LID = 0x18C,
|
||||
NOUN_COBWEB = 0x18D,
|
||||
NOUN_PHANTOM = 0x18E,
|
||||
NOUN_PAPER = 0x18F
|
||||
};
|
||||
|
||||
class SceneFactory {
|
||||
public:
|
||||
static SceneLogic *createScene(MADSEngine *vm);
|
||||
};
|
||||
|
||||
/**
|
||||
* Specialized base class for Dragonsphere game scenes
|
||||
*/
|
||||
class PhantomScene : public SceneLogic {
|
||||
protected:
|
||||
PhantomGlobals &_globals;
|
||||
GamePhantom &_game;
|
||||
MADSAction &_action;
|
||||
|
||||
/**
|
||||
* Forms an animation resource name
|
||||
*/
|
||||
Common::Path formAnimName(char sepChar, int suffixNum);
|
||||
|
||||
/**
|
||||
* Plays appropriate sound for entering varous rooms
|
||||
*/
|
||||
void lowRoomsEntrySound();
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
PhantomScene(MADSEngine *vm);
|
||||
|
||||
void sub7178C();
|
||||
};
|
||||
|
||||
class SceneInfoPhantom : public SceneInfo {
|
||||
friend class SceneInfo;
|
||||
protected:
|
||||
void loadCodes(BaseSurface &depthSurface, int variant) override;
|
||||
|
||||
void loadCodes(BaseSurface &depthSurface, Common::SeekableReadStream *stream) override;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
SceneInfoPhantom(MADSEngine *vm) : SceneInfo(vm) {}
|
||||
};
|
||||
|
||||
} // End of namespace Phantom
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_PHANTOM_SCENES_H */
|
||||
|
||||
#endif
|
||||
9579
engines/mads/phantom/phantom_scenes1.cpp
Normal file
9579
engines/mads/phantom/phantom_scenes1.cpp
Normal file
File diff suppressed because it is too large
Load Diff
421
engines/mads/phantom/phantom_scenes1.h
Normal file
421
engines/mads/phantom/phantom_scenes1.h
Normal file
@@ -0,0 +1,421 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_PHANTOM_SCENES1_H
|
||||
#define MADS_PHANTOM_SCENES1_H
|
||||
|
||||
#include "common/serializer.h"
|
||||
#include "mads/phantom/phantom_scenes.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
class Scene1xx : public PhantomScene {
|
||||
protected:
|
||||
/**
|
||||
* Plays an appropriate sound when entering a scene
|
||||
*/
|
||||
void sceneEntrySound();
|
||||
|
||||
/**
|
||||
*Sets the AA file to use for the scene
|
||||
*/
|
||||
void setAAName();
|
||||
|
||||
/**
|
||||
* Updates the prefix used for getting player sprites for the scene
|
||||
*/
|
||||
void setPlayerSpritesPrefix();
|
||||
public:
|
||||
Scene1xx(MADSEngine *vm) : PhantomScene(vm) {}
|
||||
};
|
||||
|
||||
class Scene101 : public Scene1xx {
|
||||
private:
|
||||
int _chanStatus;
|
||||
int _wipeStatus;
|
||||
int _callingStatus;
|
||||
int _chandelierStatus;
|
||||
int _callingFrame;
|
||||
int _chandelierFrame;
|
||||
int _talkCounter;
|
||||
int _convCounter;
|
||||
int _brieAnimId;
|
||||
bool _startWalkingFl;
|
||||
bool _startWalking0Fl;
|
||||
bool _anim0Running;
|
||||
bool _anim1Running;
|
||||
bool _startSittingFl;
|
||||
public:
|
||||
Scene101(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
|
||||
void handleConversation0();
|
||||
void handleConversation1();
|
||||
void handleAnimation0();
|
||||
void handleAnimation1();
|
||||
};
|
||||
|
||||
class Scene102 : public Scene1xx {
|
||||
private:
|
||||
bool _anim0Running;
|
||||
|
||||
public:
|
||||
Scene102(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene103 : public Scene1xx {
|
||||
private:
|
||||
int _jacquesAction;
|
||||
int _lastRandom;
|
||||
int _standPosition;
|
||||
int _hotspotPrompt1;
|
||||
int _hotspotPrompt2;
|
||||
int _hotspotPrompt3;
|
||||
int _hotspotPrompt4;
|
||||
int _hotspotPrompt5;
|
||||
int _hotspotRightFloor1;
|
||||
int _hotspotRightFloor2;
|
||||
int _hotspotLeftFloor1;
|
||||
int _hotspotLeftFloor2;
|
||||
int _hotspotGentleman;
|
||||
int _convCount;
|
||||
int _lastStairFrame;
|
||||
int _lastJacquesFrame;
|
||||
int _talkCount;
|
||||
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
bool _anim4ActvFl;
|
||||
bool _anim5ActvFl;
|
||||
bool _anim6ActvFl;
|
||||
bool _climbThroughTrapFl;
|
||||
bool _guardFrameFl;
|
||||
bool _sitFl;
|
||||
|
||||
void adjustRails(int variant);
|
||||
void handleJacquesAnim();
|
||||
void climbRightStairs();
|
||||
void climbLeftStairs();
|
||||
void descendRightStairs();
|
||||
void descendLeftStairs();
|
||||
void process_conv_jacques();
|
||||
|
||||
public:
|
||||
Scene103(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene104 : public Scene1xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _needToGetUp;
|
||||
bool _needToStandUp;
|
||||
bool _needToTalk;
|
||||
bool _sittingUp;
|
||||
bool _beforeSheLeaves;
|
||||
bool _beforeHeLeaves;
|
||||
|
||||
int _walkStatus;
|
||||
int _walkFrame;
|
||||
int _coupleStatus;
|
||||
int _coupleFrame;
|
||||
int _richStatus;
|
||||
int _richFrame;
|
||||
int _manTalkCount;
|
||||
int _womanTalkCount;
|
||||
int _lookCount;
|
||||
int _richTalkCount;
|
||||
int _lastPlayerFrame;
|
||||
|
||||
void cleanInventory();
|
||||
void processConversations();
|
||||
void handleWalkAnimation();
|
||||
void handleCoupleAnimations();
|
||||
void handleRichAnimations();
|
||||
void handlePlayerWalk();
|
||||
|
||||
public:
|
||||
Scene104(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene105 : public Scene1xx {
|
||||
public:
|
||||
Scene105(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene106 : public Scene1xx {
|
||||
private:
|
||||
int _sandbagHostpotId;
|
||||
public:
|
||||
Scene106(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene107 : public Scene1xx {
|
||||
public:
|
||||
Scene107(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene108 : public Scene1xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _handRaisedFl;
|
||||
int _shutUpCount;
|
||||
int _maxTalkCount;
|
||||
int _charAction;
|
||||
int _charFrame;
|
||||
int _charTalkCount;
|
||||
int _charHotspotId;
|
||||
int _conversationCount;
|
||||
int _prevShutUpFrame;
|
||||
|
||||
void handleCharAnimation();
|
||||
void handleCharlesConversation();
|
||||
|
||||
public:
|
||||
Scene108(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene109 : public Scene1xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
int _currentFloor;
|
||||
|
||||
public:
|
||||
Scene109(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene110 : public Scene1xx {
|
||||
public:
|
||||
Scene110(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene111 : public Scene1xx {
|
||||
private:
|
||||
bool _removeAxe;
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _closedFl;
|
||||
int _listenFrame;
|
||||
int _listenStatus;
|
||||
|
||||
void handleListenAnimation();
|
||||
void handleListenConversation();
|
||||
|
||||
public:
|
||||
Scene111(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene112 : public Scene1xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
|
||||
int _raoulAction;
|
||||
int _raoulFrame;
|
||||
int _didOptionFl;
|
||||
int _julieFrame;
|
||||
int _julieAction;
|
||||
int _julieCounter;
|
||||
int _julieHotspotId;
|
||||
|
||||
void handleConversation();
|
||||
void handleJulieAnimation();
|
||||
void handleRaoulChair();
|
||||
|
||||
public:
|
||||
Scene112(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene113 : public Scene1xx {
|
||||
private:
|
||||
bool _standingAndTalking;
|
||||
bool _dayWantsToTalk;
|
||||
bool _musicPlaying;
|
||||
bool _afterKissFl;
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
bool _anim4ActvFl;
|
||||
bool _prevent1;
|
||||
bool _prevent2;
|
||||
bool _raoulStandingFl;
|
||||
bool _armsOutFl;
|
||||
|
||||
int _christineHotspotId1;
|
||||
int _christineHotspotId2;
|
||||
int _dayStatus;
|
||||
int _dayFrame;
|
||||
int _dayCount;
|
||||
int _florentStatus;
|
||||
int _florentFrame;
|
||||
int _florentCount;
|
||||
int _julieStatus;
|
||||
int _julieFrame;
|
||||
int _julieCount;
|
||||
int _raoulAction;
|
||||
int _raoulFrame;
|
||||
int _raoulCount;
|
||||
int _lastDayResetFrame;
|
||||
int _standCount;
|
||||
|
||||
void handleFlorentAnimation();
|
||||
void handleDayAnimation();
|
||||
void handleRaoulAnimation();
|
||||
void handleRaoulAnimation2();
|
||||
void handleJulieAnimation();
|
||||
void handleDeadConversation();
|
||||
void handleFlorentConversation();
|
||||
void handleLoveConversation();
|
||||
|
||||
public:
|
||||
Scene113(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene114 : public Scene1xx {
|
||||
public:
|
||||
Scene114(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene150 : public Scene1xx {
|
||||
public:
|
||||
Scene150(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
} // End of namespace Phantom
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_PHANTOM_SCENES1_H */
|
||||
|
||||
#endif
|
||||
7078
engines/mads/phantom/phantom_scenes2.cpp
Normal file
7078
engines/mads/phantom/phantom_scenes2.cpp
Normal file
File diff suppressed because it is too large
Load Diff
307
engines/mads/phantom/phantom_scenes2.h
Normal file
307
engines/mads/phantom/phantom_scenes2.h
Normal file
@@ -0,0 +1,307 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_PHANTOM_SCENES2_H
|
||||
#define MADS_PHANTOM_SCENES2_H
|
||||
|
||||
#include "common/serializer.h"
|
||||
#include "mads/phantom/phantom_scenes.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
class Scene2xx : public PhantomScene {
|
||||
protected:
|
||||
/**
|
||||
* Plays an appropriate sound when entering a scene
|
||||
*/
|
||||
void sceneEntrySound();
|
||||
|
||||
/**
|
||||
*Sets the AA file to use for the scene
|
||||
*/
|
||||
void setAAName();
|
||||
|
||||
/**
|
||||
* Updates the prefix used for getting player sprites for the scene
|
||||
*/
|
||||
void setPlayerSpritesPrefix();
|
||||
public:
|
||||
Scene2xx(MADSEngine *vm) : PhantomScene(vm) {}
|
||||
};
|
||||
|
||||
class Scene201 : public Scene2xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _needHoldFl;
|
||||
int _sellerCount;
|
||||
int _sellerStatus;
|
||||
int _sellerFrame;
|
||||
int _raoulFrame;
|
||||
int _raoulStatus;
|
||||
|
||||
void handleSellerAnimation();
|
||||
void handleRaoulAnimation();
|
||||
void handleConversation();
|
||||
|
||||
public:
|
||||
Scene201(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene202 : public Scene2xx {
|
||||
private:
|
||||
bool _ticketGivenFl;
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _skipWalkFl;
|
||||
int _chandeliersPosX[5];
|
||||
int _chandeliersHotspotId[5];
|
||||
int _conversationCount;
|
||||
int _usherStatus;
|
||||
int _usherFrame;
|
||||
int _usherCount;
|
||||
int _degasStatus;
|
||||
int _degasFrame;
|
||||
|
||||
void handleConversation1();
|
||||
void handleConversation2();
|
||||
void handleUsherAnimation();
|
||||
void handleDegasAnimation();
|
||||
void handleChandeliersPositions();
|
||||
|
||||
public:
|
||||
Scene202(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene203 : public Scene2xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
bool _showNoteFl;
|
||||
|
||||
int _brieStatus;
|
||||
int _brieFrame;
|
||||
int _brieCount;
|
||||
int _raoulStatus;
|
||||
int _raoulFrame;
|
||||
int _raoulCount;
|
||||
int _richardStatus;
|
||||
int _richardFrame;
|
||||
int _daaeStatus;
|
||||
int _daaeFrame;
|
||||
int _conversationCount;
|
||||
|
||||
void handleBrieConversation();
|
||||
void handleRichardConversation();
|
||||
void handleRichardAndDaaeConversation();
|
||||
void handleBrieAnimation();
|
||||
void handleRichardAnimation();
|
||||
void handleRaoulAnimation();
|
||||
void handleDaaeAnimation();
|
||||
|
||||
public:
|
||||
Scene203(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene204 : public Scene2xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
bool _raoulDown;
|
||||
bool _florentGone;
|
||||
bool _skip1Fl;
|
||||
bool _skip2Fl;
|
||||
bool _skip3Fl;
|
||||
bool _endGameFl;
|
||||
|
||||
int _brieStatus;
|
||||
int _brieFrame;
|
||||
int _florStatus;
|
||||
int _florFrame;
|
||||
int _raoulStatus;
|
||||
int _raoulFrame;
|
||||
int _raoulCount;
|
||||
|
||||
void handleConversation();
|
||||
void handleBrieAnimation();
|
||||
void handleFlorAnimation();
|
||||
void handleRaoulAnimation();
|
||||
void handleEndAnimation();
|
||||
|
||||
public:
|
||||
Scene204(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene205 : public Scene2xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _noConversationHold;
|
||||
bool _giveTicketFl;
|
||||
|
||||
int _richardFrame;
|
||||
int _richardStatus;
|
||||
int _richardCount;
|
||||
int _giryFrame;
|
||||
int _giryStatus;
|
||||
int _giryCount;
|
||||
int _conversationCounter;
|
||||
int _lastRandom;
|
||||
|
||||
void handleConversation18();
|
||||
void handleConversation10();
|
||||
void handleConversation11();
|
||||
void handleRichardAnimation();
|
||||
void handleGiryAnimation();
|
||||
|
||||
public:
|
||||
Scene205(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene206 : public Scene2xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _skip1Fl;
|
||||
bool _skip2Fl;
|
||||
|
||||
public:
|
||||
Scene206(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene207 : public Scene2xx {
|
||||
private:
|
||||
bool _skip1Fl;
|
||||
bool _anim0ActvFl;
|
||||
|
||||
public:
|
||||
Scene207(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene208 : public Scene2xx {
|
||||
private:
|
||||
bool _skip1Fl;
|
||||
bool _skip2Fl;
|
||||
|
||||
int _topLeftPeopleFrame;
|
||||
int _topRightPeopleFrame;
|
||||
int _middleLeftPeopleFrame;
|
||||
int _centerPeopleFrame;
|
||||
int _middleRightPeopleFrame;
|
||||
int _bottomLeftPeopleFrame;
|
||||
int _bottomMiddlePeopleFrame;
|
||||
int _bottomRightPeopleFrame;
|
||||
int _direction;
|
||||
|
||||
void animateTopLeftPeople();
|
||||
void animateTopRightPeople();
|
||||
void animateMiddleLeftPeople();
|
||||
void animateCenterPeople();
|
||||
void animateMiddleRightPeople();
|
||||
void animateBottomLeftPeople();
|
||||
void animateBottomMiddlePeople();
|
||||
void animateBottomRightPeople();
|
||||
|
||||
public:
|
||||
Scene208(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene250 : public Scene2xx {
|
||||
public:
|
||||
Scene250(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
} // End of namespace Phantom
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_PHANTOM_SCENES2_H */
|
||||
|
||||
#endif
|
||||
2780
engines/mads/phantom/phantom_scenes3.cpp
Normal file
2780
engines/mads/phantom/phantom_scenes3.cpp
Normal file
File diff suppressed because it is too large
Load Diff
248
engines/mads/phantom/phantom_scenes3.h
Normal file
248
engines/mads/phantom/phantom_scenes3.h
Normal file
@@ -0,0 +1,248 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_PHANTOM_SCENES3_H
|
||||
#define MADS_PHANTOM_SCENES3_H
|
||||
|
||||
#include "common/serializer.h"
|
||||
#include "mads/phantom/phantom_scenes.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
class Scene3xx : public PhantomScene {
|
||||
protected:
|
||||
/**
|
||||
* Plays an appropriate sound when entering a scene
|
||||
*/
|
||||
void sceneEntrySound();
|
||||
|
||||
/**
|
||||
*Sets the AA file to use for the scene
|
||||
*/
|
||||
void setAAName();
|
||||
|
||||
/**
|
||||
* Updates the prefix used for getting player sprites for the scene
|
||||
*/
|
||||
void setPlayerSpritesPrefix();
|
||||
public:
|
||||
Scene3xx(MADSEngine *vm) : PhantomScene(vm) {}
|
||||
};
|
||||
|
||||
class Scene301 : public Scene3xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _skip1Fl;
|
||||
bool _skip2Fl;
|
||||
|
||||
int _lightingHotspotId;
|
||||
int _sandbagHotspotId;
|
||||
|
||||
public:
|
||||
Scene301(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene302 : public Scene3xx {
|
||||
public:
|
||||
Scene302(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene303 : public Scene3xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
int _hempHotspotId;
|
||||
int _skipFrameCheckFl;
|
||||
public:
|
||||
Scene303(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene304 : public Scene3xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
|
||||
int _raoulFrame;
|
||||
int _raoulStatus;
|
||||
int _fightFrame;
|
||||
int _fightStatus;
|
||||
int _fightCount;
|
||||
int _phantomFrame;
|
||||
int _phantomStatus;
|
||||
|
||||
void handleConversation23();
|
||||
void handleRaoulAnimation();
|
||||
void handlePhantomAnimation();
|
||||
void handleFightAnimation();
|
||||
|
||||
public:
|
||||
Scene304(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene305 : public Scene3xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _skipFl;
|
||||
bool _unmaskFl;
|
||||
|
||||
int _unmaskFrame;
|
||||
|
||||
void handle_animation_unmask();
|
||||
|
||||
public:
|
||||
Scene305(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene306 : public Scene3xx {
|
||||
private:
|
||||
bool _speechDoneFl;
|
||||
|
||||
public:
|
||||
Scene306(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene307 : public Scene3xx {
|
||||
public:
|
||||
Scene307(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene308 : public Scene3xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
bool _skip1Fl;
|
||||
bool _skip2Fl;
|
||||
int _currentFloor;
|
||||
|
||||
public:
|
||||
Scene308(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene309 : public Scene3xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
|
||||
int _boatStatus;
|
||||
int _boatFrame;
|
||||
int _talkCount;
|
||||
|
||||
void handleBoatAnimation();
|
||||
|
||||
public:
|
||||
Scene309(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene310 : public Scene3xx {
|
||||
private:
|
||||
int _raoulMessageColor;
|
||||
int _chrisMessageColor;
|
||||
int _multiplanePosX[4];
|
||||
int _lakeFrame;
|
||||
|
||||
void setMultiplanePos(int x_new);
|
||||
void handleLakeAnimation();
|
||||
|
||||
public:
|
||||
Scene310(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
} // End of namespace Phantom
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_PHANTOM_SCENES3_H */
|
||||
|
||||
#endif
|
||||
4978
engines/mads/phantom/phantom_scenes4.cpp
Normal file
4978
engines/mads/phantom/phantom_scenes4.cpp
Normal file
File diff suppressed because it is too large
Load Diff
265
engines/mads/phantom/phantom_scenes4.h
Normal file
265
engines/mads/phantom/phantom_scenes4.h
Normal file
@@ -0,0 +1,265 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_PHANTOM_SCENES4_H
|
||||
#define MADS_PHANTOM_SCENES4_H
|
||||
|
||||
#include "common/serializer.h"
|
||||
#include "mads/phantom/phantom_scenes.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
class Scene4xx : public PhantomScene {
|
||||
protected:
|
||||
/**
|
||||
* Plays an appropriate sound when entering a scene
|
||||
*/
|
||||
void sceneEntrySound();
|
||||
|
||||
/**
|
||||
*Sets the AA file to use for the scene
|
||||
*/
|
||||
void setAAName();
|
||||
|
||||
/**
|
||||
* Updates the prefix used for getting player sprites for the scene
|
||||
*/
|
||||
void setPlayerSpritesPrefix();
|
||||
public:
|
||||
Scene4xx(MADSEngine *vm) : PhantomScene(vm) {}
|
||||
};
|
||||
|
||||
class Scene401 : public Scene4xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHostpotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene401(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene403 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHostpotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene403(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene404 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
bool _anim0ActvFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHostpotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene404(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene406 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHostpotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene406(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene407 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHotspotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene407(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene408 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHotspotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene408(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene409 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHotspotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene409(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene410 : public Scene4xx {
|
||||
private:
|
||||
int _skullSequence[26];
|
||||
void getLeverInfo(Common::Point *pos, int *type, int lever_number, int *noun);
|
||||
|
||||
public:
|
||||
Scene410(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene453 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHotspotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene453(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene456 : public Scene4xx {
|
||||
private:
|
||||
bool _frameInRoomFl;
|
||||
bool _takingFrameInRoomFl;
|
||||
|
||||
int _redFrameHotspotId;
|
||||
int _greenFrameHotspotId;
|
||||
int _blueFrameHotspotId;
|
||||
int _yellowFrameHotspotId;
|
||||
|
||||
public:
|
||||
Scene456(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
} // End of namespace Phantom
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_PHANTOM_SCENES4_H */
|
||||
|
||||
#endif
|
||||
4321
engines/mads/phantom/phantom_scenes5.cpp
Normal file
4321
engines/mads/phantom/phantom_scenes5.cpp
Normal file
File diff suppressed because it is too large
Load Diff
219
engines/mads/phantom/phantom_scenes5.h
Normal file
219
engines/mads/phantom/phantom_scenes5.h
Normal file
@@ -0,0 +1,219 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ENABLE_MADSV2
|
||||
|
||||
#ifndef MADS_PHANTOM_SCENES5_H
|
||||
#define MADS_PHANTOM_SCENES5_H
|
||||
|
||||
#include "common/serializer.h"
|
||||
#include "mads/phantom/phantom_scenes.h"
|
||||
|
||||
namespace MADS {
|
||||
|
||||
namespace Phantom {
|
||||
|
||||
class Scene5xx : public PhantomScene {
|
||||
protected:
|
||||
/**
|
||||
* Plays an appropriate sound when entering a scene
|
||||
*/
|
||||
void sceneEntrySound();
|
||||
|
||||
/**
|
||||
*Sets the AA file to use for the scene
|
||||
*/
|
||||
void setAAName();
|
||||
|
||||
/**
|
||||
* Updates the prefix used for getting player sprites for the scene
|
||||
*/
|
||||
void setPlayerSpritesPrefix();
|
||||
public:
|
||||
Scene5xx(MADSEngine *vm) : PhantomScene(vm) {}
|
||||
};
|
||||
|
||||
class Scene501 : public Scene5xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _skipFl;
|
||||
|
||||
public:
|
||||
Scene501(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene502 : public Scene5xx {
|
||||
private:
|
||||
bool _fire1ActiveFl;
|
||||
bool _fire2ActiveFl;
|
||||
bool _fire3ActiveFl;
|
||||
bool _fire4ActiveFl;
|
||||
bool _panelTurningFl;
|
||||
bool _trapDoorHotspotEnabled;
|
||||
bool _acceleratedFireActivationFl;
|
||||
|
||||
int _panelPushedNum;
|
||||
int _puzzlePictures[16];
|
||||
int _puzzleSprites[16];
|
||||
int _puzzleSequences[16];
|
||||
int _messageLevel;
|
||||
int _cycleStage;
|
||||
|
||||
Common::Point _nextPos;
|
||||
|
||||
uint32 _lastFrameTime;
|
||||
uint32 _timer;
|
||||
uint32 _deathTimer;
|
||||
|
||||
byte *_cyclePointer;
|
||||
|
||||
void room_502_initialize_panels();
|
||||
void loadCyclingInfo();
|
||||
void animateFireBursts();
|
||||
void setPaletteCycle();
|
||||
void handlePanelAnimation();
|
||||
void getPanelInfo(Common::Point *walkToPos, int *panel, Common::Point mousePos, Common::Point *interimPos);
|
||||
|
||||
public:
|
||||
Scene502(MADSEngine *vm);
|
||||
~Scene502() override;
|
||||
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene504 : public Scene5xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _anim3ActvFl;
|
||||
bool _anim4ActvFl;
|
||||
bool _anim5ActvFl;
|
||||
bool _playingMusicFl;
|
||||
bool _chairDialogDoneFl;
|
||||
bool _fireBreathFl;
|
||||
|
||||
int _songNum;
|
||||
int _input3Count;
|
||||
int _playCount;
|
||||
int _listenStatus;
|
||||
int _listenFrame;
|
||||
int _chairStatus;
|
||||
int _chairFrame;
|
||||
int _playStatus;
|
||||
int _playFrame;
|
||||
int _phantomStatus;
|
||||
int _phantomFrame;
|
||||
int _christineTalkCount;
|
||||
int _deathCounter;
|
||||
|
||||
void handleListenAnimation();
|
||||
void handleOrganAnimation();
|
||||
void handleChairAnimation();
|
||||
void handlePhantomAnimation1();
|
||||
void handlePhantomAnimation2();
|
||||
void handlePhantomAnimation3();
|
||||
void handleListenConversation();
|
||||
void handlePlayConversation();
|
||||
void handleFightConversation();
|
||||
|
||||
public:
|
||||
Scene504(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene505 : public Scene5xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _anim1ActvFl;
|
||||
bool _anim2ActvFl;
|
||||
bool _checkFrame106;
|
||||
bool _leaveRoomFl;
|
||||
bool _partedFl;
|
||||
|
||||
int _raoulStatus;
|
||||
int _raoulFrame;
|
||||
int _raoulCount;
|
||||
int _bothStatus;
|
||||
int _bothFrame;
|
||||
int _bothCount;
|
||||
int _partStatus;
|
||||
int _partFrame;
|
||||
int _partCount;
|
||||
|
||||
void handleRaoulAnimation();
|
||||
void handleBothanimation();
|
||||
void handlePartedAnimation();
|
||||
void handleCoffinDialog();
|
||||
|
||||
public:
|
||||
Scene505(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
class Scene506 : public Scene5xx {
|
||||
private:
|
||||
bool _anim0ActvFl;
|
||||
bool _skipFl;
|
||||
bool _ascendingFl;
|
||||
|
||||
public:
|
||||
Scene506(MADSEngine *vm);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
void setup() override;
|
||||
void enter() override;
|
||||
void step() override;
|
||||
void preActions() override;
|
||||
void actions() override;
|
||||
};
|
||||
|
||||
} // End of namespace Phantom
|
||||
} // End of namespace MADS
|
||||
|
||||
#endif /* MADS_PHANTOM_SCENES5_H */
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user