MADS: Phantom: Implement scene 453

This commit is contained in:
Strangerke 2015-11-02 22:13:18 +01:00
parent a7ebf1b755
commit f94b5473b1
3 changed files with 513 additions and 4 deletions

View File

@ -136,7 +136,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
case 410: // skull switch panel
return new Scene410(vm);
case 453: // Labyrinth room (big), 4 exits + 1 bricked door, right
return new DummyScene(vm); // TODO
return new Scene453(vm);
case 456: // Labyrinth room, 2 exits
return new DummyScene(vm); // TODO

View File

@ -2510,9 +2510,9 @@ void Scene408::enter() {
}
if (_globals[kCatacombsMisc] & MAZE_EVENT_WEB) {
_globals._spriteIndexes[8] = _scene->_sprites.addSprites (formAnimName('x', -1), false);
_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('x', -1), false);
if (!_globals[kCobwebIsCut]) {
_globals._spriteIndexes[6] = _scene->_sprites.addSprites (formAnimName('c', 1), false);
_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('c', 1), false);
_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 10);
_scene->_hotspots.activate(NOUN_COBWEB, true);
@ -2533,7 +2533,7 @@ void Scene408::enter() {
}
if (_globals[kCatacombsMisc] & MAZE_EVENT_BRICK) {
_globals._spriteIndexes[7] = _scene->_sprites.addSprites (formAnimName('c', 2), false);
_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('c', 2), false);
_scene->drawToBackground(_globals._spriteIndexes[7], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_EXPOSED_BRICK, false);
}
@ -4125,5 +4125,493 @@ void Scene410::getLeverInfo(Common::Point *pos, int *type, int lever, int *noun)
/*------------------------------------------------------------------------*/
Scene453::Scene453(MADSEngine *vm) : Scene4xx(vm) {
_frameInRoomFl = false;
_takingFrameInRoomFl = false;
_redFrameHotspotId = -1;
_greenFrameHotspotId = -1;
_blueFrameHotspotId = -1;
_yellowFrameHotspotId = -1;
}
void Scene453::synchronize(Common::Serializer &s) {
Scene4xx::synchronize(s);
s.syncAsByte(_frameInRoomFl);
s.syncAsByte(_takingFrameInRoomFl);
s.syncAsSint16LE(_redFrameHotspotId);
s.syncAsSint16LE(_greenFrameHotspotId);
s.syncAsSint16LE(_blueFrameHotspotId);
s.syncAsSint16LE(_yellowFrameHotspotId);
}
void Scene453::setup() {
setPlayerSpritesPrefix();
setAAName();
if (_globals[kCatacombsMisc] & MAZE_EVENT_STONE)
_scene->_initialVariant = 1;
_scene->addActiveVocab(NOUN_RED_FRAME);
_scene->addActiveVocab(NOUN_YELLOW_FRAME);
_scene->addActiveVocab(NOUN_BLUE_FRAME);
_scene->addActiveVocab(NOUN_GREEN_FRAME);
}
void Scene453::enter() {
_game.initCatacombs();
_scene->_hotspots.activate(NOUN_SKULL, false);
_scene->_hotspots.activate(NOUN_DRAIN, false);
_scene->_hotspots.activate(NOUN_RATS_NEST, false);
_scene->_hotspots.activate(NOUN_WEB, false);
_scene->_hotspots.activate(NOUN_STONE, false);
_scene->_hotspots.activate(NOUN_HOLE, false);
_scene->_hotspots.activate(NOUN_GATE, false);
_globals._spriteIndexes[8] = _scene->_sprites.addSprites("*RRD_9", false);
_globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('f', 0), false);
_globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('f', 1), false);
_globals._spriteIndexes[11] = _scene->_sprites.addSprites(formAnimName('f', 2), false);
_globals._spriteIndexes[12] = _scene->_sprites.addSprites(formAnimName('f', 3), false);
if (_game.exitCatacombs(0) == -1) {
_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('c', 1), false);
_scene->drawToBackground(_globals._spriteIndexes[1], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_ARCHWAY_TO_NORTH, false);
}
if (_game.exitCatacombs(3) == -1) {
_globals._spriteIndexes[13] = _scene->_sprites.addSprites(formAnimName('c', 8), false);
_scene->drawToBackground(_globals._spriteIndexes[13], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_MORE_CATACOMBS, false);
_scene->_hotspots.activate(NOUN_GATE, true);
}
if (_game.exitCatacombs(1) == -1) {
_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('c', 2), false);
_scene->drawToBackground(_globals._spriteIndexes[2], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_ARCHWAY_TO_EAST, false);
}
if (_globals[kCatacombsMisc] & MAZE_EVENT_DRAIN) {
_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('c', 3), false);
_scene->drawToBackground(_globals._spriteIndexes[3], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_DRAIN, true);
}
if (_globals[kCatacombsMisc] & MAZE_EVENT_RAT_NEST) {
_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('c', 4), false);
_scene->drawToBackground(_globals._spriteIndexes[4], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_SKULL, true);
_scene->_hotspots.activate(NOUN_RATS_NEST, true);
}
if (_globals[kCatacombsMisc] & MAZE_EVENT_WEB) {
_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('c', 5), false);
_scene->drawToBackground(_globals._spriteIndexes[5], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_WEB, true);
}
if (_globals[kCatacombsMisc] & MAZE_EVENT_BRICK) {
_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('c', 6), false);
_scene->drawToBackground(_globals._spriteIndexes[6], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activateAtPos(NOUN_EXPOSED_BRICK, false, Common::Point(138, 35));
_scene->_hotspots.activateAtPos(NOUN_EXPOSED_BRICK, false, Common::Point(84, 27));
}
if (_globals[kCatacombsMisc] & MAZE_EVENT_STONE) {
_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('c', 7), false);
_scene->drawToBackground(_globals._spriteIndexes[7], 1, Common::Point(-32000, -32000), 0, 100);
_scene->_hotspots.activate(NOUN_HOLE, true);
_scene->_hotspots.activate(NOUN_STONE, true);
}
if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
switch (_globals[kCatacombsFrom]) {
case 0:
_game._player._playerPos = Common::Point(107, 87);
_game._player._facing = FACING_SOUTH;
_game._player.walk(Common::Point(107, 98), FACING_SOUTH);
break;
case 1:
_game._player._playerPos = Common::Point(316, 129);
_game._player._facing = FACING_WEST;
_game._player.walk(Common::Point(277, 129), FACING_WEST);
break;
case 3:
_game._player.firstWalk(Common::Point(-20, 128), FACING_EAST, Common::Point(19, 128), FACING_EAST, true);
break;
default:
break;
}
}
if (_game._objects[OBJ_RED_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_redFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_RED_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_redFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
if (_game._objects[OBJ_GREEN_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_greenFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_GREEN_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_greenFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
if (_game._objects[OBJ_BLUE_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_globals._sequenceIndexes[11] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[11], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_blueFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_BLUE_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_blueFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
if (_game._objects[OBJ_YELLOW_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_yellowFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_YELLOW_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_yellowFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
sceneEntrySound();
}
void Scene453::step() {
}
void Scene453::actions() {
if (_action.isAction(VERB_PUT) && _action.isTarget(NOUN_FLOOR)) {
if (_action.isObject(NOUN_RED_FRAME) || _action.isObject(NOUN_BLUE_FRAME) || _action.isObject(NOUN_YELLOW_FRAME) || _action.isObject(NOUN_GREEN_FRAME)) {
if (_frameInRoomFl)
_vm->_dialogs->show(29);
else {
switch (_game._trigger) {
case (0):
_game._player._stepEnabled = false;
_game._player._visible = false;
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
break;
case 1:
if (_action.isObject(NOUN_RED_FRAME)) {
_game._objects.setRoom(OBJ_RED_FRAME, NOWHERE);
_game._objects[OBJ_RED_FRAME]._roomNumber = _globals[kCatacombsRoom] + 600;
_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_redFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_RED_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_redFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
if (_action.isObject(NOUN_GREEN_FRAME)) {
_game._objects.setRoom(OBJ_GREEN_FRAME, NOWHERE);
_game._objects[OBJ_GREEN_FRAME]._roomNumber = _globals[kCatacombsRoom] + 600;
_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_greenFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_GREEN_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_greenFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
if (_action.isObject(NOUN_BLUE_FRAME)) {
_game._objects.setRoom(OBJ_BLUE_FRAME, NOWHERE);
_game._objects[OBJ_BLUE_FRAME]._roomNumber = _globals[kCatacombsRoom] + 600;
_globals._sequenceIndexes[11] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[11], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_blueFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_BLUE_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_blueFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
if (_action.isObject(NOUN_YELLOW_FRAME)) {
_game._objects.setRoom(OBJ_YELLOW_FRAME, NOWHERE);
_game._objects[OBJ_YELLOW_FRAME]._roomNumber = _globals[kCatacombsRoom] + 600;
_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 14);
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_yellowFrameHotspotId = _scene->_dynamicHotspots.add(NOUN_YELLOW_FRAME, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(pos.x - 5, pos.y - 5, pos.x + 5, pos.y + 1));
_scene->_dynamicHotspots.setPosition(_yellowFrameHotspotId, Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
break;
case 2:
_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]);
_game._player._visible = true;
_game._player._stepEnabled = true;
break;
default:
break;
}
}
_action._inProgress = false;
return;
}
}
if (_action.isAction(VERB_TAKE)) {
if (_action.isObject(NOUN_RED_FRAME) || _action.isObject(NOUN_GREEN_FRAME) || _action.isObject(NOUN_BLUE_FRAME) || _action.isObject(NOUN_YELLOW_FRAME)) {
if ((_takingFrameInRoomFl || _game._trigger)) {
switch (_game._trigger) {
case (0):
_game._player._stepEnabled = false;
_game._player._visible = false;
_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
break;
case 1:
if (_action.isObject(NOUN_RED_FRAME)) {
_scene->deleteSequence(_globals._sequenceIndexes[9]);
_scene->_dynamicHotspots.remove(_redFrameHotspotId);
_game._objects.addToInventory(OBJ_RED_FRAME);
}
if (_action.isObject(NOUN_GREEN_FRAME)) {
_scene->deleteSequence(_globals._sequenceIndexes[10]);
_scene->_dynamicHotspots.remove(_greenFrameHotspotId);
_game._objects.addToInventory(OBJ_GREEN_FRAME);
}
if (_action.isObject(NOUN_BLUE_FRAME)) {
_scene->deleteSequence(_globals._sequenceIndexes[11]);
_scene->_dynamicHotspots.remove(_blueFrameHotspotId);
_game._objects.addToInventory(OBJ_BLUE_FRAME);
}
if (_action.isObject(NOUN_YELLOW_FRAME)) {
_scene->deleteSequence(_globals._sequenceIndexes[12]);
_scene->_dynamicHotspots.remove(_yellowFrameHotspotId);
_game._objects.addToInventory(OBJ_YELLOW_FRAME);
}
_vm->_sound->command(26);
break;
case 2:
_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]);
_game._player._visible = true;
_game._player._stepEnabled = true;
break;
default:
break;
}
_action._inProgress = false;
return;
}
}
}
if (_action.isAction(VERB_WALK_THROUGH, NOUN_ARCHWAY_TO_NORTH)) {
_game.moveCatacombs(0);
_action._inProgress = false;
return;
}
if (_action.isAction(VERB_WALK_THROUGH, NOUN_ARCHWAY_TO_EAST)) {
_game.moveCatacombs(1);
_action._inProgress = false;
return;
}
if (_action._lookFlag) {
_vm->_dialogs->show(45310);
_action._inProgress = false;
return;
}
if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
if (_action.isObject(NOUN_WALL)) {
_vm->_dialogs->show(45311);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_FLOOR)) {
_vm->_dialogs->show(45312);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_ARCHWAY)) {
_vm->_dialogs->show(45313);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_EXPOSED_BRICK)) {
_vm->_dialogs->show(45314);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_HOLE)) {
_vm->_dialogs->show(45317);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_SKULL)) {
_vm->_dialogs->show(45318);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_WEB)) {
_vm->_dialogs->show(45324);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_RATS_NEST)) {
_vm->_dialogs->show(45325);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_DRAIN)) {
_vm->_dialogs->show(45327);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_STONE)) {
_vm->_dialogs->show(45328);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_RED_FRAME) && !_game._objects.isInInventory(OBJ_RED_FRAME)) {
_vm->_dialogs->showItem(OBJ_RED_FRAME, 802, 0);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_GREEN_FRAME) && !_game._objects.isInInventory(OBJ_GREEN_FRAME)) {
_vm->_dialogs->showItem(OBJ_GREEN_FRAME, 819, 0);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_BLUE_FRAME) && !_game._objects.isInInventory(OBJ_BLUE_FRAME)) {
_vm->_dialogs->showItem(OBJ_BLUE_FRAME, 817, 0);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_YELLOW_FRAME) && !_game._objects.isInInventory(OBJ_YELLOW_FRAME)) {
_vm->_dialogs->showItem(OBJ_YELLOW_FRAME, 804, 0);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_MORE_CATACOMBS)) {
_vm->_dialogs->show(45315);
_action._inProgress = false;
return;
}
if (_action.isObject(NOUN_GATE)) {
_vm->_dialogs->show(45330);
_action._inProgress = false;
return;
}
}
if (_action.isAction(VERB_TAKE, NOUN_SKULL)) {
_vm->_dialogs->show(45319);
_action._inProgress = false;
return;
}
if (_action.isAction(VERB_OPEN, NOUN_GATE)) {
_vm->_dialogs->show(45331);
_action._inProgress = false;
return;
}
if (_action.isAction(VERB_TAKE, NOUN_RATS_NEST)) {
_vm->_dialogs->show(45326);
_action._inProgress = false;
return;
}
if (_action.isAction(VERB_TAKE, NOUN_STONE)) {
_vm->_dialogs->show(45329);
_action._inProgress = false;
}
}
void Scene453::preActions() {
if (_action.isAction(VERB_EXIT_TO, NOUN_MORE_CATACOMBS))
_game.moveCatacombs(3);
_frameInRoomFl = false;
_takingFrameInRoomFl = false;
if (_game._objects[OBJ_RED_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_frameInRoomFl = true;
if (_action.isAction(VERB_TAKE, NOUN_RED_FRAME))
_takingFrameInRoomFl = true;
}
if (_game._objects[OBJ_YELLOW_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_frameInRoomFl = true;
if (_action.isAction(VERB_TAKE, NOUN_YELLOW_FRAME))
_takingFrameInRoomFl = true;
}
if (_game._objects[OBJ_BLUE_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_frameInRoomFl = true;
if (_action.isAction(VERB_TAKE, NOUN_BLUE_FRAME))
_takingFrameInRoomFl = true;
}
if (_game._objects[OBJ_GREEN_FRAME]._roomNumber == _globals[kCatacombsRoom] + 600) {
_frameInRoomFl = true;
if (_action.isAction(VERB_TAKE, NOUN_GREEN_FRAME))
_takingFrameInRoomFl = true;
}
if (_action.isAction(VERB_PUT) && _action.isTarget(NOUN_FLOOR) && (_action.isObject(NOUN_RED_FRAME) || _action.isObject(NOUN_BLUE_FRAME) || _action.isObject(NOUN_YELLOW_FRAME) || _action.isObject(NOUN_GREEN_FRAME))) {
if (_frameInRoomFl)
_game._player._needToWalk = false;
else {
Common::Point pos = _scene->_sprites[_globals._spriteIndexes[9]]->getFramePos(0);
_game._player.walk(Common::Point(pos.x + 12, pos.y), FACING_NORTHWEST);
}
}
}
/*------------------------------------------------------------------------*/
} // End of namespace Phantom
} // End of namespace MADS

View File

@ -217,6 +217,27 @@ public:
virtual void preActions();
virtual void actions();
};
class Scene453 : public Scene4xx {
private:
bool _frameInRoomFl;
bool _takingFrameInRoomFl;
int _redFrameHotspotId;
int _greenFrameHotspotId;
int _blueFrameHotspotId;
int _yellowFrameHotspotId;
public:
Scene453(MADSEngine *vm);
virtual void synchronize(Common::Serializer &s);
virtual void setup();
virtual void enter();
virtual void step();
virtual void preActions();
virtual void actions();
};
} // End of namespace Phantom
} // End of namespace MADS