Initial commit
This commit is contained in:
152
engines/m4/burger/rooms/section9/menu_room.cpp
Normal file
152
engines/m4/burger/rooms/section9/menu_room.cpp
Normal file
@@ -0,0 +1,152 @@
|
||||
/* 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/section9/menu_room.h"
|
||||
#include "m4/core/errors.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/burger/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
void MenuRoom::init() {
|
||||
_buttonNum = -1;
|
||||
_highlightedButton = -1;
|
||||
_activeButton = -1;
|
||||
_flag = false;
|
||||
}
|
||||
|
||||
|
||||
void MenuRoom::daemon() {
|
||||
if (_G(kernel).trigger == kCALLED_EACH_LOOP) {
|
||||
if (player_commands_allowed())
|
||||
buttonsFrame();
|
||||
|
||||
} else {
|
||||
_G(kernel).continue_handling_trigger = true;
|
||||
}
|
||||
}
|
||||
|
||||
void MenuRoom::setButtons(const MenuButtonDef *btns, int count) {
|
||||
_buttons.resize(count);
|
||||
for (int i = 0; i < count; ++i)
|
||||
_buttons[i] = btns[i];
|
||||
}
|
||||
|
||||
void MenuRoom::drawButton(int index) {
|
||||
if (index < 0 || index >= (int)_buttons.size())
|
||||
error_show(FL, 'Burg', "draw_button which?");
|
||||
|
||||
MenuButton &btn = _buttons[index];
|
||||
assert(btn._state >= BTNSTATE_DISABLED && btn._state <= BTNSTATE_PRESSED);
|
||||
int frame[4] = {
|
||||
btn._frame_disabled, btn._frame_enabled,
|
||||
btn._frame_highlighted, btn._frame_pressed
|
||||
};
|
||||
btn._machine = series_show(_menuName, 0, 0, -1, -1, frame[btn._state], 100, btn._x1, btn._y1);
|
||||
}
|
||||
|
||||
void MenuRoom::drawButtons() {
|
||||
for (uint i = 0; i < _buttons.size(); ++i)
|
||||
drawButton(i);
|
||||
}
|
||||
|
||||
void MenuRoom::setButtonState(int index, ButtonState newState) {
|
||||
if (index >= 0 && index < (int)_buttons.size()) {
|
||||
MenuButton &btn = _buttons[index];
|
||||
if (btn._state != BTNSTATE_DISABLED && newState != btn._state) {
|
||||
terminateMachineAndNull(btn._machine);
|
||||
btn._state = newState;
|
||||
drawButton(index);
|
||||
}
|
||||
} else if (index != -1) {
|
||||
// LOL: A fine example of original authors sense of humour
|
||||
term_message("ooga booga %d", index);
|
||||
}
|
||||
}
|
||||
|
||||
void MenuRoom::buttonsFrame() {
|
||||
bool newFlag = false;
|
||||
|
||||
_highlightedButton = is_mouse_over_a_button();
|
||||
|
||||
if (_buttonNum == -1) {
|
||||
if (_highlightedButton == -1) {
|
||||
setButtonState(_activeButton, BTNSTATE_ENABLED);
|
||||
} else if (_highlightedButton != _activeButton) {
|
||||
setButtonState(_activeButton, BTNSTATE_ENABLED);
|
||||
setButtonState(_highlightedButton, BTNSTATE_HIGHLIGHTED);
|
||||
}
|
||||
|
||||
_activeButton = _highlightedButton;
|
||||
} else {
|
||||
setButtonState(_buttonNum, _buttonNum == _highlightedButton ? BTNSTATE_PRESSED : BTNSTATE_ENABLED);
|
||||
}
|
||||
|
||||
if (_G(MouseState).ButtonState) {
|
||||
_flag = true;
|
||||
if (_buttonNum == -1)
|
||||
_buttonNum = _highlightedButton;
|
||||
|
||||
if (_buttonNum != -1) {
|
||||
setButtonState(_buttonNum, _buttonNum == _highlightedButton ? BTNSTATE_PRESSED : BTNSTATE_ENABLED);
|
||||
}
|
||||
} else if (_flag) {
|
||||
_flag = false;
|
||||
newFlag = true;
|
||||
}
|
||||
|
||||
if (newFlag) {
|
||||
_G(events).clearMouseStateEvent();
|
||||
|
||||
if (_highlightedButton == _buttonNum && _buttonNum != -1) {
|
||||
term_message("Button pressed: %d", _highlightedButton);
|
||||
|
||||
const MenuButton &btn = _buttons[_highlightedButton];
|
||||
if (btn._state != BTNSTATE_DISABLED) {
|
||||
digi_play(_clickName, 2, 255, -1);
|
||||
kernel_trigger_dispatch_now(btn._trigger);
|
||||
setButtonState(_buttonNum, BTNSTATE_HIGHLIGHTED);
|
||||
}
|
||||
}
|
||||
|
||||
_buttonNum = -1;
|
||||
}
|
||||
}
|
||||
|
||||
int32 MenuRoom::is_mouse_over_a_button() const {
|
||||
for (uint idx = 0; idx < _buttons.size(); ++idx) {
|
||||
const MenuButton &btn = _buttons[idx];
|
||||
|
||||
if (_G(MouseState).CursorColumn >= btn._x1 && _G(MouseState).CursorColumn <= btn._x2 &&
|
||||
_G(MouseState).CursorRow >= btn._y1 && _G(MouseState).CursorRow <= btn._y2) {
|
||||
return idx;
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse not over any button
|
||||
return NO_BUTTONS_HILITED;
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
121
engines/m4/burger/rooms/section9/menu_room.h
Normal file
121
engines/m4/burger/rooms/section9/menu_room.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/* 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_SECTION9_MENU_ROOM_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_MENU_ROOM_H
|
||||
|
||||
#include "common/array.h"
|
||||
#include "m4/wscript/ws_machine.h"
|
||||
#include "m4/burger/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
constexpr int NO_BUTTONS_HILITED = -1;
|
||||
|
||||
enum ButtonState { BTNSTATE_DISABLED = 0, BTNSTATE_ENABLED = 1, BTNSTATE_HIGHLIGHTED = 2, BTNSTATE_PRESSED = 3 };
|
||||
|
||||
struct MenuButtonDef {
|
||||
int32 _x1;
|
||||
int32 _y1;
|
||||
int32 _x2;
|
||||
int32 _y2;
|
||||
int32 _frame_disabled;
|
||||
int32 _frame_enabled;
|
||||
int32 _frame_highlighted;
|
||||
int32 _frame_pressed;
|
||||
ButtonState _state;
|
||||
int32 _trigger;
|
||||
};
|
||||
|
||||
struct MenuButton : public MenuButtonDef {
|
||||
machine *_machine = nullptr;
|
||||
|
||||
MenuButton() : MenuButtonDef() {}
|
||||
MenuButton(const MenuButtonDef &def) : MenuButtonDef(def) {}
|
||||
};
|
||||
|
||||
/**
|
||||
* Base class used for the menu rooms 901 and 903
|
||||
*/
|
||||
class MenuRoom : public Rooms::Room {
|
||||
private:
|
||||
const char *_menuName;
|
||||
const char *_clickName;
|
||||
int _buttonNum = -1;
|
||||
int _highlightedButton = -1;
|
||||
int _activeButton = -1;
|
||||
bool _flag = false;
|
||||
|
||||
/**
|
||||
* Handles button processing once a frame
|
||||
*/
|
||||
void buttonsFrame();
|
||||
|
||||
/**
|
||||
* Returns the index of the button currently under the mouse, if any
|
||||
*/
|
||||
int32 is_mouse_over_a_button() const;
|
||||
|
||||
protected:
|
||||
Common::Array<MenuButton> _buttons;
|
||||
|
||||
/**
|
||||
* Set the display buttons
|
||||
*/
|
||||
void setButtons(const MenuButtonDef *btns, int count);
|
||||
|
||||
/**
|
||||
* Draws a button
|
||||
*/
|
||||
void drawButton(int index);
|
||||
|
||||
/**
|
||||
* Draws all the buttons
|
||||
*/
|
||||
void drawButtons();
|
||||
|
||||
/**
|
||||
* Changes a button's state
|
||||
*/
|
||||
void setButtonState(int index, ButtonState newState);
|
||||
|
||||
/**
|
||||
* Resets the selected button
|
||||
*/
|
||||
void resetSelectedButton() {
|
||||
_activeButton = -1;
|
||||
}
|
||||
public:
|
||||
MenuRoom(const char *menuName, const char *clickName) : Rooms::Room(),
|
||||
_menuName(menuName), _clickName(clickName) {}
|
||||
virtual ~MenuRoom() {}
|
||||
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
151
engines/m4/burger/rooms/section9/room901.cpp
Normal file
151
engines/m4/burger/rooms/section9/room901.cpp
Normal file
@@ -0,0 +1,151 @@
|
||||
/* 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/section9/room901.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/burger/vars.h"
|
||||
#include "m4/burger/burger.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
enum {
|
||||
MENU_SHOW = 1,
|
||||
MENU_RESTORE = 2,
|
||||
MENU_3 = 3,
|
||||
MENU_4 = 4,
|
||||
MENU_5 = 5,
|
||||
MENU_RESTARTING = 6,
|
||||
MENU_RESTART = 7,
|
||||
MENU_8 = 8,
|
||||
MENU_EXIT = 9
|
||||
};
|
||||
|
||||
static const MenuButtonDef DEMO_BUTTONS[2] = {
|
||||
{ 337, 138, 622, 197, 4, 5, 6, 7, BTNSTATE_ENABLED, 6 },
|
||||
{ 337, 260, 622, 317, 12, 13, 14, 15, BTNSTATE_ENABLED, 9 }
|
||||
};
|
||||
|
||||
static const MenuButtonDef DEMO_DE_BUTTONS[4] = {
|
||||
{ 337, 82, 622, 140, 0, 1, 2, 3, BTNSTATE_ENABLED, 3 },
|
||||
{ 337, 138, 622, 197, 4, 5, 6, 7, BTNSTATE_ENABLED, 6 },
|
||||
{ 337, 198, 622, 256, 8, 9, 10, 11, BTNSTATE_ENABLED, 5 },
|
||||
{ 337, 260, 622, 317, 12, 13, 14, 15, BTNSTATE_ENABLED, 8 },
|
||||
};
|
||||
|
||||
static const MenuButtonDef GAME_BUTTONS[2] = {
|
||||
{ 337, 82, 622, 140, 4, 5, 6, 7, BTNSTATE_ENABLED, 6 },
|
||||
{ 337, 138, 622, 197, 12, 13, 14, 15, BTNSTATE_ENABLED, 9 }
|
||||
};
|
||||
|
||||
void Room901::preload() {
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room901::init() {
|
||||
MenuRoom::init();
|
||||
|
||||
switch (_G(executing)) {
|
||||
case JUST_OVERVIEW:
|
||||
case INTERACTIVE_DEMO:
|
||||
case MAGAZINE_DEMO:
|
||||
if (g_engine->getLanguage() == Common::DE_DEU) {
|
||||
setButtons(DEMO_DE_BUTTONS, 4);
|
||||
} else {
|
||||
setButtons(DEMO_BUTTONS, 2);
|
||||
}
|
||||
|
||||
series_play("901order", 0, 0, -1, 60, -1, 100, 165, 395, 0, -1);
|
||||
break;
|
||||
|
||||
case WHOLE_GAME:
|
||||
setButtons(GAME_BUTTONS, 2);
|
||||
series_play("901order", 0, 0, -1, 60, -1, 100, 470, 245, 0, -1);
|
||||
break;
|
||||
}
|
||||
|
||||
_G(kernel).suppress_fadeup = true;
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 100, 60, MENU_SHOW);
|
||||
|
||||
drawButtons();
|
||||
}
|
||||
|
||||
void Room901::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case MENU_SHOW:
|
||||
case MENU_RESTORE:
|
||||
if (_G(kernel).trigger == MENU_SHOW)
|
||||
_G(kernel).call_daemon_every_loop = true;
|
||||
|
||||
resetSelectedButton();
|
||||
player_set_commands_allowed(true);
|
||||
|
||||
for (uint i = 0; i < _buttons.size(); ++i) {
|
||||
if (_buttons[i]._state != BTNSTATE_DISABLED)
|
||||
setButtonState(i, BTNSTATE_ENABLED);
|
||||
}
|
||||
break;
|
||||
|
||||
case MENU_3:
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, 9005);
|
||||
break;
|
||||
|
||||
case MENU_4:
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, 9006);
|
||||
break;
|
||||
|
||||
case MENU_5:
|
||||
case MENU_8:
|
||||
_G(room902Flag) = _G(kernel).trigger == 8;
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, 9002);
|
||||
break;
|
||||
|
||||
case MENU_RESTARTING:
|
||||
g_vars->initialize_game();
|
||||
conv_reset_all();
|
||||
_G(flags).reset2();
|
||||
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, MENU_RESTART);
|
||||
break;
|
||||
|
||||
case MENU_RESTART:
|
||||
_G(game).setRoom(601);
|
||||
break;
|
||||
|
||||
case MENU_EXIT:
|
||||
_G(kernel).going = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
MenuRoom::daemon();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
45
engines/m4/burger/rooms/section9/room901.h
Normal file
45
engines/m4/burger/rooms/section9/room901.h
Normal 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_SECTION9_ROOM901_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_ROOM901_H
|
||||
|
||||
#include "m4/burger/rooms/section9/menu_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
class Room901 : public MenuRoom {
|
||||
public:
|
||||
Room901() : MenuRoom("901menu", "901click") {}
|
||||
~Room901() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
135
engines/m4/burger/rooms/section9/room902.cpp
Normal file
135
engines/m4/burger/rooms/section9/room902.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/burger/rooms/section9/room902.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/burger/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
static const Entry ENTRIES1[] = {
|
||||
{ "902bk", 168 },
|
||||
{ "902bi", 168 },
|
||||
{ "902bj", 168 },
|
||||
{ "902bb", 168 },
|
||||
{ "902bs", 168 },
|
||||
{ "902bg", 168 },
|
||||
{ "902bc", 168 },
|
||||
{ "902bl", 168 },
|
||||
{ "902ba", 168 },
|
||||
{ "902bw", 168 },
|
||||
{ "902bq", 168 },
|
||||
{ "902bn", 168 },
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
|
||||
static const Entry ENTRIES2[] = {
|
||||
{ "902wa", 300 },
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
|
||||
void Room902::preload() {
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room902::init() {
|
||||
_vol = 255;
|
||||
digi_preload("902music");
|
||||
digi_play("902music", 1, _vol, -1);
|
||||
mouse_hide();
|
||||
|
||||
if (_G(room902Flag) <= 0) {
|
||||
_entries = ENTRIES1;
|
||||
series_load("902ob", -1, _G(master_palette));
|
||||
kernel_timing_trigger(1, 3);
|
||||
} else if (_G(room902Flag) == 1) {
|
||||
_entries = ENTRIES2;
|
||||
}
|
||||
|
||||
_index = 0;
|
||||
_name = _entries[_index]._name;
|
||||
_duration = _entries[_index]._duration;
|
||||
|
||||
_G(kernel).suppress_fadeup = true;
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
pal_fade_init(_G(master_palette), 0, 255, 100, 60, 1);
|
||||
}
|
||||
|
||||
void Room902::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
|
||||
if (_name) {
|
||||
if (_index <= 0)
|
||||
series_unload(_seriesIndex);
|
||||
|
||||
_seriesIndex = series_load(_name, -1, _G(master_palette));
|
||||
series_show(_name, 1, 64, 1, _duration + 60, 0, 100, 0, 0);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 100, 30, 5);
|
||||
kernel_timing_trigger(_duration + 30, 2);
|
||||
|
||||
++_index;
|
||||
_name = _entries[_index]._name;
|
||||
_duration = _entries[_index]._duration;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (_name) {
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, -1);
|
||||
} else {
|
||||
pal_fade_init(_G(master_palette), 0, 255, 0, 30, -1);
|
||||
kernel_trigger_dispatch_now(4);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
series_show("902ob", 2, 64, -1, -1, 0, 100, 320, 430);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
_vol -= 20;
|
||||
if (_vol > 0) {
|
||||
digi_change_volume(1, _vol);
|
||||
kernel_timing_trigger(6, 4);
|
||||
} else if (_G(executing) == WHOLE_GAME) {
|
||||
_G(game).setRoom(903);
|
||||
} else {
|
||||
_G(game).setRoom(901);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (_entries[_index]._name)
|
||||
series_load(_entries[_index]._name, -1, nullptr);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
58
engines/m4/burger/rooms/section9/room902.h
Normal file
58
engines/m4/burger/rooms/section9/room902.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* 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_SECTION9_ROOM902_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_ROOM902_H
|
||||
|
||||
#include "m4/burger/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
struct Entry {
|
||||
const char *_name;
|
||||
int _duration;
|
||||
};
|
||||
|
||||
class Room902 : public Rooms::Room {
|
||||
private:
|
||||
int _vol = 255;
|
||||
const Entry *_entries = nullptr;
|
||||
int _index = 0;
|
||||
const char *_name = nullptr;
|
||||
int _duration = 0;
|
||||
int _seriesIndex = -1;
|
||||
|
||||
public:
|
||||
Room902() : Rooms::Room() {}
|
||||
~Room902() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
186
engines/m4/burger/rooms/section9/room903.cpp
Normal file
186
engines/m4/burger/rooms/section9/room903.cpp
Normal file
@@ -0,0 +1,186 @@
|
||||
/* 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 "common/config-manager.h"
|
||||
#include "m4/burger/rooms/section9/room903.h"
|
||||
#include "m4/adv_r/adv_control.h"
|
||||
#include "m4/adv_r/adv_trigger.h"
|
||||
#include "m4/graphics/gr_series.h"
|
||||
#include "m4/burger/vars.h"
|
||||
#include "m4/burger/other.h"
|
||||
#include "m4/m4.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
static const MenuButtonDef BUTTONS[6] = {
|
||||
{ 295, 125, 615, 155, 0, 1, 2, 3, BTNSTATE_ENABLED, 5 },
|
||||
{ 295, 165, 615, 195, 12, 13, 14, 15, BTNSTATE_ENABLED, 6 },
|
||||
{ 295, 205, 615, 235, 4, 5, 6, 7, BTNSTATE_ENABLED, 7 },
|
||||
{ 295, 245, 615, 275, 16, 17, 18, 19, BTNSTATE_ENABLED, 8 },
|
||||
{ 295, 285, 615, 315, 8, 9, 10, 11, BTNSTATE_ENABLED, 9 },
|
||||
{ 295, 325, 615, 355, 20, 21, 22, 23, BTNSTATE_ENABLED, 10 },
|
||||
};
|
||||
|
||||
void Room903::preload() {
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room903::init() {
|
||||
MenuRoom::init();
|
||||
|
||||
if (!ConfMan.getBool("seen_intro")) {
|
||||
ConfMan.setBool("seen_intro", true);
|
||||
ConfMan.flushToDisk();
|
||||
}
|
||||
|
||||
player_set_commands_allowed(false);
|
||||
_buttonsDrawn = false;
|
||||
|
||||
setButtons(BUTTONS, 6);
|
||||
series_show("903logo", 0, 0, -1, -1, 0, 100, 386, 20);
|
||||
|
||||
if (_G(game).previous_room <= 0 || _G(game).previous_room == 951) {
|
||||
kernel_trigger_dispatch_now(11);
|
||||
|
||||
} else {
|
||||
if (!digi_play_state(1))
|
||||
kernel_trigger_dispatch_now(1);
|
||||
|
||||
kernel_trigger_dispatch_now(2);
|
||||
kernel_trigger_dispatch_now(14);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 100, 60, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void Room903::daemon() {
|
||||
if (_G(menu).menuSystemInitialized)
|
||||
return;
|
||||
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
digi_preload("903music");
|
||||
digi_play("903music", 3, 100, -1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (!_buttonsDrawn) {
|
||||
digi_preload("901click");
|
||||
drawButtons();
|
||||
|
||||
if (!g_engine->savesExist()) {
|
||||
_buttons[2]._state = BTNSTATE_DISABLED;
|
||||
drawButton(2);
|
||||
}
|
||||
|
||||
if (!g_engine->autosaveExists()) {
|
||||
_buttons[3]._state = BTNSTATE_DISABLED;
|
||||
drawButton(3);
|
||||
}
|
||||
|
||||
_buttonsDrawn = true;
|
||||
kernel_timing_trigger(30, 3);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 4:
|
||||
if (_G(kernel).trigger == 3)
|
||||
_G(kernel).call_daemon_every_loop = true;
|
||||
|
||||
resetSelectedButton();
|
||||
player_set_commands_allowed(true);
|
||||
|
||||
for (uint i = 0; i < _buttons.size(); ++i) {
|
||||
if (_buttons[i]._state != BTNSTATE_DISABLED)
|
||||
setButtonState(i, BTNSTATE_ENABLED);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, 9005);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, 15);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
g_engine->showLoadScreen(M4Engine::kLoadFromMainMenu);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
other_resurrect_player();
|
||||
break;
|
||||
|
||||
case 9:
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, 9004);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, 16);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if (!digi_play_state(1))
|
||||
digi_play("903_001", 2, 155, -1);
|
||||
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
series_play("903d", 1792, 16, 12, 8, 0, 100, -5, 50, 0, -1);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 0, 30, -1);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
kernel_timing_trigger(0, 13);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
kernel_trigger_dispatch_now(2);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
series_show("903d", 0, 0, -1, -1, 23);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
g_vars->initialize_game();
|
||||
_G(game).setRoom(801);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
// Quit game
|
||||
_G(kernel).going = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
MenuRoom::daemon();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
48
engines/m4/burger/rooms/section9/room903.h
Normal file
48
engines/m4/burger/rooms/section9/room903.h
Normal 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef M4_BURGER_ROOMS_SECTION9_ROOM903_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_ROOM903_H
|
||||
|
||||
#include "m4/burger/rooms/section9/menu_room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
class Room903 : public MenuRoom {
|
||||
private:
|
||||
bool _buttonsDrawn = false;
|
||||
|
||||
public:
|
||||
Room903() : MenuRoom("903menu", "901click") {}
|
||||
~Room903() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
843
engines/m4/burger/rooms/section9/room904.cpp
Normal file
843
engines/m4/burger/rooms/section9/room904.cpp
Normal file
@@ -0,0 +1,843 @@
|
||||
/* 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/section9/room904.h"
|
||||
#include "m4/core/errors.h"
|
||||
#include "m4/burger/vars.h"
|
||||
#include "m4/m4.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
static const char *const CREDITS_ENG[] = {
|
||||
"Design",
|
||||
"Game Designer: Robert Aitken",
|
||||
" ",
|
||||
"Writer: Robert Aitken",
|
||||
" ",
|
||||
"Additional Dialog: Mark Solomon",
|
||||
" ",
|
||||
"Original Concept:",
|
||||
" Robert Aitken",
|
||||
" Matthew Powell",
|
||||
nullptr,
|
||||
"Art",
|
||||
"Art Director: Andrew Pratt",
|
||||
" ",
|
||||
"Character Design:",
|
||||
" Glen Lovett",
|
||||
" Sean Newton",
|
||||
" ",
|
||||
"Background Layout: Glen Lovett",
|
||||
" ",
|
||||
"Background Art:",
|
||||
" Bob Parr",
|
||||
" Andrew Pratt",
|
||||
" ",
|
||||
"Art Technician: Garth Buzzard",
|
||||
" ",
|
||||
"Additional Art:",
|
||||
" Darren Brereton",
|
||||
" Shelley Burke",
|
||||
" Garth Buzzard",
|
||||
" Karl Johanson",
|
||||
" Calvin Jones",
|
||||
" Dwight Lockhart",
|
||||
" Bob Parr",
|
||||
" Andrew Pratt",
|
||||
" ",
|
||||
"GUI and Detail Art: Andrew Pratt",
|
||||
nullptr,
|
||||
"Animation",
|
||||
"Lead Animator: Sean Newton",
|
||||
" ",
|
||||
"Animators:",
|
||||
" Jim Bridle",
|
||||
" Hilary Denny",
|
||||
" Nelson Dewey",
|
||||
" Richelle Grist",
|
||||
" Glen Lovett",
|
||||
" Kay Lovett",
|
||||
" Tim Maltby",
|
||||
" Stephen McCallum",
|
||||
" Shelley McIntosh",
|
||||
" Jean Paynter",
|
||||
" Gary Scott",
|
||||
" Nigel Tully",
|
||||
" Adrie Van Viersen",
|
||||
" ",
|
||||
"Animation Design: Robert Aitken",
|
||||
" ",
|
||||
"3D Modeling/Animation:",
|
||||
" Nelson Dewey",
|
||||
" David Henry",
|
||||
" ",
|
||||
"Animation Technician: Robert McMurtry",
|
||||
nullptr,
|
||||
"Coloring",
|
||||
"Colorists:",
|
||||
" Allan Cameron",
|
||||
" Scott Douglas",
|
||||
" Cindy Johnson",
|
||||
" ",
|
||||
"Additional Coloring:",
|
||||
" Brent Arnst",
|
||||
" Rob Barrett",
|
||||
" Garth Buzzard",
|
||||
" Chris Capell",
|
||||
" Jacob Dewey",
|
||||
" Bruce Elder",
|
||||
" Andrew James",
|
||||
" Darren Keetley",
|
||||
" Cal Jones",
|
||||
" Jeff Kuipers",
|
||||
" Dwight Lockhart",
|
||||
" Kimberlie Manuel",
|
||||
" Connie McCann",
|
||||
" Stephen Rowe",
|
||||
" Peter Taylor",
|
||||
nullptr,
|
||||
"Audio",
|
||||
"Original Score: Darren McGrath",
|
||||
" ",
|
||||
"Sound Design: Darren McGrath",
|
||||
" ",
|
||||
"Audio Producer: Darren McGrath",
|
||||
" ",
|
||||
"Casting:",
|
||||
" Robert Aitken",
|
||||
" Darren McGrath",
|
||||
" Kris Zimmerman",
|
||||
" ",
|
||||
"Dialog Cutting:",
|
||||
" Darren McGrath",
|
||||
" Allan Cameron",
|
||||
nullptr,
|
||||
"Programming",
|
||||
"Game Lead: Matthew Powell",
|
||||
" ",
|
||||
"Game:",
|
||||
" Robert McMurtry",
|
||||
" Paul Lahaise",
|
||||
" Chris Petkau",
|
||||
" Jason Bevins",
|
||||
" David Thomas",
|
||||
" ",
|
||||
"Systems Lead: Nick Porcino",
|
||||
" ",
|
||||
"Systems:",
|
||||
" Andras Kovacs",
|
||||
" Michael Ellis",
|
||||
" Xi Huang",
|
||||
" Tinman",
|
||||
" Paul Lahaise",
|
||||
" Matthew Powell",
|
||||
" Cody Jones",
|
||||
" ",
|
||||
"Windows '95: Chris Blackwell",
|
||||
" ",
|
||||
"Macintosh:",
|
||||
" Nick Porcino",
|
||||
" Michael Ellis",
|
||||
" ",
|
||||
"Conversations: Robert Aitken",
|
||||
nullptr,
|
||||
"Production",
|
||||
"Producer: Fran\xe7""ois Robillard",
|
||||
" ",
|
||||
"Assistant Producer: Danielle Cooper",
|
||||
nullptr,
|
||||
"Quality Assurance",
|
||||
"Michael Beninger",
|
||||
"Kimberlie Manuel",
|
||||
"Chris Capell",
|
||||
"Bruce Elder",
|
||||
"Darren Keetley",
|
||||
nullptr,
|
||||
"Documentation",
|
||||
"User's Guide Writer: Hope Hickli",
|
||||
" ",
|
||||
"Art and Layout:",
|
||||
" Calvin Jones",
|
||||
" Bob Parr",
|
||||
nullptr,
|
||||
"Audio Cast",
|
||||
"Wilbur - Rob Paulsen",
|
||||
"Zlarg - Jim Cummings",
|
||||
"Flumix - Dee Bradley Baker",
|
||||
"Astral - E.G. Daily",
|
||||
"Harry - Michael Bell",
|
||||
"Aunt Polly - Candi Milo",
|
||||
"Burl - Phil Hayes",
|
||||
"Elmo Perkins - Nick Jameson",
|
||||
"Sheriff - Phil Hayes",
|
||||
"Gus/Angus/Elgus - Mike Donovan",
|
||||
"Odie - Rob Paulsen",
|
||||
"Vipe - Mike Donovan",
|
||||
"Roxy - Candi Milo",
|
||||
"Vera - Pat Lentz",
|
||||
"Eugene - Phil Hayes",
|
||||
"Stolie - Mike Donovan",
|
||||
"Borks - Dee Bradley Baker",
|
||||
"VP of Protein Procurement - Jim Cummings",
|
||||
"Truffles - Dee Bradley Baker",
|
||||
"Junkyard Dog - Rob Paulsen",
|
||||
"Ship's Computer - Candi Milo",
|
||||
"Mutant Gerbils - Dee Bradley Baker",
|
||||
nullptr,
|
||||
"Special Thanks",
|
||||
"Thanks to Lynda Gran for our paychecks,",
|
||||
"Laura McCallum for keeping us organized",
|
||||
"and Carol Schieck for always smiling.",
|
||||
" ",
|
||||
"Thanks to Vancouver Island Brewing for",
|
||||
"keeping us happy every weekend.",
|
||||
" ",
|
||||
"Very Special Thanks to Significant Others",
|
||||
"and Offspring who often made do without",
|
||||
"their loved ones so that this product could",
|
||||
"be made.",
|
||||
nullptr,
|
||||
" ",
|
||||
" ",
|
||||
nullptr,
|
||||
"Back To Main Menu",
|
||||
" ",
|
||||
nullptr,
|
||||
nullptr
|
||||
};
|
||||
|
||||
static const char *const CREDITS_DEU[] = {
|
||||
"Entwurf",
|
||||
"Spielentwurf: Robert Aitken",
|
||||
" ",
|
||||
"Spieltext: Robert Aitken",
|
||||
" ",
|
||||
"Zus\xe4""tzliche Dialoge: Mark Solomon",
|
||||
" ",
|
||||
"Originalidee:",
|
||||
" Robert Aitken",
|
||||
" Matthew Powell",
|
||||
nullptr,
|
||||
"Graphik",
|
||||
"K\xfc""nstlerische Leitung: Andrew Pratt",
|
||||
" ",
|
||||
"Entwurf der Charaktere:",
|
||||
" Glen Lovett",
|
||||
" Sean Newton",
|
||||
" ",
|
||||
"Hintergrund-Layout: Glen Lovett",
|
||||
" ",
|
||||
"Landschaftsgestaltung:",
|
||||
" Bob Parr",
|
||||
" Andrew Pratt",
|
||||
" ",
|
||||
"Graphische Technik: Garth Buzzard",
|
||||
" ",
|
||||
"Zus\xe4""tzliche Grafik:",
|
||||
" Darren Brereton",
|
||||
" Shelley Burke",
|
||||
" Garth Buzzard",
|
||||
" Karl Johanson",
|
||||
" Calvin Jones",
|
||||
" Dwight Lockhart",
|
||||
" Bob Parr",
|
||||
" Andrew Pratt",
|
||||
" ",
|
||||
"Benutzeroberfl\xe4""che, Grafikdetails: Andrew Pratt",
|
||||
nullptr,
|
||||
"Animationen",
|
||||
"Animationsleitung: Sean Newton",
|
||||
" ",
|
||||
"Animationen:",
|
||||
" Jim Bridle",
|
||||
" Hilary Denny",
|
||||
" Nelson Dewey",
|
||||
" Richelle Grist",
|
||||
" Glen Lovett",
|
||||
" Kay Lovett",
|
||||
" Tim Maltby",
|
||||
" Stephen McCallum",
|
||||
" Shelley McIntosh",
|
||||
" Jean Paynter",
|
||||
" Gary Scott",
|
||||
" Nigel Tully",
|
||||
" Adrie Van Viersen",
|
||||
" ",
|
||||
"Animationsdesign: Robert Aitken",
|
||||
" ",
|
||||
"3D-Modellierung, Animationen:",
|
||||
" Nelson Dewey",
|
||||
" David Henry",
|
||||
" ",
|
||||
"Animationstechnik: Robert McMurtry",
|
||||
nullptr,
|
||||
"Kolorierung",
|
||||
"Kolorierung:",
|
||||
" Allan Cameron",
|
||||
" Scott Douglas",
|
||||
" Cindy Johnson",
|
||||
" ",
|
||||
"Zus\xe4""tzliche Kolorierung:",
|
||||
" Brent Arnst",
|
||||
" Rob Barrett",
|
||||
" Garth Buzzard",
|
||||
" Chris Capell",
|
||||
" Jacob Dewey",
|
||||
" Bruce Elder",
|
||||
" Andrew James",
|
||||
" Darren Keetley",
|
||||
" Cal Jones",
|
||||
" Jeff Kuipers",
|
||||
" Dwight Lockhart",
|
||||
" Kimberlie Manuel",
|
||||
" Connie McCann",
|
||||
" Stephen Rowe",
|
||||
" Peter Taylor",
|
||||
nullptr,
|
||||
"Audio",
|
||||
"Originalmusik: Darren McGrath",
|
||||
" ",
|
||||
"Soundgestaltung: Darren McGrath",
|
||||
" ",
|
||||
"Audio-Produktion:",
|
||||
" Darren McGrath",
|
||||
" Ton Synchron",
|
||||
" ",
|
||||
"Casting:",
|
||||
" Robert Aitken",
|
||||
" Darren McGrath",
|
||||
" Kris Zimmerman",
|
||||
" ",
|
||||
"Dialogschnitt:",
|
||||
" Darren McGrath",
|
||||
" Allan Cameron",
|
||||
" Ton Synchron",
|
||||
nullptr,
|
||||
"Programmierung",
|
||||
"Leitung Spielprogrammierung: Matthew Powell",
|
||||
" ",
|
||||
"Programmierung:",
|
||||
" Robert McMurtry",
|
||||
" Paul Lahaise",
|
||||
" Chris Petkau",
|
||||
" Jason Bevins",
|
||||
" David Thomas",
|
||||
" ",
|
||||
"Leitung Systemprogrammierung: Nick Porcino",
|
||||
" ",
|
||||
"Systemprogrammierung:",
|
||||
" Andras Kovacs",
|
||||
" Michael Ellis",
|
||||
" Xi Huang",
|
||||
" Tinman",
|
||||
" Paul Lahaise",
|
||||
" Matthew Powell",
|
||||
" Cody Jones",
|
||||
" ",
|
||||
"International: Mojo Systems",
|
||||
" ",
|
||||
"Konversation: Robert Aitken",
|
||||
nullptr,
|
||||
"Produktion",
|
||||
"Produktionsleitung:",
|
||||
" Fran\xe7""ois Robillard,",
|
||||
" Eidos Deutschland",
|
||||
" ",
|
||||
"Produktionsassistenz: Danielle Cooper",
|
||||
" ",
|
||||
"Deutsche Produktion:",
|
||||
" Alp Altun",
|
||||
" Eva Hoogh",
|
||||
" Anskje Kirschner",
|
||||
" Christian Zoch",
|
||||
" ",
|
||||
"International:",
|
||||
" Kimberlie Manuel, Mojo Systems",
|
||||
" Katrin van der Leeden",
|
||||
nullptr,
|
||||
"Qualit\xe4""tssicherung",
|
||||
"Michael Beninger",
|
||||
"Kimberlie Manuel",
|
||||
"Chris Capell",
|
||||
"Bruce Elder",
|
||||
"Darren Keetley",
|
||||
" ",
|
||||
"International: Mojo Systems",
|
||||
nullptr,
|
||||
"Handbuch",
|
||||
"Handbuch: Hope Hickli",
|
||||
" ",
|
||||
"Grafik und Layout des Handbuchs:",
|
||||
" Calvin Jones",
|
||||
" Bob Parr",
|
||||
nullptr,
|
||||
"Die Charaktere",
|
||||
"(in alphabetischer Reihenfolge)",
|
||||
"Angus - Peter Bieringer",
|
||||
"Astral - Susanne Sternberg",
|
||||
"Bauarbeiter - Alp Altun",
|
||||
"Bork - Dee Bradley Baker",
|
||||
"Burl - Nico K\xf6""nig",
|
||||
"Computer - Ulrike Herm",
|
||||
"Elgus - Peter Bieringer",
|
||||
"Erz\xe4""hler - Ingo Abel",
|
||||
"Eugene - Franz-Josef Steffens",
|
||||
"Fernsehstimmen - Ulrike Herm, Robert Missler,",
|
||||
" Olaf Ritter, Thomas Stein, Angela Stresemann",
|
||||
"Flumix - Wolfgang J\xfc""rgen",
|
||||
"Harry - Hans Sievers",
|
||||
"Gus - Peter Bieringer",
|
||||
"Odie - Dagmar 'The Kid'",
|
||||
"Perkins - Michael Quiatkowski",
|
||||
"Roxy - Susanne Sternberg",
|
||||
"Sheriff - Hans Sievers",
|
||||
"Stolie - Hans Sievers",
|
||||
"Tante Polly - Verena Wiet",
|
||||
"Vera - Angela Stresemann",
|
||||
"Vipe - Alexander Draeger",
|
||||
"VP - Franz-Josef Steffens",
|
||||
"Wilbur - Robert Missler",
|
||||
"Zlarg - Wolfgang Draeger",
|
||||
nullptr,
|
||||
"Vielen Dank",
|
||||
"Unseren Dank an Lynda Gran f\xfc""r unsere Gehaltsschecks,",
|
||||
"an Laura McCallum f\xfc""r ihr Organisationsgenie",
|
||||
"und an Carol Schieck f\xfc""r ihr immer geduldiges L\xe4""cheln.",
|
||||
" ",
|
||||
"Vielen Dank an Vancouver Island Brewing. Jungs,",
|
||||
"ihr habt uns Wochenende um Wochenende gerettet!",
|
||||
" ",
|
||||
"Besonderen Dank an bedeutsame andere ",
|
||||
"samt Nachwuchs, die so oft auf ihre Lieben ",
|
||||
"verzichten mu\xdf""ten, damit dieses Spiel ",
|
||||
"entstehen konnte.",
|
||||
" ",
|
||||
"Ganz besonderen Dank an Anskje Kirschner!",
|
||||
nullptr,
|
||||
" "
|
||||
" ",
|
||||
nullptr,
|
||||
"Hauptmen\xfc",
|
||||
" ",
|
||||
nullptr,
|
||||
nullptr
|
||||
};
|
||||
|
||||
static const char *const CREDITS_FRA[] = {
|
||||
"Design",
|
||||
"Concepteur: Robert Aitken",
|
||||
" ",
|
||||
"Auteur: Robert Aitken",
|
||||
" ",
|
||||
"Dialogues additionnels: Mark Solomon",
|
||||
" ",
|
||||
"Concepteur original:",
|
||||
" Robert Aitken",
|
||||
" Matthew Powell",
|
||||
nullptr,
|
||||
"Art",
|
||||
"Direction artistique: Andrew Pratt",
|
||||
" ",
|
||||
"Character Design :",
|
||||
" Glen Lovett",
|
||||
" Sean Newton",
|
||||
" ",
|
||||
"Graphisme d\xE9""cors: Glen Lovett",
|
||||
" ",
|
||||
"Graphisme arri\xE8""re-plan:",
|
||||
" Bob Parr",
|
||||
" Andrew Pratt",
|
||||
" ",
|
||||
"Techniciens artistique: Garth Buzzard",
|
||||
" ",
|
||||
"Graphismes additionnels:",
|
||||
" Darren Brereton",
|
||||
" Shelley Burke",
|
||||
" Garth Buzzard",
|
||||
" Karl Johanson",
|
||||
" Calvin Jones",
|
||||
" Dwight Lockhart",
|
||||
" Bob Parr",
|
||||
" Andrew Pratt",
|
||||
" ",
|
||||
"Interface et d\xE9""tails graphiques: Andrew Pratt",
|
||||
nullptr,
|
||||
"Animation",
|
||||
"Producteur animation: Sean Newton",
|
||||
" ",
|
||||
"Animateurs:",
|
||||
" Jim Bridle",
|
||||
" Hilary Denny",
|
||||
" Nelson Dewey",
|
||||
" Richelle Grist",
|
||||
" Glen Lovett",
|
||||
" Kay Lovett",
|
||||
" Tim Maltby",
|
||||
" Stephen McCallum",
|
||||
" Shelley McIntosh",
|
||||
" Jean Paynter",
|
||||
" Gary Scott",
|
||||
" Nigel Tully",
|
||||
" Adrie Van Viersen",
|
||||
" ",
|
||||
"Concepteurs animation: Robert Aitken",
|
||||
" ",
|
||||
"3D Maquette/Animation:",
|
||||
" Nelson Dewey",
|
||||
" David Henry",
|
||||
" ",
|
||||
"Techniciens animation: Robert McMurtry",
|
||||
nullptr,
|
||||
"Coloring",
|
||||
"Coloristes:",
|
||||
" Allan Cameron",
|
||||
" Scott Douglas",
|
||||
" Cindy Johnson",
|
||||
" ",
|
||||
"Coloristes additionnels:",
|
||||
" Brent Arnst",
|
||||
" Rob Barrett",
|
||||
" Garth Buzzard",
|
||||
" Chris Capell",
|
||||
" Jacob Dewey",
|
||||
" Bruce Elder",
|
||||
" Andrew James",
|
||||
" Darren Keetley",
|
||||
" Cal Jones",
|
||||
" Jeff Kuipers",
|
||||
" Dwight Lockhart",
|
||||
" Kimberlie Manuel",
|
||||
" Connie McCann",
|
||||
" Stephen Rowe",
|
||||
" Peter Taylor",
|
||||
nullptr,
|
||||
"Audio",
|
||||
"Bande son originale: Darren McGrath",
|
||||
" ",
|
||||
"Ing\xE9""nieur du son: Darren McGrath",
|
||||
" ",
|
||||
"Producteur son: Darren McGrath",
|
||||
" ",
|
||||
"Casting:",
|
||||
" Robert Aitken",
|
||||
" Darren McGrath",
|
||||
" Kris Zimmerman",
|
||||
" ",
|
||||
"Monteur dialogues:",
|
||||
" Darren McGrath",
|
||||
" Allan Cameron",
|
||||
nullptr,
|
||||
"Programming",
|
||||
"Programmeur jeu: Matthew Powell",
|
||||
" ",
|
||||
"Programmeurs:",
|
||||
" Robert McMurtry",
|
||||
" Paul Lahaise",
|
||||
" Chris Petkau",
|
||||
" Jason Bevins",
|
||||
" David Thomas",
|
||||
" ",
|
||||
"Producteur syst\xEA""me: Nick Porcino",
|
||||
" ",
|
||||
"Programmeur syst\xEA""me:",
|
||||
" Andras Kovacs",
|
||||
" Michael Ellis",
|
||||
" Xi Huang",
|
||||
" Tinman",
|
||||
" Paul Lahaise",
|
||||
" Matthew Powell",
|
||||
" Cody Jones",
|
||||
" ",
|
||||
"Conversations: Robert Aitken",
|
||||
nullptr,
|
||||
"Production",
|
||||
"Producteur: Fran\xE7""ois Robillard",
|
||||
" ",
|
||||
"Producteur d\xE9""l\xE9""gu\xE9"": Danielle Cooper",
|
||||
" ",
|
||||
"Localisation - version fran\xE7""aise:",
|
||||
" Groupe SRC",
|
||||
nullptr,
|
||||
"Assurance qualit\xE9",
|
||||
"Michael Beninger",
|
||||
"Kimberlie Manuel",
|
||||
"Chris Capell",
|
||||
"Bruce Elder",
|
||||
"Darren Keetley",
|
||||
nullptr,
|
||||
"Documentation",
|
||||
"Auteur mode d'emploi: Hope Hickli",
|
||||
" ",
|
||||
"Graphisme mode d'emploi:",
|
||||
" Calvin Jones",
|
||||
" Bob Parr",
|
||||
nullptr,
|
||||
"Casting audio",
|
||||
"Wilbur - J\xE9""rome Berthoud",
|
||||
"Zlarg - Fernand Centanni",
|
||||
"Flumix - Joanna Michel",
|
||||
"Astral - Sheila O'Connor",
|
||||
"Harry - Patrick Martinez",
|
||||
"Tante Polly - Sheila O'Connor",
|
||||
"Burl - Patrick Martinez",
|
||||
"Elmo Perkins - Salvatore Ingoglia",
|
||||
"Sheriff - Gilles Blumenfeld",
|
||||
"Gus/Angus/Elgus - Patrick Martinez",
|
||||
"Odie - Marion Lasserre",
|
||||
"Vipe - Salvatore Ingoglia",
|
||||
"Roxy - Marion Lasserre",
|
||||
"Vera - Estelle Burgel",
|
||||
"Eug\xE8""ne - Patrick Massiah",
|
||||
"Stolie - Philippe Barrier",
|
||||
"Borks - Dee Bradley Baker",
|
||||
"Chef de l'approvisionnement - Fernand Centanni",
|
||||
"Truffles - Bradley Baker",
|
||||
"Junkyard Dog - Sheila O'Connor",
|
||||
"Ordinateur de bord - Rob Paulsen",
|
||||
"Mutant Gerbils - Dee Bradley Baker",
|
||||
nullptr,
|
||||
" ",
|
||||
" ",
|
||||
nullptr,
|
||||
"Menu Principal",
|
||||
" ",
|
||||
nullptr,
|
||||
nullptr
|
||||
};
|
||||
|
||||
#define CREDITS (g_engine->getLanguage() == Common::DE_DEU ? CREDITS_DEU : (g_engine->getLanguage() == Common::FR_FRA ? CREDITS_FRA : CREDITS_ENG))
|
||||
|
||||
void Room904::preload() {
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room904::init() {
|
||||
digi_preload("902music");
|
||||
digi_preload("904pop1");
|
||||
digi_preload("904pop2");
|
||||
digi_preload("904pop3");
|
||||
digi_preload("904pop4");
|
||||
digi_preload("904pop5");
|
||||
|
||||
_G(kernel).suppress_fadeup = true;
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
pal_fade_init(_G(master_palette), 0, 255, 100, 60, 1);
|
||||
player_set_commands_allowed(false);
|
||||
}
|
||||
|
||||
void Room904::shutdown() {
|
||||
if (_screen1)
|
||||
TextScrn_Destroy(_screen1);
|
||||
if (_screen2)
|
||||
TextScrn_Destroy(_screen2);
|
||||
|
||||
_G(player).command_ready = true;
|
||||
}
|
||||
|
||||
void Room904::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
player_set_commands_allowed(true);
|
||||
creditsSetup();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (_currentSection < _numSections) {
|
||||
playRandomSound(2, 1);
|
||||
TextScrn_Add_TextItem(_screen1, 10, (_currentSection - 1) * _fontHeight + 10,
|
||||
_currentSection, TS_CENTRE, getCreditsSectionString(_currentSection),
|
||||
(M4CALLBACK)creditsCallback);
|
||||
TextScrn_Activate(_screen1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
playRandomSound(-1, 2);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
digi_play_loop("902music", 3, 155, -1);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
player_set_commands_allowed(false);
|
||||
pal_fade_init(_G(master_palette), 0, 255, 0, 30, 6);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
_G(game).setRoom(_G(executing) == WHOLE_GAME ? 903 : 901);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Room904::parser() {
|
||||
if (player_said("go back"))
|
||||
kernel_trigger_dispatch_now(5);
|
||||
}
|
||||
|
||||
void Room904::creditsSetup() {
|
||||
_numSections = getCreditsSectionsCount();
|
||||
|
||||
gr_font_set(_G(font_inter));
|
||||
_fontHeight = gr_font_get_height();
|
||||
_totalWidth = getMaxCreditsHeaderWidth() + 20;
|
||||
_totalHeight = _fontHeight * _numSections + 20;
|
||||
|
||||
_x1 = 30;
|
||||
_x2 = 30 + _totalWidth;
|
||||
_y1 = (480 - _totalHeight) / 2;
|
||||
_y2 = _y1 + _totalHeight;
|
||||
|
||||
_screen1 = TextScrn_Create(_x1, _y1, _x2, _y2, 100, 422, 3, 22, 1, 10, 2, 14);
|
||||
|
||||
for (_currentSection = 1; _currentSection <= _numSections; ++_currentSection) {
|
||||
TextScrn_Add_TextItem(_screen1, 10, (_currentSection - 1) * _fontHeight + 10,
|
||||
_currentSection, TS_CENTRE, getCreditsSectionString(_currentSection),
|
||||
(M4CALLBACK)creditsCallback);
|
||||
}
|
||||
|
||||
TextScrn_Activate(_screen1);
|
||||
}
|
||||
|
||||
size_t Room904::getCreditsSectionsCount() const {
|
||||
size_t numSections = 0;
|
||||
|
||||
for (auto line = CREDITS; *line; ++line) {
|
||||
while (*line)
|
||||
++line;
|
||||
++numSections;
|
||||
}
|
||||
|
||||
return numSections;
|
||||
}
|
||||
|
||||
int Room904::getCreditsSectionLine(int sectionNum) const {
|
||||
if (sectionNum < 1 || sectionNum > _numSections)
|
||||
error_show(FL, 'Burg', "Bad index to credits");
|
||||
|
||||
int lineNum;
|
||||
for (lineNum = 0; sectionNum > 1; --sectionNum, ++lineNum) {
|
||||
while (CREDITS[lineNum])
|
||||
++lineNum;
|
||||
}
|
||||
|
||||
return lineNum;
|
||||
}
|
||||
|
||||
const char *Room904::getCreditsSectionString(int sectionNum) const {
|
||||
return CREDITS[getCreditsSectionLine(sectionNum)];
|
||||
}
|
||||
|
||||
int Room904::getCreditsSectionLines(int sectionNum) const {
|
||||
const int sectionStart = getCreditsSectionLine(sectionNum);
|
||||
int lineNum = sectionStart;
|
||||
|
||||
while (CREDITS[lineNum])
|
||||
++lineNum;
|
||||
|
||||
return lineNum - sectionStart;
|
||||
}
|
||||
|
||||
size_t Room904::getMaxCreditsHeaderWidth() const {
|
||||
int32 maxWidth = 0;
|
||||
|
||||
for (int sectionNum = 1; sectionNum <= _numSections; ++sectionNum) {
|
||||
maxWidth = MAX(maxWidth, gr_font_string_width(getCreditsSectionString(sectionNum)));
|
||||
}
|
||||
|
||||
return maxWidth;
|
||||
}
|
||||
|
||||
size_t Room904::getCreditsSectionWidth(int sectionNum) const {
|
||||
int32 maxWidth = 0;
|
||||
|
||||
for (int lineNum = getCreditsSectionLine(sectionNum); CREDITS[lineNum]; ++lineNum) {
|
||||
maxWidth = MAX(maxWidth, gr_font_string_width(CREDITS[lineNum]));
|
||||
}
|
||||
|
||||
return maxWidth;
|
||||
}
|
||||
|
||||
const char *Room904::getLineInCreditsSection(int sectionNum, int lineNum) const {
|
||||
if (lineNum < 1 || lineNum > getCreditsSectionLines(sectionNum))
|
||||
error_show(FL, 'Burg', "Bad index to names");
|
||||
|
||||
return CREDITS[getCreditsSectionLine(sectionNum) + lineNum];
|
||||
}
|
||||
|
||||
void Room904::creditsCallback(TextItem *textItem, TextScrn *textScrn) {
|
||||
Room904 *room = dynamic_cast<Room904 *>(g_engine->_activeRoom);
|
||||
assert(room);
|
||||
room->updateCredits(textItem, textScrn);
|
||||
}
|
||||
|
||||
void Room904::updateCredits(TextItem *textItem, TextScrn *textScrn) {
|
||||
const char *credit = textItem->prompt;
|
||||
const int sectionNum = textItem->tag;
|
||||
const int linesCount = getCreditsSectionLines(sectionNum);
|
||||
term_message("credit: %s index: %d names: %d", credit, sectionNum, linesCount);
|
||||
|
||||
playRandomSound(-1, 2);
|
||||
|
||||
if (strncmp(credit, "Haupt", 5) && strncmp(credit, "Back ", 5) && strncmp(credit, "Menu ", 5)) {
|
||||
mouse_set_sprite(kArrowCursor);
|
||||
gr_font_set(_G(font_conv));
|
||||
_fontHeight = gr_font_get_height();
|
||||
|
||||
const int sectionWidth = getCreditsSectionWidth(sectionNum) + 20;
|
||||
const int sectionHeight = linesCount * _fontHeight + 20;
|
||||
|
||||
const int x1 = (640 - _x2 - sectionWidth) / 2 + _x2;
|
||||
const int y1 = (480 - sectionHeight) / 2;
|
||||
const int x2 = x1 + sectionWidth;
|
||||
const int y2 = y1 + sectionHeight;
|
||||
|
||||
if (_screen2)
|
||||
TextScrn_Destroy(_screen2);
|
||||
_screen2 = TextScrn_Create(x1, y1, x2, y2, 100, 422, 3, 22, 1, 10, 2, 14);
|
||||
|
||||
for (int lineNum = 1; lineNum <= linesCount; ++lineNum) {
|
||||
const char *line = getLineInCreditsSection(sectionNum, lineNum);
|
||||
TextScrn_Add_Message(_screen2, 10, (lineNum - 1) * _fontHeight + 10,
|
||||
lineNum, TS_GIVEN, line);
|
||||
}
|
||||
|
||||
TextScrn_Activate(_screen2);
|
||||
TextScrn_Activate(_screen1);
|
||||
|
||||
} else {
|
||||
kernel_trigger_dispatch_now(5);
|
||||
}
|
||||
}
|
||||
|
||||
void Room904::playRandomSound(int trigger, int channel) {
|
||||
const Common::String name = Common::String::format("904pop%d", g_engine->getRandomNumber(4) + 1);
|
||||
digi_play(name.c_str(), channel, 255, trigger);
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
113
engines/m4/burger/rooms/section9/room904.h
Normal file
113
engines/m4/burger/rooms/section9/room904.h
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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef M4_BURGER_ROOMS_SECTION9_ROOM904_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_ROOM904_H
|
||||
|
||||
#include "m4/burger/rooms/room.h"
|
||||
#include "m4/gui/gui_dialog.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
class Room904 : public Rooms::Room {
|
||||
private:
|
||||
TextScrn *_screen1 = nullptr;
|
||||
TextScrn *_screen2 = nullptr;
|
||||
int _numSections = 0;
|
||||
int _fontHeight = 0;
|
||||
int _totalWidth = 0;
|
||||
int _totalHeight = 0;
|
||||
int _x1 = 0, _y1 = 0, _x2 = 0, _y2 = 0;
|
||||
int _currentSection = -1;
|
||||
|
||||
/**
|
||||
* Initial credits setup
|
||||
*/
|
||||
void creditsSetup();
|
||||
|
||||
/**
|
||||
* Returns the number of sections in the credits array
|
||||
*/
|
||||
size_t getCreditsSectionsCount() const;
|
||||
|
||||
/**
|
||||
* Returns the maximum width of any credits section header
|
||||
*/
|
||||
size_t getMaxCreditsHeaderWidth() const;
|
||||
|
||||
/**
|
||||
* Text items callback
|
||||
*/
|
||||
void updateCredits(TextItem *textItem, TextScrn *textScrn);
|
||||
|
||||
/**
|
||||
* Return the starting index in the credits of a given section
|
||||
*/
|
||||
int getCreditsSectionLine(int sectionNum) const;
|
||||
|
||||
/**
|
||||
* Return the first string of a given section
|
||||
*/
|
||||
const char *getCreditsSectionString(int sectionNum) const;
|
||||
|
||||
/**
|
||||
* Returns the number of lines in a given section
|
||||
*/
|
||||
int getCreditsSectionLines(int sectionNum) const;
|
||||
|
||||
/**
|
||||
* Return the maximum width of a specific credits section
|
||||
*/
|
||||
size_t getCreditsSectionWidth(int sectionNum) const;
|
||||
|
||||
/**
|
||||
* Returns a given text line within a credits section
|
||||
*/
|
||||
const char *getLineInCreditsSection(int sectionNum, int lineNum) const;
|
||||
|
||||
/**
|
||||
* Text items callback
|
||||
*/
|
||||
static void creditsCallback(TextItem *textItem, TextScrn *textScrn);
|
||||
|
||||
/**
|
||||
* Plays a random sound
|
||||
*/
|
||||
static void playRandomSound(int trigger, int channel);
|
||||
|
||||
public:
|
||||
Room904() : Rooms::Room() {}
|
||||
~Room904() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void shutdown() override;
|
||||
void daemon() override;
|
||||
void parser() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
676
engines/m4/burger/rooms/section9/room951.cpp
Normal file
676
engines/m4/burger/rooms/section9/room951.cpp
Normal file
@@ -0,0 +1,676 @@
|
||||
/* 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/section9/room951.h"
|
||||
#include "m4/adv_r/adv_trigger.h"
|
||||
#include "m4/burger/vars.h"
|
||||
#include "m4/m4.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
enum scene_triggers {
|
||||
START_ORION_BURGER_POSTER = 1,
|
||||
START_PLANET_X_HILLTOP_A,
|
||||
START_3,
|
||||
START_4,
|
||||
START_PLANET_X_LOW_GROUND_SHOT,
|
||||
START_6,
|
||||
START_7,
|
||||
START_PLANET_X_HILLTOP_B,
|
||||
START_9,
|
||||
START_10,
|
||||
START_SPACE_STATION_PANORAMA_A,
|
||||
START_12,
|
||||
START_13,
|
||||
START_CARGO_TRANSFER_AREA_A,
|
||||
START_15,
|
||||
START_16,
|
||||
START_VPS_OFFICE_A,
|
||||
START_18,
|
||||
START_19,
|
||||
START_HOLOGRAM,
|
||||
START_21,
|
||||
START_22,
|
||||
START_VPS_OFFICE_B,
|
||||
START_24,
|
||||
START_25,
|
||||
START_CARGO_TRANSFER_AREA_B,
|
||||
START_27,
|
||||
START_28,
|
||||
START_CARGO_TRANSFER_CONTROLS,
|
||||
START_30,
|
||||
START_31,
|
||||
START_SPACE_STATION_PANORAMA_B,
|
||||
START_33,
|
||||
START_34,
|
||||
START_35,
|
||||
START_36,
|
||||
START_37,
|
||||
START_38,
|
||||
START_39,
|
||||
START_40,
|
||||
START_41,
|
||||
START_42,
|
||||
START_43,
|
||||
START_44,
|
||||
START_45,
|
||||
START_46,
|
||||
START_47,
|
||||
START_48,
|
||||
START_50,
|
||||
START_51,
|
||||
START_52,
|
||||
START_53,
|
||||
START_54,
|
||||
START_55,
|
||||
SAVEGAME_CHECK,
|
||||
LAST_SCENE_TRIGGER = 57
|
||||
};
|
||||
|
||||
|
||||
static const seriesStreamBreak planet_x_hilltop_a[] = {
|
||||
// frame sound chan vol trigger flags variable value
|
||||
{ 0, "951_000", 3, 100, NO_TRIGGER, 0, nullptr, 0 },
|
||||
{ 15, "951_004", 2, 150, NO_TRIGGER, 0, nullptr, 0 },
|
||||
{ 36, "951_009", 1, 150, NO_TRIGGER, 1024, nullptr, 0 },
|
||||
{ 80, "951_004b", 2, 150, NO_TRIGGER, 1024, nullptr, 0 },
|
||||
{ 114, nullptr, 2, 100, NO_TRIGGER, 0, nullptr, 0 },
|
||||
{ 124, nullptr, 2, 50, NO_TRIGGER, 0, nullptr, 0 },
|
||||
{ 134, "951Z001", 2, 230, NO_TRIGGER, 0, nullptr, 0 },
|
||||
{ 158, "951_006", 1, 255, NO_TRIGGER, 0, nullptr, 0 },
|
||||
{ 165, nullptr, 0, 0, NO_TRIGGER, 0, nullptr, 0 },
|
||||
{ -1, nullptr, 0, 0, NO_TRIGGER, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak planet_x_low_shot[] = {
|
||||
{ 0, nullptr, 2, 0, -1, 2048, nullptr, 0 },
|
||||
{ 0, "952_003", 1, 200, -1, 0, nullptr, 0 },
|
||||
{ 21, "952_001", 3, 120, -1, 0, nullptr, 0 },
|
||||
{ 73, "952_002", 2, 160, -1, 0, nullptr, 0 },
|
||||
{ 80, "952Z001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 92, "952_005", 2, 160, -1, 0, nullptr, 0 },
|
||||
{ 111, "952_006", 2, 100, -1, 0, nullptr, 0 },
|
||||
{ 117, "952_007", 2, 100, -1, 0, nullptr, 0 },
|
||||
{ 124, "952_004", 1, 225, -1, 0, nullptr, 0 },
|
||||
{ 136, "952_004", 1, 245, -1, 0, nullptr, 0 },
|
||||
{ 143, "952_010", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 147, "952_004", 1, 235, -1, 0, nullptr, 0 },
|
||||
{ 153, "952_008", 2, 100, -1, 0, nullptr, 0 },
|
||||
{ 154, "952_009", 3, 200, -1, 0, nullptr, 0 },
|
||||
{ 157, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak planet_x_hilltop_b[] = {
|
||||
{ 1, "951_020", 3, 100, -1, 0, nullptr, 0 },
|
||||
{ 4, "951_007", 2, 125, -1, 0, nullptr, 0 },
|
||||
{ 7, "951z002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 54, nullptr, 0, 0, 50, 0, nullptr, 0 },
|
||||
{ 56, "951_008", 2, 150, -1, 0, nullptr, 0 },
|
||||
{ 75, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak panorama_a[] = {
|
||||
{ 1, "955_001", 1, 150, -1, 0, nullptr, 0 },
|
||||
{ 7, "955_007", 2, 220, -1, 0, nullptr, 0 },
|
||||
{ 24, "955_007", 2, 220, -1, 0, nullptr, 0 },
|
||||
{ 25, nullptr, 2, 0, -1, 2048, nullptr, 0 },
|
||||
{ 26, "955_007", 2, 220, -1, 0, nullptr, 0 },
|
||||
{ 35, "955_002", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 90, "955_007", 1, 220, -1, 0, nullptr, 0 },
|
||||
{ 92, nullptr, 1, 0, -1, 2048, nullptr, 0 },
|
||||
{ 93, "955_007", 1, 220, -1, 0, nullptr, 0 },
|
||||
{ 99, "955_010", 1, 150, -1, 0, nullptr, 0 },
|
||||
{ 104, nullptr, 3, 240, -1, 0, nullptr, 0 },
|
||||
{ 105, nullptr, 3, 220, -1, 0, nullptr, 0 },
|
||||
{ 105, "955_007", 1, 210, -1, 0, nullptr, 0 },
|
||||
{ 106, nullptr, 3, 200, -1, 0, nullptr, 0 },
|
||||
{ 107, nullptr, 3, 190, -1, 0, nullptr, 0 },
|
||||
{ 108, nullptr, 3, 180, -1, 0, nullptr, 0 },
|
||||
{ 109, nullptr, 3, 170, -1, 0, nullptr, 0 },
|
||||
{ 110, nullptr, 3, 160, -1, 0, nullptr, 0 },
|
||||
{ 111, nullptr, 3, 150, -1, 0, nullptr, 0 },
|
||||
{ 112, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
{ 113, nullptr, 3, 140, -1, 0, nullptr, 0 },
|
||||
{ 114, nullptr, 3, 120, -1, 0, nullptr, 0 },
|
||||
{ 115, nullptr, 3, 110, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak cargo_transfer_a[] = {
|
||||
{ 0, nullptr, 3, 100, -1, 0, nullptr, 0 },
|
||||
{ 1, "956_001", 2, 80, -1, 0, nullptr, 0 },
|
||||
{ 4, "956v001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 136, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak vps_office_a[] = {
|
||||
{ 1, "957_005", 3, 40, -1, 1024, nullptr, 0 },
|
||||
{ 1, "957v001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 92, "957v002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 110, "957v003", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 125, "957_004", 2, 230, -1, 0, nullptr, 0 },
|
||||
{ 177, "957_007", 2, 100, -1, 0, nullptr, 0 },
|
||||
{ 183, "957_001", 2, 150, -1, 0, nullptr, 0 },
|
||||
{ 191, "957v004", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 194, "957_006", 2, 120, -1, 1024, nullptr, 0 },
|
||||
{ 267, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak hologram[] = {
|
||||
{ 0, "958v001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 0, "957_005", 3, 20, -1, 1024, nullptr, 0 },
|
||||
{ 1, nullptr, 2, 210, -1, 0, nullptr, 0 },
|
||||
{ 39, "958_003", 1, 150, -1, 0, nullptr, 0 },
|
||||
{ 42, "958_001", 1, 200, -1, 0, nullptr, 0 },
|
||||
{ 52, "958z001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 161, "958_003", 1, 150, -1, 0, nullptr, 0 },
|
||||
{ 164, "958_004", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 170, "958v002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 264, "958z002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 329, "958v003", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 362, "958_002", 2, 50, -1, 0, nullptr, 0 },
|
||||
{ 425, "958v004", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 456, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak vps_office_b[] = {
|
||||
{ 0, "957_005", 3, 40, -1, 1024, nullptr, 0 },
|
||||
{ 8, "957Z001y", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 43, "957Z001z", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 112, "957V005", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 139, "957_002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 154, "957_003", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 170, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak cargo_transfer_b[] = {
|
||||
{ 0, "956_020", 1, 130, -1, 0, nullptr, 0 },
|
||||
{ 0, "956_000", 2, 60, -1, 1024, nullptr, 0 },
|
||||
{ 0, "956_001", 3, 80, -1, 1024, nullptr, 0 },
|
||||
{ 29, "956Z002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 67, "956_003", 1, 60, -1, 0, nullptr, 0 },
|
||||
{ 83, "956Z003", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 121, "956_002", 1, 200, -1, 0, nullptr, 0 },
|
||||
{ 132, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak transfer_controls[] = {
|
||||
{ 0, nullptr, 2, 0, -1, 2048, nullptr, 0 },
|
||||
{ 0, nullptr, 3, 0, -1, 2048, nullptr, 0 },
|
||||
{ 0, "956_001", 3, 180, -1, 1024, nullptr, 0 },
|
||||
{ 1, "959F001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 5, "959_010", 2, 170, -1, 0, nullptr, 0 },
|
||||
{ 27, "959_010", 2, 170, -1, 0, nullptr, 0 },
|
||||
{ 36, "959Z001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 43, "959_013", 2, 100, -1, 0, nullptr, 0 },
|
||||
{ 48, nullptr, 2, 0, -1, 2048, nullptr, 0 },
|
||||
{ 69, "959Z002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 100, "959F002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 146, "959Z003", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 207, "959_002", 2, 150, -1, 0, nullptr, 0 },
|
||||
{ 226, "959_003", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 235, "959_013", 1, 100, -1, 0, nullptr, 0 },
|
||||
{ 245, nullptr, 1, 0, -1, 2048, nullptr, 0 },
|
||||
{ 254, "959_010", 2, 170, -1, 0, nullptr, 0 },
|
||||
{ 257, "959_013", 1, 100, -1, 0, nullptr, 0 },
|
||||
{ 272, nullptr, 1, 0, -1, 2048, nullptr, 0 },
|
||||
{ 274, "959_004", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 277, "959_005", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 288, "959_012", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 295, "959_011", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 307, "959_005", 1, 200, -1, 0, nullptr, 0 },
|
||||
{ 311, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak panorama_b[] = {
|
||||
{ 0, "955_000", 3, 180, -1, 1024, nullptr, 0 },
|
||||
{ 0, "955_003", 2, 150, -1, 0, nullptr, 0 },
|
||||
{ 2, "955z001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 74, "955_004", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 89, "955z002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 125, "955_006", 2, 245, -1, 0, nullptr, 0 },
|
||||
{ 140, nullptr, 0, 0, -1, 0, nullptr, 0 },
|
||||
{ 148, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak break_961a[] = {
|
||||
{ 0, nullptr, 0, 0, -1, 0, nullptr, 0 },
|
||||
{ 1, nullptr, 0, 0, 47, 0, nullptr, 0 },
|
||||
{ 1, "961_001", 1, 100, -1, 0, nullptr, 0 },
|
||||
{ 63, "961_002", 1, 180, -1, 0, nullptr, 0 },
|
||||
{ 143, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
{ 147, nullptr, 0, 0, 48, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak break_961b[] = {
|
||||
{ 0, nullptr, 0, 0, -1, 0, nullptr, 0 },
|
||||
{ 4, "961_003", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 19, "961_004", 2, 180, -1, 0, nullptr, 0 },
|
||||
{ 38, "961_005", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 55, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak break_961c[] = {
|
||||
{ 0, nullptr, 0, 0, -1, 0, nullptr, 0 },
|
||||
{ 1, "961_006", 2, 130, -1, 0, nullptr, 0 },
|
||||
{ 29, "961_007", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 62, "961_008", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 75, "961_009", 1, 200, -1, 0, nullptr, 0 },
|
||||
{ 95, "961_007", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 100, nullptr, 3, 240, -1, 0, nullptr, 0 },
|
||||
{ 101, nullptr, 3, 220, -1, 0, nullptr, 0 },
|
||||
{ 102, nullptr, 3, 200, -1, 0, nullptr, 0 },
|
||||
{ 103, nullptr, 3, 180, -1, 0, nullptr, 0 },
|
||||
{ 104, nullptr, 3, 160, -1, 0, nullptr, 0 },
|
||||
{ 105, nullptr, 3, 140, -1, 0, nullptr, 0 },
|
||||
{ 106, nullptr, 3, 120, -1, 0, nullptr, 0 },
|
||||
{ 107, nullptr, 3, 100, -1, 0, nullptr, 0 },
|
||||
{ 108, nullptr, 3, 90, -1, 0, nullptr, 0 },
|
||||
{ 109, nullptr, 3, 80, -1, 0, nullptr, 0 },
|
||||
{ 110, nullptr, 3, 60, -1, 0, nullptr, 0 },
|
||||
{ 112, nullptr, 3, 40, -1, 0, nullptr, 0 },
|
||||
{ 114, nullptr, 3, 20, -1, 0, nullptr, 0 },
|
||||
{ 116, nullptr, 3, 10, -1, 0, nullptr, 0 },
|
||||
{ 117, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
{ 118, nullptr, 3, 0, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
static const seriesStreamBreak break_961d[] = {
|
||||
{ -1, nullptr, 0, 0, -1, 0, nullptr, 0 },
|
||||
{ 0, nullptr, 0, 0, -1, 0, nullptr, 0 },
|
||||
{ 39, nullptr, 0, 0, 52, 0, nullptr, 0 },
|
||||
{ 42, nullptr, 0, 0,2048, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
void Room951::preload() {
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room951::init() {
|
||||
_G(kernel).suppress_fadeup = true;
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
pal_fade_init(_G(master_palette), 0, 255, 100, 40, START_ORION_BURGER_POSTER);
|
||||
}
|
||||
|
||||
void Room951::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case START_ORION_BURGER_POSTER:
|
||||
digi_stop(1);
|
||||
digi_stop(2);
|
||||
digi_stop(3);
|
||||
|
||||
if (_G(executing) == WHOLE_GAME) {
|
||||
digi_preload("951music", -1);
|
||||
digi_play("951music", 1, 255, START_PLANET_X_HILLTOP_A, -1);
|
||||
digi_preload("952music", -1);
|
||||
} else {
|
||||
// German demo
|
||||
kernel_timing_trigger(120, START_PLANET_X_HILLTOP_A);
|
||||
}
|
||||
|
||||
digi_preload_stream_breaks(planet_x_hilltop_a);
|
||||
digi_preload_stream_breaks(planet_x_low_shot);
|
||||
digi_preload_stream_breaks(planet_x_hilltop_b);
|
||||
digi_preload_stream_breaks(panorama_a);
|
||||
digi_preload_stream_breaks(cargo_transfer_a);
|
||||
break;
|
||||
|
||||
case START_PLANET_X_HILLTOP_A:
|
||||
palette_prep_for_stream();
|
||||
series_stream_with_breaks(planet_x_hilltop_a, "PLANET X HILLTOP A", 6, 1, START_3);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_3:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_4, nullptr);
|
||||
break;
|
||||
|
||||
case START_4:
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(START_PLANET_X_LOW_GROUND_SHOT, 1, 0);
|
||||
break;
|
||||
|
||||
case START_PLANET_X_LOW_GROUND_SHOT:
|
||||
series_stream_with_breaks(planet_x_low_shot, "Planet X Low Ground Shot", 6, 1, START_6);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_6:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_7, nullptr);
|
||||
break;
|
||||
|
||||
case START_7:
|
||||
digi_unload_stream_breaks(planet_x_hilltop_a);
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(START_PLANET_X_HILLTOP_B, 1, 0);
|
||||
break;
|
||||
|
||||
case START_PLANET_X_HILLTOP_B:
|
||||
series_stream_with_breaks(planet_x_hilltop_b, "Planet X Hilltop B", 6, 1, START_9);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_9:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_10, nullptr);
|
||||
break;
|
||||
|
||||
case START_10:
|
||||
digi_unload_stream_breaks(planet_x_low_shot);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(vps_office_a);
|
||||
digi_preload_stream_breaks(hologram);
|
||||
digi_preload_stream_breaks(vps_office_b);
|
||||
release_trigger_on_digi_state(START_SPACE_STATION_PANORAMA_A, 1, 0);
|
||||
break;
|
||||
|
||||
case START_SPACE_STATION_PANORAMA_A:
|
||||
series_stream_with_breaks(panorama_a, "Space Station Panorama A", 6, 1, START_12);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_12:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_13, nullptr);
|
||||
break;
|
||||
|
||||
case START_13:
|
||||
digi_unload_stream_breaks(planet_x_hilltop_b);
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(START_CARGO_TRANSFER_AREA_A, 1, 0);
|
||||
break;
|
||||
|
||||
case START_CARGO_TRANSFER_AREA_A:
|
||||
series_stream_with_breaks(cargo_transfer_a, "Cargo Transfer Area A", 6, 1, START_15);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_15:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_16, nullptr);
|
||||
break;
|
||||
|
||||
case START_16:
|
||||
digi_unload_stream_breaks(panorama_a);
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(START_VPS_OFFICE_A, 1, 0);
|
||||
break;
|
||||
|
||||
case START_VPS_OFFICE_A:
|
||||
palette_prep_for_stream();
|
||||
digi_unload_stream_breaks(panorama_a);
|
||||
series_stream_with_breaks(vps_office_a, "VP's Office A", 6, 1, START_18);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_18:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_19, nullptr);
|
||||
break;
|
||||
|
||||
case START_19:
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(START_HOLOGRAM, 1, 0);
|
||||
break;
|
||||
|
||||
case START_HOLOGRAM:
|
||||
digi_unload_stream_breaks(cargo_transfer_a);
|
||||
series_stream_with_breaks(hologram, "Hologram", 6, 1, START_21);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_21:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_22, nullptr);
|
||||
break;
|
||||
|
||||
|
||||
case START_22:
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(START_VPS_OFFICE_B, 1, 0);
|
||||
break;
|
||||
|
||||
case START_VPS_OFFICE_B:
|
||||
series_stream_with_breaks(vps_office_b, "VP's Office B", 6, 1, START_24);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_24:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_25, nullptr);
|
||||
break;
|
||||
|
||||
case START_25:
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(cargo_transfer_b);
|
||||
release_trigger_on_digi_state(START_CARGO_TRANSFER_AREA_B, 1, 0);
|
||||
break;
|
||||
|
||||
case START_CARGO_TRANSFER_AREA_B:
|
||||
series_stream_with_breaks(cargo_transfer_b, "Cargo Transfer Area B", 6, 1, START_27);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_27:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_28, nullptr);
|
||||
break;
|
||||
|
||||
case START_28:
|
||||
digi_unload_stream_breaks(vps_office_a);
|
||||
digi_unload_stream_breaks(hologram);
|
||||
digi_unload_stream_breaks(vps_office_b);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(transfer_controls);
|
||||
release_trigger_on_digi_state(START_CARGO_TRANSFER_CONTROLS, 1, 0);
|
||||
break;
|
||||
|
||||
case START_CARGO_TRANSFER_CONTROLS:
|
||||
series_stream_with_breaks(transfer_controls, "Cargo Transfer Controls", 6, 1, START_30);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_30:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_31, nullptr);
|
||||
break;
|
||||
|
||||
case START_31:
|
||||
digi_unload_stream_breaks(cargo_transfer_b);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(panorama_b);
|
||||
release_trigger_on_digi_state(START_SPACE_STATION_PANORAMA_B, 1, 0);
|
||||
break;
|
||||
|
||||
case START_SPACE_STATION_PANORAMA_B:
|
||||
series_stream_with_breaks(panorama_b, "Space Station Panorama B", 6, 1, START_33);
|
||||
pal_fade_init(&_G(master_palette)[0], 0, 255, 100, 30, NO_TRIGGER); // Half second fade up
|
||||
break;
|
||||
|
||||
case START_33:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_34, nullptr);
|
||||
break;
|
||||
|
||||
case START_34:
|
||||
digi_unload_stream_breaks(transfer_controls);
|
||||
kernel_timing_trigger(60, START_35, nullptr);
|
||||
break;
|
||||
|
||||
case START_35:
|
||||
if (_G(executing) == WHOLE_GAME) {
|
||||
digi_preload_stream_breaks(break_961a);
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
series_stream_with_breaks(break_961a, "961a", 6, 1, START_36);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 100, 60, NO_TRIGGER);
|
||||
} else {
|
||||
_G(game).setRoom(901);
|
||||
}
|
||||
break;
|
||||
|
||||
case START_36:
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
pal_cycle_stop();
|
||||
kernel_timing_trigger(TENTH_SECOND, START_37, nullptr);
|
||||
break;
|
||||
|
||||
case START_37:
|
||||
compact_mem_and_report();
|
||||
kernel_timing_trigger(1, START_38, nullptr);
|
||||
break;
|
||||
|
||||
case START_38:
|
||||
digi_unload_stream_breaks(panorama_b);
|
||||
digi_preload_stream_breaks(break_961b);
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
series_stream_with_breaks(break_961b, "961b", 6, 1, START_39);
|
||||
pal_fade_init(_G(kernel).first_fade, 255, 100, 30, NO_TRIGGER);
|
||||
break;
|
||||
|
||||
case START_39:
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
kernel_timing_trigger(TENTH_SECOND, START_40, nullptr);
|
||||
break;
|
||||
|
||||
case START_40:
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(START_41, 1, 0);
|
||||
break;
|
||||
|
||||
case START_41:
|
||||
digi_unload_stream_breaks(break_961a);
|
||||
digi_preload_stream_breaks(break_961c);
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
series_stream_with_breaks(break_961c, "961c", 6, 1, START_42);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 100, 30, NO_TRIGGER);
|
||||
break;
|
||||
|
||||
case START_42:
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
kernel_timing_trigger(TENTH_SECOND, START_43, nullptr);
|
||||
break;
|
||||
|
||||
case START_43:
|
||||
digi_unload_stream_breaks(break_961b);
|
||||
compact_mem_and_report();
|
||||
kernel_trigger_dispatch_now(SAVEGAME_CHECK);
|
||||
break;
|
||||
|
||||
case SAVEGAME_CHECK:
|
||||
if (_G(executing) == WHOLE_GAME && !g_engine->autosaveExists()) {
|
||||
_G(game).setRoom(903);
|
||||
adv_kill_digi_between_rooms(false);
|
||||
} else {
|
||||
kernel_trigger_dispatch_now(START_44);
|
||||
}
|
||||
break;
|
||||
|
||||
case START_44:
|
||||
pal_fade_set_start(_G(master_palette), 0);
|
||||
series_stream_with_breaks(break_961d, "961d", 6, 1, START_45);
|
||||
pal_fade_init(_G(master_palette), _G(kernel).first_fade, 255, 100, 30, -1);
|
||||
break;
|
||||
|
||||
case START_45:
|
||||
kernel_timing_trigger(TENTH_SECOND, START_46, nullptr);
|
||||
break;
|
||||
|
||||
case START_46:
|
||||
digi_preload_stream_breaks(break_961c);
|
||||
digi_preload_stream_breaks(break_961d);
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(LAST_SCENE_TRIGGER, 1, 0);
|
||||
break;
|
||||
|
||||
case START_47:
|
||||
pal_cycle_init(224, 254, 4, -1, -1);
|
||||
break;
|
||||
|
||||
case START_48:
|
||||
pal_cycle_stop();
|
||||
break;
|
||||
|
||||
case START_50:
|
||||
if (_G(executing) == WHOLE_GAME)
|
||||
digi_play("952music", 3, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case START_51:
|
||||
if (_G(executing) == WHOLE_GAME)
|
||||
digi_play_loop("952music", 3, 255, -1, -1);
|
||||
break;
|
||||
|
||||
case START_52:
|
||||
pal_fade_init(_G(master_palette), 0, 255, 0, 30, -1);
|
||||
break;
|
||||
|
||||
case START_53:
|
||||
pal_fade_init(_G(master_palette), 0, 255, 100, 30, -1);
|
||||
break;
|
||||
|
||||
case START_54:
|
||||
pal_fade_init(_G(master_palette), 0, 255, 0, 60, -1);
|
||||
break;
|
||||
|
||||
case START_55:
|
||||
pal_fade_init(_G(master_palette), 0, 255, 100, 60, -1);
|
||||
break;
|
||||
|
||||
case LAST_SCENE_TRIGGER:
|
||||
compact_mem_and_report();
|
||||
if (_G(executing) == WHOLE_GAME) {
|
||||
g_vars->initialize_game();
|
||||
_G(game).setRoom(801);
|
||||
} else if (g_engine->getLanguage() == Common::EN_ANY) {
|
||||
_G(game).setRoom(901);
|
||||
} else {
|
||||
_G(kernel).force_restart = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
_G(kernel).continue_handling_trigger = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
45
engines/m4/burger/rooms/section9/room951.h
Normal file
45
engines/m4/burger/rooms/section9/room951.h
Normal 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_SECTION9_ROOM951_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_ROOM951_H
|
||||
|
||||
#include "m4/burger/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
class Room951 : public Rooms::Room {
|
||||
public:
|
||||
Room951() : Rooms::Room() {}
|
||||
~Room951() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
514
engines/m4/burger/rooms/section9/room971.cpp
Normal file
514
engines/m4/burger/rooms/section9/room971.cpp
Normal file
@@ -0,0 +1,514 @@
|
||||
/* 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/section9/room971.h"
|
||||
#include "m4/burger/vars.h"
|
||||
#include "m4/m4.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
const seriesStreamBreak Room971::SERIES1[] = {
|
||||
{ 0, "971intro", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 79, "971ship", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 109, nullptr, 0, 0, 56, 0, nullptr, 0 },
|
||||
{ 110, "972birds", 3, 100, 1024, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES2[] = {
|
||||
{ 0, "971d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 0, "971tunes", 3, 100, -1, 0, nullptr, 0 },
|
||||
{ 77, "971run", 2, 160, -1, 0, nullptr, 0 },
|
||||
{ 122, "971open", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 125, "971slam", 2, 200, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES3[] = {
|
||||
{ 0, "972birds", 3, 80, -1, 1024, nullptr, 0 },
|
||||
{ 1, "972d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 35, "971slam", 2, 80, -1, 0, nullptr, 0 },
|
||||
{ 53, "972run_1", 2, 100, -1, 0, nullptr, 0 },
|
||||
{ 110, "972dream", 2, 150, -1, 0, nullptr, 0 },
|
||||
{ 129, nullptr, 0, 0, 56, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES4[] = {
|
||||
{ 0, "973ambi", 3, 80, -1, 1024, nullptr, 0 },
|
||||
{ 1, "973d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 1, nullptr, 0, 0, 57, 0, nullptr, 0 },
|
||||
{ 1, "973zap_1", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 14, "973zap_2", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 25, "973ducto", 2, 80, -1, 0, nullptr, 0 },
|
||||
{ 64, "973whirl", 2, 155, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES5[] = {
|
||||
{ 1, "975d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 36, "975zlick", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 48, "975zeat", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 56, "975zeat", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 64, "975zgulp", 2, 155, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES6[] = {
|
||||
{ 3, "976d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 9, "976spark", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 15, "976spark", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 29, "976clamp", 2, 100, -1, 0, nullptr, 0 },
|
||||
{ 43, "976tv", 3, 100, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES7[] = {
|
||||
{ 0, "977ambi", 3, 50, -1, 1024, nullptr, 0 },
|
||||
{ 1, "977d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 32, "977wahh", 2, 120, -1, 0, nullptr, 0 },
|
||||
{ 43, "977zlaff", 2, 120, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES8[] = {
|
||||
{ 1, "978d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 11, "978lick", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 19, "978eat", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 31, "978gulp", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 54, "978lick", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 64, "978eat", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 76, "978gulp", 2, 200, -1, 0, nullptr, 0 },
|
||||
{ 82, nullptr, 3, 0, -1, 2048, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES9[] = {
|
||||
{ 0, "972birds", 3, 70, -1, 1024, nullptr, 0 },
|
||||
{ 1, "972d002", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 3, "972run_2", 2, 80, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES10[] = {
|
||||
{ 0, "980ambi", 3, 150, -1, 1024, nullptr, 0 },
|
||||
{ 10, "980d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 46, "980smash", 2, 255, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES11[] = {
|
||||
{ 0, "981ambi", 3, 70, -1, 0, nullptr, 0 },
|
||||
{ 2, "981cut", 2, 150, -1, 0, nullptr, 0 },
|
||||
{ 12, "981cut", 2, 150, -1, 0, nullptr, 0 },
|
||||
{ 26, "981cut", 2, 150, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES12[] = {
|
||||
{ 1, "982p001", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 23, "982gun", 2, 255, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES13[] = {
|
||||
{ 0, "984ambi", 3, 60, -1, 1024, nullptr, 0 },
|
||||
{ 10, "984d001", 1, 255, -1, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES14[] = {
|
||||
{ 36, "985w001", 2, 225, -1, 0, nullptr, 0 },
|
||||
{ 48, "985a001", 1, 225, -1, 0, nullptr, 0 },
|
||||
{ 68, nullptr, 3, 0, -1, 2048, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES15[] = {
|
||||
{ 0, "972birds", 3, 70, -1, 1024, nullptr, 0 },
|
||||
{ 0, "972d003", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 84, "972d004", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 149, "972w001", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 219, "972ducto", 1, 155, -1, 0, nullptr, 0 },
|
||||
{ 232, "972w002", 2, 255, -1, 0, nullptr, 0 },
|
||||
{ 255, "972d005", 1, 255, -1, 0, nullptr, 0 },
|
||||
{ 325, "972glug", 2, 155, -1, 0, nullptr, 0 },
|
||||
{ 335, nullptr, 0, 0, 46, 0, nullptr, 0 },
|
||||
{ 338, nullptr, 0, 0, 56, 0, nullptr, 0 },
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
const seriesStreamBreak Room971::SERIES16[] = {
|
||||
STREAM_BREAK_END
|
||||
};
|
||||
|
||||
void Room971::preload() {
|
||||
palette_prep_for_stream();
|
||||
_G(player).walker_in_this_scene = false;
|
||||
}
|
||||
|
||||
void Room971::init() {
|
||||
palette_prep_for_stream();
|
||||
_G(kernel).suppress_fadeup = true;
|
||||
pal_fade_set_start(0);
|
||||
kernel_timing_trigger(1, 1);
|
||||
}
|
||||
|
||||
void Room971::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 1:
|
||||
palette_prep_for_stream();
|
||||
digi_stop(1);
|
||||
digi_stop(2);
|
||||
digi_stop(3);
|
||||
digi_unload("971outro");
|
||||
digi_unload_stream_breaks(SERIES16);
|
||||
digi_preload_stream_breaks(SERIES1);
|
||||
digi_preload_stream_breaks(SERIES2);
|
||||
digi_preload_stream_breaks(SERIES3);
|
||||
digi_preload_stream_breaks(SERIES4);
|
||||
digi_preload_stream_breaks(SERIES5);
|
||||
|
||||
series_stream_with_breaks(SERIES1, "971title", 6, 1, 2);
|
||||
pal_fade_init(0, 255, 100, 60, -1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
palette_prep_for_stream();
|
||||
release_trigger_on_digi_state(3, 3);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
digi_unload("971intro");
|
||||
digi_unload("971ship");
|
||||
palette_prep_for_stream();
|
||||
series_stream_with_breaks(SERIES2, "971a", 6, 1, 4);
|
||||
pal_fade_init(0, 255, 100, 60, -1);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(5, 6);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
release_trigger_on_digi_state(6, 1);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
series_stream_with_breaks(SERIES3, "972a", 6, 1, 7);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 8);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(9, 1);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
series_stream_with_breaks(SERIES4, "973a", 6, 1, 10);
|
||||
pal_fade_init(0, 255, 100, 120, -1);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 11);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(12, 1);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
series_stream_with_breaks(SERIES5, "975a", 6, 1, 13);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 14);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
digi_unload_stream_breaks(SERIES2);
|
||||
digi_unload_stream_breaks(SERIES3);
|
||||
digi_unload_stream_breaks(SERIES4);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(SERIES6);
|
||||
release_trigger_on_digi_state(15, 1);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
series_stream_with_breaks(SERIES6, "976a", 6, 1, 16);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 17);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
digi_unload_stream_breaks(SERIES5);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(SERIES7);
|
||||
release_trigger_on_digi_state(18, 1);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
series_stream_with_breaks(SERIES7, "977a", 6, 1, 19);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 19:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 20);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
digi_unload_stream_breaks(SERIES6);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(SERIES8);
|
||||
release_trigger_on_digi_state(21, 1);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
series_stream_with_breaks(SERIES8, "978a", 6, 1, 22);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 22:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 23);
|
||||
break;
|
||||
|
||||
case 23:
|
||||
digi_unload_stream_breaks(SERIES7);
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(24, 1);
|
||||
break;
|
||||
|
||||
case 24:
|
||||
series_stream_with_breaks(SERIES9, "972b", 6, 1, 25);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 26);
|
||||
break;
|
||||
|
||||
case 26:
|
||||
digi_unload_stream_breaks(SERIES8);
|
||||
digi_unload_stream_breaks(SERIES9);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(SERIES10);
|
||||
digi_preload_stream_breaks(SERIES11);
|
||||
digi_preload_stream_breaks(SERIES12);
|
||||
release_trigger_on_digi_state(30, 1);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
series_stream_with_breaks(SERIES10, "980a", 6, 1, 31);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 31:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 32);
|
||||
break;
|
||||
|
||||
case 32:
|
||||
compact_mem_and_report();
|
||||
kernel_trigger_dispatch_now(33);
|
||||
break;
|
||||
|
||||
case 33:
|
||||
series_stream_with_breaks(SERIES11, "981a", 6, 1, 34);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 34:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 35);
|
||||
break;
|
||||
|
||||
case 35:
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(36, 1);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
series_stream_with_breaks(SERIES12, "982a", 6, 1, 37);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 37:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 38);
|
||||
break;
|
||||
|
||||
case 38:
|
||||
digi_unload_stream_breaks(SERIES10);
|
||||
digi_unload_stream_breaks(SERIES11);
|
||||
digi_unload_stream_breaks(SERIES12);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(SERIES13);
|
||||
digi_preload_stream_breaks(SERIES14);
|
||||
release_trigger_on_digi_state(39, 1);
|
||||
break;
|
||||
|
||||
case 39:
|
||||
series_stream_with_breaks(SERIES13, "984a", 6, 1, 40);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 40:
|
||||
palette_prep_for_stream();
|
||||
kernel_trigger_dispatch_now(42);
|
||||
break;
|
||||
|
||||
case 42:
|
||||
// The Ultimate answer to Life, The Universe, and Everything
|
||||
series_stream_with_breaks(SERIES14, "985a", 6, 1, 43);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 43:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 44);
|
||||
break;
|
||||
|
||||
case 44:
|
||||
digi_unload_stream_breaks(SERIES13);
|
||||
digi_unload_stream_breaks(SERIES14);
|
||||
compact_mem_and_report();
|
||||
digi_preload_stream_breaks(SERIES15);
|
||||
digi_preload("971outro");
|
||||
release_trigger_on_digi_state(45, 1);
|
||||
break;
|
||||
|
||||
case 45:
|
||||
series_stream_with_breaks(SERIES15, "972c", 6, 1, 47);
|
||||
pal_fade_init(0, 255, 100, 15, -1);
|
||||
break;
|
||||
|
||||
case 46:
|
||||
digi_play("971outro", 3, 200, 53);
|
||||
break;
|
||||
|
||||
case 47:
|
||||
palette_prep_for_stream();
|
||||
kernel_timing_trigger(6, 48);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
digi_unload_stream_breaks(SERIES15);
|
||||
compact_mem_and_report();
|
||||
release_trigger_on_digi_state(49, 1);
|
||||
break;
|
||||
|
||||
case 49:
|
||||
palette_prep_for_stream();
|
||||
_comeSoonS = series_load("comesoon", -1, _G(master_palette));
|
||||
_comeSoon = series_show("comesoon", 0);
|
||||
pal_fade_init(0, 255, 100, 120, 50);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
kernel_timing_trigger(480, 51);
|
||||
digi_preload_stream_breaks(SERIES1);
|
||||
digi_preload_stream_breaks(SERIES2);
|
||||
digi_preload_stream_breaks(SERIES3);
|
||||
digi_preload_stream_breaks(SERIES4);
|
||||
digi_preload_stream_breaks(SERIES5);
|
||||
break;
|
||||
|
||||
case 51:
|
||||
pal_fade_init(0, 255, 0, 120, 52);
|
||||
break;
|
||||
|
||||
case 52:
|
||||
terminateMachineAndNull(_comeSoon);
|
||||
series_unload(_comeSoonS);
|
||||
digi_preload_stream_breaks(SERIES16);
|
||||
series_stream_with_breaks(SERIES16, "swmclogo", 6, 1, -1);
|
||||
pal_fade_init(0, 255, 100, 60, -1);
|
||||
break;
|
||||
|
||||
case 53:
|
||||
pal_fade_init(0, 255, 0, 120, 58);
|
||||
break;
|
||||
|
||||
case 54:
|
||||
pal_fade_init(0, 255, 0, 30, -1);
|
||||
break;
|
||||
|
||||
case 55:
|
||||
pal_fade_init(0, 255, 100, 30, -1);
|
||||
break;
|
||||
|
||||
case 56:
|
||||
pal_fade_init(0, 255, 0, 60, -1);
|
||||
break;
|
||||
|
||||
case 57:
|
||||
pal_fade_init(0, 255, 100, 60, -1);
|
||||
break;
|
||||
|
||||
case 58:
|
||||
switch (_G(executing)) {
|
||||
case JUST_OVERVIEW:
|
||||
kernel_trigger_dispatch_now(1);
|
||||
break;
|
||||
|
||||
case INTERACTIVE_DEMO:
|
||||
_G(game).setRoom(901);
|
||||
player_set_commands_allowed(false);
|
||||
break;
|
||||
|
||||
case WHOLE_GAME:
|
||||
_G(game).setRoom(903);
|
||||
player_set_commands_allowed(false);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
_G(kernel).continue_handling_trigger = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
65
engines/m4/burger/rooms/section9/room971.h
Normal file
65
engines/m4/burger/rooms/section9/room971.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef M4_BURGER_ROOMS_SECTION9_ROOM971_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_ROOM971_H
|
||||
|
||||
#include "m4/burger/rooms/room.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
class Room971 : public Rooms::Room {
|
||||
private:
|
||||
static const seriesStreamBreak SERIES1[];
|
||||
static const seriesStreamBreak SERIES2[];
|
||||
static const seriesStreamBreak SERIES3[];
|
||||
static const seriesStreamBreak SERIES4[];
|
||||
static const seriesStreamBreak SERIES5[];
|
||||
static const seriesStreamBreak SERIES6[];
|
||||
static const seriesStreamBreak SERIES7[];
|
||||
static const seriesStreamBreak SERIES8[];
|
||||
static const seriesStreamBreak SERIES9[];
|
||||
static const seriesStreamBreak SERIES10[];
|
||||
static const seriesStreamBreak SERIES11[];
|
||||
static const seriesStreamBreak SERIES12[];
|
||||
static const seriesStreamBreak SERIES13[];
|
||||
static const seriesStreamBreak SERIES14[];
|
||||
static const seriesStreamBreak SERIES15[];
|
||||
static const seriesStreamBreak SERIES16[];
|
||||
int32 _comeSoonS = 0;
|
||||
machine *_comeSoon = nullptr;
|
||||
|
||||
public:
|
||||
Room971() : Rooms::Room() {}
|
||||
~Room971() override {}
|
||||
|
||||
void preload() override;
|
||||
void init() override;
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
60
engines/m4/burger/rooms/section9/section9.cpp
Normal file
60
engines/m4/burger/rooms/section9/section9.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
/* 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/section9/section9.h"
|
||||
#include "m4/burger/vars.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
Section9::Section9() : Rooms::Section() {
|
||||
add(901, &_room901);
|
||||
add(902, &_room902);
|
||||
add(903, &_room903);
|
||||
add(904, &_room904);
|
||||
add(951, &_room951);
|
||||
add(971, &_room971);
|
||||
}
|
||||
|
||||
void Section9::daemon() {
|
||||
switch (_G(kernel).trigger) {
|
||||
case 9002:
|
||||
_G(game).setRoom(902);
|
||||
break;
|
||||
case 9004:
|
||||
_G(game).setRoom(904);
|
||||
break;
|
||||
case 9005:
|
||||
_G(game).setRoom(951);
|
||||
break;
|
||||
case 9006:
|
||||
_G(game).setRoom(971);
|
||||
break;
|
||||
default:
|
||||
_G(kernel).continue_handling_trigger = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
56
engines/m4/burger/rooms/section9/section9.h
Normal file
56
engines/m4/burger/rooms/section9/section9.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* 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_SECTION9_H
|
||||
#define M4_BURGER_ROOMS_SECTION9_H
|
||||
|
||||
#include "m4/burger/rooms/section.h"
|
||||
#include "m4/burger/rooms/section9/room901.h"
|
||||
#include "m4/burger/rooms/section9/room902.h"
|
||||
#include "m4/burger/rooms/section9/room903.h"
|
||||
#include "m4/burger/rooms/section9/room904.h"
|
||||
#include "m4/burger/rooms/section9/room951.h"
|
||||
#include "m4/burger/rooms/section9/room971.h"
|
||||
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
namespace Rooms {
|
||||
|
||||
class Section9 : public Rooms::Section {
|
||||
private:
|
||||
Room901 _room901;
|
||||
Room902 _room902;
|
||||
Room903 _room903;
|
||||
Room904 _room904;
|
||||
Room951 _room951;
|
||||
Room971 _room971;
|
||||
public:
|
||||
Section9();
|
||||
virtual ~Section9() {}
|
||||
|
||||
void daemon() override;
|
||||
};
|
||||
|
||||
} // namespace Rooms
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user