/* 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 378 && _G(player).walk_x <= 518 && _G(player).walk_y >= 300 && _G(player).walk_y <= 354) { player_walk_to(_G(player).click_x, 355); } if (!player_said("GEAR") && player_said("FRONT DOOR")) { player_set_facing_at(94, 281); } else if (!player_said_any("GEAR", "LOOK AT") && player_said("KITCHEN")) { player_set_facing_at(601, 296); } else if (player_said("GEAR", "FRONT DOOR")) { frontDoor(); _G(kernel).call_daemon_every_loop = true; _G(player).command_ready = false; } } void Room171::parser() { _G(kernel).trigger_mode = KT_DAEMON; if (_G(walker).wilbur_said(SAID)) { // Do nothing } else if (player_said("conv40")) { conv40(); } else if (player_said_any("GEAR", "LOOK AT") && player_said("KITCHEN")) { if (_G(flags)[V091]) { disable_player_commands_and_fade_init(1019); } else { player_set_commands_allowed(false); _pollyShould = 30; } } else if (player_said("GEAR", "STAIRS")) { _G(wilbur_should) = 1; kernel_trigger_dispatch_now(kCHANGE_WILBUR_ANIMATION); } else if (player_said("WHISTLE", "AUNT POLLY")) { player_set_commands_allowed(false); _G(wilbur_should) = 3; wilbur_speech("171w901", kCHANGE_WILBUR_ANIMATION); } else if (player_said("TALK", "AUNT POLLY")) { kernel_trigger_dispatch_now(6); } else if (player_said("AUNT POLLY") && player_said_any("PHONE BILL", "CARROT JUICE")) { player_set_commands_allowed(false); _digi1 = "171p901"; _pollyShould = 28; } else if (player_said("ROCKER")) { if (player_said("LOOK AT")) { wilbur_speech(_G(flags)[V092] ? "171w017" : "171w016"); } else if (player_said("GEAR")) { wilbur_speech(_G(flags)[V092] ? "171w015" : "171w018"); } else { return; } } else { return; } _G(player).command_ready = false; } void Room171::loadSeries1() { series_load("171ap11"); series_load("171ap12"); series_load("171ap13"); series_load("171ap11s"); series_load("171ap12s"); series_load("171ap13s"); digi_preload("171_009"); } void Room171::loadSeries2() { series_load("171ap01"); series_load("171ap02"); series_load("171ap03"); series_load("171ap01s"); series_load("171ap02s"); series_load("171ap03s"); loadSeries1(); } void Room171::loadSeries3() { series_load("171ap04"); series_load("171ap05"); series_load("171ap06"); series_load("171ap04s"); series_load("171ap05s"); series_load("171ap06s"); loadSeries1(); } void Room171::loadSeries4() { series_load("171ap07"); series_load("171ap08"); series_load("171ap09"); series_load("171ap09s"); loadSeries1(); } void Room171::loadSeries5() { series_load("171ap10"); series_load("171ap10s"); loadSeries1(); } void Room171::freeSeries() { _series.terminate(); } void Room171::frontDoor() { if (player_said_any("GEAR", "LOOK AT") && player_said("FRONT DOOR")) _doorFlag = true; if (_doorFlag) { player_update_info(); if (_G(player_info).x < 94 && _G(player_info).y < 281 && player_commands_allowed()) disable_player_commands_and_fade_init(1017); } } void Room171::conv40() { const int who = conv_whos_talking(); const int node = conv_current_node(); const int entry = conv_current_entry(); if (!conv_sound_to_play()) return; if (who == 1) { wilbur_speech(conv_sound_to_play(), kRESUME_CONVERSATION); switch (node) { case 6: if (entry <= 0 || (entry == 6 || entry == 7)) _pollyShould = 36; break; case 7: _pollyShould = 36; break; case 10: if (entry == 0) _pollyShould = 36; break; case 15: if (entry == 1 || entry == 2 || entry == 5) _pollyShould = 36; break; default: break; } } else { switch (node) { case 1: switch (entry) { case 0: _pollyShould = 6; break; case 1: _pollyShould = 7; break; case 2: _pollyShould = 8; break; default: break; } kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; case 2: switch (entry) { case 0: _pollyShould = 11; break; case 1: _pollyShould = 12; break; case 2: _pollyShould = 13; break; default: break; } kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; case 3: switch (entry) { case 0: _pollyShould = 15; break; case 1: _pollyShould = 17; break; default: break; } kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; case 4: switch (entry) { case 0: _pollyShould = 21; break; case 1: _pollyShould = 22; break; default: break; } kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; case 6: _pollyShould = (entry == 6) ? 33 : 34; break; case 8: switch (entry) { case 0: _pollyShould = 33; break; case 1: _pollyShould = 38; break; default: break; } kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; case 9: _pollyShould = 34; kernel_trigger_dispatch_now(kCHANGE_POLLY_ANIMATION); break; default: _pollyShould = 34; break; } } } } // namespace Rooms } // namespace Burger } // namespace M4