Initial commit
This commit is contained in:
904
engines/tsage/ringworld2/ringworld2_airduct.cpp
Normal file
904
engines/tsage/ringworld2/ringworld2_airduct.cpp
Normal file
@@ -0,0 +1,904 @@
|
||||
/* 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 "tsage/ringworld2/ringworld2_airduct.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 1200 - Air Ducts Maze
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
Scene1200::Scene1200() {
|
||||
_nextCrawlDirection = 0;
|
||||
_field414 = 0;
|
||||
_field416 = 0;
|
||||
_field418 = 0;
|
||||
_field41A = 0;
|
||||
_fixupMaze = false;
|
||||
}
|
||||
|
||||
void Scene1200::synchronize(Serializer &s) {
|
||||
SceneExt::synchronize(s);
|
||||
|
||||
s.syncAsSint16LE(_nextCrawlDirection);
|
||||
s.syncAsSint16LE(_field414);
|
||||
s.syncAsSint16LE(_field416);
|
||||
s.syncAsSint16LE(_field418);
|
||||
s.syncAsSint16LE(_field41A);
|
||||
s.syncAsSint16LE(_fixupMaze);
|
||||
}
|
||||
|
||||
Scene1200::LaserPanel::LaserPanel() {
|
||||
}
|
||||
|
||||
void Scene1200::LaserPanel::Jumper::init(int state) {
|
||||
_state = state;
|
||||
|
||||
SceneActor::postInit();
|
||||
setup(1003, 1, 1);
|
||||
fixPriority(255);
|
||||
|
||||
switch (_state) {
|
||||
case 1:
|
||||
switch (R2_GLOBALS._ductMazePanel1State) {
|
||||
case 1:
|
||||
setFrame2(2);
|
||||
setPosition(Common::Point(129, 101));
|
||||
break;
|
||||
case 2:
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(135, 95));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
switch (R2_GLOBALS._ductMazePanel2State) {
|
||||
case 1:
|
||||
setFrame2(2);
|
||||
setPosition(Common::Point(152, 101));
|
||||
break;
|
||||
case 2:
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(158, 122));
|
||||
break;
|
||||
case 3:
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(135, 122));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
switch (R2_GLOBALS._ductMazePanel3State) {
|
||||
case 1:
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(158, 95));
|
||||
break;
|
||||
case 2:
|
||||
setFrame2(2);
|
||||
setPosition(Common::Point(175, 101));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
setDetails(1200, 12, -1, -1, 2, (SceneItem *) NULL);
|
||||
}
|
||||
|
||||
bool Scene1200::LaserPanel::Jumper::startAction(CursorType action, Event &event) {
|
||||
if (action != CURSOR_USE)
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
R2_GLOBALS._sound2.play(260);
|
||||
switch (_state) {
|
||||
case 1:
|
||||
if (R2_GLOBALS._ductMazePanel1State == 1) {
|
||||
R2_GLOBALS._ductMazePanel1State = 2;
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(135, 95));
|
||||
} else {
|
||||
R2_GLOBALS._ductMazePanel1State = 1;
|
||||
setFrame2(2);
|
||||
setPosition(Common::Point(129, 101));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
++R2_GLOBALS._ductMazePanel2State;
|
||||
if (R2_GLOBALS._ductMazePanel2State == 4)
|
||||
R2_GLOBALS._ductMazePanel2State = 1;
|
||||
|
||||
switch (R2_GLOBALS._ductMazePanel2State) {
|
||||
case 1:
|
||||
setFrame2(2);
|
||||
setPosition(Common::Point(152, 101));
|
||||
break;
|
||||
case 2:
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(158, 122));
|
||||
break;
|
||||
case 3:
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(135, 122));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (R2_GLOBALS._ductMazePanel3State == 1) {
|
||||
R2_GLOBALS._ductMazePanel3State = 2;
|
||||
setFrame2(2);
|
||||
setPosition(Common::Point(175, 101));
|
||||
} else {
|
||||
R2_GLOBALS._ductMazePanel3State = 1;
|
||||
setFrame2(3);
|
||||
setPosition(Common::Point(158, 95));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
|
||||
scene->_field418 = 0;
|
||||
|
||||
if ((R2_GLOBALS._ductMazePanel1State == 1) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
|
||||
scene->_field418 = 1;
|
||||
else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
|
||||
scene->_field418 = 2;
|
||||
else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 2))
|
||||
scene->_field418 = 3;
|
||||
else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 3) && (R2_GLOBALS._ductMazePanel3State == 1))
|
||||
scene->_field418 = 4;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Scene1200::LaserPanel::postInit(SceneObjectList *OwnerList) {
|
||||
Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
scene->_field41A = 1;
|
||||
R2_GLOBALS._events.setCursor(CURSOR_USE);
|
||||
setup2(1003, 1, 1, 100, 40);
|
||||
setup3(1200, 11, -1, -1);
|
||||
R2_GLOBALS._sound2.play(259);
|
||||
_jumper1.init(1);
|
||||
_jumper2.init(2);
|
||||
_jumper3.init(3);
|
||||
|
||||
R2_GLOBALS._player._canWalk = false;
|
||||
}
|
||||
|
||||
void Scene1200::LaserPanel::remove() {
|
||||
Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
scene->_field41A = 0;
|
||||
scene->_sceneAreas.remove(&_jumper1);
|
||||
scene->_sceneAreas.remove(&_jumper2);
|
||||
scene->_sceneAreas.remove(&_jumper3);
|
||||
_jumper1.remove();
|
||||
_jumper2.remove();
|
||||
_jumper3.remove();
|
||||
|
||||
ModalWindow::remove();
|
||||
R2_GLOBALS._player._canWalk = true;
|
||||
}
|
||||
|
||||
void Scene1200::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(1200);
|
||||
SceneExt::postInit();
|
||||
|
||||
if (R2_GLOBALS._sceneManager._previousScene < 3200)
|
||||
R2_GLOBALS._sound1.play(257);
|
||||
|
||||
_nextCrawlDirection = CRAWL_EAST;
|
||||
_field414 = 0;
|
||||
_field416 = 0;
|
||||
_field418 = 0;
|
||||
_field41A = 0;
|
||||
|
||||
if ((R2_GLOBALS._ductMazePanel1State == 1) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
|
||||
_field418 = 1;
|
||||
else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
|
||||
_field418 = 2;
|
||||
else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 2))
|
||||
_field418 = 3;
|
||||
else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 3) && (R2_GLOBALS._ductMazePanel3State == 1))
|
||||
_field418 = 4;
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.disableControl();
|
||||
R2_GLOBALS._player.setup(3156, 1, 6);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(160, 70));
|
||||
R2_GLOBALS._player._numFrames = 10;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 1200;
|
||||
|
||||
_actor1.postInit();
|
||||
_actor1.hide();
|
||||
|
||||
_mazeUI.setDisplayBounds(Rect(110, 20, 210, 120));
|
||||
|
||||
_mazeUI.postInit();
|
||||
_mazeUI.load(1);
|
||||
_mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
|
||||
|
||||
R2_GLOBALS._player.enableControl();
|
||||
_item1.setDetails(Rect(0, 0, 320, 200), 1200, 0, 1, 2, 1, NULL);
|
||||
}
|
||||
|
||||
void Scene1200::signal() {
|
||||
switch (_sceneMode++) {
|
||||
case 1:
|
||||
// No break on purpose
|
||||
case 1200:
|
||||
// No break on purpose
|
||||
case 1201:
|
||||
// No break on purpose
|
||||
case 1202:
|
||||
// No break on purpose
|
||||
case 1203:
|
||||
R2_GLOBALS._player.enableControl();
|
||||
// CHECKME: The original is calling _eventManager.waitEvent();
|
||||
_sceneMode = 2;
|
||||
break;
|
||||
case 10:
|
||||
_field416 = 1;
|
||||
_field414 = 6;
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.setStrip(1);
|
||||
R2_GLOBALS._player.setFrame(5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
case 11:
|
||||
// No break on purpose
|
||||
case 21:
|
||||
// No break on purpose
|
||||
case 31:
|
||||
// No break on purpose
|
||||
case 41:
|
||||
_field416 = 0;
|
||||
break;
|
||||
case 12:
|
||||
_field414 = 14;
|
||||
R2_GLOBALS._player._numFrames = 10;
|
||||
R2_GLOBALS._player.setup(3155, 1, 4);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(160, 70));
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
|
||||
break;
|
||||
case 13:
|
||||
// No break on purpose
|
||||
case 16:
|
||||
// No break on purpose
|
||||
case 23:
|
||||
// No break on purpose
|
||||
case 26:
|
||||
// No break on purpose
|
||||
case 33:
|
||||
// No break on purpose
|
||||
case 36:
|
||||
// No break on purpose
|
||||
case 43:
|
||||
// No break on purpose
|
||||
case 46:
|
||||
R2_GLOBALS._player.setFrame(4);
|
||||
_sceneMode = 1;
|
||||
setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 15:
|
||||
// No break on purpose
|
||||
case 25:
|
||||
// No break on purpose
|
||||
case 35:
|
||||
// No break on purpose
|
||||
case 45:
|
||||
_field414 = 20;
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
|
||||
break;
|
||||
case 20:
|
||||
_field416 = 1;
|
||||
_field414 = 6;
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.setStrip(2);
|
||||
R2_GLOBALS._player.setFrame(5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
case 22:
|
||||
_field414 = 14;
|
||||
R2_GLOBALS._player._numFrames = 10;
|
||||
R2_GLOBALS._player.setup(3155, 2, 4);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(160, 70));
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
|
||||
break;
|
||||
case 30:
|
||||
_field416 = 1;
|
||||
_field414 = 6;
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.setStrip(3);
|
||||
R2_GLOBALS._player.setFrame(5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
case 32:
|
||||
_field414 = 14;
|
||||
R2_GLOBALS._player._numFrames = 10;
|
||||
R2_GLOBALS._player.setup(3155, 3, 4);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(160, 70));
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
|
||||
break;
|
||||
case 40:
|
||||
_field416 = 1;
|
||||
_field414 = 6;
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.setStrip(4);
|
||||
R2_GLOBALS._player.setFrame(5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
case 42:
|
||||
_field414 = 14;
|
||||
R2_GLOBALS._player._numFrames = 10;
|
||||
R2_GLOBALS._player.setup(3155, 4, 4);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(160, 70));
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
|
||||
break;
|
||||
case 50:
|
||||
// No break on purpose
|
||||
case 55:
|
||||
// No break on purpose
|
||||
case 60:
|
||||
R2_GLOBALS._player.setup(3156, 5, 1);
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 51:
|
||||
// No break on purpose
|
||||
case 56:
|
||||
// No break on purpose
|
||||
case 117:
|
||||
R2_GLOBALS._player.setup(3157, 1, 1);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 52:
|
||||
// No break on purpose
|
||||
case 82:
|
||||
// No break on purpose
|
||||
case 118:
|
||||
R2_GLOBALS._player.setup(3156, 3, 6);
|
||||
_sceneMode = 1;
|
||||
setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 57:
|
||||
// No break on purpose
|
||||
case 91:
|
||||
// No break on purpose
|
||||
case 96:
|
||||
R2_GLOBALS._player.setup(3157, 2, 1);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 58:
|
||||
// No break on purpose
|
||||
case 92:
|
||||
// No break on purpose
|
||||
case 122:
|
||||
R2_GLOBALS._player.setup(3156, 2, 6);
|
||||
_sceneMode = 1;
|
||||
setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 61:
|
||||
R2_GLOBALS._player.setup(3157, 4, 5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
case 62:
|
||||
// No break on purpose
|
||||
case 72:
|
||||
// No break on purpose
|
||||
case 98:
|
||||
R2_GLOBALS._player.setup(3156, 4, 6);
|
||||
_sceneMode = 1;
|
||||
setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 70:
|
||||
// No break on purpose
|
||||
case 75:
|
||||
// No break on purpose
|
||||
case 80:
|
||||
R2_GLOBALS._player.setup(3156, 6, 1);
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 71:
|
||||
// No break on purpose
|
||||
case 76:
|
||||
// No break on purpose
|
||||
case 97:
|
||||
R2_GLOBALS._player.setup(3157, 3, 1);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 77:
|
||||
// No break on purpose
|
||||
case 111:
|
||||
// No break on purpose
|
||||
case 116:
|
||||
R2_GLOBALS._player.setup(3157, 4, 1);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 78:
|
||||
// No break on purpose
|
||||
case 102:
|
||||
// No break on purpose
|
||||
case 112:
|
||||
R2_GLOBALS._player.setup(3156, 1, 6);
|
||||
_sceneMode = 1;
|
||||
setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 81:
|
||||
R2_GLOBALS._player.setup(3157, 2, 5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
case 90:
|
||||
// No break on purpose
|
||||
case 95:
|
||||
// No break on purpose
|
||||
case 100:
|
||||
R2_GLOBALS._player.setup(3156, 7, 1);
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 101:
|
||||
R2_GLOBALS._player.setup(3157, 1, 5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
case 110:
|
||||
// No break on purpose
|
||||
case 115:
|
||||
// No break on purpose
|
||||
case 120:
|
||||
R2_GLOBALS._player.setup(3156, 8, 1);
|
||||
R2_GLOBALS._player._numFrames = 5;
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 121:
|
||||
R2_GLOBALS._player.setup(3157, 3, 5);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
default:
|
||||
// CHECKME: The original is walling _eventManager.waitEvent();
|
||||
_sceneMode = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1200::process(Event &event) {
|
||||
if (_field414 != 0)
|
||||
return;
|
||||
|
||||
Scene::process(event);
|
||||
|
||||
if (!R2_GLOBALS._player._canWalk)
|
||||
return;
|
||||
|
||||
if (event.eventType == EVENT_BUTTON_DOWN) {
|
||||
Common::Point cellPos = R2_GLOBALS._ventCellPos;
|
||||
_mazeUI.pixelToCellXY(cellPos);
|
||||
|
||||
int cellId = _mazeUI.getCellFromPixelXY(event.mousePos);
|
||||
switch (R2_GLOBALS._events.getCursor()) {
|
||||
case CURSOR_WALK:
|
||||
event.handled = true;
|
||||
if ((event.mousePos.x > 179) && (event.mousePos.x < 210) && (event.mousePos.y > 50) && (event.mousePos.y < 89))
|
||||
startCrawling(CRAWL_EAST);
|
||||
|
||||
if ((event.mousePos.x > 109) && (event.mousePos.x < 140) && (event.mousePos.y > 50) && (event.mousePos.y < 89))
|
||||
startCrawling(CRAWL_WEST);
|
||||
|
||||
if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 89) && (event.mousePos.y < 120))
|
||||
startCrawling(CRAWL_SOUTH);
|
||||
|
||||
if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 19) && (event.mousePos.y < 50))
|
||||
startCrawling(CRAWL_NORTH);
|
||||
break;
|
||||
case CURSOR_USE:
|
||||
if (cellId > 36) {
|
||||
if ( ((cellPos.x == 3) && (cellPos.y == 33))
|
||||
|| ((cellPos.x == 7) && (cellPos.y == 33))
|
||||
|| ((cellPos.x == 33) && (cellPos.y == 41))
|
||||
|| ((cellPos.x == 5) && (cellPos.y == 5))
|
||||
|| ((cellPos.x == 13) && (cellPos.y == 21))
|
||||
|| ((cellPos.x == 17) && (cellPos.y == 21))
|
||||
|| ((cellPos.x == 17) && (cellPos.y == 5))
|
||||
|| ((cellPos.x == 17) && (cellPos.y == 9))
|
||||
|| ((cellPos.x == 29) && (cellPos.y == 17))
|
||||
|| ((cellPos.x == 33) && (cellPos.y == 17))
|
||||
|| ((cellPos.x == 35) && (cellPos.y == 17))
|
||||
|| ((cellPos.x == 41) && (cellPos.y == 21)) ) {
|
||||
_laserPanel.postInit();
|
||||
event.handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ((cellId == 1) || (cellId == 4) || (cellId == 11) || (cellId == 14)) {
|
||||
if ( ((cellPos.x == 3) && (cellPos.y == 9))
|
||||
|| ((cellPos.x == 11) && (cellPos.y == 27))
|
||||
|| ((cellPos.x == 17) && (cellPos.y == 7))
|
||||
|| ((cellPos.x == 17) && (cellPos.y == 27))
|
||||
|| ((cellPos.x == 17) && (cellPos.y == 33))
|
||||
|| (cellPos.x == 33) ) {
|
||||
switch (cellPos.x) {
|
||||
case 3:
|
||||
R2_GLOBALS._sceneManager.changeScene(3150);
|
||||
break;
|
||||
case 33:
|
||||
if (R2_GLOBALS._scientistConvIndex >= 4)
|
||||
R2_GLOBALS._sceneManager.changeScene(3250);
|
||||
else
|
||||
SceneItem::display(1200, 6, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, LIST_END);
|
||||
break;
|
||||
default:
|
||||
SceneItem::display(1200, 5, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, LIST_END);
|
||||
break;
|
||||
}
|
||||
event.handled = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CURSOR_LOOK:
|
||||
if ((cellId == 1) || (cellId == 4) || (cellId == 11) || (cellId == 14)) {
|
||||
event.handled = true;
|
||||
switch (cellPos.x) {
|
||||
case 3:
|
||||
// It was your cell.
|
||||
SceneItem::display(1200, 8, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
|
||||
break;
|
||||
case 9:
|
||||
R2_GLOBALS._sceneManager.changeScene(3240);
|
||||
break;
|
||||
case 11:
|
||||
if (cellPos.y == 27)
|
||||
R2_GLOBALS._sceneManager.changeScene(3210);
|
||||
else
|
||||
// A vent grill
|
||||
SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
|
||||
break;
|
||||
case 17:
|
||||
switch (cellPos.y) {
|
||||
case 5:
|
||||
R2_GLOBALS._sceneManager.changeScene(3230);
|
||||
break;
|
||||
case 21:
|
||||
R2_GLOBALS._sceneManager.changeScene(3220);
|
||||
break;
|
||||
case 33:
|
||||
R2_GLOBALS._sceneManager.changeScene(3200);
|
||||
break;
|
||||
default:
|
||||
// A vent grill
|
||||
SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 33:
|
||||
R2_GLOBALS._sceneManager.changeScene(3245);
|
||||
break;
|
||||
default:
|
||||
SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cellId > 36) {
|
||||
// "An anti-pest laser"
|
||||
event.handled = true;
|
||||
SceneItem::display(1200, 9, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
|
||||
}
|
||||
break;
|
||||
case CURSOR_TALK:
|
||||
event.handled = true;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
} else if (event.eventType == EVENT_CUSTOM_ACTIONSTART) {
|
||||
if (_field414) {
|
||||
event.handled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.customType) {
|
||||
case kActionMoveUpCrawlNorth:
|
||||
startCrawling(CRAWL_NORTH);
|
||||
break;
|
||||
case kActionMoveLeftCrawlWest:
|
||||
startCrawling(CRAWL_WEST);
|
||||
break;
|
||||
case kActionMoveRightCrawlEast:
|
||||
startCrawling(CRAWL_EAST);
|
||||
break;
|
||||
case kActionMoveDownCrawlSouth:
|
||||
startCrawling(CRAWL_SOUTH);
|
||||
break;
|
||||
default:
|
||||
event.handled = false;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
} else
|
||||
return;
|
||||
}
|
||||
|
||||
void Scene1200::dispatch() {
|
||||
Rect tmpRect;
|
||||
Scene::dispatch();
|
||||
|
||||
if (_fixupMaze) {
|
||||
_mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
|
||||
//_mazeUI.draw();
|
||||
_fixupMaze = false;
|
||||
}
|
||||
|
||||
if (_field414 != 0) {
|
||||
tmpRect.set(110, 20, 210, 120);
|
||||
_field414--;
|
||||
|
||||
switch (_nextCrawlDirection) {
|
||||
case CRAWL_EAST:
|
||||
R2_GLOBALS._ventCellPos.x += 2;
|
||||
break;
|
||||
case CRAWL_WEST:
|
||||
R2_GLOBALS._ventCellPos.x -= 2;
|
||||
break;
|
||||
case CRAWL_SOUTH:
|
||||
R2_GLOBALS._ventCellPos.y += 2;
|
||||
break;
|
||||
case CRAWL_NORTH:
|
||||
R2_GLOBALS._ventCellPos.y -= 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
_mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
|
||||
//_mazeUI.draw();
|
||||
|
||||
if (_field416 != 0) {
|
||||
switch(_nextCrawlDirection) {
|
||||
case CRAWL_EAST:
|
||||
R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x - 2, R2_GLOBALS._player._position.y));
|
||||
break;
|
||||
case CRAWL_WEST:
|
||||
R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x + 2, R2_GLOBALS._player._position.y));
|
||||
break;
|
||||
case CRAWL_SOUTH:
|
||||
R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y - 2));
|
||||
break;
|
||||
case CRAWL_NORTH:
|
||||
R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y + 2));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (_field414 == 0) {
|
||||
if (_field416 == 0)
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_NONE, NULL);
|
||||
signal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1200::saveCharacter(int characterIndex) {
|
||||
R2_GLOBALS._sound1.fadeOut2(NULL);
|
||||
SceneExt::saveCharacter(characterIndex);
|
||||
}
|
||||
|
||||
void Scene1200::startCrawling(CrawlDirection dir) {
|
||||
Common::Point cellPos = R2_GLOBALS._ventCellPos;
|
||||
_mazeUI.pixelToCellXY(cellPos);
|
||||
|
||||
switch (dir) {
|
||||
case CRAWL_EAST:
|
||||
if ( ((_mazeUI.getCellFromPixelXY(Common::Point(200, 50)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(200, 88)) > 36))
|
||||
&& ( ((cellPos.x == 3) && (cellPos.y == 33) && (_field418 != 4))
|
||||
|| ((cellPos.x == 13) && (cellPos.y == 21) && (_field418 != 2))
|
||||
|| ((cellPos.x == 29) && (cellPos.y == 17) && (_field418 != 1))
|
||||
|| ((cellPos.x == 33) && (cellPos.y == 41)) )
|
||||
) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_sceneMode = 1200;
|
||||
setAction(&_sequenceManager, this, 1200, &_actor1, NULL);
|
||||
} else if (_mazeUI.getCellFromPixelXY(Common::Point(200, 69)) == 36) {
|
||||
switch (_nextCrawlDirection) {
|
||||
case CRAWL_EAST:
|
||||
if (R2_GLOBALS._player._visage == 3155)
|
||||
_sceneMode = 15;
|
||||
else
|
||||
_sceneMode = 10;
|
||||
break;
|
||||
case CRAWL_WEST:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 76;
|
||||
else
|
||||
_sceneMode = 75;
|
||||
break;
|
||||
case CRAWL_SOUTH:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 101;
|
||||
else
|
||||
_sceneMode = 100;
|
||||
break;
|
||||
case CRAWL_NORTH:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 111;
|
||||
else
|
||||
_sceneMode = 110;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_nextCrawlDirection = 1;
|
||||
signal();
|
||||
}
|
||||
break;
|
||||
case CRAWL_WEST:
|
||||
if ( ((_mazeUI.getCellFromPixelXY(Common::Point(120, 50)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(120, 88)) > 36))
|
||||
&& ( ((cellPos.x == 7) && (cellPos.y == 33) && (_field418 != 4))
|
||||
|| ((cellPos.x == 17) && (cellPos.y == 21) && (_field418 != 2))
|
||||
|| ((cellPos.x == 33) && (cellPos.y == 17) && (_field418 != 1))
|
||||
|| ((cellPos.x == 5) && (cellPos.y == 5)) )
|
||||
) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_sceneMode = 1201;
|
||||
setAction(&_sequenceManager, this, 1201, &_actor1, NULL);
|
||||
} else if (_mazeUI.getCellFromPixelXY(Common::Point(120, 69)) == 36) {
|
||||
switch (_nextCrawlDirection) {
|
||||
case CRAWL_EAST:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 56;
|
||||
else
|
||||
_sceneMode = 55;
|
||||
break;
|
||||
case CRAWL_WEST:
|
||||
if (R2_GLOBALS._player._visage == 3155)
|
||||
_sceneMode = 25;
|
||||
else
|
||||
_sceneMode = 20;
|
||||
break;
|
||||
case CRAWL_SOUTH:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 91;
|
||||
else
|
||||
_sceneMode = 90;
|
||||
break;
|
||||
case CRAWL_NORTH:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 121;
|
||||
else
|
||||
_sceneMode = 120;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_nextCrawlDirection = 2;
|
||||
signal();
|
||||
}
|
||||
break;
|
||||
case CRAWL_SOUTH:
|
||||
if ( ((_mazeUI.getCellFromPixelXY(Common::Point(140, 110)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(178, 110)) > 36))
|
||||
&& ( ((cellPos.x == 17) && (cellPos.y == 5) && (_field418 != 3))
|
||||
|| ((cellPos.x == 41) && (cellPos.y == 21)) )
|
||||
) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_sceneMode = 1203;
|
||||
setAction(&_sequenceManager, this, 1203, &_actor1, NULL);
|
||||
} else if (_mazeUI.getCellFromPixelXY(Common::Point(160, 110)) == 36) {
|
||||
switch (_nextCrawlDirection) {
|
||||
case CRAWL_EAST:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 51;
|
||||
else
|
||||
_sceneMode = 50;
|
||||
break;
|
||||
case CRAWL_WEST:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 81;
|
||||
else
|
||||
_sceneMode = 80;
|
||||
break;
|
||||
case CRAWL_SOUTH:
|
||||
if (R2_GLOBALS._player._visage == 3155)
|
||||
_sceneMode = 35;
|
||||
else
|
||||
_sceneMode = 30;
|
||||
break;
|
||||
case CRAWL_NORTH:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 116;
|
||||
else
|
||||
_sceneMode = 115;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_nextCrawlDirection = 3;
|
||||
signal();
|
||||
}
|
||||
break;
|
||||
case CRAWL_NORTH:
|
||||
if ( ((_mazeUI.getCellFromPixelXY(Common::Point(140, 30)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(178, 30)) > 36))
|
||||
&& ( ((cellPos.x == 17) && (cellPos.y == 9) && (_field418 != 3))
|
||||
|| ((cellPos.x == 35) && (cellPos.y == 17)) )
|
||||
) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_sceneMode = 1202;
|
||||
setAction(&_sequenceManager, this, 1202, &_actor1, NULL);
|
||||
} else if (_mazeUI.getCellFromPixelXY(Common::Point(160, 30)) == 36) {
|
||||
switch (_nextCrawlDirection) {
|
||||
case CRAWL_EAST:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 61;
|
||||
else
|
||||
_sceneMode = 60;
|
||||
break;
|
||||
case CRAWL_WEST:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 71;
|
||||
else
|
||||
_sceneMode = 70;
|
||||
break;
|
||||
case CRAWL_SOUTH:
|
||||
if (R2_GLOBALS._player._visage == 3156)
|
||||
_sceneMode = 96;
|
||||
else
|
||||
_sceneMode = 95;
|
||||
break;
|
||||
case CRAWL_NORTH:
|
||||
if (R2_GLOBALS._player._visage == 3155)
|
||||
_sceneMode = 45;
|
||||
else
|
||||
_sceneMode = 40;
|
||||
break;
|
||||
default:
|
||||
_sceneMode = 1;
|
||||
R2_GLOBALS._player.setup(3156, 4, 6);
|
||||
break;
|
||||
}
|
||||
R2_GLOBALS._player.disableControl();
|
||||
_nextCrawlDirection = 4;
|
||||
signal();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
89
engines/tsage/ringworld2/ringworld2_airduct.h
Normal file
89
engines/tsage/ringworld2/ringworld2_airduct.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TSAGE_RINGWORLD2_AIRDUCT_H
|
||||
#define TSAGE_RINGWORLD2_AIRDUCT_H
|
||||
|
||||
#include "tsage/tsage.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene1200 : public SceneExt {
|
||||
enum CrawlDirection { CRAWL_EAST = 1, CRAWL_WEST = 2, CRAWL_SOUTH = 3, CRAWL_NORTH = 4 };
|
||||
|
||||
class LaserPanel: public ModalWindow {
|
||||
public:
|
||||
class Jumper : public SceneActorExt {
|
||||
public:
|
||||
void init(int state);
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
Jumper _jumper1;
|
||||
Jumper _jumper2;
|
||||
Jumper _jumper3;
|
||||
|
||||
LaserPanel();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
};
|
||||
|
||||
public:
|
||||
NamedHotspot _item1;
|
||||
SceneActor _actor1;
|
||||
LaserPanel _laserPanel;
|
||||
MazeUI _mazeUI;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
int _nextCrawlDirection;
|
||||
int _field414;
|
||||
int _field416;
|
||||
int _field418;
|
||||
int _field41A;
|
||||
bool _fixupMaze;
|
||||
|
||||
Scene1200();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void startCrawling(CrawlDirection dir);
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void saveCharacter(int characterIndex) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
490
engines/tsage/ringworld2/ringworld2_dialogs.cpp
Normal file
490
engines/tsage/ringworld2/ringworld2_dialogs.cpp
Normal file
@@ -0,0 +1,490 @@
|
||||
/* 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 "tsage/tsage.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/dialogs.h"
|
||||
#include "tsage/staticres.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/ringworld2/ringworld2_dialogs.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
/**
|
||||
* This dialog implements the right-click dialog
|
||||
*/
|
||||
RightClickDialog::RightClickDialog() : GfxDialog() {
|
||||
// Setup button positions
|
||||
_btnList[0] = Common::Point(48, 12);
|
||||
_btnList[1] = Common::Point(31, 29);
|
||||
_btnList[2] = Common::Point(65, 29);
|
||||
_btnList[3] = Common::Point(14, 47);
|
||||
_btnList[4] = Common::Point(48, 47);
|
||||
_btnList[5] = Common::Point(83, 47);
|
||||
|
||||
// Set the palette and change the cursor
|
||||
_previousCursor = R2_GLOBALS._events.getCursor();
|
||||
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
|
||||
|
||||
setPalette();
|
||||
|
||||
// Get the dialog image and selected button images
|
||||
if (R2_GLOBALS._sceneManager._sceneNumber == 2900) {
|
||||
_surface = surfaceFromRes(2902, 1, 1);
|
||||
_btnImages.setVisage(2902, 2);
|
||||
} else {
|
||||
_surface = surfaceFromRes(1, 1, 1);
|
||||
_btnImages.setVisage(1, 2);
|
||||
}
|
||||
|
||||
// Set the dialog position
|
||||
Rect dialogRect;
|
||||
dialogRect.resize(_surface, 0, 0, 100);
|
||||
dialogRect.center(g_globals->_events._mousePos.x, g_globals->_events._mousePos.y);
|
||||
|
||||
// Ensure the dialog will be entirely on-screen
|
||||
Rect screenRect = g_globals->gfxManager()._bounds;
|
||||
screenRect.collapse(4, 4);
|
||||
dialogRect.contain(screenRect);
|
||||
|
||||
_bounds = dialogRect;
|
||||
_gfxManager._bounds = _bounds;
|
||||
|
||||
_highlightedAction = -1;
|
||||
_selectedAction = -1;
|
||||
}
|
||||
|
||||
RightClickDialog::~RightClickDialog() {
|
||||
}
|
||||
|
||||
void RightClickDialog::draw() {
|
||||
// Save the covered background area
|
||||
_savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds);
|
||||
|
||||
// Draw the dialog image
|
||||
g_globals->gfxManager().copyFrom(_surface, _bounds.left, _bounds.top);
|
||||
}
|
||||
|
||||
bool RightClickDialog::process(Event &event) {
|
||||
switch (event.eventType) {
|
||||
case EVENT_MOUSE_MOVE: {
|
||||
// Check whether a button is highlighted
|
||||
int buttonIndex;
|
||||
for (buttonIndex = 5; buttonIndex >= 0; --buttonIndex) {
|
||||
Rect tempRect(0, 0, 28, 29);
|
||||
tempRect.moveTo(_btnList[buttonIndex].x, _btnList[buttonIndex].y);
|
||||
|
||||
if (tempRect.contains(event.mousePos))
|
||||
break;
|
||||
}
|
||||
// If selection has changed, handle it
|
||||
if (buttonIndex != _highlightedAction) {
|
||||
if (_highlightedAction != -1) {
|
||||
// Another button was previously selected, so restore dialog
|
||||
_gfxManager.copyFrom(_surface, 0, 0);
|
||||
}
|
||||
|
||||
if (buttonIndex != -1) {
|
||||
// Draw newly selected button
|
||||
GfxSurface btn = _btnImages.getFrame(buttonIndex + 1);
|
||||
_gfxManager.copyFrom(btn, _btnList[buttonIndex].x, _btnList[buttonIndex].y);
|
||||
}
|
||||
|
||||
_highlightedAction = buttonIndex;
|
||||
}
|
||||
|
||||
event.handled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
case EVENT_BUTTON_DOWN:
|
||||
// Specify the selected action
|
||||
_selectedAction = (_highlightedAction == -1) ? 999 : _highlightedAction;
|
||||
event.handled = true;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int RightClickDialog::execute() {
|
||||
// Draw the dialog
|
||||
draw();
|
||||
|
||||
// Dialog event handler loop
|
||||
_gfxManager.activate();
|
||||
|
||||
while (!g_vm->shouldQuit() && (_selectedAction == -1)) {
|
||||
Event evt;
|
||||
while (g_globals->_events.getEvent(evt, EVENT_MOUSE_MOVE | EVENT_BUTTON_DOWN)) {
|
||||
evt.mousePos.x -= _bounds.left;
|
||||
evt.mousePos.y -= _bounds.top;
|
||||
|
||||
process(evt);
|
||||
}
|
||||
|
||||
g_system->delayMillis(10);
|
||||
GLOBALS._screen.update();
|
||||
}
|
||||
|
||||
// Execute the specified action
|
||||
CursorType cursorNum = _previousCursor;
|
||||
int result = -1;
|
||||
switch (_selectedAction) {
|
||||
case 0:
|
||||
// Look action
|
||||
cursorNum = CURSOR_LOOK;
|
||||
break;
|
||||
case 1:
|
||||
// Walk action
|
||||
cursorNum = R2_GLOBALS._player._canWalk ? CURSOR_WALK : CURSOR_USE;
|
||||
break;
|
||||
case 2:
|
||||
// Use action
|
||||
cursorNum = CURSOR_USE;
|
||||
break;
|
||||
case 3:
|
||||
// Talk action
|
||||
cursorNum = CURSOR_TALK;
|
||||
break;
|
||||
case 4:
|
||||
// Change player
|
||||
result = 0;
|
||||
break;
|
||||
case 5:
|
||||
// Options dialog
|
||||
result = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
R2_GLOBALS._events.setCursor(cursorNum);
|
||||
_gfxManager.deactivate();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void CharacterDialog::show() {
|
||||
CharacterDialog *dlg = new CharacterDialog();
|
||||
CursorType cursorNum = R2_GLOBALS._events.getCursor();
|
||||
|
||||
// Reset the current cursor
|
||||
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
|
||||
|
||||
dlg->draw();
|
||||
|
||||
// Make the default button the currently active character
|
||||
GfxButton *btn = NULL;
|
||||
int oldCharacter = R2_GLOBALS._player._characterIndex;
|
||||
switch (oldCharacter) {
|
||||
case R2_QUINN:
|
||||
btn = &dlg->_btnQuinn;
|
||||
break;
|
||||
case R2_SEEKER:
|
||||
btn = &dlg->_btnSeeker;
|
||||
break;
|
||||
case R2_MIRANDA:
|
||||
btn = &dlg->_btnMiranda;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Show the character selection dialog
|
||||
btn = dlg->execute(btn);
|
||||
|
||||
// Figure out the new selected character
|
||||
if (btn == &dlg->_btnQuinn)
|
||||
R2_GLOBALS._player._characterIndex = R2_QUINN;
|
||||
else if (btn == &dlg->_btnSeeker)
|
||||
R2_GLOBALS._player._characterIndex = R2_SEEKER;
|
||||
else if (btn == &dlg->_btnMiranda)
|
||||
R2_GLOBALS._player._characterIndex = R2_MIRANDA;
|
||||
|
||||
// Remove the dialog
|
||||
dlg->remove();
|
||||
delete dlg;
|
||||
|
||||
// Only do transfer if a different character was selected
|
||||
if (R2_GLOBALS._player._characterIndex != oldCharacter) {
|
||||
// Save the details of the previously active character
|
||||
SceneExt *scene = (SceneExt *)R2_GLOBALS._sceneManager._scene;
|
||||
scene->saveCharacter(oldCharacter);
|
||||
|
||||
// Play the correctfrequency, if any, of the character being switched to's scanner device
|
||||
if (R2_GLOBALS._player._characterScene[R2_NONE] != 300) {
|
||||
switch (R2_GLOBALS._scannerFrequencies[R2_GLOBALS._player._characterIndex] - 1) {
|
||||
case 0:
|
||||
R2_GLOBALS._sound4.stop();
|
||||
break;
|
||||
case 1:
|
||||
R2_GLOBALS._sound4.play(45);
|
||||
break;
|
||||
case 2:
|
||||
R2_GLOBALS._sound4.play(4);
|
||||
break;
|
||||
case 3:
|
||||
R2_GLOBALS._sound4.play(5);
|
||||
break;
|
||||
case 4:
|
||||
R2_GLOBALS._sound4.play(6);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (R2_GLOBALS._scannerFrequencies[R2_GLOBALS._player._characterIndex] > 1) {
|
||||
switch (R2_GLOBALS._scannerFrequencies[R2_GLOBALS._player._characterIndex] - 1) {
|
||||
case 2:
|
||||
R2_GLOBALS._sound4.play(45);
|
||||
break;
|
||||
case 3:
|
||||
R2_GLOBALS._sound4.play(4);
|
||||
break;
|
||||
case 4:
|
||||
R2_GLOBALS._sound4.play(5);
|
||||
break;
|
||||
case 5:
|
||||
R2_GLOBALS._sound4.play(6);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if ((R2_GLOBALS._player._characterScene[R2_QUINN] == 300) && (R2_GLOBALS._scannerFrequencies[1] != 1)) {
|
||||
switch (R2_GLOBALS._scannerFrequencies[1] - 1) {
|
||||
case 2:
|
||||
R2_GLOBALS._sound4.play(45);
|
||||
break;
|
||||
case 3:
|
||||
R2_GLOBALS._sound4.play(4);
|
||||
break;
|
||||
case 4:
|
||||
R2_GLOBALS._sound4.play(5);
|
||||
break;
|
||||
case 5:
|
||||
R2_GLOBALS._sound4.play(6);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (R2_GLOBALS._player._characterScene[R2_SEEKER] != 300) {
|
||||
R2_GLOBALS._sound4.stop();
|
||||
} else if (R2_GLOBALS._scannerFrequencies[2] == 1) {
|
||||
R2_GLOBALS._sound4.stop();
|
||||
} else {
|
||||
switch (R2_GLOBALS._scannerFrequencies[1] - 1) {
|
||||
case 2:
|
||||
R2_GLOBALS._sound4.play(45);
|
||||
break;
|
||||
case 3:
|
||||
R2_GLOBALS._sound4.play(4);
|
||||
break;
|
||||
case 4:
|
||||
R2_GLOBALS._sound4.play(5);
|
||||
break;
|
||||
case 5:
|
||||
R2_GLOBALS._sound4.play(6);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Change to whichever scene the newly selected character is in
|
||||
R2_GLOBALS._sceneManager.changeScene(R2_GLOBALS._player._characterScene[R2_GLOBALS._player._characterIndex]);
|
||||
|
||||
// Force the reset the current cursor
|
||||
R2_GLOBALS._events.setCursor(CURSOR_USE);
|
||||
|
||||
} else
|
||||
// Restore previous cursor
|
||||
R2_GLOBALS._events.setCursor(cursorNum);
|
||||
}
|
||||
|
||||
CharacterDialog::CharacterDialog() {
|
||||
// Set the element text
|
||||
_msgTitle.set(CHAR_TITLE, 140, ALIGN_LEFT);
|
||||
_btnQuinn.setText(CHAR_QUINN_MSG);
|
||||
_btnSeeker.setText(CHAR_SEEKER_MSG);
|
||||
_btnMiranda.setText(CHAR_MIRANDA_MSG);
|
||||
_btnCancel.setText(CHAR_CANCEL_MSG);
|
||||
|
||||
// Set position of the elements
|
||||
_msgTitle._bounds.moveTo(5, 5);
|
||||
_btnQuinn._bounds.moveTo(25, _msgTitle._bounds.bottom + 1);
|
||||
_btnSeeker._bounds.moveTo(25, _btnQuinn._bounds.bottom + 1);
|
||||
_btnMiranda._bounds.moveTo(25, _btnSeeker._bounds.bottom + 1);
|
||||
_btnCancel._bounds.moveTo(25, _btnMiranda._bounds.bottom + 1);
|
||||
|
||||
// Add the items to the dialog
|
||||
addElements(&_msgTitle, &_btnQuinn, &_btnSeeker, &_btnMiranda, &_btnCancel, NULL);
|
||||
|
||||
// Set the dialog size and position
|
||||
frame();
|
||||
_bounds.collapse(-6, -6);
|
||||
setCenter(160, 100);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void HelpDialog::show() {
|
||||
// change the cursor
|
||||
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
|
||||
|
||||
// Create the dialog and draw it
|
||||
HelpDialog *dlg = new HelpDialog();
|
||||
dlg->draw();
|
||||
|
||||
// Show the help dialog
|
||||
GfxButton *btn = dlg->execute(&dlg->_btnResume);
|
||||
|
||||
// If a function button was selected, take care of it
|
||||
Event evt;
|
||||
evt.eventType = EVENT_CUSTOM_ACTIONSTART;
|
||||
evt.kbd.keycode = Common::KEYCODE_INVALID;
|
||||
evt.customType = kActionNone;
|
||||
if (btn == &dlg->_btnList[0]) {
|
||||
evt.customType = kActionSoundOptions;
|
||||
} else if (btn == &dlg->_btnList[1]) {
|
||||
evt.customType = kActionQuitGame;
|
||||
} else if (btn == &dlg->_btnList[2]) {
|
||||
evt.customType = kActionRestartGame;
|
||||
} else if (btn == &dlg->_btnList[3]) {
|
||||
evt.customType = kActionSaveGame;
|
||||
} else if (btn == &dlg->_btnList[4]) {
|
||||
evt.customType = kActionRestoreGame;
|
||||
} else if (btn == &dlg->_btnList[5]) {
|
||||
evt.customType = kActionCredits;
|
||||
} else if (btn == &dlg->_btnList[6]) {
|
||||
evt.customType = kActionPauseGame;
|
||||
}
|
||||
|
||||
// Remove the dialog
|
||||
dlg->remove();
|
||||
delete dlg;
|
||||
|
||||
// If a action button was selected, dispatch to handle it
|
||||
if (evt.kbd.keycode != Common::KEYCODE_INVALID || evt.customType != kActionNone)
|
||||
R2_GLOBALS._game->processEvent(evt);
|
||||
else
|
||||
R2_GLOBALS._events.setCursorFromFlag();
|
||||
}
|
||||
|
||||
HelpDialog::HelpDialog() {
|
||||
// Set the title and game version
|
||||
_msgTitle.set(HELP_MSG, 172, ALIGN_CENTER);
|
||||
_msgTitle._bounds.moveTo(5, 0);
|
||||
_msgVersion.set(GAME_VERSION, 172, ALIGN_CENTER);
|
||||
_msgVersion._bounds.moveTo(5, _msgTitle._bounds.bottom + 3);
|
||||
addElements(&_msgTitle, &_msgVersion, NULL);
|
||||
|
||||
// Set buttons
|
||||
_btnList[0].setText(F2);
|
||||
_btnList[0]._bounds.moveTo(5, _msgVersion._bounds.bottom + 2);
|
||||
_btnDescription[0].set(SOUND_OPTIONS, 140, ALIGN_LEFT);
|
||||
_btnDescription[0]._bounds.moveTo(_btnList[0]._bounds.right + 2, _btnList[0]._bounds.top + 4);
|
||||
|
||||
_btnList[1].setText(F3);
|
||||
_btnList[1]._bounds.moveTo(5, _btnList[0]._bounds.bottom);
|
||||
_btnDescription[1].set(QUIT_GAME, 140, ALIGN_LEFT);
|
||||
_btnDescription[1]._bounds.moveTo(_btnList[1]._bounds.right + 2, _btnList[1]._bounds.top + 4);
|
||||
|
||||
_btnList[2].setText(F4);
|
||||
_btnList[2]._bounds.moveTo(5, _btnList[1]._bounds.bottom);
|
||||
_btnDescription[2].set(RESTART_GAME, 140, ALIGN_LEFT);
|
||||
_btnDescription[2]._bounds.moveTo(_btnList[2]._bounds.right + 2, _btnList[2]._bounds.top + 4);
|
||||
|
||||
_btnList[3].setText(F5);
|
||||
_btnList[3]._bounds.moveTo(5, _btnList[2]._bounds.bottom);
|
||||
_btnDescription[3].set(SAVE_GAME, 140, ALIGN_LEFT);
|
||||
_btnDescription[3]._bounds.moveTo(_btnList[3]._bounds.right + 2, _btnList[3]._bounds.top + 4);
|
||||
|
||||
_btnList[4].setText(F7);
|
||||
_btnList[4]._bounds.moveTo(5, _btnList[3]._bounds.bottom);
|
||||
_btnDescription[4].set(RESTORE_GAME, 140, ALIGN_LEFT);
|
||||
_btnDescription[4]._bounds.moveTo(_btnList[4]._bounds.right + 2, _btnList[4]._bounds.top + 4);
|
||||
|
||||
_btnList[5].setText(F8);
|
||||
_btnList[5]._bounds.moveTo(5, _btnList[4]._bounds.bottom);
|
||||
_btnDescription[5].set(SHOW_CREDITS, 140, ALIGN_LEFT);
|
||||
_btnDescription[5]._bounds.moveTo(_btnList[5]._bounds.right + 2, _btnList[5]._bounds.top + 4);
|
||||
|
||||
_btnList[6].setText(F10);
|
||||
_btnList[6]._bounds.moveTo(5, _btnList[5]._bounds.bottom);
|
||||
_btnDescription[6].set(PAUSE_GAME, 140, ALIGN_LEFT);
|
||||
_btnDescription[6]._bounds.moveTo(_btnList[6]._bounds.right + 2, _btnList[6]._bounds.top + 4);
|
||||
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
addElements(&_btnList[i], &_btnDescription[i], NULL);
|
||||
}
|
||||
|
||||
// Add 'Resume' button
|
||||
_btnResume.setText(RESUME_PLAY);
|
||||
_btnResume._bounds.moveTo(5, _btnList[6]._bounds.bottom + 2);
|
||||
addElements(&_btnResume, NULL);
|
||||
|
||||
// Set the dialog size and position
|
||||
frame();
|
||||
_bounds.collapse(-6, -6);
|
||||
setCenter(160, 100);
|
||||
}
|
||||
|
||||
bool HelpDialog::handleKeypress(Event &event, GfxButton *&btn) {
|
||||
switch (event.customType) {
|
||||
case kActionSoundOptions:
|
||||
btn = &_btnList[0];
|
||||
break;
|
||||
case kActionQuitGame:
|
||||
btn = &_btnList[1];
|
||||
break;
|
||||
case kActionRestartGame:
|
||||
btn = &_btnList[2];
|
||||
break;
|
||||
case kActionSaveGame:
|
||||
btn = &_btnList[3];
|
||||
break;
|
||||
case kActionRestoreGame:
|
||||
btn = &_btnList[4];
|
||||
break;
|
||||
case kActionCredits:
|
||||
btn = &_btnList[5];
|
||||
break;
|
||||
case kActionPauseGame:
|
||||
btn = &_btnList[6];
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
|
||||
} // End of namespace TsAGE
|
||||
93
engines/tsage/ringworld2/ringworld2_dialogs.h
Normal file
93
engines/tsage/ringworld2/ringworld2_dialogs.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/* 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 TSAGE_RINGWORLD2_DIALOGS_H
|
||||
#define TSAGE_RINGWORLD2_DIALOGS_H
|
||||
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/dialogs.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/graphics.h"
|
||||
#include "common/list.h"
|
||||
#include "common/rect.h"
|
||||
#include "common/system.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class RightClickDialog : public GfxDialog {
|
||||
private:
|
||||
GfxSurface _surface;
|
||||
Visage _btnImages;
|
||||
Common::Point _btnList[6];
|
||||
|
||||
Rect _rectList1[5];
|
||||
Rect _rectList2[5];
|
||||
Rect _rectList3[5];
|
||||
Rect _rectList4[5];
|
||||
|
||||
int _highlightedAction;
|
||||
int _selectedAction;
|
||||
CursorType _previousCursor;
|
||||
public:
|
||||
RightClickDialog();
|
||||
~RightClickDialog() override;
|
||||
|
||||
void draw() override;
|
||||
bool process(Event &event) override;
|
||||
int execute();
|
||||
};
|
||||
|
||||
class CharacterDialog: public GfxDialog {
|
||||
private:
|
||||
GfxMessage _msgTitle;
|
||||
GfxButton _btnQuinn, _btnMiranda, _btnSeeker;
|
||||
GfxButton _btnCancel;
|
||||
public:
|
||||
CharacterDialog();
|
||||
~CharacterDialog() override {}
|
||||
|
||||
static void show();
|
||||
};
|
||||
|
||||
class HelpDialog: public GfxDialog {
|
||||
private:
|
||||
GfxMessage _msgTitle, _msgVersion;
|
||||
GfxButton _btnList[7];
|
||||
GfxMessage _btnDescription[7];
|
||||
GfxButton _btnResume;
|
||||
public:
|
||||
HelpDialog();
|
||||
~HelpDialog() override {}
|
||||
|
||||
static void show();
|
||||
|
||||
bool handleKeypress(Event &event, GfxButton *&btn) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
2538
engines/tsage/ringworld2/ringworld2_logic.cpp
Normal file
2538
engines/tsage/ringworld2/ringworld2_logic.cpp
Normal file
File diff suppressed because it is too large
Load Diff
524
engines/tsage/ringworld2/ringworld2_logic.h
Normal file
524
engines/tsage/ringworld2/ringworld2_logic.h
Normal file
@@ -0,0 +1,524 @@
|
||||
/* 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 TSAGE_RINGWORLD2_LOGIC_H
|
||||
#define TSAGE_RINGWORLD2_LOGIC_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
#define R2_INVENTORY (*((::TsAGE::Ringworld2::Ringworld2InvObjectList *)g_globals->_inventory))
|
||||
|
||||
class SceneFactory {
|
||||
public:
|
||||
static Scene *createScene(int sceneNumber);
|
||||
};
|
||||
|
||||
class SceneArea: public SceneItem {
|
||||
public:
|
||||
bool _enabled;
|
||||
bool _insideArea;
|
||||
CursorType _cursorNum;
|
||||
CursorType _savedCursorNum;
|
||||
int _cursorState;
|
||||
public:
|
||||
SceneArea();
|
||||
void setDetails(const Rect &bounds, CursorType cursor);
|
||||
|
||||
Common::String getClassName() override { return "SceneArea"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override { return false; }
|
||||
void doAction(int action) override {}
|
||||
};
|
||||
|
||||
class SceneExit: public SceneArea {
|
||||
public:
|
||||
bool _moving;
|
||||
int _sceneNumber;
|
||||
Common::Point _destPos;
|
||||
public:
|
||||
SceneExit();
|
||||
virtual void setDetails(const Rect &bounds, CursorType cursor, int sceneNumber);
|
||||
virtual void setDest(const Common::Point &p) { _destPos = p; }
|
||||
virtual void changeScene();
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class SceneExt: public Scene {
|
||||
private:
|
||||
static void startStrip();
|
||||
static void endStrip();
|
||||
public:
|
||||
byte _shadowPaletteMap[256];
|
||||
bool _savedPlayerEnabled;
|
||||
bool _savedUiEnabled;
|
||||
bool _savedCanWalk;
|
||||
bool _preventSaving;
|
||||
|
||||
Visage _cursorVisage;
|
||||
SynchronizedList<EventHandler *> _sceneAreas;
|
||||
public:
|
||||
SceneExt();
|
||||
|
||||
Common::String getClassName() override { return "SceneExt"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void refreshBackground(int xAmount, int yAmount) override;
|
||||
virtual void saveCharacter(int characterIndex);
|
||||
virtual void restore() {}
|
||||
|
||||
bool display(CursorType action, Event &event);
|
||||
void fadeOut();
|
||||
void clearScreen();
|
||||
void scalePalette(int RFactor, int GFactor, int BFactor);
|
||||
void loadBlankScene();
|
||||
};
|
||||
|
||||
class SceneHandlerExt: public SceneHandler {
|
||||
public:
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void process(Event &event) override;
|
||||
void postLoad(int priorSceneBeforeLoad, int currentSceneBeforeLoad) override;
|
||||
void dispatch() override;
|
||||
|
||||
void setupPaletteMaps();
|
||||
};
|
||||
|
||||
|
||||
class DisplayHotspot : public SceneObject {
|
||||
private:
|
||||
Common::Array<int> _actions;
|
||||
bool performAction(int action);
|
||||
public:
|
||||
DisplayHotspot(int regionId, ...);
|
||||
|
||||
void doAction(int action) override {
|
||||
if (!performAction(action))
|
||||
SceneHotspot::doAction(action);
|
||||
}
|
||||
};
|
||||
|
||||
class DisplayObject : public SceneObject {
|
||||
private:
|
||||
Common::Array<int> _actions;
|
||||
bool performAction(int action);
|
||||
public:
|
||||
DisplayObject(int firstAction, ...);
|
||||
|
||||
void doAction(int action) override {
|
||||
if (!performAction(action))
|
||||
SceneHotspot::doAction(action);
|
||||
}
|
||||
};
|
||||
|
||||
class SceneObjectExt : public SceneObject {
|
||||
public:
|
||||
int _state;
|
||||
|
||||
void synchronize(Serializer &s) override {
|
||||
SceneObject::synchronize(s);
|
||||
s.syncAsSint16LE(_state);
|
||||
}
|
||||
Common::String getClassName() override { return "SceneObjectExt"; }
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
class Ringworld2InvObjectList : public InvObjectList {
|
||||
private:
|
||||
static bool SelectItem(int objectNumber);
|
||||
static void selectDefault(int obectNumber);
|
||||
public:
|
||||
InvObject _none;
|
||||
InvObject _optoDisk;
|
||||
InvObject _reader;
|
||||
InvObject _negatorGun;
|
||||
InvObject _steppingDisks;
|
||||
InvObject _attractorUnit;
|
||||
InvObject _sensorProbe;
|
||||
InvObject _sonicStunner;
|
||||
InvObject _cableHarness;
|
||||
InvObject _comScanner;
|
||||
InvObject _spentPowerCapsule; // 10
|
||||
InvObject _chargedPowerCapsule;
|
||||
InvObject _aerosol;
|
||||
InvObject _remoteControl;
|
||||
InvObject _opticalFiber;
|
||||
InvObject _clamp;
|
||||
InvObject _attractorHarness;
|
||||
InvObject _fuelCell;
|
||||
InvObject _gyroscope;
|
||||
InvObject _airbag;
|
||||
InvObject _rebreatherTank; // 20
|
||||
InvObject _reserveTank;
|
||||
InvObject _guidanceModule;
|
||||
InvObject _thrusterValve;
|
||||
InvObject _balloonBackpack;
|
||||
InvObject _radarMechanism;
|
||||
InvObject _joystick;
|
||||
InvObject _ignitor;
|
||||
InvObject _diagnosticsDisplay;
|
||||
InvObject _glassDome;
|
||||
InvObject _wickLamp; // 30
|
||||
InvObject _scrithKey;
|
||||
InvObject _tannerMask;
|
||||
InvObject _pureGrainAlcohol;
|
||||
InvObject _blueSapphire;
|
||||
InvObject _ancientScrolls;
|
||||
InvObject _flute;
|
||||
InvObject _gunpowder;
|
||||
InvObject _unused;
|
||||
InvObject _comScanner2;
|
||||
InvObject _superconductorWire; // 40
|
||||
InvObject _pillow;
|
||||
InvObject _foodTray;
|
||||
InvObject _laserHacksaw;
|
||||
InvObject _photonStunner;
|
||||
InvObject _battery;
|
||||
InvObject _soakedFaceMask;
|
||||
InvObject _lightBulb;
|
||||
InvObject _alcoholLamp1;
|
||||
InvObject _alcoholLamp2;
|
||||
InvObject _alocholLamp3; // 50
|
||||
InvObject _brokenDisplay;
|
||||
InvObject _toolbox;
|
||||
|
||||
Ringworld2InvObjectList();
|
||||
void reset();
|
||||
void setObjectScene(int objectNum, int sceneNumber);
|
||||
|
||||
Common::String getClassName() override { return "Ringworld2InvObjectList"; }
|
||||
};
|
||||
|
||||
#define RING2_INVENTORY (*((::TsAGE::Ringworld2::Ringworld2InvObjectList *)g_globals->_inventory))
|
||||
|
||||
class Ringworld2Game: public Game {
|
||||
public:
|
||||
void start() override;
|
||||
void restartGame() override;
|
||||
void restart() override;
|
||||
void endGame(int resNum, int lineNum) override;
|
||||
|
||||
Scene *createScene(int sceneNumber) override;
|
||||
void processEvent(Event &event) override;
|
||||
void rightClick() override;
|
||||
bool canSaveGameStateCurrently() override;
|
||||
bool canLoadGameStateCurrently() override;
|
||||
};
|
||||
|
||||
class NamedHotspot : public SceneHotspot {
|
||||
public:
|
||||
NamedHotspot();
|
||||
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
Common::String getClassName() override { return "NamedHotspot"; }
|
||||
};
|
||||
|
||||
class NamedHotspotExt : public NamedHotspot {
|
||||
public:
|
||||
int _flag;
|
||||
NamedHotspotExt() { _flag = 0; }
|
||||
|
||||
Common::String getClassName() override { return "NamedHotspot"; }
|
||||
void synchronize(Serializer &s) override {
|
||||
NamedHotspot::synchronize(s);
|
||||
s.syncAsSint16LE(_flag);
|
||||
}
|
||||
};
|
||||
|
||||
class SceneActor: public SceneObject {
|
||||
public:
|
||||
Common::String getClassName() override { return "SceneActor"; }
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
GfxSurface getFrame() override;
|
||||
};
|
||||
|
||||
class SceneActorExt: public SceneActor {
|
||||
public:
|
||||
int _state;
|
||||
|
||||
SceneActorExt() { _state = 0; }
|
||||
|
||||
Common::String getClassName() override { return "SceneActorExt"; }
|
||||
void synchronize(Serializer &s) override {
|
||||
SceneActor::synchronize(s);
|
||||
s.syncAsSint16LE(_state);
|
||||
}
|
||||
};
|
||||
|
||||
enum MazeDirection { MAZEDIR_NONE = 0, MAZEDIR_NORTH = 1, MAZEDIR_NORTHEAST = 2, MAZEDIR_EAST = 3,
|
||||
MAZEDIR_SOUTHEAST = 4, MAZEDIR_SOUTH = 5, MAZEDIR_SOUTHWEST = 6, MAZEDIR_WEST = 7,
|
||||
MAZEDIR_NORTHWEST = 8 };
|
||||
|
||||
class MazeUI: public SceneObject {
|
||||
private:
|
||||
void clear();
|
||||
public:
|
||||
// The dimensions (in cells) of the entire maze map
|
||||
Rect _mapBounds;
|
||||
|
||||
// Encoded cell map specifying the features of the maze
|
||||
byte *_mapData;
|
||||
// Image surface used to store a line of the map for rendering
|
||||
GfxSurface _mapImage;
|
||||
|
||||
Common::Point _cellsVisible;
|
||||
Common::Point _mapCells;
|
||||
Common::Point _cellSize;
|
||||
Common::Point _mapOffset;
|
||||
int _resNum;
|
||||
int _cellsResNum;
|
||||
int _frameCount;
|
||||
int _resCount;
|
||||
int _mapImagePitch;
|
||||
public:
|
||||
MazeUI();
|
||||
~MazeUI() override;
|
||||
|
||||
void setDisplayBounds(const Rect &r);
|
||||
bool setMazePosition(const Common::Point &pt);
|
||||
void load(int resNum);
|
||||
int getCellFromPixelXY(const Common::Point &pt);
|
||||
int getCellFromCellXY(const Common::Point &p);
|
||||
int pixelToCellXY(Common::Point &pt);
|
||||
|
||||
Common::String getClassName() override { return "MazeUI"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
void reposition() override;
|
||||
void draw() override;
|
||||
};
|
||||
|
||||
class SceneAreaObject: public SceneArea {
|
||||
class Object1: public SceneActor {
|
||||
public:
|
||||
};
|
||||
public:
|
||||
Object1 _object1;
|
||||
int _insetCount;
|
||||
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
void setDetails(int visage, int strip, int frameNumber, const Common::Point &pt);
|
||||
void setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum);
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
class AnimationSlice {
|
||||
public:
|
||||
int _sliceOffset;
|
||||
int _drawMode;
|
||||
int _secondaryIndex;
|
||||
public:
|
||||
void load(Common::File &f);
|
||||
};
|
||||
|
||||
class AnimationSlices {
|
||||
public:
|
||||
int _dataSize;
|
||||
int _dataSize2;
|
||||
AnimationSlice _slices[4];
|
||||
byte *_pixelData;
|
||||
public:
|
||||
AnimationSlices();
|
||||
~AnimationSlices();
|
||||
|
||||
void load(Common::File &f);
|
||||
int loadPixels(Common::File &f, int slicesSize);
|
||||
};
|
||||
|
||||
class AnimationPlayerSubData {
|
||||
public:
|
||||
int _duration;
|
||||
int _frameRate;
|
||||
int _framesPerSlices;
|
||||
int _drawType;
|
||||
int _sliceSize;
|
||||
int _ySlices;
|
||||
int _field16;
|
||||
int _palStart;
|
||||
int _palSize;
|
||||
byte _palData[256 * 3];
|
||||
int32 _totalSize;
|
||||
AnimationSlices _slices;
|
||||
public:
|
||||
void load(Common::File &f);
|
||||
};
|
||||
|
||||
class AnimationData {
|
||||
public:
|
||||
AnimationSlices _slices;
|
||||
int _dataSize;
|
||||
int _animSlicesSize;
|
||||
};
|
||||
|
||||
enum AnimationPaletteMode { ANIMPALMODE_REPLACE_PALETTE = 0, ANIMPALMODE_CURR_PALETTE = 1,
|
||||
ANIMPALMODE_NONE = 2 };
|
||||
|
||||
enum AnimationObjectMode { ANIMOBJMODE_1 = 1, ANIMOBJMODE_2 = 2, ANIMOBJMODE_42 = 42 };
|
||||
|
||||
class AnimationPlayer: public EventHandler {
|
||||
private:
|
||||
void rleDecode(const byte *pSrc, byte *pDest, int size);
|
||||
|
||||
void drawFrame(int sliceIndex);
|
||||
void nextSlices();
|
||||
void getSlices();
|
||||
public:
|
||||
AnimationData *_animData1, *_animData2;
|
||||
AnimationData *_sliceCurrent;
|
||||
AnimationData *_sliceNext;
|
||||
Common::File _resourceFile;
|
||||
Rect _rect1, _screenBounds;
|
||||
bool _animLoaded;
|
||||
bool _canSkip;
|
||||
AnimationPaletteMode _paletteMode;
|
||||
AnimationObjectMode _objectMode;
|
||||
int _sliceHeight;
|
||||
byte _palIndexes[256];
|
||||
ScenePalette _palette;
|
||||
AnimationPlayerSubData _subData;
|
||||
Action *_endAction;
|
||||
int _dataNeeded;
|
||||
int _playbackTick;
|
||||
int _playbackTickPrior;
|
||||
int _position;
|
||||
int _nextSlicesPosition;
|
||||
uint _frameDelay;
|
||||
uint32 _gameFrame;
|
||||
public:
|
||||
AnimationPlayer();
|
||||
~AnimationPlayer() override;
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
virtual void flipPane() {}
|
||||
virtual void changePane() {}
|
||||
virtual void closing() {}
|
||||
|
||||
|
||||
bool load(int animId, Action *endAction = NULL);
|
||||
bool isCompleted();
|
||||
void close();
|
||||
};
|
||||
|
||||
class AnimationPlayerExt: public AnimationPlayer {
|
||||
public:
|
||||
bool _isActive;
|
||||
public:
|
||||
AnimationPlayerExt();
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class ModalWindow: public SceneArea {
|
||||
public:
|
||||
SceneActor _object1;
|
||||
int _insetCount;
|
||||
public:
|
||||
ModalWindow();
|
||||
|
||||
void remove() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
Common::String getClassName() override { return "ModalWindow"; }
|
||||
void process(Event &event) override;
|
||||
virtual void setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY);
|
||||
virtual void setup3(int resNum, int lookLineNum, int talkLineNum, int useLineNum);
|
||||
};
|
||||
|
||||
class ScannerDialog: public ModalWindow {
|
||||
|
||||
class Button: public SceneActor {
|
||||
private:
|
||||
void reset();
|
||||
public:
|
||||
int _buttonId;
|
||||
bool _buttonDown;
|
||||
public:
|
||||
Button();
|
||||
void setup(int buttonId);
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
Common::String getClassName() override { return "ScannerButton"; }
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Slider: public SceneActor {
|
||||
private:
|
||||
void update();
|
||||
public:
|
||||
int _initial;
|
||||
int _xStart;
|
||||
int _yp;
|
||||
int _width;
|
||||
int _xInc;
|
||||
bool _sliderDown;
|
||||
public:
|
||||
Slider();
|
||||
void setup(int initial, int xStart, int yp, int width, int xInc);
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
Common::String getClassName() override { return "ScannerSlider"; }
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
Button _talkButton;
|
||||
Button _scanButton;
|
||||
Slider _slider;
|
||||
SceneActor _obj4;
|
||||
SceneActor _obj5;
|
||||
SceneActor _obj6;
|
||||
SceneActor _obj7;
|
||||
public:
|
||||
ScannerDialog();
|
||||
|
||||
Common::String getClassName() override { return "ScannerDialog"; }
|
||||
void remove() override;
|
||||
void setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
4700
engines/tsage/ringworld2/ringworld2_outpost.cpp
Normal file
4700
engines/tsage/ringworld2/ringworld2_outpost.cpp
Normal file
File diff suppressed because it is too large
Load Diff
258
engines/tsage/ringworld2/ringworld2_outpost.h
Normal file
258
engines/tsage/ringworld2/ringworld2_outpost.h
Normal file
@@ -0,0 +1,258 @@
|
||||
/* 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 TSAGE_RINGWORLD2_OUTPOST_H
|
||||
#define TSAGE_RINGWORLD2_OUTPOST_H
|
||||
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene1337 : public SceneExt {
|
||||
class OptionsDialog: public GfxDialog {
|
||||
private:
|
||||
GfxButton _autoplay;
|
||||
GfxButton _restartGame;
|
||||
GfxButton _quitGame;
|
||||
GfxButton _continueGame;
|
||||
|
||||
OptionsDialog();
|
||||
~OptionsDialog() override {}
|
||||
virtual GfxButton *execute(GfxButton *defaultButton);
|
||||
public:
|
||||
static void show();
|
||||
};
|
||||
|
||||
class Card: public SceneHotspot {
|
||||
public:
|
||||
SceneObject _card;
|
||||
|
||||
int _cardId;
|
||||
Common::Point _stationPos;
|
||||
|
||||
Card();
|
||||
void synchronize(Serializer &s) override;
|
||||
bool isIn(Common::Point pt);
|
||||
};
|
||||
|
||||
class GameBoardSide: public SceneHotspot {
|
||||
public:
|
||||
Card _handCard[4];
|
||||
Card _outpostStation[8];
|
||||
Card _delayCard;
|
||||
Card _emptyStationPos;
|
||||
|
||||
Common::Point _card1Pos;
|
||||
Common::Point _card2Pos;
|
||||
Common::Point _card3Pos;
|
||||
Common::Point _card4Pos;
|
||||
int _frameNum;
|
||||
|
||||
GameBoardSide();
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Action1337: public Action {
|
||||
public:
|
||||
void waitFrames(int32 frameCount);
|
||||
};
|
||||
|
||||
class Action1: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action4: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action5: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action6: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action7: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action8: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action9: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action10: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action11: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action12: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action13: public Action1337 {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Action7 _action7;
|
||||
Action8 _action8;
|
||||
Action9 _action9;
|
||||
Action10 _action10;
|
||||
Action11 _action11;
|
||||
Action12 _action12;
|
||||
Action13 _action13;
|
||||
|
||||
typedef void (Scene1337::*FunctionPtrType)();
|
||||
FunctionPtrType _delayedFunction;
|
||||
|
||||
bool _autoplay;
|
||||
bool _shuffleEndedFl;
|
||||
bool _showPlayerTurn;
|
||||
bool _displayHelpFl;
|
||||
bool _instructionsDisplayedFl;
|
||||
|
||||
// Discarded cards are put in the available cards pile, with a higher index so there's no conflict
|
||||
int _currentDiscardIndex;
|
||||
int _availableCardsPile[100];
|
||||
int _cardsAvailableNumb;
|
||||
int _currentPlayerNumb;
|
||||
int _actionPlayerIdx;
|
||||
int _actionVictimIdx;
|
||||
int _winnerId;
|
||||
int _instructionsWaitCount;
|
||||
int _cursorCurRes;
|
||||
int _cursorCurStrip;
|
||||
int _cursorCurFrame;
|
||||
|
||||
ASound _aSound1;
|
||||
ASound _aSound2;
|
||||
GameBoardSide _gameBoardSide[4];
|
||||
SceneActor _helpIcon;
|
||||
SceneActor _stockPile;
|
||||
SceneItem _actionItem;
|
||||
SceneObject _currentPlayerArrow;
|
||||
|
||||
Card *_actionCard1;
|
||||
Card *_actionCard2;
|
||||
Card *_actionCard3;
|
||||
Card _animatedCard;
|
||||
Card _shuffleAnimation;
|
||||
Card _discardedPlatformCard;
|
||||
Card _selectedCard;
|
||||
Card _discardPile;
|
||||
Card _stockCard;
|
||||
|
||||
SceneObject _upperDisplayCard[8];
|
||||
SceneObject _lowerDisplayCard[8];
|
||||
|
||||
Scene1337();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void actionDisplay(int resNum, int lineNum, int x, int y, int keepOnScreen, int width, int textMode, int fontNum, int colFG, int colBGExt, int colFGExt);
|
||||
void setAnimationInfo(Card *card);
|
||||
void handleNextTurn();
|
||||
void handlePlayerTurn();
|
||||
bool isStationCard(int cardId);
|
||||
bool isStopConstructionCard(int cardId);
|
||||
int getStationId(int playerId, int handCardId);
|
||||
int findPlatformCardInHand(int playerId);
|
||||
int findMeteorCardInHand(int playerId);
|
||||
int findThieftCardInHand(int playerId);
|
||||
int isDelayCard(int cardId);
|
||||
int getStationCardId(int cardId);
|
||||
void handlePlayer01Discard(int playerId);
|
||||
void playThieftCard(int playerId, Card *card, int victimId);
|
||||
int getPreventionCardId(int cardId);
|
||||
bool isAttackPossible(int victimId, int cardId);
|
||||
int getPlayerWithOutpost(int playerId);
|
||||
bool checkAntiDelayCard(int delayCardId, int cardId);
|
||||
void playStationCard(Card *station, Card *platform);
|
||||
void playDelayCard(Card *card, Card *dest);
|
||||
void playPlatformCard(Card *card, Card *dest);
|
||||
void playAntiDelayCard(Card *card, Card *dest);
|
||||
Card *getStationCard(int arg1);
|
||||
void playCentralOutpostCard(Card *card, int playerId);
|
||||
int getRandomCardFromHand(int playerId);
|
||||
void discardCard(Card *card);
|
||||
void subC4CD2();
|
||||
void subC4CEC();
|
||||
void playInterceptorCard(Card *subObj1, Card *subObj2);
|
||||
void displayDialog(int dialogNumb);
|
||||
void subPostInit();
|
||||
void displayInstructions();
|
||||
void suggestInstructions();
|
||||
void shuffleCards();
|
||||
void dealCards();
|
||||
void showOptionsDialog();
|
||||
void handleClick(int arg1, Common::Point pt);
|
||||
void handlePlayer0();
|
||||
void handlePlayer1();
|
||||
void handlePlayer2();
|
||||
void handlePlayer3();
|
||||
void handleAutoplayPlayer2();
|
||||
void updateCursorId(int arg1, bool arg2);
|
||||
void setCursorData(int resNum, int rlbNum, int frameNum);
|
||||
void subD18F5();
|
||||
void subD1917();
|
||||
void subD1940(bool flag);
|
||||
void subD1975(int arg1, int arg2);
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
7939
engines/tsage/ringworld2/ringworld2_scenes0.cpp
Normal file
7939
engines/tsage/ringworld2/ringworld2_scenes0.cpp
Normal file
File diff suppressed because it is too large
Load Diff
937
engines/tsage/ringworld2/ringworld2_scenes0.h
Normal file
937
engines/tsage/ringworld2/ringworld2_scenes0.h
Normal file
@@ -0,0 +1,937 @@
|
||||
/* 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 TSAGE_RINGWORLD2_SCENES0_H
|
||||
#define TSAGE_RINGWORLD2_SCENES0_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
#include "tsage/ringworld2/ringworld2_speakers.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene50: public SceneExt {
|
||||
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
Action1 _action1;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene100: public SceneExt {
|
||||
/* Objects */
|
||||
class Door: public SceneActorExt {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Table: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class StasisNegator: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class DoorDisplay: public SceneActorExt {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class SteppingDisks: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class Terminal: public NamedHotspot{
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
public:
|
||||
NamedHotspot _background, _duct, _bed, _desk;
|
||||
Terminal _terminal;
|
||||
SceneActor _bedLights1, _bedLights2, _tableLocker, _wardrobeTopAnim, _wardrobeColorAnim;
|
||||
SceneActor _wardrobe;
|
||||
Door _door;
|
||||
Table _table;
|
||||
StasisNegator _stasisNegator;
|
||||
DoorDisplay _doorDisplay;
|
||||
SteppingDisks _steppingDisks;
|
||||
SequenceManager _sequenceManager1, _sequenceManager2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene125: public SceneExt {
|
||||
/* Objects */
|
||||
class Food: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Icon: public SceneActor {
|
||||
public:
|
||||
int _lookLineNum, _iconId;
|
||||
bool _pressed;
|
||||
SceneObject _glyph, _horizLine;
|
||||
SceneText _sceneText1, _sceneText2;
|
||||
|
||||
Icon();
|
||||
Common::String getClassName() override { return "Scene125_Icon"; }
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void process(Event &event) override;
|
||||
|
||||
void setIcon(int id);
|
||||
void showIcon();
|
||||
void hideIcon();
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class DiskSlot: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
public:
|
||||
ScenePalette _palette;
|
||||
ASoundExt _sound1;
|
||||
NamedHotspot _background, _item2, _item3;
|
||||
DiskSlot _diskSlot;
|
||||
SceneActor _starchart1, _starchart2, _starchart3, _starchart4;
|
||||
SceneActor _food, _foodDispenser, _infoDisk;
|
||||
Icon _icon1, _icon2, _icon3, _icon4, _icon5, _icon6;
|
||||
SequenceManager _sequenceManager;
|
||||
SceneText _sceneText;
|
||||
int _consoleMode, _iconFontNumber, _logIndex, _databaseIndex, _infodiskIndex;
|
||||
int _soundCount, _soundIndex;
|
||||
int _soundIndexes[10];
|
||||
|
||||
Scene125();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
|
||||
void consoleAction(int id);
|
||||
void setDetails(int resNum, int lineNum);
|
||||
void stop();
|
||||
Common::String parseMessage(const Common::String &msg);
|
||||
};
|
||||
|
||||
class Scene150: public Scene100 {
|
||||
public:
|
||||
SceneActor _emptyRoomTable;
|
||||
public:
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene160: public SceneExt {
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
ASound _sound1;
|
||||
Action1 _action1;
|
||||
int _frameNumber, _yChange;
|
||||
int _lineNum;
|
||||
SynchronizedList<SceneText *> _creditsList;
|
||||
public:
|
||||
Scene160();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene175: public Scene150 {
|
||||
};
|
||||
|
||||
class Scene180: public SceneExt {
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
private:
|
||||
void setSceneDelay(int v);
|
||||
public:
|
||||
SpeakerWebbster180 _webbsterSpeaker;
|
||||
SpeakerDutyOfficer180 _dutyOfficerSpeaker;
|
||||
SpeakerTeal180 _tealSpeaker;
|
||||
SpeakerGameText _gameTextSpeaker;
|
||||
SceneActor _dutyOfficer, _teal, _webbster, _door, _shipDisplay;
|
||||
ScenePalette _palette;
|
||||
SceneText _textList[20];
|
||||
AnimationPlayerExt _animationPlayer;
|
||||
SequenceManager _sequenceManager;
|
||||
Action1 _action1;
|
||||
ASoundExt _sound1;
|
||||
|
||||
int _frameNumber;
|
||||
bool _helpEnabled;
|
||||
int _frameInc;
|
||||
int _fontNumber, _fontHeight;
|
||||
public:
|
||||
Scene180();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void restore() override;
|
||||
};
|
||||
|
||||
class Scene200: public SceneExt {
|
||||
/* Objects */
|
||||
class NorthDoor: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class EastDoor: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class WestDoor: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Scene Exits */
|
||||
class EastExit: public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class WestExit: public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background, _compartment, _westDoorDisplay, _eastDoorDisplay;
|
||||
NorthDoor _northDoor;
|
||||
EastDoor _eastDoor;
|
||||
WestDoor _westDoor;
|
||||
EastExit _eastExit;
|
||||
WestExit _westExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Star: public SceneObject {
|
||||
public:
|
||||
int _x100, _y100;
|
||||
public:
|
||||
Common::String getClassName() override { return "Scene205_Star"; }
|
||||
};
|
||||
|
||||
class Scene205: public SceneExt {
|
||||
/* Actions */
|
||||
class Action1: public Action {
|
||||
private:
|
||||
void textLoop();
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
private:
|
||||
void setup();
|
||||
void processList(Star **ObjList, int count, const Common::Rect &bounds,
|
||||
int xMultiply, int yMultiply, int xCenter, int yCenter);
|
||||
void handleText();
|
||||
public:
|
||||
AnimationPlayer _animationPlayer;
|
||||
int _fontHeight;
|
||||
SceneText _textList[15];
|
||||
Star *_starList1[3];
|
||||
Star *_starList2[3];
|
||||
Star *_starList3[4];
|
||||
ASound _sound1;
|
||||
Action1 _action1;
|
||||
int _yp;
|
||||
int _textIndex, _lineNum;
|
||||
Common::String _message;
|
||||
public:
|
||||
Scene205();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene205Demo: public SceneExt {
|
||||
/* Actions */
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
private:
|
||||
void leaveScene();
|
||||
public:
|
||||
VisualSpeaker _animationPlayer;
|
||||
ASound _sound1;
|
||||
Action1 _action1;
|
||||
public:
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene250: public SceneExt {
|
||||
class Button: public SceneActor {
|
||||
public:
|
||||
int _floorNumber;
|
||||
Button();
|
||||
void setFloor(int floorNumber);
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
int _currButtonY, _destButtonY, _elevatorSpeed;
|
||||
bool _skippingFl, _skippableFl;
|
||||
NamedHotspot _background, _door, _directionIndicator;
|
||||
Button _destinationFloor, _currentFloor;
|
||||
Button _floor1, _floor2, _floor3, _floor4, _floor5;
|
||||
Button _floor6, _floor7, _floor8, _floor9;
|
||||
ASoundExt _sound1;
|
||||
SequenceManager _sequenceManager1;
|
||||
public:
|
||||
Scene250();
|
||||
void changeFloor(int floorNumber);
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene300: public SceneExt {
|
||||
/* Actions */
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action4: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class QuinnWorkstation: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class MirandaWorkstation: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class SeekerWorkstation: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Miranda: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Seeker: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Quinn: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Doorway: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager1, _sequenceManager2, _sequenceManager3, _sequenceManager4;
|
||||
ASoundExt _sound1;
|
||||
SpeakerMiranda300 _mirandaSpeaker;
|
||||
SpeakerSeeker300 _seekerSpeaker;
|
||||
SpeakerSeekerL _seekerLSpeaker;
|
||||
SpeakerQuinn300 _quinnSpeaker;
|
||||
SpeakerQuinnL _quinnLSpeaker;
|
||||
SpeakerTeal300 _tealSpeaker;
|
||||
SpeakerSoldier300 _soldierSpeaker;
|
||||
|
||||
NamedHotspot _background, _hull, _statusDisplays, _damageControl, _manualOverrides;
|
||||
NamedHotspot _scanners1, _scanners2, _indirectLighting1, _indirectLighting2, _lighting;
|
||||
QuinnWorkstation _quinnWorkstation1, _quinnWorkstation2;
|
||||
SeekerWorkstation _seekerWorkstation;
|
||||
MirandaWorkstation _mirandaWorkstation1, _mirandaWorkstation2;
|
||||
SceneActor _atmosphereLeftWindow, _atmosphereRightWindow, _leftVerticalBarsAnim, _rightVerticalBarsAnim, _protocolDisplay;
|
||||
SceneActor _rightTextDisplay, _mirandaScreen, _leftTextDisplay, _quinnScreen;
|
||||
SceneActor _teal, _soldier, _object12;
|
||||
Doorway _doorway;
|
||||
Miranda _miranda;
|
||||
Seeker _seeker;
|
||||
Quinn _quinn;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
PaletteRotation *_rotation;
|
||||
int _stripId;
|
||||
|
||||
Scene300();
|
||||
void signal309();
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene325: public SceneExt {
|
||||
class Icon: public SceneActor {
|
||||
public:
|
||||
int _lookLineNum, _iconId;
|
||||
bool _pressed;
|
||||
SceneObject _glyph, _horizLine;
|
||||
SceneText _sceneText1, _sceneText2;
|
||||
|
||||
Icon();
|
||||
Common::String getClassName() override { return "Scene325_Icon"; }
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void process(Event &event) override;
|
||||
|
||||
void setIcon(int id);
|
||||
void showIcon();
|
||||
void hideIcon();
|
||||
};
|
||||
|
||||
private:
|
||||
void removeText();
|
||||
void consoleAction(int id);
|
||||
void setMessage(int resNum, int lineNum);
|
||||
Common::String parseMessage(const Common::String &msg);
|
||||
public:
|
||||
int _consoleAction, _iconFontNumber, _databasePage, _priorConsoleAction;
|
||||
int _moveCounter, _yChange, _yDirection, _scannerLocation;
|
||||
int _soundCount, _soundIndex;
|
||||
int _soundQueue[10];
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
ScenePalette _palette;
|
||||
SceneHotspot _background, _terminal;
|
||||
SceneObject _starGrid1, _starGrid2, _starGrid3; // Both starchart & scan grid objects
|
||||
SceneObject _starGrid4, _starGrid5, _starGrid6, _starGrid7;
|
||||
SceneObject _starGrid8, _starGrid9, _starGrid10, _starGrid11;
|
||||
SceneObject _starGrid12, _starGrid13;
|
||||
SceneObject _objList[4];
|
||||
Icon _icon1, _icon2, _icon3, _icon4, _icon5, _icon6;
|
||||
ASoundExt _sound1;
|
||||
SequenceManager _sequenceManager1;
|
||||
SceneText _text1;
|
||||
public:
|
||||
Scene325();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene400: public SceneExt {
|
||||
/* Items */
|
||||
class Terminal: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Door: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Reader: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class SensorProbe: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class AttractorUnit: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background, _equipment1, _equipment2, _equipment3;
|
||||
NamedHotspot _equipment4, _equipment5, _equipment6;
|
||||
NamedHotspot _desk, _desk2, _console;
|
||||
NamedHotspot _duct, _shelves, _cabinet, _doorDisplay, _lights;
|
||||
NamedHotspot _equalizer, _transducer, _optimizer, _soundModule, _tester;
|
||||
NamedHotspot _helmet, _nullifier;
|
||||
Terminal _terminal;
|
||||
SceneActor _consoleDisplay, _testerDisplay;
|
||||
Door _door;
|
||||
Reader _reader;
|
||||
SensorProbe _sensorProbe;
|
||||
AttractorUnit _attractorUnit;
|
||||
SequenceManager _sequenceManager1;
|
||||
ASoundExt _sound1;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene500: public SceneExt {
|
||||
/* Dialogs */
|
||||
class PanelDialog: public SceneAreaObject {
|
||||
class Button: public SceneActor {
|
||||
private:
|
||||
int _buttonId;
|
||||
bool _buttonDown;
|
||||
|
||||
void doButtonPress();
|
||||
public:
|
||||
Button();
|
||||
Common::String getClassName() override { return "Scene500_Button"; }
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void setupButton(int buttonId);
|
||||
};
|
||||
public:
|
||||
Button _button1, _button2, _button3;
|
||||
|
||||
Common::String getClassName() override { return "Scene500_PanelWindow"; }
|
||||
void remove() override;
|
||||
void setDetails(int visage, int strip, int frameNumber, const Common::Point &pt);
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class ControlPanel: public SceneHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Seeker: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Suit: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Doorway: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class OxygenTanks: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class AirLock: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class TransparentDoor: public SceneActor {
|
||||
public:
|
||||
void draw() override;
|
||||
};
|
||||
class Aerosol: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class SonicStunner: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Locker1: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Locker2: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
int _stripNumber;
|
||||
SpeakerSeeker500 _seekerSpeaker;
|
||||
SpeakerQuinn500 _quinnSpeaker;
|
||||
SceneHotspot _background, _airlockCorridor;
|
||||
ControlPanel _controlPanel;
|
||||
SceneActor _suits;
|
||||
Seeker _seeker;
|
||||
Suit _suit;
|
||||
Doorway _doorway;
|
||||
OxygenTanks _tanks1, _tanks2;
|
||||
AirLock _airLock;
|
||||
TransparentDoor _transparentDoor;
|
||||
Aerosol _aerosol;
|
||||
SonicStunner _sonicStunner;
|
||||
Locker1 _locker1;
|
||||
Locker2 _locker2;
|
||||
PanelDialog _panelDialog;
|
||||
ASoundExt _sound1;
|
||||
SequenceManager _sequenceManager1, _sequenceManager2;
|
||||
public:
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene525: public SceneExt {
|
||||
public:
|
||||
SceneActor _actor1;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene600 : public SceneExt {
|
||||
class CompartmentHotspot : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class EngineCompartment : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Smoke : public SceneActor {
|
||||
public:
|
||||
void signal() override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
void draw() override;
|
||||
};
|
||||
class Doorway : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Laser : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Aerosol : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Scanner : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
int _roomState;
|
||||
CompartmentHotspot _quantumDrive;
|
||||
CompartmentHotspot _quantumRegulator;
|
||||
CompartmentHotspot _powerNode;
|
||||
EngineCompartment _engineCompartment;
|
||||
CompartmentHotspot _background;
|
||||
SceneActor _stasisArea;
|
||||
SceneActor _laserBeam;
|
||||
SceneActor _computer;
|
||||
SceneActor _stasisField;
|
||||
Smoke _smoke;
|
||||
Doorway _doorway;
|
||||
Laser _laser;
|
||||
Aerosol _aerosol;
|
||||
Scanner _scanner;
|
||||
ASoundExt _sound1;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
byte _pixelMap[256];
|
||||
|
||||
Scene600();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene700: public SceneExt {
|
||||
class Loft : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class HandGrip : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class LiftDoor : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class SuitRoomDoor : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class ControlPanel : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Cable : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class LoftDoor : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _debris1;
|
||||
NamedHotspot _debris2;
|
||||
NamedHotspot _debris3;
|
||||
NamedHotspot _debris4;
|
||||
NamedHotspot _restraintCollar;
|
||||
NamedHotspot _storage2;
|
||||
NamedHotspot _storage1;
|
||||
NamedHotspot _stars;
|
||||
NamedHotspot _light;
|
||||
Loft _loft;
|
||||
HandGrip _handGrip;
|
||||
SceneActor _electromagnet;
|
||||
LiftDoor _liftDoor;
|
||||
SuitRoomDoor _suitRoomDoor;
|
||||
ControlPanel _controlPanel;
|
||||
Cable _cable;
|
||||
LoftDoor _loftDoor1;
|
||||
LoftDoor _loftDoor2;
|
||||
LoftDoor _loftDoor3;
|
||||
LoftDoor _loftDoor4;
|
||||
SequenceManager _sequenceManager;
|
||||
PaletteRotation *_rotation;
|
||||
|
||||
Scene700();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene800: public SceneExt {
|
||||
/* Items */
|
||||
class Button: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class CableJunction: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class DeviceSlot: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Door: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Tray: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class ComScanner: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Cabinet: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background, _autoDoc, _diskSlot, _couch;
|
||||
NamedHotspot _medicalDatabase, _dataConduits;
|
||||
Button _button;
|
||||
CableJunction _cableJunction;
|
||||
DeviceSlot _deviceSlot;
|
||||
SceneActor _autodocCover, _opticalFiber, _reader;
|
||||
Door _door;
|
||||
Tray _tray;
|
||||
ComScanner _comScanner;
|
||||
Cabinet _cabinet;
|
||||
SequenceManager _sequenceManager1;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene825: public SceneExt {
|
||||
/* Objects */
|
||||
class Button: public SceneObject {
|
||||
public:
|
||||
int _buttonId;
|
||||
bool _buttonDown;
|
||||
SceneText _sceneText;
|
||||
public:
|
||||
Button();
|
||||
void setButton(int buttonId);
|
||||
void setText(int textId);
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background, _console;
|
||||
SceneActor _vertLine1, _vertLine2, _vertLine3, _vertLine4, _vertLine5;
|
||||
Button _button1, _button2, _button3, _button4, _button5, _button6;
|
||||
ASoundExt _sound1, _sound2, _sound3, _sound4;
|
||||
SequenceManager _sequenceManager1;
|
||||
SceneText _sceneText;
|
||||
int _menuId, _frame1, _frame2;
|
||||
const char *_autodocItems[11];
|
||||
public:
|
||||
Scene825();
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
|
||||
void doButtonPress(int buttonId);
|
||||
};
|
||||
|
||||
class Scene850: public SceneExt {
|
||||
/* Items */
|
||||
class Indicator: public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class LiftDoor: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class SickBayDoor: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Clamp: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Panel: public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background, _eastDoor, _compartment, _sickBayIndicator;
|
||||
NamedHotspot _liftControls;
|
||||
Indicator _indicator;
|
||||
SceneActor _spark, _fiber;
|
||||
LiftDoor _liftDoor;
|
||||
SickBayDoor _sickBayDoor;
|
||||
Clamp _clamp;
|
||||
Panel _panel;
|
||||
SequenceManager _sequenceManager1;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene900 : public SceneExt {
|
||||
class Button : public SceneActor {
|
||||
public:
|
||||
int _buttonId;
|
||||
|
||||
Button();
|
||||
void initButton(int buttonId);
|
||||
void synchronize(Serializer &s) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
int _controlsScreenNumber;
|
||||
Common::Point _magnetChangeAmount;
|
||||
NamedHotspot _background;
|
||||
SceneActor _controls;
|
||||
SceneActor _cable;
|
||||
SceneActor _electromagnet;
|
||||
Button _button1;
|
||||
Button _button2;
|
||||
Button _button3;
|
||||
Button _button4;
|
||||
Button _button5;
|
||||
Button _button6;
|
||||
Button _button7;
|
||||
ASoundExt _aSound1;
|
||||
SequenceManager _sequenceManager1;
|
||||
|
||||
Scene900();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
7974
engines/tsage/ringworld2/ringworld2_scenes1.cpp
Normal file
7974
engines/tsage/ringworld2/ringworld2_scenes1.cpp
Normal file
File diff suppressed because it is too large
Load Diff
838
engines/tsage/ringworld2/ringworld2_scenes1.h
Normal file
838
engines/tsage/ringworld2/ringworld2_scenes1.h
Normal file
@@ -0,0 +1,838 @@
|
||||
/* 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 TSAGE_RINGWORLD2_SCENES1_H
|
||||
#define TSAGE_RINGWORLD2_SCENES1_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
#include "tsage/ringworld2/ringworld2_speakers.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene1000 : public SceneExt {
|
||||
public:
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
SpeakerGameText _gameTextSpeaker;
|
||||
AnimationPlayer _animationPlayer;
|
||||
|
||||
int _animCounter;
|
||||
bool _forceCheckAnimationFl;
|
||||
public:
|
||||
Scene1000();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene1010 : public SceneExt {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene1020 : public SceneExt {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene1100 : public SceneExt {
|
||||
class Seeker : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Trooper : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Chief : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
public:
|
||||
int _nextStripNum, _paletteRefreshStatus;
|
||||
SpeakerSeeker1100 _seekerSpeaker;
|
||||
SpeakerQuinn1100 _quinnSpeaker;
|
||||
SpeakerChief1100 _chiefSpeaker;
|
||||
ScenePalette _palette1;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _sky;
|
||||
NamedHotspot _fuana1;
|
||||
NamedHotspot _fauna2;
|
||||
NamedHotspot _bouldersBlockingCave;
|
||||
NamedHotspot _boulders;
|
||||
NamedHotspot _trail;
|
||||
SceneActor _ship;
|
||||
SceneActor _cloud;
|
||||
SceneActor _shipFormation;
|
||||
SceneActor _shipFormationShadow;
|
||||
SceneActor _shotImpact1;
|
||||
SceneActor _shotImpact2;
|
||||
SceneActor _shotImpact3;
|
||||
SceneActor _shotImpact4;
|
||||
SceneActor _shotImpact5;
|
||||
SceneActor _laserShot;
|
||||
SceneActor _animation; // Used for cliff collapse and ship theft
|
||||
SceneActor _leftImpacts;
|
||||
SceneActor _runningGuy1;
|
||||
SceneActor _runningGuy2;
|
||||
SceneActor _runningGuy3;
|
||||
BackgroundSceneObject _rightLandslide;
|
||||
BackgroundSceneObject _purplePlant;
|
||||
Seeker _seeker;
|
||||
Trooper _trooper;
|
||||
Chief _chief;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
SequenceManager _sequenceManager3;
|
||||
|
||||
Scene1100();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void saveCharacter(int characterIndex) override;
|
||||
};
|
||||
|
||||
class Scene1500 : public SceneExt {
|
||||
public:
|
||||
SceneActor _starship;
|
||||
SceneActor _starshipShadow;
|
||||
SceneActor _smallShip;
|
||||
SceneActor _smallShipShadow;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene1525 : public SceneExt {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene1530 : public SceneExt {
|
||||
public:
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
SceneActor _seeker;
|
||||
SceneActor _leftReactor;
|
||||
SceneActor _rightReactor;
|
||||
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene1550 : public SceneExt {
|
||||
class Wall : public SceneActor {
|
||||
public:
|
||||
void setupWall(int frameNumber, int strip);
|
||||
};
|
||||
|
||||
class Junk : public SceneActor {
|
||||
public:
|
||||
int _junkNumber;
|
||||
|
||||
Junk();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class ShipComponent : public SceneActor {
|
||||
public:
|
||||
int _componentId;
|
||||
|
||||
ShipComponent();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
void setupShipComponent(int componentId);
|
||||
};
|
||||
|
||||
class DishControlsWindow : public ModalWindow {
|
||||
class DishControl : public SceneActor {
|
||||
public:
|
||||
int _controlId;
|
||||
|
||||
DishControl();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
byte _field20;
|
||||
SceneActor _areaActor;
|
||||
DishControl _button;
|
||||
DishControl _lever;
|
||||
|
||||
void remove() override;
|
||||
void setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY) override;
|
||||
};
|
||||
|
||||
class WorkingShip : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Wreckage : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Companion : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class AirBag : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Joystick : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Gyroscope : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class DiagnosticsDisplay : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class DishTower : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Dish : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
public:
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
WorkingShip _intactHull1, _intactHull2;
|
||||
SceneHotspot _background;
|
||||
SceneActor _wreckage2; // also used for Lance of Truth landing strut
|
||||
SceneActor _wreckage3;
|
||||
SceneActor _wreckage4;
|
||||
SceneActor _walkway;
|
||||
SceneActor _dishTowerShadow;
|
||||
Wreckage _wreckage;
|
||||
Companion _companion;
|
||||
AirBag _airbag;
|
||||
Joystick _joystick;
|
||||
Gyroscope _gyroscope;
|
||||
DiagnosticsDisplay _diagnosticsDisplay;
|
||||
DishTower _dishTower;
|
||||
Dish _dish;
|
||||
Junk _junk[8];
|
||||
Wall _wallCorner1;
|
||||
Wall _northWall; // Is also reused for landing strip
|
||||
Wall _wallCorner2;
|
||||
Wall _westWall; // Is also reused for left hand space
|
||||
Wall _eastWall;
|
||||
Wall _southWall;
|
||||
ShipComponent _shipComponents[8];
|
||||
DishControlsWindow _dishControlsWindow;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
|
||||
bool _dontExit;
|
||||
int _wallType;
|
||||
int _dishMode;
|
||||
int _sceneResourceId;
|
||||
int _walkRegionsId;
|
||||
|
||||
Scene1550();
|
||||
void synchronize(Serializer &s) override;
|
||||
void enterArea();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void saveCharacter(int characterIndex) override;
|
||||
};
|
||||
|
||||
class Scene1575 : public SceneExt {
|
||||
class Button : public NamedHotspot {
|
||||
public:
|
||||
int _buttonId;
|
||||
bool _pressed;
|
||||
|
||||
Button();
|
||||
void synchronize(Serializer &s) override;
|
||||
void initButton(int buttonId);
|
||||
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
int _field412;
|
||||
int _field414;
|
||||
int _field416;
|
||||
int _field418;
|
||||
int _field41A;
|
||||
Button _button1;
|
||||
Button _button2;
|
||||
Button _button3;
|
||||
Button _button4;
|
||||
Button _button5;
|
||||
Button _button6;
|
||||
SceneActor _actor1;
|
||||
SceneActor _actor2;
|
||||
SceneActor _actor3;
|
||||
SceneActor _actor4;
|
||||
SceneActor _actor5;
|
||||
SceneActor _actor6;
|
||||
SceneActor _actor7;
|
||||
SceneActor _actor8;
|
||||
SceneActor _actor9;
|
||||
SceneActor _actor10;
|
||||
SceneActor _actor11;
|
||||
SceneActor _actor12;
|
||||
SceneActor _actor13;
|
||||
SceneActor _actor14;
|
||||
SceneActor _actor15;
|
||||
SceneActor _arrActor[17];
|
||||
SequenceManager _sequenceManager1;
|
||||
|
||||
Scene1575();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene1580 : public SceneExt {
|
||||
class JoystickPlug : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class ScreenSlot : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Joystick : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Screen : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class StorageCompartment : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class HatchButton : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class ThrusterValve : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Ignitor : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
JoystickPlug _joystickPlug;
|
||||
ScreenSlot _screenSlot;
|
||||
NamedHotspot _background;
|
||||
SceneActor _screenDisplay;
|
||||
SceneActor _arrActor[8];
|
||||
Joystick _joystick;
|
||||
Screen _screen;
|
||||
StorageCompartment _storageCompartment;
|
||||
HatchButton _hatchButton;
|
||||
ThrusterValve _thrusterValve;
|
||||
Ignitor _ignitor;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
Scene1580();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene1625 : public SceneExt {
|
||||
class Wire : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
SpeakerMiranda1625 _mirandaSpeaker;
|
||||
SpeakerTeal1625 _tealSpeaker;
|
||||
SpeakerSoldier1625 _soldierSpeaker;
|
||||
NamedHotspot _background;
|
||||
SceneActor _teal;
|
||||
SceneActor _tealHead;
|
||||
SceneActor _mirandaMouth;
|
||||
SceneActor _glass;
|
||||
SceneActor _wristRestraints;
|
||||
SceneActor _tealRightArm;
|
||||
Wire _wire;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
Scene1625();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene1700 : public SceneExt {
|
||||
class RimTransport : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Companion : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class NorthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
NamedHotspot _surface;
|
||||
NamedHotspot _background;
|
||||
SceneActor _playerShadow;
|
||||
SceneActor _companionShadow;
|
||||
SceneActor _slabWest;
|
||||
SceneActor _slabEast;
|
||||
SceneActor _slabShadowWest;
|
||||
SceneActor _slabShadowEast;
|
||||
SceneActor _westPlatform;
|
||||
SceneActor _rimTransportDoor;
|
||||
SceneActor _ledgeHopper;
|
||||
SceneActor _hatch;
|
||||
RimTransport _rimTransport;
|
||||
Companion _companion;
|
||||
NorthExit _northExit;
|
||||
SouthExit _southExit;
|
||||
WestExit _westExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
bool _walkFlag;
|
||||
|
||||
Scene1700();
|
||||
void synchronize(Serializer &s) override;
|
||||
void enterArea();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene1750 : public SceneExt {
|
||||
class SpeedSlider : public SceneActor {
|
||||
public:
|
||||
int _incrAmount;
|
||||
int _xp;
|
||||
int _ys;
|
||||
int _height;
|
||||
int _thumbHeight;
|
||||
bool _mouseDown;
|
||||
|
||||
SpeedSlider();
|
||||
void synchronize(Serializer &s) override;
|
||||
void setupSlider(int incrAmount, int xp, int ys, int height, int thumbHeight);
|
||||
void calculateSlider();
|
||||
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Button : public SceneActor {
|
||||
public:
|
||||
int _buttonId;
|
||||
|
||||
Button();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _redLightsDescr;
|
||||
NamedHotspot _greenLights;
|
||||
NamedHotspot _frontView;
|
||||
NamedHotspot _rearView;
|
||||
SceneActor _scannerIcon;
|
||||
SceneActor _redLights;
|
||||
SceneActor _radarSweep;
|
||||
SpeedSlider _speedSlider;
|
||||
Button _forwardButton;
|
||||
Button _backwardButton;
|
||||
Button _exitButton;
|
||||
SequenceManager _sequenceManager;
|
||||
PaletteRotation *_rotation;
|
||||
|
||||
int _direction;
|
||||
int _speedCurrent;
|
||||
int _speed;
|
||||
int _speedDelta;
|
||||
int _rotationSegment;
|
||||
int _rotationSegCurrent;
|
||||
int _newRotation;
|
||||
|
||||
Scene1750();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene1800 : public SceneExt {
|
||||
class Background : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Lever : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Doors : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class PassengerDoor : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
int _locationMode;
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
NamedHotspot _elevator;
|
||||
NamedHotspot _elevatorContents;
|
||||
NamedHotspot _surface;
|
||||
NamedHotspot _secBackground;
|
||||
Background _background;
|
||||
SceneActor _playerShadow;
|
||||
SceneActor _companion;
|
||||
SceneActor _companionShadow;
|
||||
SceneActor _leftStaircase;
|
||||
SceneActor _rightStaircase;
|
||||
Lever _lever;
|
||||
Doors _doors;
|
||||
PassengerDoor _leftDoor;
|
||||
PassengerDoor _rightDoor;
|
||||
SouthExit _southExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
Scene1800();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void saveCharacter(int characterIndex) override;
|
||||
};
|
||||
|
||||
class Scene1850 : public SceneExt {
|
||||
class Button : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Robot : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Door : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class DisplayScreen : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
public:
|
||||
int _sceneMode;
|
||||
int _shadeCountdown;
|
||||
int _shadeDirection;
|
||||
bool _shadeChanging;
|
||||
Common::Point _playerDest;
|
||||
int _seqNumber;
|
||||
ScenePalette _palette1;
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
NamedHotspot _background;
|
||||
Button _button;
|
||||
SceneActor _companion;
|
||||
SceneActor _airbag;
|
||||
SceneActor _screen;
|
||||
SceneActor _helmet;
|
||||
Robot _robot;
|
||||
Door _leftDoor;
|
||||
Door _rightDoor;
|
||||
DisplayScreen _displayScreen;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
|
||||
Scene1850();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene1875 : public SceneExt {
|
||||
class Button : public SceneActor {
|
||||
public:
|
||||
int _buttonId;
|
||||
bool _buttonDown;
|
||||
|
||||
Button();
|
||||
void doButtonPress();
|
||||
void initButton(int buttonId);
|
||||
|
||||
Common::String getClassName() override { return "Scene1875_Button"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _screen;
|
||||
SceneActor _map;
|
||||
SceneActor _rimPosition;
|
||||
Button _button1;
|
||||
Button _button2;
|
||||
Button _button3;
|
||||
Button _button4;
|
||||
Button _button5;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene1900 : public SceneExt {
|
||||
class LiftDoor : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class EastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
SpeakerSeeker1900 _seekerSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _elevator;
|
||||
SceneActor _companion;
|
||||
BackgroundSceneObject _leftDoorFrame;
|
||||
BackgroundSceneObject _rightDoorFrame;
|
||||
LiftDoor _leftDoor, _rightDoor;
|
||||
WestExit _westExit;
|
||||
EastExit _eastExit;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene1925 : public SceneExt {
|
||||
class Button : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Ladder : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class ExitUp : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class ExitDown : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class EastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
Button _button;
|
||||
Ladder _ladder;
|
||||
SceneActor _door;
|
||||
ExitUp _exitUp;
|
||||
ExitDown _exitDown;
|
||||
WestExit _westExit;
|
||||
EastExit _eastExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
int _newSceneMode;
|
||||
int _levelResNum[5];
|
||||
|
||||
Scene1925();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void changeLevel(bool upFlag);
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene1945 : public SceneExt {
|
||||
class Ice : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Ladder : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Gunpowder : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class ExitUp : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class CorridorExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _hole;
|
||||
NamedHotspot _ice2;
|
||||
Ice _ice;
|
||||
Ladder _ladder;
|
||||
SceneActor _coveringIce;
|
||||
SceneActor _alcoholLamp;
|
||||
Gunpowder _gunpowder;
|
||||
ExitUp _exitUp;
|
||||
CorridorExit _corridorExit;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
|
||||
int _nextSceneMode1;
|
||||
int _nextSceneMode2;
|
||||
CursorType _lampUsed;
|
||||
|
||||
Scene1945();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
5209
engines/tsage/ringworld2/ringworld2_scenes2.cpp
Normal file
5209
engines/tsage/ringworld2/ringworld2_scenes2.cpp
Normal file
File diff suppressed because it is too large
Load Diff
762
engines/tsage/ringworld2/ringworld2_scenes2.h
Normal file
762
engines/tsage/ringworld2/ringworld2_scenes2.h
Normal file
@@ -0,0 +1,762 @@
|
||||
/* 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 TSAGE_RINGWORLD2_SCENES2_H
|
||||
#define TSAGE_RINGWORLD2_SCENES2_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
#include "tsage/ringworld2/ringworld2_speakers.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene2000 : public SceneExt {
|
||||
class Action1 : public ActionExt {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class EastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class NorthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class DoorExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
bool _exitingFlag;
|
||||
int _mazePlayerMode;
|
||||
|
||||
NamedHotspot _background;
|
||||
SceneActor _companion;
|
||||
SceneActor _persons[11];
|
||||
WestExit _westExit;
|
||||
EastExit _eastExit;
|
||||
SouthExit _southExit;
|
||||
NorthExit _northExit;
|
||||
DoorExit _doorExit;
|
||||
Action1 _action1, _action2, _action3, _action4, _action5;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
Scene2000();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void initExits();
|
||||
void initPlayer();
|
||||
};
|
||||
|
||||
class Scene2350 : public SceneExt {
|
||||
class Companion : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Balloon : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class ExitUp : public SceneExit {
|
||||
void changeScene() override;
|
||||
};
|
||||
class ExitWest : public SceneExit {
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerPharisha _pharishaSpeaker;
|
||||
NamedHotspot _background;
|
||||
SceneActor _person;
|
||||
Companion _companion;
|
||||
Balloon _balloon;
|
||||
Balloon _harness;
|
||||
ExitUp _exitUp;
|
||||
ExitWest _exitWest;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2400 : public SceneExt {
|
||||
class WestExit : public SceneExit {
|
||||
void changeScene() override;
|
||||
};
|
||||
class EastExit : public SceneExit {
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
WestExit _westExit;
|
||||
EastExit _eastExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2425 : public SceneExt {
|
||||
class RopeDest1 : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class RopeDest2 : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Crevasse : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Background : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Rope : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Pictographs : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthEastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
RopeDest1 _ropeDest1;
|
||||
RopeDest2 _ropeDest2;
|
||||
Crevasse _crevasse;
|
||||
Background _background;
|
||||
Rope _rope;
|
||||
Pictographs _pictographs1;
|
||||
Pictographs _pictographs2;
|
||||
SouthEastExit _southEastExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2430 : public SceneExt {
|
||||
class Companion : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class GunPowder : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class OilLamp : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _bottles2;
|
||||
NamedHotspot _furnishings;
|
||||
NamedHotspot _rug1;
|
||||
NamedHotspot _mirror;
|
||||
NamedHotspot _garments;
|
||||
NamedHotspot _bed;
|
||||
NamedHotspot _towel;
|
||||
NamedHotspot _bottles1;
|
||||
NamedHotspot _post;
|
||||
NamedHotspot _clothesPile1;
|
||||
NamedHotspot _clothesPile2;
|
||||
NamedHotspot _rug2;
|
||||
Companion _companion;
|
||||
GunPowder _gunPowder;
|
||||
OilLamp _oilLamp;
|
||||
SouthExit _southExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2435 : public SceneExt {
|
||||
class Companion : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Astor : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn2435 _quinnSpeaker;
|
||||
SpeakerSeeker2435 _seekerSpeaker;
|
||||
SpeakerPharisha2435 _pharishaSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _leftWindow;
|
||||
NamedHotspot _rightWindow;
|
||||
Companion _companion;
|
||||
Astor _astor;
|
||||
SouthExit _southExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2440 : public SceneExt {
|
||||
class Companion : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class OilLamp : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthEastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _garments;
|
||||
NamedHotspot _bedspread;
|
||||
NamedHotspot _post;
|
||||
NamedHotspot _rug;
|
||||
NamedHotspot _furnishings;
|
||||
NamedHotspot _bottles;
|
||||
Companion _companion;
|
||||
OilLamp _oilLamp;
|
||||
SouthEastExit _southEastExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2445 : public SceneExt {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2450 : public SceneExt {
|
||||
class Parker : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class CareTaker : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthWestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn2450 _quinnSpeaker;
|
||||
SpeakerSeeker2450 _seekerSpeaker;
|
||||
SpeakerCaretaker2450 _caretakerSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _post;
|
||||
NamedHotspot _bedspread;
|
||||
SceneActor _companion;
|
||||
Parker _parker;
|
||||
CareTaker _careTaker;
|
||||
SouthWestExit _southWestExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2455 : public SceneExt {
|
||||
class Lamp : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Pool : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class ScrithKey : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class NorthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
Lamp _lamp;
|
||||
Pool _pool;
|
||||
ScrithKey _scrithKey;
|
||||
NorthExit _northExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2500 : public SceneExt {
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn _quinnSpeaker;
|
||||
SpeakerSeeker _seekerSpeaker;
|
||||
SpeakerMiranda _mirandaSpeaker;
|
||||
SpeakerWebbster2500 _webbsterSpeaker;
|
||||
NamedHotspot _background;
|
||||
SceneActor _companion;
|
||||
SceneActor _quinn;
|
||||
SceneActor _ship;
|
||||
WestExit _westExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2525 : public SceneExt {
|
||||
class StopCock : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class GlassDome : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _machine;
|
||||
NamedHotspot _pipes1;
|
||||
NamedHotspot _pipes2;
|
||||
StopCock _stopcock;
|
||||
SceneActor _companion;
|
||||
SceneActor _compressor;
|
||||
GlassDome _glassDome;
|
||||
SouthExit _southExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2530 : public SceneExt {
|
||||
class Flask : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Crank : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _crank2;
|
||||
NamedHotspot _shelf;
|
||||
NamedHotspot _item4;
|
||||
NamedHotspot _rope;
|
||||
SceneActor _companion;
|
||||
Flask _flask;
|
||||
Crank _crank;
|
||||
SouthExit _southExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2535 : public SceneExt {
|
||||
class RebreatherTank : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class TannerMask : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _roof;
|
||||
NamedHotspot _skin1;
|
||||
NamedHotspot _skin2;
|
||||
NamedHotspot _skin3;
|
||||
NamedHotspot _skin4;
|
||||
NamedHotspot _depression;
|
||||
SceneActor _companion;
|
||||
SceneActor _rope;
|
||||
RebreatherTank _rebreatherTank;
|
||||
TannerMask _tannerMask;
|
||||
SouthExit _southExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2600 : public SceneExt {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
PaletteRotation *_rotation;
|
||||
|
||||
Scene2600();
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2700 : public SceneExt {
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action4: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class SouthExit: public SceneArea {
|
||||
public:
|
||||
void process(Event &event) override;
|
||||
};
|
||||
class EastExit: public SceneArea {
|
||||
public:
|
||||
void process(Event &event) override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn2700 _quinnSpeaker;
|
||||
SpeakerNej2700 _nejSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _ghoulHome1;
|
||||
NamedHotspot _ghoulHome2;
|
||||
NamedHotspot _ghoulHome3;
|
||||
NamedHotspot _ghoulHome4;
|
||||
NamedHotspot _ghoulHome5;
|
||||
SceneActor _nej;
|
||||
SceneActor _ghoulHome6;
|
||||
SceneActor _ghoulHome7;
|
||||
SceneActor _ghoulHome8;
|
||||
SceneActor _ghoulHome9;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
SouthExit _southExit;
|
||||
EastExit _eastExit;
|
||||
Rect _walkRect1, _walkRect2, _walkRect3;
|
||||
Rect _walkRect4, _walkRect5, _walkRect6;
|
||||
SequenceManager _sequenceManager;
|
||||
int _areaMode, _moveMode, _stripNumber;
|
||||
|
||||
Scene2700();
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene2750 : public SceneExt {
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action4: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action5: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action6: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action7: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class WestExit: public SceneArea {
|
||||
public:
|
||||
void process(Event &event) override;
|
||||
};
|
||||
class EastExit: public SceneArea {
|
||||
public:
|
||||
void process(Event &event) override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn2750 _quinnSpeaker;
|
||||
SpeakerNej2750 _nejSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _ghoulHome1;
|
||||
NamedHotspot _ghoulHome2;
|
||||
NamedHotspot _ghoulHome3;
|
||||
NamedHotspot _ghoulHome4;
|
||||
SceneActor _nej;
|
||||
SceneActor _fire;
|
||||
SceneActor _bird1;
|
||||
SceneActor _folliage1;
|
||||
SceneActor _bird2;
|
||||
SceneActor _folliage2;
|
||||
SceneActor _folliage3;
|
||||
SceneActor _folliage4;
|
||||
SceneActor _folliage5;
|
||||
SceneActor _folliage6;
|
||||
SceneActor _folliage7;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Action7 _action7;
|
||||
WestExit _westExit;
|
||||
EastExit _eastExit;
|
||||
Rect _walkRect1, _walkRect2, _walkRect3;
|
||||
SequenceManager _sequenceManager;
|
||||
int _areaMode, _moveMode, _stripNumber;
|
||||
|
||||
Scene2750();
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene2800 : public SceneExt {
|
||||
class Outpost : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Guard : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2: public Action {
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
SpeakerQuinn2800 _quinnSpeaker;
|
||||
SpeakerNej2800 _nejSpeaker;
|
||||
SpeakerGuard2800 _guardSpeaker;
|
||||
NamedHotspot _background;
|
||||
Outpost _outpost;
|
||||
Guard _guard;
|
||||
SceneActor _nej;
|
||||
SceneActor _lightBar;
|
||||
SceneObject _bird;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
SequenceManager _sequenceManager;
|
||||
int _stripNumber;
|
||||
|
||||
Scene2800();
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2900 : public SceneExt {
|
||||
/* Items */
|
||||
class Scenery : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class ControlPanel : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Altimeter : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class KnobLeft : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class KnobRight : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Skip : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Actions */
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Miscellaneous */
|
||||
class Map {
|
||||
private:
|
||||
void moveArea(Rect &r, int xAmt, int yAmt);
|
||||
void moveLine(int xpSrc, int ypSrc, int xpDest, int ypDest, int width);
|
||||
int adjustRect(Common::Rect &r1, const Common::Rect &r2);
|
||||
void drawBlock(const byte *data, int xp, int yp, const Rect &r1, const Rect &r2);
|
||||
public:
|
||||
int _mapWidth, _mapHeight;
|
||||
int _resNum;
|
||||
int _xV, _yV;
|
||||
Rect _bounds;
|
||||
|
||||
Map();
|
||||
void load(int resNum);
|
||||
Common::Point setPosition(const Common::Point &pos, bool initialFlag = false);
|
||||
void synchronize(Serializer &s);
|
||||
void redraw(Rect *updateRect = NULL);
|
||||
};
|
||||
public:
|
||||
SceneObject _leftEdge;
|
||||
SceneObject _rightEdge;
|
||||
SceneObject _knob;
|
||||
SceneObject _altimeterContent;
|
||||
SceneObject _knobRightContent;
|
||||
SceneObject _knobLeftContent;
|
||||
Scenery _scenery;
|
||||
ControlPanel _controlPanel;
|
||||
Altimeter _altimeter;
|
||||
KnobLeft _knobLeft;
|
||||
KnobRight _knobRight;
|
||||
Skip _skip;
|
||||
Action1 _action1;
|
||||
Map _map;
|
||||
SceneText _skipText;
|
||||
|
||||
bool _controlsActiveChanging;
|
||||
bool _altitudeChanging;
|
||||
bool _majorMinorFlag;
|
||||
int _altitudeMinorChange;
|
||||
int _altitudeMajorChange;
|
||||
Common::Point _balloonLocation;
|
||||
Common::Point _balloonScreenPos;
|
||||
int _newAltitude;
|
||||
int _xAmount;
|
||||
int _xComparison;
|
||||
int _fadeCounter;
|
||||
bool _paletteReloadNeeded;
|
||||
|
||||
Scene2900();
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void refreshBackground(int xAmount, int yAmount) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
5714
engines/tsage/ringworld2/ringworld2_scenes3.cpp
Normal file
5714
engines/tsage/ringworld2/ringworld2_scenes3.cpp
Normal file
File diff suppressed because it is too large
Load Diff
843
engines/tsage/ringworld2/ringworld2_scenes3.h
Normal file
843
engines/tsage/ringworld2/ringworld2_scenes3.h
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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TSAGE_RINGWORLD2_SCENES3_H
|
||||
#define TSAGE_RINGWORLD2_SCENES3_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
#include "tsage/ringworld2/ringworld2_speakers.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
|
||||
class Scene3100 : public SceneExt {
|
||||
class Guard : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
bool _fadeSound;
|
||||
SpeakerGuard _guardSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _hammerHead2;
|
||||
SceneActor _hammerHead;
|
||||
SceneActor _miranda;
|
||||
SceneActor _ghoul;
|
||||
SceneActor _technicians;
|
||||
SceneActor _deadBodies;
|
||||
Guard _guard;
|
||||
ASoundExt _sound1;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
Scene3100();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3125 : public SceneExt {
|
||||
class Background : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Table : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Computer : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
bool _soundPlayed;
|
||||
Background _background;
|
||||
Door _door;
|
||||
Table _table;
|
||||
Computer _computer;
|
||||
SceneActor _ghoul1;
|
||||
SceneActor _ghoul2;
|
||||
SceneActor _ghoul3;
|
||||
SceneActor _ghoul4;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
Scene3125();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3150 : public SceneExt {
|
||||
class LightFixture : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Toilet : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Water : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class FoodTray : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class ToiletFlush : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class AirVent : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class DoorExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class VentExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _bed;
|
||||
NamedHotspot _lightFixture2;
|
||||
NamedHotspot _bars;
|
||||
LightFixture _lightFixture;
|
||||
Toilet _toilet;
|
||||
SceneActor _guard;
|
||||
SceneActor _doorBars;
|
||||
SceneActor _bulbOrWire;
|
||||
Water _water;
|
||||
FoodTray _foodTray;
|
||||
ToiletFlush _toiletFlush;
|
||||
AirVent _airVent;
|
||||
DoorExit _doorExit;
|
||||
VentExit _ventExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene3175 : public SceneExt {
|
||||
class RoomItem : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Corpse : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
RoomItem _background;
|
||||
RoomItem _table;
|
||||
RoomItem _autopsies;
|
||||
Door _door;
|
||||
SceneActor _computer;
|
||||
Corpse _corpse;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3200 : public SceneExt {
|
||||
public:
|
||||
SpeakerRocko3200 _rockoSpeaker;
|
||||
SpeakerJocko3200 _jockoSpeaker;
|
||||
SpeakerSocko3200 _sockoSpeaker;
|
||||
SceneActor _rocko;
|
||||
SceneActor _jocko;
|
||||
SceneActor _socko;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3210 : public SceneExt {
|
||||
public:
|
||||
SpeakerCaptain3210 _captainSpeaker;
|
||||
SpeakerPrivate3210 _privateSpeaker;
|
||||
SceneActor _captain;
|
||||
SceneActor _private;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3220 : public SceneExt {
|
||||
public:
|
||||
SpeakerRocko3220 _rockoSpeaker;
|
||||
SpeakerJocko3220 _jockoSpeaker;
|
||||
SceneActor _rocko;
|
||||
SceneActor _jocko;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3230 : public SceneExt {
|
||||
public:
|
||||
SpeakerRocko3230 _rockoSpeaker;
|
||||
SpeakerJocko3230 _jockoSpeaker;
|
||||
SceneActor _rocko;
|
||||
SceneActor _jocko;
|
||||
SceneActor _ghoul;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3240 : public SceneExt {
|
||||
public:
|
||||
SpeakerTeal3240 _tealSpeaker;
|
||||
SpeakerWebbster3240 _webbsterSpeaker;
|
||||
SpeakerMiranda _mirandaSpeaker;
|
||||
SceneActor _teal;
|
||||
SceneActor _webbster;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3245 : public SceneExt {
|
||||
public:
|
||||
SpeakerRalf3245 _ralfSpeaker;
|
||||
SpeakerTomko3245 _tomkoSpeaker;
|
||||
SceneActor _ralf;
|
||||
SceneActor _tomko;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3250 : public SceneExt {
|
||||
class Item : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
Item _background;
|
||||
Item _tnuctipunShip;
|
||||
Item _floodLights;
|
||||
Item _negator;
|
||||
Door _leftDoor;
|
||||
Door _topDoor;
|
||||
Door _rightDoor;
|
||||
Door _grate;
|
||||
SceneActor _ghoul1;
|
||||
SceneActor _ghoul2;
|
||||
SceneActor _ghoul3;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene3255 : public SceneExt {
|
||||
public:
|
||||
SceneActor _teal;
|
||||
SceneActor _guard;
|
||||
SceneActor _door;
|
||||
SceneActor _quinn;
|
||||
SceneActor _ghoul1;
|
||||
SceneActor _ghoul2;
|
||||
SceneActor _ghoul3;
|
||||
SpeakerQuinn3255 _quinnSpeaker;
|
||||
SpeakerMiranda3255 _mirandaSpeaker;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene3260 : public SceneExt {
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Toolbox : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
SceneActor _sceeen1;
|
||||
SceneActor _screen2;
|
||||
SceneActor _screen3;
|
||||
SceneActor _screen4;
|
||||
SceneActor _screen5;
|
||||
SceneActor _screen6;
|
||||
SceneActor _screen7;
|
||||
SceneActor _screen8;
|
||||
SceneActor _screen9;
|
||||
SceneActor _securityConsole;
|
||||
SceneActor _computerConsole;
|
||||
SceneActor _lightingConsole;
|
||||
Door _door;
|
||||
Toolbox _toolbox;
|
||||
Action1 _action1;
|
||||
Action1 _action2;
|
||||
Action1 _action3;
|
||||
Action1 _action4;
|
||||
Action1 _action5;
|
||||
Action1 _action6;
|
||||
Action1 _action7;
|
||||
Action1 _action8;
|
||||
Action1 _action9;
|
||||
Action1 _action10;
|
||||
Action1 _action11;
|
||||
Action1 _action12;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3275 : public SceneExt {
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class CellExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _emptyCell1;
|
||||
NamedHotspot _emptyCell2;
|
||||
NamedHotspot _securityBeams1;
|
||||
NamedHotspot _securityBeams2;
|
||||
SceneActor _doorFrame;
|
||||
Door _door;
|
||||
CellExit _cellExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3350 : public SceneExt {
|
||||
public:
|
||||
SceneActor _miranda;
|
||||
SceneActor _seeker;
|
||||
SceneActor _webbster;
|
||||
SceneActor _seatedPeople;
|
||||
SceneActor _ship;
|
||||
SceneActor _landedShip;
|
||||
SceneActor _shipShadow;
|
||||
SceneActor _canopy;
|
||||
SceneActor _shipFront;
|
||||
SequenceManager _sequenceManager;
|
||||
PaletteRotation *_rotation;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3375 : public SceneExt {
|
||||
class Companion1 : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Companion2 : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Webbster : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class LeftExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class DownExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class RightExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
void signalCase3379();
|
||||
void enterArea(int sceneMode);
|
||||
|
||||
public:
|
||||
SpeakerQuinn3375 _quinnSpeaker;
|
||||
SpeakerSeeker3375 _seekerSpeaker;
|
||||
SpeakerMiranda3375 _mirandaSpeaker;
|
||||
SpeakerWebbster3375 _webbsterSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _itemArray[13];
|
||||
Companion1 _companion1;
|
||||
Companion2 _companion2;
|
||||
Webbster _webbster;
|
||||
Door _door;
|
||||
LeftExit _leftExit;
|
||||
DownExit _downExit;
|
||||
RightExit _rightExit;
|
||||
SequenceManager _sequenceManager;
|
||||
int _newSceneMode;
|
||||
int _sceneAreas[4];
|
||||
|
||||
Scene3375();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3385 : public SceneExt {
|
||||
class Companion1 : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Companion2 : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Webbster : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
SpeakerQuinn3385 _quinnSpeaker;
|
||||
SpeakerSeeker3385 _seekerSpeaker;
|
||||
SpeakerMiranda3385 _mirandaSpeaker;
|
||||
SpeakerWebbster3385 _webbsterSpeaker;
|
||||
NamedHotspot _background;
|
||||
Companion1 _companion1;
|
||||
Companion2 _companion2;
|
||||
Webbster _webbster;
|
||||
Door _door;
|
||||
SouthExit _southExit;
|
||||
Action1 _action1;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
int _playerStrip;
|
||||
|
||||
Scene3385();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3395 : public SceneExt {
|
||||
class Companion1 : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Companion2 : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Webbster : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Door : public SceneActor {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Action1: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
SpeakerQuinn3395 _quinnSpeaker;
|
||||
SpeakerSeeker3395 _seekerSpeaker;
|
||||
SpeakerMiranda3395 _mirandaSpeaker;
|
||||
SpeakerWebbster3395 _webbsterSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _itemArray[13];
|
||||
Companion1 _companion1;
|
||||
Companion2 _companion2;
|
||||
Webbster _webbster;
|
||||
Door _door;
|
||||
Action1 _action1;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
int _playerStrip;
|
||||
|
||||
Scene3395();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3400 : public SceneExt {
|
||||
public:
|
||||
SpeakerQuinn3400 _quinnSpeaker;
|
||||
SpeakerSeeker3400 _seekerSpeaker;
|
||||
SpeakerMiranda3400 _mirandaSpeaker;
|
||||
SpeakerWebbster3400 _webbsterSpeaker;
|
||||
SpeakerTeal3400 _tealSpeaker;
|
||||
SceneActor _companion1;
|
||||
SceneActor _companion2;
|
||||
SceneActor _webbster;
|
||||
SceneActor _teal;
|
||||
SceneActor _door;
|
||||
SceneActor _manholeCover;
|
||||
SceneActor _sapphire;
|
||||
SequenceManager _sequenceManager;
|
||||
bool _soundFaded;
|
||||
|
||||
Scene3400();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3500 : public SceneExt {
|
||||
class Action1: public Action {
|
||||
public:
|
||||
int _direction;
|
||||
bool _headingRightFl;
|
||||
bool _turningFl;
|
||||
|
||||
Action1();
|
||||
void synchronize(Serializer &s) override;
|
||||
void handleHorzButton(int direction);
|
||||
void turnShuttle(bool arg1);
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
class Action2: public Action {
|
||||
public:
|
||||
int _direction;
|
||||
|
||||
Action2();
|
||||
void synchronize(Serializer &s) override;
|
||||
void handleVertButton(int direction);
|
||||
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class DirectionButton : public NamedHotspot {
|
||||
public:
|
||||
int _movementId;
|
||||
|
||||
DirectionButton();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Throttle : public SceneActor {
|
||||
public:
|
||||
Common::Point _pos;
|
||||
int _deltaX;
|
||||
int _deltaY;
|
||||
int _slideDeltaY;
|
||||
int _deltaMouseY;
|
||||
|
||||
Throttle();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void init(int xp, int yp, int dx, int dy, int speed);
|
||||
void updateSpeed();
|
||||
void setSpeed(int arg1);
|
||||
void changePosition(const Common::Point &pt);
|
||||
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class MazeUI3500 : public MazeUI {
|
||||
public:
|
||||
int16 cellFromX(int arg1);
|
||||
int16 cellFromY(int arg1);
|
||||
int getCellFromMapXY(Common::Point pt);
|
||||
bool setMazePosition2(Common::Point &p);
|
||||
};
|
||||
public:
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _outsideView;
|
||||
NamedHotspot _mapScreen;
|
||||
DirectionButton _pitchDown;
|
||||
DirectionButton _turnLeft;
|
||||
DirectionButton _pitchUp;
|
||||
DirectionButton _turnRight;
|
||||
// Glyph of vessel on top of the maze ui
|
||||
SceneActor _shuttle;
|
||||
SceneActor _verticalSpeedDisplay;
|
||||
SceneActor _horizontalSpeedDisplay;
|
||||
SceneActor _symbolVertical;
|
||||
SceneActor _symbolLeft;
|
||||
SceneActor _symbolRight;
|
||||
Throttle _throttle;
|
||||
SceneActor _tunnelVertCircle;
|
||||
SceneActor _tunnelHorzCircle;
|
||||
ASoundExt _aSound1;
|
||||
MazeUI3500 _mazeUI;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
int _moverVertX;
|
||||
int _moverHorzX;
|
||||
PaletteRotation *_rotation;
|
||||
int _mazeChangeAmount;
|
||||
int _speed;
|
||||
bool _updateIdxChangeFl;
|
||||
int _mazeDirection;
|
||||
int _nextMove;
|
||||
Common::Point _mazePosition;
|
||||
bool _postFixupFl;
|
||||
int _exitCounter;
|
||||
bool _directionChangesEnabled;
|
||||
|
||||
Scene3500();
|
||||
void doMovement(int id);
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3600 : public SceneExt {
|
||||
class Action3600: public ActionExt {
|
||||
public:
|
||||
bool _part2Fl;
|
||||
int _fadePct;
|
||||
|
||||
Action3600();
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
};
|
||||
class Action2: public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class LightShaft : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
class Protector : public SceneActorExt {
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
public:
|
||||
Action3600 _action1;
|
||||
Action2 _action2;
|
||||
SpeakerQuinn3600 _quinnSpeaker;
|
||||
SpeakerSeeker3600 _seekerSpeaker;
|
||||
SpeakerMiranda3600 _mirandaSpeaker;
|
||||
SpeakerTeal3600 _tealSpeaker;
|
||||
SpeakerProtector3600 _protectorSpeaker;
|
||||
NamedHotspot _background;
|
||||
NamedHotspot _console;
|
||||
NamedHotspot _tapestry1;
|
||||
NamedHotspot _tapestry2;
|
||||
LightShaft _lightShaft;
|
||||
SceneActor _protector3400;
|
||||
SceneActor _steppingDisk;
|
||||
SceneActor _consoleLights;
|
||||
SceneActor _webbster;
|
||||
SceneActor _teal;
|
||||
SceneActor _door3400;
|
||||
SceneActor _quinn;
|
||||
SceneActor _seeker;
|
||||
SceneActor _miranda;
|
||||
Protector _protector;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
SequenceManager _sequenceManager3;
|
||||
SequenceManager _sequenceManager4;
|
||||
ScenePalette _palette1;
|
||||
|
||||
bool _tealDead;
|
||||
bool _lightEntered;
|
||||
bool _ghoulTeleported;
|
||||
|
||||
Scene3600();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3700 : public SceneExt {
|
||||
public:
|
||||
SpeakerQuinn3700 _quinnSpeaker;
|
||||
SpeakerSeeker3700 _seekerSpeaker;
|
||||
SpeakerMiranda3700 _mirandaSpeaker;
|
||||
SceneActor _quinn;
|
||||
SceneActor _seeker;
|
||||
SceneActor _miranda;
|
||||
SceneActor _webbster;
|
||||
SceneActor _teleportPad;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene3800 : public SceneExt {
|
||||
class NorthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class EastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
public:
|
||||
SceneObject _balloon;
|
||||
SceneObject _harness;
|
||||
SceneActor _quinnShadow;
|
||||
NamedHotspot _background;
|
||||
NorthExit _northExit;
|
||||
EastExit _eastExit;
|
||||
SouthExit _southExit;
|
||||
WestExit _westExit;
|
||||
Rect _skylineRect;
|
||||
SequenceManager _sequenceManager1;
|
||||
|
||||
int _desertDirection;
|
||||
|
||||
Scene3800();
|
||||
void initExits();
|
||||
void enterArea();
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene3900 : public SceneExt {
|
||||
class NorthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class EastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
|
||||
class Exit5 : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
public:
|
||||
SceneActor _quinnShadow;
|
||||
NamedHotspot _background;
|
||||
NorthExit _northExit;
|
||||
EastExit _eastExit;
|
||||
SouthExit _southExit;
|
||||
WestExit _westExit;
|
||||
Exit5 _westEnterForest;
|
||||
Rect _skylineRect;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
3305
engines/tsage/ringworld2/ringworld2_speakers.cpp
Normal file
3305
engines/tsage/ringworld2/ringworld2_speakers.cpp
Normal file
File diff suppressed because it is too large
Load Diff
667
engines/tsage/ringworld2/ringworld2_speakers.h
Normal file
667
engines/tsage/ringworld2/ringworld2_speakers.h
Normal file
@@ -0,0 +1,667 @@
|
||||
/* 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 TSAGE_RINGWORLD2_SPEAKERS_H
|
||||
#define TSAGE_RINGWORLD2_SPEAKERS_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class VisualSpeaker : public Speaker {
|
||||
public:
|
||||
SceneActor _object1;
|
||||
SceneObject *_object2;
|
||||
int _speakerMode;
|
||||
int _fieldF8;
|
||||
int _displayMode;
|
||||
int _soundId;
|
||||
int _delayAmount;
|
||||
bool _removeObject;
|
||||
uint32 _frameNumber;
|
||||
int _numFrames;
|
||||
int _voiceDelayAmount;
|
||||
uint32 _voiceFrameNumber;
|
||||
private:
|
||||
void setFrame(int numFrames);
|
||||
void setVoiceFrame(int numFrames);
|
||||
public:
|
||||
VisualSpeaker();
|
||||
|
||||
Common::String getClassName() override { return "VisualSpeaker"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void setText(const Common::String &msg) override;
|
||||
virtual void animateSpeaker() {}
|
||||
void stopSpeaking() override;
|
||||
|
||||
void setDelay(int delay);
|
||||
};
|
||||
|
||||
class SpeakerGameText : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerGameText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerGameText"; }
|
||||
};
|
||||
|
||||
// Classes related to Captain
|
||||
|
||||
class SpeakerCaptain3210 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerCaptain3210();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCaptain3210"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Caretaker
|
||||
|
||||
class SpeakerCaretaker2450 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerCaretaker2450();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCaretaker2450"; }
|
||||
};
|
||||
|
||||
// Classes related to Chief
|
||||
|
||||
class SpeakerChief1100 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerChief1100();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerChief1100"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Guard
|
||||
|
||||
class SpeakerGuard : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerGuard();
|
||||
Common::String getClassName() override { return "SpeakerGuard"; }
|
||||
};
|
||||
|
||||
class SpeakerGuard2800 : public SpeakerGuard {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerGuard2800"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Jocko
|
||||
|
||||
class SpeakerJocko : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerJocko();
|
||||
Common::String getClassName() override { return "SpeakerJocko"; }
|
||||
};
|
||||
|
||||
class SpeakerJocko3200 : public SpeakerJocko {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerJocko3200"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerJocko3220 : public SpeakerJocko {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerJocko3220"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerJocko3230 : public SpeakerJocko {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerJocko3230"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Miranda
|
||||
|
||||
class SpeakerMiranda : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerMiranda();
|
||||
Common::String getClassName() override { return "SpeakerMiranda"; }
|
||||
};
|
||||
|
||||
class SpeakerMiranda300 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda300"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda1625 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda1625"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda3255 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda3255"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda3375 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda3375"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda3385 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda3385"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda3395 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda3395"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda3400 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda3400"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda3600 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda3600"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerMiranda3700 : public SpeakerMiranda {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerMiranda3700"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Nej
|
||||
|
||||
class SpeakerNej : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerNej();
|
||||
Common::String getClassName() override { return "SpeakerNej"; }
|
||||
};
|
||||
|
||||
class SpeakerNej2700 : public SpeakerNej {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerNej2700"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerNej2750 : public SpeakerNej {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerNej2750"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerNej2800 : public SpeakerNej {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerNej2800"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Pharisha
|
||||
|
||||
class SpeakerPharisha : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerPharisha();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerPharisha"; }
|
||||
};
|
||||
|
||||
class SpeakerPharisha2435 : public SpeakerPharisha {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerPharisha2435"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Private
|
||||
|
||||
class SpeakerPrivate3210 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerPrivate3210();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerPrivate3210"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Protector
|
||||
|
||||
class SpeakerProtector3600 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerProtector3600();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerProtector3600"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Quinn
|
||||
|
||||
class SpeakerQuinn : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerQuinn();
|
||||
Common::String getClassName() override { return "SpeakerQuinn"; }
|
||||
};
|
||||
|
||||
class SpeakerQuinn300 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn300"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn500 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn500"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn1100 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn1100"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn2435 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn2435"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn2450 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn2450"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn2700 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn2700"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn2750 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn2750"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn2800 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn2800"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn3255 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn3255"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn3375 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn3375"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn3385 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn3385"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn3395 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn3395"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn3400 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn3400"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn3600 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn3600"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerQuinn3700 : public SpeakerQuinn {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerQuinn3700"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to QuinnL
|
||||
|
||||
class SpeakerQuinnL : public SpeakerQuinn {
|
||||
public:
|
||||
SpeakerQuinnL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerQuinnL"; }
|
||||
};
|
||||
|
||||
// Classes related to Ralf
|
||||
|
||||
class SpeakerRalf3245 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerRalf3245();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerRalf3245"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Rocko
|
||||
|
||||
class SpeakerRocko : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerRocko();
|
||||
Common::String getClassName() override { return "SpeakerRocko"; }
|
||||
};
|
||||
|
||||
class SpeakerRocko3200 : public SpeakerRocko {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerRocko3200"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerRocko3220 : public SpeakerRocko {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerRocko3220"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerRocko3230 : public SpeakerRocko {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerRocko3230"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Seeker
|
||||
|
||||
class SpeakerSeeker : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerSeeker();
|
||||
Common::String getClassName() override { return "SpeakerSeeker"; }
|
||||
};
|
||||
|
||||
class SpeakerSeeker300 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker300"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker500 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker500"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker1100 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker1100"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker1900 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker1900"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker2435 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker2435"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker2450 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker2450"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker3375 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker3375"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker3385 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker3385"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker3395 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker3395"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker3400 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker3400"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker3600 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker3600"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSeeker3700 : public SpeakerSeeker {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerSeeker3700"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to SeekerL
|
||||
|
||||
class SpeakerSeekerL : public SpeakerSeeker {
|
||||
public:
|
||||
SpeakerSeekerL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerSeekerL"; }
|
||||
};
|
||||
|
||||
// Classes related to Socko
|
||||
|
||||
class SpeakerSocko3200 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerSocko3200();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerSocko3200"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Soldier
|
||||
|
||||
class SpeakerSoldier : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerSoldier(int color);
|
||||
Common::String getClassName() override { return "SpeakerSoldier"; }
|
||||
};
|
||||
|
||||
class SpeakerSoldier300 : public SpeakerSoldier {
|
||||
public:
|
||||
SpeakerSoldier300() : SpeakerSoldier(60) {}
|
||||
Common::String getClassName() override { return "SpeakerSoldier300"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerSoldier1625 : public SpeakerSoldier {
|
||||
public:
|
||||
SpeakerSoldier1625() : SpeakerSoldier(5) {}
|
||||
Common::String getClassName() override { return "SpeakerSoldier1625"; }
|
||||
};
|
||||
|
||||
// Classes related to Teal
|
||||
|
||||
class SpeakerTeal : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerTeal();
|
||||
Common::String getClassName() override { return "SpeakerTeal"; }
|
||||
};
|
||||
|
||||
class SpeakerTealMode7 : public SpeakerTeal {
|
||||
public:
|
||||
SpeakerTealMode7();
|
||||
Common::String getClassName() override { return "SpeakerTealMode7"; }
|
||||
};
|
||||
|
||||
class SpeakerTeal180 : public SpeakerTeal {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerTeal180"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerTeal300 : public SpeakerTeal {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerTeal300"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerTeal1625 : public SpeakerTeal {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerTeal1625"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerTeal3240 : public SpeakerTeal {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerTeal3240"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerTeal3400 : public SpeakerTeal {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerTeal3400"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerTeal3600 : public SpeakerTealMode7 {
|
||||
public:
|
||||
Common::String getClassName() override { return "SpeakerTeal3600"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Tomko
|
||||
|
||||
class SpeakerTomko3245 : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerTomko3245();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerTomko3245"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
// Classes related to Webbster
|
||||
|
||||
class SpeakerWebbster : public VisualSpeaker {
|
||||
public:
|
||||
SpeakerWebbster(int color);
|
||||
Common::String getClassName() override { return "SpeakerWebbster"; }
|
||||
};
|
||||
|
||||
class SpeakerWebbster180 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster180() : SpeakerWebbster(27) {}
|
||||
Common::String getClassName() override { return "SpeakerWebbster180"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerWebbster2500 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster2500() : SpeakerWebbster(27) {}
|
||||
Common::String getClassName() override { return "SpeakerWebbster2500"; }
|
||||
};
|
||||
|
||||
class SpeakerWebbster3240 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster3240() : SpeakerWebbster(10) {}
|
||||
|
||||
Common::String getClassName() override { return "SpeakerWebbster3240"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerWebbster3375 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster3375() : SpeakerWebbster(60) {}
|
||||
|
||||
Common::String getClassName() override { return "SpeakerWebbster3375"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerWebbster3385 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster3385() : SpeakerWebbster(60) {}
|
||||
|
||||
Common::String getClassName() override { return "SpeakerWebbster3385"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerWebbster3395 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster3395() : SpeakerWebbster(60) {}
|
||||
|
||||
Common::String getClassName() override { return "SpeakerWebbster3395"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerWebbster3400 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster3400() : SpeakerWebbster(27) {}
|
||||
|
||||
Common::String getClassName() override { return "SpeakerWebbster3400"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
class SpeakerDutyOfficer180: public VisualSpeaker {
|
||||
public:
|
||||
SpeakerDutyOfficer180();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerDutyOfficer"; }
|
||||
void animateSpeaker() override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
1820
engines/tsage/ringworld2/ringworld2_vampire.cpp
Normal file
1820
engines/tsage/ringworld2/ringworld2_vampire.cpp
Normal file
File diff suppressed because it is too large
Load Diff
178
engines/tsage/ringworld2/ringworld2_vampire.h
Normal file
178
engines/tsage/ringworld2/ringworld2_vampire.h
Normal file
@@ -0,0 +1,178 @@
|
||||
/* 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 TSAGE_RINGWORLD2_VAMPIRE_H
|
||||
#define TSAGE_RINGWORLD2_VAMPIRE_H
|
||||
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
#include "tsage/ringworld2/ringworld2_logic.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld2 {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene1950 : public SceneExt {
|
||||
/* Windows */
|
||||
class KeypadWindow: public ModalWindow {
|
||||
public:
|
||||
class KeypadButton : public SceneActor {
|
||||
public:
|
||||
int _buttonIndex;
|
||||
bool _pressed;
|
||||
bool _toggled;
|
||||
|
||||
KeypadButton();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void init(int indx);
|
||||
void process(Event &event) override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
SceneActor _areaActor;
|
||||
KeypadButton _buttons[16];
|
||||
|
||||
int _buttonIndex;
|
||||
|
||||
KeypadWindow();
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY) override;
|
||||
void setup3(int resNum, int lookLineNum, int talkLineNum, int useLineNum) override;
|
||||
};
|
||||
|
||||
class Keypad : public NamedHotspot {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Actors */
|
||||
class Door : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Scrolls : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Gem : public SceneActor {
|
||||
public:
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
class Vampire : public SceneActor {
|
||||
public:
|
||||
Common::Point _deadPosition;
|
||||
int _deltaX;
|
||||
int _deltaY;
|
||||
int _vampireMode;
|
||||
|
||||
Vampire();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void signal() override;
|
||||
bool startAction(CursorType action, Event &event) override;
|
||||
};
|
||||
|
||||
/* Exits */
|
||||
class NorthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class UpExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class EastExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class DownExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class SouthExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class WestExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class ShaftExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
class DoorExit : public SceneExit {
|
||||
public:
|
||||
void changeScene() override;
|
||||
};
|
||||
private:
|
||||
void initArea();
|
||||
void enterArea();
|
||||
void doButtonPress(int indx);
|
||||
public:
|
||||
NamedHotspot _background;
|
||||
Keypad _keypad;
|
||||
SceneActor _southDoorway;
|
||||
SceneObject _northDoorway;
|
||||
Door _door;
|
||||
Scrolls _scrolls;
|
||||
SceneActor _containmentField;
|
||||
Gem _gem;
|
||||
SceneActor _cube;
|
||||
SceneActor _pulsingLights;
|
||||
Vampire _vampire;
|
||||
KeypadWindow _KeypadWindow;
|
||||
NorthExit _northExit;
|
||||
UpExit _upExit;
|
||||
EastExit _eastExit;
|
||||
DownExit _downExit;
|
||||
SouthExit _southExit;
|
||||
WestExit _westExit;
|
||||
ShaftExit _shaftExit;
|
||||
DoorExit _doorExit;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
bool _upExitStyle;
|
||||
bool _removeFlag;
|
||||
bool _vampireActive;
|
||||
Common::Point _vampireDestPos;
|
||||
int _vampireIndex;
|
||||
|
||||
Scene1950();
|
||||
void synchronize(Serializer &s) override;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld2
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user