Initial commit
This commit is contained in:
1244
engines/m4/riddle/rooms/section8/room801.cpp
Normal file
1244
engines/m4/riddle/rooms/section8/room801.cpp
Normal file
File diff suppressed because it is too large
Load Diff
101
engines/m4/riddle/rooms/section8/room801.h
Normal file
101
engines/m4/riddle/rooms/section8/room801.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* 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_SECTION8_ROOM801_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM801_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room801 : public Room {
|
||||
public:
|
||||
Room801() : Room() {}
|
||||
~Room801() 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 room801_conv801a();
|
||||
|
||||
int32 _cellarDoorClosedSeries = 0;
|
||||
int32 _cellarDoorOpenSeries = 0;
|
||||
int32 _farmerDisplacementSeries = 0;
|
||||
int32 _farmerEarthquakeGestureSeries = 0;
|
||||
int32 _farmerGiveTakeBowSeries = 0;
|
||||
int32 _farmerLooksToZeroSeries = 0;
|
||||
int32 _farmerTalkLoopSeries = 0;
|
||||
int32 _meiLookToZeroSeries = 0;
|
||||
int32 _meiPrattleLoopSeries = 0;
|
||||
int32 _mtcsh1Series = 0;
|
||||
int32 _planeShadowSeries = 0;
|
||||
int32 _ripClosesCellarSeries = 0;
|
||||
int32 _ripEntersRootCellarSeries = 0;
|
||||
int32 _ripKneelPotterySeries = 0;
|
||||
int32 _ripLooksLRDownSeries = 0;
|
||||
int32 _ripLooksToZeroSeries = 0;
|
||||
int32 _farmerShould = 0;
|
||||
int32 _ripReturnsFromRootCellarSeries = 0;
|
||||
int32 _ripTrekHandOnChinSeries = 0;
|
||||
int32 _ripTrekHandsBehBackSeries = 0;
|
||||
int32 _ripTrekHandsHipPos5Series = 0;
|
||||
int32 _ripTrekHatTipPos5Series = 0;
|
||||
int32 _ripTrekHeadTurnSeries = 0;
|
||||
int32 _ripTrekNodPos4Series = 0;
|
||||
int32 _rptmr15Series = 0;
|
||||
int32 _shovelSeries = 0;
|
||||
|
||||
int32 _counter = 0;
|
||||
int32 _ripleyShould = 0;
|
||||
int32 _meiShould = 0;
|
||||
int32 _ripleyMode = 0;
|
||||
int32 _meiMode = 0;
|
||||
int32 _farmerMode = 0;
|
||||
|
||||
bool _unkFlag1 = false;
|
||||
bool _unkFlag2 = false;
|
||||
bool _unkFlag3 = false;
|
||||
bool _cellarOpenFl = false;
|
||||
|
||||
machine *_cellarDoorClosedMach = nullptr;
|
||||
machine *_cellarDoorOpenMach = nullptr;
|
||||
machine *_farmerDisplacementMach = nullptr;
|
||||
machine *_farmerShadowMach = nullptr;
|
||||
machine *_mcTrekMach = nullptr;
|
||||
machine *_planeShadowMach = nullptr;
|
||||
machine *_ripAnimationMach = nullptr;
|
||||
machine *_safariShadow5Mach = nullptr;
|
||||
machine *_safariShadow5Mach2 = nullptr;
|
||||
machine *_shovelMach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
504
engines/m4/riddle/rooms/section8/room802.cpp
Normal file
504
engines/m4/riddle/rooms/section8/room802.cpp
Normal file
@@ -0,0 +1,504 @@
|
||||
/* 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/section8/room802.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
static const char *const SAID[][2] = {
|
||||
{"urn", "802r10"},
|
||||
{"urn ", "802r11"},
|
||||
{"potatoes", "802r12"},
|
||||
{"stairs", "802r13"},
|
||||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
void Room802::preload() {
|
||||
mouse_show();
|
||||
LoadWSAssets("OTHER SCRIPT", _G(master_palette));
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
}
|
||||
|
||||
void Room802::init() {
|
||||
digi_preload("801_s02", -1);
|
||||
digi_play_loop("801_s02", 3, 35, -1, -1);
|
||||
if (!player_been_here(802)) {
|
||||
_G(flags)[kRiceSackMoved] = 0;
|
||||
_G(flags)[kDugInWall] = 0;
|
||||
_G(flags)[kOpenedHoleInWall] = 0;
|
||||
}
|
||||
|
||||
digi_preload("802_s01", -1);
|
||||
digi_preload("802_s02", -1);
|
||||
digi_preload("802_s03", -1);
|
||||
digi_preload("802_s04", -1);
|
||||
digi_preload("802_s05", -1);
|
||||
_ripArmXPos3 = series_load("RIP TREK ARMS X POS3", -1, nullptr);
|
||||
_ripTalkOffTd33 = series_load("RIP HEAD DOWN TALK OFF TD33", -1, nullptr);
|
||||
|
||||
if (!_G(flags)[kDugInWall]) {
|
||||
_handInWall = series_load("HAND IN WALL", -1, nullptr);
|
||||
if (inv_player_has("farmer's shovel")) {
|
||||
_ripDigsWall = series_load("802 RIP DIGS AT WALL", -1, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (!_G(flags)[kOpenedHoleInWall]) {
|
||||
_handInWallPartlyDug = series_load("HAND IN WALL PARTLY DUG ", -1, nullptr);
|
||||
if (inv_player_has("farmer's shovel")) {
|
||||
_ripTugsOnArm = series_load("RIP TUGS ON ARM", -1, nullptr);
|
||||
}
|
||||
_ripTugsBeforeDigging = series_load("RIP TUGS BEFORE DIGGING", -1, nullptr);
|
||||
}
|
||||
|
||||
if (inv_player_has("farmer's shovel")) {
|
||||
_holeInWall = series_load("HOLE IN WALL", -1, nullptr);
|
||||
}
|
||||
|
||||
if (!_G(flags)[kRiceSackMoved]) {
|
||||
_sackAgainstWall = series_load("SACK AGAINST WALL", -1, nullptr);
|
||||
_ripDragsSack = series_load("RIP DRAGS SACK ASIDE", -1, nullptr);
|
||||
}
|
||||
|
||||
_802Sack2 = series_load("802SACK2", -1, nullptr);
|
||||
_ripUpStairs = series_load("802 RIP UP STAIRS", -1, nullptr);
|
||||
_ripDownStairs = series_load("802 RIP DOWN STAIRS", -1, nullptr);
|
||||
_ripLooksAtHand = series_load("RIP looks at hand in wall", -1, nullptr);
|
||||
|
||||
if (inv_player_has("match") && _G(flags)[kOpenedHoleInWall]) {
|
||||
_lookWithMatch = series_load("802 LOOK WITH MATCH", -1, nullptr);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "HOLE", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "HOLE ", true);
|
||||
} else {
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "HOLE", true);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "HOLE ", false);
|
||||
}
|
||||
|
||||
if (_G(flags)[kRiceSackMoved]) {
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "RICE SACK", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "RICE SACK ", true);
|
||||
} else {
|
||||
_sackAgainstWallMach = series_place_sprite("SACK AGAINST WALL", 0, 0, 0, 100, 512);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "RICE SACK", true);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "RICE SACK ", false);
|
||||
}
|
||||
|
||||
if (_G(flags)[kOpenedHoleInWall]) {
|
||||
_sackAgainstWallMach = series_place_sprite("802SACK2", 0, 0, 0, 100, 768);
|
||||
}
|
||||
|
||||
if (_G(flags)[kOpenedHoleInWall] || !_G(flags)[kRiceSackMoved]) {
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "HAND", false);
|
||||
} else {
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "HAND", true);
|
||||
if (_G(flags)[kDugInWall])
|
||||
_handInWallMach = series_place_sprite("HAND IN WALL PARTLY DUG ", 0, 0, 0, 100, 512);
|
||||
else
|
||||
_handInWallMach = series_place_sprite("HAND IN WALL", 0, 0, 0, 100, 512);
|
||||
}
|
||||
|
||||
if (_G(flags)[kOpenedHoleInWall])
|
||||
_holeInWallMach = series_place_sprite("HOLE IN WALL", 0, 0, 0, 100, 512);
|
||||
else
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "HOLE", false);
|
||||
|
||||
if (_G(flags)[kOpenedHoleInWall])
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "WALL", false);
|
||||
|
||||
if (_G(game).previous_room == KERNEL_RESTORING_GAME)
|
||||
return;
|
||||
|
||||
if (_G(game).previous_room != 801) {
|
||||
_ripDigsWall = series_load("802 RIP DIGS AT WALL", -1, nullptr);
|
||||
_ripLooksAtHand = series_load("RIP looks at hand in wall", -1, nullptr);
|
||||
_ripTugsOnArm = series_load("RIP TUGS ON ARM", -1, nullptr);
|
||||
_ripTugsBeforeDigging = series_load("RIP TUGS BEFORE DIGGING", -1, nullptr);
|
||||
_holeInWall = series_load("HOLE IN WALL", -1, nullptr);
|
||||
_lookWithMatch = series_load("802 LOOK WITH MATCH", -1, nullptr);
|
||||
}
|
||||
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), 185, 263);
|
||||
ws_hide_walker(_G(my_walker));
|
||||
kernel_timing_trigger(30, 7, nullptr);
|
||||
}
|
||||
|
||||
void Room802::pre_parser() {
|
||||
const bool lookFl = player_said("look");
|
||||
|
||||
if (player_said("go") && player_said("root cellar")) {
|
||||
digi_play("802R13", 1, 255, -1, -1);
|
||||
_G(player).need_to_walk = false;
|
||||
_G(player).ready_to_walk = true;
|
||||
_G(player).waiting_for_walk = false;
|
||||
}
|
||||
|
||||
if (lookFl && player_said(" ")) {
|
||||
_G(player).need_to_walk = false;
|
||||
_G(player).ready_to_walk = true;
|
||||
_G(player).waiting_for_walk = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Room802::parser() {
|
||||
const bool lookFl = player_said_any("look", "look at");
|
||||
const bool takeFl = player_said("take");
|
||||
const bool gearFl = player_said("gear");
|
||||
const bool climbFl = player_said_any("go", "climb");
|
||||
|
||||
if (lookFl && _G(walker).ripley_said(SAID)) {
|
||||
// Nothing on purpose
|
||||
}
|
||||
|
||||
else if (lookFl && (player_said("rice sack") || player_said("rice sack "))) {
|
||||
_G(kernel).trigger_mode = KT_DAEMON;
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(14));
|
||||
_G(kernel).trigger_mode = KT_PARSE;
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("wall") && _G(flags)[kOpenedHoleInWall] == 0) {
|
||||
if (_G(flags)[kTerracottaSoldiers]) {
|
||||
_G(kernel).trigger_mode = KT_DAEMON;
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(14));
|
||||
_G(kernel).trigger_mode = KT_PARSE;
|
||||
} else {
|
||||
digi_play("802R03", 1, 255, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
else if ((climbFl && player_said("hole ")) || (lookFl && player_said("hole "))) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
interface_hide();
|
||||
ws_hide_walker(_G(my_walker));
|
||||
_ripActionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip lights match");
|
||||
sendWSMessage_10000(1, _ripActionMach, _lookWithMatch, 1, 12, 10, _lookWithMatch, 12, 12, 0);
|
||||
break;
|
||||
case 1:
|
||||
digi_play("802r16", 1, 255, 2, 802);
|
||||
break;
|
||||
case 2:
|
||||
kernel_timing_trigger(90, 3, nullptr);
|
||||
break;
|
||||
case 3:
|
||||
disable_player_commands_and_fade_init(4);
|
||||
break;
|
||||
case 4:
|
||||
inv_move_object("match", 999);
|
||||
terminateMachine(_ripActionMach);
|
||||
player_set_commands_allowed(true);
|
||||
_G(flags)[V260] = 1;
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_play_loop("801_s02", 3, 100, -1, -1);
|
||||
_G(game).setRoom(801);
|
||||
break;
|
||||
case 10:
|
||||
sendWSMessage_10000(1, _ripActionMach, _lookWithMatch, 13, 18, 1, _lookWithMatch, 19, 22, 1);
|
||||
digi_play("802_s05", 2, 255, -1, -1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (lookFl && (player_said("hand") || player_said("hole"))) {
|
||||
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 bends down to look in hole / at hand");
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripLooksAtHand, 1, 17, 1, _ripLooksAtHand, 17, 17, 0);
|
||||
break;
|
||||
case 1:
|
||||
if (player_said("hole")) {
|
||||
digi_play("802r09", 1, 255, 2, -1);
|
||||
} else if (_G(flags)[kDugInWall]){
|
||||
digi_play("802r15", 1, 255, 2, -1);
|
||||
} else if (_G(flags)[kTerracottaSoldiers]) {
|
||||
digi_play("802r02", 1, 255, 2, -1);
|
||||
} else {
|
||||
digi_play("802r03", 1, 255, 2, -1);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripLooksAtHand, 17, 1, 3, _ripLooksAtHand, 1, 1, 0);
|
||||
break;
|
||||
case 3:
|
||||
terminateMachine(_ripActionMach);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("root cellar")) {
|
||||
// Nothing on purpose
|
||||
}
|
||||
|
||||
else if (gearFl && player_said("rice sack")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
_ripActionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0x200, false,
|
||||
triggerMachineByHashCallback, "rip moves sack of rice");
|
||||
ws_hide_walker(_G(my_walker));
|
||||
terminateMachine(_sackAgainstWallMach);
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripDragsSack, 1, 15, 10, _ripDragsSack, 15, 15, 0);
|
||||
break;
|
||||
case 1:
|
||||
digi_play("802r05", 1, 255, 2, -1);
|
||||
break;
|
||||
case 2:
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripDragsSack, 41, 46, 3, _ripDragsSack, 46, 46, 0);
|
||||
break;
|
||||
case 3:
|
||||
terminateMachine(_ripActionMach);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
_handInWallMach = series_place_sprite("HAND IN WALL", 0, 0, 0, 100, 512);
|
||||
series_unload(_ripDragsSack);
|
||||
series_unload(_sackAgainstWall);
|
||||
_G(flags)[kRiceSackMoved] = 1;
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "rice sack", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "rice sack ", true);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "hand", true);
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
case 10:
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripDragsSack, 16, 25, 11, _ripDragsSack, 25, 25, 0);
|
||||
digi_play("802_s01", 2, 255, -1, -1);
|
||||
break;
|
||||
case 11:
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripDragsSack, 26, 40, 1, _ripDragsSack, 40, 40, 0);
|
||||
digi_stop(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if ((player_said("farmer's shovel", "hand") || player_said("farmer's shovel", "wall")) && _G(flags)[kDugInWall] == 0) {
|
||||
if (_G(flags)[kRiceSackMoved]) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
ws_hide_walker(_G(my_walker));
|
||||
terminateMachine(_handInWallMach);
|
||||
_ripActionMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "802 rip digs at wall");
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripDigsWall, 1, 24, 10, _ripDigsWall, 24, 24, 0);
|
||||
break;
|
||||
case 1:
|
||||
terminateMachine(_ripActionMach);
|
||||
ws_unhide_walker((_G(my_walker)));
|
||||
_handInWallMach = series_place_sprite("HAND IN WALL PARTLY DUG ", 0, 0, 0, 100, 512);
|
||||
_G(flags)[kDugInWall] = 1;
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
case 10:
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripDigsWall, 25, 54, 11, _ripDigsWall, 54, 54, 0);
|
||||
digi_play("802_s04", 2, 255, -1, -1);
|
||||
break;
|
||||
case 11:
|
||||
sendWSMessage_10000(1, _ripActionMach, _ripDigsWall, 55, 66, 1, _ripDigsWall, 66, 66, 0);
|
||||
digi_stop(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
digi_play("802r04", 1, 255, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
else if ((gearFl || takeFl) && player_said("hand")) {
|
||||
if (inv_player_has("farmer's shovel") && _G(flags)[kDugInWall]) {
|
||||
if (_G(flags)[kDugInWall] >= 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
|
||||
70
engines/m4/riddle/rooms/section8/room802.h
Normal file
70
engines/m4/riddle/rooms/section8/room802.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/* 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_SECTION8_ROOM802_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM802_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room802 : public Room {
|
||||
public:
|
||||
Room802() : Room() {}
|
||||
~Room802() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
|
||||
private:
|
||||
int32 _802Sack2 = 0;
|
||||
int32 _handInWall = 0;
|
||||
int32 _handInWallPartlyDug = 0;
|
||||
int32 _holeInWall = 0;
|
||||
int32 _lookWithMatch = 0;
|
||||
int32 _ripArmXPos3 = 0;
|
||||
int32 _ripDigsWall = 0;
|
||||
int32 _ripDownStairs = 0;
|
||||
int32 _ripDragsSack = 0;
|
||||
int32 _ripLooksAtHand = 0;
|
||||
int32 _ripTalkOffTd33 = 0;
|
||||
int32 _ripTugsBeforeDigging = 0;
|
||||
int32 _ripTugsOnArm = 0;
|
||||
int32 _ripUpStairs = 0;
|
||||
int32 _sackAgainstWall = 0;
|
||||
|
||||
machine *_handInWallMach = nullptr;
|
||||
machine *_holeInWallMach = nullptr;
|
||||
machine *_ripActionMach = nullptr;
|
||||
machine *_sackAgainstWallMach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
613
engines/m4/riddle/rooms/section8/room803.cpp
Normal file
613
engines/m4/riddle/rooms/section8/room803.cpp
Normal file
@@ -0,0 +1,613 @@
|
||||
/* 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/section8/section8.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room803::preload() {
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
LoadWSAssets("other script", _G(master_palette));
|
||||
}
|
||||
|
||||
void Room803::init() {
|
||||
digi_preload("950_s29", -1);
|
||||
_var1 = 0;
|
||||
|
||||
if (_G(flags)[V276])
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
else
|
||||
loadWalkSeries();
|
||||
|
||||
initWalker();
|
||||
digi_play_loop("950_s29", 2, 127, -1, 950);
|
||||
}
|
||||
|
||||
void Room803::parser() {
|
||||
const bool lookFl = player_said_any("look", "look at");
|
||||
const bool takeFl = player_said("take");
|
||||
const bool talkFl = player_said_any("talk", "talk to");
|
||||
|
||||
if (lookFl && player_said("HOLE IN THE WALL")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
_ripTalkerPos5 = series_load("RIP LOOKS UP POS3", -1, nullptr);
|
||||
setGlobals1(_ripTalkerPos5, 1, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_G(my_walker), 1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
digi_play("803R04", 1, 255, 2, -1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sendWSMessage_140000(_G(my_walker), 3);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
player_set_commands_allowed(true);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("MURAL")) {
|
||||
digi_play("803R05", 1, 255, -1, -1);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("SOLDIER")) {
|
||||
digi_play("COM074", 1, 255, -1, 997);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("FALLEN SOLDIER")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
_ripTalkerPos5 = series_load("RIP TREK LOOK DOWN POS3", -1, nullptr);
|
||||
setGlobals1(_ripTalkerPos5, 1, 11, 11, 11, 0, 11, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_G(my_walker), 1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
digi_play("COM062", 1, 255, 2, 997);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sendWSMessage_120000(_G(my_walker), 3);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sendWSMessage_150000(_G(my_walker), 4);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("FALLEN STATUE")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
_ripTalkerPos5 = series_load("RIP TREK LOOK DOWN POS3", -1, nullptr);
|
||||
setGlobals1(_ripTalkerPos5, 1, 11, 11, 11, 0, 11, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_G(my_walker), 1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
digi_play("803R06", 1, 255, 2, -1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sendWSMessage_120000(_G(my_walker), 3);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sendWSMessage_150000(_G(my_walker), 4);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("BROKEN STATUE")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
_ripTalkerPos5 = series_load("RIP TREK LOOK DOWN POS3", -1, nullptr);
|
||||
setGlobals1(_ripTalkerPos5, 1, 11, 11, 11, 0, 12, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_G(my_walker), 1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
digi_play("803R07", 1, 255, 2, -1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sendWSMessage_120000(_G(my_walker), 3);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sendWSMessage_150000(_G(my_walker), 4);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("URN")) {
|
||||
digi_play("803R08", 1, 255, -1, -1);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("UNLIT URN")) {
|
||||
digi_play("COM061", 1, 255, -1, 997);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("FALLEN URN")) {
|
||||
digi_play("803R10", 1, 255, -1, -1);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said(" ")) {
|
||||
digi_play("803R11", 1, 255, -1, -1);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("MEI CHEN")) {
|
||||
digi_play("COM043", 1, 255, -1, 997);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("BROKEN BEAM")) {
|
||||
digi_play("844R12", 1, 255, -1, -1);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said("tipped soldier")) {
|
||||
digi_play("com062", 1, 255, -1, 997);
|
||||
}
|
||||
|
||||
else if (lookFl && player_said(" ")) { // Previously checked??...
|
||||
digi_play("803R11", 1, 255, -1, -1);
|
||||
}
|
||||
|
||||
else if (talkFl && player_said("MEI CHEN")) {
|
||||
player_set_commands_allowed(false);
|
||||
_G(kernel).trigger_mode = KT_DAEMON;
|
||||
switch (imath_ranged_rand(1, 4)) {
|
||||
case 1:
|
||||
digi_play("COM044", 1, 255, 33, 997);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
digi_play("COM045", 1, 255, 33, 997);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
digi_play("COM046", 1, 255, 33, 997);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
digi_play("COM047", 1, 255, 33, 997);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
_ripTalkerPos5 = series_load("RIP TREK TALKER POS3", -1, nullptr);
|
||||
setGlobals1(_ripTalkerPos5, 1, 5, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_G(my_walker), -1);
|
||||
}
|
||||
|
||||
else if (takeFl && (player_said("BROKEN STATUE") || player_said("FALLEN STATUE"))) {
|
||||
digi_play("803R13", 1, 255, -1, -1);
|
||||
}
|
||||
|
||||
else if (player_said("climb through", "Hole in the Wall")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
digi_play("803R19", 1, 255, 1, -1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (player_said("Fifth Door")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
disable_player_commands_and_fade_init(1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_play_loop("950_s29", 2, 180, -1, 950);
|
||||
_G(game).setRoom(844);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (player_said("Fourth Door")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
disable_player_commands_and_fade_init(1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_play_loop("950_s29", 3, 180, -1, 950);
|
||||
_G(game).setRoom(834);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (player_said("Third Door")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
disable_player_commands_and_fade_init(1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_play_loop("950_s29", 3, 180, -1, 950);
|
||||
_G(game).setRoom(814);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (player_said("Second Door")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
disable_player_commands_and_fade_init(1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_play_loop("950_s29", 3, 180, -1, 950);
|
||||
_G(game).setRoom(824);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (player_said("First Door")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
kernel_timing_trigger(15, 1, nullptr);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
player_set_commands_allowed(false);
|
||||
disable_player_commands_and_fade_init(2);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_play_loop("950_s29", 3, 180, -1, 950);
|
||||
_G(game).setRoom(804);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (player_said("journal") && player_said("look at")) {
|
||||
digi_play("com042", 1, 255, -1, 997);
|
||||
} else
|
||||
return;
|
||||
|
||||
|
||||
_G(player).command_ready = false;
|
||||
}
|
||||
|
||||
void Room803::daemon() {
|
||||
const int32 trigger = _G(kernel).trigger;
|
||||
|
||||
if ((trigger >= 1 && trigger < 15) || (trigger >= 50 && trigger <= 56) || (trigger == 999))
|
||||
daemonSub1();
|
||||
else if (trigger == 15) {
|
||||
sendWSMessage_150000(_mcWalkerMach, -1);
|
||||
player_set_commands_allowed(true);
|
||||
} else if (trigger == 16) {
|
||||
sendWSMessage_150000(_G(my_walker), -1);
|
||||
} else if (trigger == 33) {
|
||||
sendWSMessage_150000(_G(my_walker), -1);
|
||||
switch (imath_ranged_rand(1, 4)) {
|
||||
case 1:
|
||||
digi_play("COM048", 1, 255, 15, 997);
|
||||
break;
|
||||
case 2:
|
||||
digi_play("COM049", 1, 255, 15, 997);
|
||||
break;
|
||||
case 3:
|
||||
digi_play("COM050", 1, 255, 15, 997);
|
||||
break;
|
||||
case 4:
|
||||
digi_play("COM051", 1, 255, 15, 997);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
_meiTalksPos3 = series_load("Mei talks pos3", -1, nullptr);
|
||||
setGlobals1(_meiTalksPos3, 1, 4, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_mcWalkerMach, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void Room803::initWalker() {
|
||||
switch (_G(game).previous_room) {
|
||||
case KERNEL_RESTORING_GAME:
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcWalkerMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 357, 175, 3, Walker::player_walker_callback, "mc");
|
||||
}
|
||||
break;
|
||||
|
||||
case 804:
|
||||
ws_demand_location(_G(my_walker), 639, 260);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
player_set_commands_allowed(false);
|
||||
_mcWalkerMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 639, 260, 3, Walker::player_walker_callback, "mc");
|
||||
ws_walk(_G(my_walker), 579, 260, nullptr, 50, 9, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 202, 309, nullptr, -1, 7, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 814:
|
||||
ws_demand_location(_G(my_walker), 513, 192);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
player_set_commands_allowed(false);
|
||||
_mcWalkerMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 513, 192, 3, Walker::player_walker_callback, "mc");
|
||||
ws_walk(_G(my_walker), 463, 192, nullptr, 51, 9, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 202, 309, nullptr, -1, 7, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 824:
|
||||
ws_demand_location(_G(my_walker), 570, 220);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
player_set_commands_allowed(false);
|
||||
_mcWalkerMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 570, 220, 3, Walker::player_walker_callback, "mc");
|
||||
ws_walk(_G(my_walker), 520, 220, nullptr, 52, 9, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 202, 309, nullptr, -1, 7, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 834:
|
||||
ws_demand_location(_G(my_walker), 491, 174);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
player_set_commands_allowed(false);
|
||||
_mcWalkerMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 491, 174, 3, Walker::player_walker_callback, "mc");
|
||||
ws_walk(_G(my_walker), 441, 174, nullptr, 53, 9, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 202, 309, nullptr, -1, 7, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 844:
|
||||
ws_demand_location(_G(my_walker), 475, 161);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
player_set_commands_allowed(false);
|
||||
_mcWalkerMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 475, 161, 3, Walker::player_walker_callback, "mc");
|
||||
ws_walk(_G(my_walker), 425, 161, nullptr, 54, 9, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 202, 309, nullptr, -1, 7, true);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ws_demand_location(_G(my_walker), 202, 239);
|
||||
ws_demand_facing(_G(my_walker), 7);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
ws_hide_walker(_G(my_walker));
|
||||
_meiStepOffPileMach = series_play("MEI STEPS OFF PILE", 0, 16, 2, 5, 0, 100, 0, 0, 0, 0);
|
||||
kernel_timing_trigger(15, 1, nullptr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
series_play("BRAZIERS 1-6 BURNING", 3840, 0, -1, 5, -1, 100, 0, 0, 0, -1);
|
||||
series_play("BRAZIER 8 BURNING", 2304, 0, -1, 5, -1, 100, 0, 0, 0, -1);
|
||||
series_play("BRAZIER 9 BURNING", 1792, 0, -1, 5, -1, 100, 0, 0, 0, -1);
|
||||
series_play("BRAZIER 10 BURNING", 1024, 0, -1, 5, -1, 100, 0, 0, 0, -1);
|
||||
}
|
||||
|
||||
void Room803::loadWalkSeries() {
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2, false);
|
||||
ws_walk_load_shadow_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1);
|
||||
}
|
||||
|
||||
void Room803::daemonSub1() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
player_set_commands_allowed(false);
|
||||
terminateMachine(_meiStepOffPileMach);
|
||||
_meiStepOffPileMach = series_play("MEI STEPS OFF PILE", 0, 16, 2, 5, 0, 100, 0, 0, 0, 56);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
digi_play("803m01", 1, 255, 3, -1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (_meiStepOffPileMach != nullptr)
|
||||
terminateMachine(_meiStepOffPileMach);
|
||||
|
||||
_meiStepOffPileMach = series_play("MEI STEPS OFF PILE", 0, 16, 4, 5, 0, 100, 0, 0, 56, 57);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (_meiStepOffPileMach != nullptr)
|
||||
terminateMachine(_meiStepOffPileMach);
|
||||
|
||||
_meiStepOffPile = series_load("MEI STEPS OFF PILE", -1, nullptr);
|
||||
_meiStepOffPileMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 256, false, triggerMachineByHashCallback, "rip");
|
||||
sendWSMessage_10000(1, _meiStepOffPileMach, _meiStepOffPile, 57, 50, -1, _meiStepOffPile, 57, 60, 1);
|
||||
digi_play("803r01", 1, 255, 5, -1);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
sendWSMessage_10000(1, _meiStepOffPileMach, _meiStepOffPile, 57, 57, -1, _meiStepOffPile, 57, 57, 0);
|
||||
digi_play("803m02", 1, 255, 6, -1);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
sendWSMessage_10000(1, _meiStepOffPileMach, _meiStepOffPile, 61, 67, 7, _meiStepOffPile, 67, 67, 0);
|
||||
digi_play("803r02", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
sendWSMessage_10000(1, _meiStepOffPileMach, _meiStepOffPile, 67, 57, 8, _meiStepOffPile, 57, 57, 0);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
sendWSMessage_150000(_meiStepOffPileMach, -1);
|
||||
|
||||
if (_meiStepOffPileMach != nullptr) {
|
||||
terminateMachine(_meiStepOffPileMach);
|
||||
series_unload(_meiStepOffPile);
|
||||
}
|
||||
|
||||
_ripStanderMach = series_play("RIP STANDER", 0, 16, -1, 5, 0, 100, 0, 0, 0, -1);
|
||||
_meiLooksAboutMach = series_play("MEI LOOKS ABOUT", 0, 16, 9, 5, 0, 100, 0, 0, 0, 32);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
digi_play("803m03", 1, 255, 10, -1);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
sendWSMessage_150000(_meiLooksAboutMach, -1);
|
||||
if (_meiLooksAboutMach != nullptr)
|
||||
terminateMachine(_meiLooksAboutMach);
|
||||
|
||||
_ripTalkerPos5 = series_load("RIP TALKER POS 5", -1, nullptr);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
ws_demand_facing(_G(my_walker), 7);
|
||||
setGlobals1(_ripTalkerPos5, 1, 4, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_G(my_walker), -1);
|
||||
digi_play("803r03", 1, 255, 11, -1);
|
||||
_mcWalkerMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 186, 252, 1, Walker::player_walker_callback, "mc");
|
||||
sendWSMessage_10000(_mcWalkerMach, 244, 252, 3, 12, 1);
|
||||
if (_ripStanderMach != nullptr)
|
||||
terminateMachine(_ripStanderMach);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
sendWSMessage_150000(_G(my_walker), -1);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
break;
|
||||
|
||||
case 12:
|
||||
sendWSMessage_10000(_mcWalkerMach, 357, 175, 1, 13, 1);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
case 56:
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
// Nothing
|
||||
break;
|
||||
|
||||
case 50:
|
||||
ws_walk(_G(my_walker), 202, 239, nullptr, -1, 7, true);
|
||||
ws_walk(_mcWalkerMach, 450, 260, nullptr, 55, 1, true);
|
||||
break;
|
||||
|
||||
case 51:
|
||||
ws_walk(_G(my_walker), 202, 239, nullptr, -1, 7, true);
|
||||
ws_walk(_mcWalkerMach, 400, 191, nullptr, 55, 1, true);
|
||||
break;
|
||||
|
||||
case 52:
|
||||
ws_walk(_G(my_walker), 202, 239, nullptr, -1, 7, true);
|
||||
ws_walk(_mcWalkerMach, 390, 220, nullptr, 55, 1, true);
|
||||
break;
|
||||
|
||||
case 53:
|
||||
case 54:
|
||||
ws_walk(_G(my_walker), 202, 239, nullptr, -1, 7, true);
|
||||
sendWSMessage_10000(_mcWalkerMach, 357, 175, 1, 55, 1);
|
||||
break;
|
||||
|
||||
case 55:
|
||||
sendWSMessage_10000(_mcWalkerMach, 357, 175, 1, 56, 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
61
engines/m4/riddle/rooms/section8/room803.h
Normal file
61
engines/m4/riddle/rooms/section8/room803.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/* 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_SECTION8_ROOM803_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM803_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room803 : public Room {
|
||||
public:
|
||||
Room803() : Room() {}
|
||||
~Room803() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
int32 _meiStepOffPile = 0;
|
||||
int32 _meiTalksPos3 = 0;
|
||||
int32 _ripTalkerPos5 = 0;
|
||||
int32 _var1 = 0;
|
||||
|
||||
machine *_mcWalkerMach = nullptr;
|
||||
machine *_meiLooksAboutMach = nullptr;
|
||||
machine *_meiStepOffPileMach = nullptr;
|
||||
machine *_ripStanderMach = nullptr;
|
||||
|
||||
void initWalker();
|
||||
void loadWalkSeries();
|
||||
void daemonSub1();
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
114
engines/m4/riddle/rooms/section8/room804.cpp
Normal file
114
engines/m4/riddle/rooms/section8/room804.cpp
Normal file
@@ -0,0 +1,114 @@
|
||||
/* 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/section8/room804.h"
|
||||
|
||||
#include "m4/riddle/riddle.h"
|
||||
#include "m4/riddle/rooms/section8/section8.h"
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/gui/gui_vmng.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
|
||||
void Room804::init() {
|
||||
_currentRoom = 804;
|
||||
if (_G(flags)[V276] == 0) {
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1, false);
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2, false);
|
||||
}
|
||||
|
||||
series_plain_play("804 lit urn 1", -1, 0, 100, 32767, 7, -1, false);
|
||||
series_plain_play("804 lit urn 2", -1, 0, 100, 32767, 7, -1, false);
|
||||
_var1 = 3;
|
||||
_var2 = 1;
|
||||
_var3 = 4;
|
||||
_var4 = 6;
|
||||
_var5 = -1;
|
||||
|
||||
getSeriesName(1, false);
|
||||
_machArr[0] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(4, false);
|
||||
_machArr[1] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(6, false);
|
||||
_machArr[2] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
_machArr[3] = nullptr;
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
switch (_G(game).previous_room) {
|
||||
case KERNEL_RESTORING_GAME:
|
||||
player_set_commands_allowed(true);
|
||||
digi_preload("950_s29", -1);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, _guessX, 400, _guessIndex, Walker::player_walker_callback, "mc_trek");
|
||||
kernel_timing_trigger(1, 1, nullptr);
|
||||
}
|
||||
break;
|
||||
case 803:
|
||||
player_set_commands_allowed(false);
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), -10, 325);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, -75, 325, 3, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 0;
|
||||
_guessX = 100;
|
||||
_guessIndex = 1;
|
||||
ws_walk(_G(my_walker), 150, 340, nullptr, -1, 3, true);
|
||||
ws_walk(_mcTrekMach, 80, 400, nullptr, 1, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 150, 340, nullptr, 1, 3, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
player_set_commands_allowed(false);
|
||||
moveScreen(1280, 0);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
ws_demand_location(_G(my_walker), 1925, 325);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 2000, 325, 9, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 4;
|
||||
_guessX = 1815;
|
||||
_guessIndex = 11;
|
||||
ws_walk(_G(my_walker), 1765, 345, nullptr, 0, 9, true);
|
||||
DisposePath(_mcTrekMach->walkPath);
|
||||
_mcTrekMach->walkPath = CreateCustomPath(1835, 325, 1815, 400, -1);
|
||||
ws_custom_walk(_mcTrekMach, 11, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 1765, 345, nullptr, 1, 9, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
digi_play_loop("950_s29", 3, 96, -1, -1);
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
44
engines/m4/riddle/rooms/section8/room804.h
Normal file
44
engines/m4/riddle/rooms/section8/room804.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/* 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_SECTION8_ROOM804_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM804_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room804 : public Section8Room {
|
||||
public:
|
||||
Room804() : Section8Room() {}
|
||||
~Room804() override {}
|
||||
|
||||
void init() override;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
1243
engines/m4/riddle/rooms/section8/room805.cpp
Normal file
1243
engines/m4/riddle/rooms/section8/room805.cpp
Normal file
File diff suppressed because it is too large
Load Diff
81
engines/m4/riddle/rooms/section8/room805.h
Normal file
81
engines/m4/riddle/rooms/section8/room805.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/* 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_SECTION8_ROOM805_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM805_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room805 : public Room {
|
||||
public:
|
||||
Room805() : Room() {}
|
||||
~Room805() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
int32 _lastRnd = 1;
|
||||
int32 _meiHandsBehindBack = 0;
|
||||
int32 _meiSpookedPos2 = 0;
|
||||
int32 _meiTalkPos3 = 0;
|
||||
int32 _meiTrekTalkerSeries = 0;
|
||||
int32 _ripHeadTurnPos3 = 0;
|
||||
int32 _ripLookDownPos3 = 0;
|
||||
int32 _ripLooksUpSeries = 0;
|
||||
int32 _ripLowReachPos2 = 0;
|
||||
int32 _ripMedHiReachPos2 = 0;
|
||||
int32 _ripMedHiReachPos3 = 0;
|
||||
int32 _ripPos3LookAround = 0;
|
||||
int32 _ripSiftsDirtSeries = 0;
|
||||
int32 _ripTalkerPos3 = 0;
|
||||
|
||||
bool _unkFlag1 = false;
|
||||
|
||||
machine *_chariotRestMach = nullptr;
|
||||
machine *_fallenBeamOnFloorMach = nullptr;
|
||||
machine *_farSoldiersShieldMach = nullptr;
|
||||
machine *_jadeDoorsOpenMach = nullptr;
|
||||
machine *_mcMach = nullptr;
|
||||
machine *_nearSoldiersShieldMach = nullptr;
|
||||
machine *_ripChariotInMach = nullptr;
|
||||
machine *_ripSiftsDirtMach = nullptr;
|
||||
|
||||
void initSub2();
|
||||
void initHotspots();
|
||||
void daemonSub1();
|
||||
void daemonSub2(const char *seriesName1, const char *seriesName2);
|
||||
void daemonSub3(const char *seriesName1, const char *seriesName2);
|
||||
void daemonSub4(const char *seriesName1);
|
||||
void parserSub1(const char *name, uint channel, int32 vol, int32 trigger, int32 room_num);
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
1594
engines/m4/riddle/rooms/section8/room806.cpp
Normal file
1594
engines/m4/riddle/rooms/section8/room806.cpp
Normal file
File diff suppressed because it is too large
Load Diff
80
engines/m4/riddle/rooms/section8/room806.h
Normal file
80
engines/m4/riddle/rooms/section8/room806.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* 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_SECTION8_ROOM806_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM806_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room806 : public Room {
|
||||
public:
|
||||
Room806() : Room() {}
|
||||
~Room806() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
int32 _unkVar1 = 0;
|
||||
int32 _unkVar2 = 0;
|
||||
int32 _unkVar3 = 0;
|
||||
int32 _unkVar4 = 0;
|
||||
int32 _unkVar5 = 0;
|
||||
|
||||
int32 _806mc01Series = 0;
|
||||
int32 _806mc02Series = 0;
|
||||
int32 _806rp01Series = 0;
|
||||
int32 _806rp02Series = 0;
|
||||
int32 _806rp03Series = 0;
|
||||
int32 _meiTalkPos3Series = 0;
|
||||
int32 _meiTrekHandsOnHipsPos3Series = 0;
|
||||
int32 _meiTrekHeadTurnPos3Series = 0;
|
||||
int32 _ripHighReacherPos2Series = 0;
|
||||
int32 _ripKneelAndExamineWallSeries = 0;
|
||||
int32 _ripLookUpPos3Series = 0;
|
||||
int32 _ripMedHighReacherPos2Series = 0;
|
||||
int32 _ripPos3LookAroundSeries = 0;
|
||||
int32 _ripTrekHandTalkPos3Series = 0;
|
||||
int32 _ripTrekHeadTurnPos3Series = 0;
|
||||
int32 _ripTrekLookDownPos3Series = 0;
|
||||
int32 _ripTrekTalkerPos3Series = 0;
|
||||
|
||||
machine *_806CrankMach = nullptr;
|
||||
machine *_806ChartMach = nullptr;
|
||||
machine *_806mc01Mach = nullptr;
|
||||
machine *_806rp01Mach = nullptr;
|
||||
machine *_candlemanShadow3Mach = nullptr;
|
||||
machine *_mcTrekMach = nullptr;
|
||||
machine *_safariShadow3Mach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
1210
engines/m4/riddle/rooms/section8/room807.cpp
Normal file
1210
engines/m4/riddle/rooms/section8/room807.cpp
Normal file
File diff suppressed because it is too large
Load Diff
70
engines/m4/riddle/rooms/section8/room807.h
Normal file
70
engines/m4/riddle/rooms/section8/room807.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/* 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_SECTION8_ROOM807_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM807_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room807 : public Section8Room {
|
||||
public:
|
||||
Room807() : Section8Room() {}
|
||||
~Room807() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
int32 _807newFacing = 0;
|
||||
int32 _dword1A194C = 0;
|
||||
int32 _dword1A1954 = 0;
|
||||
|
||||
int32 _field34 = 0;
|
||||
int32 _field38 = 0;
|
||||
|
||||
int32 _mctd82aSeries = 0;
|
||||
int32 _ripLooksAroundInAweSeries = 0;
|
||||
int32 _ripLowReachPos1Series = 0;
|
||||
int32 _ripPos3LookAroundSeries = 0;
|
||||
int32 _ripTalkerPos5Series = 0;
|
||||
int32 _ripTrekHiReach2HndSeries = 0;
|
||||
|
||||
machine *_807BeamMach = nullptr;
|
||||
machine *_807Crnk2Mach = nullptr;
|
||||
machine *_807DoorMach = nullptr;
|
||||
machine *_807Mc01Mach = nullptr;
|
||||
machine *_807PostMach = nullptr;
|
||||
machine *_mcTrekMach = nullptr;
|
||||
machine *_safariShadowMach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
2029
engines/m4/riddle/rooms/section8/room808.cpp
Normal file
2029
engines/m4/riddle/rooms/section8/room808.cpp
Normal file
File diff suppressed because it is too large
Load Diff
84
engines/m4/riddle/rooms/section8/room808.h
Normal file
84
engines/m4/riddle/rooms/section8/room808.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/* 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_SECTION8_ROOM808_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM808_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room808 : public Section8Room {
|
||||
public:
|
||||
Room808() : Section8Room() {}
|
||||
~Room808() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
|
||||
private:
|
||||
void addMcHotspot(int32 val1);
|
||||
bool getWalkPath(machine *machine, int32 walk_x, int32 walk_y);
|
||||
void setBridgeHotspots(int val1, bool activeFl);
|
||||
void setPosMachInfo();
|
||||
|
||||
int32 _dword1A195C_facing = 0;
|
||||
int32 _dword1A1958 = 0;
|
||||
int32 _dword1A1960_rand4 = 0;
|
||||
int32 _dword1A1964_facing = 0;
|
||||
|
||||
const char *_posMachName = nullptr;
|
||||
int32 _posMachFrameNum = 0;
|
||||
int32 _posMachIndex = 0;
|
||||
|
||||
int32 _807Rp04Series = 0;
|
||||
int32 _808McupSeries = 0;
|
||||
int32 _808Rp01Series = 0;
|
||||
int32 _808Rp02Series = 0;
|
||||
int32 _808RpupSeries = 0;
|
||||
int32 _mctd61Series = 0;
|
||||
int32 _mctd82aSeries = 0;
|
||||
int32 _meiChenHandsBehindBackSeries = 0;
|
||||
int32 _ripLooksAroundInAweSeries = 0;
|
||||
int32 _ripMedReach1HandPos2Series = 0;
|
||||
int32 _ripPos3LookAroundSeries = 0;
|
||||
int32 _ripTalkerPos5Series = 0;
|
||||
int32 _rptmr15Series = 0;
|
||||
|
||||
machine *_808ChainMach = nullptr;
|
||||
machine *_808HandleSpriteMach = nullptr;
|
||||
machine *_808PosMach = nullptr;
|
||||
machine *_808RipFallShovelNearSideMach = nullptr;
|
||||
machine *_mcTrekMach = nullptr;
|
||||
machine *_safariShadowMach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
963
engines/m4/riddle/rooms/section8/room809.cpp
Normal file
963
engines/m4/riddle/rooms/section8/room809.cpp
Normal file
@@ -0,0 +1,963 @@
|
||||
/* 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/section8/room809.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/riddle.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room809::preload() {
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
}
|
||||
|
||||
void Room809::init() {
|
||||
if (_G(game).previous_room == KERNEL_RESTORING_GAME || _G(flags)[V263])
|
||||
digi_preload("950_s29", -1);
|
||||
|
||||
_field20Fl = false;
|
||||
ws_walk_load_shadow_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1);
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2, false);
|
||||
_mcHandsBehindBackSeries = series_load("MEI CHIEN HANDS BEHIND BACK", -1, nullptr);
|
||||
_ripTalkerPos5Series = series_load("RIP TALKER POS 5", -1, nullptr);
|
||||
|
||||
if (_G(game).previous_room != KERNEL_RESTORING_GAME) {
|
||||
_ripTrekHeadTurnPos5Series = series_load("RIP TREK HEAD TURN POS5", -1, nullptr);
|
||||
}
|
||||
|
||||
series_play("809fir1a", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir1b", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir1c", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir1d", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir1e", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir1f", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir1g", 0, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir2a", 0, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir2b", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir2c", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir2d", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir2e", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir2f", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir2g", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir3a", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir3b", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("809fir3c", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
|
||||
if (_G(game).previous_room == KERNEL_RESTORING_GAME) {
|
||||
player_set_commands_allowed(true);
|
||||
series_unload(S8_SHADOW_DIRS2[3]);
|
||||
series_unload(S8_SHADOW_DIRS2[4]);
|
||||
series_unload(S8_SHADOW_DIRS1[3]);
|
||||
series_unload(S8_SHADOW_DIRS1[4]);
|
||||
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1,
|
||||
_mcPosX, 317, _mcFacing, Walker::player_walker_callback, "mc_trek");
|
||||
setGlobals3(_mcHandsBehindBackSeries, 1, 17);
|
||||
sendWSMessage_3840000(_mcTrekMach, 38);
|
||||
_enableHotspotName = "MEI CHEN ";
|
||||
_byte1A1990[_field24_index] = 0;
|
||||
|
||||
kernel_timing_trigger(60, 36, "verify mc's position");
|
||||
if (inv_object_in_scene("two soldiers' shields", 809)) {
|
||||
ws_hide_walker(_G(my_walker));
|
||||
_809rp01Mach = series_show("809rp01", 256, 0, -1, -1, 179, 100, 0, 0);
|
||||
_G(kernel).trigger_mode = KT_PARSE;
|
||||
kernel_timing_trigger(400, 51, nullptr);
|
||||
_G(kernel).trigger_mode = KT_PREPARSE;
|
||||
}
|
||||
|
||||
digi_play_loop("950_s29", 3, 48, -1, -1);
|
||||
|
||||
} else {
|
||||
player_set_commands_allowed(false);
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), 90, 317);
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 70, 317, 3, Walker::player_walker_callback, "mc_trek");
|
||||
|
||||
_field24_index = 0;
|
||||
_mcPosX = 160;
|
||||
|
||||
if (_G(flags)[V263] == 0) {
|
||||
_G(flags)[V263] = 1;
|
||||
|
||||
moveScreen(1280, 0);
|
||||
_G(camera_reacts_to_player) = false;
|
||||
kernel_timing_trigger(600, 3, "cutscene pan");
|
||||
series_unload(S8_SHADOW_DIRS2[0]);
|
||||
series_unload(S8_SHADOW_DIRS2[1]);
|
||||
series_unload(S8_SHADOW_DIRS2[3]);
|
||||
series_unload(S8_SHADOW_DIRS2[4]);
|
||||
series_unload(S8_SHADOW_DIRS1[0]);
|
||||
series_unload(S8_SHADOW_DIRS1[1]);
|
||||
series_unload(S8_SHADOW_DIRS1[3]);
|
||||
series_unload(S8_SHADOW_DIRS1[4]);
|
||||
|
||||
digi_preload("809m01");
|
||||
digi_preload("809r01");
|
||||
digi_preload("809_s01");
|
||||
|
||||
_809hallSeries = series_load("809hall", -1, nullptr);
|
||||
digi_play("lostcity", 3, 255, -1, 809);
|
||||
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 150, 315, nullptr, 0, 3, true);
|
||||
DisposePath(_mcTrekMach->walkPath);
|
||||
_mcTrekMach->walkPath = CreateCustomPath(106, 318, 160, 323, -1);
|
||||
ws_custom_walk(_mcTrekMach, 3, 2, true);
|
||||
digi_play_loop("950_s29", 3, 48, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Room809::pre_parser() {
|
||||
if (player_said("look at", "gate")) {
|
||||
_playerFacing = 9;
|
||||
} else if (player_said("look at", "mausoleum") || player_said("go", "west")) {
|
||||
_playerFacing = 3;
|
||||
} else if (player_said("look at", "urn")) {
|
||||
_playerFacing = -1;
|
||||
} else {
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
_playerFacing = _G(player_info).x >= _G(player).click_x ? 9 : 3;
|
||||
}
|
||||
|
||||
if (!player_said("spleen") || inv_object_in_scene("two soldiers' shields", 809)) {
|
||||
_G(player).resetWalk();
|
||||
}
|
||||
}
|
||||
|
||||
void Room809::parser() {
|
||||
_G(player).command_ready = false;
|
||||
if (inv_player_has(_G(player).noun)) {
|
||||
_G(player).command_ready = true;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
if (checkSaid()) {
|
||||
int32 destX;
|
||||
int32 destY;
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
if (_G(player_info).x >= _G(player).click_x) {
|
||||
destX = imath_min(_G(player_info).x, _G(player).click_x + 20);
|
||||
destX = imath_max(destX, 145);
|
||||
if (_G(player).click_y < 315) {
|
||||
if (_playerFacing < 0)
|
||||
_playerFacing = 11;
|
||||
destY = 315;
|
||||
} else if (_G(player).click_y <= 321) {
|
||||
destY = _G(player).click_y;
|
||||
} else {
|
||||
if (_playerFacing < 0)
|
||||
_playerFacing = 7;
|
||||
|
||||
destY = 321;
|
||||
}
|
||||
} else {
|
||||
if (_G(player).click_x >= 1340)
|
||||
destX = 1349;
|
||||
else
|
||||
destX = imath_max(_G(player_info).x, _G(player).click_x - 20);
|
||||
|
||||
if (_G(player).click_y < 315) {
|
||||
if (_playerFacing < 0)
|
||||
_playerFacing = 1;
|
||||
destY = 315;
|
||||
} else if (_G(player).click_y <= 321)
|
||||
destY = _G(player).click_y;
|
||||
else {
|
||||
if (_playerFacing < 0)
|
||||
_playerFacing = 5;
|
||||
|
||||
destY = 321;
|
||||
}
|
||||
}
|
||||
ws_walk(_G(my_walker), destX, destY, nullptr, 1, _playerFacing, true);
|
||||
} else {
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(1));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 1: {
|
||||
player_update_info();
|
||||
if (_G(player_info).x >= 1340 && -_G(game_buff_ptr)->x1 < 1259) {
|
||||
g_engine->camera_shift_xy(1259, 0);
|
||||
}
|
||||
|
||||
int32 opcode = -1;
|
||||
|
||||
if (player_said_any("look", "look at"))
|
||||
opcode = 1;
|
||||
else if (player_said_any("gear", "use"))
|
||||
opcode = 0;
|
||||
else if (player_said("take"))
|
||||
opcode = 2;
|
||||
else if (player_said("talk to"))
|
||||
opcode = 3;
|
||||
else if (player_said_any("walk to", "walk", "spleen"))
|
||||
opcode = 5;
|
||||
else if (player_said("journal"))
|
||||
opcode = 4;
|
||||
else if (player_said("go"))
|
||||
opcode = 6;
|
||||
|
||||
switch (opcode) {
|
||||
case 1:
|
||||
if (player_said(" ")) {
|
||||
digi_play("809r02", 1, 255, -1, -1);
|
||||
} else if (player_said("mountains")) {
|
||||
digi_play("809r34", 1, 255, -1, -1);
|
||||
} else if (player_said("diorama")) {
|
||||
digi_play("809r02", 1, 255, -1, -1);
|
||||
} else if (player_said("lake")) {
|
||||
digi_play("809r03", 1, 255, -1, -1);
|
||||
} else if (player_said("mausoleum")) {
|
||||
digi_play("809r04", 1, 255, -1, -1);
|
||||
} else if (player_said("river")) {
|
||||
digi_play("809r05", 1, 255, -1, -1);
|
||||
} else if (player_said("buildings")) {
|
||||
digi_play("809r06", 1, 255, -1, -1);
|
||||
} else if (player_said("dragon head")) {
|
||||
digi_play("809r07", 1, 255, _G(flags[V101]) ? 39 : -1, -1);
|
||||
} else if (player_said("soldier ")) {
|
||||
digi_play("809r08", 1, 255, -1, -1);
|
||||
} else if (player_said("lit urn")) {
|
||||
digi_play("com060", 1, 255, -1, 997);
|
||||
} else if (player_said("unlit urn")) {
|
||||
digi_play("com061", 1, 255, -1, 997);
|
||||
} else if (player_said("urn")) {
|
||||
digi_play("809r33", 1, 255, -1, -1);
|
||||
} else if (player_said("weir")) {
|
||||
digi_play("809r10", 1, 255, -1, -1);
|
||||
} else if (player_said("gate")) {
|
||||
digi_play("809r09", 1, 255, -1, -1);
|
||||
} else if (player_said_any("mei chen", "mei chen ", "mei chen ") || (player_said("mei chen ") && !inv_object_in_scene("two soldiers' shields", 809))) {
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(40));
|
||||
} else if (player_said("mei chen ")) {
|
||||
digi_play("809r11", 1, 255, -1, -1);
|
||||
} else {
|
||||
_G(player).command_ready = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
_G(player).command_ready = true;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (inv_object_in_scene("two soldiers' shields", 809)) {
|
||||
player_set_commands_allowed(false);
|
||||
inv_give_to_player("two soldiers' shields");
|
||||
terminateMachine(_809rp01Mach);
|
||||
_809rp01Mach = series_play("809rp01", 256, 18, 52, 5, 0, 100, 0, 0, 0, -1);
|
||||
} else {
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
_playerDestX = _G(player_info).x;
|
||||
_playerDestY = _G(player_info).y;
|
||||
|
||||
player_update_info(_mcTrekMach, &_G(player_info));
|
||||
|
||||
if (_playerDestX <= _G(player_info).x) {
|
||||
if (_G(player_info).x - 15 <= _playerDestX) {
|
||||
ws_walk(_G(my_walker), _playerDestX, _playerDestY, nullptr, 42, 5, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), _G(player_info).x - 15, 315, nullptr, 42, 5, true);
|
||||
}
|
||||
} else if (_G(player_info).x + 15 >= _playerDestX) {
|
||||
ws_walk(_G(my_walker), _playerDestX, _playerDestY, nullptr, 42, 7, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), _G(player_info).x + 15, 315, nullptr, 42, 7, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
digi_play("809r32", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (inv_object_in_scene("two soldiers' shields", 809)) {
|
||||
player_set_commands_allowed(false);
|
||||
inv_give_to_player("two soldiers' shields");
|
||||
terminateMachine(_809rp01Mach);
|
||||
_809rp01Mach = series_plain_play("809rp01", 1, 2, 100, 0, 5, 52, true);
|
||||
}
|
||||
|
||||
break;
|
||||
case 6:
|
||||
if (player_said("east")) {
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(53));
|
||||
} else if (player_said("west")) {
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(65));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
if (player_said("lake") && inv_player_has(_G(player).verb)) {
|
||||
if (player_said("soldier's shield")) {
|
||||
digi_play("809r18", 1, 255, -1, -1);
|
||||
} else if (player_said("two soldiers' shields")) {
|
||||
ws_walk(_G(my_walker), 1346, 318, nullptr, 48, 3, true);
|
||||
} else if (player_said("farmer's shovel")) {
|
||||
ws_walk(_G(my_walker), 1346, 318, nullptr, 44, 3, true);
|
||||
} else {
|
||||
digi_play("809r16", 1, 255, -1, -1);
|
||||
}
|
||||
} else if (player_said_any("mei chen", "mei chen ", "mei chen ", "mei chen ") && inv_player_has(_G(player).verb)) {
|
||||
digi_play("com017", 1, 255, -1, 997);
|
||||
} else {
|
||||
_G(player).command_ready = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case 39:
|
||||
_G(flags[V101]) = 1;
|
||||
digi_play("809r07a", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 40:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
_playerFacing = _G(player_info).facing;
|
||||
_playerDestX = _G(player_info).x;
|
||||
_playerDestY = _G(player_info).y;
|
||||
|
||||
player_update_info(_mcTrekMach, &_G(player_info));
|
||||
|
||||
if (_G(player_info).x >= _playerDestX) {
|
||||
if (_G(player_info).x - _playerDestX <= 30) {
|
||||
ws_walk(_G(my_walker), _playerDestX, _playerDestY, nullptr, 41, 5, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), _playerDestX, _playerDestY, nullptr, 41, 4, true);
|
||||
}
|
||||
} else if (_playerDestX - _G(player_info).x <= 30) {
|
||||
ws_walk(_G(my_walker), _playerDestX, _playerDestY, nullptr, 41, 7, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), _playerDestX, _playerDestY, nullptr, 41, 8, true);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 41:
|
||||
digi_play("809r11", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 42:
|
||||
player_set_commands_allowed(false);
|
||||
setGlobals1(_ripTalkerPos5Series, 1, 4, 1, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0);
|
||||
sendWSMessage_110000(_G(my_walker), -1);
|
||||
switch (imath_ranged_rand(1, 4)) {
|
||||
case 1:
|
||||
digi_play("com034", 1, 255, 43, 997);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
digi_play("com035", 1, 255, 43, 997);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
digi_play("com036", 1, 255, 43, 997);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
default:
|
||||
digi_play("com037", 1, 255, 43, 997);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 43:
|
||||
player_set_commands_allowed(true);
|
||||
sendWSMessage_150000(_G(my_walker), -1);
|
||||
switch (imath_ranged_rand(1, 4)) {
|
||||
case 1:
|
||||
digi_play("com038", 1, 255, -1, 997);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
digi_play("com039", 1, 255, -1, 997);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
digi_play("com040", 1, 255, -1, 997);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
default:
|
||||
digi_play("com041", 1, 255, -1, 997);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 44:
|
||||
player_set_commands_allowed(false);
|
||||
_G(flags[V103]) = 1;
|
||||
if (-_G(game_buff_ptr)->x1 < 1259) {
|
||||
g_engine->camera_shift_xy(1259, 0);
|
||||
}
|
||||
|
||||
ws_hide_walker(_G(my_walker));
|
||||
_809hallSeries = series_load("809rp03", -1, nullptr);
|
||||
series_play("809rp03", 0, 0, 45, 5, 0, 100, 0, 0, 0, 104);
|
||||
|
||||
break;
|
||||
|
||||
case 45:
|
||||
series_play("809rp03", 0, 0, 46, 5, 0, 100, 0, 0, 105, -1);
|
||||
digi_play("809_s02", 2, 255, -1, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 46:
|
||||
series_play("809rp03", 0, 2, 47, 5, 0, 100, 0, 0, 0, -1);
|
||||
digi_play("809R17", 1, 255, -1, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 47:
|
||||
player_set_commands_allowed(true);
|
||||
series_unload(_809hallSeries);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
|
||||
break;
|
||||
|
||||
case 48:
|
||||
player_set_commands_allowed(false);
|
||||
if (-_G(game_buff_ptr)->x1 < 1259) {
|
||||
g_engine->camera_shift_xy(1259, 0);
|
||||
}
|
||||
|
||||
ws_hide_walker(_G(my_walker));
|
||||
series_play("809rp01", 256, 0, 49, 5, 0, 100, 0, 0, 0, 169);
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 49:
|
||||
_809rp01Mach = series_play("809rp01", 256, 16, 50, 5, 0, 100, 0, 0, 170, -1);
|
||||
digi_play("809_s06", 2, 255, -1, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
player_set_commands_allowed(true);
|
||||
inv_move_object("two soldiers' shields", 809);
|
||||
kernel_timing_trigger(imath_ranged_rand(360, 540), 51, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 51:
|
||||
if (!_field20Fl && inv_object_in_scene("two soldiers' shields", 809)) {
|
||||
terminateMachine(_809rp01Mach);
|
||||
_809rp01Mach = series_play("809shufl", 0, 17, -1, 7, 1, 100, 0, 0, 0, -1);
|
||||
digi_play("809_s03", 2, 255, -1, -1);
|
||||
kernel_timing_trigger(imath_ranged_rand(360, 540), 51, nullptr);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 52:
|
||||
player_set_commands_allowed(true);
|
||||
terminateMachine(_809rp01Mach);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), 1346, 318);
|
||||
// The load is just used to get the SeriesId if already loaded, to unload it. So it's normal there's a load and unload one after the other, so not remove.
|
||||
_809hallSeries = series_load("809rp01", -1, nullptr);
|
||||
series_unload(_809hallSeries);
|
||||
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(1));
|
||||
|
||||
break;
|
||||
|
||||
case 53:
|
||||
player_set_commands_allowed(false);
|
||||
player_update_info(_mcTrekMach, &_G(player_info));
|
||||
if (_G(player_info).x < 1265) {
|
||||
kernel_timing_trigger(30, 53, nullptr);
|
||||
} else if (inv_object_in_scene("two soldiers' shields", 809)) {
|
||||
_field20Fl = true;
|
||||
series_unload(0);
|
||||
series_unload(1);
|
||||
series_unload(3);
|
||||
series_unload(4);
|
||||
|
||||
digi_preload("809_s04", -1);
|
||||
digi_preload("809m05", -1);
|
||||
digi_preload("809r19", -1);
|
||||
digi_preload("809_s05", -1);
|
||||
|
||||
// The load is just used to get the SeriesId if already loaded, to unload it. So it's normal there's a load and unload one after the other, so not remove.
|
||||
_809hallSeries = series_load("809rp01", -1, nullptr);
|
||||
series_unload(_809hallSeries);
|
||||
_809hallSeries = series_load("809shufl", -1, nullptr);
|
||||
series_unload(_809hallSeries);
|
||||
|
||||
terminateMachine(_809rp01Mach);
|
||||
_809crossMach = series_stream("809cross", 5, 0, 56);
|
||||
series_stream_break_on_frame(_809crossMach, 119, 55);
|
||||
digi_play("809_s04", 2, 255, -1, -1);
|
||||
digi_play("809M05", 1, 255, 54, -1);
|
||||
} else if (_G(flags[V102])) {
|
||||
digi_play("809M02", 1, 255, 64, -1);
|
||||
} else {
|
||||
_G(flags[V102]) = 1;
|
||||
if (_G(flags[V103])) {
|
||||
digi_play("809M02", 1, 255, 61, -1);
|
||||
} else {
|
||||
digi_play("809M02", 1, 255, 59, -1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 54:
|
||||
digi_play("809r19", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 55:
|
||||
digi_play("809_s05", 2, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 56:
|
||||
_809crossMach = series_stream("809exit", 5, 0, -1);
|
||||
series_stream_break_on_frame(_809crossMach, 49, 57);
|
||||
|
||||
break;
|
||||
|
||||
case 57:
|
||||
disable_player_commands_and_fade_init(58);
|
||||
break;
|
||||
|
||||
case 58:
|
||||
_G(game).setRoom(810);
|
||||
break;
|
||||
|
||||
case 59:
|
||||
digi_play("809m04", 1, 255, 60, -1);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
player_set_commands_allowed(true);
|
||||
digi_play("809r14", 1, 255, 63, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 61:
|
||||
digi_play("809m03", 1, 255, 62, -1);
|
||||
break;
|
||||
|
||||
case 62:
|
||||
player_set_commands_allowed(true);
|
||||
digi_play("809r12", 1, 255, 63, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 63:
|
||||
player_set_commands_allowed(true);
|
||||
digi_play("809r13", 1, 255, -1, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 64:
|
||||
player_set_commands_allowed(true);
|
||||
digi_play("809r15", 1, 255, -1, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 65:
|
||||
ws_walk(_G(my_walker), 120, 317, nullptr, 66, -1, false);
|
||||
break;
|
||||
|
||||
case 66:
|
||||
ws_walk(_G(my_walker), 90, 317, nullptr, -1, 9, true);
|
||||
disable_player_commands_and_fade_init(67);
|
||||
|
||||
break;
|
||||
|
||||
case 67:
|
||||
_G(game).setRoom(808);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Room809::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 2:
|
||||
player_set_commands_allowed(true);
|
||||
series_unload(S8_SHADOW_DIRS2[3]);
|
||||
series_unload(S8_SHADOW_DIRS2[4]);
|
||||
series_unload(S8_SHADOW_DIRS1[3]);
|
||||
series_unload(S8_SHADOW_DIRS1[4]);
|
||||
|
||||
setGlobals3(_mcHandsBehindBackSeries, 1, 17);
|
||||
sendWSMessage_3840000(_mcTrekMach, 38);
|
||||
kernel_timing_trigger(60, 36, "verify mc's position");
|
||||
_enableHotspotName = "MEI CHEN";
|
||||
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
g_engine->adv_camera_pan_step(2);
|
||||
g_engine->camera_shift_xy(0, 0);
|
||||
kernel_timing_trigger(60, 4, "finished pan?");
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (g_engine->game_camera_panning())
|
||||
kernel_timing_trigger(60, 4, "finished pan?");
|
||||
else
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(5));
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
ws_walk(_G(my_walker), 150, 315, nullptr, -1, 3, true);
|
||||
DisposePath(_mcTrekMach->walkPath);
|
||||
_mcTrekMach->walkPath = CreateCustomPath(106, 318, 160, 323, -1);
|
||||
ws_custom_walk(_mcTrekMach, 3, 6, true);
|
||||
_G(camera_reacts_to_player) = true;
|
||||
g_engine->adv_camera_pan_step(10);
|
||||
_809MusicFadingVol = 255;
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (_809MusicFadingVol <= 100) {
|
||||
kernel_trigger_dispatchx(kernel_trigger_create(7));
|
||||
} else {
|
||||
_809MusicFadingVol = imath_max(100, _809MusicFadingVol - 10);
|
||||
digi_change_panning(3, _809MusicFadingVol);
|
||||
kernel_timing_trigger(10, 6, "fade music");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
kernel_timing_trigger(120, 8, nullptr);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
digi_play("809_s01", 1, 120, -1, -1);
|
||||
kernel_timing_trigger(45, 9, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, 10, 4, true);
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
kernel_timing_trigger(7, 11, nullptr);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, 12, 5, true);
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
kernel_timing_trigger(7, 13, nullptr);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, 14, 6, true);
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
kernel_timing_trigger(7, 15, nullptr);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, 16, 7, true);
|
||||
|
||||
break;
|
||||
|
||||
case 16:
|
||||
kernel_timing_trigger(7, 17, nullptr);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, 18, 8, true);
|
||||
|
||||
break;
|
||||
|
||||
case 18:
|
||||
kernel_timing_trigger(7, 19, nullptr);
|
||||
break;
|
||||
|
||||
case 19:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, 20, 9, true);
|
||||
|
||||
break;
|
||||
|
||||
case 20:
|
||||
kernel_timing_trigger(60, 21, nullptr);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
_809hallMach = series_play("809hall", 0, 16, -1, 5, 0, 100, 0, 0, 0, -1);
|
||||
kernel_timing_trigger(300, 22, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 22:
|
||||
terminateMachine(_809hallMach);
|
||||
_809hallMach = series_play("809hall", 0, 2, 23, 5, 0, 100, 0, 0, 0, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 23:
|
||||
series_unload(_809hallSeries);
|
||||
kernel_timing_trigger(30, 24, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 24:
|
||||
digi_play("809m01", 1, 255, 29, -1);
|
||||
kernel_timing_trigger(90, 25, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 25:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, -1, 8, true);
|
||||
kernel_timing_trigger(7, 26, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 26:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, -1, 7, true);
|
||||
kernel_timing_trigger(7, 27, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 27:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x, _G(player_info).y, nullptr, -1, 6, true);
|
||||
kernel_timing_trigger(7, 28, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 28:
|
||||
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 29:
|
||||
setGlobals1(_ripTalkerPos5Series, 1, 4, 1, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
sendWSMessage_110000(_G(my_walker), -1);
|
||||
digi_play("809r01", 1, 255, 30, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 30:
|
||||
sendWSMessage_150000(_G(my_walker), -1);
|
||||
setGlobals3(_ripTrekHeadTurnPos5Series, 8, 12);
|
||||
sendWSMessage_3840000(_G(my_walker), -1);
|
||||
kernel_timing_trigger(120, 31, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 31:
|
||||
setGlobals3(_ripTrekHeadTurnPos5Series, 12, 8);
|
||||
sendWSMessage_3840000(_G(my_walker), 32);
|
||||
|
||||
break;
|
||||
|
||||
case 32:
|
||||
player_update_info(_G(my_walker), &_G(player_info));
|
||||
ws_walk(_G(my_walker), _G(player_info).x + 30, _G(player_info).y, nullptr, 34, 3, true);
|
||||
series_unload(_ripTrekHeadTurnPos5Series);
|
||||
|
||||
break;
|
||||
|
||||
case 34:
|
||||
setGlobals3(_mcHandsBehindBackSeries, 1, 17);
|
||||
sendWSMessage_3840000(_mcTrekMach, 38);
|
||||
kernel_timing_trigger(60, 36, "verify mc's position");
|
||||
_enableHotspotName = "MEI CHEN";
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
kernel_timing_trigger(1, 35, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 35:
|
||||
if (_809MusicFadingVol <= 0) {
|
||||
digi_stop(3);
|
||||
digi_unload("809m01");
|
||||
digi_unload("809r01");
|
||||
digi_unload("809_s01");
|
||||
|
||||
digi_play_loop("950_s29", 3, 48, -1, -1);
|
||||
series_load(S8_SHADOW_NAMES2[0], S8_SHADOW_DIRS2[0] , nullptr);
|
||||
series_load(S8_SHADOW_NAMES2[1], S8_SHADOW_DIRS2[1], nullptr);
|
||||
series_load(S8_SHADOW_NAMES1[0], S8_SHADOW_DIRS1[0], nullptr);
|
||||
series_load(S8_SHADOW_NAMES1[1], S8_SHADOW_DIRS1[1], nullptr);
|
||||
player_set_commands_allowed(true);
|
||||
} else {
|
||||
--_809MusicFadingVol;
|
||||
digi_change_panning(3, _809MusicFadingVol);
|
||||
kernel_timing_trigger(1, 35, "fade music");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 36:
|
||||
player_update_info(_mcTrekMach, &_G(player_info));
|
||||
|
||||
if (-_G(game_buff_ptr)->x1 < _G(player_info).x) {
|
||||
if (639 - _G(game_buff_ptr)->x1 <= _G(player_info).x) {
|
||||
_mcTrekDestX = getMcDestX(_G(player_info).x, true);
|
||||
if (669 - _G(game_buff_ptr)->x1 < _G(player_info).x) {
|
||||
ws_demand_facing(_mcTrekMach, 11);
|
||||
ws_demand_location(_mcTrekMach, 669 - _G(game_buff_ptr)->x1, 323);
|
||||
}
|
||||
|
||||
ws_walk(_mcTrekMach, _mcTrekDestX, 323, nullptr, 37, 11, true);
|
||||
}
|
||||
} else {
|
||||
_mcTrekDestX = getMcDestX(_G(player_info).x, false);
|
||||
if (-30 - _G(game_buff_ptr)->x1 > _G(player_info).x) {
|
||||
ws_demand_facing(_mcTrekMach, 1);
|
||||
ws_demand_location(_mcTrekMach, -30 - _G(game_buff_ptr)->x1, 323);
|
||||
}
|
||||
|
||||
ws_walk(_mcTrekMach, _mcTrekDestX, 323, nullptr, 37, 1, true);
|
||||
}
|
||||
|
||||
kernel_timing_trigger(60, 36, "verify mc's position");
|
||||
|
||||
break;
|
||||
|
||||
case 37:
|
||||
setGlobals3(_mcHandsBehindBackSeries, 1, 17);
|
||||
sendWSMessage_3840000(_mcTrekMach, 38);
|
||||
|
||||
break;
|
||||
|
||||
case 38:
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, _enableHotspotName, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Room809::syncGame(Common::Serializer &s) {
|
||||
s.syncAsSint32LE(_mcPosX);
|
||||
s.syncAsSint32LE(_mcFacing);
|
||||
s.syncAsSint32LE(_mcTrekDestX);
|
||||
s.syncAsSint32LE(_playerDestX);
|
||||
s.syncAsSint32LE(_playerDestY);
|
||||
s.syncAsSint32LE(_playerFacing);
|
||||
}
|
||||
|
||||
int32 Room809::getMcDestX(int32 xPos, bool facing) {
|
||||
static const uint16 X_THRESHOLDS1[3] = { 540, 960, 1282 };
|
||||
static const uint16 X_THRESHOLDS2[4] = { 0x7fff, 160, 540, 960 };
|
||||
static const uint16 X_DESTS[5] = { 160, 540, 960, 1282 };
|
||||
int32 index;
|
||||
|
||||
if (facing) {
|
||||
index = 0;
|
||||
for (; index < 3; ++index) {
|
||||
if (xPos <= X_THRESHOLDS1[index])
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
index = 3;
|
||||
for (; index > 0; --index) {
|
||||
if (xPos > X_THRESHOLDS2[index])
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
_enableHotspotName = "MEI CHEN ";
|
||||
_byte1A1990[index] = 0;
|
||||
_field24_index = index;
|
||||
_mcPosX = X_DESTS[index];
|
||||
_mcFacing = facing ? 11 : 1;
|
||||
|
||||
return _mcPosX;
|
||||
}
|
||||
|
||||
bool Room809::checkSaid() {
|
||||
if (player_said_any("spleen", "west", "mei chen", "mei chen ",
|
||||
"mei chen ", "mei chen ", "farmer's shovel",
|
||||
"two soldiers' shields")
|
||||
|| inv_object_in_scene("two soldiers' shields", 809))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
79
engines/m4/riddle/rooms/section8/room809.h
Normal file
79
engines/m4/riddle/rooms/section8/room809.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* 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_SECTION8_ROOM809_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM809_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room809 : public Section8Room {
|
||||
public:
|
||||
Room809() : Section8Room() {}
|
||||
~Room809() 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 checkSaid();
|
||||
int32 getMcDestX(int32 xPos, bool facing);
|
||||
|
||||
bool _field20Fl = false;
|
||||
|
||||
// CHECKME: The array and its index don't seem to be used
|
||||
byte _byte1A1990[4] = {0, 0, 0, 0};
|
||||
int32 _field24_index = 0;
|
||||
|
||||
const char *_enableHotspotName = nullptr;
|
||||
|
||||
int32 _mcFacing = 0;
|
||||
int32 _mcPosX = 0;
|
||||
int32 _mcTrekDestX = 0;
|
||||
int32 _playerDestX = 0;
|
||||
int32 _playerDestY = 0;
|
||||
int32 _playerFacing = 0;
|
||||
|
||||
int32 _809hallSeries = 0;
|
||||
int32 _809MusicFadingVol = 0;
|
||||
int32 _mcHandsBehindBackSeries = 0;
|
||||
int32 _ripTalkerPos5Series = 0;
|
||||
int32 _ripTrekHeadTurnPos5Series = 0;
|
||||
|
||||
machine *_809crossMach = nullptr;
|
||||
machine *_809hallMach = nullptr;
|
||||
machine *_809rp01Mach = nullptr;
|
||||
machine *_mcTrekMach = nullptr;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
306
engines/m4/riddle/rooms/section8/room810.cpp
Normal file
306
engines/m4/riddle/rooms/section8/room810.cpp
Normal file
@@ -0,0 +1,306 @@
|
||||
/* 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/section8/room810.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
static const char *LOOK[][2] = {
|
||||
{"sarcophagus", "810r03"},
|
||||
{"grate", "810r05"},
|
||||
{"large urn", "810r18"},
|
||||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
void Room810::preload() {
|
||||
LoadWSAssets("OTHER SCRIPT", _G(master_palette));
|
||||
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
}
|
||||
|
||||
void Room810::init() {
|
||||
digi_preload("950_s45", 950);
|
||||
digi_preload("950_s29", 950);
|
||||
digi_preload("810_s01", -1);
|
||||
_ripleyTakesJadeSealFromTombSeries = series_load("RIPLEY TAKES JADE SEAL FROM TOMB", -1, nullptr);
|
||||
_ripPos3LookAroundSeries = series_load("RIP POS 3 LOOK AROUND", -1, nullptr);
|
||||
_ripTrekHandTalkPos3Series = series_load("RIP TREK HAND TALK POS3", -1, nullptr);
|
||||
_810FireFlickerSeries = series_load("810 fire flicker", -1, nullptr);
|
||||
_810LitUrnSeries = series_load("810 lit urn", -1, nullptr);
|
||||
_810MercSeries = series_load("810merc", -1, nullptr);
|
||||
_810BlockSlidesOutSeries = series_load("810 block slides out", -1, nullptr);
|
||||
series_load("810seal", -1, nullptr);
|
||||
series_load("SAFARI SHADOW 3", -1, nullptr);
|
||||
series_play("810 fire flicker", 1024, 0, -1, 12, -1, 100, 0, 0, 0, -1);
|
||||
series_play("810 lit urn", 1024, 0, -1, 12, -1, 100, 0, 0, 0, -1);
|
||||
_810SealMach = series_show_sprite("810seal", 0, 768);
|
||||
digi_play_loop("950_s29", 3, 100, -1, 950);
|
||||
|
||||
if (_G(game).previous_room == KERNEL_RESTORING_GAME)
|
||||
return;
|
||||
|
||||
_alreadyPlayedVideo04aFl = false;
|
||||
player_set_commands_allowed(false);
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), 55, 318);
|
||||
ws_walk(_G(my_walker), 160, 318, nullptr, 1, 3, true);
|
||||
}
|
||||
|
||||
void Room810::pre_parser() {
|
||||
const bool lookFl = player_said_any("look", "look at");
|
||||
|
||||
if (lookFl && player_said("mausoleum")) {
|
||||
digi_play("810r02", 1, 255, -1, 810);
|
||||
_G(player).need_to_walk = false;
|
||||
_G(player).ready_to_walk = true;
|
||||
_G(player).waiting_for_walk = false;
|
||||
} else if (lookFl && player_said(" ")) {
|
||||
_G(player).need_to_walk = false;
|
||||
_G(player).ready_to_walk = true;
|
||||
_G(player).waiting_for_walk = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Room810::parser() {
|
||||
const bool lookFl = player_said_any("look", "look at");
|
||||
const bool takeFl = player_said_any("talk", "talk to", "take");
|
||||
const bool gearFl = player_said("gear");
|
||||
const bool goFl = player_said("go");
|
||||
|
||||
if (lookFl && _G(walker).ripley_said(LOOK)) {
|
||||
// Nothing: ripley_said() triggers digi_play() if a match is found - Do not remove!
|
||||
} else if (lookFl && player_said("IMPERIAL SEAL")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
if (!_alreadyPlayedVideo04aFl) {
|
||||
player_set_commands_allowed(false);
|
||||
digi_play("810r04", 1, 255, 1, 810);
|
||||
} else {
|
||||
digi_play("810r04", 1, 255, -1, 810);
|
||||
}
|
||||
|
||||
break;
|
||||
case 1:
|
||||
digi_play("810r04a", 1, 255, 2, 810);
|
||||
_alreadyPlayedVideo04aFl = true;
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (lookFl && player_said("mausoleum")) {
|
||||
// Nothing -> already covered by ripley_said(LOOK)
|
||||
} else if (lookFl && player_said("urn")) {
|
||||
digi_play("com061", 1, 255, -1, 997);
|
||||
} else if (goFl && player_said("outside")) {
|
||||
digi_play("810r06", 1, 255, -1, 810);
|
||||
} else if (gearFl && player_said("large urn")) {
|
||||
digi_play("com072", 1, 255, -1, -1);
|
||||
} else if (gearFl && player_said("urn")) {
|
||||
digi_play("com073", 1, 255, -1, -1);
|
||||
} else if ((takeFl || gearFl) && player_said("IMPERIAL SEAL")) {
|
||||
switch (_G(kernel).trigger) {
|
||||
case -1:
|
||||
player_set_commands_allowed(false);
|
||||
interface_hide();
|
||||
digi_play("810r07", 1, 255, 18, 810);
|
||||
kernel_timing_trigger(180, 10, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
_ripLooksAroundAndNodsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 415, 312, 46, 512, false, triggerMachineByHashCallback, "rip takes seal");
|
||||
ws_hide_walker(_G(my_walker));
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripTrekHandTalkPos3Series,1, 6, -1, _ripTrekHandTalkPos3Series, 7, 10, 4);
|
||||
_safariShadow3Mach = series_show("SAFARI SHADOW 3", 1280, 16, -1, -1, 0, 46, 415, 312);
|
||||
|
||||
break;
|
||||
|
||||
case 18:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripTrekHandTalkPos3Series, 6, 1, -1, _ripTrekHandTalkPos3Series, 1, 1, 0);
|
||||
kernel_timing_trigger(15, 20, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 20:
|
||||
digi_play("810r07A", 1, 255, 40, 810);
|
||||
kernel_timing_trigger(50, 22, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 22:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripTrekHandTalkPos3Series, 1, 6, -1, _ripTrekHandTalkPos3Series, 7, 10, 4);
|
||||
kernel_timing_trigger(540, 25, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 24:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripTrekHandTalkPos3Series, 6, 1, -1, _ripTrekHandTalkPos3Series, 1, 1, 0);
|
||||
break;
|
||||
|
||||
case 40:
|
||||
terminateMachine(_ripLooksAroundAndNodsMach);
|
||||
terminateMachine(_safariShadow3Mach);
|
||||
terminateMachine(_810SealMach);
|
||||
_ripLooksAroundAndNodsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip takes seal");
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripleyTakesJadeSealFromTombSeries, 1, 38, 48, _ripleyTakesJadeSealFromTombSeries, 38, 38, 0);
|
||||
|
||||
break;
|
||||
|
||||
case 48:
|
||||
_blockSlidesOutMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "block slides out");
|
||||
sendWSMessage_10000(1, _blockSlidesOutMach, _810BlockSlidesOutSeries, 1, 14, -1, _810BlockSlidesOutSeries, 14, 14, 0);
|
||||
sendWSMessage_190000(_blockSlidesOutMach, 12);
|
||||
digi_play("810_s01", 3, 255, 60, 810);
|
||||
kernel_timing_trigger(40, 50, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripleyTakesJadeSealFromTombSeries, 39, 45, 51, _ripleyTakesJadeSealFromTombSeries, 45, 45, 0);
|
||||
break;
|
||||
|
||||
case 51:
|
||||
kernel_timing_trigger(45, 52, nullptr);
|
||||
break;
|
||||
|
||||
case 52:
|
||||
digi_play("810r08", 1, 255, 53, 810);
|
||||
break;
|
||||
|
||||
case 53:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripleyTakesJadeSealFromTombSeries, 46, 52, 54, _ripleyTakesJadeSealFromTombSeries, 52, 52, 0);
|
||||
break;
|
||||
|
||||
case 54:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripleyTakesJadeSealFromTombSeries, 52, 46, 55, _ripleyTakesJadeSealFromTombSeries, 57, 57, 0);
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripleyTakesJadeSealFromTombSeries, 46, 52, 56, _ripleyTakesJadeSealFromTombSeries, 52, 52, 0);
|
||||
|
||||
break;
|
||||
|
||||
case 55:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripleyTakesJadeSealFromTombSeries, 46, 52, 56, _ripleyTakesJadeSealFromTombSeries, 52, 52, 0);
|
||||
break;
|
||||
|
||||
case 56:
|
||||
digi_play("810r09", 1, 255, 58, 810);
|
||||
break;
|
||||
|
||||
case 58:
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripleyTakesJadeSealFromTombSeries, 52, 84, 110, _ripleyTakesJadeSealFromTombSeries, 84, 84, 0);
|
||||
kernel_timing_trigger(25, 70, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 60:
|
||||
digi_stop(3);
|
||||
digi_unload("810_s01");
|
||||
digi_play_loop("950_s45", 3, 128, -1, 950);
|
||||
|
||||
break;
|
||||
|
||||
case 70:
|
||||
series_play("810merc", 768, 0, 130, 12, 0, 100, 0, 0, 0, 35);
|
||||
break;
|
||||
|
||||
case 110:
|
||||
terminateMachine(_ripLooksAroundAndNodsMach);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
ws_demand_location(_G(my_walker), 404, 311);
|
||||
sendWSMessage_3860000(_G(my_walker), 2);
|
||||
ws_walk(_G(my_walker), 55, 318, nullptr, -1, 9, true);
|
||||
|
||||
break;
|
||||
|
||||
case 130:
|
||||
_810MercMach = series_play("810merc", 768, 16, -1, 12, 0, 100, 0, 0, 36, 41);
|
||||
disable_player_commands_and_fade_init(150);
|
||||
digi_stop(2);
|
||||
|
||||
break;
|
||||
|
||||
case 150:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_unload("950_s29");
|
||||
_G(game).setRoom(860);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (player_said("journal") && !takeFl && !lookFl && !gearFl) {
|
||||
digi_play("com042", 1, 255, -1, 950);
|
||||
} else if (!player_said("walk", "mausoleum"))
|
||||
return;
|
||||
|
||||
_G(player).command_ready = false;
|
||||
}
|
||||
|
||||
void Room810::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
_ripLooksAroundAndNodsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 160, 318, 46, 768, false, triggerMachineByHashCallback, "rip looks around and nods");
|
||||
ws_hide_walker(_G(my_walker));
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripPos3LookAroundSeries, 1, 16, 51, _ripPos3LookAroundSeries, 17, 20, 4);
|
||||
_safariShadow3Mach = series_show("SAFARI SHADOW 3", 1280, 16, -1, -1, 0, 46, 160, 318);
|
||||
|
||||
break;
|
||||
|
||||
case 51:
|
||||
sendWSMessage_190000(_ripLooksAroundAndNodsMach, 20);
|
||||
digi_play("810r01", 1, 255, 52, 810);
|
||||
|
||||
break;
|
||||
|
||||
case 52:
|
||||
sendWSMessage_190000(_ripLooksAroundAndNodsMach, 12);
|
||||
sendWSMessage_10000(1, _ripLooksAroundAndNodsMach, _ripPos3LookAroundSeries, 16, 1, 53, _ripPos3LookAroundSeries, 1, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
case 53:
|
||||
terminateMachine(_ripLooksAroundAndNodsMach);
|
||||
terminateMachine(_safariShadow3Mach);
|
||||
ws_unhide_walker(_G(my_walker));
|
||||
player_set_commands_allowed(true);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
64
engines/m4/riddle/rooms/section8/room810.h
Normal file
64
engines/m4/riddle/rooms/section8/room810.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* 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_SECTION8_ROOM810_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM810_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room810 : public Room {
|
||||
public:
|
||||
Room810() : Room() {}
|
||||
~Room810() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
bool _alreadyPlayedVideo04aFl = false;
|
||||
|
||||
int32 _810BlockSlidesOutSeries = 0;
|
||||
int32 _810FireFlickerSeries = 0;
|
||||
int32 _810LitUrnSeries = 0;
|
||||
int32 _810MercSeries = 0;
|
||||
int32 _ripleyTakesJadeSealFromTombSeries = 0;
|
||||
int32 _ripPos3LookAroundSeries = 0;
|
||||
int32 _ripTrekHandTalkPos3Series = 0;
|
||||
|
||||
machine *_810MercMach = nullptr;
|
||||
machine *_810SealMach = nullptr;
|
||||
machine *_blockSlidesOutMach = nullptr;
|
||||
machine *_ripLooksAroundAndNodsMach = nullptr;
|
||||
machine *_safariShadow3Mach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
404
engines/m4/riddle/rooms/section8/room811.cpp
Normal file
404
engines/m4/riddle/rooms/section8/room811.cpp
Normal file
@@ -0,0 +1,404 @@
|
||||
/* 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/section8/room811.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room811::preload() {
|
||||
LoadWSAssets("OTHER SCRIPT", _G(master_palette));
|
||||
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room811::init() {
|
||||
interface_hide();
|
||||
player_set_commands_allowed(false);
|
||||
_811MusicFadingVol = 80;
|
||||
digi_stop(1);
|
||||
digi_preload("950_s45", 950);
|
||||
digi_play_loop("950_s45", 3, 80, -1, 950);
|
||||
|
||||
digi_preload("811_s01", -1);
|
||||
digi_preload("811_s01a", -1);
|
||||
digi_preload("811_s01b", -1);
|
||||
digi_preload("950_s55", -1);
|
||||
digi_preload("811R02", -1);
|
||||
digi_preload("811B03", -1);
|
||||
digi_preload("811R03", -1);
|
||||
digi_preload("811B04", -1);
|
||||
digi_preload("811B06", -1);
|
||||
digi_preload("811R05", -1);
|
||||
|
||||
_811RP01Series = series_load("811RP01", -1, nullptr);
|
||||
_811MC01Series = series_load("811MC01", -1, nullptr);
|
||||
_811BA01Series = series_load("811BA01", -1, nullptr);
|
||||
_811BA02Series = series_load("811BA02", -1, nullptr);
|
||||
_811BA03Series = series_load("811BA03", -1, nullptr);
|
||||
_811BA04Series = series_load("811BA04", -1, nullptr);
|
||||
_811BA05Series = series_load("811BA05", -1, nullptr);
|
||||
|
||||
_811RipleyMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 1024, false, triggerMachineByHashCallback, "811 ripley");
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
_811McMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 1280, false, triggerMachineByHashCallback, "811 mc");
|
||||
sendWSMessage_10000(1, _811McMach, _811MC01Series, 1, 1, -1, _811MC01Series, 1, 1, 0);
|
||||
_811BaronMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "811 baron");
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, 1, _811BA01Series, 12, 17, 4);
|
||||
|
||||
sendWSMessage_110000(_811BaronMach, 11);
|
||||
}
|
||||
|
||||
void Room811::pre_parser() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
void Room811::parser() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
void Room811::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
digi_play("811B01", 2, 255, 2, -1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
digi_play("811m01", 2, 255, 3, -1);
|
||||
sendWSMessage_10000(1, _811McMach, _811MC01Series, 1, 1, -1, _811MC01Series, 1, 6, 4);
|
||||
sendWSMessage_1a0000(_811McMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sendWSMessage_10000(1, _811McMach, _811MC01Series, 1, 1, -1, _811MC01Series, 1, 1, 0);
|
||||
digi_play("811r01", 2, 255, 5, -1);
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 7, 4);
|
||||
sendWSMessage_1a0000(_811RipleyMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
digi_play("811b02", 2, 255, 7, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
_811Pu01Mach = series_stream("811pu01", 10, 256, -1);
|
||||
digi_play("950_s55", 1, 60, -1, 950);
|
||||
series_stream_break_on_frame(_811Pu01Mach, 26, 1050);
|
||||
digi_play("811r02", 2, 255, 11, -1);
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 7, 4);
|
||||
sendWSMessage_1a0000(_811RipleyMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
digi_unload("811R02");
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
digi_play("811b03", 2, 255, 13, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
digi_unload("811B03");
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
_811Pu01Mach = series_stream("811pu02", 12, 256, -1);
|
||||
series_stream_break_on_frame(_811Pu01Mach, 5, 76);
|
||||
digi_play("811r03", 2, 255, 15, -1);
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 7, 4);
|
||||
sendWSMessage_1a0000(_811RipleyMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 15:
|
||||
digi_unload("811r03");
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
digi_play("811B04", 2, 255, 17, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 17:
|
||||
digi_unload("811B04");
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
digi_play("811m02", 2, 255, 19, -1);
|
||||
sendWSMessage_10000(1, _811McMach, _811MC01Series, 1, 1, -1, _811MC01Series, 1, 6, 4);
|
||||
sendWSMessage_1a0000(_811McMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 19:
|
||||
sendWSMessage_10000(1, _811McMach, _811MC01Series, 1, 1, -1, _811MC01Series, 1, 1, 0);
|
||||
digi_play("811r04", 2, 255, 20, -1);
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 7, 4);
|
||||
sendWSMessage_1a0000(_811RipleyMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 20:
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
digi_play("811B05", 2, 255, 21, -1);
|
||||
kernel_timing_trigger(45, 1100, nullptr);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 21:
|
||||
digi_play("811B05A", 2, 255, 23, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA02Series, 1, 12, 22, _811BA02Series, 12, 12, 0);
|
||||
|
||||
break;
|
||||
|
||||
case 22:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA02Series, 12, 1, -1, _811BA01Series, 12, 17, 0);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 23:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
_811Pu01Mach = series_stream("811pu03", 15, 256, -1);
|
||||
series_stream_break_on_frame(_811Pu01Mach, 5, 77);
|
||||
digi_play("811B06", 2, 255, 25, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 25:
|
||||
digi_unload("811B06");
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
digi_play("811r05", 2, 255, 26, -1);
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 7, 4);
|
||||
sendWSMessage_1a0000(_811RipleyMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 26:
|
||||
digi_unload("811R05");
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
digi_play("811B07", 2, 255, 27, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 27:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
digi_play("811r06", 2, 255, 28, -1);
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 7, 4);
|
||||
sendWSMessage_1a0000(_811RipleyMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 28:
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
kernel_timing_trigger(20, 29, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 29:
|
||||
digi_play("811B08", 2, 255, 30, -1);
|
||||
kernel_timing_trigger(95, 1110, nullptr);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA03Series, 1, 24, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 30:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
digi_play("811R07", 2, 255, 31, -1);
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 7, 4);
|
||||
sendWSMessage_1a0000(_811RipleyMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 31:
|
||||
sendWSMessage_10000(1, _811RipleyMach, _811RP01Series, 1, 1, -1, _811RP01Series, 1, 1, 0);
|
||||
digi_play("811B09", 2, 255, 82, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 32:
|
||||
digi_play("811B09B", 2, 255, 34, -1);
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA05Series, 1, 4, 33, _811BA05Series, 24, 24, 0);
|
||||
|
||||
break;
|
||||
|
||||
case 33:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA05Series, 24, 1, -1, _811BA01Series, 12, 17, 0);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 34:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
series_unload(_811BA02Series);
|
||||
series_unload(_811BA03Series);
|
||||
series_unload(_811BA04Series);
|
||||
series_unload(_811BA05Series);
|
||||
|
||||
digi_stop(1);
|
||||
digi_stop(2);
|
||||
|
||||
digi_unload("811_s01");
|
||||
digi_unload("811_s01a");
|
||||
digi_unload("811_s01b");
|
||||
digi_unload("950_s55");
|
||||
digi_unload("811R02");
|
||||
digi_unload("811B03");
|
||||
digi_unload("811R03");
|
||||
digi_unload("811B04");
|
||||
digi_unload("811B06");
|
||||
digi_unload("811R05");
|
||||
|
||||
_811EndSeries = series_load("811END", -1, nullptr);
|
||||
|
||||
terminateMachine(_811RipleyMach);
|
||||
terminateMachine(_811McMach);
|
||||
terminateMachine(_811BaronMach);
|
||||
|
||||
series_unload(_811RP01Series);
|
||||
series_unload(_811MC01Series);
|
||||
series_unload(_811BA01Series);
|
||||
|
||||
_811Pu01Mach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 256, false, triggerMachineByHashCallback, "811 end series");
|
||||
sendWSMessage_10000(1, _811Pu01Mach, _811EndSeries, 1, 57, 64, _811EndSeries, 57, 57, 0);
|
||||
|
||||
break;
|
||||
|
||||
case 35:
|
||||
digi_play("811b10", 2, 255, 36, -1);
|
||||
sendWSMessage_10000(1, _811Pu01Mach, _811EndSeries, 61, 61, -1, _811EndSeries, 61, 63, 4);
|
||||
sendWSMessage_1a0000(_811Pu01Mach, 11);
|
||||
|
||||
break;
|
||||
|
||||
case 36:
|
||||
sendWSMessage_10000(1, _811Pu01Mach, _811EndSeries, 64, 73, 65, _811EndSeries, 73, 73, 0);
|
||||
break;
|
||||
|
||||
case 37:
|
||||
digi_play("811r08", 2, 255, 91, -1);
|
||||
break;
|
||||
|
||||
case 40:
|
||||
digi_play("811_s06", 1, 255, 37, -1);
|
||||
break;
|
||||
|
||||
case 64:
|
||||
sendWSMessage_10000(1, _811Pu01Mach, _811EndSeries, 58, 60, 35, _811EndSeries, 60, 60, 0);
|
||||
digi_play("811_s03", 1, 255, -1, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 65:
|
||||
sendWSMessage_10000(1, _811Pu01Mach, _811EndSeries, 74, 87, -1, _811EndSeries, 87, 87, 0);
|
||||
digi_play("811_s04", 1, 255, -1, -1);
|
||||
kernel_timing_trigger(55, 40, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 76:
|
||||
digi_play("811_s01", 1, 220, -1, -1);
|
||||
break;
|
||||
|
||||
case 77:
|
||||
digi_play("811_s01", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 82:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
kernel_timing_trigger(15, 83, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 83:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA04Series, 1, 17, -1, _811BA01Series, 12, 17, 4);
|
||||
sendWSMessage_1a0000(_811BaronMach, 11);
|
||||
digi_play("811B09A", 2, 255, 84, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 84:
|
||||
sendWSMessage_10000(1, _811BaronMach, _811BA01Series, 12, 12, -1, _811BA01Series, 12, 12, 0);
|
||||
kernel_timing_trigger(20, 32, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 91:
|
||||
player_set_commands_allowed(false);
|
||||
adv_kill_digi_between_rooms(false);
|
||||
disable_player_commands_and_fade_init(92);
|
||||
digi_stop(1);
|
||||
digi_stop(2);
|
||||
|
||||
break;
|
||||
|
||||
case 92:
|
||||
digi_play_loop("950_s45", 3, 128, -1, 950);
|
||||
_G(game).setRoom(861);
|
||||
break;
|
||||
|
||||
case 1050:
|
||||
_811MusicFadingVol -= 5;
|
||||
if (_811MusicFadingVol <= 0) {
|
||||
digi_stop(1);
|
||||
} else {
|
||||
digi_change_panning(1, _811MusicFadingVol);
|
||||
kernel_timing_trigger(2, 1050, nullptr);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 1100:
|
||||
digi_play("811_s01a", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case 1110:
|
||||
digi_play("811_s01b", 1, 255, -1, -1);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
64
engines/m4/riddle/rooms/section8/room811.h
Normal file
64
engines/m4/riddle/rooms/section8/room811.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* 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_SECTION8_ROOM811_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM811_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room811 : public Room {
|
||||
public:
|
||||
Room811() : Room() {}
|
||||
~Room811() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
int32 _811MusicFadingVol = 0;
|
||||
|
||||
int32 _811BA01Series = 0;
|
||||
int32 _811BA02Series = 0;
|
||||
int32 _811BA03Series = 0;
|
||||
int32 _811BA04Series = 0;
|
||||
int32 _811BA05Series = 0;
|
||||
int32 _811MC01Series = 0;
|
||||
int32 _811RP01Series = 0;
|
||||
int32 _811EndSeries = 0;
|
||||
|
||||
machine *_811BaronMach = nullptr;
|
||||
machine *_811McMach = nullptr;
|
||||
machine *_811Pu01Mach = nullptr;
|
||||
machine *_811RipleyMach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
110
engines/m4/riddle/rooms/section8/room814.cpp
Normal file
110
engines/m4/riddle/rooms/section8/room814.cpp
Normal file
@@ -0,0 +1,110 @@
|
||||
/* 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/section8/room814.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/riddle.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room814::init() {
|
||||
_currentRoom = 814;
|
||||
if (_G(flags)[V276] == 0) {
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1, false);
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2, false);
|
||||
}
|
||||
|
||||
series_plain_play("814 lit urn 1", -1, 0, 100, 32767, 7, -1, false);
|
||||
series_plain_play("814 lit urn 2", -1, 0, 100, 32767, 7, -1, false);
|
||||
_var1 = 3;
|
||||
_var2 = 2;
|
||||
_var3 = 3;
|
||||
_var4 = 7;
|
||||
_var5 = -1;
|
||||
|
||||
getSeriesName(2, false);
|
||||
_machArr[0] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(3, false);
|
||||
_machArr[1] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(7, false);
|
||||
_machArr[2] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
_machArr[3] = nullptr;
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
switch (_G(game).previous_room) {
|
||||
case KERNEL_RESTORING_GAME:
|
||||
player_set_commands_allowed(true);
|
||||
digi_preload("950_s29", -1);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, _guessX, 400, _guessIndex, Walker::player_walker_callback, "mc_trek");
|
||||
kernel_timing_trigger(1, 1, nullptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case 803:
|
||||
player_set_commands_allowed(false);
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), -10, 325);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, -60, 325, 2, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 0;
|
||||
_guessX = 100;
|
||||
_guessIndex = 1;
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, -1, 3, true);
|
||||
ws_walk(_mcTrekMach, 80, 400, nullptr, 1, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, 1, 3, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
player_set_commands_allowed(false);
|
||||
moveScreen(1280, 0);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
ws_demand_location(_G(my_walker), 1925, 325);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 2000, 325, 9, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 4;
|
||||
_guessX = 1815;
|
||||
_guessIndex = 11;
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, 0, 9, true);
|
||||
DisposePath(_mcTrekMach->walkPath);
|
||||
_mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, -1);
|
||||
ws_custom_walk(_mcTrekMach, 11, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
digi_play_loop("950_s29", 3, 96, -1, -1);
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
43
engines/m4/riddle/rooms/section8/room814.h
Normal file
43
engines/m4/riddle/rooms/section8/room814.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/* 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_SECTION8_ROOM814_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM814_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room814 : public Section8Room {
|
||||
public:
|
||||
Room814() : Section8Room() {}
|
||||
~Room814() override {}
|
||||
|
||||
void init() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
147
engines/m4/riddle/rooms/section8/room818.cpp
Normal file
147
engines/m4/riddle/rooms/section8/room818.cpp
Normal file
@@ -0,0 +1,147 @@
|
||||
/* 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/section8/room818.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room818::preload() {
|
||||
_G(player).walker_in_this_scene = false;
|
||||
LoadWSAssets("other script", _G(master_palette));
|
||||
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
}
|
||||
|
||||
void Room818::init() {
|
||||
player_set_commands_allowed(false);
|
||||
interface_hide();
|
||||
digi_preload("950_s45", 950);
|
||||
digi_play_loop("950_s45", 3, 100, -1, 950);
|
||||
|
||||
if (inv_object_in_scene("CRANK", 808)) {
|
||||
series_show("808 HANDLE SPRITE", 3840, 16, -1, -1, 0, 100, 0, 0);
|
||||
}
|
||||
|
||||
series_play("818merc", 3840, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
series_play("818fire", 3840, 0, -1, 5, -1, 100, 0, 0, 0, -1);
|
||||
series_play("818baron", 256, 0, -1, 10, -1, 100, 0, 0, 0, -1);
|
||||
_818All1Series = series_load("818all1", -1, nullptr);
|
||||
_xMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 256, 0, triggerMachineByHashCallback, "x");
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 1, 148, 5, _818All1Series, 148, 148, 4);
|
||||
}
|
||||
|
||||
void Room818::pre_parser() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
void Room818::parser() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
void Room818::daemon() {
|
||||
int32 edx = _dword1A18DC + 1;
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
player_set_commands_allowed(true);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
_dword1A18DC = 0;
|
||||
digi_play("818_s01", 1, 255, 10, 818);
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 149, 179, 10, _818All1Series, 179, 179, 4);
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
if (_dword1A18DC != 0) {
|
||||
_dword1A18DC = 0;
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 179, 197, 15, _818All1Series, 187, 194, 1);
|
||||
digi_play("808r41", 1, 255, 15, -1);
|
||||
} else {
|
||||
_dword1A18DC = edx;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (_dword1A18DC != 0) {
|
||||
_dword1A18DC = 0;
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 195, 218, 20, _818All1Series, 218, 218, 0);
|
||||
} else {
|
||||
_dword1A18DC = edx;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 20:
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 218, 240, 22, _818All1Series, 240, 240, 0);
|
||||
digi_play("808m10", 1, 255, 22, -1);
|
||||
|
||||
break;
|
||||
|
||||
case 22:
|
||||
if (_dword1A18DC != 0) {
|
||||
_dword1A18DC = 0;
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 242, 269, 23, _818All1Series, 263, 269, 1);
|
||||
digi_play("808r42", 1, 255, 23, -1);
|
||||
} else {
|
||||
_dword1A18DC = edx;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 23:
|
||||
if (_dword1A18DC != 0) {
|
||||
_dword1A18DC = 0;
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 270, 300, 25, _818All1Series, 300, 300, 1);
|
||||
} else {
|
||||
_dword1A18DC = edx;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 25:
|
||||
sendWSMessage_10000(1, _xMach, _818All1Series, 301, 328, 30, _818All1Series, 328, 328, 1);
|
||||
disable_player_commands_and_fade_init(-1);
|
||||
midi_fade_volume(0, 70);
|
||||
kernel_timing_trigger(70, 30, nullptr);
|
||||
|
||||
break;
|
||||
|
||||
case 30:
|
||||
_G(game).setRoom(917);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
55
engines/m4/riddle/rooms/section8/room818.h
Normal file
55
engines/m4/riddle/rooms/section8/room818.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/* 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_SECTION8_ROOM818_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM818_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room818 : public Room {
|
||||
public:
|
||||
Room818() : Room() {}
|
||||
~Room818() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
int32 _dword1A18DC = 0;
|
||||
|
||||
int32 _818All1Series = 0;
|
||||
|
||||
machine *_xMach = nullptr;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
120
engines/m4/riddle/rooms/section8/room824.cpp
Normal file
120
engines/m4/riddle/rooms/section8/room824.cpp
Normal file
@@ -0,0 +1,120 @@
|
||||
/* 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/section8/room824.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/riddle.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room824::init() {
|
||||
_currentRoom = 824;
|
||||
if (_G(flags)[V276] == 0) {
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1, false);
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2, false);
|
||||
}
|
||||
_ripTakerPos5 = series_load("824fire1", -1, nullptr);
|
||||
_824fire2Serie = series_load("824fire2", -1, nullptr);
|
||||
|
||||
if (_G(flags)[V270] == 824) {
|
||||
_ripPushMach = series_play("824char1", 32767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
} else {
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "chariot ", false);
|
||||
}
|
||||
|
||||
_824fire1Mach = series_play("824fire1", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
_824fire2Mach = series_play("824fire2", 4095, 0, -1, 7, -1, 100, 0, 0, 0, -1);
|
||||
|
||||
_var1 = 2;
|
||||
_var2 = 1;
|
||||
_var3 = 4;
|
||||
_var4 = -1;
|
||||
_var5 = -1;
|
||||
|
||||
getSeriesName(1, false);
|
||||
_machArr[0] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(4, false);
|
||||
_machArr[1] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(7, false);
|
||||
_machArr[2] = nullptr;
|
||||
_machArr[3] = nullptr;
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
switch (_G(game).previous_room) {
|
||||
case KERNEL_RESTORING_GAME:
|
||||
player_set_commands_allowed(true);
|
||||
digi_preload("950_s29", -1);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, _guessX, 400, _guessIndex, Walker::player_walker_callback, "mc_trek");
|
||||
kernel_timing_trigger(1, 1, nullptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case 803:
|
||||
player_set_commands_allowed(false);
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), -10, 328);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, -50, 328, 2, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 0;
|
||||
_guessX = 100;
|
||||
_guessIndex = 1;
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, -1, 3, true);
|
||||
ws_walk(_mcTrekMach, 80, 400, nullptr, 1, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, 1, 3, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
player_set_commands_allowed(false);
|
||||
moveScreen(1280, 0);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
ws_demand_location(_G(my_walker), 1925, 328);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 2000, 328, 9, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 4;
|
||||
_guessX = 1815;
|
||||
_guessIndex = 11;
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, -1, 9, true);
|
||||
DisposePath(_mcTrekMach->walkPath);
|
||||
_mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, -1);
|
||||
ws_custom_walk(_mcTrekMach, 11, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
digi_play_loop("950_s29", 3, 96, -1, -1);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
43
engines/m4/riddle/rooms/section8/room824.h
Normal file
43
engines/m4/riddle/rooms/section8/room824.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/* 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_SECTION8_ROOM824_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM824_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room824 : public Section8Room {
|
||||
public:
|
||||
Room824() : Section8Room() {}
|
||||
~Room824() override {}
|
||||
|
||||
void init() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
113
engines/m4/riddle/rooms/section8/room834.cpp
Normal file
113
engines/m4/riddle/rooms/section8/room834.cpp
Normal file
@@ -0,0 +1,113 @@
|
||||
/* 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/section8/room834.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/riddle.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room834::init() {
|
||||
_currentRoom = 834;
|
||||
if (_G(flags)[V276] == 0) {
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1, false);
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2, false);
|
||||
}
|
||||
|
||||
series_plain_play("834fire1", -1, 0, 100, 32767, 7, -1, false);
|
||||
series_plain_play("834fire2", -1, 0, 100, 32767, 7, -1, false);
|
||||
series_plain_play("834fire3", -1, 0, 100, 32767, 7, -1, false);
|
||||
_var1 = 4;
|
||||
_var2 = 2;
|
||||
_var3 = 3;
|
||||
_var4 = 5;
|
||||
_var5 = 7;
|
||||
|
||||
getSeriesName(2, false);
|
||||
_machArr[0] = series_play(_currentSeriesName.c_str(), 0x2ff, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(3, false);
|
||||
_machArr[1] = series_play(_currentSeriesName.c_str(), 0x2ff, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(5, false);
|
||||
_machArr[2] = series_play(_currentSeriesName.c_str(), 0x2ff, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(7, false);
|
||||
_machArr[3] = series_play(_currentSeriesName.c_str(), 0x2ff, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
switch (_G(game).previous_room) {
|
||||
case KERNEL_RESTORING_GAME:
|
||||
player_set_commands_allowed(true);
|
||||
digi_preload("950_s29", -1);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, _guessX, 400, _guessIndex, Walker::player_walker_callback, "mc_trek");
|
||||
kernel_timing_trigger(1, 1, nullptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case 803:
|
||||
player_set_commands_allowed(false);
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), -10, 330);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, -50, 330, 2, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 0;
|
||||
_guessX = 100;
|
||||
_guessIndex = 1;
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, -1, 3, true);
|
||||
ws_walk(_mcTrekMach, 80, 400, nullptr, 1, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, 1, 3, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
player_set_commands_allowed(false);
|
||||
moveScreen(1280, 0);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
ws_demand_location(_G(my_walker), 1925, 330);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 2000, 330, 9, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 4;
|
||||
_guessX = 1815;
|
||||
_guessIndex = 11;
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, -1, 9, true);
|
||||
DisposePath(_mcTrekMach->walkPath);
|
||||
_mcTrekMach->walkPath = CreateCustomPath(1836, 329, 1815, 400, -1);
|
||||
ws_custom_walk(_mcTrekMach, 11, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
digi_play_loop("950_s29", 3, 96, -1, -1);
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
43
engines/m4/riddle/rooms/section8/room834.h
Normal file
43
engines/m4/riddle/rooms/section8/room834.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/* 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_SECTION8_ROOM834_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM834_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room834 : public Section8Room {
|
||||
public:
|
||||
Room834() : Section8Room() {}
|
||||
~Room834() override {}
|
||||
|
||||
void init() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
118
engines/m4/riddle/rooms/section8/room844.cpp
Normal file
118
engines/m4/riddle/rooms/section8/room844.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
/* 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/section8/room844.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/riddle.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room844::init() {
|
||||
_currentRoom = 844;
|
||||
if (_G(flags)[V276] == 0) {
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1, false);
|
||||
ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2, false);
|
||||
}
|
||||
|
||||
series_plain_play("844fire1", -1, 0, 100, 32767, 7, -1, false);
|
||||
series_plain_play("844fire2", -1, 0, 100, 32767, 7, -1, false);
|
||||
|
||||
_var1 = 3;
|
||||
_var2 = 1;
|
||||
_var3 = 3;
|
||||
_var4 = 6;
|
||||
_var5 = -1;
|
||||
|
||||
getSeriesName(1, false);
|
||||
_machArr[0] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(3, false);
|
||||
_machArr[1] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
getSeriesName(6, false);
|
||||
_machArr[2] = series_play(_currentSeriesName.c_str(), 767, 16, -1, 0, 0, 100, 0, 0, 0, -1);
|
||||
_machArr[3] = nullptr;
|
||||
|
||||
if (inv_object_in_scene("wooden beam", 844)) {
|
||||
_844postMach = series_show("844post", 4095, 0, -1, -1, 0, 100, 0, 0);
|
||||
} else {
|
||||
hotspot_set_active("wooden beam", false);
|
||||
}
|
||||
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
|
||||
|
||||
switch (_G(game).previous_room) {
|
||||
case KERNEL_RESTORING_GAME:
|
||||
player_set_commands_allowed(true);
|
||||
digi_preload("950_s29", -1);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, _guessX, 400, _guessIndex, Walker::player_walker_callback, "mc_trek");
|
||||
kernel_timing_trigger(1, 1, nullptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case 803:
|
||||
player_set_commands_allowed(false);
|
||||
ws_demand_facing(_G(my_walker), 3);
|
||||
ws_demand_location(_G(my_walker), -10, 325);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, -60, 325, 2, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 0;
|
||||
_guessX = 100;
|
||||
_guessIndex = 1;
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, -1, 3, true);
|
||||
ws_walk(_mcTrekMach, 80, 400, nullptr, 1, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 150, 355, nullptr, 1, 3, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
player_set_commands_allowed(false);
|
||||
moveScreen(1280, 0);
|
||||
ws_demand_facing(_G(my_walker), 9);
|
||||
ws_demand_location(_G(my_walker), 1925, 325);
|
||||
if (_G(flags)[V276] == 0) {
|
||||
_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 2000, 325, 9, Walker::player_walker_callback, "mc_trek");
|
||||
_unkArrayIndex = 4;
|
||||
_guessX = 1815;
|
||||
_guessIndex = 11;
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, -1, 9, true);
|
||||
DisposePath(_mcTrekMach->walkPath);
|
||||
_mcTrekMach->walkPath = CreateCustomPath(1832, 325, 1815, 400, -1);
|
||||
ws_custom_walk(_mcTrekMach, 11, 1, true);
|
||||
} else {
|
||||
ws_walk(_G(my_walker), 1765, 348, nullptr, 1, 9, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
digi_play_loop("950_s29", 3, 96, -1, -1);
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
43
engines/m4/riddle/rooms/section8/room844.h
Normal file
43
engines/m4/riddle/rooms/section8/room844.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/* 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_SECTION8_ROOM844_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM844_H
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room844 : public Section8Room {
|
||||
public:
|
||||
Room844() : Section8Room() {}
|
||||
~Room844() override {}
|
||||
|
||||
void init() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
114
engines/m4/riddle/rooms/section8/room850.cpp
Normal file
114
engines/m4/riddle/rooms/section8/room850.cpp
Normal file
@@ -0,0 +1,114 @@
|
||||
/* 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/section8/room850.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room850::preload() {
|
||||
Room::preload();
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room850::init() {
|
||||
player_set_commands_allowed(false);
|
||||
|
||||
static const char *const PRELOADS[8] = {
|
||||
"850_s01", "850_s02", "850_s03", "850_s04", "850_s05",
|
||||
"850_s06", "603_s02c", "801_s02"
|
||||
};
|
||||
for (int i = 0; i < 8; ++i)
|
||||
digi_preload(PRELOADS[i]);
|
||||
|
||||
_allStuff = series_load("850 ALL STUFF");
|
||||
digi_play_loop("603_s02c", 2, 100, -1, 603);
|
||||
_allStuffMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0x100, false,
|
||||
triggerMachineByHashCallback, "850 all");
|
||||
sendWSMessage_10000(1, _allStuffMach, _allStuff, 1, 1, 1, _allStuff, 1, 15, 4);
|
||||
}
|
||||
|
||||
void Room850::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
kernel_timing_trigger(110, 10);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
digi_play("850_s01", 1);
|
||||
kernel_timing_trigger(360, 15);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
digi_stop(2);
|
||||
digi_play("850_s03", 2, 255, 20);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
sendWSMessage_10000(1, _allStuffMach, _allStuff, 16, 20, 25, _allStuff, 20, 20, 0);
|
||||
digi_play("850_s07", 3);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
sendWSMessage_10000(1, _allStuffMach, _allStuff, 20, 29, 30, _allStuff, 29, 29, 0);
|
||||
digi_play("850_s05", 2);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
digi_play("850_s05", 2, 255, 40);
|
||||
break;
|
||||
|
||||
case 40:
|
||||
digi_play("850_s02", 1);
|
||||
kernel_timing_trigger(60, 50);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
digi_play("850r01", 2, 255, 60);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
digi_play_loop("801_s02", 3, 100);
|
||||
kernel_timing_trigger(15, 100);
|
||||
break;
|
||||
|
||||
|
||||
case 100:
|
||||
player_set_commands_allowed(false);
|
||||
disable_player_commands_and_fade_init(110);
|
||||
break;
|
||||
|
||||
case 110:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
_G(game).setRoom(801);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
49
engines/m4/riddle/rooms/section8/room850.h
Normal file
49
engines/m4/riddle/rooms/section8/room850.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* 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_SECTION8_ROOM850_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM850_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room850 : public Room {
|
||||
private:
|
||||
int _allStuff = 0;
|
||||
machine *_allStuffMach = nullptr;
|
||||
|
||||
public:
|
||||
Room850() : Room() {}
|
||||
~Room850() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
84
engines/m4/riddle/rooms/section8/room852.cpp
Normal file
84
engines/m4/riddle/rooms/section8/room852.cpp
Normal file
@@ -0,0 +1,84 @@
|
||||
/* 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/section8/room852.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room852::preload() {
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room852::init() {
|
||||
interface_hide();
|
||||
player_set_commands_allowed(false);
|
||||
digi_preload("852_s01");
|
||||
digi_preload("852r03");
|
||||
kernel_timing_trigger(30, 1);
|
||||
}
|
||||
|
||||
void Room852::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
_all = series_stream("852all", 5, 0x100, -1);
|
||||
series_stream_break_on_frame(_all, 56, 6);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
series_stream_break_on_frame(_all, 95, 7);
|
||||
digi_play("852r03", 2);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
series_stream_break_on_frame(_all, 255, 9);
|
||||
digi_play("852_s01", 2, 255, 8);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
digi_play("950_s29", 2);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
disable_player_commands_and_fade_init(11);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
_G(game).setRoom(803);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Room852::shutdown() {
|
||||
interface_show();
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
49
engines/m4/riddle/rooms/section8/room852.h
Normal file
49
engines/m4/riddle/rooms/section8/room852.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* 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_SECTION8_ROOM852_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM852_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room852 : public Room {
|
||||
private:
|
||||
machine *_all = nullptr;
|
||||
|
||||
public:
|
||||
Room852() : Room() {}
|
||||
~Room852() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
void shutdown() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
162
engines/m4/riddle/rooms/section8/room860.cpp
Normal file
162
engines/m4/riddle/rooms/section8/room860.cpp
Normal file
@@ -0,0 +1,162 @@
|
||||
/* 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/m4.h"
|
||||
#include "m4/riddle/rooms/section8/room860.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 Room860::preload() {
|
||||
LoadWSAssets("other script", _G(master_palette));
|
||||
|
||||
_G(player).walker_type = WALKER_ALT;
|
||||
_G(player).shadow_type = SHADOW_ALT;
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room860::init() {
|
||||
interface_hide();
|
||||
player_set_commands_allowed(false);
|
||||
_G(camera_reacts_to_player) = false;
|
||||
MoveScreenDelta(_G(game_buff_ptr), -320, 0);
|
||||
g_engine->adv_camera_pan_step(3);
|
||||
digi_preload("950_s45", 950);
|
||||
digi_play_loop("950_s45", 3, 240, -1, 950);
|
||||
digi_preload("baronstg", 860);
|
||||
digi_preload("809_s04", 809);
|
||||
digi_preload("860r01", 860);
|
||||
digi_preload("860r02", 860);
|
||||
digi_preload("860m01", 860);
|
||||
digi_preload("860m02", 860);
|
||||
digi_preload("860b01", 860);
|
||||
|
||||
_860RipCrossSeries = series_load("860 RIP CROSS", -1, nullptr);
|
||||
_860RipWalkSeries = series_load("860 RIP WALK", -1, nullptr);
|
||||
_860RipTalkSeries = series_load("860 RIP TALK", -1, nullptr);
|
||||
_860MeiTalkSeries = series_load("860 MEI TALK", -1, nullptr);
|
||||
_860DragonHeadsSpewingSeries = series_load("860 DRAGON HEADS SPEWING", -1, nullptr);
|
||||
series_play("860 DRAGON HEADS SPEWING", 1024, 0, -1, 12, -1, 100, 0, 0, 0, -1);
|
||||
_860RipMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "860 rip");
|
||||
sendWSMessage_10000(1, _860RipMach, _860RipCrossSeries, 1, 20, 80, _860RipCrossSeries, 20, 20, 0);
|
||||
_860McMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "860 mc");
|
||||
sendWSMessage_10000(1, _860McMach, _860MeiTalkSeries, 1, 1, -1, _860MeiTalkSeries, 1, 1, 0);
|
||||
}
|
||||
|
||||
void Room860::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
digi_stop(1);
|
||||
series_load("860SHLD", -1, nullptr);
|
||||
series_place_sprite("860SHLD", 0, 0, 0, 100, 512);
|
||||
sendWSMessage_10000(1, _860RipMach, _860RipWalkSeries, 1, 100, 2,
|
||||
_860RipTalkSeries, 1, 1, 0);
|
||||
sendWSMessage_190000(_860RipMach, 3);
|
||||
g_engine->set_camera_delta_pan(-290, 0);
|
||||
series_unload(_860RipCrossSeries);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
series_unload(_860RipWalkSeries);
|
||||
sendWSMessage_10000(1, _860McMach, _860MeiTalkSeries, 1, 1, -1,
|
||||
_860MeiTalkSeries, 1, 11, 4);
|
||||
digi_play("860m01", 2, 255, 3, 860);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sendWSMessage_10000(1, _860McMach, _860MeiTalkSeries, 11, 11, -1,
|
||||
_860MeiTalkSeries, 11, 11, 0);
|
||||
sendWSMessage_10000(1, _860RipMach, _860RipTalkSeries, 1, 2, -1,
|
||||
_860RipTalkSeries, 1, 2, 4);
|
||||
digi_play("860r01", 2, 255, 4, 860);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sendWSMessage_10000(1, _860RipMach, _860RipTalkSeries, 1, 6, -1, _860RipTalkSeries, 6, 6, 0);
|
||||
sendWSMessage_10000(1, _860McMach, _860MeiTalkSeries, 12, 26, -1, _860MeiTalkSeries, 26, 26, 0);
|
||||
kernel_timing_trigger(25, 5, nullptr);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
digi_play("860m02", 2, 255, -1, 860);
|
||||
kernel_timing_trigger(60, 6, nullptr);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
sendWSMessage_10000(1, _860McMach, _860MeiTalkSeries, 26, 26, -1, _860MeiTalkSeries, 26, 26, 0);
|
||||
digi_play("860r02", 2, 255, 7, -1);
|
||||
sendWSMessage_10000(1, _860RipMach, _860RipTalkSeries, 1, 2, -1, _860RipTalkSeries, 1, 2, 4);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
sendWSMessage_10000(1, _860McMach, _860MeiTalkSeries, 27, 32, 91, _860MeiTalkSeries, 32, 32, 0);
|
||||
sendWSMessage_10000(1, _860RipMach, _860RipTalkSeries, 6, 6, -1, _860RipTalkSeries, 6, 6, 0);
|
||||
break;
|
||||
|
||||
case 80:
|
||||
sendWSMessage_10000(1, _860RipMach, _860RipCrossSeries, 21, 164, 1, _860RipWalkSeries, 1, 1, 0);
|
||||
digi_play_loop("809_s04", 1, 200, -1, 809);
|
||||
break;
|
||||
|
||||
case 91:
|
||||
g_engine->set_camera_delta_pan(-30, 0);
|
||||
digi_play("baronstg", 1, 255, -1, 860);
|
||||
kernel_timing_trigger(210, 1000, nullptr);
|
||||
break;
|
||||
|
||||
case 92:
|
||||
digi_stop(2);
|
||||
disable_player_commands_and_fade_init(93);
|
||||
break;
|
||||
|
||||
case 93:
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_stop(1);
|
||||
|
||||
digi_unload("809_s04");
|
||||
digi_unload("860r01");
|
||||
digi_unload("860r02");
|
||||
digi_unload("860m01");
|
||||
digi_unload("860m02");
|
||||
digi_unload("860b01");
|
||||
digi_unload("baronstg");
|
||||
|
||||
digi_play_loop("950_s45", 3, 80, -1, 950);
|
||||
|
||||
_G(game).setRoom(811);
|
||||
break;
|
||||
|
||||
case 1000:
|
||||
digi_play("860b01", 2, 255, 92, 860);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
55
engines/m4/riddle/rooms/section8/room860.h
Normal file
55
engines/m4/riddle/rooms/section8/room860.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/* 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_SECTION8_ROOM860_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM860_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room860 : public Room {
|
||||
public:
|
||||
Room860() : Room() {}
|
||||
~Room860() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
|
||||
private:
|
||||
int32 _860DragonHeadsSpewingSeries = 0;
|
||||
int32 _860MeiTalkSeries = 0;
|
||||
int32 _860RipCrossSeries = 0;
|
||||
int32 _860RipTalkSeries = 0;
|
||||
int32 _860RipWalkSeries = 0;
|
||||
|
||||
machine *_860McMach = nullptr;
|
||||
machine *_860RipMach = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
135
engines/m4/riddle/rooms/section8/room861.cpp
Normal file
135
engines/m4/riddle/rooms/section8/room861.cpp
Normal file
@@ -0,0 +1,135 @@
|
||||
/* 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/section8/room861.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
void Room861::preload() {
|
||||
Room::preload();
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room861::init() {
|
||||
interface_hide();
|
||||
player_set_commands_allowed(false);
|
||||
|
||||
digi_preload("950_s45", 950);
|
||||
digi_play_loop("950_s45", 3, 150, -1, 950);
|
||||
_all1Series = series_load("861all1");
|
||||
_all2Series = series_load("861all2");
|
||||
|
||||
digi_preload("861r03");
|
||||
digi_preload("811_s02");
|
||||
digi_preload("811_s05");
|
||||
digi_preload("861_s01");
|
||||
digi_preload("861_s02");
|
||||
digi_preload("861_s02a");
|
||||
|
||||
_soldrSeries = series_load("861soldr");
|
||||
_soldrMach = series_show("861soldr", 0x400);
|
||||
_all1Mach = series_stream("861all", 4, 0x100, 5);
|
||||
series_stream_break_on_frame(_all1Mach, 9, 2);
|
||||
}
|
||||
|
||||
void Room861::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 2:
|
||||
digi_play("811_s05", 1, 255, -1, 811);
|
||||
series_stream_break_on_frame(_all1Mach, 90, 4);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
digi_play("811_s02", 1, 255, -1, 811);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
_all1Mach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100,
|
||||
0x100, false, triggerMachineByHashCallback, "861all1");
|
||||
sendWSMessage_10000(1, _all1Mach, _all1Series, 1, 24, 10,
|
||||
_all1Series, 24, 24, 0);
|
||||
sendWSMessage_190000(_all1Mach, 12);
|
||||
terminateMachineAndNull(_soldrMach);
|
||||
series_unload(_soldrSeries);
|
||||
_fallMach = series_stream("861_fall", 9, 0x300, 80);
|
||||
series_stream_break_on_frame(_fallMach, 42, 1002);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
digi_play("861_s01", 2, 255, -1, 861);
|
||||
midi_play("tiawa", 180, true, -1, 949);
|
||||
_all2Mach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0,
|
||||
100, 0x200, false, triggerMachineByHashCallback, "861 all2");
|
||||
sendWSMessage_10000(1, _all2Mach, _all2Series, 1, 20, 20,
|
||||
_all2Series, 20, 20, 0);
|
||||
sendWSMessage_10000(1, _all1Mach, _all1Series, 25, 42, 15,
|
||||
_all1Series, 43, 47, 4);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
sendWSMessage_1a0000(_all1Mach, 10);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
sendWSMessage_10000(1, _all2Mach, _all2Series, 21, 44, 91,
|
||||
_all2Series, 45, 58, 0);
|
||||
digi_play("861r03", 2);
|
||||
break;
|
||||
|
||||
case 91:
|
||||
disable_player_commands_and_fade_init(-1);
|
||||
break;
|
||||
|
||||
case 92:
|
||||
digi_stop(1);
|
||||
adv_kill_digi_between_rooms(false);
|
||||
digi_unload("861r03");
|
||||
digi_unload("811_s02");
|
||||
digi_unload("811_s05");
|
||||
digi_unload("861_s01");
|
||||
digi_unload("861_s02");
|
||||
digi_unload("861_s02a");
|
||||
digi_play_loop("950_s45", 3, 128, -1, 950);
|
||||
_G(game).setRoom(818);
|
||||
break;
|
||||
|
||||
case 1001:
|
||||
digi_play("861_s02", 1, 255, 92);
|
||||
break;
|
||||
|
||||
case 1002:
|
||||
digi_play("861_s02a", 1);
|
||||
series_stream_break_on_frame(_fallMach, 52, 1001);
|
||||
break;
|
||||
|
||||
case 80:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
54
engines/m4/riddle/rooms/section8/room861.h
Normal file
54
engines/m4/riddle/rooms/section8/room861.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* 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_SECTION8_ROOM861_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_ROOM861_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Room861 : public Room {
|
||||
private:
|
||||
int _all1Series = 0;
|
||||
int _all2Series = 0;
|
||||
int _soldrSeries = 0;
|
||||
machine *_soldrMach = nullptr;
|
||||
machine *_all1Mach = nullptr;
|
||||
machine *_all2Mach = nullptr;
|
||||
machine *_fallMach = nullptr;
|
||||
|
||||
public:
|
||||
Room861() : Room() {}
|
||||
~Room861() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
77
engines/m4/riddle/rooms/section8/section8.cpp
Normal file
77
engines/m4/riddle/rooms/section8/section8.cpp
Normal 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "m4/riddle/rooms/section8/section8.h"
|
||||
#include "m4/riddle/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
const int16 S8_SHADOW_DIRS1[] = { 230, 231, 232, 233, 234, -1 };
|
||||
const char *S8_SHADOW_NAMES1[] = {
|
||||
"mctsh1",
|
||||
"mctsh2",
|
||||
"mctsh3",
|
||||
"mctsh4",
|
||||
"mctsh5"
|
||||
};
|
||||
|
||||
const int16 S8_SHADOW_DIRS2[] = {220, 221, 222, 223, 224, -1};
|
||||
const char *S8_SHADOW_NAMES2[] = {
|
||||
"mei chen trek walk pos1",
|
||||
"mei chen trek walk pos2",
|
||||
"mei chen trek walk pos3",
|
||||
"mei chen trek walk pos4",
|
||||
"mei chen trek walk pos5"
|
||||
};
|
||||
|
||||
|
||||
Section8::Section8() : Rooms::Section() {
|
||||
add(801, &_room801);
|
||||
add(802, &_room802);
|
||||
add(803, &_room803);
|
||||
add(804, &_room804);
|
||||
add(805, &_room805);
|
||||
add(806, &_room806);
|
||||
add(807, &_room807);
|
||||
add(808, &_room808);
|
||||
add(809, &_room809);
|
||||
add(810, &_room810);
|
||||
add(811, &_room811);
|
||||
add(814, &_room814);
|
||||
add(818, &_room818);
|
||||
add(824, &_room824);
|
||||
add(834, &_room834);
|
||||
add(844, &_room844);
|
||||
add(850, &_room850);
|
||||
add(852, &_room852);
|
||||
add(860, &_room860);
|
||||
add(861, &_room861);
|
||||
}
|
||||
|
||||
void Section8::daemon() {
|
||||
_G(kernel).continue_handling_trigger = true;
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
91
engines/m4/riddle/rooms/section8/section8.h
Normal file
91
engines/m4/riddle/rooms/section8/section8.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/* 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_SECTION8_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_H
|
||||
|
||||
#include "m4/riddle/rooms/section.h"
|
||||
#include "m4/riddle/rooms/section8/room801.h"
|
||||
#include "m4/riddle/rooms/section8/room802.h"
|
||||
#include "m4/riddle/rooms/section8/room803.h"
|
||||
#include "m4/riddle/rooms/section8/room804.h"
|
||||
#include "m4/riddle/rooms/section8/room805.h"
|
||||
#include "m4/riddle/rooms/section8/room806.h"
|
||||
#include "m4/riddle/rooms/section8/room807.h"
|
||||
#include "m4/riddle/rooms/section8/room808.h"
|
||||
#include "m4/riddle/rooms/section8/room809.h"
|
||||
#include "m4/riddle/rooms/section8/room810.h"
|
||||
#include "m4/riddle/rooms/section8/room811.h"
|
||||
#include "m4/riddle/rooms/section8/room814.h"
|
||||
#include "m4/riddle/rooms/section8/room818.h"
|
||||
#include "m4/riddle/rooms/section8/room824.h"
|
||||
#include "m4/riddle/rooms/section8/room834.h"
|
||||
#include "m4/riddle/rooms/section8/room844.h"
|
||||
#include "m4/riddle/rooms/section8/room850.h"
|
||||
#include "m4/riddle/rooms/section8/room852.h"
|
||||
#include "m4/riddle/rooms/section8/room860.h"
|
||||
#include "m4/riddle/rooms/section8/room861.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
extern const int16 S8_SHADOW_DIRS1[];
|
||||
extern const char *S8_SHADOW_NAMES1[];
|
||||
|
||||
extern const int16 S8_SHADOW_DIRS2[];
|
||||
extern const char *S8_SHADOW_NAMES2[];
|
||||
|
||||
class Section8 : public Section {
|
||||
private:
|
||||
Room801 _room801;
|
||||
Room802 _room802;
|
||||
Room803 _room803;
|
||||
Room804 _room804;
|
||||
Room805 _room805;
|
||||
Room806 _room806;
|
||||
Room807 _room807;
|
||||
Room808 _room808;
|
||||
Room809 _room809;
|
||||
Room810 _room810;
|
||||
Room811 _room811;
|
||||
Room814 _room814;
|
||||
Room818 _room818;
|
||||
Room824 _room824;
|
||||
Room834 _room834;
|
||||
Room844 _room844;
|
||||
Room850 _room850;
|
||||
Room852 _room852;
|
||||
Room860 _room860;
|
||||
Room861 _room861;
|
||||
|
||||
public:
|
||||
Section8();
|
||||
virtual ~Section8() {}
|
||||
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
1003
engines/m4/riddle/rooms/section8/section8_room.cpp
Normal file
1003
engines/m4/riddle/rooms/section8/section8_room.cpp
Normal file
File diff suppressed because it is too large
Load Diff
100
engines/m4/riddle/rooms/section8/section8_room.h
Normal file
100
engines/m4/riddle/rooms/section8/section8_room.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/* 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_SECTION8_SECTION8ROOM_H
|
||||
#define M4_RIDDLE_ROOMS_SECTION8_SECTION8ROOM_H
|
||||
|
||||
#include "m4/riddle/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Riddle {
|
||||
namespace Rooms {
|
||||
|
||||
class Section8Room : public Room {
|
||||
public:
|
||||
Section8Room() : Room() {}
|
||||
~Section8Room() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override {}
|
||||
void pre_parser() override;
|
||||
void parser() override;
|
||||
void daemon() override;
|
||||
|
||||
protected:
|
||||
int32 _byte1A19BC = 0;
|
||||
int32 _field68 = 0;
|
||||
|
||||
// The array seems to be set and never read. Idem for the index
|
||||
int32 _unkArrayIndex = 0;
|
||||
int32 _unkArray[8];
|
||||
|
||||
int32 _824fire2Serie = 0;
|
||||
int32 _case7RandVal = 0;
|
||||
int32 _coordArrayId = 0;
|
||||
int32 _counter1 = 0;
|
||||
int32 _currentRoom = 0;
|
||||
int32 _dynSerie1 = 0;
|
||||
int32 _guessFacing = 0;
|
||||
int32 _guessIndex = 0;
|
||||
int32 _guessX = 0;
|
||||
int32 _mctdSerie = 0;
|
||||
int32 _meiHandsBehindBack = 0;
|
||||
int32 _ripAttemptsPush = 0;
|
||||
int32 _ripLooksAround = 0;
|
||||
int32 _ripTakerPos5 = 0;
|
||||
int32 _ripTrekLowReach = 0;
|
||||
int32 _rptldSerie = 0;
|
||||
int32 _savedNextRoom = 0;
|
||||
int32 _savedPlayerInfoFacing = 0;
|
||||
int32 _savedPlayerInfoX = 0;
|
||||
int32 _savedPlayerInfoY = 0;
|
||||
int32 _savedRandom = 0;
|
||||
|
||||
int32 _var1 = 0;
|
||||
int32 _var2 = 0;
|
||||
int32 _var3 = 0;
|
||||
int32 _var4 = 0;
|
||||
int32 _var5 = 0;
|
||||
|
||||
Common::String _currentSeriesName;
|
||||
Common::String _guessHotspotName;
|
||||
|
||||
machine *_824fire1Mach = nullptr;
|
||||
machine *_824fire2Mach = nullptr;
|
||||
machine *_844postMach = nullptr;
|
||||
machine *_dynSerie1Mach = nullptr;
|
||||
machine *_machArr[4] = {nullptr, nullptr, nullptr, nullptr};
|
||||
machine *_mcTrekMach = nullptr;
|
||||
machine *_ripPushMach = nullptr;
|
||||
|
||||
int32 getStatueIndex(int32 val1);
|
||||
int32 subCE52E(int32 val1);
|
||||
void moveScreen(int32 dx, int32 dy);
|
||||
void getSeriesName(int32 val1, bool true_or_False);
|
||||
int32 daemonSub1(int32 dx, bool ascendingFl);
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user