/* 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 = 357 && _G(player).walk_x <= 639 && _G(player).walk_y >= 311 && _G(player).walk_y <= 353) player_hotspot_walk_override(356, 332, 3); if (!player_said_any("GEAR", "LOOK AT")) { if (player_said("PARLOUR")) player_set_facing_at(84, 300); if (player_said("BASEMENT")) player_set_facing_at(171, 254); } } void Room172::parser() { _G(kernel).trigger_mode = KT_DAEMON; if (_G(walker).wilbur_said(SAID)) { // Already handled } else if (player_said("conv41")) { conv41(); } else if (player_said_any("GEAR", "LOOK AT") && player_said("PARLOUR")) { disable_player_commands_and_fade_init(1018); } else if (player_said_any("GEAR", "LOOK AT") && player_said("BASEMENT")) { disable_player_commands_and_fade_init(1020); } else if (player_said("TAKE", "CARROT JUICE ")) { if (_G(flags)[V092]) { _convName = "172p950"; _pollyShould = 12; kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); } else { _G(wilbur_should) = 2; kernel_trigger_dispatch_now(kCHANGE_WILBUR_ANIMATION); } } else if (player_said("WHISTLE", "AUNT POLLY")) { player_set_commands_allowed(false); _G(wilbur_should) = 1; wilbur_speech("172w901", kCHANGE_WILBUR_ANIMATION); } else if (player_said("TALK", "AUNT POLLY")) { kernel_trigger_dispatch_now(3); } else if (player_said("AUNT POLLY") && player_said_any("PHONE BILL", "CARROT JUICE")) { _convName = imath_rand_bool(2) ? "172p901" : "172904"; _pollyShould = 12; kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); } else if (player_said("MICROWAVE")) { parserAction("172w004"); } else if (player_said("GEAR", "REFRIGERATOR")) { parserAction("172w005"); } else if (player_said("GEAR", "OVEN")) { parserAction("172w007"); } else if (player_said("SINK")) { parserAction("172w010"); } else if (player_said("GEAR") && player_said_any("CUPBOARD", "CUPBOARD ")) { parserAction("172w036"); } else if (player_said("TAKE", "JUICER")) { if (_G(flags)[V092]) { _convName = imath_rand_bool(2) ? "172p905a" : "172p905b"; _pollyShould = 12; kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); } else { wilbur_speech("172w033"); } } else { return; } _G(player).command_ready = false; } void Room172::parserAction(const char *name) { if (_G(flags)[V092]) { _convName = "172p950"; _pollyShould = 12; kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); } else { wilbur_speech(name); } } void Room172::freeSeries7() { digi_stop(2); terminateMachineAndNull(_series7); } void Room172::playDigi3() { loadSeries7(); digi_preload("172_003"); digi_play_loop("172_003", 3, 125); } void Room172::loadSeries7() { digi_preload("172p909"); digi_play_loop("172p909", 2, 255); _series7 = series_play("172ap02t", 0x3ff, 4, -1, 4); } void Room172::conv41() { const char *sound = conv_sound_to_play(); const int who = conv_whos_talking(); const int node = conv_current_node(); const int entry = conv_current_entry(); if (sound) { if (who == 1) { wilbur_speech(sound, 10001); } else { freeSeries5(); switch (node) { case 0: _pollyShould = 4; kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; case 2: switch (entry) { case 0: _pollyShould = 10; kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; case 1: freeSeries7(); _G(flags)[V092] = 0; _pollyShould = 14; npc_say(sound, kCHANGE_POLLY_ANIMATION, "172ap02", 0x400, true, 31, 35); break; default: break; } break; case 3: freeSeries7(); _pollyShould = 13; npc_say(sound, kCHANGE_POLLY_ANIMATION, "172ap02", 0x400, true, 31, 35); break; default: freeSeries7(); _pollyShould = 14; npc_say(sound, kCHANGE_POLLY_ANIMATION, "172ap02", 0x400, true, 31, 35); break; } } } } } // namespace Rooms } // namespace Burger } // namespace M4