/* 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 = 1) { switch (_G(kernel).trigger) { case -1: player_set_commands_allowed(false); ws_hide_walker(_G(my_walker)); _ripActionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip tugs at hand and removes it"); terminateMachine(_handInWallMach); sendWSMessage_10000(1, _ripActionMach, _ripTugsOnArm, 1, 36, 10, _ripTugsOnArm, 36, 36, 0); break; case 10: sendWSMessage_10000(1, _ripActionMach, _ripTugsOnArm, 37, 68, 20, _ripTugsOnArm, 68, 68, 0); digi_play("802_s03", 2, 255, -1, -1); break; case 20: terminateMachine(_ripActionMach); ws_unhide_walker(_G(my_walker)); _holeInWallMach = series_place_sprite("HOLE IN WALL", 0, 0, 0, 100, 512); _sackAgainstWallMach = series_place_sprite("802SACK2", 0, 0, 0, 100, 768); if (inv_player_has("match")) { hotspot_set_active(_G(currentSceneDef).hotspots, "hole ", true); hotspot_set_active(_G(currentSceneDef).hotspots, "hole", false); } else { hotspot_set_active(_G(currentSceneDef).hotspots, "hole ", false); hotspot_set_active(_G(currentSceneDef).hotspots, "hole", true); } hotspot_set_active(_G(currentSceneDef).hotspots, "hand", false); hotspot_set_active(_G(currentSceneDef).hotspots, "wall", false); _G(flags)[kOpenedHoleInWall] = 1; player_set_commands_allowed(true); break; default: break; } } } else { switch (_G(kernel).trigger) { case -1: player_set_commands_allowed(false); ws_hide_walker(_G(my_walker)); _ripActionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip tugs at hand (noshovel)"); terminateMachine(_handInWallMach); sendWSMessage_10000(1, _ripActionMach, _ripTugsBeforeDigging, 1, 15, 10, _ripTugsBeforeDigging, 15, 15, 0); break; case 1: sendWSMessage_10000(1, _ripActionMach, _ripTugsBeforeDigging, 26, 20, 2, _ripTugsBeforeDigging, 19, 19, 0); break; case 2: sendWSMessage_10000(1, _ripActionMach, _ripTugsBeforeDigging, 19, 15, 13, _ripTugsBeforeDigging, 15, 15, 0); if (inv_player_has("farmer's shovel")) { if (_G(flags)[kDugInWall] == 1) digi_play("802r07", 1, 255, -1, -1); } else { digi_play("802r06", 1, 255, -1, -1); } break; case 3: terminateMachine(_ripActionMach); ws_unhide_walker(_G(my_walker)); _handInWallMach = series_place_sprite("HAND IN WALL", 0, 0, 0, 100, 512); player_set_commands_allowed(true); break; case 10: sendWSMessage_10000(1, _ripActionMach, _ripTugsBeforeDigging, 16, 26, 1, _ripTugsBeforeDigging, 26, 26, 0); digi_play("802_s02", 2, 255, -1, -1); break; case 13: sendWSMessage_10000(1, _ripActionMach, _ripTugsBeforeDigging, 14, 1, 3, _ripTugsBeforeDigging, 1, 1, 0); digi_stop(2); break; default: break; } } } else if (takeFl && (player_said("urn") || player_said("urn ") || player_said("potatoes"))) { digi_play("802r14", 1, 255, -1, -1); } else if (climbFl && player_said("stairs")) { switch (_G(kernel).trigger) { case -1: player_set_commands_allowed(false); _ripActionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "rip walks up stairs"); ws_hide_walker(_G(my_walker)); sendWSMessage_10000(1, _ripActionMach, _ripUpStairs, 1, 23, 1, _ripUpStairs, 24, 29, 0); break; case 1: disable_player_commands_and_fade_init(2); break; case 2: terminateMachine(_ripActionMach); _G(game).setRoom(801); break; default: break; } } else if (player_said("journal") && (takeFl || lookFl || gearFl)) { digi_play("com042", 1, 255, -1, 997); } else return; _G(player).command_ready = false; } void Room802::daemon() { switch (_G(kernel).trigger) { case 6: case 7: player_set_commands_allowed(false); _ripActionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "rip walks down stairs"); sendWSMessage_10000(1, _ripActionMach, _ripDownStairs, 1, 20, 51, _ripDownStairs, 20, 20, 0); break; case 14: player_set_commands_allowed(false); setGlobals1(_ripArmXPos3, 1, 15, 15, 15, 0, 15, 1, 1, 1, 0, 1, 1, 1, 1, 0, 15, 15, 15, 15, 0); sendWSMessage_110000(_G(my_walker), 16); break; case 16: sendWSMessage_150000(_G(my_walker), 0); setGlobals1(_ripTalkOffTd33, 1, 3, 3, 3, 0, 3, 1, 1, 1, 0, 1, 1, 1, 1, 0, 3, 3, 3, 3, 0); sendWSMessage_110000(_G(my_walker), 15); if (player_said("rice sack") || player_said("rice sack ")) digi_play("802R01", 1, 255, 17, -1); else if (player_said("wall")) digi_play("802R02", 1, 255, 17, -1); break; case 17: sendWSMessage_140000(_G(my_walker), 18); break; case 18: setGlobals1(_ripArmXPos3, 15, 1, 1, 1, 0, 15, 1, 1, 1, 0, 1, 1, 1, 1, 0, 15, 15, 15, 15, 0); sendWSMessage_110000(_G(my_walker), 19); break; case 19: sendWSMessage_150000(_G(my_walker), 0); player_set_commands_allowed(true); break; case 51: terminateMachine(_ripActionMach); ws_unhide_walker(_G(my_walker)); series_unload(_ripDownStairs); player_set_commands_allowed(true); break; default: break; } } } // namespace Rooms } // namespace Riddle } // namespace M4