Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,115 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM701_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM701_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room701 : public Room {
public:
Room701() : Room() {}
~Room701() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
void syncGame(Common::Serializer &s) override;
private:
void conv701a();
void updateCounter();
int32 inventoryCheck();
const char *_field58_digiName = nullptr;
const char *_field5C_digiName = nullptr;
const char *_field60_digiName = nullptr; // Useless: Never set
const char *_field64_digiName = nullptr; // Useless: Never set
const char *_itemDigiName = nullptr;
Common::String _convDigiName_1 = ""; // Useless: Assigned but not used?
Common::String _convDigiName_2 = "";
bool _field88 = false;
bool _field8C_unusedFl = false; // Set but never used
bool _field90 = false;
bool _fieldBC_unusedFl = false;
bool _field130 = false;
bool _alreadyBeenHereFl = false;
int32 _field50_counter = 0;
int32 _agentMode = 0;
int32 _agentShould = 0;
int32 _field72_triggerNum = -1; // Useless : always -1
int32 _ripleyMode = 0;
int32 _ripleyShould = 0;
int32 _field9E_triggerNum = -1; // Useless : always -1
int32 _conv701aNode = 0;
int32 _travelDest = 0;
int32 _lastInventoryCheck = 0;
int32 _fieldC8 = 0; // Useless: Set but never used
int32 _inventoryCheckArray[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // Useless: Most likely a residual of debug trace
int32 _inventoryCheckCounter = 0;
int32 _hasCrystalSkull = 0;
int32 _hasStickAnsShellMap = 0;
int32 _hasWheeledToy = 0;
int32 _hasRebusAmulet = 0;
int32 _hasShrunkenHead = 0;
int32 _hasSilverButterfly = 0;
int32 _hasPostageStamp = 0;
int32 _hasGermanBankNote = 0;
int32 _hasWhaleBoneHorn = 0;
int32 _hasChisel = 0;
int32 _hasIncenseBurner = 0;
int32 _hasRomanovEmerald = 0;
int32 _701rp01Series = 0;
int32 _701rp99Series = 0;
int32 _agentExchangeMoneySeries = 0;
int32 _agentGetTelegramSeries = 0;
int32 _agentGiveParcelSeries = 0;
int32 _agentShowMapSeries = 0;
int32 _agentSignsForMoneySeries = 0;
int32 _agentTalkLoopTjSeries = 0;
int32 _ripSketchingInNotebookPos3Series = 0;
int32 _ripTrekHandTalkPos3Series = 0;
int32 _ripTrekMedReachPos3Series = 0;
int32 _ripTrekTalkerPos3Series = 0;
machine *_agentPoshExpressMach = nullptr;
machine *_agentPoshExpressMach02 = nullptr;
machine *_agentPoshExpressMach03 = nullptr;
machine *_ripTalksAgentMach = nullptr;
machine *_safariShadow3Mach = nullptr;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

View File

@@ -0,0 +1,714 @@
/* 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 <http://www.gnu.org/licenses/ },.
*
*/
#include "m4/riddle/rooms/section7/room702.h"
#include "m4/graphics/gr_series.h"
#include "m4/riddle/vars.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
void Room702::preload() {
_G(player).walker_type = WALKER_ALT;
_G(player).shadow_type = SHADOW_ALT;
LoadWSAssets("OTHER SCRIPT", _G(master_palette));
}
void Room702::init() {
_alreadyBeen702Fl = player_been_here(702);
_G(flags)[V212] = 0;
if (_G(game).previous_room != KERNEL_RESTORING_GAME) {
_field40 = 0;
_ripleyMode = 0;
_ripleyShould = 0;
_field4C_triggerNum = -1;
_guardMode = 0;
_guardShould = 0;
_field58 = -1;
}
if (_G(game).previous_room == 703) {
_safariShadow1Series = series_load("SAFARI SHADOW 1", -1, nullptr);
_guardTalksAndBowsSeries = series_load("GUARD TALKS AND BOWS", -1, nullptr);
_guardStepsAsideTalksSeries = series_load("GUARD STEPS ASIDE TALKS", -1, nullptr);
_702GuardShadow1Series = series_load("702 GUARD SHADOW1", -1, nullptr);
_702GuardShadow2Series = series_load("702 GUARD SHADOW2", -1, nullptr);
_ripShowsRingSeries = series_load("RIP SHOWS RING", -1, nullptr);
_ripSafariWalkerPos1Series = series_load("RIP SAFARI WALKER POSITION 1", -1, nullptr);
_ringCloseupSeries = series_load("Ring closeup", -1, nullptr);
_G(flags)[V210] = 0;
_field40 = 0;
if (_G(flags)[V224] == 0) {
_guardMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 768, false, callback, "guard");
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 1, 1, -1, _guardTalksAndBowsSeries, 1, 1, 0);
_guardShadowMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 487, 326, 100, 1024, false, callback, "guard shadow");
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 1, 1, -1, _702GuardShadow1Series, 1, 1, 0);
} else {
hotspot_set_active(_G(currentSceneDef).hotspots, "GUARD", false);
hotspot_set_active(_G(currentSceneDef).hotspots, "RING", false);
}
player_first_walk(519, 322, 5, 534, 346, 1, true);
} else {
digi_preload("950_s39");
_safariShadow1Series = series_load("SAFARI SHADOW 1", -1, nullptr);
_guardTalksAndBowsSeries = series_load("GUARD TALKS AND BOWS", -1, nullptr);
_guardStepsAsideTalksSeries = series_load("GUARD STEPS ASIDE TALKS", -1, nullptr);
_702GuardShadow1Series = series_load("702 GUARD SHADOW1", -1, nullptr);
_702GuardShadow2Series = series_load("702 GUARD SHADOW2", -1, nullptr);
_ripShowsRingSeries = series_load("RIP SHOWS RING", -1, nullptr);
_ripSafariWalkerPos1Series = series_load("RIP SAFARI WALKER POSITION 1", -1, nullptr);
_ringCloseupSeries = series_load("Ring closeup", -1, nullptr);
_G(flags)[V210] = 0;
_field40 = 0;
if (_G(flags)[V224] == 0) {
_guardMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 768, false, callback, "guard");
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 1, 1, -1, _guardTalksAndBowsSeries, 1, 1, 0);
_guardShadowMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 487, 326, 100, 1024, false, callback, "guard shadow");
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 1, 1, -1, _702GuardShadow1Series, 1, 1, 0);
} else {
hotspot_set_active(_G(currentSceneDef).hotspots, "GUARD", false);
hotspot_set_active(_G(currentSceneDef).hotspots, "RING", false);
}
if (_G(game).previous_room != KERNEL_RESTORING_GAME) {
player_first_walk(660, 347, 11, 524, 342, 11, true);
}
}
digi_play_loop("950_s39", 3, 255, -1, -1);
}
void Room702::pre_parser() {
if (player_said_any(" ", " ") && _G(flags)[V211] && _G(flags)[V210] && _G(flags)[V212]) {
_G(player).need_to_walk = false;
_G(player).ready_to_walk = true;
_G(player).waiting_for_walk = false;
}
if (_G(flags)[V224] && player_said_any(" ", " ")) {
_G(player).need_to_walk = false;
_G(player).ready_to_walk = true;
_G(player).waiting_for_walk = false;
}
}
void Room702::parser() {
const bool lookFl = player_said_any("look", "look at");
const bool talkFl = player_said_any("talk", "talk to");
const bool takeFl = player_said("take");
const bool gearFl = player_said_any("push", "pull", "gear", "open", "close");
if (player_said("CIGAR BAND", "GUARD") && inv_player_has("CIGAR BAND") && !_G(flags)[V211]) {
_G(flags)[V211] = 1;
_G(flags)[V228] = 1;
_G(kernel).trigger_mode = KT_DAEMON;
kernel_timing_trigger(10, 40, nullptr);
_G(kernel).trigger_mode = KT_PARSE;
} else if (player_said("conv702a")) {
if (_G(kernel).trigger != 1) {
conv702a();
_G(flags)[V210] = 1;
_G(flags)[V228] = 1;
} else {
const int32 who = conv_whos_talking();
if (who <= 0) {
_guardShould = 2101;
} else if (who == 1) {
_ripleyShould = 1103;
}
conv_resume(conv_get_handle());
}
} else if (talkFl && player_said("GUARD")) {
player_set_commands_allowed(false);
if (!_field40) {
_field58 = -1;
_ripleyMode = 1000;
_ripleyShould = 1100;
_G(kernel).trigger_mode = KT_DAEMON;
kernel_trigger_dispatchx(kernel_trigger_create(100));
_G(kernel).trigger_mode = KT_PARSE;
} else {
_field40 = 0;
sendWSMessage_10000(1, _guardMach, _guardStepsAsideTalksSeries, 27, 1, 100, _guardStepsAsideTalksSeries, 1, 1, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow2Series, 1, 1, -1, _702GuardShadow2Series, 1, 1, 0);
_G(flags)[V212] = 0;
_field58 = -1;
_ripleyMode = 1000;
_ripleyShould = 1100;
}
} else if (lookFl && player_said("TEMPLE"))
digi_play("702R02", 1, 255, -1, -1);
else if (lookFl && player_said("WALL"))
digi_play("702R03", 1, 255, -1, -1);
else if (lookFl && player_said("CEREMONIAL TORANA"))
digi_play("702R04", 1, 255, -1, -1);
else if (lookFl && player_said("Ring")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
_ringCloseupMach = series_place_sprite("Ring closeup", 0, 0, -53, 100, 0);
digi_play("702_S01", 1, 255, 2, -1);
break;
case 2:
terminateMachine(_ringCloseupMach);
player_set_commands_allowed(true);
break;
default:
break;
}
} else if (lookFl && player_said("GUARD")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
if (!_G(flags)[V214] && !_G(flags)[V228]) {
digi_play("702R05", 1, 255, 2, -1);
} else {
digi_play("702R05", 1, 255, 3, -1);
}
break;
case 2:
digi_play("702R05A", 1, 255, 3, -1);
break;
case 3:
player_set_commands_allowed(true);
break;
default:
break;
}
} // ecx && player_said("GUARD")
else if (takeFl && _G(player).click_y <= 374) {
switch (imath_ranged_rand(1, 6)) {
case 1:
digi_play("com006", 1, 255, -1, -1);
break;
case 2:
digi_play("com007", 1, 255, -1, -1);
break;
case 3:
digi_play("com008", 1, 255, -1, -1);
break;
case 4:
digi_play("com009", 1, 255, -1, -1);
break;
case 5:
digi_play("com010", 1, 255, -1, -1);
break;
case 6:
digi_play("com011", 1, 255, -1, -1);
break;
default:
break;
}
} // esi && _G(player).click_y <= 374
else if (player_said(" ") && _G(flags)[V224]) {
player_set_commands_allowed(false);
switch (_G(kernel).trigger) {
case -1:
ws_walk(_G(my_walker), 500, 287, nullptr, 2, 11, false);
break;
case 2:
ws_walk(_G(my_walker), 396, 184, nullptr, -1, 11, true);
kernel_timing_trigger(180, 3, nullptr);
break;
case 3:
disable_player_commands_and_fade_init(4);
break;
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
_G(game).setRoom(703);
break;
default:
break;
}
} // player_said(" ") && _G(flags)[V224]
else if (player_said("exit")) {
switch (_G(kernel).trigger) {
case -1:
disable_player_commands_and_fade_init(4);
break;
case 4:
if (_G(flags)[V211] && !_G(flags)[V210])
_G(flags)[V213] = 1;
_G(game).setRoom(701);
break;
default:
break;
}
} // player_said("exit")
else if (player_said_any(" ", " ") || (player_said("CIGAR BAND", "GUARD") && _G(flags)[V211])) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
if (_G(flags)[V224])
kernel_timing_trigger(10, 84, nullptr);
else if (!_G(flags)[V211])
kernel_timing_trigger(10, 5, nullptr);
else if (_G(flags)[V210])
kernel_timing_trigger(10, _G(flags)[V212] ? 84 : 83, nullptr);
else {
setGlobals1(_ripShowsRingSeries, 1, 10, 10, 10, 0, 10, 19, 19, 19, 0, 19, 30, 30, 30, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 80);
}
break;
case 2:
ws_walk(_G(my_walker), 396, 184, nullptr, -1, 11, true);
kernel_timing_trigger(180, 3, nullptr);
break;
case 3:
disable_player_commands_and_fade_init(4);
break;
case 4:
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
if (_G(flags)[V211] && !_G(flags)[V210]) {
_G(flags)[V213] = 1;
}
_G(game).setRoom(703);
break;
case 5:
digi_play("702G20", 1, 255, 6, -1);
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 8, 11, -1, _guardTalksAndBowsSeries, 8, 11, 1);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 8, 11, -1, _702GuardShadow1Series, 8, 11, 1);
break;
case 6:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 8, 8, -1, _guardTalksAndBowsSeries, 8, 8, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 8, 8, -1, _702GuardShadow1Series, 8, 8, 0);
kernel_timing_trigger(10, 8, nullptr);
break;
case 7:
sendWSMessage_150000(_G(my_walker), 8);
break;
case 8:
player_set_commands_allowed(true);
break;
case 80:
sendWSMessage_120000(_G(my_walker), 81);
break;
case 81:
sendWSMessage_130000(_G(my_walker), 82);
break;
case 82:
sendWSMessage_150000(_G(my_walker), 83);
break;
case 83:
sendWSMessage_10000(1, _guardMach, _guardStepsAsideTalksSeries, 1, 27, 84, _guardStepsAsideTalksSeries, 27, 27, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow2Series, 1, 27, -1, _702GuardShadow2Series, 27, 27, 0);
break;
case 84:
ws_walk(_G(my_walker), 500, 287, nullptr, 2, 11, false);
break;
default:
break;
}
} // player_said_any(" ", " ") || (player_said("CIGAR BAND", "GUARD") && _G(flags)[V211])
else if (lookFl && player_said(" ")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
digi_play("702R01", 1, 255, 2, -1);
break;
case 2:
if (_G(flags)[V227]) {
kernel_timing_trigger(10, 3, nullptr);
} else {
_G(flags)[V227] = 1;
digi_play("702R01A", 1, 255, 3, -1);
}
break;
case 3:
player_set_commands_allowed(true);
break;
default:
break;
}
} // ecx && player_said(" ")
else if (player_said("GUARD", "CIGAR") || player_said("GUARD", "CIGAR WITHOUT BAND"))
digi_play("com083", 1, 255, -1, -1);
else if (!takeFl && !gearFl && player_said("GUARD"))
digi_play("702R21", 1, 255, -1, -1);
else
return;
_G(player).command_ready = false;
}
void Room702::daemon() {
switch (_G(kernel).trigger) {
case 40:
player_set_commands_allowed(false);
setGlobals1(_ripShowsRingSeries, 1, 10, 10, 10, 0, 10, 19, 19, 19, 0, 19, 30, 30, 30, 0, 0, 0, 0, 0, 0);
if (_G(flags)[V210]) {
sendWSMessage_110000(_G(my_walker), 41);
} else {
_G(flags)[V210] = 1;
sendWSMessage_110000(_G(my_walker), 60);
}
break;
case 41:
digi_play("702R06", 1, 255, 42, -1);
break;
case 42:
sendWSMessage_120000(_G(my_walker),43);
break;
case 43:
digi_play("702R07",1,255,44,-1);
break;
case 44:
sendWSMessage_130000(_G(my_walker), 45);
break;
case 45:
sendWSMessage_150000(_G(my_walker), 46);
break;
case 46:
kernel_timing_trigger(1,47,nullptr);
break;
case 47:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 36, 46, 48, _guardTalksAndBowsSeries,46,46,0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 36, 46, -1, _702GuardShadow1Series,46,46,0);
break;
case 48:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 46, 36, 49, _guardTalksAndBowsSeries, 1, 1, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 46, 36, -1, _702GuardShadow1Series, 1, 1, 0);
break;
case 49:
digi_play("702G03", 1, 255, 50, -1);
sendWSMessage_10000(1, _guardMach, _guardStepsAsideTalksSeries, 1, 27, -1, _guardStepsAsideTalksSeries,27,29,1);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow2Series, 1, 27, -1, _702GuardShadow2Series,27,29,1);
break;
case 50:
sendWSMessage_10000(1, _guardMach, _guardStepsAsideTalksSeries, 29, 40, -1, _guardStepsAsideTalksSeries, 40, 40, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow2Series, 29, 40, -1, _702GuardShadow2Series, 40, 40, 0);
_G(flags)[V212] = 1;
digi_play("702R11",1,255,51,-1);
break;
case 51:
digi_play("702G04", 1, 255, 52, -1);
sendWSMessage_10000(1, _guardMach, _guardStepsAsideTalksSeries, 41, 46, -1, _guardStepsAsideTalksSeries, 46, 41, 1);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow2Series, 41, 46, -1, _702GuardShadow2Series, 46, 41, 1);
break;
case 52:
sendWSMessage_10000(1, _guardMach, _guardStepsAsideTalksSeries, 46, 46, -1, _guardStepsAsideTalksSeries, 46, 46, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow2Series, 46, 46, -1, _702GuardShadow2Series, 46, 46, 0);
_field40 = 1;
player_set_commands_allowed(true);
break;
case 60:
digi_play("702R08", 1, 255, 61, -1);
break;
case 61:
sendWSMessage_120000(_G(my_walker), 62);
break;
case 62:
digi_play("702G01", 1, 255, 63, -1);
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 8, 11, -1, _guardTalksAndBowsSeries, 8, 11, 1);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 8, 11, -1, _702GuardShadow1Series, 8, 11, 1);
break;
case 63:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 11, 11, -1, _guardTalksAndBowsSeries, 11, 11, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 11, 11, -1, _702GuardShadow1Series, 11, 11, 0);
digi_play("702R09", 1, 255, 64, -1);
sendWSMessage_130000(_G(my_walker), -1);
break;
case 64:
digi_play("702G02", 1, 255, 65, -1);
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 8, 11, -1, _guardTalksAndBowsSeries, 8, 11, 1);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 8, 11, -1, _702GuardShadow1Series, 8, 11, 1);
sendWSMessage_150000(_G(my_walker), -1);
break;
case 65:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 11, 11, -1, _guardTalksAndBowsSeries, 11, 11, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 11, 11, -1, _702GuardShadow1Series, 11, 11, 0);
digi_play("702R10", 1, 255, 47, -1);
break;
case 100:
if (_field4C_triggerNum != -1) {
kernel_trigger_dispatchx(_field4C_triggerNum);
_field4C_triggerNum = -1;
}
kernel_timing_trigger(1, 101, nullptr);
break;
case 101:
if (_ripleyMode == 1000) {
switch (_ripleyShould) {
case 1100:
ws_hide_walker(_G(my_walker));
player_set_commands_allowed(false);
player_update_info(_G(my_walker), &_G(player_info));
_ripTalksGuardMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 256, true, callback, "rip talks guard");
_ripTalksGuardShadowMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 256, false, callback, "rip talks guard SHADOW");
sendWSMessage_10000(1, _ripTalksGuardMach, _ripShowsRingSeries, 1, 1, -1, _ripShowsRingSeries, 1, 1, 0);
sendWSMessage_10000(1, _ripTalksGuardShadowMach, _safariShadow1Series, 1, 1, 100, _safariShadow1Series, 1, 1, 0);
_ripleyShould = 1102;
_guardMode = 2000;
_guardShould = 2100;
kernel_trigger_dispatchx(kernel_trigger_create(110));
break;
case 1102:
conv_load("conv702a",10,10,103);
conv_export_value_curr(_G(flags)[V211], 0);
conv_export_value_curr(_G(flags)[V213], 1);
conv_export_value_curr(_G(flags)[V222], 2);
conv_play(conv_get_handle());
_ripleyShould = 1103;
kernel_trigger_dispatchx(kernel_trigger_create(100));
break;
case 1103:
case 1104:
sendWSMessage_10000(1, _ripTalksGuardMach, _ripShowsRingSeries, 1, 1, 100, _ripShowsRingSeries, 1, 1, 0);
break;
case 1105:
terminateMachine(_ripTalksGuardMach);
terminateMachine(_ripTalksGuardShadowMach);
_guardShould = 2106;
ws_unhide_walker(_G(my_walker));
player_set_commands_allowed(true);
break;
default:
break;
}
}
break;
case 102:
kernel_trigger_dispatchx(kernel_trigger_create(100));
break;
case 103:
_ripleyShould = 1105;
break;
case 110:
if (_guardMode == 2000) {
switch (_guardShould) {
case 2100:
case 2101:
case 2103:
case 2104:
case 2106:
case 2107:
case 2108:
case 2109:
kernel_timing_trigger(1, 111, nullptr);
break;
default:
break;
}
}
break;
case 111:
if (_guardMode == 2000) {
switch (_guardShould) {
case 2100:
case 2101:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 8, 8, 110, _guardTalksAndBowsSeries, 8, 8, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 8, 8, -1, _702GuardShadow1Series, 8, 8, 0);
_guardShould = 2101;
break;
case 2103:
_G(kernel).trigger_mode = KT_PARSE;
digi_play(conv_sound_to_play(), 1, 255, 1, -1);
_G(kernel).trigger_mode = KT_DAEMON;
_guardShould = 2104;
kernel_timing_trigger(1, 111, nullptr);
break;
case 2104: {
const int32 rnd = imath_ranged_rand(8, 10);
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, rnd, rnd, 110, _guardTalksAndBowsSeries, rnd, rnd, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, rnd, rnd, -1, _702GuardShadow1Series, rnd, rnd, 0);
}
break;
case 2106:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 8, 8, -1, _guardTalksAndBowsSeries, 8, 8, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 8, 8, -1, _702GuardShadow1Series, 8, 8, 0);
break;
case 2107:
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 48, 58, 110, _guardTalksAndBowsSeries, 58, 58, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 48, 58, -1, _702GuardShadow1Series, 58, 58, 0);
_guardShould = 2108;
break;
case 2108:
digi_play("702_S01", 1, 255, -1, -1);
sendWSMessage_10000(1, _guardMach, _guardTalksAndBowsSeries, 58, 82, 110, _guardTalksAndBowsSeries, 82, 82, 0);
sendWSMessage_10000(1, _guardShadowMach, _702GuardShadow1Series, 58, 82, -1, _702GuardShadow1Series, 82, 82, 0);
_guardShould = 2109;
break;
case 2109:
terminateMachine(_ringCloseupMach);
_guardShould = 2103;
kernel_timing_trigger(1, 111, nullptr);
break;
default:
break;
}
}
break;
default:
break;
}
}
void Room702::callback(frac16 myMessage, machine *sender) {
kernel_trigger_dispatchx(myMessage);
}
void Room702::conv702a() {
if (conv_sound_to_play() == nullptr) {
conv_resume(conv_get_handle());
return;
}
const int32 who = conv_whos_talking();
if (who == 0) {
const int32 node = conv_current_node();
const int32 entry = conv_current_entry();
if (node == 1 && (entry == 1 || entry == 2)) {
_guardShould = 2107;
} else {
_guardShould = 2103;
}
} else if (who == 1) {
_ripleyShould = 1104;
digi_play(conv_sound_to_play(), 1, 255, 1, -1);
}
}
void Room702::syncGame(Common::Serializer &s) {
s.syncAsSint32LE(_field40);
s.syncAsSint32LE(_ripleyMode);
s.syncAsSint32LE(_ripleyShould);
s.syncAsSint32LE(_field4C_triggerNum);
s.syncAsSint32LE(_guardMode);
s.syncAsSint32LE(_guardShould);
s.syncAsSint32LE(_field58);
}
} // namespace Rooms
} // namespace Riddle
} // namespace M4

View File

@@ -0,0 +1,77 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM702_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM702_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room702 : public Room {
public:
Room702() : Room() {}
~Room702() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
void syncGame(Common::Serializer &s) override;
private:
static void callback(frac16 myMessage, machine *sender);
void conv702a();
bool _alreadyBeen702Fl = false; // Unused : Set but never used
int32 _field40 = 0;
int32 _ripleyMode = 0;
int32 _ripleyShould = 0;
int32 _field4C_triggerNum = 0;
int32 _guardMode = 0;
int32 _guardShould = 0;
int32 _field58 = 0; // Useless (but synchronized?) - Always -1?
int32 _702GuardShadow1Series = 0;
int32 _702GuardShadow2Series = 0;
int32 _guardStepsAsideTalksSeries = 0;
int32 _guardTalksAndBowsSeries = 0;
int32 _ringCloseupSeries = 0;
int32 _ripSafariWalkerPos1Series = 0;
int32 _ripShowsRingSeries = 0;
int32 _safariShadow1Series = 0;
machine *_ringCloseupMach = nullptr;
machine *_guardMach = nullptr;
machine *_guardShadowMach = nullptr;
machine *_ripTalksGuardMach = nullptr;
machine *_ripTalksGuardShadowMach = nullptr;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,71 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM703_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM703_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room703 : public Room {
public:
Room703() : Room() {}
~Room703() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
private:
static void callback(frac16 myMessage, machine *sender);
void conv703a();
void playCheckBrochureAnim(const char *digiName, int32 trigger);
void useWheelOnNiche(int32 trigger, int val1);
machine *_monkMach = nullptr;
machine *_prayerWheelMach = nullptr;
machine *_ripStairsMach = nullptr;
int32 _field5C_mode = 0;
int32 _field60_should = 0;
int32 _703Eye4aSeries = 0;
int32 _703RipGoesDownStairsSeries = 0;
int32 _monk1Series = 0;
int32 _monk2Series = 0;
int32 _monk3Series = 0;
int32 _monk4Series = 0;
int32 _ripChecksBrochureSeries = 0;
int32 _ripGoesUpStairsSeries = 0;
int32 _ripLooksDownSeries = 0;
int32 _ripTrekMedReachHandPos1Series = 0;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,71 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM704_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM704_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room704 : public Room {
public:
Room704() : Room() {}
~Room704() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
private:
static void callback(frac16 myMessage, machine *sender);
void conv704a();
void playCheckBrochureAnim(int32 trigger, const char *digiName);
void useWheelOnNiche(int32 trigger, int val1);
int32 _field58_mode = 0;
int32 _field5C_should = 0;
int32 _704Eye2aSeries = 0;
int32 _704Monk1Series = 0;
int32 _704Monk2Series = 0;
int32 _704Monk3Series = 0;
int32 _704Monk4Series = 0;
int32 _ripChecksBrochureSeries = 0;
int32 _ripGoesDownStairsSeries = 0;
int32 _ripGoesUpStairsSeries = 0;
int32 _ripLooksDownSeries = 0;
int32 _ripTrekMedReachHandPos1Series = 0;
machine *_monkMach = nullptr;
machine *_prayerWheelMach = nullptr;
machine *_ripStairsMach = nullptr;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,75 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM705_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM705_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room705 : public Room {
public:
Room705() : Room() {}
~Room705() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
private:
void conv705a();
void conv705b();
void playCheckBrochureAnim(int32 trigger, const char *digiName);
void useWheelOnLeftNiche(int32 trigger, int val1);
void useWheelOnRightNiche(int32 trigger, int val1);
int32 _field60_mode = 0;
int32 _field64_should = 0;
int32 _705Eye1aSeries = 0;
int32 _705Eye4aSeries = 0;
int32 _705Monk1Series = 0;
int32 _705Monk2Series = 0;
int32 _705Monk3Series = 0;
int32 _705Monk4Series = 0;
int32 _705RipGoesUpStairsSeries = 0;
int32 _ripChecksBrochureSeries = 0;
int32 _ripGoesDownStairsSeries = 0;
int32 _ripLooksDownSeries = 0;
int32 _ripTrekMedReachPos1Series = 0;
machine *_leftWheelMach = nullptr;
machine *_monkMach = nullptr;
machine *_rightWheelMach = nullptr;
machine *_ripStairsMach = nullptr;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,74 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM706_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM706_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room706 : public Room {
public:
Room706() : Room() {}
~Room706() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
private:
void conv706a();
void playCheckBrochureAnim(int32 trigger, const char *digiName);
void useWheelOnNiche(int32 trigger, int32 val1);
int32 _field78_mode = 0;
int32 _field7C_should = 0;
int32 _706eye3aSeries = 0;
int32 _706Monk1Series = 0;
int32 _706Monk2Series = 0;
int32 _706Monk3Series = 0;
int32 _706Monk4Series = 0;
int32 _706RipGoesDownStairsSeries = 0;
int32 _706RipGoesUpStairsSeries = 0;
int32 _ripChecksBrochureSeries = 0;
int32 _ripLooksDownSeries = 0;
int32 _ripShieldsFaceSeries = 0;
int32 _ripStepsDownSeries = 0;
int32 _ripTrekMedReachHandPos1Series = 0;
machine *_downToMazeMach = nullptr;
machine *_monkMach = nullptr;
machine *_prayerWheelMach = nullptr;
machine *_ripStairsMach = nullptr;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

View File

@@ -0,0 +1,407 @@
/* 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 <http://www.gnu.org/licenses/ },.
*
*/
#include "m4/riddle/rooms/section7/room707.h"
#include "m4/graphics/gr_series.h"
#include "m4/gui/gui_vmng_screen.h"
#include "m4/riddle/vars.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
void Room707::preload() {
_G(player).walker_type = WALKER_ALT;
_G(player).shadow_type = SHADOW_ALT;
LoadWSAssets("OTHER SCRIPT", _G(master_palette));
}
void Room707::init() {
ws_demand_location(_G(my_walker), 299, 200);
ws_demand_facing(_G(my_walker), 4);
if (!player_been_here(707)) {
_field44 = 0;
}
_peerIntoCupolaPos2Series = series_load("PEER INTO CUPOLA POS2", -1, nullptr);
_peerIntoCupolaPos1Series = series_load("PEER INTO CUPOLA POS1", -1, nullptr);
switch (_G(game).previous_room) {
case 703:
ws_demand_location(_G(my_walker), 421, 150);
ws_demand_facing(_G(my_walker), 4);
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripWalksUpLeftStairsSeries = series_load("RIP WALKS UP LEFT STAIRS", -1, nullptr);
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine");
sendWSMessage_10000(1, _ripStairsMach, _ripWalksUpLeftStairsSeries, 1, 22, 11, _ripWalksUpLeftStairsSeries, 22, 22, 0);
break;
case 704:
ws_demand_location(_G(my_walker), 374, 252);
ws_demand_facing(_G(my_walker), 2);
_ripUpStairsPos2Series = series_load("RIP UP STAIRS POSITION 2", -1, nullptr);
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine");
sendWSMessage_10000(1, _ripStairsMach, _ripUpStairsPos2Series, 1, 37, 11, _ripUpStairsPos2Series, 37, 37, 0);
break;
case 705:
MoveScreenDelta(_G(game_buff_ptr), -640, 0);
ws_demand_location(_G(my_walker), 930, 248);
ws_demand_facing(_G(my_walker), 10);
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripUpStairsPos10Series = series_load("RIP UP STAIRS POSITION 10", -1, nullptr);
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine");
sendWSMessage_10000(1, _ripStairsMach, _ripUpStairsPos10Series, 1, 37, 11, _ripUpStairsPos10Series, 37, 37, 0);
break;
case 706:
MoveScreenDelta(_G(game_buff_ptr), -640, 0);
ws_demand_location(_G(my_walker), 860, 149);
ws_demand_facing(_G(my_walker), 8);
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripWalksUpFarStairsSeries = series_load("RIP WALKS UP FAR STAIRS", -1, nullptr);
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine");
sendWSMessage_10000(1, _ripStairsMach, _ripWalksUpFarStairsSeries, 1, 22, 11, _ripWalksUpFarStairsSeries, 22, 22, 0);
break;
default:
digi_preload("950_s39", -1);
break;
}
digi_play_loop("950_s39", 3, 255, -1, -1);
}
void Room707::pre_parser() {
// No implementation
}
void Room707::parser() {
const bool lookFl = player_said_any("look", "look at");
if (lookFl && player_said("VOTIVE STUPA"))
digi_play("707r03", 1, 255, -1, -1);
else if (lookFl && player_said("WINDOW")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
setGlobals1(_peerIntoCupolaPos2Series, 1, 13, 13, 13, 0, 13, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 2);
break;
case 2:
_popUpMach = series_place_sprite("707 LEFT SLIT POPUP", 0, 0, 0, 100, 256);
kernel_timing_trigger(100, 3, nullptr);
break;
case 3:
digi_play("707r05", 1, 255, 4, -1);
break;
case 4:
terminateMachine(_popUpMach);
sendWSMessage_120000(_G(my_walker), 5);
break;
case 5:
sendWSMessage_150000(_G(my_walker), 6);
break;
case 6:
player_set_commands_allowed(true);
break;
default:
break;
}
} // lookFl && player_said("WINDOW")
else if (lookFl && player_said("WINDOW ")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
setGlobals1(_peerIntoCupolaPos2Series, 1, 13, 13, 13, 0, 13, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 2);
break;
case 2:
_popUpMach = series_place_sprite("707 RIGHT SLIT POPUP", 0, 0, 0, 100, 256);
kernel_timing_trigger(100, 3, nullptr);
break;
case 3:
digi_play("707r05", 1, 255, 4, -1);
break;
case 4:
terminateMachine(_popUpMach);
sendWSMessage_120000(_G(my_walker), 5);
break;
case 5:
sendWSMessage_150000(_G(my_walker), 6);
break;
case 6:
player_set_commands_allowed(true);
break;
default:
break;
}
} // lookFl && player_said("WINDOW ")
else if (lookFl && player_said("GRATE")) {
player_set_commands_allowed(false);
switch (_G(kernel).trigger) {
case -1:
player_update_info(_G(my_walker), &_G(player_info));
switch (_G(player_info).facing) {
case 1:
case 11:
_ripLooksDownSeries = series_load("RIP LOOKS DOWN POS1", -1, nullptr);
setGlobals1(_ripLooksDownSeries, 1, 14, 14, 14, 0, 14, 29, 29, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 2);
break;
case 2:
case 10:
_ripLooksDownSeries = series_load("RIP LOOKS DOWN POS2", -1, nullptr);
setGlobals1(_ripLooksDownSeries, 1, 14, 14, 14, 0, 14, 29, 29, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 2);
break;
case 3:
case 9:
_ripLooksDownSeries = series_load("RIP TREK LOOK DOWN POS3", -1, nullptr);
setGlobals1(_ripLooksDownSeries, 1, 11, 11, 11, 0, 11, 22, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 2);
break;
case 4:
case 8:
_ripLooksDownSeries = series_load("RIP LOOKS DOWN POS4", -1, nullptr);
setGlobals1(_ripLooksDownSeries, 1, 16, 16, 16, 0, 16, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 2);
break;
case 5:
case 7:
_ripLooksDownSeries = series_load("RIP LOOKS DOWN POS5", -1, nullptr);
setGlobals1(_ripLooksDownSeries, 1, 15, 15, 15, 0, 15, 31, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 2);
break;
default:
break;
}
break;
case 2:
digi_play(_field44 ? "707r04" : "707r04a", 1, 255, -1, -1);
kernel_timing_trigger(10, 3, nullptr);
break;
case 3:
sendWSMessage_120000(_G(my_walker), 4);
break;
case 4:
sendWSMessage_150000(_G(my_walker), 5);
break;
case 5:
series_unload(_ripLooksDownSeries);
player_set_commands_allowed(true);
break;
default:
break;
}
} // lookFl && player_said("GRATE")
else if (player_said("RM704")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripDownStairsPos8Series = series_load("RIP DOWN STAIRS POSITION 8", -1, nullptr);
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine");
sendWSMessage_10000(1, _ripStairsMach, _ripDownStairsPos8Series, 4, 27, 2, _ripDownStairsPos8Series, 27, 27, 0);
break;
case 2:
sendWSMessage_10000(1, _ripStairsMach, _ripDownStairsPos8Series, 28, 37, -1, _ripDownStairsPos8Series, 37, 37, 0);
disable_player_commands_and_fade_init(3);
break;
case 3:
terminateMachine(_ripStairsMach);
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
_G(game).setRoom(704);
break;
default:
break;
}
} // player_said("RM704")
else if (player_said("RM705")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripDownStairsPos4Series = series_load("RIP DOWN STAIRS POSITION 4", -1, nullptr);
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine going to rm704");
sendWSMessage_10000(1, _ripStairsMach, _ripDownStairsPos4Series, 4, 27, 2, _ripDownStairsPos4Series, 27, 27, 0);
break;
case 2:
sendWSMessage_10000(1, _ripStairsMach, _ripDownStairsPos4Series, 28, 37, -1, _ripDownStairsPos4Series, 37, 37, 0);
disable_player_commands_and_fade_init(3);
break;
case 3:
terminateMachine(_ripStairsMach);
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
_G(game).setRoom(705);
break;
default:
break;
}
} // player_said("RM705")
else if (player_said("RM703")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripWalksDownLeftStairsSeries = series_load("RIP WALKS DOWN LEFT STAIRS", -1, nullptr);
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine going to rm704");
sendWSMessage_10000(1, _ripStairsMach, _ripWalksDownLeftStairsSeries, 1, 14, 2, _ripWalksDownLeftStairsSeries, 14, 14, 0);
break;
case 2:
sendWSMessage_10000(1, _ripStairsMach, _ripWalksDownLeftStairsSeries, 15, 19, -1, _ripWalksDownLeftStairsSeries, 19, 19, 0);
disable_player_commands_and_fade_init(3);
break;
case 3:
terminateMachine(_ripStairsMach);
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
_G(game).setRoom(703);
break;
default:
break;
}
} // player_said("RM703")
else if (player_said("RM706")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
_ripWalksDownFarStairsSeries = series_load("RIP WALKS DOWN FAR STAIRS", -1, nullptr);
_ripStairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip stairs machine going to rm704");
sendWSMessage_10000(1, _ripStairsMach, _ripWalksDownFarStairsSeries, 1, 14, 2, _ripWalksDownFarStairsSeries, 14, 14, 0);
break;
case 2:
sendWSMessage_10000(1, _ripStairsMach, _ripWalksDownFarStairsSeries, 15, 19, -1, _ripWalksDownFarStairsSeries, 19, 19, 0);
disable_player_commands_and_fade_init(3);
break;
case 3:
terminateMachine(_ripStairsMach);
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
digi_play_loop("950_s39", 3, 255, -1, -1);
_G(game).setRoom(706);
break;
default:
break;
}
} // player_said("RM706")
else if (lookFl && player_said(" "))
digi_play("707r01", 1, 255, -1, -1);
else if (player_said("GRATE"))
digi_play("707r02", 1, 255, -1, -1);
else
return;
_G(player).command_ready = false;
}
void Room707::daemon() {
if (_G(kernel).trigger == 11) {
player_set_commands_allowed(true);
ws_unhide_walker(_G(my_walker));
terminateMachine(_ripStairsMach);
}
}
} // namespace Rooms
} // namespace Riddle
} // namespace M4

View File

@@ -0,0 +1,65 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM707_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM707_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room707 : public Room {
public:
Room707() : Room() {}
~Room707() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
private:
int32 _field44 = 0;
int32 _peerIntoCupolaPos1Series = 0;
int32 _peerIntoCupolaPos2Series = 0;
int32 _ripDownStairsPos4Series = 0;
int32 _ripDownStairsPos8Series = 0;
int32 _ripLooksDownSeries = 0;
int32 _ripUpStairsPos10Series = 0;
int32 _ripUpStairsPos2Series = 0;
int32 _ripWalksDownFarStairsSeries = 0;
int32 _ripWalksDownLeftStairsSeries = 0;
int32 _ripWalksUpFarStairsSeries = 0;
int32 _ripWalksUpLeftStairsSeries = 0;
machine *_popUpMach = nullptr;
machine *_ripStairsMach = nullptr;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,95 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM709_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM709_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
struct Maze709Room {
byte _left;
byte _right;
byte _up;
byte _down;
};
class Room709 : public Room {
public:
Room709();
~Room709() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
void syncGame(Common::Serializer &s) override;
private:
bool _chiselActiveFl = false;
bool _incenseBurnerActiveFl = false;
bool _pullCenterFl = false;
bool _pullLeftFl = false;
bool _pullNearFl = false;
bool _pullRightFl = false;
int32 _mazeCurrentIndex = 0;
int32 _709NearDoorLiteSeries = 0;
int32 _709rpro1Series = 0;
int32 _709rpro2Series = 0;
int32 _709rpro3Series = 0;
int32 _709rpro4Series = 0;
int32 _mazeCenterDoorLiteSeries = 0;
int32 _mazeLeftDoorLiteSeries = 0;
int32 _mazeRightDoorLiteSeries = 0;
int32 _ripTrekHeadTurnPos1Series = 0;
int32 _ripTrekLowReachPos2Series = 0;
machine *_709ChiselMach = nullptr;
machine *_709IncenseHolderMach = nullptr;
machine *_709rpro5Mach = nullptr;
machine *_709rpro6Mach = nullptr;
machine *_709rpro7Mach = nullptr;
machine *_709rpro8Mach = nullptr;
machine *_ripPullMach = nullptr;
machine *_ripPullMach02 = nullptr;
machine *_ripPullMach03 = nullptr;
machine *_ripPullMach04 = nullptr;
machine *_ripPullMach05 = nullptr;
machine *_safariShadow1Mach = nullptr;
void debugRoomChanged();
static const Maze709Room _rooms[100];
static void clearPressed(void *, void *);
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

View File

@@ -0,0 +1,601 @@
/* 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 <http://www.gnu.org/licenses/ },.
*
*/
#include "m4/riddle/rooms/section7/room710.h"
#include "m4/graphics/gr_series.h"
#include "m4/riddle/vars.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
void Room710::preload() {
_G(player).walker_type = WALKER_ALT;
_G(player).shadow_type = SHADOW_ALT;
LoadWSAssets("OTHER SCRIPT", _G(master_palette));
}
void Room710::init() {
_710Rpld2Series = series_load("710RPLD2", -1, nullptr);
_710Rpld3Series = series_load("710RPLD3", -1, nullptr);
_ripPullsRopeForLaderSeries = series_load("RIP PULLS ROPE FOR LADER", -1, nullptr);
_laderComesDownSeries = series_load("LADER COMES DOWN", -1, nullptr);
_ripTrekMedReachHandPos1Series = series_load("RIP TREK MED REACH HAND POS1", -1, nullptr);
_710Rpro1Series = series_load("710RPRO1", -1, nullptr);
_710Rpro2Series = series_load("710RPRO2", -1, nullptr);
_710Rpro3Series = series_load("710RPRO3", -1, nullptr);
_710Rpro4Series = series_load("710RPRO4", -1, nullptr);
_mazeCentreDoorLiteSeries = series_load("MAZE CENTRE DOOR LITE", -1, nullptr);
digi_preload("710_s02", -1);
digi_preload("710_s01", -1);
_centerDoorPullAnimationFl = false;
_ripContraptionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 256, false, triggerMachineByHashCallback, "rip contraption machine");
_ripReacherMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1792, false, triggerMachineByHashCallback, "rip reacher machine");
_710Rprs3Mach = series_place_sprite("710RPRS3", 0, 0, -53, 100, 2565);
_710Rprs2Mach = series_place_sprite("710RPRS2", 0, 0, -53, 100, 2053);
_710Rprs1Mach = series_place_sprite("710RPRS1", 0, 0, -53, 100, 517);
_710Rprs4Mach = series_place_sprite("710RPRS4", 0, 0, -53, 100, 1029);
switch (_G(game).previous_room) {
case KERNEL_RESTORING_GAME:
digi_preload("950_s41", -1);
if (_G(flags)[V223]) {
_ladderActiveFl = true;
_710Rpld4Mach = series_place_sprite("710rpld4", 0, 0, -53, 100, 1541);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 3840);
} else {
_ladderActiveFl = false;
_710Rpld4Mach = series_place_sprite("710rpld3", 0, 0, -53, 100, 3840);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 3840);
hotspot_set_active(_G(currentSceneDef).hotspots, "Ladder", false);
}
break;
case 709:
ws_demand_location(_G(my_walker), 320, 282);
ws_demand_facing(_G(my_walker), 5);
if (_G(flags)[V223]) {
_ladderActiveFl = true;
_710Rpld4Mach = series_place_sprite("710rpld4", 0, 0, -53, 100, 1541);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 3840);
} else {
_ladderActiveFl = false;
hotspot_set_active(_G(currentSceneDef).hotspots, "Ladder", false);
_710Rpld4Mach = series_place_sprite("710rpld3", 0, 0, -53, 100, 3840);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 3840);
}
break;
case 711:
digi_preload("950_s41", -1);
ws_demand_location(_G(my_walker), 320, 308);
ws_demand_facing(_G(my_walker), 1);
ws_hide_walker(_G(my_walker));
player_set_commands_allowed(false);
_710Rpld4Mach = series_place_sprite("710rpld4", 0, 0, -53, 100, 1541);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 4095);
_ladderActiveFl = true;
hotspot_set_active(_G(currentSceneDef).hotspots, "Ladder", true);
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 86, 83, 30, _710Rpld2Series, 83, 83, 0);
break;
default:
digi_preload("950_s41", -1);
ws_demand_location(_G(my_walker), 282, 282);
ws_demand_facing(_G(my_walker), 4);
if (_G(flags)[V223]) {
_ladderActiveFl = true;
_710Rpld4Mach = series_place_sprite("710rpld4", 0, 0, -53, 100, 1541);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 4095);
} else {
_ladderActiveFl = false;
_710Rpld4Mach = series_place_sprite("710rpld3", 0, 0, -53, 100, 3840);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 4095);
hotspot_set_active(_G(currentSceneDef).hotspots, "Ladder", false);
}
break;
}
if (player_been_here(710))
midi_play("drama1", 127, false, -1, 949);
digi_play_loop("950_s41", 3, 255, -1, -1);
}
void Room710::pre_parser() {
// No implementation
}
void Room710::parser() {
const bool lookFl = player_said_any("look", "look at");
const bool talkFl = player_said_any("talk", "talk to", "take");
const bool gearFl = player_said_any("push", "pull", "gear", "open", "close");
if (talkFl && player_said("LADDER")) {
digi_play("710R09", 1, 255, -1, -1);
} else if (talkFl && player_said("LADDER ")) {
digi_play(_ladderActiveFl ? "710R09" : "710R10", 1, 255, -1, -1);
} else if (talkFl && player_said("ROPE")) {
digi_play("710R08", 1, 255, -1, -1);
} else if (lookFl && player_said_any("LADDER", "LADDER ")) {
player_set_commands_allowed(false);
if (_ladderActiveFl) {
digi_play("710R21", 1, 255, -1, -1);
} else if (_G(flags)[kLeftCastleUnderground] == 0) {
digi_play("710R02", 1, 255, -1, -1);
} else {
switch (_G(kernel).trigger) {
case -1:
digi_play("710R02", 1, 255, 2, -1);
break;
case 2:
digi_play("710R03", 1, 255, -1, -1);
break;
default:
break;
}
}
player_set_commands_allowed(true);
} // ecx && player_said_any("LADDER", "LADDER ")
else if (lookFl && player_said("Rope")) {
player_set_commands_allowed(false);
digi_play("710R04", 1, 255, -1, -1);
player_set_commands_allowed(true);
} else if (lookFl && player_said("Mooring") && _ladderActiveFl) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
digi_play("710R05", 1, 255, 2, -1);
break;
case 2:
digi_play("710R07", 1, 255, -1, -1);
player_set_commands_allowed(true);
break;
default:
break;
}
} // ecx && player_said("Mooring") && _ladderActiveFl
else if (lookFl && player_said("MOORING")) {
player_set_commands_allowed(false);
digi_play("710R05", 1, 255, -1, -1);
player_set_commands_allowed(true);
} else if (lookFl && player_said("MACHINERY")) {
player_set_commands_allowed(false);
digi_play("710R06", 1, 255, -1, -1);
player_set_commands_allowed(true);
} else if (lookFl && player_said(" ")) {
player_set_commands_allowed(false);
digi_play(_ladderActiveFl ? "710R20" : "710R01", 1, 255, -1, -1);
player_set_commands_allowed(true);
} else if (gearFl && player_said("Rope")) {
if (_G(flags)[V223]) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
player_update_info(_G(my_walker), &_G(player_info));
ws_hide_walker(_G(my_walker));
_safariShadow1Mach = series_place_sprite("SAFARI SHADOW 1", 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 3840);
_ripPullsKeyropeMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 3840, false, triggerMachineByHashCallback, "rip pulls keyrope machine");
sendWSMessage_10000(1, _ripPullsKeyropeMach, _ripPullsRopeForLaderSeries, 1, 15, 1, _ripPullsRopeForLaderSeries, 15, 15, 0);
break;
case 1:
sendWSMessage_10000(1, _ripPullsKeyropeMach, _ripPullsRopeForLaderSeries, 16, 21, 21, _ripPullsRopeForLaderSeries, 21, 21, 0);
digi_play("710_s03a", 2, 255, -1, -1);
kernel_timing_trigger(10, 2, nullptr);
break;
case 2:
hotspot_set_active(_G(currentSceneDef).hotspots, "Ladder", false);
_ladderActiveFl = false;
terminateMachine(_710Rpld4Mach);
terminateMachine(_710Rpld5Mach);
_ripContractionMach02 = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1541, false, triggerMachineByHashCallback, "rip contraption machine");
sendWSMessage_10000(1, _ripContractionMach02, _laderComesDownSeries, 47, 37, 31, _laderComesDownSeries, 37, 37, 0);
digi_play("710_s01", 1, 255, -1, -1);
break;
case 3:
terminateMachine(_ripContractionMach02);
_710Rpld4Mach = series_place_sprite("710rpld3", 0, 0, -53, 100, 3840);
_G(flags)[V223] = 0;
player_set_commands_allowed(true);
break;
case 21:
sendWSMessage_10000(1, _ripPullsKeyropeMach, _ripPullsRopeForLaderSeries, 22, 44, 22, _ripPullsRopeForLaderSeries, 44, 44, 0);
break;
case 22:
terminateMachine(_ripPullsKeyropeMach);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 3840);
terminateMachine(_safariShadow1Mach);
ws_unhide_walker(_G(my_walker));
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, -1, 5, true);
break;
case 31:
sendWSMessage_10000(1, _ripContractionMach02, _laderComesDownSeries, 36, 1, 3, _laderComesDownSeries, 1, 1, 0);
break;
default:
break;
}
} else {
_ladderActiveFl = true;
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
player_update_info(_G(my_walker), &_G(player_info));
_safariShadow1Mach = series_place_sprite("SAFARI SHADOW 1", 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 3840);
ws_hide_walker(_G(my_walker));
hotspot_set_active(_G(currentSceneDef).hotspots, "Ladder", true);
terminateMachine(_710Rpld5Mach);
_ripPullsKeyropeMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 3840, false, triggerMachineByHashCallback, "rip pulls keyrope machine");
sendWSMessage_10000(1, _ripPullsKeyropeMach, _ripPullsRopeForLaderSeries, 1, 15, 1, _ripPullsRopeForLaderSeries, 15, 15, 0);
break;
case 1:
digi_play("710_s03", 2, 255, -1, -1);
sendWSMessage_10000(1, _ripPullsKeyropeMach, _ripPullsRopeForLaderSeries, 16, 21, 2, _ripPullsRopeForLaderSeries, 21, 21, 0);
break;
case 2:
sendWSMessage_10000(1, _ripPullsKeyropeMach, _ripPullsRopeForLaderSeries, 22, 44, 21, _ripPullsRopeForLaderSeries, 44, 44, 0);
kernel_timing_trigger(10, 22, nullptr);
break;
case 3:
terminateMachine(_ripContractionMach02);
_710Rpld4Mach = series_place_sprite("710rpld4", 0, 0, -53, 100, 1541);
_G(flags)[V223] = 1;
player_set_commands_allowed(true);
digi_play("710r07", 1, 255, -1, -1);
break;
case 21:
terminateMachine(_ripPullsKeyropeMach);
_710Rpld5Mach = series_place_sprite("710rpld5", 0, 0, -53, 100, 3840);
terminateMachine(_safariShadow1Mach);
ws_unhide_walker(_G(my_walker));
player_update_info(_G(my_walker), &_G(player_info));
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, -1, 5, true);
break;
case 22:
terminateMachine(_710Rpld4Mach);
_ripContractionMach02 = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1541, false, triggerMachineByHashCallback, "rip contraption machine");
sendWSMessage_10000(1, _ripContractionMach02, _laderComesDownSeries, 1, 18, 31, _laderComesDownSeries, 18, 18, 0);
break;
case 31:
sendWSMessage_10000(1, _ripContractionMach02, _laderComesDownSeries, 19, 47, 3, _laderComesDownSeries, 47, 47, 0);
digi_play("710_s01", 1, 255, -1, -1);
break;
default:
break;
}
}
} // esi && player_said("Rope")
else if (lookFl && player_said_any("rope ", "rope ", "rope ", "rope "))
digi_play("com110", 1, 255, -1, 997);
else if (gearFl && player_said("rope ")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
terminateMachine(_710Rprs3Mach);
_ripPullMach02 = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 3840, false, triggerMachineByHashCallback, "rip pull machine");
player_update_info(_G(my_walker), &_G(player_info));
_safariShadow1Mach = series_place_sprite("SAFARI SHADOW 1", 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 3840);
ws_hide_walker(_G(my_walker));
sendWSMessage_10000(1, _ripPullMach02, _710Rpro3Series, 1, 16, 1, _710Rpro3Series, 16, 16, 0);
break;
case 1:
digi_play("950_s42", 2, 255, -1, -1);
sendWSMessage_10000(1, _ripPullMach02, _710Rpro3Series, 17, 38, 2, _710Rpro3Series, 1, 1, 0);
break;
case 2:
if (_centerDoorPullAnimationFl)
kernel_timing_trigger(5, 3, nullptr);
else {
_ripPullMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 3845, false, triggerMachineByHashCallback, "rip pull machine");
sendWSMessage_10000(1, _ripPullMach, _mazeCentreDoorLiteSeries, 1, 10, 3, _mazeCentreDoorLiteSeries, 10, 10, 0);
_centerDoorPullAnimationFl = true;
}
break;
case 3:
terminateMachine(_ripPullMach02);
_710Rprs3Mach = series_place_sprite("710RPRS3", 0, 0, -53, 100, 2565);
terminateMachine(_safariShadow1Mach);
ws_unhide_walker(_G(my_walker));
player_set_commands_allowed(true);
break;
default:
break;
}
} // esi && player_said("rope ")
else if (gearFl && player_said("rope ")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
terminateMachine(_710Rprs1Mach);
_ripPullMach02 = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 512, false, triggerMachineByHashCallback, "rip pull machine");
player_update_info(_G(my_walker), &_G(player_info));
_safariShadow1Mach = series_place_sprite("SAFARI SHADOW 3", 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 3840);
ws_hide_walker(_G(my_walker));
sendWSMessage_10000(1, _ripPullMach02, _710Rpro1Series, 1, 15, 1, _710Rpro1Series, 15, 15, 0);
break;
case 1:
digi_play("950_s42", 2, 255, -1, -1);
sendWSMessage_10000(1, _ripPullMach02, _710Rpro1Series, 15, 38, 3, _710Rpro1Series, 1, 1, 0);
break;
case 3:
terminateMachine(_ripPullMach02);
_710Rprs1Mach = series_place_sprite("710RPRS1", 0, 0, -53, 100, 517);
terminateMachine(_safariShadow1Mach);
ws_unhide_walker(_G(my_walker));
player_set_commands_allowed(true);
break;
default:
break;
}
} // esi && player_said("rope ")
else if (gearFl && player_said("rope ")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
terminateMachine(_710Rprs2Mach);
_ripPullMach02 = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, false, triggerMachineByHashCallback, "rip pull machine");
player_update_info(_G(my_walker), &_G(player_info));
_safariShadow1Mach = series_place_sprite("SAFARI SHADOW 3", 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 3840);
ws_hide_walker(_G(my_walker));
sendWSMessage_10000(1, _ripPullMach02, _710Rpro2Series, 1, 16, 1, _710Rpro2Series, 16, 16, 0);
break;
case 1:
digi_play("950_s42", 2, 255, -1, -1);
sendWSMessage_10000(1, _ripPullMach02, _710Rpro2Series, 16, 38, 3, _710Rpro2Series, 1, 1, 0);
break;
case 3:
terminateMachine(_ripPullMach02);
_710Rprs2Mach = series_place_sprite("710RPRS2", 0, 0, -53, 100, 2053);
terminateMachine(_safariShadow1Mach);
ws_unhide_walker(_G(my_walker));
player_set_commands_allowed(true);
break;
default:
break;
}
} // esi && player_said("rope ")
else if (gearFl && player_said("rope ")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
terminateMachine(_710Rprs4Mach);
_ripPullMach02 = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 512, false, triggerMachineByHashCallback, "rip pull machine");
player_update_info(_G(my_walker), &_G(player_info));
_safariShadow1Mach = series_place_sprite("SAFARI SHADOW 3", 0, _G(player_info).x, _G(player_info).y, _G(player_info).scale, 3840);
ws_hide_walker(_G(my_walker));
sendWSMessage_10000(1, _ripPullMach02, _710Rpro4Series, 1, 17, 1, _710Rpro4Series, 17, 17, 0);
break;
case 1:
digi_play("950_s42", 2, 255, -1, -1);
sendWSMessage_10000(1, _ripPullMach02, _710Rpro4Series, 17, 38, 3, _710Rpro4Series, 1, 1, 0);
break;
case 3:
terminateMachine(_ripPullMach02);
_710Rprs4Mach = series_place_sprite("710RPRS4", 0, 0, -53, 100, 1029);
terminateMachine(_safariShadow1Mach);
ws_unhide_walker(_G(my_walker));
player_set_commands_allowed(true);
break;
default:
break;
}
} // esi && player_said("rope ")
else if (gearFl && player_said("LADDER") && _ladderActiveFl) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
ws_hide_walker(_G(my_walker));
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 1, 25, 1, _710Rpld2Series, 25, 25, 0);
break;
case 1:
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 26, 40, 2, _710Rpld2Series, 40, 40, 0);
digi_play("710_s02", 2, 255, -1, -1);
break;
case 2:
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 41, 60, 3, _710Rpld2Series, 60, 60, 0);
digi_play("710_s02", 2, 255, -1, -1);
break;
case 3:
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 61, 80, -1, _710Rpld2Series, 80, 86, 0);
digi_play("710_s02", 2, 255, -1, -1);
disable_player_commands_and_fade_init(5);
break;
case 5:
midi_stop();
player_set_commands_allowed(true);
_G(game).setRoom(711);
break;
default:
break;
}
} // esi && player_said("LADDER") && _ladderActiveFl
else if (player_said("rm709")) {
if (!_centerDoorPullAnimationFl)
digi_play("708R01", 1, 255, -1, -1);
else {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
disable_player_commands_and_fade_init(2);
break;
case 2:
player_set_commands_allowed(true);
adv_kill_digi_between_rooms(false);
midi_stop();
_G(game).setRoom(709);
break;
default:
break;
}
}
} // player_said("rm709")
else if (player_said("nowhere")) {
digi_play("708R01", 1, 255, -1, -1);
} else if (talkFl && player_said("MACHINERY")) {
digi_play("710R11", 1, 255, -1, -1);
} else if (player_said("journal")) {
digi_play("710R18", 1, 255, -1, -1);
} else
return;
_G(player).command_ready = false;
}
void Room710::daemon() {
switch (_G(kernel).trigger) {
case 30:
digi_play("710_s02", 2, 200, -1, -1);
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 82, 63, 31, _710Rpld2Series, 63, 63, 0);
break;
case 31:
digi_play("710_s02", 2, 200, -1, -1);
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 62, 43, 32, _710Rpld2Series, 43, 43, 0);
break;
case 32:
digi_play("710_s02", 2, 200, -1, -1);
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 42, 28, 33, _710Rpld2Series, 28, 28, 0);
break;
case 33:
sendWSMessage_10000(1, _ripContraptionMach, _710Rpld2Series, 27, 1, 34, _710Rpld2Series, 1, 1, 0);
break;
case 34:
terminateMachine(_ripContraptionMach);
ws_unhide_walker(_G(my_walker));
player_set_commands_allowed(true);
_ripContraptionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, false, triggerMachineByHashCallback, "rip contraption machine");
break;
default:
break;
}
}
} // namespace Rooms
} // namespace Riddle
} // namespace M4

View File

@@ -0,0 +1,76 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM710_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM710_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room710 : public Room {
public:
Room710() : Room() {}
~Room710() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
private:
bool _centerDoorPullAnimationFl = false;
bool _ladderActiveFl = false;
int32 _710Rpld2Series = 0;
int32 _710Rpld3Series = 0;
int32 _710Rpro1Series = 0;
int32 _710Rpro2Series = 0;
int32 _710Rpro3Series = 0;
int32 _710Rpro4Series = 0;
int32 _laderComesDownSeries = 0;
int32 _mazeCentreDoorLiteSeries = 0;
int32 _ripPullsRopeForLaderSeries = 0;
int32 _ripTrekMedReachHandPos1Series = 0;
machine *_710Rpld4Mach = nullptr;
machine *_710Rpld5Mach = nullptr;
machine *_710Rprs1Mach = nullptr;
machine *_710Rprs2Mach = nullptr;
machine *_710Rprs3Mach = nullptr;
machine *_710Rprs4Mach = nullptr;
machine *_ripContraptionMach = nullptr;
machine *_ripContractionMach02 = nullptr;
machine *_ripPullMach = nullptr;
machine *_ripPullMach02 = nullptr;
machine *_ripPullsKeyropeMach = nullptr;
machine *_ripReacherMach = nullptr;
machine *_safariShadow1Mach = nullptr;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

View File

@@ -0,0 +1,170 @@
/* 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 <http://www.gnu.org/licenses/ },.
*
*/
#include "m4/riddle/rooms/section7/room711.h"
#include "m4/graphics/gr_series.h"
#include "m4/riddle/vars.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
void Room711::preload() {
_G(player).walker_type = WALKER_ALT;
_G(player).shadow_type = SHADOW_ALT;
LoadWSAssets("OTHER SCRIPT", _G(master_palette));
}
void Room711::init() {
digi_preload("711R03", -1);
if (_G(flags)[V224]) {
hotspot_set_active(_G(currentSceneDef).hotspots, "MASTER LU'S BOOK", false);
hotspot_set_active(_G(currentSceneDef).hotspots, "SIKKIMESE LU'S BOOK", false);
}
if (_G(game).previous_room == 710) {
_711Rp01Series = series_load("711RP01", -1, nullptr);
ws_demand_location(_G(my_walker), 245, 354);
ws_demand_facing(_G(my_walker), 9);
ws_hide_walker(_G(my_walker));
kernel_timing_trigger(10, 100, nullptr);
}
}
void Room711::pre_parser() {
// No Implementation
}
void Room711::parser() {
const bool lookFl = player_said_any("look", "look at");
const bool talkFl = player_said_any("talk", "talk to", "take");
const bool gearFl = player_said_any("push", "pull", "gear", "open", "close");
if (lookFl && player_said("Window")) {
digi_play("711R04", 1, 255, -1, -1);
} else if (lookFl && player_said("Ladder")) {
digi_play("711R05", 1, 255, -1, -1);
} else if (lookFl && player_said("Sikkimese Book")) {
digi_play("711R02", 1, 255, -1, -1);
} else if (lookFl && player_said("Gold Icon")) {
digi_play("711R18", 1, 255, -1, -1);
} else if ((lookFl || player_said("JOURNAL")) && player_said("Master Lu's Book")) {
switch (_G(kernel).trigger) {
case -1:
if (_G(flags)[V286])
digi_play("203r54", 1, 255, -1, -1);
else {
player_set_commands_allowed(false);
digi_play("711R03", 1, 255, 2, -1);
digi_preload("950_s34", -1);
}
break;
case 2:
_ripSketchingSeries = series_load("RIP SKETCHING IN NOTEBOOK POS 2", -1, nullptr);
setGlobals1(_ripSketchingSeries, 1, 17, 17, 17, 0, 18, 39, 39, 39, 39, 38, 1, 1, 1, 1, 0, 0, 0, 0, 0);
sendWSMessage_110000(_G(my_walker), 4);
break;
case 4:
sendWSMessage_120000(_G(my_walker), 5);
digi_play("950_S34", 2, 200, 5, 950);
break;
case 5:
sendWSMessage_130000(_G(my_walker), 6);
break;
case 6:
sendWSMessage_150000(_G(my_walker), 8);
digi_unload("950_s34");
break;
case 8:
_G(flags)[V286] = 1;
player_set_commands_allowed(true);
break;
default:
break;
}
} // (ecx || player_said("JOURNAL")) && player_said("Master Lu's Book")
else if (lookFl && player_said(" ")) {
digi_play("711R01", 1, 255, -1, -1);
} else if (talkFl && player_said("Sikkimese Book")) {
digi_play("711R07", 1, 255, -1, -1);
} else if (talkFl && player_said("Master Lu's Book")) {
digi_play("711R06", 1, 255, -1, -1);
} else if (talkFl && player_said("Ladder")) {
digi_play("711R08", 1, 255, -1, -1);
} else if (talkFl && player_said("Gold Icon")) {
digi_play("711R19", 1, 255, -1, -1);
} else if (gearFl && player_said("Ladder")) {
switch (_G(kernel).trigger) {
case -1:
player_set_commands_allowed(false);
disable_player_commands_and_fade_init(2);
break;
case 2:
player_set_commands_allowed(true);
_G(game).setRoom(_G(flags)[V286] ? 706 : 710);
break;
default:
break;
}
} else
return;
_G(player).command_ready = false;
}
void Room711::daemon() {
switch (_G(kernel).trigger) {
case 100:
series_play("711RP01", 0, 0, 101, 0, 0, 100, 0, 0, 0, -1);
break;
case 101:
series_unload(_711Rp01Series);
player_set_commands_allowed(true);
ws_unhide_walker(_G(my_walker));
break;
default:
break;
}
}
} // namespace Rooms
} // namespace Riddle
} // namespace M4

View File

@@ -0,0 +1,51 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_ROOM711_H
#define M4_RIDDLE_ROOMS_SECTION7_ROOM711_H
#include "m4/riddle/rooms/room.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Room711 : public Room {
public:
Room711() : Room() {}
~Room711() override {}
void preload() override;
void init() override;
void pre_parser() override;
void parser() override;
void daemon() override;
private:
int32 _711Rp01Series = 0;
int32 _ripSketchingSeries = 0;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif

View File

@@ -0,0 +1,48 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#include "m4/riddle/rooms/section7/section7.h"
#include "m4/riddle/vars.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
Section7::Section7() : Rooms::Section() {
add(701, &_room701);
add(702, &_room702);
add(703, &_room703);
add(704, &_room704);
add(705, &_room705);
add(706, &_room706);
add(707, &_room707);
add(709, &_room709);
add(710, &_room710);
add(711, &_room711);
}
void Section7::daemon() {
_G(kernel).continue_handling_trigger = true;
}
} // namespace Rooms
} // namespace Riddle
} // namespace M4

View File

@@ -0,0 +1,65 @@
/* 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 <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_RIDDLE_ROOMS_SECTION7_H
#define M4_RIDDLE_ROOMS_SECTION7_H
#include "m4/riddle/rooms/section.h"
#include "m4/riddle/rooms/section7/room701.h"
#include "m4/riddle/rooms/section7/room702.h"
#include "m4/riddle/rooms/section7/room703.h"
#include "m4/riddle/rooms/section7/room704.h"
#include "m4/riddle/rooms/section7/room705.h"
#include "m4/riddle/rooms/section7/room706.h"
#include "m4/riddle/rooms/section7/room707.h"
#include "m4/riddle/rooms/section7/room709.h"
#include "m4/riddle/rooms/section7/room710.h"
#include "m4/riddle/rooms/section7/room711.h"
namespace M4 {
namespace Riddle {
namespace Rooms {
class Section7 : public Section {
private:
Room701 _room701;
Room702 _room702;
Room703 _room703;
Room704 _room704;
Room705 _room705;
Room706 _room706;
Room707 _room707;
Room709 _room709;
Room710 _room710;
Room711 _room711;
public:
Section7();
virtual ~Section7() {}
void daemon() override;
};
} // namespace Rooms
} // namespace Riddle
} // namespace M4
#endif