Initial commit

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

View 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/burger/rooms/section4/room401.h"
#include "m4/burger/vars.h"
namespace M4 {
namespace Burger {
namespace Rooms {
const seriesStreamBreak Room401::SERIES1[] = {
{ 7, "401v001", 1, 255, -1, 0, nullptr, 0 },
{ 36, "401A_002", 2, 200, -1, 0, nullptr, 0 },
{ 89, nullptr, 0, 0, 9, 0, nullptr, 0 },
STREAM_BREAK_END
};
const seriesStreamBreak Room401::SERIES2[] = {
{ 0, "401B_003", 2, 200, -1, 0, nullptr, 0 },
{ 41, "401Z001", 1, 255, -1, 0, nullptr, 0 },
{ 69, "401Z002", 1, 255, -1, 0, nullptr, 0 },
{ 99, "401V002", 1, 255, -1, 0, nullptr, 0 },
{ 162, "401Z003", 1, 255, -1, 0, nullptr, 0 },
{ 228, "401V003", 1, 255, -1, 0, nullptr, 0 },
{ 319, "401Z004", 1, 255, -1, 0, nullptr, 0 },
{ 386, "401V004", 1, 255, -1, 0, nullptr, 0 },
{ 417, "401V005", 1, 255, -1, 0, nullptr, 0 },
{ 461, "401Z005", 1, 255, -1, 0, nullptr, 0 },
{ 567, "401V006", 1, 255, -1, 0, nullptr, 0 },
{ 582, "401Z006", 1, 255, -1, 0, nullptr, 0 },
{ 661, "401V007", 1, 255, -1, 0, nullptr, 0 },
{ 758, nullptr, 0, 0, 9, 0, nullptr, 0 },
STREAM_BREAK_END
};
const seriesStreamBreak Room401::SERIES3[] = {
{ 0, "401C_001", 3, 150, -1, (uint)-1, nullptr, 0 },
{ 19, "401z007", 1, 255, -1, 0, nullptr, 0 },
{ 45, "401f001", 1, 255, -1, 0, nullptr, 0 },
{ 63, "401z008", 1, 255, -1, 0, nullptr, 0 },
{ 100, nullptr, 0, 0, 8, 0, nullptr, 0 },
{ 102, "401f002", 1, 255, -1, 0, nullptr, 0 },
{ 104, nullptr, 0, 0, 9, 0, nullptr, 0 },
STREAM_BREAK_END
};
void Room401::preload() {
_G(player).walker_in_this_scene = false;
}
void Room401::init() {
_G(flags).reset5();
player_set_commands_allowed(false);
digi_preload("401_001");
digi_preload_stream_breaks(SERIES1);
digi_preload_stream_breaks(SERIES2);
digi_preload_stream_breaks(SERIES3);
digi_play_loop("401_001", 3, 75, -1, 401);
kernel_trigger_dispatch_now(1);
}
void Room401::daemon() {
switch (_G(kernel).trigger) {
case 1:
series_stream_with_breaks(SERIES1, "401_01a", 6, 1, 2);
pal_fade_init(0, 255, 100, 30, -1);
break;
case 2:
pal_fade_set_start(0);
kernel_timing_trigger(6, 3);
break;
case 3:
compact_mem_and_report();
kernel_timing_trigger(6, 4);
break;
case 4:
series_stream_with_breaks(SERIES2, "401_01b", 6, 1, 5);
pal_fade_init(0, 255, 100, 30, -1);
break;
case 5:
pal_fade_set_start(0);
kernel_timing_trigger(6, 6);
break;
case 6:
compact_mem_and_report();
kernel_timing_trigger(6, 7);
break;
case 7:
digi_unload_stream_breaks(SERIES1);
digi_unload_stream_breaks(SERIES2);
_series1 = series_stream_with_breaks(SERIES3, "401_02", 6, 1, 4002);
pal_fade_init(0, 255, 100, 30, -1);
break;
case 8:
series_set_frame_rate(_series1, 20);
break;
case 9:
pal_fade_init(_G(kernel).first_fade, 255, 0, 30, -1);
break;
default:
_G(kernel).continue_handling_trigger = true;
break;
}
}
} // namespace Rooms
} // namespace Burger
} // namespace M4

View File

@@ -0,0 +1,51 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_BURGER_ROOMS_SECTION4_ROOM401_H
#define M4_BURGER_ROOMS_SECTION4_ROOM401_H
#include "m4/burger/rooms/room.h"
namespace M4 {
namespace Burger {
namespace Rooms {
class Room401 : public Room {
private:
static const seriesStreamBreak SERIES1[];
static const seriesStreamBreak SERIES2[];
static const seriesStreamBreak SERIES3[];
machine *_series1 = nullptr;
public:
Room401() : Room() {}
~Room401() override {}
void preload() override;
void init() override;
void daemon() override;
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,111 @@
/* 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_BURGER_ROOMS_SECTION4_ROOM402_H
#define M4_BURGER_ROOMS_SECTION4_ROOM402_H
#include "m4/burger/rooms/section4/section4_room.h"
namespace M4 {
namespace Burger {
namespace Rooms {
class Room402 : public Section4Room {
private:
static const char *SAID[][4];
static const seriesStreamBreak SERIES1[];
static const seriesStreamBreak SERIES2[];
static const seriesPlayBreak PLAY1[];
static const seriesPlayBreak PLAY2[];
static const seriesPlayBreak PLAY3[];
static const seriesPlayBreak PLAY4[];
static const seriesPlayBreak PLAY5[];
static const seriesPlayBreak PLAY6[];
static const seriesPlayBreak PLAY7[];
static const seriesPlayBreak PLAY8[];
static const seriesPlayBreak PLAY9[];
static const seriesPlayBreak PLAY10[];
static const seriesPlayBreak PLAY11[];
static const seriesPlayBreak PLAY12[];
static const seriesPlayBreak PLAY13[];
static const seriesPlayBreak PLAY14[];
static const seriesPlayBreak PLAY15[];
static const seriesPlayBreak PLAY16[];
const char *_digiName = nullptr;
KernelTriggerType _newMode = KT_DAEMON;
bool _stolieSet = false;
Series _stolie;
bool _series2Set = false;
Series _series2;
Series _series3;
int _dr01 = -1, _dr01s = -1;
int _dr02 = -1, _dr02s = -1;
int _dr03 = -1, _dr03s = -1;
int _dr08 = -1, _dr08s = -1;
int _pe01 = -1, _pe01s = -1;
int _pe02 = -1, _pe02s = -1;
int _pe03 = -1, _pe03s = -1;
int _pe04 = -1, _pe04s = -1;
int _wi01 = -1, _wi01s = -1;
int _wi02 = -1, _wi02s = -1;
int _digiTrigger = 0;
int _stolieShould = 0;
int _elmoShould = 0;
int _val4 = 0;
int _elmoMode = 0;
int _stolieMode = 0;
void conv84();
void playDigiName();
void playRandom1();
void playRandom2();
void freeStolie();
void freeSeries2();
void loadDr1();
void freeDr1();
void loadDr2();
void freeDr2();
void loadDr8();
void freeDr8();
void loadPe1();
void freePe1();
void loadPe2();
void freePe2();
void loadPe3();
void freePe3();
void loadPe4();
void freePe4();
public:
Room402() : Section4Room() {}
~Room402() override {}
void init() override;
void daemon() override;
void pre_parser() override;
void parser() override;
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif

View File

@@ -0,0 +1,159 @@
/* 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/burger/rooms/section4/room404.h"
#include "m4/burger/vars.h"
namespace M4 {
namespace Burger {
namespace Rooms {
const char *Room404::SAID[][4] = {
{ "QUARTER ", "404w001", nullptr, "404w002" },
{ "IMPOUND YARD", nullptr, "400w001", nullptr },
{ "TOILET", "404w003", "400w001", "404w004" },
{ "SINK", "404w005", "400w001", "404w006" },
{ "COT", "404w007", nullptr, "404w008" },
{ "MARKS", "404w103", nullptr, nullptr },
{ "NEWSPAPER", "404w009", "404w010", "404w011" },
{ "BARS", "404w012", "400w001", "400w001" },
{ nullptr, nullptr, nullptr, nullptr }
};
const seriesPlayBreak Room404::PLAY1[] = {
{ 1, 9, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
{ 10, 17, nullptr, 0, 0, 10016, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
void Room404::init() {
digi_preload("400_001");
digi_play_loop("400_001", 3, 125);
pal_cycle_init(112, 127, 6);
if (_G(flags)[V162]) {
hotspot_set_active("QUARTER ", false);
} else {
hotspot_set_active("QUARTER ", true);
_quarter.show("404wi01", 0xf00);
}
switch (_G(game).previous_room) {
case KERNEL_RESTORING_GAME:
break;
case 406:
ws_demand_location(320, 350, 1);
break;
default:
_G(flags)[V171] = 4001;
_G(flags)[V172] = 10026;
_G(flags)[V176] = 1;
_G(flags)[V175] = 1;
_G(flags)[V174] = 4004;
ws_demand_location(320, 271, 5);
break;
}
}
void Room404::daemon() {
switch (_G(kernel).trigger) {
case 1:
player_update_info();
if (_G(player_info).y > 350) {
disable_player_commands_and_fade_init(-1);
} else {
kernel_timing_trigger(6, 1);
}
break;
case kCHANGE_WILBUR_ANIMATION:
switch (_G(wilbur_should)) {
case 1:
_G(wilbur_should) = 2;
disable_player();
series_play_with_breaks(PLAY1, "404wi01", 0x200, kCHANGE_WILBUR_ANIMATION, 1);
break;
case 2:
_G(wilbur_should) = 10001;
_quarter.terminate();
_G(flags)[V162] = 1;
hotspot_set_active("QUARTER ", false);
inv_give_to_player("QUARTER");
break;
default:
_G(kernel).continue_handling_trigger = true;
break;
}
break;
default:
_G(kernel).continue_handling_trigger = true;
break;
}
}
void Room404::pre_parser() {
_G(kernel).trigger_mode = KT_DAEMON;
if (player_said("IMPOUND YARD")) {
if (!player_said_any("EXIT", "LOOK AT", "GEAR")) {
player_hotspot_walk_override(320, 346, 5);
} else {
player_set_commands_allowed(false);
kernel_trigger_dispatch_now(1);
}
}
}
void Room404::parser() {
_G(kernel).trigger_mode = KT_DAEMON;
if (_G(walker).wilbur_said(SAID)) {
// Already handled
} else if (player_said("IMPOUND YARD")) {
if (player_said_any("EXIT", "LOOK AT", "GEAR")) {
kernel_trigger_dispatch_now(4005);
} else {
wilbur_speech("400w001");
}
} else if (player_said("TAKE", "QUARTER ")) {
_G(wilbur_should) = 1;
kernel_trigger_dispatch_now(kCHANGE_WILBUR_ANIMATION);
} else if (player_said("TOILET")) {
wilbur_speech("404w004");
} else if (player_said("BARS")) {
wilbur_speech("404w013");
} else {
return;
}
_G(player).command_ready = false;
}
} // namespace Rooms
} // namespace Burger
} // namespace M4

View 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_BURGER_ROOMS_SECTION4_ROOM404_H
#define M4_BURGER_ROOMS_SECTION4_ROOM404_H
#include "m4/burger/rooms/room.h"
namespace M4 {
namespace Burger {
namespace Rooms {
/**
* Error: room not found
*/
class Room404 : public Room {
private:
static const char *SAID[][4];
static const seriesPlayBreak PLAY1[];
Series _quarter;
public:
Room404() : Room() {}
~Room404() override {}
void init() override;
void daemon() override;
void pre_parser() override;
void parser() override;
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
/* 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_BURGER_ROOMS_SECTION4_ROOM405_H
#define M4_BURGER_ROOMS_SECTION4_ROOM405_H
#include "m4/burger/rooms/section4/section4_room.h"
namespace M4 {
namespace Burger {
namespace Rooms {
class Room405 : public Section4Room {
private:
static const char *SAID[][4];
static const seriesStreamBreak SERIES1[];
static const seriesPlayBreak PLAY1[];
static const seriesPlayBreak PLAY2[];
static const seriesPlayBreak PLAY3[];
static const seriesPlayBreak PLAY4[];
static const seriesPlayBreak PLAY5[];
static const seriesPlayBreak PLAY6[];
static const seriesPlayBreak PLAY7[];
machine *_series1 = nullptr;
machine *_records = nullptr;
machine *_box = nullptr;
machine *_lid = nullptr;
machine *_eu02 = nullptr;
Series _vp03;
Series _cat;
const char *_digiName = nullptr;
int32 _vpoof = -1;
KernelTriggerType _newMode = (KernelTriggerType)0;
int _volume = 0;
int _vipeShould = 0;
int _vipeMode = 0;
int _veraShould = 0;
int _veraMode = 0;
int _muffinsState = 0;
int _newTrigger = 0;
void conv86();
void conv89();
void conv90();
void conv91();
void conv92();
void startConv89();
void startConv90();
void startConv91();
void talkToVipe();
void talkToVera();
void playDigi();
void playDigi2() {
playDigi();
}
public:
Room405() : Section4Room() {}
~Room405() override {}
void init() override;
void daemon() override;
void pre_parser() override;
void parser() override;
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,134 @@
/* 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_BURGER_ROOMS_SECTION4_ROOM406_H
#define M4_BURGER_ROOMS_SECTION4_ROOM406_H
#include "m4/burger/rooms/section4/section4_room.h"
#include "m4/burger/walker.h"
namespace M4 {
namespace Burger {
namespace Rooms {
class Room406 : public Section4Room {
private:
static const char *SAID[][4];
static const WilburMatch MATCH[];
static const seriesStreamBreak SERIES1[];
static const seriesPlayBreak PLAY1[];
static const seriesPlayBreak PLAY2[];
static const seriesPlayBreak PLAY3[];
static const seriesPlayBreak PLAY4[];
static const seriesPlayBreak PLAY5[];
static const seriesPlayBreak PLAY6[];
static const seriesPlayBreak PLAY7[];
static const seriesPlayBreak PLAY8[];
static const seriesPlayBreak PLAY9[];
static const seriesPlayBreak PLAY10[];
static const seriesPlayBreak PLAY11[];
static const seriesPlayBreak PLAY12[];
static const seriesPlayBreak PLAY13[];
static const seriesPlayBreak PLAY14[];
static const seriesPlayBreak PLAY15[];
static const seriesPlayBreak PLAY16[];
static const seriesPlayBreak PLAY17[];
static const seriesPlayBreak PLAY18[];
static const seriesPlayBreak PLAY19[];
static const seriesPlayBreak PLAY20[];
static const seriesPlayBreak PLAY21[];
static const seriesPlayBreak PLAY22[];
static const seriesPlayBreak PLAY23[];
static const seriesPlayBreak PLAY24[];
static const seriesPlayBreak PLAY25[];
static const seriesPlayBreak PLAY26[];
static const seriesPlayBreak PLAY27[];
static const seriesPlayBreak PLAY28[];
static const seriesPlayBreak PLAY29[];
static const seriesPlayBreak PLAY30[];
static const seriesPlayBreak PLAY31[];
static const seriesPlayBreak PLAY32[];
static const seriesPlayBreak PLAY33[];
static const seriesPlayBreak PLAY34[];
static const seriesPlayBreak PLAY35[];
static const seriesPlayBreak PLAY36[];
static int32 _state1;
static int32 _state2;
static int32 _state3;
static int32 _state4;
Series _coll;
Series _gate;
Series _mg03;
int32 _gateS1 = 0, _gateS2 = 0;
int32 _tire = 0;
const char *_seriesName = nullptr;
machine *_tt = nullptr;
machine *_tts = nullptr;
machine *_fish = nullptr;
machine *_wi03 = nullptr;
machine *_coll406 = nullptr;
int32 _fishS = 0;
Common::String _randomDigi;
noWalkRect *_walk1 = nullptr;
noWalkRect *_walk2 = nullptr;
noWalkRect *_walk3 = nullptr;
noWalkRect *_walk4 = nullptr;
HotSpotRec *_hotspot = nullptr;
bool _flag1 = false;
bool _flag2 = false;
bool _flag3 = false;
int _ticks = 0;
int _dogShould = 0;
int _val2 = 0;
//int _val3 = 0;
int _val4 = 0;
int _mayorShould = 0;
int _val6 = 0;
int _val7 = 0;
void loadSeries();
void setHotspots1();
void setHotspots2();
void setHotspots3();
void setHotspots4();
void setupFish();
void setupTt();
void setNoWalk();
void parseJail();
void playRandom(int trigger);
int tabooAreaY(int x) const;
void triggerPreparser();
public:
Room406();
~Room406() override {}
void init() override;
void daemon() override;
void pre_parser() override;
void parser() override;
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif

View File

@@ -0,0 +1,719 @@
/* 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/burger/rooms/section4/room407.h"
#include "m4/burger/vars.h"
namespace M4 {
namespace Burger {
namespace Rooms {
enum {
kWILBUR_SPEECH = 4,
kCHANGE_DRUMZ_ANIMATION = 7,
kCHANGE_ROXY_ANIMATION = 8,
kCHANGE_VIPE_ANIMATION = 9
};
const char *Room407::SAID[][4] = {
{ "TOUR BUS", "407w001", "407w002", "407w003" },
{ "ROXY", nullptr, "400w001", "400w001" },
{ "DRUMZ", "407w007", "400w001", "400w001" },
{ "INSTRUMENTS", "407w009", "407w010", "407w010" },
{ "FORCE FIELD", "400w005", nullptr, "400w001" },
{ "FORCE FIELD ", "400w005", nullptr, "400w001" }
};
const WilburMatch Room407::MATCH[] = {
{ "TALK", "DRUMZ", 11, nullptr, 0, nullptr, 0 },
{ "AMPLIFIER", "DRUMZ", 4, nullptr, 0, &_speechNum, 4 },
{ nullptr, "DRUMZ", 4, nullptr, 0, &_speechNum, 7 },
{ "LOOK AT", "ROXY", 10016, nullptr, 0, &Vars::_wilbur_should, 1 },
{ "TALK", "ROXY", 10016, nullptr, 0, &Vars::_wilbur_should, 2 },
{ "AMPLIFIER", "ROXY", 4, nullptr, 0, &_speechNum, 4 },
{ "DOG COLLAR", "ROXY", 4, nullptr, 0, &_speechNum, 5 },
{ nullptr, "ROXY", 4, nullptr, 0, &_speechNum, 6 },
{ "AMPLIFIER", "INSTRUMENTS", 4, nullptr, 0, &_speechNum, 8 },
{ nullptr, "INSTRUMENTS", 4, nullptr, 0, &_speechNum, 9 },
{ nullptr, "TOUR BUS", 4, nullptr, 0, &_speechNum, 3 },
{ nullptr, nullptr, -1, nullptr, 0, nullptr, 0 }
};
const seriesPlayBreak Room407::PLAY1[] = {
{ 0, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY2[] = {
{ 0, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY3[] = {
{ 0, 1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
{ 2, -1, nullptr, 0, 0, -1, 0, 4, nullptr, 0 },
{ 0, 1, nullptr, 0, 0, -1, 2, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY4[] = {
{ 0, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY5[] = {
{ 0, -1, "145_004", 2, 255, -1, 1, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY6[] = {
{ 0, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY7[] = {
{ 0, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY8[] = {
{ 0, -1, "407r901", 1, 255, -1, 4, -1, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY9[] = {
{ 0, -1, "407r903", 1, 255, -1, 4, -1, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY10[] = {
{ 0, -1, nullptr, 0, 0, -1, 2, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY11[] = {
{ 0, 2, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
{ 3, -1, "407r904x", 1, 255, -1, 4, -1, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY12[] = {
{ 0, 6, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY13[] = {
{ 7, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY14[] = {
{ 0, -1, "407r904y", 1, 255, -1, 4, -1, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY15[] = {
{ 0, 3, "407v901", 1, 255, -1, 4, -1, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY16[] = {
{ 5, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY17[] = {
{ 1, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
const seriesPlayBreak Room407::PLAY18[] = {
{ 0, 1, "999_003", 1, 255, -1, 0, 0, nullptr, 0 },
{ 2, 9, nullptr, 0, 0, 7, 0, 0, nullptr, 0 },
{ 10, 11, "999_003", 1, 255, -1, 0, 0, nullptr, 0 },
{ 12, -1, nullptr, 0, 0, 9, 0, 0, nullptr, 0 },
PLAY_BREAK_END
};
int32 Room407::_speechNum;
Room407::Room407() : Section4Room() {
_speechNum = 0;
}
void Room407::init() {
digi_preload("400_001");
digi_play_loop("400_001", 3, 125, -1);
pal_cycle_init(112, 127, 6);
if (!_G(flags)[V181] && _G(flags)[V171] == 4003) {
_G(flags)[kDisableFootsteps] = 1;
player_set_commands_allowed(false);
}
_flag1 = false;
if (_G(flags)[V181]) {
hotspot_set_active("DRUMZ", false);
hotspot_set_active("VIPE", false);
hotspot_set_active("ROXY", false);
} else {
loadSeries();
_walk1 = intr_add_no_walk_rect(140, 295, 240, 325, 139, 326);
_drumzShould = 10;
kernel_trigger_dispatch_now(kCHANGE_DRUMZ_ANIMATION);
_roxyShould = 22;
kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION);
if (_G(flags)[V171] == 4003)
_vp02.show("407vp02", 0x300);
}
switch (_G(game).previous_room) {
case KERNEL_RESTORING_GAME:
break;
case 402:
ws_demand_location(43, 302);
poofArrive();
break;
case 405:
ws_demand_location(578, 296);
poofArrive();
break;
default:
ws_demand_location(520, 330, 9);
break;
}
}
void Room407::daemon() {
switch (_G(kernel).trigger) {
case 1:
poof(2);
break;
case 2:
disable_player_commands_and_fade_init(_val1);
break;
case 3:
_G(walker).wilbur_poof();
if (!_G(flags)[V181] && _G(flags)[V171] == 4003) {
ws_unhide_walker();
} else {
enable_player();
}
break;
case kWILBUR_SPEECH:
switch (_speechNum) {
case 3:
wilbur_speech("400w001");
break;
case 4:
wilbur_speech("407w004");
break;
case 5:
wilbur_speech("407w005");
break;
case 6:
wilbur_speech("407w006");
break;
case 7:
wilbur_speech("407w008");
break;
case 8:
wilbur_speech("407w011");
break;
case 9:
wilbur_speech("407w012");
break;
default:
break;
}
break;
case 5:
_drumzShould = 17;
if (_roxyState) {
kernel_timing_trigger(120, 7);
} else {
const int rnd = imath_ranged_rand(1, 25);
if (rnd >= 16)
_digiName = "407r902a";
else
_digiName = Common::String::format("407r902%c", 'a' + rnd);
_flag1 = true;
digi_preload(_digiName);
digi_play(_digiName.c_str(), 2, 180, 6);
}
break;
case 6:
digi_unload(_digiName);
kernel_trigger_dispatch_now(7);
break;
case kCHANGE_DRUMZ_ANIMATION:
switch (_drumzShould) {
case 10:
if (!digi_play_state(2))
digi_play_loop("407_001", 2);
_drumzShould = getDrumzShould();
series_play_with_breaks(PLAY1, "407dz01", 0xa01, kCHANGE_DRUMZ_ANIMATION, 3);
break;
case 11:
_drumzShould = 14;
series_play_with_breaks(PLAY2, "407dz02", 0xa01, kCHANGE_DRUMZ_ANIMATION, 3);
break;
case 12:
_drumzShould = 14;
series_play_with_breaks(PLAY3, "407dz03", 0xa01, kCHANGE_DRUMZ_ANIMATION, 3);
break;
case 13:
digi_stop(2);
_drumzShould = 14;
series_play_with_breaks(PLAY4, "407dz04", 0xa01, kCHANGE_DRUMZ_ANIMATION, 3);
break;
case 14:
_drumzShould = getDrumzShould();
kernel_trigger_dispatch_now(kCHANGE_DRUMZ_ANIMATION);
kernel_trigger_dispatch_now(10001);
break;
case 15:
digi_stop(2);
_drumzShould = getDrumzShould();
series_play_with_breaks(PLAY5, "407dz05", 0xa01, kCHANGE_DRUMZ_ANIMATION, 3);
break;
case 16:
digi_stop(2);
_dzS1 = series_load("407dz06");
_dzS2 = series_load("407dz06s");
_dz.play("407dz06", 0xa01, 18, -1, 6, 0, 100, 0, 0, 2, 7);
kernel_trigger_dispatch_now(5);
break;
case 17:
_flag1 = false;
freeDz();
_drumzShould = getDrumzShould();
series_play_with_breaks(PLAY6, "407dz06", 0xa01, kCHANGE_DRUMZ_ANIMATION, 3);
break;
case 18:
_flag1 = false;
freeDz();
_drumzShould = 19;
series_play_with_breaks(PLAY6, "407dz06", 0xa01, kCHANGE_DRUMZ_ANIMATION, 3);
break;
case 19:
if (!digi_play_state(2))
digi_play_loop("407_001", 2);
conv88();
kernel_trigger_dispatch_now(kCHANGE_DRUMZ_ANIMATION);
break;
case 20:
digi_stop(2);
_dz.play("407dz02", 0xa01, 16, -1, 6, 0, 100, 0, 0, 0, 2);
break;
case 21:
_dz.terminate();
hotspot_set_active("DRUMZ", false);
intr_remove_no_walk_rect(_walk1);
break;
default:
break;
}
break;
case kCHANGE_ROXY_ANIMATION:
switch (_roxyShould) {
case 22:
_roxyState = 0;
_rx = series_show("407rx02", 0x901);
break;
case 23:
terminateMachineAndNull(_rx);
switch (_roxyState) {
case 1:
_roxyShould = 26;
break;
case 2:
_roxyShould = 24;
break;
case 3:
_roxyShould = 27;
break;
default:
break;
}
series_play_with_breaks(PLAY7, "407rx02", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 24:
_rx = series_show("407rx02", 0x901, 0, -1, -1, 4);
kernel_trigger_dispatch_now(10);
break;
case 25:
terminateMachineAndNull(_rx);
_rx = series_show("407rx02", 0x901, 0, -1, -1, 4);
conv_resume_curr();
break;
case 26:
terminateMachineAndNull(_rx);
_roxyShould = 30;
series_play_with_breaks(PLAY9, "407rx04", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 27:
_roxyShould = 28;
series_play_with_breaks(PLAY8, "407rx04", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 28:
_roxyShould = 29;
series_play_with_breaks(PLAY10, "407rx02", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 29:
_roxyShould = 22;
kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION);
player_set_commands_allowed(true);
break;
case 30:
_roxyShould = 31;
series_play_with_breaks(PLAY11, "407rx06", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 31:
_vipeShould = 36;
kernel_trigger_dispatch_now(kCHANGE_VIPE_ANIMATION);
_roxyShould = 32;
series_play_with_breaks(PLAY12, "407rx08", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 32:
_roxyShould = 33;
series_play_with_breaks(PLAY13, "407rx08", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 33:
_roxyShould = 34;
series_play_with_breaks(PLAY14, "407rx09", 0x901, kCHANGE_ROXY_ANIMATION, 2);
break;
case 34:
kernel_trigger_dispatch_now(14);
terminateMachineAndNull(_rx);
_rx = series_show("407rx09", 0x901);
break;
default:
break;
}
break;
case kCHANGE_VIPE_ANIMATION:
switch (_vipeShould) {
case 35:
_vp02.show("407vp02", 0x300);
_roxyState = 1;
_roxyShould = 23;
kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION);
break;
case 36:
_vp02.terminate();
_vipeShould = 37;
series_play_with_breaks(PLAY16, "407vp02", 0x300, kCHANGE_VIPE_ANIMATION, 3);
break;
case 37:
_vipeShould = 39;
series_play_with_breaks(PLAY17, "407vp03", 0x300, kCHANGE_VIPE_ANIMATION, 3);
break;
case 38:
_vp02.terminate();
_drumzShould = 20;
_vipeShould = 35;
series_play_with_breaks(PLAY15, "407vp02", 0x300, kCHANGE_VIPE_ANIMATION, 3);
player_set_facing_at(412, 336);
break;
case 39:
_vp02.show("407vp05", 0x300);
break;
case 40:
terminateMachineAndNull(_rx);
_vp02.terminate();
hotspot_set_active("ROXY", false);
break;
default:
break;
}
break;
case 10:
_G(flags)[kDisableFootsteps] = 1;
_G(flags)[V299] = 1;
conv_load_and_prepare("conv87", 12);
conv_export_pointer_curr(&_G(flags)[V180], 0);
conv_play_curr();
break;
case 11:
_G(flags)[kDisableFootsteps] = 1;
_G(flags)[V299] = 1;
player_set_commands_allowed(false);
conv_load_and_prepare("conv88", 13);
conv_play_curr();
break;
case 12:
_G(flags)[kDisableFootsteps] = 0;
_G(flags)[V299] = 0;
_G(flags)[V180] = 1;
terminateMachineAndNull(_rx);
_roxyShould = 28;
kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION);
break;
case 13:
_G(flags)[kDisableFootsteps] = 0;
_G(flags)[V299] = 0;
player_set_commands_allowed(true);
break;
case 14:
_G(flags)[kDisableFootsteps] = 0;
_drumzShould = 21;
_vipeShould = 40;
series_play_with_breaks(PLAY18, "407poof", 0x2ff, 4008, 2);
_G(flags)[V181] = 1;
break;
case kCHANGE_WILBUR_ANIMATION:
switch (_G(wilbur_should)) {
case 1:
player_set_commands_allowed(false);
if (_flag1) {
digi_stop(2);
_drumzShould = 17;
kernel_trigger_dispatch_now(kCHANGE_DRUMZ_ANIMATION);
}
_roxyState = 3;
_roxyShould = 20;
kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION);
break;
case 2:
player_set_commands_allowed(false);
if (_flag1) {
digi_stop(2);
_drumzShould = 17;
kernel_trigger_dispatch_now(kCHANGE_DRUMZ_ANIMATION);
}
_roxyState = 2;
_roxyShould = 23;
kernel_trigger_dispatch_now(kCHANGE_ROXY_ANIMATION);
break;
default:
_G(kernel).continue_handling_trigger = true;
break;
}
break;
case kSET_COMMANDS_ALLOWED:
if (!_G(flags)[V181] && _G(flags)[V171] == 4003) {
_vipeShould = 38;
kernel_timing_trigger(60, kCHANGE_VIPE_ANIMATION);
} else {
player_set_commands_allowed(true);
}
break;
default:
_G(kernel).continue_handling_trigger = true;
break;
}
}
void Room407::pre_parser() {
_G(kernel).trigger_mode = KT_DAEMON;
if (!_G(flags)[kDrumzFled] && _G(player).walk_x >= 140 && _G(player).walk_x <= 240 &&
_G(player).walk_y >= 295 && _G(player).walk_y <= 325)
player_walk_to(139, 326);
if (player_said("FORCE FIELD")) {
player_set_facing_hotspot();
} else if (player_said("GEAR", "DISC")) {
_val1 = 4007;
player_hotspot_walk_override(43, 302, -1, 1);
_G(player).command_ready = false;
} else if (player_said("GEAR", "DISC ")) {
_val1 = 4007;
player_hotspot_walk_override(578, 296, -1, 1);
_G(player).command_ready = false;
}
}
void Room407::parser() {
_G(kernel).trigger_mode = KT_DAEMON;
if (_G(walker).wilbur_said(SAID)) {
// Already handled
} else if (player_said("conv87")) {
conv87();
} else if (player_said("conv88")) {
conv88();
} else if (!_G(walker).wilbur_match(MATCH)) {
return;
}
_G(player).command_ready = false;
}
void Room407::loadSeries() {
static const char *NAMES[16] = {
"407dz01", "407dz01s", "407dz02", "407dz02s", "407dz05",
"407dz05s", "407dz06", "407dz06s", "407rx04",
"407vp03", "407vp03s", "407vp05", "407vp05s", "407rx06",
"407rx08", "407rx09"
};
for (int i = 0; i < (_G(flags)[V171] == 4003 ? 16 : 9); ++i)
series_load(NAMES[i]);
digi_preload("407_001");
digi_preload("145_004");
}
void Room407::conv87() {
const char *sound = conv_sound_to_play();
const int who = conv_whos_talking();
if (sound) {
if (who == 1)
wilbur_speech(sound, 10001);
else
playConvSound();
}
}
void Room407::conv88() {
const char *sound = conv_sound_to_play();
const int who = conv_whos_talking();
const int node = conv_current_node();
const int entry = conv_current_entry();
if (sound) {
if (who == 1) {
wilbur_speech(sound, 10001);
} else if (_flag1) {
_drumzShould = 18;
} else if (node == 1) {
switch (entry) {
case 0:
case 2:
case 4:
_drumzShould = 13;
break;
case 1:
_drumzShould = 12;
break;
case 3:
case 5:
_drumzShould = 11;
break;
case 6:
_drumzShould = 10;
conv_resume_curr();
break;
default:
break;
}
}
}
}
int Room407::getDrumzShould() const {
switch (imath_ranged_rand(1, 10)) {
case 1:
return 15;
case 2:
return 16;
default:
return 10;
}
}
void Room407::freeDz() {
_dz.terminate();
series_unload(_dzS1);
series_unload(_dzS2);
}
void Room407::playConvSound() {
terminateMachineAndNull(_rx);
_roxyShould = 25;
digi_play(conv_sound_to_play(), 1, 255, kCHANGE_ROXY_ANIMATION);
_rx = series_play("407rx04", 0x901, 4, -1, 6, -1);
}
} // namespace Rooms
} // namespace Burger
} // namespace M4

View File

@@ -0,0 +1,90 @@
/* 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_BURGER_ROOMS_SECTION4_ROOM407_H
#define M4_BURGER_ROOMS_SECTION4_ROOM407_H
#include "m4/burger/rooms/section4/section4_room.h"
#include "m4/burger/walker.h"
namespace M4 {
namespace Burger {
namespace Rooms {
class Room407 : public Section4Room {
private:
static const char *SAID[][4];
static const WilburMatch MATCH[];
static const seriesPlayBreak PLAY1[];
static const seriesPlayBreak PLAY2[];
static const seriesPlayBreak PLAY3[];
static const seriesPlayBreak PLAY4[];
static const seriesPlayBreak PLAY5[];
static const seriesPlayBreak PLAY6[];
static const seriesPlayBreak PLAY7[];
static const seriesPlayBreak PLAY8[];
static const seriesPlayBreak PLAY9[];
static const seriesPlayBreak PLAY10[];
static const seriesPlayBreak PLAY11[];
static const seriesPlayBreak PLAY12[];
static const seriesPlayBreak PLAY13[];
static const seriesPlayBreak PLAY14[];
static const seriesPlayBreak PLAY15[];
static const seriesPlayBreak PLAY16[];
static const seriesPlayBreak PLAY17[];
static const seriesPlayBreak PLAY18[];
static int32 _speechNum;
Series _vp02;
Series _dz;
int _dzS1 = 0, _dzS2 = 0;
machine *_rx = nullptr;
noWalkRect *_walk1 = nullptr;
Common::String _digiName;
bool _flag1 = false;
int _val1 = 0;
int _drumzShould = 0;
int _roxyShould = 0;
int _roxyState = 0;
int _vipeShould = 0;
//int _digiTrigger = 0;
void loadSeries();
void conv87();
void conv88();
int getDrumzShould() const;
void freeDz();
void playConvSound();
public:
Room407();
~Room407() override {}
void init() override;
void daemon() override;
void pre_parser() override;
void parser() override;
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif

View File

@@ -0,0 +1,261 @@
/* 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/burger/rooms/section4/section4.h"
#include "m4/burger/vars.h"
namespace M4 {
namespace Burger {
namespace Rooms {
const char *Section4::PARSER[] = {
"DEED",
"TAKE",
nullptr,
"WILBUR",
"400w001",
nullptr,
nullptr,
PARSER_ITEM_END,
"JAWZ O' LIFE",
"TAKE",
nullptr,
"BARRED WINDOW",
"404w102",
"BARRED WINDOW ",
"404w102",
"WILBUR",
"400w001",
nullptr,
nullptr,
PARSER_ITEM_END,
"FISH",
"LOOK AT",
"400w100",
"TAKE",
nullptr,
"MUFFIN",
"405w101",
"WILBUR",
"400w101",
nullptr,
"400w102",
PARSER_ITEM_END,
"DOG COLLAR",
"LOOK AT",
"400w103",
"TAKE",
nullptr,
"PEGLEG ",
"406w101",
"WILBUR",
"400w104",
nullptr,
"400W105",
PARSER_ITEM_END,
"HOOK",
"LOOK AT",
"400w106",
"TAKE",
nullptr,
"WILBUR",
"400w001",
nullptr,
"400w107",
PARSER_ITEM_END,
"RECORDS",
"LOOK AT",
"400w108",
"TAKE",
nullptr,
"WILBUR",
"400w001",
nullptr,
"400w109",
PARSER_ITEM_END,
"QUARTER",
"LOOK AT",
"400w110",
"TAKE",
nullptr,
"WILBUR",
"400w001",
nullptr,
"400w111",
PARSER_ITEM_END,
"DISC",
"LOOK AT",
"400w002",
"TAKE",
"400w003",
nullptr,
"400w004",
PARSER_ITEM_END,
"DISC ",
"LOOK AT",
"400w002",
"TAKE",
"400w003",
nullptr,
"400w004",
PARSER_ITEM_END,
nullptr
};
const Section4::TeleportEntry Section4::TELEPORTS[] = {
{ 402, 407, 406 },
{ 405, 407, 406 },
{ 406, 402, 405 },
{ 407, 402, 405 },
{ 0, 0, 0 }
};
Section4::Section4() : Rooms::Section() {
add(401, &_room401);
add(402, &_room402);
add(404, &_room404);
add(405, &_room405);
add(406, &_room406);
add(407, &_room407);
}
void Section4::init() {
if (_G(executing) != WHOLE_GAME) {
inv_give_to_player("JAWZ O' LIFE");
inv_give_to_player("DEED");
}
}
void Section4::daemon() {
switch (_G(kernel).trigger) {
case 4001:
_G(game).setRoom(401);
break;
case 4002:
_G(game).setRoom(402);
break;
case 4003:
_G(game).setRoom(404);
break;
case 4004:
_G(game).setRoom(405);
break;
case 4005:
_G(game).setRoom(406);
break;
case 4006:
_G(game).setRoom(407);
break;
case 4007:
term_message("Teleporting...");
term_message(teleport() ? "...scuccessful" : "ERROR while teleporting!");
break;
case 4008:
player_set_commands_allowed(!checkOrderWindow());
break;
case kCHANGE_WILBUR_ANIMATION:
if (_G(wilbur_should) == 10015) {
kernel_trigger_dispatch_now(10027);
} else {
_G(kernel).continue_handling_trigger = true;
}
break;
default:
_G(kernel).continue_handling_trigger = true;
break;
}
}
void Section4::parser() {
_G(kernel).trigger_mode = KT_DAEMON;
if (_G(walker).wilbur_parser(PARSER))
_G(player).command_ready = false;
}
void Section4::poof(int trigger) {
player_set_commands_allowed(false);
digi_preload("999_003");
player_update_info();
if (_G(my_walker) && _G(player).walker_in_this_scene && _G(player).walker_visible) {
ws_hide_walker();
series_play("999poof", _G(player_info).depth, 0, trigger, 6, 0,
_G(player_info).scale, _G(player_info).x, _G(player_info).y);
} else {
kernel_timing_trigger(120, trigger);
}
digi_play("999_003", 2);
if (!_G(flags)[V154] || imath_rand_bool(8)) {
digi_preload("402w005z");
digi_play("402w005z", 1);
_G(flags)[V154] = 1;
}
}
bool Section4::checkOrderWindow() {
if (_G(flags)[V168] && _G(flags)[V181] && _G(flags)[V176] && _G(flags)[V159]) {
player_set_commands_allowed(false);
_G(flags)[kFifthTestPassed] = 1;
disable_player_commands_and_fade_init(k10027);
return true;
}
return false;
}
bool Section4::teleport() {
const TeleportEntry *te;
for (te = TELEPORTS; te->_room && te->_room != _G(game).room_id; ++te) {
}
if (te->_room) {
if (player_said("DISC")) {
_G(game).setRoom(te->_newRoom1);
term_message("...%d...", te->_newRoom1);
return true;
}
if (player_said("DISC ")) {
_G(game).setRoom(te->_newRoom2);
term_message("...%d...", te->_newRoom2);
return true;
}
}
return false;
}
} // namespace Rooms
} // namespace Burger
} // namespace M4

View File

@@ -0,0 +1,75 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_BURGER_ROOMS_SECTION4_H
#define M4_BURGER_ROOMS_SECTION4_H
#include "m4/burger/rooms/room.h"
#include "m4/burger/rooms/section.h"
#include "m4/burger/rooms/section4/room401.h"
#include "m4/burger/rooms/section4/room402.h"
#include "m4/burger/rooms/section4/room404.h"
#include "m4/burger/rooms/section4/room405.h"
#include "m4/burger/rooms/section4/room406.h"
#include "m4/burger/rooms/section4/room407.h"
namespace M4 {
namespace Burger {
namespace Rooms {
class Section4 : public Rooms::Section {
struct TeleportEntry {
int _room;
int _newRoom1;
int _newRoom2;
};
private:
static const char *PARSER[];
static const TeleportEntry TELEPORTS[];
private:
Room401 _room401;
Room402 _room402;
Room404 _room404;
Room405 _room405;
Room406 _room406;
Room407 _room407;
bool teleport();
public:
static void poof(int trigger);
static bool checkOrderWindow();
public:
Section4();
virtual ~Section4() {}
void init() override;
void daemon() override;
void parser() override;
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif

View File

@@ -0,0 +1,48 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/ },.
*
*/
#include "m4/burger/rooms/section4/section4_room.h"
#include "m4/burger/rooms/section4/section4.h"
#include "m4/burger/vars.h"
namespace M4 {
namespace Burger {
namespace Rooms {
void Section4Room::poofArrive(int ticks) {
player_set_commands_allowed(false);
player_update_info();
_G(player_dest_x) = _G(player_info).x;
_G(player_dest_y) = _G(player_info).y;
ws_demand_location(-100, _G(player_dest_y));
ws_unhide_walker();
kernel_timing_trigger(ticks, kPOOF);
}
void Section4Room::poof(int trigger) {
Section4::poof(trigger);
}
} // namespace Rooms
} // namespace Burger
} // namespace M4

View File

@@ -0,0 +1,45 @@
/* 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_BURGER_ROOMS_SECTION4_ROOM_H
#define M4_BURGER_ROOMS_SECTION4_ROOM_H
#include "m4/burger/rooms/room.h"
namespace M4 {
namespace Burger {
namespace Rooms {
class Section4Room : public Room {
protected:
void poofArrive(int ticks = 120);
void poof(int trigger);
public:
Section4Room() : Room() {}
~Section4Room() override {}
};
} // namespace Rooms
} // namespace Burger
} // namespace M4
#endif