/* 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 = 140 && _G(player).walk_x <= 240 && _G(player).walk_y >= 295 && _G(player).walk_y <= 325) player_walk_to(139, 326); if (_G(player).walk_x >= 423 && _G(player).walk_x <= 540 && _G(player).walk_y >= 308 && _G(player).walk_y <= 340) player_walk_to(541, 341); if (_G(player).walk_x >= 341 && _G(player).walk_x <= 480 && _G(player).walk_y >= 326 && _G(player).walk_y <= 365) player_walk_to(481, 366); if (player_said("GEAR") && player_said("VERA'S DINER ")) player_set_facing_at(680, 340); } void Room145::parser() { _G(kernel).trigger_mode = KT_DAEMON; if (_G(walker).wilbur_said(SAID)) { // Already handled } else if (player_said("conv21")) { conv21(); } else if (player_said("conv22")) { conv22(); } else if (player_said("conv23")) { conv23(); } else if (player_said("GEAR", "VERA'S DINER ")) { disable_player_commands_and_fade_init(1014); } else if (!_G(walker).wilbur_match(MATCH)) { return; } _G(player).command_ready = false; } void Room145::loadDrum() { static const char *NAMES[12] = { "145dz01", "145dz02", "145dz03", "145dz04", "145dz05", "145dz06", "145dz01s", "145dz02s", "145dz03s", "145dz04s", "145dz05s", "145dz06s" }; for (int i = 0; i < 12; ++i) series_load(NAMES[i]); digi_preload("145_003"); digi_preload("145_004"); } void Room145::loadRx() { static const char *NAMES[8] = { "145rx01", "145rx02", "145rx04", "145rx06", "145rx01s", "145rx02s", "145rx04s", "145rx06s" }; for (int i = 0; i < 8; ++i) series_load(NAMES[i]); } void Room145::conv21() { 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 { switch (node) { case 2: case 7: case 12: vipeSpeaking(); break; case 3: case 4: case 5: case 6: case 8: case 11: roxySpeaking(); break; case 9: if (entry <= 0) { roxySpeaking(); } else if (entry <= 2) { vipeSpeaking(); } break; case 10: if (entry <= 0) { vipeSpeaking(); } else if (entry == 1) { roxySpeaking(); } break; default: break; } } } } void Room145::conv22() { const char *sound = conv_sound_to_play(); const int who = conv_whos_talking(); if (sound) { if (who == 1) wilbur_speech(sound, 10001); else roxySpeaking(); } } void Room145::conv23() { 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 { switch (node) { case 2: switch (entry) { case 0: _drumzState = 20; break; case 1: _drumzState = 21; break; case 2: case 3: _drumzState = 22; break; case 4: _drumzState = 21; break; case 5: _drumzState = 20; break; case 6: _drumzState = 20; break; case 7: conv_resume_curr(); break; default: break; } break; case 5: _drumzState = 20; break; default: break; } } } } void Room145::vipeSpeaking() { _vipe.terminate(); _vipeState = 39; digi_play(conv_sound_to_play(), 1, 255, 5); _vipe.play("145vp04", 0x300, 4, -1., 6, -1); } void Room145::roxySpeaking() { _roxy.terminate(); _roxyState = 39; digi_play(conv_sound_to_play(), 1, 255, 4); _roxy.play("145rx04", 0x900, 4, -1, 6, -1); } void Room145::loadSeries1() { series_load("145wi02"); series_load("145wi02s"); series_load("145wi03"); series_load("145wi03s"); series_load("145dz08"); series_load("145dz08s"); } int Room145::getRandomDrumzState() const { switch (imath_ranged_rand(1, 10)) { case 1: return 24; case 2: return 25; default: return 19; } } void Room145::resetRoxy() { switch (_val5) { case 31: _roxy.terminate(); _roxyState = 32; kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION); break; case 33: _roxy.terminate(); _roxyState = 33; kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION); break; default: term_message("Can't move roxy to home state, just have to wait!"); break; } } void Room145::playRandomDigi1() { _state2 = 1; static const char *NAMES[4] = { "145v907", "145v908", "145v909", "145v910" }; _digiName1 = NAMES[imath_ranged_rand(0, 3)]; digi_preload(_digiName1); digi_play(_digiName1, 2, 125, 6); } void Room145::playRandomDigi2() { _state2 = 1; static const char *NAMES[13] = { "145r907", "145r908", "145r909", "145r910", "145r911", "145r912", "145r913", "145r914", "145r915", "145r916", "145r917", "145r918", "145r919" }; _digiName2 = NAMES[imath_ranged_rand(0, 12)]; _roxyState = 34; digi_preload(_digiName2); npc_say(_digiName2, 4, "145rx01", 0x900, 1, 3, 7, 2); } } // namespace Rooms } // namespace Burger } // namespace M4