/* 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 = 200) { player_set_commands_allowed(false); _G(flags)[kPoliceState] = 4; _sherrifShould = 33; _deputyShould = 23; } } kernel_timing_trigger(10, 13); break; case kWILBURS_SPEECH_START: _wilburShould = 15; player_set_commands_allowed(false); break; case kWILBURS_SPEECH_FINISHED: _wilburShould = 1; player_set_commands_allowed(true); _G(kernel).continue_handling_trigger = true; break; default: _G(kernel).continue_handling_trigger = true; break; } } void Room138::parser() { _G(kernel).trigger_mode = KT_DAEMON; if (_G(walker).wilbur_said(SAID)) { // Nothing needed } else if (player_said("keys", "ignition switch")) { _wilburShould = 16; player_set_commands_allowed(false); } else if ((player_said("donuts") || player_said("keys") || player_said("ignition switch") || player_said("horn") || player_said("radio") || player_said("police radio") || player_said("radar") || player_said("deputy") || player_said("patrol car")) && inv_player_has(_G(player).verb)) { wilbur_speech("138w004"); } else if (player_said("gear", "horn")) { player_set_commands_allowed(false); _G(flags)[kPoliceState] = 1; _wilburShould = 10; } else if (player_said("gear", "radio")) { player_set_commands_allowed(false); if (inv_object_is_here("keys")) _G(flags)[kPoliceState] = 2; _wilburShould = 11; } else if (player_said("talk to") && (player_said("sheriff") || player_said("deputy"))) { player_set_commands_allowed(false); _G(flags)[kPoliceState] = 3; wilbur_speech("138w610", 6, 138); _wilburShould = 15; } else if (player_said("take", "keys") && !inv_player_has("keys")) { _wilburShould = 7; player_set_commands_allowed(false); } else if (player_said("look at", "keys") && inv_object_is_here("keys")) { wilbur_speech("138w005"); } else if (player_said("gear", "keys")) { wilbur_speech("138w004"); } else if (player_said("keys") && inv_player_has(_G(player).verb)) { wilbur_speech("138w004"); } else if (player_said("exit") || player_said("look at", "exit")) { player_set_commands_allowed(false); pal_fade_init(_G(kernel).first_fade, 255, 0, 30, 1010); } else { return; } _G(player).command_ready = false; } void Room138::freeAssets() { if (!_assetsFreed) { _assetsFreed = true; digi_stop(2); static const char *NAMES[11] = { "137_020", "137_021", "137_022", "137_023", "137_024", "137_025", "137_026", "137_027", "137_028", "137_012", "137_013" }; for (int i = 0; i < 11; ++i) digi_unload(NAMES[i]); digi_unload(inv_object_is_here("keys") ? "138_002" : "138_001"); } } void Room138::randomDigi() { digi_play(Common::String::format("137_0%d", imath_ranged_rand(23, 27)).c_str(), 2); } void Room138::loadSeries() { if (_series3 == -1) _series3 = series_load("138wi02"); } void Room138::freeSeries() { if (_series3 != -1) { series_unload(_series3); _series3 = -1; } } } // namespace Rooms } // namespace Burger } // namespace M4