Initial commit
This commit is contained in:
128
engines/tsage/ringworld/ringworld_demo.cpp
Normal file
128
engines/tsage/ringworld/ringworld_demo.cpp
Normal file
@@ -0,0 +1,128 @@
|
||||
/* 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/ringworld/ringworld_demo.h"
|
||||
#include "tsage/dialogs.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/tsage.h"
|
||||
#include "tsage/staticres.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
void RingworldDemoGame::start() {
|
||||
// Start the demo's single scene
|
||||
g_globals->_sceneManager.changeScene(1);
|
||||
|
||||
g_globals->_events.setCursor(CURSOR_NONE);
|
||||
}
|
||||
|
||||
Scene *RingworldDemoGame::createScene(int sceneNumber) {
|
||||
// The demo only has a single scene, so ignore the scene number and always return it
|
||||
return new RingworldDemoScene();
|
||||
}
|
||||
|
||||
bool RingworldDemoGame::canLoadGameStateCurrently() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RingworldDemoGame::canSaveGameStateCurrently() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void RingworldDemoGame::quitGame() {
|
||||
if (MessageDialog::show(DEMO_EXIT_MSG, EXIT_BTN_STRING, DEMO_BTN_STRING) == 0)
|
||||
g_vm->quitGame();
|
||||
}
|
||||
|
||||
void RingworldDemoGame::pauseGame() {
|
||||
g_globals->_events.setCursor(CURSOR_ARROW);
|
||||
MessageDialog *dlg = new MessageDialog(DEMO_PAUSED_MSG, EXIT_BTN_STRING, DEMO_RESUME_BTN_STRING);
|
||||
dlg->draw();
|
||||
|
||||
GfxButton *selectedButton = dlg->execute(&dlg->_btn2);
|
||||
bool exitFlag = selectedButton != &dlg->_btn2;
|
||||
|
||||
delete dlg;
|
||||
g_globals->_events.hideCursor();
|
||||
|
||||
if (exitFlag)
|
||||
g_vm->quitGame();
|
||||
}
|
||||
|
||||
void RingworldDemoGame::processEvent(Event &event) {
|
||||
if (event.eventType == EVENT_CUSTOM_ACTIONSTART) {
|
||||
switch (event.customType) {
|
||||
case kActionHelp:
|
||||
// F1 - Help
|
||||
MessageDialog::show(DEMO_HELP_MSG, OK_BTN_STRING);
|
||||
break;
|
||||
|
||||
case kActionSoundOptions: {
|
||||
// F2 - Sound Options
|
||||
SoundDialog::execute();
|
||||
break;
|
||||
}
|
||||
|
||||
case kActionQuitGame:
|
||||
// F3 - Quit
|
||||
quitGame();
|
||||
event.handled = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (event.eventType == EVENT_BUTTON_DOWN) {
|
||||
pauseGame();
|
||||
event.handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Ringworld Demo scene
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void RingworldDemoScene::postInit(SceneObjectList *OwnerList) {
|
||||
signal();
|
||||
}
|
||||
|
||||
void RingworldDemoScene::signal() {
|
||||
_soundHandler.play(4);
|
||||
_actor1.postInit();
|
||||
_actor2.postInit();
|
||||
_actor3.postInit();
|
||||
_actor4.postInit();
|
||||
_actor5.postInit();
|
||||
_actor6.postInit();
|
||||
|
||||
setAction(&_sequenceManager, this, 22, &_actor1, &_actor2, &_actor3, &_actor4, &_actor5, &_actor6, NULL);
|
||||
}
|
||||
|
||||
void RingworldDemoScene::process(Event &event) {
|
||||
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
66
engines/tsage/ringworld/ringworld_demo.h
Normal file
66
engines/tsage/ringworld/ringworld_demo.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* 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_RINGWORLD_DEMO_H
|
||||
#define TSAGE_RINGWORLD_DEMO_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
#include "tsage/sound.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class RingworldDemoGame: public Game {
|
||||
private:
|
||||
void pauseGame();
|
||||
public:
|
||||
void start() override;
|
||||
Scene *createScene(int sceneNumber) override;
|
||||
void quitGame() override;
|
||||
void processEvent(Event &event) override;
|
||||
bool canSaveGameStateCurrently() override;
|
||||
bool canLoadGameStateCurrently() override;
|
||||
};
|
||||
|
||||
class RingworldDemoScene: public Scene {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _actor1, _actor2, _actor3;
|
||||
SceneObject _actor4, _actor5, _actor6;
|
||||
ASound _soundHandler;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void process(Event &event) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
515
engines/tsage/ringworld/ringworld_dialogs.cpp
Normal file
515
engines/tsage/ringworld/ringworld_dialogs.cpp
Normal file
@@ -0,0 +1,515 @@
|
||||
/* 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/ringworld/ringworld_dialogs.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define BUTTON_WIDTH 28
|
||||
#define BUTTON_HEIGHT 29
|
||||
|
||||
RightClickButton::RightClickButton(int buttonIndex, int xp, int yp) : GfxButton() {
|
||||
_buttonIndex = buttonIndex;
|
||||
this->_bounds.left = xp;
|
||||
this->_bounds.top = yp;
|
||||
this->_bounds.setWidth(BUTTON_WIDTH);
|
||||
this->_bounds.setHeight(BUTTON_HEIGHT);
|
||||
_savedButton = NULL;
|
||||
}
|
||||
|
||||
void RightClickButton::highlight() {
|
||||
if (_savedButton) {
|
||||
// Button was previously highlighted, so de-highlight by restoring saved area
|
||||
g_globals->gfxManager().copyFrom(*_savedButton, _bounds.left, _bounds.top);
|
||||
delete _savedButton;
|
||||
_savedButton = NULL;
|
||||
} else {
|
||||
// Highlight button by getting the needed highlighted image resource
|
||||
_savedButton = surfaceGetArea(g_globals->gfxManager().getSurface(), _bounds);
|
||||
|
||||
uint size;
|
||||
byte *imgData = g_resourceManager->getSubResource(7, 2, _buttonIndex, &size);
|
||||
|
||||
GfxSurface btnSelected = surfaceFromRes(imgData);
|
||||
g_globals->gfxManager().copyFrom(btnSelected, _bounds.left, _bounds.top);
|
||||
|
||||
DEALLOCATE(imgData);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* This dialog implements the right-click dialog
|
||||
*/
|
||||
RightClickDialog::RightClickDialog() : GfxDialog(),
|
||||
_walkButton(1, 48, 12), _lookButton(2, 31, 29), _useButton(3, 65, 29),
|
||||
_talkButton(4, 14, 47), _inventoryButton(5, 48, 47), _optionsButton(6, 83, 47) {
|
||||
Rect rectArea, dialogRect;
|
||||
|
||||
// Set the palette and change the cursor
|
||||
_gfxManager.setDialogPalette();
|
||||
g_globals->_events.setCursor(CURSOR_ARROW);
|
||||
|
||||
// Get the dialog image
|
||||
_surface = surfaceFromRes(7, 1, 1);
|
||||
|
||||
// Set the dialog position
|
||||
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;
|
||||
|
||||
_highlightedButton = NULL;
|
||||
_selectedAction = -1;
|
||||
}
|
||||
|
||||
RightClickDialog::~RightClickDialog() {
|
||||
}
|
||||
|
||||
RightClickButton *RightClickDialog::findButton(const Common::Point &pt) {
|
||||
RightClickButton *btnList[] = { &_walkButton, &_lookButton, &_useButton, &_talkButton, &_inventoryButton, &_optionsButton };
|
||||
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
btnList[i]->_owner = this;
|
||||
|
||||
if (btnList[i]->_bounds.contains(pt))
|
||||
return btnList[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
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
|
||||
RightClickButton *btn = findButton(event.mousePos);
|
||||
|
||||
if (btn != _highlightedButton) {
|
||||
// De-highlight any previously selected button
|
||||
if (_highlightedButton) {
|
||||
_highlightedButton->highlight();
|
||||
_highlightedButton = NULL;
|
||||
}
|
||||
if (btn) {
|
||||
// Highlight the new button
|
||||
btn->highlight();
|
||||
_highlightedButton = btn;
|
||||
}
|
||||
}
|
||||
event.handled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
case EVENT_BUTTON_DOWN:
|
||||
// If a button is highlighted, then flag the selected button index
|
||||
if (_highlightedButton)
|
||||
_selectedAction = _highlightedButton->_buttonIndex;
|
||||
else
|
||||
_selectedAction = _lookButton._buttonIndex;
|
||||
event.handled = true;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void 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();
|
||||
}
|
||||
|
||||
_gfxManager.deactivate();
|
||||
|
||||
// Execute the specified action
|
||||
switch (_selectedAction) {
|
||||
case 1:
|
||||
// Look action
|
||||
g_globals->_events.setCursor(CURSOR_LOOK);
|
||||
break;
|
||||
case 2:
|
||||
// Walk action
|
||||
g_globals->_events.setCursor(CURSOR_WALK);
|
||||
break;
|
||||
case 3:
|
||||
// Use cursor
|
||||
g_globals->_events.setCursor(CURSOR_USE);
|
||||
break;
|
||||
case 4:
|
||||
// Talk cursor
|
||||
g_globals->_events.setCursor(CURSOR_TALK);
|
||||
break;
|
||||
case 5:
|
||||
// Inventory dialog
|
||||
InventoryDialog::show();
|
||||
break;
|
||||
case 6:
|
||||
// Dialog options
|
||||
Ringworld::OptionsDialog::show();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void OptionsDialog::show() {
|
||||
OptionsDialog *dlg = new OptionsDialog();
|
||||
dlg->draw();
|
||||
|
||||
GfxButton *btn = dlg->execute();
|
||||
|
||||
if (btn == &dlg->_btnQuit) {
|
||||
// Quit game
|
||||
int rc;
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
rc = MessageDialog::show(ESP_QUIT_CONFIRM_1_MSG, ESP_CANCEL_BTN_STRING, ESP_QUIT_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
rc = MessageDialog::show(RUS_QUIT_CONFIRM_MSG, RUS_CANCEL_BTN_STRING, RUS_QUIT_BTN_STRING);
|
||||
} else {
|
||||
rc = MessageDialog::show(QUIT_CONFIRM_MSG, CANCEL_BTN_STRING, QUIT_BTN_STRING);
|
||||
}
|
||||
if (rc == 1) {
|
||||
g_vm->quitGame();
|
||||
}
|
||||
} else if (btn == &dlg->_btnRestart) {
|
||||
// Restart game
|
||||
g_globals->_game->restartGame();
|
||||
} else if (btn == &dlg->_btnSound) {
|
||||
// Sound dialog
|
||||
SoundDialog::execute();
|
||||
} else if (btn == &dlg->_btnSave) {
|
||||
// Save button
|
||||
g_globals->_game->saveGame();
|
||||
} else if (btn == &dlg->_btnRestore) {
|
||||
// Restore button
|
||||
g_globals->_game->restoreGame();
|
||||
}
|
||||
|
||||
dlg->remove();
|
||||
delete dlg;
|
||||
}
|
||||
|
||||
OptionsDialog::OptionsDialog() {
|
||||
// Set the element text
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
_gfxMessage.set(ESP_OPTIONS_MSG, 140, ALIGN_LEFT);
|
||||
_btnRestore.setText(ESP_RESTORE_BTN_STRING);
|
||||
_btnSave.setText(ESP_SAVE_BTN_STRING);
|
||||
_btnRestart.setText(ESP_RESTART_BTN_1_STRING);
|
||||
_btnQuit.setText(ESP_QUIT_BTN_STRING);
|
||||
_btnSound.setText(ESP_SOUND_BTN_STRING);
|
||||
_btnResume.setText(ESP_RESUME_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
_gfxMessage.set(RUS_OPTIONS_MSG, 140, ALIGN_LEFT);
|
||||
_btnRestore.setText(RUS_RESTORE_BTN_STRING);
|
||||
_btnSave.setText(RUS_SAVE_BTN_STRING);
|
||||
_btnRestart.setText(RUS_RESTART_BTN_STRING);
|
||||
_btnQuit.setText(RUS_QUIT_BTN_STRING);
|
||||
_btnSound.setText(RUS_SOUND_BTN_STRING);
|
||||
_btnResume.setText(RUS_RESUME_BTN_STRING);
|
||||
} else {
|
||||
_gfxMessage.set(OPTIONS_MSG, 140, ALIGN_LEFT);
|
||||
_btnRestore.setText(RESTORE_BTN_STRING);
|
||||
_btnSave.setText(SAVE_BTN_STRING);
|
||||
_btnRestart.setText(RESTART_BTN_STRING);
|
||||
_btnQuit.setText(QUIT_BTN_STRING);
|
||||
_btnSound.setText(SOUND_BTN_STRING);
|
||||
_btnResume.setText(RESUME_BTN_STRING);
|
||||
}
|
||||
|
||||
// Set position of the elements
|
||||
_gfxMessage._bounds.moveTo(0, 1);
|
||||
_btnRestore._bounds.moveTo(0, _gfxMessage._bounds.bottom + 1);
|
||||
_btnSave._bounds.moveTo(0, _btnRestore._bounds.bottom + 1);
|
||||
_btnRestart._bounds.moveTo(0, _btnSave._bounds.bottom + 1);
|
||||
_btnQuit._bounds.moveTo(0, _btnRestart._bounds.bottom + 1);
|
||||
_btnSound._bounds.moveTo(0, _btnQuit._bounds.bottom + 1);
|
||||
_btnResume._bounds.moveTo(0, _btnSound._bounds.bottom + 1);
|
||||
|
||||
// Set all the buttons to the widest button
|
||||
GfxButton *btnList[6] = {&_btnRestore, &_btnSave, &_btnRestart, &_btnQuit, &_btnSound, &_btnResume};
|
||||
int16 btnWidth = 0;
|
||||
for (int idx = 0; idx < 6; ++idx)
|
||||
btnWidth = MAX(btnWidth, btnList[idx]->_bounds.width());
|
||||
for (int idx = 0; idx < 6; ++idx)
|
||||
btnList[idx]->_bounds.setWidth(btnWidth);
|
||||
|
||||
// Add the items to the dialog
|
||||
addElements(&_gfxMessage, &_btnRestore, &_btnSave, &_btnRestart, &_btnQuit, &_btnSound, &_btnResume, NULL);
|
||||
|
||||
// Set the dialog size and position
|
||||
frame();
|
||||
setCenter(160, 100);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
bool GfxInvImage::process(Event &event) {
|
||||
if (!event.handled && (event.eventType == EVENT_BUTTON_DOWN)) {
|
||||
event.handled = _bounds.contains(event.mousePos);
|
||||
return event.handled;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void InventoryDialog::show() {
|
||||
// Determine how many items are in the player's inventory
|
||||
int itemCount = 0;
|
||||
SynchronizedList<InvObject *>::iterator i;
|
||||
for (i = RING_INVENTORY._itemList.begin(); i != RING_INVENTORY._itemList.end(); ++i) {
|
||||
if ((*i)->inInventory())
|
||||
++itemCount;
|
||||
}
|
||||
|
||||
if (itemCount == 0) {
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
MessageDialog::show(ESP_INV_EMPTY_MSG, ESP_OK_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
MessageDialog::show(RUS_INV_EMPTY_MSG, RUS_OK_BTN_STRING);
|
||||
} else {
|
||||
MessageDialog::show(INV_EMPTY_MSG, OK_BTN_STRING);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
InventoryDialog *dlg = new InventoryDialog();
|
||||
dlg->draw();
|
||||
dlg->execute();
|
||||
delete dlg;
|
||||
}
|
||||
|
||||
InventoryDialog::InventoryDialog() {
|
||||
// Determine the maximum size of the image of any item in the player's inventory
|
||||
int imgWidth = 0, imgHeight = 0;
|
||||
|
||||
SynchronizedList<InvObject *>::iterator i;
|
||||
for (i = RING_INVENTORY._itemList.begin(); i != RING_INVENTORY._itemList.end(); ++i) {
|
||||
InvObject *invObject = *i;
|
||||
if (invObject->inInventory()) {
|
||||
// Get the image for the item
|
||||
GfxSurface itemSurface = surfaceFromRes(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum);
|
||||
|
||||
// Maintain the dimensions of the largest item image
|
||||
imgWidth = MAX(imgWidth, (int)itemSurface.getBounds().width());
|
||||
imgHeight = MAX(imgHeight, (int)itemSurface.getBounds().height());
|
||||
|
||||
// Add the item to the display list
|
||||
GfxInvImage *img = new GfxInvImage();
|
||||
_images.push_back(img);
|
||||
img->setDetails(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum);
|
||||
img->_invObject = invObject;
|
||||
add(img);
|
||||
}
|
||||
}
|
||||
assert(_images.size() > 0);
|
||||
|
||||
// Figure out the number of columns/rows to show all the items
|
||||
int cellsSize = 3;
|
||||
while ((cellsSize * cellsSize) < (int)_images.size())
|
||||
++cellsSize;
|
||||
|
||||
// Set the position of each inventory item to be displayed
|
||||
int cellX = 0;
|
||||
Common::Point pt(0, 0);
|
||||
|
||||
for (uint idx = 0; idx < _images.size(); ++idx) {
|
||||
if (cellX == cellsSize) {
|
||||
// Move to the start of the next line
|
||||
pt.x = 0;
|
||||
pt.y += imgHeight + 2;
|
||||
cellX = 0;
|
||||
}
|
||||
|
||||
_images[idx]->_bounds.moveTo(pt.x, pt.y);
|
||||
|
||||
pt.x += imgWidth + 2;
|
||||
++cellX;
|
||||
}
|
||||
|
||||
// Set up the buttons
|
||||
pt.y += imgHeight + 2;
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
_btnOk.setText(ESP_OK_BTN_STRING);
|
||||
_btnLook.setText(ESP_LOOK_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
_btnOk.setText(RUS_OK_BTN_STRING);
|
||||
_btnLook.setText(RUS_LOOK_BTN_STRING);
|
||||
} else {
|
||||
_btnOk.setText(OK_BTN_STRING);
|
||||
_btnLook.setText(LOOK_BTN_STRING);
|
||||
}
|
||||
_btnOk._bounds.moveTo((imgWidth + 2) * cellsSize - _btnOk._bounds.width(), pt.y);
|
||||
_btnLook._bounds.moveTo(_btnOk._bounds.left - _btnLook._bounds.width() - 2, _btnOk._bounds.top);
|
||||
addElements(&_btnLook, &_btnOk, NULL);
|
||||
|
||||
frame();
|
||||
setCenter(SCREEN_CENTER_X, SCREEN_CENTER_Y);
|
||||
}
|
||||
|
||||
InventoryDialog::~InventoryDialog() {
|
||||
for (uint idx = 0; idx < _images.size(); ++idx)
|
||||
delete _images[idx];
|
||||
}
|
||||
|
||||
void InventoryDialog::execute() {
|
||||
if ((RING_INVENTORY._selectedItem) && RING_INVENTORY._selectedItem->inInventory())
|
||||
RING_INVENTORY._selectedItem->setCursor();
|
||||
|
||||
bool lookFlag = false;
|
||||
_gfxManager.activate();
|
||||
|
||||
while (!g_vm->shouldQuit()) {
|
||||
// Get events
|
||||
Event event;
|
||||
while (!g_globals->_events.getEvent(event) && !g_vm->shouldQuit()) {
|
||||
g_system->delayMillis(10);
|
||||
GLOBALS._screen.update();
|
||||
}
|
||||
if (g_vm->shouldQuit())
|
||||
break;
|
||||
|
||||
GfxElement *hiliteObj = nullptr;
|
||||
if ((event.eventType == EVENT_BUTTON_DOWN) && !_bounds.contains(event.mousePos))
|
||||
break;
|
||||
|
||||
// Pass event to elements
|
||||
event.mousePos.x -= _gfxManager._bounds.left;
|
||||
event.mousePos.y -= _gfxManager._bounds.top;
|
||||
|
||||
for (GfxElementList::iterator i = _elements.begin(); i != _elements.end(); ++i) {
|
||||
if ((*i)->process(event))
|
||||
hiliteObj = *i;
|
||||
}
|
||||
|
||||
if (!event.handled && (event.eventType == EVENT_CUSTOM_ACTIONSTART)) {
|
||||
if ((event.customType == kActionReturn) || (event.customType == kActionEscape)) {
|
||||
// Exit the dialog
|
||||
//hiliteObj = &_btnOk;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hiliteObj == &_btnOk) {
|
||||
// Ok button clicked
|
||||
if (lookFlag)
|
||||
g_globals->_events.setCursor(CURSOR_WALK);
|
||||
break;
|
||||
} else if (hiliteObj == &_btnLook) {
|
||||
// Look button clicked
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
if (_btnLook._message == ESP_LOOK_BTN_STRING) {
|
||||
_btnLook._message = ESP_PICK_BTN_STRING;
|
||||
lookFlag = 1;
|
||||
g_globals->_events.setCursor(CURSOR_LOOK);
|
||||
} else {
|
||||
_btnLook._message = ESP_LOOK_BTN_STRING;
|
||||
lookFlag = 0;
|
||||
g_globals->_events.setCursor(CURSOR_WALK);
|
||||
}
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
if (_btnLook._message == RUS_LOOK_BTN_STRING) {
|
||||
_btnLook._message = RUS_PICK_BTN_STRING;
|
||||
lookFlag = 1;
|
||||
g_globals->_events.setCursor(CURSOR_LOOK);
|
||||
} else {
|
||||
_btnLook._message = RUS_LOOK_BTN_STRING;
|
||||
lookFlag = 0;
|
||||
g_globals->_events.setCursor(CURSOR_WALK);
|
||||
}
|
||||
} else {
|
||||
if (_btnLook._message == LOOK_BTN_STRING) {
|
||||
_btnLook._message = PICK_BTN_STRING;
|
||||
lookFlag = 1;
|
||||
g_globals->_events.setCursor(CURSOR_LOOK);
|
||||
} else {
|
||||
_btnLook._message = LOOK_BTN_STRING;
|
||||
lookFlag = 0;
|
||||
g_globals->_events.setCursor(CURSOR_WALK);
|
||||
}
|
||||
}
|
||||
|
||||
hiliteObj->draw();
|
||||
} else if (hiliteObj) {
|
||||
// Inventory item selected
|
||||
InvObject *invObject = static_cast<GfxInvImage *>(hiliteObj)->_invObject;
|
||||
if (lookFlag) {
|
||||
g_globals->_screen.displayText(invObject->_description);
|
||||
} else {
|
||||
RING_INVENTORY._selectedItem = invObject;
|
||||
invObject->setCursor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_gfxManager.deactivate();
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
108
engines/tsage/ringworld/ringworld_dialogs.h
Normal file
108
engines/tsage/ringworld/ringworld_dialogs.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/* 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_RINGWORLD_DIALOGS_H
|
||||
#define TSAGE_RINGWORLD_DIALOGS_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 Ringworld {
|
||||
|
||||
class RightClickButton : public GfxButton {
|
||||
private:
|
||||
GfxSurface *_savedButton;
|
||||
public:
|
||||
int _buttonIndex;
|
||||
|
||||
RightClickButton(int buttonIndex, int xp, int yp);
|
||||
~RightClickButton() override { delete _savedButton; }
|
||||
|
||||
void highlight() override;
|
||||
};
|
||||
|
||||
class RightClickDialog : public GfxDialog {
|
||||
private:
|
||||
GfxSurface _surface;
|
||||
RightClickButton *_highlightedButton;
|
||||
int _selectedAction;
|
||||
RightClickButton _walkButton, _lookButton, _useButton, _talkButton, _inventoryButton, _optionsButton;
|
||||
|
||||
RightClickButton *findButton(const Common::Point &pt);
|
||||
public:
|
||||
RightClickDialog();
|
||||
~RightClickDialog() override;
|
||||
|
||||
void draw() override;
|
||||
bool process(Event &event) override;
|
||||
void execute();
|
||||
};
|
||||
|
||||
class OptionsDialog : public ModalDialog {
|
||||
private:
|
||||
GfxButton _btnSave, _btnRestore, _btnRestart;
|
||||
GfxButton _btnQuit, _btnResume;
|
||||
GfxButton _btnSound;
|
||||
GfxMessage _gfxMessage;
|
||||
public:
|
||||
OptionsDialog();
|
||||
~OptionsDialog() override {}
|
||||
GfxButton *execute() { return GfxDialog::execute(&_btnResume); }
|
||||
|
||||
static void show();
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
class GfxInvImage : public GfxImage {
|
||||
public:
|
||||
InvObject *_invObject;
|
||||
public:
|
||||
GfxInvImage() : GfxImage(), _invObject(NULL) {}
|
||||
|
||||
bool process(Event &event) override;
|
||||
};
|
||||
|
||||
#define MAX_INVOBJECT_DISPLAY 20
|
||||
|
||||
class InventoryDialog : public ModalDialog {
|
||||
private:
|
||||
Common::Array<GfxInvImage *> _images;
|
||||
GfxButton _btnOk, _btnLook;
|
||||
public:
|
||||
InventoryDialog();
|
||||
~InventoryDialog() override;
|
||||
void execute();
|
||||
|
||||
static void show();
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
677
engines/tsage/ringworld/ringworld_logic.cpp
Normal file
677
engines/tsage/ringworld/ringworld_logic.cpp
Normal file
@@ -0,0 +1,677 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/tsage.h"
|
||||
#include "tsage/staticres.h"
|
||||
#include "tsage/ringworld/ringworld_demo.h"
|
||||
#include "tsage/ringworld/ringworld_dialogs.h"
|
||||
#include "tsage/ringworld/ringworld_scenes1.h"
|
||||
#include "tsage/ringworld/ringworld_scenes2.h"
|
||||
#include "tsage/ringworld/ringworld_scenes3.h"
|
||||
#include "tsage/ringworld/ringworld_scenes4.h"
|
||||
#include "tsage/ringworld/ringworld_scenes5.h"
|
||||
#include "tsage/ringworld/ringworld_scenes6.h"
|
||||
#include "tsage/ringworld/ringworld_scenes8.h"
|
||||
#include "tsage/ringworld/ringworld_scenes10.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
Scene *RingworldGame::createScene(int sceneNumber) {
|
||||
switch (sceneNumber) {
|
||||
/* Scene group 1 */
|
||||
// Kziniti Palace (Introduction)
|
||||
case 10: return new Scene10();
|
||||
// Outer Space (Introduction)
|
||||
case 15: return new Scene15();
|
||||
// Cut-scenes for Ch'mee house in distance
|
||||
case 20: return new Scene20();
|
||||
// Outside Ch'mee residence
|
||||
case 30: return new Scene30();
|
||||
// Chmeee Home
|
||||
case 40: return new Scene40();
|
||||
// By Flycycles
|
||||
case 50: return new Scene50();
|
||||
// Flycycle controls
|
||||
case 60: return new Scene60();
|
||||
// Shipyard Entrance
|
||||
case 90: return new Scene90();
|
||||
// Ship Close-up
|
||||
case 95: return new Scene95();
|
||||
// Sunflower navigation sequence
|
||||
case 6100: return new Scene6100();
|
||||
|
||||
/* Scene group 2 */
|
||||
// Title screen
|
||||
case 1000: return new Scene1000();
|
||||
// Fleeing planet cutscene
|
||||
case 1001: return new Scene1001();
|
||||
// Unused
|
||||
case 1250: return new Scene1250();
|
||||
// Ringworld Wall
|
||||
case 1400: return new Scene1400();
|
||||
// Ringworld Space-port
|
||||
case 1500: return new Scene1500();
|
||||
|
||||
/* Scene group 3 - Part #1 */
|
||||
// Cockpit cutscenes
|
||||
case 2000: return new Scene2000();
|
||||
// Starcraft - Cockpit
|
||||
case 2100: return new Scene2100();
|
||||
// Encyclopedia
|
||||
case 2120: return new Scene2120();
|
||||
// Starcraft - Level 2
|
||||
case 2150: return new Scene2150();
|
||||
// Starcraft - AutoDoc
|
||||
case 2200: return new Scene2200();
|
||||
// Stasis Field Map
|
||||
case 2222: return new Scene2222();
|
||||
// Starcraft - Quinn's Room
|
||||
case 2230: return new Scene2230();
|
||||
|
||||
/* Scene group 3 - Part #2 */
|
||||
// Starcraft - Storage Room
|
||||
case 2280: return new Scene2280();
|
||||
// Starcraft - Hanger Bay
|
||||
case 2300: return new Scene2300();
|
||||
// Starcraft - Copy Protection Screen
|
||||
case 2310: return new Scene2310();
|
||||
// Starcraft - Lander Bay
|
||||
case 2320: return new Scene2320();
|
||||
// Scene 2400 - Descending in Lander
|
||||
case 2400: return new Scene2400();
|
||||
|
||||
/* Scene group 4 */
|
||||
// Ringworld Scan
|
||||
case 3500: return new Scene3500();
|
||||
// Remote Viewer
|
||||
case 3700: return new Scene3700();
|
||||
|
||||
/* Scene group 5 */
|
||||
// Village
|
||||
case 4000: return new Scene4000();
|
||||
// Village - Outside Lander
|
||||
case 4010: return new Scene4010();
|
||||
// Village - Puzzle Board
|
||||
case 4025: return new Scene4025();
|
||||
// Village - Temple Antechamber
|
||||
case 4045: return new Scene4045();
|
||||
// Village - Temple
|
||||
case 4050: return new Scene4050();
|
||||
// Village - Hut
|
||||
case 4100: return new Scene4100();
|
||||
// Village - Bedroom
|
||||
case 4150: return new Scene4150();
|
||||
// Village - Near Slaver Ship
|
||||
case 4250: return new Scene4250();
|
||||
// Village - Slaver Ship
|
||||
case 4300: return new Scene4300();
|
||||
// Village - Slaver Ship Keypad
|
||||
case 4301: return new Scene4301();
|
||||
|
||||
/* Scene group 6 */
|
||||
// Caverns - Entrance
|
||||
case 5000: return new Scene5000();
|
||||
// Caverns
|
||||
case 5100: return new Scene5100();
|
||||
// Caverns - Throne-room
|
||||
case 5200: return new Scene5200();
|
||||
// Caverns - Pit
|
||||
case 5300: return new Scene5300();
|
||||
|
||||
/* Scene group 8 */
|
||||
// Landing near beach
|
||||
case 7000: return new Scene7000();
|
||||
// Underwater: swimming
|
||||
case 7100: return new Scene7100();
|
||||
// Underwater: Entering the cave
|
||||
case 7200: return new Scene7200();
|
||||
// Underwater: Lord Poria
|
||||
case 7300: return new Scene7300();
|
||||
// Floating Buildings: Outside
|
||||
case 7600: return new Scene7600();
|
||||
// Floating Buildings: In the lab
|
||||
case 7700: return new Scene7700();
|
||||
|
||||
/* Scene group 10 */
|
||||
// Near beach: Slave washing clothes
|
||||
case 9100: return new Scene9100();
|
||||
// Castle: Outside the bulwarks
|
||||
case 9150: return new Scene9150();
|
||||
// Castle: Near the fountain
|
||||
case 9200: return new Scene9200();
|
||||
// Castle: In front of a large guarded door
|
||||
case 9300: return new Scene9300();
|
||||
// Castle: In a hallway
|
||||
case 9350: return new Scene9350();
|
||||
// Castle: In a hallway
|
||||
case 9360: return new Scene9360();
|
||||
// Castle: Black-Smith room
|
||||
case 9400: return new Scene9400();
|
||||
// Castle: Dining room
|
||||
case 9450: return new Scene9450();
|
||||
// Castle: Bedroom
|
||||
case 9500: return new Scene9500();
|
||||
// Castle: Balcony
|
||||
case 9700: return new Scene9700();
|
||||
// Castle: In the garden
|
||||
case 9750: return new Scene9750();
|
||||
// Castle: Dressing room
|
||||
case 9850: return new Scene9850();
|
||||
// Ending
|
||||
case 9900: return new Scene9900();
|
||||
// Space travel
|
||||
case 9999: return new Scene9999();
|
||||
|
||||
default:
|
||||
error("Unknown scene number - %d", sceneNumber);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if it is currently okay to restore a game
|
||||
*/
|
||||
bool RingworldGame::canLoadGameStateCurrently() {
|
||||
// Don't allow a game to be loaded if a dialog is active
|
||||
return !g_globals->getFlag(50) && (g_globals->_gfxManagers.size() == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if it is currently okay to save the game
|
||||
*/
|
||||
bool RingworldGame::canSaveGameStateCurrently() {
|
||||
// Don't allow a game to be saved if a dialog is active, or the copy protection dialog
|
||||
return !g_globals->getFlag(50) && (g_globals->_gfxManagers.size() == 1) && g_globals->_sceneManager._sceneNumber != 2310;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
DisplayHotspot::DisplayHotspot(int regionId, ...) {
|
||||
_sceneRegionId = regionId;
|
||||
|
||||
// Load up the actions
|
||||
va_list va;
|
||||
va_start(va, regionId);
|
||||
|
||||
int param = va_arg(va, int);
|
||||
while (param != LIST_END) {
|
||||
_actions.push_back(param);
|
||||
param = va_arg(va, int);
|
||||
}
|
||||
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
bool DisplayHotspot::performAction(int action) {
|
||||
for (uint i = 0; i < _actions.size(); i += 3) {
|
||||
if (_actions[i] == action) {
|
||||
display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
DisplayObject::DisplayObject(int firstAction, ...) {
|
||||
// Load up the actions
|
||||
va_list va;
|
||||
va_start(va, firstAction);
|
||||
|
||||
int param = firstAction;
|
||||
while (param != LIST_END) {
|
||||
_actions.push_back(param);
|
||||
param = va_arg(va, int);
|
||||
}
|
||||
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
bool DisplayObject::performAction(int action) {
|
||||
for (uint i = 0; i < _actions.size(); i += 3) {
|
||||
if (_actions[i] == action) {
|
||||
display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SceneArea::SceneArea() {
|
||||
_savedArea = NULL;
|
||||
_pt.x = _pt.y = 0;
|
||||
|
||||
_resNum = 0;
|
||||
_rlbNum = 0;
|
||||
_subNum = 0;
|
||||
_actionId = 0;
|
||||
}
|
||||
|
||||
SceneArea::~SceneArea() {
|
||||
delete _savedArea;
|
||||
}
|
||||
|
||||
void SceneArea::setup(int resNum, int rlbNum, int subNum, int actionId) {
|
||||
_resNum = resNum;
|
||||
_rlbNum = rlbNum;
|
||||
_subNum = subNum;
|
||||
_actionId = actionId;
|
||||
|
||||
_surface = surfaceFromRes(resNum, rlbNum, subNum);
|
||||
}
|
||||
|
||||
void SceneArea::draw2() {
|
||||
_surface.draw(Common::Point(_bounds.left, _bounds.top));
|
||||
}
|
||||
|
||||
void SceneArea::display() {
|
||||
_bounds.left = _pt.x - (_surface.getBounds().width() / 2);
|
||||
_bounds.top = _pt.y + 1 - _surface.getBounds().height();
|
||||
_bounds.setWidth(_surface.getBounds().width());
|
||||
_bounds.setHeight(_surface.getBounds().height());
|
||||
|
||||
_savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds);
|
||||
draw2();
|
||||
}
|
||||
|
||||
void SceneArea::restore() {
|
||||
assert(_savedArea);
|
||||
_savedArea->draw(Common::Point(_bounds.left, _bounds.top));
|
||||
delete _savedArea;
|
||||
_savedArea = NULL;
|
||||
}
|
||||
|
||||
void SceneArea::draw(bool flag) {
|
||||
_surface = surfaceFromRes(_resNum, _rlbNum, flag ? _subNum + 1 : _subNum);
|
||||
_surface.draw(Common::Point(_bounds.left, _bounds.top));
|
||||
}
|
||||
|
||||
void SceneArea::wait() {
|
||||
// Wait until a mouse or keypress
|
||||
Event event;
|
||||
while (!g_vm->shouldQuit() && !g_globals->_events.getEvent(event)) {
|
||||
GLOBALS._screen.update();
|
||||
g_system->delayMillis(10);
|
||||
}
|
||||
|
||||
SynchronizedList<SceneItem *>::iterator ii;
|
||||
for (ii = g_globals->_sceneItems.begin(); ii != g_globals->_sceneItems.end(); ++ii) {
|
||||
SceneItem *sceneItem = *ii;
|
||||
if (sceneItem->contains(event.mousePos)) {
|
||||
sceneItem->doAction(_actionId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_globals->_events.setCursor(CURSOR_ARROW);
|
||||
}
|
||||
|
||||
void SceneArea::synchronize(Serializer &s) {
|
||||
if (s.getVersion() >= 2)
|
||||
SavedObject::synchronize(s);
|
||||
|
||||
s.syncAsSint16LE(_pt.x);
|
||||
s.syncAsSint16LE(_pt.y);
|
||||
s.syncAsSint32LE(_resNum);
|
||||
s.syncAsSint32LE(_rlbNum);
|
||||
s.syncAsSint32LE(_subNum);
|
||||
s.syncAsSint32LE(_actionId);
|
||||
_bounds.synchronize(s);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
RingworldInvObjectList::RingworldInvObjectList() :
|
||||
_ESP(g_vm->getLanguage() == Common::ES_ESP),
|
||||
_RUS(g_vm->getLanguage() == Common::RU_RUS),
|
||||
_stunner(2280, 1, 2, OBJECT_STUNNER, _ESP ? "Tu paralizador." : _RUS ? "\x82\xA0\xE8 \xE1\xE2\xA0\xAD\xAD\xA5\xE0." : "This is your stunner."), // Ваш станнер.
|
||||
_scanner(1, 1, 3, OBJECT_SCANNER, _ESP ? "Una unidad combinada de esc\240ner y comunicaciones." : _RUS ? "\x91\xAA\xA0\xAD\xA5\xE0\x2D\xAA\xAE\xAC\xAC\xE3\xAD\xA8\xAA\xA0\xE2\xAE\xE0." : "A combination scanner comm unit."), // Сканер-коммуникатор.
|
||||
_stasisBox(5200, 1, 4, OBJECT_STASIS_BOX, _ESP ? "Una caja est\240sica." : _RUS ? "\x8A\xAE\xAD\xE2\xA5\xA9\xAD\xA5\xE0." : "A stasis box."), // Контейнер.
|
||||
_infoDisk(40, 1, 1, OBJECT_INFODISK, _ESP ? "El infodisk que le cogiste al asesino." : _RUS ? "\x88\xA7\xEA\xEF\xE2\xEB\xA9 \xE3 \xAA\xA8\xAB\xAB\xA5\xE0\xA0 \xA8\xAD\xE4\xAE\xA4\xA8\xE1\xAA." : "The infodisk you took from the assassin."), // Изъятый у киллера инфодиск.
|
||||
_stasisNegator(0, 2, 2, OBJECT_STASIS_NEGATOR, _ESP ? "El negador de campos est\240sicos." : _RUS ? "\x88\xAD\xA2\xA5\xE0\xE2\xAE\xE0 \xE1\xE2\xA0\xA7\xA8\xE1\x2D\xAF\xAE\xAB\xEF." : "The stasis field negator."), // Инвертор стазис-поля.
|
||||
_keyDevice(4250, 1, 6, OBJECT_KEY_DEVICE, _ESP ? "Una llave magn\202tica." : _RUS ? "\x8C\xA0\xA3\xAD\xA8\xE2\xAD\xEB\xA9 \xAA\xAB\xEE\xE7." : "A magnetic key device."), // Магнитный ключ.
|
||||
_medkit(2280, 1, 7, OBJECT_MEDKIT, _ESP ? "Tu botiqu\241n." : _RUS ? "\x80\xAF\xE2\xA5\xE7\xAA\xA0." : "Your medkit."), // Аптечка.
|
||||
_ladder(4100, 1, 8, OBJECT_LADDER, _ESP ? "La escalera del jefe." : _RUS ? "\x8B\xA5\xE1\xE2\xAD\xA8\xE6\xA0 \xA2\xAE\xA6\xA4\xEF." : "The chief's ladder."), // Лестница вождя.
|
||||
_rope(4150, 1, 9, OBJECT_ROPE, _ESP ? "La cuerda del jefe." : _RUS ? "\x82\xA5\xE0\xF1\xA2\xAA\xA0 \xA2\xAE\xA6\xA4\xEF." : "The chief's rope."), // Верёвка вождя.
|
||||
_key(7700, 1, 11, OBJECT_KEY, _ESP ? "Una llave." : _RUS ? "\x8A\xAB\xEE\xE7." : "A key."), // Ключ.
|
||||
_translator(7700, 1, 13, OBJECT_TRANSLATOR, _ESP ? "La caja traductora delfiniana." : _RUS ? "\x8F\xA5\xE0\xA5\xA2\xAE\xA4\xE7\xA8\xAA \xE1 \xA4\xA5\xAB\xEC\xE4\xA8\xAD\xEC\xA5\xA3\xAE." : "The dolphin translator box."), // Переводчик с дельфиньего.
|
||||
_ale(2150, 1, 10, OBJECT_ALE, _ESP ? "Una botella de cerveza." : _RUS ? "\x81\xE3\xE2\xEB\xAB\xAA\xA0 \xED\xAB\xEF." : "A bottle of ale."), // Бутылка эля.
|
||||
_paper(7700, 1, 12, OBJECT_PAPER, _ESP ? "Un trozo de papel con los n\243meros 2,4, y 3 escritos en \202l." : _RUS ? "\x8D\xA0 \xAA\xAB\xAE\xE7\xAA\xA5 \xA1\xE3\xAC\xA0\xA3\xA8 \xAD\xA0\xE7\xA5\xE0\xE2\xA0\xAD\xEB \xE6\xA8\xE4\xE0\xEB 2, 4, 3." : "A slip of paper with the numbers 2,4, and 3 written on it."), // На клочке бумаги начертаны цифры 2, 4, 3.
|
||||
_waldos(0, 1, 14, OBJECT_WALDOS, _ESP ? "Un par de brazos de la sonda averiada." : _RUS ? "\x8C\xA0\xAD\xA8\xAF\xE3\xAB\xEF\xE2\xAE\xE0\xEB \xE1\xAE \xE1\xAB\xAE\xAC\xA0\xAD\xAD\xAE\xA3\xAE \xA7\xAE\xAD\xA4\xA0." : "A pair of waldos from the ruined probe."), // Манипуляторы со сломанного зонда.
|
||||
_stasisBox2(8100, 1, 4, OBJECT_STASIS_BOX2, _ESP ? "Una caja est\240sica." : _RUS ? "\x8A\xAE\xAD\xE2\xA5\xA9\xAD\xA5\xE0." : "A stasis box."), // Контейнер.
|
||||
_ring(8100, 2, 5, OBJECT_RING, _ESP ? "El anillo que te envi\242 Louis Wu." : _RUS ? "\x9D\xE2\xAE\xE2 \xAF\xA5\xE0\xE1\xE2\xA5\xAD\xEC \xA2\xEB \xAF\xAE\xAB\xE3\xE7\xA8\xAB\xA8 \xAE\xE2 \x8B\xE3\xA8\xE1\xA0 \x82\xE3." : "This is a signet ring sent to you by Louis Wu."), // Этот перстень вы получили от Луиса Ву.
|
||||
_cloak(9850, 2, 6, OBJECT_CLOAK, _ESP ? "Una t\243nica de seda fina." : _RUS ? "\x98\xF1\xAB\xAA\xAE\xA2\xA0\xEF \xE2\xE3\xAD\xA8\xAA\xA0." : "A fine silk cloak."), // Шёлковая туника.
|
||||
_tunic(9450, 2, 7, OBJECT_TUNIC, _ESP ? "La t\243nica manchada del patriarca." : _RUS ? "\x83\xE0\xEF\xA7\xAD\xA0\xEF \xE2\xE3\xAD\xA8\xAA\xA0 \x8F\xA0\xE2\xE0\xA8\xA0\xE0\xE5\xA0." : "The patriarch's soiled tunic."), // Грязная туника Патриарха.
|
||||
_candle(9500, 2, 8, OBJECT_CANDLE, _ESP ? "Una vela de sebo." : _RUS ? "\x91\xA0\xAB\xEC\xAD\xA0\xEF \xE1\xA2\xA5\xE7\xA0." : "A tallow candle."), // Сальная свеча.
|
||||
_straw(9400, 2, 9, OBJECT_STRAW, _ESP ? "Paja limpia y seca." : _RUS ? "\x91\xE3\xE5\xA0\xEF \xA8 \xE7\xA8\xE1\xE2\xA0\xEF." : "Clean, dry straw."), // Сухая и чистая.
|
||||
_scimitar(9850, 1, 18, OBJECT_SCIMITAR, _ESP ? "La cimitarra del armario del Patriarca." : _RUS ? "\x91\xAA\xA8\xAC\xA8\xE2\xA0\xE0 \xA8\xA7 \xE8\xAA\xA0\xE4\xA0 \x8F\xA0\xE2\xE0\xA8\xA0\xE0\xE5\xA0." : "A scimitar from the Patriarch's closet."), // Скимитар из шкафа Патриарха.
|
||||
_sword(9850, 1, 17, OBJECT_SWORD, _ESP ? "La espada corta del armario del Patriarca." : _RUS ? "\x8A\xAE\xE0\xAE\xE2\xAA\xA8\xA9 \xAC\xA5\xE7 \xA8\xA7 \xE8\xAA\xA0\xE4\xA0 \x8F\xA0\xE2\xE0\xA8\xA0\xE0\xE5\xA0." : "A short sword from the Patriarch's closet."), // Короткий меч из шкафа Патриарха.
|
||||
_helmet(9500, 2, 4, OBJECT_HELMET, _ESP ? "Un extra\244o yelmo." : _RUS ? "\x91\xE2\xE0\xA0\xAD\xAD\xEB\xA9 \xE8\xAB\xA5\xAC." : "Some type of helmet."), // Странный шлем.
|
||||
_items(4300, 2, 10, OBJECT_ITEMS, _ESP ? "Dos interesantes objetos de la nave Tnuctipun." : _RUS ? "\x8B\xEE\xA1\xAE\xAF\xEB\xE2\xAD\xEB\xA5 \xA2\xA5\xE9\xA8\xE6\xEB \xE1 \xAA\xAE\xE0\xA0\xA1\xAB\xEF \xE2\xAD\xE3\xAA\xE2\xA8\xAF\xE3\xAD\xAE\xA2." : "Two interesting items from the Tnuctipun vessel."), // Любопытные вещицы с корабля тнуктипунов.
|
||||
_concentrator(4300, 2, 11, OBJECT_CONCENTRATOR, _ESP ? "El concentrador antimateria Tnuctipun contenido en un campo est\240sico." : _RUS ? "\x8A\xAE\xAD\xE6\xA5\xAD\xE2\xE0\xA0\xE2\xAE\xE0 \xA0\xAD\xE2\xA8\xA2\xA5\xE9\xA5\xE1\xE2\xA2\xA0 \xA2 \xE1\xE2\xA0\xA7\xA8\xE1\xAD\xAE\xAC \xAF\xAE\xAB\xA5." : "The Tnuctipun anti-matter concentrator contained in a stasis field."), // Концентратор антивещества в стазисном поле.
|
||||
_nullifier(5200, 2, 12, OBJECT_NULLIFIER, _ESP ? "Un anulador de ondas neuronales." : _RUS ? "\x82\xE0\xAE\xA4\xA5 \xA1\xEB \xAD\xA5\xA2\xE0\xA0\xAB\xEC\xAD\xEB\xA9 \xAD\xA5\xA9\xE2\xE0\xA0\xAB\xA8\xA7\xA0\xE2\xAE\xE0." : "A purported neural wave nullifier."), // Вроде бы невральный нейтрализатор.
|
||||
_peg(4045, 2, 16, OBJECT_PEG, _ESP ? "Una clavija con un s\241mbolo." : _RUS ? "\x8A\xAE\xAB\xEB\xE8\xA5\xAA \xE1 \xE1\xA8\xAC\xA2\xAE\xAB\xAE\xAC." : "A peg with a symbol."), // Колышек с символом.
|
||||
_vial(5100, 2, 17, OBJECT_VIAL, _ESP ? "Un frasco con la droga antiferomonas de los murci\202lagos." : _RUS ? "\x8F\xE3\xA7\xEB\xE0\xF1\xAA \xE1 \xA0\xAD\xE2\xA8\xE4\xA5\xE0\xAE\xAC\xAE\xAD\xAE\xAC." : "A vial of the bat creatures anti-pheromone drug."), // Пузырёк с антиферомоном.
|
||||
_jacket(9850, 3, 1, OBJECT_JACKET, _ESP ? "Una elegante chaqueta." : _RUS ? "\x93\xE2\xA5\xAF\xAB\xF1\xAD\xAD\xA0\xEF \xE2\xE3\xAD\xA8\xAA\xA0." : "A natty padded jacket."), // Утеплённая туника.
|
||||
_tunic2(9850, 3, 2, OBJECT_TUNIC2, _ESP ? "Una t\243nica muy ligera." : _RUS ? "\x8F\xE3\xE8\xA8\xE1\xE2\xA0\xEF \xE2\xE3\xAD\xA8\xAA\xA0." : "A very hairy tunic."), // Пушистая туника.
|
||||
_bone(5300, 3, 5, OBJECT_BONE, _ESP ? "Un hueso muy afilado." : _RUS ? "\x82\xAE\xE1\xE2\xE0\xA0\xEF \xAA\xAE\xE1\xE2\xEC." : "A very sharp bone."), // Вострая кость.
|
||||
_jar(7700, 3, 4, OBJECT_JAR, _ESP ? "Un frasco lleno de una sustancia verde." : _RUS ? "\x91\xAE\xE1\xE3\xA4 \xE1 \xA7\xA5\xAB\xF1\xAD\xAE\xA9 \xE1\xE3\xA1\xE1\xE2\xA0\xAD\xE6\xA8\xA5\xA9." : "An jar filled with a green substance."), // Сосуд с зелёной субстанцией.
|
||||
_emptyJar(7700, 3, 3, OBJECT_EMPTY_JAR, _ESP ? "Un frasco vac\241o." : _RUS ? "\x8F\xE3\xE1\xE2\xAE\xA9 \xE1\xAE\xE1\xE3\xA4." : "An empty jar.") { // Пустой сосуд.
|
||||
|
||||
// Add the items to the list
|
||||
_itemList.push_back(&_stunner);
|
||||
_itemList.push_back(&_scanner);
|
||||
_itemList.push_back(&_stasisBox);
|
||||
_itemList.push_back(&_infoDisk);
|
||||
_itemList.push_back(&_stasisNegator);
|
||||
_itemList.push_back(&_keyDevice);
|
||||
_itemList.push_back(&_medkit);
|
||||
_itemList.push_back(&_ladder);
|
||||
_itemList.push_back(&_rope);
|
||||
_itemList.push_back(&_key);
|
||||
_itemList.push_back(&_translator);
|
||||
_itemList.push_back(&_ale);
|
||||
_itemList.push_back(&_paper);
|
||||
_itemList.push_back(&_waldos);
|
||||
_itemList.push_back(&_stasisBox2);
|
||||
_itemList.push_back(&_ring);
|
||||
_itemList.push_back(&_cloak);
|
||||
_itemList.push_back(&_tunic);
|
||||
_itemList.push_back(&_candle);
|
||||
_itemList.push_back(&_straw);
|
||||
_itemList.push_back(&_scimitar);
|
||||
_itemList.push_back(&_sword);
|
||||
_itemList.push_back(&_helmet);
|
||||
_itemList.push_back(&_items);
|
||||
_itemList.push_back(&_concentrator);
|
||||
_itemList.push_back(&_nullifier);
|
||||
_itemList.push_back(&_peg);
|
||||
_itemList.push_back(&_vial);
|
||||
_itemList.push_back(&_jacket);
|
||||
_itemList.push_back(&_tunic2);
|
||||
_itemList.push_back(&_bone);
|
||||
_itemList.push_back(&_jar);
|
||||
_itemList.push_back(&_emptyJar);
|
||||
|
||||
_selectedItem = NULL;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void RingworldGame::start() {
|
||||
// Set some default flags
|
||||
g_globals->setFlag(12);
|
||||
g_globals->setFlag(34);
|
||||
|
||||
// Set the screen to scroll in response to the player moving off-screen
|
||||
g_globals->_scrollFollower = &g_globals->_player;
|
||||
|
||||
// Set the object's that will be in the player's inventory by default
|
||||
RING_INVENTORY._stunner._sceneNumber = 1;
|
||||
RING_INVENTORY._scanner._sceneNumber = 1;
|
||||
RING_INVENTORY._ring._sceneNumber = 1;
|
||||
|
||||
int slot = -1;
|
||||
|
||||
if (ConfMan.hasKey("save_slot")) {
|
||||
slot = ConfMan.getInt("save_slot");
|
||||
Common::String file = g_vm->getSaveStateName(slot);
|
||||
Common::InSaveFile *in = g_vm->_system->getSavefileManager()->openForLoading(file);
|
||||
if (in)
|
||||
delete in;
|
||||
else
|
||||
slot = -1;
|
||||
}
|
||||
|
||||
if (slot >= 0)
|
||||
g_globals->_sceneHandler->_loadGameSlot = slot;
|
||||
else
|
||||
// Switch to the title screen
|
||||
g_globals->_sceneManager.setNewScene(1000);
|
||||
|
||||
g_globals->_events.showCursor();
|
||||
}
|
||||
|
||||
void RingworldGame::restart() {
|
||||
g_globals->_scenePalette.clearListeners();
|
||||
g_globals->_soundHandler.stop();
|
||||
|
||||
// Reset the flags
|
||||
g_globals->reset();
|
||||
g_globals->setFlag(34);
|
||||
|
||||
// Clear save/load slots
|
||||
g_globals->_sceneHandler->_saveGameSlot = -1;
|
||||
g_globals->_sceneHandler->_loadGameSlot = -1;
|
||||
|
||||
g_globals->_stripNum = 0;
|
||||
g_globals->_events.setCursor(CURSOR_WALK);
|
||||
|
||||
// Reset item properties
|
||||
RING_INVENTORY._stunner._sceneNumber = 1;
|
||||
RING_INVENTORY._scanner._sceneNumber = 1;
|
||||
RING_INVENTORY._stasisBox._sceneNumber = 5200;
|
||||
RING_INVENTORY._infoDisk._sceneNumber = 40;
|
||||
RING_INVENTORY._stasisNegator._sceneNumber = 0;
|
||||
RING_INVENTORY._keyDevice._sceneNumber = 0;
|
||||
RING_INVENTORY._medkit._sceneNumber = 2280;
|
||||
RING_INVENTORY._ladder._sceneNumber = 4100;
|
||||
RING_INVENTORY._rope._sceneNumber = 4150;
|
||||
RING_INVENTORY._key._sceneNumber = 7700;
|
||||
RING_INVENTORY._translator._sceneNumber = 2150;
|
||||
RING_INVENTORY._paper._sceneNumber = 7700;
|
||||
RING_INVENTORY._waldos._sceneNumber = 0;
|
||||
RING_INVENTORY._ring._sceneNumber = 1;
|
||||
RING_INVENTORY._stasisBox2._sceneNumber = 8100;
|
||||
RING_INVENTORY._cloak._sceneNumber = 9850;
|
||||
RING_INVENTORY._tunic._sceneNumber = 9450;
|
||||
RING_INVENTORY._candle._sceneNumber = 9500;
|
||||
RING_INVENTORY._straw._sceneNumber = 9400;
|
||||
RING_INVENTORY._scimitar._sceneNumber = 9850;
|
||||
RING_INVENTORY._sword._sceneNumber = 9850;
|
||||
RING_INVENTORY._helmet._sceneNumber = 9500;
|
||||
RING_INVENTORY._items._sceneNumber = 4300;
|
||||
RING_INVENTORY._concentrator._sceneNumber = 4300;
|
||||
RING_INVENTORY._nullifier._sceneNumber = 4300;
|
||||
RING_INVENTORY._peg._sceneNumber = 4045;
|
||||
RING_INVENTORY._vial._sceneNumber = 5100;
|
||||
RING_INVENTORY._jacket._sceneNumber = 9850;
|
||||
RING_INVENTORY._tunic2._sceneNumber = 9850;
|
||||
RING_INVENTORY._bone._sceneNumber = 5300;
|
||||
RING_INVENTORY._jar._sceneNumber = 7700;
|
||||
RING_INVENTORY._emptyJar._sceneNumber = 7700;
|
||||
RING_INVENTORY._selectedItem = NULL;
|
||||
|
||||
// Change to the first game scene
|
||||
g_globals->_sceneManager.changeScene(30);
|
||||
}
|
||||
|
||||
void RingworldGame::endGame(int resNum, int lineNum) {
|
||||
g_globals->_events.setCursor(CURSOR_WALK);
|
||||
Common::String msg = g_resourceManager->getMessage(resNum, lineNum);
|
||||
bool savesExist = g_saver->savegamesExist();
|
||||
|
||||
if (!savesExist) {
|
||||
// No savegames exist, so prompt the user to restart or quit
|
||||
int rc;
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
rc = MessageDialog::show(msg, ESP_QUIT_BTN_STRING, ESP_RESTART_BTN_2_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
rc = MessageDialog::show(msg, RUS_QUIT_BTN_STRING, RUS_RESTART_BTN_STRING);
|
||||
} else {
|
||||
rc = MessageDialog::show(msg, QUIT_BTN_STRING, RESTART_BTN_STRING);
|
||||
}
|
||||
if (rc == 0)
|
||||
g_vm->quitGame();
|
||||
else
|
||||
restart();
|
||||
} else {
|
||||
// Savegames exist, so prompt for Restore/Restart
|
||||
bool breakFlag;
|
||||
do {
|
||||
if (g_vm->shouldQuit()) {
|
||||
breakFlag = true;
|
||||
} else {
|
||||
int rc;
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
rc = MessageDialog::show(msg, ESP_RESTART_BTN_2_STRING, ESP_RESTORE_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
rc = MessageDialog::show(msg, RUS_RESTART_BTN_STRING, RUS_RESTORE_BTN_STRING);
|
||||
} else {
|
||||
rc = MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING);
|
||||
}
|
||||
if (rc== 0) {
|
||||
restart();
|
||||
breakFlag = true;
|
||||
} else {
|
||||
handleSaveLoad(false, g_globals->_sceneHandler->_loadGameSlot, g_globals->_sceneHandler->_saveName);
|
||||
breakFlag = g_globals->_sceneHandler->_loadGameSlot >= 0;
|
||||
}
|
||||
}
|
||||
} while (!breakFlag);
|
||||
}
|
||||
|
||||
g_globals->_events.setCursorFromFlag();
|
||||
}
|
||||
|
||||
void RingworldGame::processEvent(Event &event) {
|
||||
if (event.eventType == EVENT_CUSTOM_ACTIONSTART) {
|
||||
switch (event.customType) {
|
||||
case kActionHelp:
|
||||
// F1 - Help
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
MessageDialog::show(ESP_HELP_MSG, ESP_OK_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
MessageDialog::show(RUS_HELP_MSG, RUS_OK_BTN_STRING);
|
||||
} else {
|
||||
MessageDialog::show(HELP_MSG, OK_BTN_STRING);
|
||||
}
|
||||
break;
|
||||
|
||||
case kActionSoundOptions:
|
||||
// F2 - Sound Options
|
||||
SoundDialog::execute();
|
||||
break;
|
||||
|
||||
case kActionQuitGame:
|
||||
// F3 - Quit
|
||||
quitGame();
|
||||
event.handled = false;
|
||||
break;
|
||||
|
||||
case kActionRestartGame:
|
||||
// F4 - Restart
|
||||
restartGame();
|
||||
g_globals->_events.setCursorFromFlag();
|
||||
break;
|
||||
|
||||
case kActionRestoreGame:
|
||||
// F7 - Restore
|
||||
restoreGame();
|
||||
g_globals->_events.setCursorFromFlag();
|
||||
break;
|
||||
|
||||
case kActionPauseGame:
|
||||
// F10 - Pause
|
||||
GfxDialog::setPalette();
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
MessageDialog::show(ESP_GAME_PAUSED_MSG, ESP_CONTINUE_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
MessageDialog::show(RUS_GAME_PAUSED_MSG, RUS_CONTINUE_BTN_STRING);
|
||||
} else {
|
||||
MessageDialog::show(GAME_PAUSED_MSG, CONTINUE_BTN_STRING);
|
||||
}
|
||||
g_globals->_events.setCursorFromFlag();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RingworldGame::rightClick() {
|
||||
RightClickDialog *dlg = new RightClickDialog();
|
||||
dlg->execute();
|
||||
delete dlg;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
NamedHotspot::NamedHotspot() : SceneHotspot() {
|
||||
_resNum = 0;
|
||||
_lookLineNum = _useLineNum = _talkLineNum = -1;
|
||||
}
|
||||
|
||||
void NamedHotspot::doAction(int action) {
|
||||
switch (action) {
|
||||
case CURSOR_WALK:
|
||||
// Nothing
|
||||
return;
|
||||
case CURSOR_LOOK:
|
||||
if (_lookLineNum == -1)
|
||||
break;
|
||||
|
||||
SceneItem::display(_resNum, _lookLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
|
||||
return;
|
||||
case CURSOR_USE:
|
||||
if (_useLineNum == -1)
|
||||
break;
|
||||
|
||||
SceneItem::display(_resNum, _useLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
|
||||
return;
|
||||
case CURSOR_TALK:
|
||||
if (_talkLineNum == -1)
|
||||
break;
|
||||
|
||||
SceneItem::display(_resNum, _lookLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
SceneHotspot::doAction(action);
|
||||
}
|
||||
|
||||
void NamedHotspot::synchronize(Serializer &s) {
|
||||
SceneHotspot::synchronize(s);
|
||||
s.syncAsSint16LE(_resNum);
|
||||
s.syncAsSint16LE(_lookLineNum);
|
||||
s.syncAsSint16LE(_useLineNum);
|
||||
|
||||
if (g_vm->getGameID() == GType_BlueForce)
|
||||
s.syncAsSint16LE(_talkLineNum);
|
||||
}
|
||||
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
189
engines/tsage/ringworld/ringworld_logic.h
Normal file
189
engines/tsage/ringworld/ringworld_logic.h
Normal file
@@ -0,0 +1,189 @@
|
||||
/* 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_RINGWORLD_LOGIC_H
|
||||
#define TSAGE_RINGWORLD_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 Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class SceneFactory {
|
||||
public:
|
||||
static Scene *createScene(int sceneNumber);
|
||||
};
|
||||
|
||||
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 SceneArea : public SavedObject {
|
||||
public:
|
||||
GfxSurface _surface;
|
||||
GfxSurface *_savedArea;
|
||||
Common::Point _pt;
|
||||
int _resNum;
|
||||
int _rlbNum;
|
||||
int _subNum;
|
||||
int _actionId;
|
||||
Rect _bounds;
|
||||
public:
|
||||
SceneArea();
|
||||
~SceneArea() override;
|
||||
|
||||
void setup(int resNum, int rlbNum, int subNum, int actionId);
|
||||
void draw2();
|
||||
void display();
|
||||
void restore();
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
virtual void draw(bool flag);
|
||||
virtual void wait();
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
class RingworldInvObjectList : public InvObjectList {
|
||||
private:
|
||||
bool _ESP;
|
||||
bool _RUS;
|
||||
public:
|
||||
InvObject _stunner;
|
||||
InvObject _scanner;
|
||||
InvObject _stasisBox;
|
||||
InvObject _infoDisk;
|
||||
InvObject _stasisNegator;
|
||||
InvObject _keyDevice;
|
||||
InvObject _medkit;
|
||||
InvObject _ladder;
|
||||
InvObject _rope;
|
||||
InvObject _key;
|
||||
InvObject _translator;
|
||||
InvObject _ale;
|
||||
InvObject _paper;
|
||||
InvObject _waldos;
|
||||
InvObject _stasisBox2;
|
||||
InvObject _ring;
|
||||
InvObject _cloak;
|
||||
InvObject _tunic;
|
||||
InvObject _candle;
|
||||
InvObject _straw;
|
||||
InvObject _scimitar;
|
||||
InvObject _sword;
|
||||
InvObject _helmet;
|
||||
InvObject _items;
|
||||
InvObject _concentrator;
|
||||
InvObject _nullifier;
|
||||
InvObject _peg;
|
||||
InvObject _vial;
|
||||
InvObject _jacket;
|
||||
InvObject _tunic2;
|
||||
InvObject _bone;
|
||||
InvObject _jar;
|
||||
InvObject _emptyJar;
|
||||
public:
|
||||
RingworldInvObjectList();
|
||||
|
||||
Common::String getClassName() override { return "RingworldInvObjectList"; }
|
||||
};
|
||||
|
||||
#define RING_INVENTORY (*((::TsAGE::Ringworld::RingworldInvObjectList *)g_globals->_inventory))
|
||||
|
||||
class RingworldGame: public Game {
|
||||
public:
|
||||
void start() 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();
|
||||
|
||||
void doAction(int action) override;
|
||||
Common::String getClassName() override { return "NamedHotspot"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
3487
engines/tsage/ringworld/ringworld_scenes1.cpp
Normal file
3487
engines/tsage/ringworld/ringworld_scenes1.cpp
Normal file
File diff suppressed because it is too large
Load Diff
568
engines/tsage/ringworld/ringworld_scenes1.h
Normal file
568
engines/tsage/ringworld/ringworld_scenes1.h
Normal file
@@ -0,0 +1,568 @@
|
||||
/* 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_RINGWORLD_SCENES1_H
|
||||
#define TSAGE_RINGWORLD_SCENES1_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.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"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene10 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
Speaker _speakerSText;
|
||||
Speaker _speakerQText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
SceneObject _veeshkaBody;
|
||||
SceneObject _veeshkaHead;
|
||||
SceneObject _veeshkaRightArm;
|
||||
SceneObject _centurion;
|
||||
SceneObject _leftSmoke;
|
||||
SceneObject _rightSmoke;
|
||||
|
||||
void stripCallback(int v) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene15 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
public:
|
||||
Action1 _action1;
|
||||
SceneObject _ship;
|
||||
ASound _soundHandler;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene20 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
SceneObject _assassinShip1;
|
||||
SceneObject _assassinShip2;
|
||||
SceneObject _laserShot1;
|
||||
SceneObject _laserShot2;
|
||||
ASound _sound;
|
||||
public:
|
||||
Scene20();
|
||||
~Scene20() override {}
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene30 : public Scene {
|
||||
/* Scene objects */
|
||||
// Doorway beam sensor
|
||||
class BeamObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
// Doorway object
|
||||
class DoorObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
// Kzin object
|
||||
class KzinObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
/* Actions */
|
||||
class BeamAction : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class KzinAction : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class RingAction : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class TalkAction : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
ASound _sound;
|
||||
DisplayHotspot _groundHotspot, _wallsHotspot, _courtyardHotspot, _treeHotspot;
|
||||
BeamObject _beam;
|
||||
DoorObject _door;
|
||||
KzinObject _kzin;
|
||||
|
||||
BeamAction _beamAction;
|
||||
KzinAction _kzinAction;
|
||||
RingAction _ringAction;
|
||||
TalkAction _talkAction;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
SpeakerSR _speakerSR;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerQText _speakerQText;
|
||||
public:
|
||||
Scene30();
|
||||
~Scene30() override {}
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene40 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
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 Action8 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class DyingKzin : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Assassin : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class Item2 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Item6 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Item8 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
ASound _soundHandler;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Action7 _action7;
|
||||
Action8 _action8;
|
||||
SceneObject _seeker;
|
||||
SceneObject _seekerTail;
|
||||
SceneObject _seekerHand;
|
||||
DyingKzin _dyingKzin;
|
||||
Assassin _assassin;
|
||||
SceneObject _doorway;
|
||||
SceneObject _leftEntrance;
|
||||
DisplayHotspot _ball;
|
||||
Item2 _statue;
|
||||
DisplayHotspot _window;
|
||||
DisplayHotspot _entrance;
|
||||
DisplayHotspot _background;
|
||||
Item6 _pedestal;
|
||||
DisplayHotspot _emerald;
|
||||
DisplayHotspot _tree;
|
||||
|
||||
Scene40();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene50 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Object1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class LeftFlyCycle : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class CenterFlyCycle : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class RightFlyCycle : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
LeftFlyCycle _leftFlyCycle;
|
||||
CenterFlyCycle _centerFlyCycle;
|
||||
RightFlyCycle _rightFlyCycle;
|
||||
Rect _doorwayRect;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerQText _speakerQText;
|
||||
DisplayHotspot _background;
|
||||
DisplayHotspot _item1;
|
||||
DisplayHotspot _entrance;
|
||||
DisplayHotspot _bulwark;
|
||||
DisplayHotspot _tree;
|
||||
DisplayHotspot _flagstones;
|
||||
|
||||
Scene50();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene60 : public Scene {
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class PrevObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class NextObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class ExitObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class MessageObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class ControlObject : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SlaveObject : public SceneObjectExt {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class MasterObject : public SceneObjectExt {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class FloppyDrive : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Item1 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Item : public SceneHotspot {
|
||||
public:
|
||||
int _messageNum, _sceneMode;
|
||||
|
||||
Item(int sceneRegionId, int messageNum, int sceneMode) {
|
||||
_sceneRegionId = sceneRegionId;
|
||||
_messageNum = messageNum;
|
||||
_sceneMode = sceneMode;
|
||||
}
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
GfxButton _gfxButton;
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSText _speakerSText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
SceneObject _rose;
|
||||
PrevObject _prevButton;
|
||||
NextObject _nextButton;
|
||||
ExitObject _exitButton;
|
||||
MessageObject _message;
|
||||
ControlObject _controlButton;
|
||||
SlaveObject _slaveButton;
|
||||
MasterObject _masterButton;
|
||||
FloppyDrive _floppyDrive;
|
||||
SceneObject _redLights;
|
||||
Item1 _diskDrive;
|
||||
Item _dashboard;
|
||||
Item _intercomm;
|
||||
Item _viewScreen;
|
||||
Item _speedControl;
|
||||
Item _speaker;
|
||||
ASound _soundHandler1;
|
||||
ASound _soundHandler2;
|
||||
ASound _soundHandler3;
|
||||
|
||||
Scene60();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene90 : public Scene {
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class SeekerShip : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Guard : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerSR _speakerSR;
|
||||
SpeakerMText _speakerMText;
|
||||
Action1 _action1;
|
||||
SeekerShip _seekerShip;
|
||||
Guard _guard;
|
||||
DisplayObject _headGate;
|
||||
DisplayObject _emptyShip;
|
||||
DisplayObject _quinnShip;
|
||||
SceneObject _bubble;
|
||||
DisplayHotspot _guardShack;
|
||||
DisplayHotspot _shed;
|
||||
DisplayHotspot _background;
|
||||
ASound _soundHandler1, _soundHandler2;
|
||||
|
||||
Scene90();
|
||||
|
||||
void stripCallback(int v) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene95 : public Scene {
|
||||
class Action1 : public ActionExt {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
Action1 _action1;
|
||||
SceneObject _object1, _object2, _object3;
|
||||
ASound _soundHandler;
|
||||
|
||||
Scene95();
|
||||
void postInit(SceneObjectList *OwnerList) override;
|
||||
};
|
||||
|
||||
class Scene6100 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
class Action5 : public Action {
|
||||
public:
|
||||
void dispatch() override;
|
||||
};
|
||||
class GetBoxAction : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
class Action7 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Object : public SceneObject {
|
||||
public:
|
||||
FloatSet _floats;
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
class ProbeMover : public NpcMover {
|
||||
public:
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class Item1 : public SceneItem {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
GetBoxAction _getBoxAction;
|
||||
Action7 _action7;
|
||||
ASound _soundHandler;
|
||||
Speaker _speaker1;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerSL _speakerSL;
|
||||
SceneObject _object1, _object2, _object3;
|
||||
Object _rocks, _probe;
|
||||
Object _sunflower1, _sunflower2, _sunflower3;
|
||||
SceneText _sceneText;
|
||||
SceneItem _item1;
|
||||
|
||||
int _turnAmount, _angle, _speed, _fadePercent;
|
||||
int _hitCount;
|
||||
bool _rocksCheck;
|
||||
Object *_objList[4];
|
||||
bool _msgActive;
|
||||
|
||||
Scene6100();
|
||||
void synchronize(Serializer &s) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void remove() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void showMessage(const Common::String &msg, int color, Action *action);
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
2100
engines/tsage/ringworld/ringworld_scenes10.cpp
Normal file
2100
engines/tsage/ringworld/ringworld_scenes10.cpp
Normal file
File diff suppressed because it is too large
Load Diff
537
engines/tsage/ringworld/ringworld_scenes10.h
Normal file
537
engines/tsage/ringworld/ringworld_scenes10.h
Normal file
@@ -0,0 +1,537 @@
|
||||
/* 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_RINGWORLD_SCENES10_H
|
||||
#define TSAGE_RINGWORLD_SCENES10_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class SceneObject9150 : public SceneObject {
|
||||
public:
|
||||
int _timer, _signalFlag;
|
||||
|
||||
void synchronize(Serializer &s) override {
|
||||
SceneObject::synchronize(s);
|
||||
s.syncAsSint16LE(_timer);
|
||||
s.syncAsSint16LE(_signalFlag);
|
||||
}
|
||||
Common::String getClassName() override { return "SceneObject9150"; }
|
||||
};
|
||||
|
||||
class Scene2 : public Scene {
|
||||
public :
|
||||
int _sceneState;
|
||||
|
||||
Scene2();
|
||||
void synchronize(Serializer &s) override {
|
||||
Scene::synchronize(s);
|
||||
s.syncAsSint16LE(_sceneState);
|
||||
}
|
||||
};
|
||||
|
||||
class Object9350 : public SceneObject {
|
||||
public:
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void draw() override;
|
||||
};
|
||||
|
||||
class Scene9100 : public Scene {
|
||||
/* Items */
|
||||
class SceneHotspot1 : public NamedHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
SceneObject _object5;
|
||||
SceneObject _object6;
|
||||
SceneHotspot1 _hotspotSlave;
|
||||
NamedHotspot _hotspotSoiledClothes;
|
||||
NamedHotspot _hotspotCleanedClothes;
|
||||
NamedHotspot _hotspotIsland;
|
||||
NamedHotspot _hotspotBoulders;
|
||||
NamedHotspot _hotspotTrees;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9150 : public Scene2 {
|
||||
class Object3 : public SceneObject9150 {
|
||||
public:
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
Object3 _object3;
|
||||
NamedHotspot _sceneHotspot1;
|
||||
NamedHotspot _sceneHotspot2;
|
||||
NamedHotspot _sceneHotspot3;
|
||||
NamedHotspot _sceneHotspot4;
|
||||
NamedHotspot _sceneHotspot5;
|
||||
NamedHotspot _sceneHotspot6;
|
||||
NamedHotspot _sceneHotspot7;
|
||||
NamedHotspot _sceneHotspot8;
|
||||
NamedHotspot _sceneHotspot9;
|
||||
NamedHotspot _sceneHotspot10;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9200 : public Scene2 {
|
||||
class SceneHotspot1 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
Action _action1;
|
||||
SpeakerGText _speakerGText;
|
||||
SpeakerGR _speakerGR;
|
||||
SpeakerQText _speakerQText;
|
||||
ASound _soundHandler;
|
||||
SceneHotspot1 _hotspot1;
|
||||
NamedHotspot _hotspot2;
|
||||
NamedHotspot _hotspot3;
|
||||
NamedHotspot _hotspot4;
|
||||
NamedHotspot _hotspot5;
|
||||
NamedHotspot _hotspot6;
|
||||
NamedHotspot _hotspot7;
|
||||
NamedHotspot _hotspot8;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene9300 : public Scene {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
NamedHotspot _hotspot1;
|
||||
NamedHotspot _hotspot2;
|
||||
NamedHotspot _hotspot3;
|
||||
NamedHotspot _hotspot4;
|
||||
NamedHotspot _hotspot5;
|
||||
NamedHotspot _hotspot6;
|
||||
NamedHotspot _hotspot7;
|
||||
NamedHotspot _hotspot8;
|
||||
NamedHotspot _hotspot9;
|
||||
NamedHotspot _hotspot10;
|
||||
NamedHotspot _hotspot11;
|
||||
NamedHotspot _hotspot12;
|
||||
NamedHotspot _hotspot13;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9350 : public Scene2 {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
Object9350 _object1;
|
||||
SceneObject _object2;
|
||||
NamedHotspot _sceneHotspot1;
|
||||
NamedHotspot _sceneHotspot2;
|
||||
NamedHotspot _sceneHotspot3;
|
||||
NamedHotspot _sceneHotspot4;
|
||||
NamedHotspot _sceneHotspot5;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9360 : public Scene2 {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
Action _action1;
|
||||
Object9350 _object1;
|
||||
NamedHotspot _hotspot1;
|
||||
NamedHotspot _hotspot2;
|
||||
NamedHotspot _hotspot3;
|
||||
NamedHotspot _hotspot4;
|
||||
NamedHotspot _hotspot5;
|
||||
NamedHotspot _hotspot6;
|
||||
NamedHotspot _hotspot7;
|
||||
NamedHotspot _hotspot8;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9400 : public Scene2 {
|
||||
class SceneHotspot7 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class SceneHotspot8 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
Scene9400();
|
||||
SequenceManager _sequenceManager;
|
||||
Action _action1;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SpeakerOText _speakerOText;
|
||||
SpeakerOR _speakerOR;
|
||||
SpeakerQText _speakerQText;
|
||||
NamedHotspot _hotspot1;
|
||||
NamedHotspot _hotspot2;
|
||||
NamedHotspot _hotspot3;
|
||||
NamedHotspot _hotspot4;
|
||||
NamedHotspot _hotspot5;
|
||||
NamedHotspot _hotspot6;
|
||||
ASound _soundHandler;
|
||||
bool _hittingAnvil;
|
||||
SceneHotspot7 _hotspot7;
|
||||
SceneHotspot8 _hotspot8;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene9450 : public Scene2 {
|
||||
class Object2 : public SceneObject {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Object3 : public SceneObject9150 {
|
||||
public:
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Hotspot1 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot3 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SceneObject _object1;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
Object2 _object2;
|
||||
SequenceManager _sequenceManager3;
|
||||
Object3 _object3;
|
||||
Hotspot1 _hotspot1;
|
||||
NamedHotspot _hotspot2;
|
||||
Hotspot3 _hotspot3;
|
||||
NamedHotspot _hotspot4;
|
||||
NamedHotspot _hotspot5;
|
||||
NamedHotspot _hotspot6;
|
||||
NamedHotspot _hotspot7;
|
||||
NamedHotspot _hotspot8;
|
||||
NamedHotspot _hotspot9;
|
||||
NamedHotspot _hotspot10;
|
||||
NamedHotspot _hotspot11;
|
||||
NamedHotspot _hotspot12;
|
||||
NamedHotspot _hotspot13;
|
||||
NamedHotspot _hotspot14;
|
||||
NamedHotspot _hotspot15;
|
||||
NamedHotspot _hotspot16;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9500 : public Scene2 {
|
||||
class Hotspot1 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot2 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot3 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot4 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _candle;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
Hotspot1 _hotspot1;
|
||||
Hotspot2 _hotspot2;
|
||||
Hotspot3 _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
Hotspot4 _hotspot5;
|
||||
NamedHotspot _hotspot6;
|
||||
NamedHotspot _hotspot7;
|
||||
NamedHotspot _hotspot8;
|
||||
NamedHotspot _hotspot9;
|
||||
NamedHotspot _hotspot10;
|
||||
NamedHotspot _hotspot11;
|
||||
NamedHotspot _hotspot12;
|
||||
NamedHotspot _hotspot13;
|
||||
NamedHotspot _hotspot14;
|
||||
NamedHotspot _hotspot15;
|
||||
NamedHotspot _hotspot16;
|
||||
NamedHotspot _hotspot17;
|
||||
NamedHotspot _hotspot18;
|
||||
NamedHotspot _hotspot19;
|
||||
NamedHotspot _hotspot20;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene9700 : public Scene2 {
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _object1;
|
||||
NamedHotspot _sceneHotspot1;
|
||||
NamedHotspot _sceneHotspot2;
|
||||
NamedHotspot _sceneHotspot3;
|
||||
NamedHotspot _sceneHotspot4;
|
||||
NamedHotspot _sceneHotspot5;
|
||||
NamedHotspot _sceneHotspot6;
|
||||
GfxButton _gfxButton1;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene9750 : public Scene {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9850 : public Scene {
|
||||
class Object6 : public SceneObject{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Object7 : public SceneObjectExt{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot12 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot14 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot16 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot17 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot18 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot19 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot20 : public NamedHotspot{
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _objDoor;
|
||||
SceneObject _objCloak;
|
||||
SceneObject _objJacket;
|
||||
SceneObject _objTunic2;
|
||||
SceneObject _objLever;
|
||||
Object6 _objScimitar;
|
||||
Object7 _objSword;
|
||||
ASound _soundHandler;
|
||||
NamedHotspot _hotspot1;
|
||||
NamedHotspot _hotspot2;
|
||||
NamedHotspot _hotspot3;
|
||||
NamedHotspot _hotspot4;
|
||||
NamedHotspot _hotspot5;
|
||||
NamedHotspot _hotspot6;
|
||||
NamedHotspot _hotspot7;
|
||||
NamedHotspot _hotspot8;
|
||||
NamedHotspot _hotspot9;
|
||||
NamedHotspot _hotspot10;
|
||||
NamedHotspot _hotspot11;
|
||||
Hotspot12 _hotspot12;
|
||||
NamedHotspot _hotspot13;
|
||||
Hotspot14 _hotspot14;
|
||||
NamedHotspot _hotspot15;
|
||||
Hotspot16 _hotspot16;
|
||||
Hotspot17 _hotspot17;
|
||||
Hotspot18 _hotspot18;
|
||||
Hotspot19 _hotspot19;
|
||||
Hotspot20 _spotLever;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene9900 : public Scene {
|
||||
class strAction1 : public Action {
|
||||
public:
|
||||
SceneObject _object9;
|
||||
ScenePalette _palette1;
|
||||
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class strAction2 : public Action {
|
||||
public:
|
||||
SceneText _txtArray1[2];
|
||||
SceneText _txtArray2[2];
|
||||
int _lineNum, _txtArray1Index, _var3;
|
||||
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class strAction3 : public Action {
|
||||
public:
|
||||
SceneObject _object10;
|
||||
ScenePalette _palette2;
|
||||
ScenePalette _palette3;
|
||||
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SequenceManager _sequenceManager;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
SceneObject _object5;
|
||||
SceneObject _object6;
|
||||
SceneObject _object7;
|
||||
SceneObjectExt _object8;
|
||||
strAction1 _strAction1;
|
||||
strAction2 _strAction2;
|
||||
strAction3 _strAction3;
|
||||
SpeakerMR _speakerMR;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene9999 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action _action3;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
960
engines/tsage/ringworld/ringworld_scenes2.cpp
Normal file
960
engines/tsage/ringworld/ringworld_scenes2.cpp
Normal file
@@ -0,0 +1,960 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "tsage/ringworld/ringworld_scenes2.h"
|
||||
#include "tsage/dialogs.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/tsage.h"
|
||||
#include "tsage/staticres.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 1000 - Title Screen
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1000::Action1::signal() {
|
||||
Scene1000 *scene = (Scene1000 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
g_globals->_player.disableControl();
|
||||
setDelay(10);
|
||||
break;
|
||||
case 1:
|
||||
scene->_object4.postInit();
|
||||
scene->_object4.setVisage(1001);
|
||||
scene->_object4._frame = 1;
|
||||
scene->_object4.setStrip2(5);
|
||||
scene->_object4.changeZoom(100);
|
||||
scene->_object4.animate(ANIM_MODE_2, NULL);
|
||||
scene->_object4.setPosition(Common::Point(403, 163));
|
||||
setDelay(90);
|
||||
break;
|
||||
case 2: {
|
||||
SceneItem::display(0, 0);
|
||||
scene->_object4.remove();
|
||||
scene->_object1.changeZoom(-1);
|
||||
NpcMover *mover = new NpcMover();
|
||||
Common::Point pt(180, 100);
|
||||
scene->_object1.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
g_globals->_sceneManager.changeScene(1400);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Scene1000::Action2::signal() {
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
g_globals->_player.disableControl();
|
||||
setDelay(10);
|
||||
break;
|
||||
case 1:
|
||||
SceneItem::display(1000, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1,
|
||||
SET_EXT_BGCOLOR, 35, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END);
|
||||
setDelay(180);
|
||||
break;
|
||||
case 2:
|
||||
SceneItem::display(0, 0);
|
||||
g_globals->_sceneManager.changeScene(2000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1000::Action3::signal() {
|
||||
Scene1000 *scene = (Scene1000 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
g_globals->_sceneManager._scene->loadBackground(0, 0);
|
||||
setDelay(60);
|
||||
break;
|
||||
case 1: {
|
||||
NpcMover *mover = new NpcMover();
|
||||
Common::Point pt(158, 31);
|
||||
scene->_object3.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
case 3:
|
||||
setDelay(60);
|
||||
break;
|
||||
case 4:
|
||||
g_globals->_player.show();
|
||||
setDelay(240);
|
||||
break;
|
||||
case 5: {
|
||||
g_globals->_player.enableControl();
|
||||
|
||||
const char *SEEN_INTRO = "seen_intro";
|
||||
if (!ConfMan.hasKey(SEEN_INTRO) || !ConfMan.getBool(SEEN_INTRO)) {
|
||||
// First time being played, so show the introduction
|
||||
ConfMan.setBool(SEEN_INTRO, true);
|
||||
ConfMan.flushToDisk();
|
||||
|
||||
setDelay(1);
|
||||
} else {
|
||||
// Prompt user for whether to start play or watch introduction
|
||||
g_globals->_player.enableControl();
|
||||
|
||||
int rc;
|
||||
if (g_vm->getLanguage() == Common::ES_ESP) {
|
||||
rc = MessageDialog::show2(ESP_WATCH_INTRO_MSG, ESP_START_PLAY_BTN_STRING, ESP_INTRODUCTION_BTN_STRING);
|
||||
} else if (g_vm->getLanguage() == Common::RU_RUS) {
|
||||
rc = MessageDialog::show2(RUS_WATCH_INTRO_MSG, RUS_START_PLAY_BTN_STRING, RUS_INTRODUCTION_BTN_STRING);
|
||||
} else {
|
||||
rc = MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING);
|
||||
}
|
||||
if (rc == 0) {
|
||||
_actionIndex = 20;
|
||||
g_globals->_soundHandler.fadeOut(this);
|
||||
} else {
|
||||
setDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
g_globals->_player.disableControl();
|
||||
break;
|
||||
}
|
||||
case 6: {
|
||||
scene->_object3.remove();
|
||||
g_globals->_player.setStrip2(2);
|
||||
NpcMover *mover = new NpcMover();
|
||||
Common::Point pt(480, 100);
|
||||
g_globals->_player.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
g_globals->_scenePalette.loadPalette(1002);
|
||||
g_globals->_scenePalette.refresh();
|
||||
g_globals->_scenePalette.addRotation(80, 95, -1);
|
||||
scene->_object3.postInit();
|
||||
scene->_object3.setVisage(1002);
|
||||
scene->_object3.setStrip(1);
|
||||
scene->_object3.setPosition(Common::Point(284, 122));
|
||||
scene->_object3.changeZoom(1);
|
||||
|
||||
zoom(true);
|
||||
setDelay(200);
|
||||
break;
|
||||
case 8:
|
||||
zoom(false);
|
||||
setDelay(10);
|
||||
break;
|
||||
case 9:
|
||||
scene->_object3.setStrip(2);
|
||||
scene->_object3.setPosition(Common::Point(285, 155));
|
||||
|
||||
zoom(true);
|
||||
setDelay(400);
|
||||
break;
|
||||
case 10:
|
||||
zoom(false);
|
||||
setDelay(10);
|
||||
break;
|
||||
case 11:
|
||||
scene->_object3.setStrip(3);
|
||||
scene->_object3.setPosition(Common::Point(279, 172));
|
||||
|
||||
zoom(true);
|
||||
setDelay(240);
|
||||
break;
|
||||
case 12:
|
||||
zoom(false);
|
||||
setDelay(10);
|
||||
break;
|
||||
case 13:
|
||||
scene->_object3.setStrip(4);
|
||||
scene->_object3.setPosition(Common::Point(270, 128));
|
||||
|
||||
zoom(true);
|
||||
setDelay(300);
|
||||
break;
|
||||
case 14:
|
||||
zoom(false);
|
||||
setDelay(10);
|
||||
break;
|
||||
case 15:
|
||||
scene->_object3.setStrip(1);
|
||||
scene->_object3.setFrame(2);
|
||||
scene->_object3.setPosition(Common::Point(283, 137));
|
||||
|
||||
zoom(true);
|
||||
setDelay(300);
|
||||
break;
|
||||
case 16:
|
||||
zoom(false);
|
||||
setDelay(10);
|
||||
break;
|
||||
case 17:
|
||||
scene->_object3.setStrip(5);
|
||||
scene->_object3.setFrame(1);
|
||||
scene->_object3.setPosition(Common::Point(292, 192));
|
||||
|
||||
zoom(true);
|
||||
setDelay(300);
|
||||
break;
|
||||
case 18:
|
||||
zoom(false);
|
||||
g_globals->_scenePalette.clearListeners();
|
||||
g_globals->_soundHandler.fadeOut(this);
|
||||
break;
|
||||
case 19:
|
||||
g_globals->_sceneManager.changeScene(10);
|
||||
break;
|
||||
case 20:
|
||||
g_globals->_sceneManager.changeScene(30);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1000::Action3::zoom(bool up) {
|
||||
Scene1000 *scene = (Scene1000 *)g_globals->_sceneManager._scene;
|
||||
|
||||
if (up) {
|
||||
while ((scene->_object3._percent < 100) && !g_vm->shouldQuit()) {
|
||||
scene->_object3.changeZoom(MIN(scene->_object3._percent + 5, 100));
|
||||
g_globals->_sceneObjects->draw();
|
||||
g_globals->_events.delay(1);
|
||||
}
|
||||
} else {
|
||||
while ((scene->_object3._percent > 0) && !g_vm->shouldQuit()) {
|
||||
scene->_object3.changeZoom(MAX(scene->_object3._percent - 5, 0));
|
||||
g_globals->_sceneObjects->draw();
|
||||
g_globals->_events.delay(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1000::postInit(SceneObjectList *OwnerList) {
|
||||
Scene::postInit();
|
||||
setZoomPercents(0, 100, 200, 100);
|
||||
loadScene(1000);
|
||||
|
||||
if (g_globals->_sceneManager._previousScene == 2000) {
|
||||
setZoomPercents(150, 10, 180, 100);
|
||||
_object1.postInit();
|
||||
_object1.setVisage(1001);
|
||||
_object1._strip = 7;
|
||||
_object1.animate(ANIM_MODE_2, 0);
|
||||
_object1._moveDiff = Common::Point(1, 1);
|
||||
_object1.setPosition(Common::Point(120, 180));
|
||||
|
||||
setAction(&_action2);
|
||||
|
||||
g_globals->_sceneManager._scene->_sceneBounds.center(_object1._position.x, _object1._position.y);
|
||||
g_globals->_sceneManager._scene->_sceneBounds.contain(g_globals->_sceneManager._scene->_backgroundBounds);
|
||||
|
||||
g_globals->_sceneOffset.x = (g_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
|
||||
g_globals->_soundHandler.play(114);
|
||||
} else if (g_globals->_sceneManager._previousScene == 2222) {
|
||||
setZoomPercents(150, 10, 180, 100);
|
||||
_object1.postInit();
|
||||
_object1.setVisage(1001);
|
||||
_object1._strip = 7;
|
||||
_object1.animate(ANIM_MODE_2, 0);
|
||||
_object1._moveDiff = Common::Point(2, 2);
|
||||
_object1.setPosition(Common::Point(120, 180));
|
||||
|
||||
g_globals->_sceneManager._scene->_sceneBounds.center(_object1._position.x, _object1._position.y);
|
||||
g_globals->_sceneManager._scene->_sceneBounds.contain(g_globals->_sceneManager._scene->_backgroundBounds);
|
||||
g_globals->_sceneOffset.x = (g_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
|
||||
|
||||
setAction(&_action1);
|
||||
} else {
|
||||
g_globals->_soundHandler.play(4);
|
||||
setZoomPercents(0, 10, 30, 100);
|
||||
_object3.postInit();
|
||||
_object3.setVisage(1050);
|
||||
_object3.changeZoom(-1);
|
||||
_object3.setPosition(Common::Point(158, 0));
|
||||
|
||||
g_globals->_player.postInit();
|
||||
g_globals->_player.setVisage(1050);
|
||||
g_globals->_player.setStrip(3);
|
||||
g_globals->_player.setPosition(Common::Point(160, 191));
|
||||
g_globals->_player._moveDiff.x = 12;
|
||||
g_globals->_player.hide();
|
||||
g_globals->_player.disableControl();
|
||||
|
||||
g_globals->_sceneManager._scene->_sceneBounds.center(_object3._position.x, _object3._position.y);
|
||||
|
||||
setAction(&_action3);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 1001 - Fleeing planet cutscene
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1001::Action1::signal() {
|
||||
Scene1001 *scene = (Scene1001 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(10);
|
||||
break;
|
||||
case 1:
|
||||
scene->_object3.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2: {
|
||||
Common::Point pt(108, 171);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object3.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
Common::Point pt(170, 159);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object3.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
scene->_object2.postInit();
|
||||
scene->_object2.setVisage(16);
|
||||
scene->_object2.setStrip2(4);
|
||||
scene->_object2.setPosition(Common::Point(61, 177));
|
||||
scene->_object2.animate(ANIM_MODE_5, this);
|
||||
|
||||
Common::Point pt(320, 100);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object3.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
Common::Point pt(82, 166);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object2.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 6: {
|
||||
Common::Point pt(64, 149);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object2.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 7: {
|
||||
Common::Point pt(15, 136);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object2.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
Common::Point pt(-5, 120);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object2.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 9: {
|
||||
scene->_object1.postInit();
|
||||
scene->_object1.setVisage(16);
|
||||
scene->_object1.setStrip2(1);
|
||||
scene->_object1.setFrame(1);
|
||||
scene->_object1.setPosition(Common::Point(-75, 87));
|
||||
scene->_object1.animate(ANIM_MODE_2, NULL);
|
||||
|
||||
Common::Point pt(0, 100);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object1.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
Common::Point pt1(107, 115);
|
||||
NpcMover *mover1 = new NpcMover();
|
||||
scene->_object1.addMover(mover1, &pt1, NULL);
|
||||
|
||||
scene->_object3.setVisage(16);
|
||||
scene->_object3.setStrip2(5);
|
||||
scene->_object3.setFrame2(2);
|
||||
scene->_object3.setPosition(Common::Point(220, 200));
|
||||
|
||||
Common::Point pt2(187, 181);
|
||||
NpcMover *mover2 = new NpcMover();
|
||||
scene->_object3.addMover(mover2, &pt2, this);
|
||||
break;
|
||||
}
|
||||
case 11: {
|
||||
scene->_object2.setVisage(16);
|
||||
scene->_object2.setStrip2(5);
|
||||
scene->_object2.setFrame2(1);
|
||||
scene->_object2.setPosition(Common::Point(211, 0));
|
||||
|
||||
Common::Point pt(189, 30);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object2.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
scene->_stripManager.start(100, this);
|
||||
break;
|
||||
case 13: {
|
||||
scene->_object4.postInit();
|
||||
scene->_object4.setVisage(16);
|
||||
scene->_object4.setStrip2(2);
|
||||
scene->_object4.setFrame(4);
|
||||
scene->_object4.setPosition(Common::Point(360, 80));
|
||||
scene->_object4.animate(ANIM_MODE_2, NULL);
|
||||
|
||||
Common::Point pt(303, 97);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object4.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
scene->_stripManager.start(110, this);
|
||||
break;
|
||||
case 15:
|
||||
setDelay(10);
|
||||
break;
|
||||
case 16: {
|
||||
scene->_soundHandler1.play(90);
|
||||
|
||||
scene->_object6.postInit();
|
||||
scene->_object6.setVisage(16);
|
||||
scene->_object6.setStrip2(6);
|
||||
scene->_object6.setFrame2(2);
|
||||
scene->_object6._moveDiff = Common::Point(20, 20);
|
||||
scene->_object6.fixPriority(20);
|
||||
scene->_object6.setPosition(Common::Point(scene->_object2._position.x - 6, scene->_object2._position.y + 7));
|
||||
scene->_object6.animate(ANIM_MODE_5, NULL);
|
||||
|
||||
Common::Point pt(scene->_object6._position.x - 70, scene->_object6._position.y + 70);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object6.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 17: {
|
||||
scene->_soundHandler1.play(90);
|
||||
scene->_object6.remove();
|
||||
|
||||
scene->_object7.postInit();
|
||||
scene->_object7.setVisage(16);
|
||||
scene->_object7.setStrip2(6);
|
||||
scene->_object7.setFrame2(1);
|
||||
scene->_object7._moveDiff = Common::Point(20, 20);
|
||||
scene->_object7.setPosition(Common::Point(scene->_object3._position.x - 28, scene->_object3._position.y - 11));
|
||||
scene->_object7.fixPriority(200);
|
||||
scene->_object7.animate(ANIM_MODE_5, NULL);
|
||||
|
||||
Common::Point pt(scene->_object7._position.x - 70, scene->_object7._position.y - 70);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object7.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 18:
|
||||
scene->_object7.remove();
|
||||
|
||||
scene->_object5.postInit();
|
||||
scene->_object5.setVisage(16);
|
||||
scene->_object5.setPosition(Common::Point(306, 93));
|
||||
scene->_object5._strip = 3;
|
||||
scene->_object5.fixPriority(200);
|
||||
scene->_object5.animate(ANIM_MODE_2, NULL);
|
||||
setDelay(30);
|
||||
break;
|
||||
case 19: {
|
||||
g_globals->_soundHandler.play(91);
|
||||
byte adjustData[4] = {0xff, 0xff, 0xff, 0};
|
||||
g_globals->_scenePalette.fade(adjustData, false, 0);
|
||||
|
||||
scene->_object1._strip = 7;
|
||||
scene->_object1._frame = 1;
|
||||
scene->_object1.setPosition(Common::Point(314, 112));
|
||||
scene->_object1.addMover(NULL);
|
||||
setDelay(2);
|
||||
break;
|
||||
}
|
||||
case 20:
|
||||
g_globals->_scenePalette.loadPalette(16);
|
||||
g_globals->_scenePalette.refresh();
|
||||
setDelay(6);
|
||||
break;
|
||||
case 21:
|
||||
scene->_object1._numFrames = 15;
|
||||
scene->_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 22:
|
||||
g_globals->_soundHandler.play(92);
|
||||
scene->_stripManager.start(111, this);
|
||||
break;
|
||||
case 23:
|
||||
setDelay(60);
|
||||
break;
|
||||
case 24:
|
||||
g_globals->_sceneManager.changeScene(2000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1001::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(16);
|
||||
Scene::postInit();
|
||||
setZoomPercents(0, 100, 200, 100);
|
||||
|
||||
_stripManager.addSpeaker(&_speakerQText);
|
||||
_stripManager.addSpeaker(&_speakerCText);
|
||||
_stripManager.addSpeaker(&_speakerCR);
|
||||
_stripManager.addSpeaker(&_speakerSL);
|
||||
_speakerQText._color1 = 11;
|
||||
|
||||
_object3.postInit();
|
||||
_object3.setVisage(16);
|
||||
_object3.setStrip2(4);
|
||||
_object3.setPosition(Common::Point(61, 177));
|
||||
|
||||
g_globals->_soundHandler.play(85);
|
||||
setAction(&_action1);
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 1250 -
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1250::Action1::signal() {
|
||||
Scene1250 *scene = (Scene1250 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(g_globals->_randomSource.getRandomNumber(120) + 60);
|
||||
break;
|
||||
case 1:
|
||||
scene->_object1.animate(ANIM_MODE_5, this);
|
||||
_actionIndex = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1250::Action2::signal() {
|
||||
Scene1250 *scene = (Scene1250 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
switch (g_globals->_randomSource.getRandomNumber(2)) {
|
||||
case 0:
|
||||
scene->_object2.setPosition(Common::Point(163, 75));
|
||||
break;
|
||||
case 1:
|
||||
scene->_object2.setPosition(Common::Point(109, 65));
|
||||
break;
|
||||
case 2:
|
||||
scene->_object2.setPosition(Common::Point(267, 20));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
setDelay(30);
|
||||
break;
|
||||
case 1:
|
||||
scene->_object2.animate(ANIM_MODE_5, this);
|
||||
_actionIndex = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1250::Action3::signal() {
|
||||
Scene1250 *scene = (Scene1250 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(30);
|
||||
break;
|
||||
case 1:
|
||||
scene->_stripManager.start(1251, this);
|
||||
break;
|
||||
case 2:
|
||||
setDelay(6);
|
||||
break;
|
||||
case 3:
|
||||
g_globals->_sceneManager.changeScene(1000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1250::Action4::signal() {
|
||||
Scene1250 *scene = (Scene1250 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(3);
|
||||
break;
|
||||
case 1:
|
||||
scene->_stripManager.start(1250, this);
|
||||
break;
|
||||
case 2:
|
||||
setDelay(6);
|
||||
break;
|
||||
case 3:
|
||||
g_globals->_sceneManager.changeScene(2000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1250::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(1250);
|
||||
Scene::postInit();
|
||||
setZoomPercents(0, 100, 200, 100);
|
||||
|
||||
_stripManager.addSpeaker(&_speakerQText);
|
||||
_speakerQText._textPos = Common::Point(120, 120);
|
||||
_speakerQText._textWidth = 180;
|
||||
|
||||
_object1.postInit();
|
||||
_object1.setVisage(1250);
|
||||
_object1.setPosition(Common::Point(126, 69));
|
||||
_object1.setStrip2(1);
|
||||
_object1._frame = 1;
|
||||
_object1.setAction(&_action1);
|
||||
|
||||
_object2.postInit();
|
||||
_object2.setVisage(1250);
|
||||
_object2.setPosition(Common::Point(126, 69));
|
||||
_object2.setStrip2(2);
|
||||
_object2.fixPriority(255);
|
||||
_object2._frame = 1;
|
||||
_object2.setAction(&_action2);
|
||||
|
||||
g_globals->_sceneManager._scene->_sceneBounds.contain(g_globals->_sceneManager._scene->_backgroundBounds);
|
||||
g_globals->_sceneOffset.x = (g_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
|
||||
|
||||
if ((g_globals->_sceneManager._previousScene != 2000) || (g_globals->_stripNum != 1250)) {
|
||||
setAction(&_action4);
|
||||
} else {
|
||||
setAction(&_action3);
|
||||
g_globals->_soundHandler.play(114);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 1400 - Ringworld Wall
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1400::Action1::signal() {
|
||||
Scene1400 *scene = (Scene1400 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(5);
|
||||
break;
|
||||
case 1: {
|
||||
SceneItem::display(1400, 0, SET_X, 120, SET_Y, 610, SET_FONT, 2, SET_EXT_BGCOLOR, 23, SET_KEEP_ONSCREEN, -1, LIST_END);
|
||||
|
||||
Common::Point pt(160, 700);
|
||||
NpcMover *mover = new NpcMover();
|
||||
g_globals->_player.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
g_globals->_player.setStrip2(3);
|
||||
g_globals->_player.changeZoom(100);
|
||||
|
||||
Common::Point pt(160, 100);
|
||||
NpcMover *mover = new NpcMover();
|
||||
g_globals->_player.addMover(mover, &pt, this);
|
||||
|
||||
SceneItem::display(0, 0);
|
||||
setDelay(360);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
SceneItem::display(1400, 2, SET_X, 60, SET_Y, g_globals->_sceneManager._scene->_sceneBounds.bottom - 80,
|
||||
SET_FONT, 2, SET_FG_COLOR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
|
||||
setDelay(420);
|
||||
break;
|
||||
case 4:
|
||||
SceneItem::display(0, 0);
|
||||
setDelay(360);
|
||||
break;
|
||||
case 5:
|
||||
SceneItem::display(1400, 3, SET_X, 60, SET_Y, g_globals->_sceneManager._scene->_sceneBounds.bottom - 80,
|
||||
SET_FONT, 2, SET_FG_COLOR, 23, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
|
||||
setDelay(360);
|
||||
break;
|
||||
case 6:
|
||||
SceneItem::display(0, 0);
|
||||
break;
|
||||
case 7: {
|
||||
g_globals->_player._frame = 1;
|
||||
g_globals->_player.setStrip2(1);
|
||||
g_globals->_player._numFrames = 5;
|
||||
g_globals->_player.animate(ANIM_MODE_5, this);
|
||||
|
||||
Common::Point pt(205, 70);
|
||||
NpcMover *mover = new NpcMover();
|
||||
g_globals->_player.addMover(mover, &pt, NULL);
|
||||
g_globals->_sceneManager._fadeMode = FADEMODE_NONE;
|
||||
|
||||
scene->loadScene(1402);
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
g_globals->_player.setStrip2(2);
|
||||
g_globals->_player._numFrames = 10;
|
||||
g_globals->_player.animate(ANIM_MODE_2, NULL);
|
||||
|
||||
SceneItem::display(1400, 4, SET_X, 30, SET_Y, g_globals->_player._position.y + 10, SET_FONT, 2,
|
||||
SET_FG_COLOR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
|
||||
setDelay(300);
|
||||
break;
|
||||
case 9: {
|
||||
SceneItem::display(0, 0);
|
||||
Common::Point pt(450, 45);
|
||||
NpcMover *mover = new NpcMover();
|
||||
g_globals->_player.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
g_globals->_sceneManager._scrollerRect = Rect(40, 20, 280, 180);
|
||||
g_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
|
||||
g_globals->_stripNum = 1500;
|
||||
g_globals->_soundHandler.stop();
|
||||
|
||||
g_globals->_sceneManager.changeScene(1500);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1400::Action1::dispatch() {
|
||||
Action::dispatch();
|
||||
|
||||
if ((_actionIndex > 3) && (_actionIndex < 9))
|
||||
g_globals->_sceneText.setPosition(Common::Point(60, g_globals->_sceneManager._scene->_sceneBounds.bottom - 80));
|
||||
|
||||
if ((_actionIndex <= 2) && (g_globals->_player._percent > 22))
|
||||
g_globals->_player.changeZoom(100 - (800 - g_globals->_player._position.y));
|
||||
|
||||
if ((_actionIndex >= 9) && (g_globals->_player._percent > 22))
|
||||
g_globals->_player.changeZoom(100 - (g_globals->_player._position.x - 205));
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1400::postInit(SceneObjectList *OwnerList) {
|
||||
if (g_globals->_stripNum != 1400) {
|
||||
loadScene(1401);
|
||||
} else {
|
||||
loadScene(1402);
|
||||
}
|
||||
Scene::postInit();
|
||||
|
||||
g_globals->_sceneManager._scrollerRect = Rect(40, 90, 280, 180);
|
||||
g_globals->_player.postInit();
|
||||
g_globals->_player.setVisage(1401);
|
||||
g_globals->_player.animate(ANIM_MODE_2, 0);
|
||||
g_globals->_player.setStrip2(4);
|
||||
g_globals->_player.fixPriority(4);
|
||||
g_globals->_player.disableControl();
|
||||
|
||||
g_globals->_player._moveDiff = Common::Point(4, 2);
|
||||
g_globals->_player.setPosition(Common::Point(160, 800));
|
||||
g_globals->_sceneManager._scene->_sceneBounds.center(g_globals->_player._position);
|
||||
g_globals->_sceneManager._scene->_sceneBounds.contain(g_globals->_sceneManager._scene->_backgroundBounds);
|
||||
g_globals->_sceneOffset.y = (g_globals->_sceneManager._scene->_sceneBounds.top / 100) * 100;
|
||||
|
||||
setAction(&_action1);
|
||||
g_globals->_soundHandler.play(118);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 1500 - Ringworld Space-port
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1500::Action1::signal() {
|
||||
Scene1500 *scene = (Scene1500 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0: {
|
||||
scene->_object1.postInit();
|
||||
scene->_object1.setVisage(1501);
|
||||
scene->_object1._moveDiff = Common::Point(2, 1);
|
||||
scene->_object1.setPosition(Common::Point(204, 85));
|
||||
scene->_object1.animate(ANIM_MODE_2, NULL);
|
||||
scene->_object1._numFrames = 3;
|
||||
scene->_object1.changeZoom(-1);
|
||||
|
||||
Common::Point pt(238, 121);
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
scene->_object1.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
Common::Point pt(312, 145);
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
scene->_object1.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
scene->_object1.setStrip(2);
|
||||
scene->_object1.setFrame(1);
|
||||
scene->_object1._moveDiff.y = 2;
|
||||
scene->_object1._numFrames = 5;
|
||||
|
||||
Common::Point pt(310, 150);
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
scene->_object1.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
Common::Point pt(304, 165);
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
scene->_object1.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
scene->_object1._numFrames = 3;
|
||||
scene->_object1.setStrip2(3);
|
||||
scene->_object1.animate(ANIM_MODE_2, this);
|
||||
|
||||
Common::Point pt(94, 175);
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
scene->_object1.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
setDelay(30);
|
||||
break;
|
||||
case 6:
|
||||
scene->_soundHandler.play(123);
|
||||
scene->_object1.setStrip2(4);
|
||||
scene->_object1.setFrame(1);
|
||||
scene->_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 7:
|
||||
scene->_object1.setStrip2(5);
|
||||
scene->_object1.animate(ANIM_MODE_2, NULL);
|
||||
scene->_soundHandler.play(124, this);
|
||||
break;
|
||||
case 8:
|
||||
g_globals->_soundHandler.play(126, this);
|
||||
break;
|
||||
case 9:
|
||||
g_globals->_soundHandler.play(127);
|
||||
g_globals->_sceneManager.changeScene(2000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene1500::Action2::signal() {
|
||||
Scene1500 *scene = (Scene1500 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(6);
|
||||
break;
|
||||
case 1: {
|
||||
scene->_object2.postInit();
|
||||
scene->_object2.setVisage(1502);
|
||||
scene->_object2.fixPriority(255);
|
||||
scene->_object2.changeZoom(5);
|
||||
scene->_object2._frame = 1;
|
||||
scene->_object2._moveDiff = Common::Point(1, 1);
|
||||
scene->_object2.setPosition(Common::Point(104, 184));
|
||||
scene->_object2.animate(ANIM_MODE_2, NULL);
|
||||
|
||||
Common::Point pt(118, 147);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object2.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
scene->_object2._moveDiff.x = 5;
|
||||
scene->_object2.changeZoom(-1);
|
||||
Common::Point pt(-55, 200);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_object2.addMover(mover, &pt, this);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
scene->_soundHandler.release();
|
||||
g_globals->_stripNum = 1505;
|
||||
g_globals->_sceneManager.changeScene(2400);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene1500::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(1500);
|
||||
Scene::postInit();
|
||||
|
||||
if ((g_globals->_stripNum == 1500) || ((g_globals->_stripNum != 1504) && (g_globals->_stripNum != 2751))) {
|
||||
g_globals->_soundHandler.play(120);
|
||||
setZoomPercents(105, 20, 145, 100);
|
||||
|
||||
setAction(&_action1);
|
||||
} else {
|
||||
setZoomPercents(150, 5, 200, 100);
|
||||
|
||||
_object1.postInit();
|
||||
_object1.setVisage(1501);
|
||||
_object1.setStrip2(5);
|
||||
_object1.setPosition(Common::Point(94, 175));
|
||||
_object1.animate(ANIM_MODE_2, NULL);
|
||||
|
||||
setAction(&_action2);
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
153
engines/tsage/ringworld/ringworld_scenes2.h
Normal file
153
engines/tsage/ringworld/ringworld_scenes2.h
Normal file
@@ -0,0 +1,153 @@
|
||||
/* 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_RINGWORLD_SCENES2_H
|
||||
#define TSAGE_RINGWORLD_SCENES2_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene1000 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3 : public Action {
|
||||
private:
|
||||
void zoom(bool up);
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
SceneObject _object1, _object2, _object3, _object4;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene1001 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerCText _speakerCText;
|
||||
SpeakerCR _speakerCR;
|
||||
Action1 _action1;
|
||||
SceneObject _object1, _object2, _object3, _object4;
|
||||
SceneObject _object5, _object6, _object7;
|
||||
ASound _soundHandler1, _soundHandler2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene1250 : public Scene {
|
||||
public:
|
||||
/* 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;
|
||||
};
|
||||
public:
|
||||
SpeakerQText _speakerQText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
SceneObject _object1, _object2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene1400 : public Scene {
|
||||
public:
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
public:
|
||||
Action1 _action1;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
|
||||
};
|
||||
|
||||
class Scene1500 : public Scene {
|
||||
public:
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
SceneObject _object1, _object2, _object3;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
6291
engines/tsage/ringworld/ringworld_scenes3.cpp
Normal file
6291
engines/tsage/ringworld/ringworld_scenes3.cpp
Normal file
File diff suppressed because it is too large
Load Diff
901
engines/tsage/ringworld/ringworld_scenes3.h
Normal file
901
engines/tsage/ringworld/ringworld_scenes3.h
Normal file
@@ -0,0 +1,901 @@
|
||||
/* 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_RINGWORLD_SCENES3_H
|
||||
#define TSAGE_RINGWORLD_SCENES3_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene2000 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
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 Action8 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action9 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action10 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action11 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action12 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action13 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action14 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerMR _speakerMR;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerHText _speakerHText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
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;
|
||||
Action14 _action14;
|
||||
SceneObject _object1, _object2, _object3, _object4, _object5;
|
||||
SceneObject _object6, _object7, _object8, _object9, _object10;
|
||||
ASound _soundHandler1, _soundHandler2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void stripCallback(int v) override;
|
||||
};
|
||||
|
||||
class Scene2100 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public ActionExt {
|
||||
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 Action8 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action9 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action10 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action11 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action12 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action13 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action14 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action15 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action16 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action17 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot3 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot4 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot10 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot14 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Object1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object3 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
ASound _soundHandler;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerMR _speakerMR;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerSAL _speakerSAL;
|
||||
SpeakerHText _speakerHText;
|
||||
|
||||
DisplayHotspot _hotspot1;
|
||||
Hotspot2 _hotspot2;
|
||||
Hotspot3 _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
DisplayHotspot _hotspot5, _hotspot6, _hotspot7;
|
||||
Hotspot8 _hotspot8;
|
||||
DisplayHotspot _hotspot9;
|
||||
Hotspot10 _hotspot10;
|
||||
DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
|
||||
Hotspot14 _hotspot14;
|
||||
DisplayHotspot _hotspot15;
|
||||
|
||||
Object1 _object1;
|
||||
Object2 _object2;
|
||||
Object3 _object3;
|
||||
SceneObject _object4;
|
||||
|
||||
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;
|
||||
Action14 _action14;
|
||||
Action15 _action15;
|
||||
Action16 _action16;
|
||||
Action17 _action17;
|
||||
bool _sitFl;
|
||||
SceneArea _area1, _area2, _area3, _area4;
|
||||
|
||||
Scene2100();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void stripCallback(int v) override;
|
||||
void signal() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene2120 : public Scene {
|
||||
/* Actions */
|
||||
class Entry {
|
||||
public:
|
||||
int _size;
|
||||
int _lineNum;
|
||||
int _visage;
|
||||
|
||||
Entry() { _size = 0; _lineNum = 0; _visage = 0; }
|
||||
Entry(int size, int lineNum, int visage) { _size = size; _lineNum = lineNum; _visage = visage; }
|
||||
};
|
||||
|
||||
class Action1 : public Action {
|
||||
private:
|
||||
Common::Array<Entry> _entries;
|
||||
public:
|
||||
Action1();
|
||||
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SceneObject _topicArrowHotspot, _arrowHotspot, _visageHotspot;
|
||||
SceneObject _subjectButton, _nextPageButton, _previousPageButton, _exitButton;
|
||||
Action1 _action1;
|
||||
Rect _listRect;
|
||||
int _dbMode, _prevDbMode;
|
||||
bool _visageVisable;
|
||||
int _subjectIndex;
|
||||
int _lineOffset;
|
||||
|
||||
Scene2120();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class Scene2150 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public ActionExt {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot4 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot7 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot10 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerGameText _speakerGameText;
|
||||
|
||||
Rect _rect1, _rect2;
|
||||
Hotspot1 _hotspot1;
|
||||
Hotspot2 _hotspot2;
|
||||
DisplayHotspot _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
DisplayHotspot _hotspot5, _hotspot6;
|
||||
Hotspot7 _hotspot7;
|
||||
DisplayHotspot _hotspot8, _hotspot9;
|
||||
Hotspot10 _hotspot10;
|
||||
DisplayHotspot _hotspot11;
|
||||
SceneObject _hotspot12, _hotspot13, _hotspot14;
|
||||
SceneArea _area1, _area2, _area3, _area4;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
|
||||
Scene2150();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene2200 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3 : public ActionExt {
|
||||
public:
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
class Action4 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot3 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot5 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot9 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerMR _speakerMR;
|
||||
SpeakerGameText _speakerGameText;
|
||||
Rect _exitRect;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
DisplayHotspot _hotspot1;
|
||||
Hotspot3 _hotspot3;
|
||||
Hotspot5 _hotspot5;
|
||||
Hotspot9 _hotspot9;
|
||||
DisplayHotspot _hotspot10;
|
||||
SceneObject _hotspot2, _hotspot4;
|
||||
SceneObject _hotspot6, _hotspot7, _hotspot8;
|
||||
ASound _soundHandler1, _soundHandler2;
|
||||
|
||||
Scene2200();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void stripCallback(int v) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene2222 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerML _speakerML;
|
||||
SpeakerSR _speakerSR;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene2230 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
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 Action8 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot3 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot4 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot5 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot6 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot7 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot10 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot11 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot12 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Action7 _action7;
|
||||
Action8 _action8;
|
||||
Hotspot1 _hotspot1;
|
||||
Hotspot3 _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
SceneObject _hotspot2;
|
||||
Hotspot5 _hotspot5;
|
||||
Hotspot6 _hotspot6;
|
||||
Hotspot7 _hotspot7;
|
||||
Hotspot8 _hotspot8;
|
||||
DisplayHotspot _hotspot9;
|
||||
Hotspot10 _hotspot10;
|
||||
Hotspot11 _hotspot11;
|
||||
Hotspot12 _hotspot12;
|
||||
Rect _rect1;
|
||||
int _sceneMode;
|
||||
|
||||
Scene2230();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene2280 : public Scene {
|
||||
/* 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 ActionExt {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot4 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot7 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot10 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot12 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot14 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot15 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot16 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot17 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot18 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SequenceManager _sequenceManager;
|
||||
Rect _exitRect;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Hotspot1 _hotspot1;
|
||||
Hotspot2 _hotspot2;
|
||||
DisplayHotspot _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
DisplayHotspot _hotspot5, _hotspot6;
|
||||
Hotspot7 _hotspot7;
|
||||
Hotspot8 _hotspot8;
|
||||
DisplayHotspot _hotspot9;
|
||||
Hotspot10 _hotspot10;
|
||||
DisplayHotspot _hotspot11;
|
||||
Hotspot12 _hotspot12;
|
||||
DisplayHotspot _hotspot13;
|
||||
Hotspot14 _hotspot14;
|
||||
DisplayHotspot _hotspot15, _hotspot16;
|
||||
Hotspot17 _hotspot17;
|
||||
Hotspot18 _hotspot18;
|
||||
|
||||
Scene2280();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene2300 : public Scene {
|
||||
/* 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 ActionExt {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot5 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot7 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler1, _soundHandler2;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSText _speakerSText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4;
|
||||
Hotspot5 _hotspot5;
|
||||
SceneObject _hotspot6;
|
||||
Hotspot7 _hotspot7;
|
||||
SceneObject _hotspot8, _hotspot9, _hotspot10;
|
||||
DisplayHotspot _hotspot11, _hotspot12, _hotspot13, _hotspot14, _hotspot15;
|
||||
|
||||
Scene2300();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene2310 : public Scene {
|
||||
private:
|
||||
int findObject(int objIndex);
|
||||
|
||||
/* Custom classes */
|
||||
class ProtectionEntry {
|
||||
public:
|
||||
int _pageNumber;
|
||||
int _connectionList[5];
|
||||
|
||||
void set(int pageNumber, int v1, int v2, int v3, int v4, int v5) {
|
||||
_pageNumber = pageNumber;
|
||||
_connectionList[0] = v1; _connectionList[1] = v2; _connectionList[2] = v3;
|
||||
_connectionList[3] = v4; _connectionList[4] = v5;
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
int _wireIndex, _pageIndex;
|
||||
SceneObject _wireList[5];
|
||||
Rect _rectList[5];
|
||||
SceneText _sceneText;
|
||||
ProtectionEntry _pageList[21];
|
||||
|
||||
Scene2310();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene2320 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3 : public ActionExt {
|
||||
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 Action8 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot5 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot6 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot10 : public SceneObjectExt {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot11 : public SceneObjectExt {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot12 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot14 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot15 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SequenceManager _sequenceManager1, _sequenceManager2;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerMR _speakerMR;
|
||||
SpeakerML _speakerML;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerSAL _speakerSAL;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerSR _speakerSR;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
SceneArea _area1, _area2, _area3, _area4;
|
||||
DisplayHotspot _hotspot1, _hotspot2, _hotspot3, _hotspot4;
|
||||
Hotspot5 _hotspot5;
|
||||
Hotspot6 _hotspot6;
|
||||
SceneObject _hotspot7, _hotspot9;
|
||||
Hotspot8 _hotspot8;
|
||||
Hotspot10 _hotspot10;
|
||||
Hotspot11 _hotspot11;
|
||||
Hotspot12 _hotspot12;
|
||||
DisplayHotspot _hotspot13;
|
||||
Hotspot14 _hotspot14;
|
||||
Hotspot15 _hotspot15;
|
||||
SceneObject _hotspot16;
|
||||
SceneItem *_hotspotPtr;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Action7 _action7;
|
||||
Action8 _action8;
|
||||
|
||||
Scene2320();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void synchronize(Serializer &s) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene2400 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
public:
|
||||
Action1 _action1;
|
||||
SceneObject _object;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
259
engines/tsage/ringworld/ringworld_scenes4.cpp
Normal file
259
engines/tsage/ringworld/ringworld_scenes4.cpp
Normal file
@@ -0,0 +1,259 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "tsage/ringworld/ringworld_scenes4.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/tsage.h"
|
||||
#include "tsage/staticres.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 3500 - Ringworld Scan
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene3500::Action1::signal() {
|
||||
Scene3500 *scene = (Scene3500 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(10);
|
||||
break;
|
||||
case 1:
|
||||
scene->_stripManager.start(3500, this);
|
||||
break;
|
||||
case 2:
|
||||
setDelay(3);
|
||||
break;
|
||||
case 3:
|
||||
g_globals->_sceneManager.changeScene(9999);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene3500::Action2::signal() {
|
||||
Scene3500 *scene = (Scene3500 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(10);
|
||||
break;
|
||||
case 1:
|
||||
scene->_stripManager.start(3501, this);
|
||||
break;
|
||||
case 2:
|
||||
setDelay(3);
|
||||
break;
|
||||
case 3:
|
||||
g_globals->_sceneManager.changeScene(2012);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene3500::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene((g_globals->_stripNum == 3600) ? 3600 : 3500);
|
||||
Scene::postInit();
|
||||
|
||||
_stripManager.addSpeaker(&_speakerQText);
|
||||
_stripManager.addSpeaker(&_speakerMText);
|
||||
_stripManager.addSpeaker(&_speakerSText);
|
||||
|
||||
g_globals->_sceneManager._scene->_sceneBounds.contain(g_globals->_sceneManager._scene->_backgroundBounds);
|
||||
g_globals->_sceneOffset.x = (g_globals->_sceneManager._scene->_sceneBounds.top / 160) * 160;
|
||||
|
||||
setAction((g_globals->_stripNum == 3600) ? (Action *)&_action2 : (Action *)&_action1);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 3700 - Remote Viewer
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
#define VIEW_FRAME_DELAY 10
|
||||
|
||||
Scene3700::Viewer::Viewer() {
|
||||
_images1.setVisage(3705, 1);
|
||||
_images2.setVisage(3705, 2);
|
||||
|
||||
_frameList[0] = 1;
|
||||
for (int idx = 1; idx <= 3; ++idx)
|
||||
_frameList[idx] = g_globals->_randomSource.getRandomNumber(4) + 1;
|
||||
|
||||
_active = true;
|
||||
_countdownCtr = 0;
|
||||
_percentList[0] = 120;
|
||||
_percentList[1] = 50;
|
||||
_percentList[2] = 75;
|
||||
_percentList[3] = 114;
|
||||
}
|
||||
|
||||
void Scene3700::Viewer::synchronize(Serializer &s) {
|
||||
SceneObject::synchronize(s);
|
||||
s.syncAsByte(_active);
|
||||
s.syncAsSint16LE(_countdownCtr);
|
||||
for (int idx = 0; idx < 4; ++idx) {
|
||||
s.syncAsSint16LE(_frameList[idx]);
|
||||
s.syncAsSint16LE(_percentList[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene3700::Viewer::dispatch() {
|
||||
if (_active) {
|
||||
if (_countdownCtr-- <= 0) {
|
||||
_countdownCtr = VIEW_FRAME_DELAY;
|
||||
|
||||
for (int idx = 3; idx > 1; --idx)
|
||||
_frameList[idx] = _frameList[idx - 1];
|
||||
|
||||
int newFrame;
|
||||
do {
|
||||
newFrame = g_globals->_randomSource.getRandomNumber(4) + 1;
|
||||
} while (newFrame == _frameList[2]);
|
||||
|
||||
_frameList[1] = newFrame;
|
||||
_flags |= OBJFLAG_PANES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Scene3700::Viewer::reposition() {
|
||||
_bounds = Rect(123, 40, 285, 123);
|
||||
}
|
||||
|
||||
void Scene3700::Viewer::draw() {
|
||||
Region *priorityRegion = g_globals->_sceneManager._scene->_priorities.find(1);
|
||||
|
||||
for (int idx = 0; idx < 4; ++idx) {
|
||||
Visage &v = (idx == 0) ? _images1 : _images2;
|
||||
|
||||
GfxSurface img = v.getFrame(_frameList[idx]);
|
||||
Rect destRect = img.getBounds();
|
||||
destRect.resize(img, (_position.x - g_globals->_sceneOffset.x),
|
||||
(_position.y - g_globals->_sceneOffset.y - _yDiff), _percentList[idx]);
|
||||
|
||||
destRect.translate(-g_globals->_sceneManager._scene->_sceneBounds.left,
|
||||
-g_globals->_sceneManager._scene->_sceneBounds.top);
|
||||
|
||||
g_globals->gfxManager().copyFrom(img, destRect, priorityRegion);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene3700::Action1::signal() {
|
||||
Scene3700 *scene = (Scene3700 *)g_globals->_sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(10);
|
||||
break;
|
||||
case 1:
|
||||
scene->_stripManager.start(2162, this);
|
||||
break;
|
||||
case 2:
|
||||
scene->_viewer._active = false;
|
||||
setDelay(90);
|
||||
break;
|
||||
case 3:
|
||||
scene->_soundHandler.play(196);
|
||||
scene->_viewer.hide();
|
||||
|
||||
scene->_hotspot1.postInit();
|
||||
scene->_hotspot1.setVisage(3710);
|
||||
scene->_hotspot1.setStrip(1);
|
||||
scene->_hotspot1.setFrame(1);
|
||||
scene->_hotspot1.setPosition(Common::Point(204, 120));
|
||||
|
||||
setDelay(90);
|
||||
break;
|
||||
case 4:
|
||||
scene->_soundHandler.play(197);
|
||||
scene->_hotspot1.hide();
|
||||
|
||||
scene->_hotspot2.postInit();
|
||||
scene->_hotspot2.setVisage(3710);
|
||||
scene->_hotspot2.setStrip(2);
|
||||
scene->_hotspot2.setFrame(1);
|
||||
scene->_hotspot2.setPosition(Common::Point(204, 120));
|
||||
|
||||
setDelay(30);
|
||||
break;
|
||||
case 5:
|
||||
scene->_soundHandler.play(198);
|
||||
scene->_hotspot2.hide();
|
||||
scene->_hotspot1.show();
|
||||
setDelay(90);
|
||||
break;
|
||||
case 6:
|
||||
scene->_stripManager.start(2166, this);
|
||||
break;
|
||||
case 7:
|
||||
setDelay(60);
|
||||
break;
|
||||
case 8:
|
||||
scene->_hotspot1.remove();
|
||||
scene->_hotspot2.show();
|
||||
g_globals->setFlag(59);
|
||||
setDelay(30);
|
||||
break;
|
||||
case 9:
|
||||
g_globals->_sceneManager.changeScene(2100);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene3700::postInit(TsAGE::SceneObjectList *OwnerList) {
|
||||
Scene::postInit();
|
||||
loadScene(3700);
|
||||
|
||||
_stripManager.addSpeaker(&_speakerSText);
|
||||
_stripManager.addSpeaker(&_speakerMText);
|
||||
_stripManager.addSpeaker(&_speakerMR);
|
||||
_speakerSText.setTextPos(Common::Point(20, 15));
|
||||
_speakerMText.setTextPos(Common::Point(20, 15));
|
||||
|
||||
_viewer.postInit();
|
||||
_viewer.setVisage(3705);
|
||||
_viewer.setStrip(1);
|
||||
_viewer.setFrame(2);
|
||||
_viewer.setPosition(Common::Point(195, 83));
|
||||
|
||||
setAction(&_action1);
|
||||
g_globals->_soundHandler.play(195);
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
98
engines/tsage/ringworld/ringworld_scenes4.h
Normal file
98
engines/tsage/ringworld/ringworld_scenes4.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/* 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_RINGWORLD_SCENES4_H
|
||||
#define TSAGE_RINGWORLD_SCENES4_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene3500 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerQText _speakerQText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene3700 : public Scene {
|
||||
/* Custom classes */
|
||||
class Viewer : public SceneObject {
|
||||
public:
|
||||
Visage _images1;
|
||||
Visage _images2;
|
||||
|
||||
int _frameList[4];
|
||||
int _percentList[4];
|
||||
bool _active;
|
||||
int _countdownCtr;
|
||||
|
||||
Viewer();
|
||||
Common::String getClassName() override { return "Viewer"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
void dispatch() override;
|
||||
void reposition() override;
|
||||
void draw() override;
|
||||
};
|
||||
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
public:
|
||||
Viewer _viewer;
|
||||
Action1 _action1;
|
||||
SceneObject _hotspot1, _hotspot2;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerMR _speakerMR;
|
||||
ASound _soundHandler;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
4564
engines/tsage/ringworld/ringworld_scenes5.cpp
Normal file
4564
engines/tsage/ringworld/ringworld_scenes5.cpp
Normal file
File diff suppressed because it is too large
Load Diff
698
engines/tsage/ringworld/ringworld_scenes5.h
Normal file
698
engines/tsage/ringworld/ringworld_scenes5.h
Normal file
@@ -0,0 +1,698 @@
|
||||
/* 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_RINGWORLD_SCENES5_H
|
||||
#define TSAGE_RINGWORLD_SCENES5_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene4000 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
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 Action8 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action9 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action10 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action11 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action12 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action13 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Miranda : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
private:
|
||||
int _ctr;
|
||||
public:
|
||||
Hotspot8();
|
||||
void synchronize(Serializer &s) override {
|
||||
SceneObject::synchronize(s);
|
||||
s.syncAsUint16LE(_ctr);
|
||||
}
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class GuardRock : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Ladder : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class TheTech : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot13 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot17 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot18 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot23 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager1, _sequenceManager2, _sequenceManager3;
|
||||
ASound _soundHandler1, _soundHandler2;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerML _speakerML;
|
||||
SpeakerMR _speakerMR;
|
||||
SpeakerSR _speakerSR;
|
||||
SpeakerCHFL _speakerCHFL;
|
||||
SpeakerPL _speakerPL;
|
||||
SpeakerPText _speakerPText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerCHFR _speakerCHFR;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerCHFText _speakerCHFText;
|
||||
SceneObject _smoke1, _hotspot2, _lander, _olo, _hotspot5, _rope;
|
||||
Miranda _miranda;
|
||||
Hotspot8 _hotspot8;
|
||||
GuardRock _guardRock;
|
||||
Ladder _ladder;
|
||||
DisplayHotspot _forceField;
|
||||
TheTech _theTech;
|
||||
Hotspot13 _hotspot13;
|
||||
Hotspot _hotspot14, _hotspot15, _hotspot16;
|
||||
Hotspot17 _hotspot17;
|
||||
Hotspot18 _hotspot18;
|
||||
DisplayHotspot _hotspot19, _hotspot20, _hotspot21, _hotspot22;
|
||||
Hotspot23 _hotspot23;
|
||||
DisplayHotspot _hotspot24, _hotspot25, _hotspot26;
|
||||
SceneObject _smoke2;
|
||||
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;
|
||||
|
||||
Scene4000();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene4010 : public Scene {
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerMText _speakerMText;
|
||||
SceneObject _hotspot1, _hotspot2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Scene4025 : public Scene {
|
||||
/* Custom classes */
|
||||
class Peg;
|
||||
|
||||
class Hole : public SceneObject {
|
||||
public:
|
||||
Peg *_pegPtr;
|
||||
int _armStrip;
|
||||
Common::Point _newPosition;
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Peg : public SceneObject {
|
||||
public:
|
||||
int _pegId;
|
||||
int _armStrip;
|
||||
|
||||
Peg() : SceneObject() { _pegId = 0; _armStrip = 3; }
|
||||
void synchronize(Serializer &s) override;
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
/* 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;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
GfxButton _gfxButton;
|
||||
SceneObject _armHotspot;
|
||||
Hole _hole1, _hole2, _hole3, _hole4, _hole5;
|
||||
Peg _peg1, _peg2, _peg3, _peg4, _peg5;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Peg *_pegPtr, *_pegPtr2;
|
||||
Hole *_holePtr;
|
||||
|
||||
Scene4025();
|
||||
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 Scene4045 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class OlloStand : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Miranda : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Necklace : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerML _speakerML;
|
||||
SpeakerPR _speakerPR;
|
||||
SpeakerPText _speakerPText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerQL _speakerQL;
|
||||
OlloStand _olloStand;
|
||||
Miranda _miranda;
|
||||
DisplayHotspot _flame;
|
||||
SceneObject _hotspot4, _olloFace;
|
||||
Necklace _necklace;
|
||||
DisplayHotspot _hotspot7, _hotspot8, _hotspot9, _hotspot10;
|
||||
DisplayHotspot _hotspot11, _hotspot12, _hotspot13, _hotspot14;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
|
||||
Scene4045();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void stripCallback(int v) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene4050 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot15 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot17 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SpeakerPText _speakerPText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
DisplayHotspot _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5;
|
||||
DisplayHotspot _hotspot6, _hotspot7, _hotspot8, _hotspot9, _hotspot10;
|
||||
DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
|
||||
SceneObject _hotspot14;
|
||||
Hotspot15 _hotspot15;
|
||||
SceneObject _hotspot16;
|
||||
Hotspot17 _hotspot17;
|
||||
|
||||
Scene4050();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene4100 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
class Action5 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action6 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Miranda : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Ladder : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot14 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerML _speakerML;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerCHFText _speakerCHFText;
|
||||
SpeakerCDRText _speakerCDRText;
|
||||
SpeakerCDR _speakerCDR;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Hotspot1 _hotspot1;
|
||||
Hotspot2 _hotspot2;
|
||||
DisplayHotspot _hotspot3, _hotspot4;
|
||||
Miranda _miranda;
|
||||
Ladder _ladder;
|
||||
DisplayHotspot _hotspot7, _hotspot8, _hotspot9, _hotspot10;
|
||||
DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
|
||||
Hotspot14 _hotspot14;
|
||||
|
||||
Scene4100();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene4150 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class HotspotGroup1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class HotspotGroup3 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class HotspotGroup6 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
class Hotspot3 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
ASound _soundHandler;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerCDL _speakerCDL;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
DisplayHotspot _hotspot1, _hotspot2;
|
||||
Hotspot3 _hotspot3;
|
||||
SceneObject _hotspot4;
|
||||
HotspotGroup1 _hotspot5, _hotspot6;
|
||||
DisplayHotspot _hotspot7, _hotspot8, _hotspot9, _hotspot10, _hotspot11, _hotspot12;
|
||||
HotspotGroup3 _hotspot13, _hotspot14, _hotspot15, _hotspot16;
|
||||
DisplayHotspot _hotspot17, _hotspot18, _hotspot19, _hotspot20, _hotspot21;
|
||||
DisplayHotspot _hotspot22, _hotspot23, _hotspot24;
|
||||
HotspotGroup6 _hotspot25, _hotspot26;
|
||||
|
||||
Scene4150();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene4250 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
class Action5 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot4 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot6 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
ASound _soundHandler;
|
||||
SpeakerSR _speakerSR;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerPText _speakerPText;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerFLText _speakerFLText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Hotspot1 _hotspot1;
|
||||
Hotspot2 _hotspot2;
|
||||
SceneObject _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
SceneObject _hotspot5;
|
||||
Hotspot6 _hotspot6;
|
||||
DisplayHotspot _hotspot7;
|
||||
Hotspot8 _hotspot8;
|
||||
|
||||
Scene4250();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene4300 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot9 : public NamedHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot10 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot15 : public SceneObject {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Hotspot16 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot17 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot19 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler1, _soundHandler2;
|
||||
SequenceManager _sequenceManager;
|
||||
GfxButton _gfxButton;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerFLText _speakerFLText;
|
||||
|
||||
SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4;
|
||||
SceneObject _hotspot5, _hotspot6, _hotspot7;
|
||||
Hotspot8 _hotspot8;
|
||||
Hotspot9 _hotspot9;
|
||||
Hotspot10 _hotspot10;
|
||||
NamedHotspot _hotspot11;
|
||||
SceneObject _hotspot12, _hotspot13, _hotspot14;
|
||||
Hotspot15 _hotspot15;
|
||||
Hotspot16 _hotspot16;
|
||||
Hotspot17 _hotspot17;
|
||||
DisplayHotspot _hotspot18;
|
||||
Hotspot19 _hotspot19;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
|
||||
Scene4300();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void stripCallback(int v) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
class Scene4301 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public ActionExt {
|
||||
public:
|
||||
SceneObject _buttonList[6];
|
||||
int _indexList[6];
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
void remove() override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot4 : public NamedHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot5 : public NamedHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
Common::List<int> _list1;
|
||||
SequenceManager _sequenceManager;
|
||||
ASound _soundHandler;
|
||||
Action1 _action1;
|
||||
SceneObject _hotspot1, _hotspot2, _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
Hotspot5 _hotspot5;
|
||||
bool _puzzleDone;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override {
|
||||
Scene::synchronize(s);
|
||||
s.syncAsSint16LE(_puzzleDone);
|
||||
}
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
2256
engines/tsage/ringworld/ringworld_scenes6.cpp
Normal file
2256
engines/tsage/ringworld/ringworld_scenes6.cpp
Normal file
File diff suppressed because it is too large
Load Diff
331
engines/tsage/ringworld/ringworld_scenes6.h
Normal file
331
engines/tsage/ringworld/ringworld_scenes6.h
Normal file
@@ -0,0 +1,331 @@
|
||||
/* 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_RINGWORLD_SCENES6_H
|
||||
#define TSAGE_RINGWORLD_SCENES6_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class Scene5000 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
void dispatch() 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;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot7 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class HotspotGroup1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
ASound _soundHandler;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerQText _speakerQText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
DisplayHotspot _hotspot1;
|
||||
SceneObject _hotspot2, _hotspot3, _hotspot4, _hotspot5, _hotspot6;
|
||||
Hotspot7 _hotspot7;
|
||||
Hotspot8 _hotspot8;
|
||||
HotspotGroup1 _hotspot9, _hotspot10, _hotspot11;
|
||||
DisplayHotspot _hotspot12, _hotspot13, _hotspot14, _hotspot15;
|
||||
DisplayHotspot _hotspot16, _hotspot17, _hotspot18;
|
||||
|
||||
Scene5000();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene5100 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
class Action5 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action6 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class HotspotGroup1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class HotspotGroup2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot4 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot9 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot17 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot18 : public SceneHotspot {
|
||||
public:
|
||||
int _index1;
|
||||
int _index2;
|
||||
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot19 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot20 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
ASound _soundHandler;
|
||||
SpeakerMText _speakerMText;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerBatText _speakerBatText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
HotspotGroup1 _hotspot1, _hotspot2, _hotspot3;
|
||||
Hotspot4 _hotspot4;
|
||||
HotspotGroup2 _hotspot5, _hotspot6, _hotspot7;
|
||||
SceneObject _hotspot8;
|
||||
Hotspot9 _hotspot9;
|
||||
SceneObject _hotspot10, _hotspot11, _hotspot12, _hotspot13, _hotspot14, _hotspot15;
|
||||
DisplayHotspot _hotspot16;
|
||||
Hotspot17 _hotspot17;
|
||||
Hotspot18 _hotspot18;
|
||||
Hotspot19 _hotspot19;
|
||||
Hotspot20 _hotspot20;
|
||||
DisplayHotspot _hotspot21;
|
||||
|
||||
Scene5100();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene5200 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot9 : public SceneObjectExt {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot10 : public SceneObjectExt {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot14 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SpeakerFLL _speakerFLL;
|
||||
SpeakerFLText _speakerFLText;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
|
||||
SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5, _hotspot6, _hotspot7;
|
||||
SceneObject _hotspot8;
|
||||
Hotspot9 _hotspot9;
|
||||
Hotspot10 _hotspot10;
|
||||
DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
|
||||
Hotspot14 _hotspot14;
|
||||
|
||||
Scene5200();
|
||||
void stripCallback(int v) override;
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene5300 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/* Hotspots */
|
||||
class Hotspot1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot2 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot5 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot6 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot7 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Hotspot8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerQText _speakerQText;
|
||||
SpeakerBatR _speakerBatR;
|
||||
SpeakerBatText _speakerBatText;
|
||||
SpeakerSR _speakerSR;
|
||||
SpeakerSL _speakerSL;
|
||||
SpeakerSText _speakerSText;
|
||||
SpeakerGameText _speakerGameText;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Hotspot1 _hotspot1;
|
||||
Hotspot2 _hotspot2;
|
||||
DisplayHotspot _hotspot3;
|
||||
SceneObject _hotspot4;
|
||||
Hotspot5 _hotspot5;
|
||||
Hotspot6 _hotspot6;
|
||||
Hotspot7 _hotspot7;
|
||||
Hotspot8 _hotspot8;
|
||||
|
||||
Scene5300();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
2635
engines/tsage/ringworld/ringworld_scenes8.cpp
Normal file
2635
engines/tsage/ringworld/ringworld_scenes8.cpp
Normal file
File diff suppressed because it is too large
Load Diff
496
engines/tsage/ringworld/ringworld_scenes8.h
Normal file
496
engines/tsage/ringworld/ringworld_scenes8.h
Normal file
@@ -0,0 +1,496 @@
|
||||
/* 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_RINGWORLD_SCENES8_H
|
||||
#define TSAGE_RINGWORLD_SCENES8_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/ringworld/ringworld_logic.h"
|
||||
#include "tsage/ringworld/ringworld_speakers.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/globals.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class NamedHotspotMult : public SceneHotspot {
|
||||
public:
|
||||
int _useLineNum, _lookLineNum;
|
||||
NamedHotspotMult();
|
||||
|
||||
Common::String getClassName() override { return "NamedHotspotMult"; }
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
class SceneObject7700 : public SceneObjectExt {
|
||||
public:
|
||||
int _lookLineNum, _defltLineNum;
|
||||
|
||||
void synchronize(Serializer &s) override;
|
||||
Common::String getClassName() override { return "SceneObject7700"; }
|
||||
};
|
||||
|
||||
class Scene7000 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action3 : public Action {
|
||||
public:
|
||||
void dispatch() override;
|
||||
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;
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class Object1 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class Hotspot1 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SequenceManager _sequenceManager;
|
||||
SpeakerSKText _speakerSKText;
|
||||
SpeakerSKL _speakerSKL;
|
||||
SpeakerQL _speakerQL;
|
||||
SpeakerQR _speakerQR;
|
||||
SpeakerQText _speakerQText;
|
||||
Object1 _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
SceneObject _object5;
|
||||
SceneObject _object6;
|
||||
SceneObject _object7;
|
||||
SceneObject _object8;
|
||||
SceneObject _object9;
|
||||
SceneObject _object10;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Action7 _action7;
|
||||
Hotspot1 _hotspot1;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene7100 : public Scene {
|
||||
/* Actions */
|
||||
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 Action8 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action9 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action10 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action11 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
ASound _soundHandler1;
|
||||
ASound _soundHandler2;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
SceneObject _object5;
|
||||
SceneObject _object6;
|
||||
SceneObject _object7;
|
||||
SceneObject _object8;
|
||||
SceneObject _object9;
|
||||
SceneObject _object10;
|
||||
SceneObject _object11;
|
||||
SceneObject _object12;
|
||||
SceneObject _object13;
|
||||
SceneObject _object14;
|
||||
SceneObject _object15;
|
||||
SceneObject _object16;
|
||||
SceneObject _object17;
|
||||
SceneObject _object18;
|
||||
SceneObject _object19;
|
||||
SceneObject _object20;
|
||||
SceneObject _object21;
|
||||
SceneObject _object22;
|
||||
SceneObject _object23;
|
||||
SceneObject _object24;
|
||||
SceneObject _object25;
|
||||
Action _action1;
|
||||
Action _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
Action7 _action7;
|
||||
Action8 _action8;
|
||||
Action9 _action9;
|
||||
Action10 _action10;
|
||||
Action11 _action11;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene7200 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
SceneObject _swimmer;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
SceneObject _object5;
|
||||
SceneObject _object6;
|
||||
SceneObject _object7;
|
||||
SceneObject _object8;
|
||||
SceneObject _object9;
|
||||
ASound _soundHandler;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene7300 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
public:
|
||||
SpeakerPOR _speakerPOR;
|
||||
SpeakerPOText _speakerPOText;
|
||||
SpeakerSKText _speakerSKText;
|
||||
SpeakerQU _speakerQU;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
SceneObject _object5;
|
||||
SceneObject _object6;
|
||||
SceneObject _object7;
|
||||
SceneObject _object8;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void dispatch() override;
|
||||
};
|
||||
|
||||
class Scene7600 : public Scene {
|
||||
/* Actions */
|
||||
class Action1 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action2 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
SceneObject _object1;
|
||||
SceneObject _object2;
|
||||
SceneObject _object3;
|
||||
SceneObject _object4;
|
||||
SceneObject _object5;
|
||||
SceneObject _object6;
|
||||
ASound _soundHandler1;
|
||||
ASound _soundHandler2;
|
||||
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
};
|
||||
|
||||
class Scene7700 : public Scene {
|
||||
/* 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;
|
||||
};
|
||||
class Action5 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
class Action6 : public Action {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
class Object1 : public SceneObject7700 {
|
||||
public:
|
||||
void signal() override;
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object3 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object7 : public SceneObjectExt {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object8 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object9 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object10 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object11 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class Object12 : public SceneObject {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class SceneHotspot1 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot2 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot3 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot4 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot5 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot6 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneItem7 : public SceneItem {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot8 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot9 : public SceneHotspot {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneItem10 : public SceneItem {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
class SceneHotspot11 : public NamedHotspotMult {
|
||||
public:
|
||||
void doAction(int action) override;
|
||||
};
|
||||
public:
|
||||
ASound _soundHandler;
|
||||
SequenceManager _sequenceManager;
|
||||
GfxButton _gfxButton;
|
||||
SpeakerEText _speakerEText;
|
||||
SpeakerQText _speakerQText;
|
||||
Object1 _object1;
|
||||
Object1 _object2;
|
||||
Object3 _object3;
|
||||
Object1 _object4;
|
||||
Object1 _object5;
|
||||
Object1 _object6;
|
||||
Object7 _prof;
|
||||
Object8 _object8;
|
||||
Object9 _object9;
|
||||
Object10 _object10;
|
||||
Object11 _cork;
|
||||
Object12 _emptyJar;
|
||||
SceneObject _object13;
|
||||
SceneObject _object14;
|
||||
SceneObject _object15;
|
||||
SceneObject _cloud;
|
||||
SceneObject _easterEgg1;
|
||||
SceneObject _easterEgg2;
|
||||
SceneObject _object19;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
Action4 _action4;
|
||||
Action5 _action5;
|
||||
Action6 _action6;
|
||||
SceneHotspot1 _sceneHotspot1;
|
||||
SceneHotspot2 _sceneHotspot2;
|
||||
SceneHotspot3 _sceneHotspot3;
|
||||
SceneHotspot4 _sceneHotspot4;
|
||||
SceneHotspot5 _sceneHotspot5;
|
||||
SceneHotspot6 _sceneHotspot6;
|
||||
SceneItem7 _sceneItem7;
|
||||
SceneHotspot8 _sceneHotspot8;
|
||||
SceneHotspot9 _sceneHotspot9;
|
||||
SceneItem10 _sceneItem10;
|
||||
SceneHotspot11 _sceneHotspot11;
|
||||
SceneHotspot11 _sceneHotspot12;
|
||||
SceneHotspot11 _sceneHotspot13;
|
||||
SceneHotspot11 _sceneHotspot14;
|
||||
SceneHotspot11 _sceneHotspot15;
|
||||
SceneHotspot11 _sceneHotspot16;
|
||||
SceneHotspot11 _sceneHotspot17;
|
||||
SceneHotspot11 _sceneHotspot18;
|
||||
SceneHotspot11 _sceneHotspot19;
|
||||
SceneHotspot11 _sceneHotspot20;
|
||||
SceneHotspot11 _sceneHotspot21;
|
||||
SceneHotspot11 _sceneHotspot22;
|
||||
SceneHotspot11 _sceneHotspot23;
|
||||
SceneHotspot11 _sceneHotspot24;
|
||||
SceneHotspot11 _sceneHotspot25;
|
||||
SceneHotspot11 _sceneHotspot26;
|
||||
SceneHotspot11 _sceneHotspot27;
|
||||
SceneHotspot11 _sceneHotspot28;
|
||||
SceneHotspot11 _sceneHotspot29;
|
||||
SceneHotspot11 _sceneHotspot30;
|
||||
SceneHotspot11 _sceneHotspot31;
|
||||
SceneHotspot11 _sceneHotspot32;
|
||||
SceneHotspot11 _sceneHotspot33;
|
||||
SceneHotspot11 _sceneHotspot34;
|
||||
SceneHotspot11 _sceneHotspot35;
|
||||
SceneHotspot11 _sceneHotspot36;
|
||||
int _seatCountLeft1, _seatCountRight, _seatCountLeft2;
|
||||
|
||||
Scene7700();
|
||||
void postInit(SceneObjectList *OwnerList = NULL) override;
|
||||
void signal() override;
|
||||
void process(Event &event) override;
|
||||
void dispatch() override;
|
||||
void synchronize(Serializer &s) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
904
engines/tsage/ringworld/ringworld_speakers.cpp
Normal file
904
engines/tsage/ringworld/ringworld_speakers.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/ringworld/ringworld_speakers.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/tsage.h"
|
||||
#include "tsage/graphics.h"
|
||||
#include "tsage/staticres.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
SpeakerGText::SpeakerGText() {
|
||||
_speakerName = "GTEXT";
|
||||
_textWidth = 160;
|
||||
_textPos = Common::Point(130, 10);
|
||||
_color1 = 42;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
void SpeakerGText::setText(const Common::String &msg) {
|
||||
// Set the animation properties
|
||||
_sceneObject.postInit();
|
||||
_sceneObject.setVisage(9405);
|
||||
_sceneObject.setStrip2(3);
|
||||
_sceneObject.fixPriority(255);
|
||||
_sceneObject.changeZoom(100);
|
||||
_sceneObject._frame = 1;
|
||||
_sceneObject.setPosition(Common::Point(183, 71));
|
||||
_sceneObject.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
// Set the text
|
||||
Rect textRect;
|
||||
g_globals->gfxManager()._font.getStringBounds(msg.c_str(), textRect, _textWidth);
|
||||
textRect.center(_sceneObject._position.x, _sceneObject._position.y);
|
||||
_textPos.x = textRect.left;
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
void SpeakerGText::removeText() {
|
||||
_sceneObject.remove();
|
||||
Speaker::removeText();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerPOR::SpeakerPOR() {
|
||||
_speakerName = "POR";
|
||||
_newSceneNumber = 7221;
|
||||
_textPos = Common::Point(10, 30);
|
||||
_color1 = 41;
|
||||
}
|
||||
|
||||
void SpeakerPOR::SpeakerAction1::signal(){
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(g_globals->_randomSource.getRandomNumber(60) + 60);
|
||||
break;
|
||||
case 1:
|
||||
static_cast<SceneObject *>(_owner)->animate(ANIM_MODE_5, this, NULL);
|
||||
break;
|
||||
case 2:
|
||||
setDelay(g_globals->_randomSource.getRandomNumber(10));
|
||||
_actionIndex = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SpeakerPOR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(7223);
|
||||
_object1.setStrip2(2);
|
||||
_object1.setPosition(Common::Point(191, 166));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(7223);
|
||||
_object2.setPosition(Common::Point(159, 86));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
_object3.postInit(&_objectList);
|
||||
_object3.setVisage(7223);
|
||||
_object3.setStrip(3);
|
||||
_object3.setPosition(Common::Point(119, 107));
|
||||
_object3.fixPriority(199);
|
||||
_object3.setAction(&_action2);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerOR::SpeakerOR() {
|
||||
_speakerName = "OR";
|
||||
_newSceneNumber = 9430;
|
||||
_textPos = Common::Point(8, 36);
|
||||
_color1 = 42;
|
||||
_textWidth = 136;
|
||||
}
|
||||
|
||||
void SpeakerOR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(9431);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(202, 147));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(9431);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.setZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(199, 85));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerOText::SpeakerOText() : SpeakerGText() {
|
||||
_speakerName = "OTEXT";
|
||||
_textWidth = 240;
|
||||
_textPos = Common::Point(130, 10);
|
||||
_color1 = 42;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerQText::SpeakerQText() : ScreenSpeaker() {
|
||||
_speakerName = "QTEXT";
|
||||
_textPos = Common::Point(160, 40);
|
||||
_color1 = 35;
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerSText::SpeakerSText() : ScreenSpeaker() {
|
||||
_speakerName = "STEXT";
|
||||
_color1 = 13;
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerPOText::SpeakerPOText() : ScreenSpeaker() {
|
||||
_speakerName = "POTEXT";
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_color1 = 41;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerMText::SpeakerMText() {
|
||||
_speakerName = "MTEXT";
|
||||
_color1 = 22;
|
||||
_textWidth = 230;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCText::SpeakerCText() {
|
||||
_speakerName = "CTEXT";
|
||||
_color1 = 4;
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerEText::SpeakerEText() {
|
||||
_speakerName = "ETEXT";
|
||||
_textPos = Common::Point(20, 20);
|
||||
_color1 = 22;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerGR::SpeakerGR() : AnimatedSpeaker() {
|
||||
_speakerName = "GR";
|
||||
_newSceneNumber = 9220;
|
||||
_textWidth = 136;
|
||||
_textPos = Common::Point(168, 36);
|
||||
_color1 = 14;
|
||||
}
|
||||
|
||||
void SpeakerGR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(9221);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(101, 70));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerHText::SpeakerHText() {
|
||||
_speakerName = "HTEXT";
|
||||
_textPos = Common::Point(160, 40);
|
||||
_color1 = 52;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerSKText::SpeakerSKText() : ScreenSpeaker() {
|
||||
_speakerName = "SKTEXT";
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_color1 = 9;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerPText::SpeakerPText() {
|
||||
_speakerName = "PTEXT";
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_color1 = 5;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCHFText::SpeakerCHFText() {
|
||||
_speakerName = "CHFTEXT";
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_color1 = 56;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCDRText::SpeakerCDRText() {
|
||||
_speakerName = "CDRTEXT";
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_color1 = 52;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerFLText::SpeakerFLText() {
|
||||
_speakerName = "FLTEXT";
|
||||
_textPos = Common::Point(10, 40);
|
||||
_color1 = 17;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerBatText::SpeakerBatText() {
|
||||
_speakerName = "BATTEXT";
|
||||
_textWidth = 240;
|
||||
_textMode = ALIGN_CENTER;
|
||||
_color1 = 3;
|
||||
_hideObjects = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerSKL::SpeakerSKL() : AnimatedSpeaker() {
|
||||
_speakerName = "SKL";
|
||||
_newSceneNumber = 7011;
|
||||
_textPos = Common::Point(10, 30);
|
||||
_color1 = 9;
|
||||
}
|
||||
|
||||
void SpeakerSKL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(7013);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(203, 120));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(7013);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(197, 80));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerQL::SpeakerQL() : AnimatedSpeaker() {
|
||||
_speakerName = "QL";
|
||||
_newSceneNumber = 2610;
|
||||
_textPos = Common::Point(160, 30);
|
||||
_color1 = 35;
|
||||
_textMode = ALIGN_CENTER;
|
||||
}
|
||||
|
||||
void SpeakerQL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(2612);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(128, 146));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(2612);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(122, 84));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerSR::SpeakerSR() {
|
||||
_speakerName = "SR";
|
||||
_newSceneNumber = 2811;
|
||||
_textPos = Common::Point(10, 30);
|
||||
_color1 = 13;
|
||||
_textMode = ALIGN_CENTER;
|
||||
}
|
||||
|
||||
void SpeakerSR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(2813);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(224, 198));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(2813);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(203, 96));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
_object3.postInit(&_objectList);
|
||||
_object3.setVisage(2813);
|
||||
_object3.setStrip(3);
|
||||
_object3.setPosition(Common::Point(204, 91));
|
||||
_object3.fixPriority(199);
|
||||
_object3._numFrames = 3;
|
||||
_object3.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerSL::SpeakerSL() {
|
||||
_speakerName = "SL";
|
||||
_newSceneNumber = 2810;
|
||||
_textPos = Common::Point(140, 30);
|
||||
_textWidth = 160;
|
||||
_color1 = 13;
|
||||
_textMode = ALIGN_CENTER;
|
||||
}
|
||||
|
||||
void SpeakerSL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(2812);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(95, 198));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(2812);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(116, 96));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerQR::SpeakerQR() {
|
||||
_speakerName = "QR";
|
||||
_newSceneNumber = 2611;
|
||||
_textPos = Common::Point(10, 30);
|
||||
_color1 = 35;
|
||||
_textMode = ALIGN_CENTER;
|
||||
}
|
||||
|
||||
void SpeakerQR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(2613);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(191, 146));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(2613);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(197, 84));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerQU::SpeakerQU() {
|
||||
_speakerName = "QU";
|
||||
_newSceneNumber = 7020;
|
||||
_textPos = Common::Point(160, 30);
|
||||
_color1 = 35;
|
||||
_textMode = ALIGN_CENTER;
|
||||
}
|
||||
|
||||
void SpeakerQU::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(7021);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(116, 120));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(7021);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(111, 84));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCR::SpeakerCR() {
|
||||
_speakerName = "CR";
|
||||
_newSceneNumber = 9010;
|
||||
_textPos = Common::Point(20, 40);
|
||||
_color1 = 4;
|
||||
}
|
||||
|
||||
void SpeakerCR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(9011);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.setPosition(Common::Point(219, 168));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(9011);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.setPosition(Common::Point(232, 81));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerMR::SpeakerMR() {
|
||||
_speakerName = "MR";
|
||||
_newSceneNumber = 2711;
|
||||
_textPos = Common::Point(10, 40);
|
||||
_color1 = 22;
|
||||
}
|
||||
|
||||
void SpeakerMR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(2713);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(220, 143));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(2713);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(215, 99));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerSAL::SpeakerSAL() {
|
||||
_speakerName = "SAL";
|
||||
_newSceneNumber = 2851;
|
||||
_textPos = Common::Point(10, 30);
|
||||
_color1 = 13;
|
||||
_textMode = ALIGN_CENTER;
|
||||
}
|
||||
|
||||
void SpeakerSAL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(2853);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(185, 200));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(2853);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(170, 92));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerML::SpeakerML() {
|
||||
_speakerName = "ML";
|
||||
_newSceneNumber = 2710;
|
||||
_textPos = Common::Point(160, 40);
|
||||
_color1 = 22;
|
||||
}
|
||||
|
||||
void SpeakerML::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(2712);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(99, 143));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(2712);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(105, 99));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCHFL::SpeakerCHFL() {
|
||||
_speakerName = "CHFL";
|
||||
_newSceneNumber = 4111;
|
||||
_textPos = Common::Point(10, 40);
|
||||
_color1 = 56;
|
||||
}
|
||||
|
||||
void SpeakerCHFL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(4113);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(205, 116));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(4113);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(202, 71));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCHFR::SpeakerCHFR() {
|
||||
_speakerName = "CHFR";
|
||||
_newSceneNumber = 4110;
|
||||
_textPos = Common::Point(160, 40);
|
||||
_color1 = 56;
|
||||
}
|
||||
|
||||
void SpeakerCHFR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(4112);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(103, 116));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(4112);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(106, 71));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerPL::SpeakerPL() {
|
||||
_speakerName = "PL";
|
||||
_newSceneNumber = 4060;
|
||||
_textPos = Common::Point(160, 40);
|
||||
_color1 = 5;
|
||||
}
|
||||
|
||||
void SpeakerPL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(4062);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(107, 117));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(4062);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(200);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(105, 62));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
_object3.postInit(&_objectList);
|
||||
_object3.setVisage(4062);
|
||||
_object3.setStrip2(3);
|
||||
_object3.fixPriority(255);
|
||||
_object3.changeZoom(100);
|
||||
_object3._frame = 1;
|
||||
_object3.setPosition(Common::Point(105, 59));
|
||||
_object3.setAction(&_speakerAction2, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
void SpeakerPL::removeText() {
|
||||
_object3.remove();
|
||||
AnimatedSpeaker::removeText();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerPR::SpeakerPR() {
|
||||
_speakerName = "PR";
|
||||
_newSceneNumber = 4061;
|
||||
_textPos = Common::Point(10, 40);
|
||||
_color1 = 5;
|
||||
}
|
||||
|
||||
void SpeakerPR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(4063);
|
||||
_object1.setStrip2(1);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(212, 117));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(4063);
|
||||
_object2.setStrip2(2);
|
||||
_object2.fixPriority(200);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(214, 62));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
_object3.postInit(&_objectList);
|
||||
_object3.setVisage(4063);
|
||||
_object3.setStrip2(3);
|
||||
_object3.fixPriority(255);
|
||||
_object3.changeZoom(100);
|
||||
_object3._frame = 1;
|
||||
_object3.setPosition(Common::Point(214, 59));
|
||||
_object3.setAction(&_speakerAction2, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
void SpeakerPR::removeText() {
|
||||
_object3.remove();
|
||||
AnimatedSpeaker::removeText();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCDR::SpeakerCDR() {
|
||||
_speakerName = "CDR";
|
||||
_newSceneNumber = 4161;
|
||||
_textPos = Common::Point(10, 40);
|
||||
_color1 = 52;
|
||||
}
|
||||
|
||||
void SpeakerCDR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(4163);
|
||||
_object1.setStrip2(1);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(208, 97));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(4163);
|
||||
_object2.setStrip2(2);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(200, 57));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerCDL::SpeakerCDL() {
|
||||
_speakerName = "CDL";
|
||||
_newSceneNumber = 4160;
|
||||
_textPos = Common::Point(160, 40);
|
||||
_color1 = 52;
|
||||
}
|
||||
|
||||
void SpeakerCDL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(4162);
|
||||
_object1.setStrip2(1);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(112, 97));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(4162);
|
||||
_object2.setStrip2(2);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(115, 57));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerFLL::SpeakerFLL() {
|
||||
_speakerName = "FLL";
|
||||
_newSceneNumber = 5221;
|
||||
_textPos = Common::Point(10, 40);
|
||||
_color1 = 17;
|
||||
}
|
||||
|
||||
void SpeakerFLL::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(5223);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(216, 129));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(5223);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(210, 67));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerBatR::SpeakerBatR() {
|
||||
_speakerName = "BATR";
|
||||
_newSceneNumber = 5360;
|
||||
_textPos = Common::Point(140, 40);
|
||||
_color1 = 3;
|
||||
}
|
||||
|
||||
void SpeakerBatR::setText(const Common::String &msg) {
|
||||
_object1.postInit(&_objectList);
|
||||
_object1.setVisage(5361);
|
||||
_object1.setStrip2(2);
|
||||
_object1.fixPriority(255);
|
||||
_object1.changeZoom(100);
|
||||
_object1._frame = 1;
|
||||
_object1.setPosition(Common::Point(137, 122));
|
||||
_object1.animate(ANIM_MODE_7, 0, NULL);
|
||||
|
||||
_object2.postInit(&_objectList);
|
||||
_object2.setVisage(5361);
|
||||
_object2.setStrip2(1);
|
||||
_object2.fixPriority(255);
|
||||
_object2.changeZoom(100);
|
||||
_object2._frame = 1;
|
||||
_object2.setPosition(Common::Point(137, 104));
|
||||
_object2.setAction(&_speakerAction, NULL);
|
||||
|
||||
Speaker::setText(msg);
|
||||
}
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
336
engines/tsage/ringworld/ringworld_speakers.h
Normal file
336
engines/tsage/ringworld/ringworld_speakers.h
Normal file
@@ -0,0 +1,336 @@
|
||||
/* 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_RINGWORLD_SPEAKERS_H
|
||||
#define TSAGE_RINGWORLD_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/ringworld/ringworld_logic.h"
|
||||
|
||||
namespace TsAGE {
|
||||
|
||||
namespace Ringworld {
|
||||
|
||||
using namespace TsAGE;
|
||||
|
||||
class SpeakerGText : public Speaker {
|
||||
public:
|
||||
SceneObject _sceneObject;
|
||||
public:
|
||||
SpeakerGText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerGText"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
void removeText() override;
|
||||
};
|
||||
|
||||
class SpeakerPOR : public AnimatedSpeaker {
|
||||
class SpeakerAction1 : public SpeakerAction {
|
||||
public:
|
||||
void signal() override;
|
||||
};
|
||||
|
||||
public:
|
||||
SceneObject _object3;
|
||||
SpeakerAction1 _action2;
|
||||
public:
|
||||
SpeakerPOR();
|
||||
Common::String getClassName() override { return "SpeakerPOR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerOR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerOR();
|
||||
Common::String getClassName() override { return "SpeakerOR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerOText : public SpeakerGText {
|
||||
public:
|
||||
SpeakerOText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerOText"; }
|
||||
};
|
||||
|
||||
class SpeakerPOText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerPOText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerPOText"; }
|
||||
};
|
||||
|
||||
class SpeakerSText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerSText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerSText"; }
|
||||
};
|
||||
|
||||
class SpeakerQText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerQText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerQText"; }
|
||||
};
|
||||
|
||||
class SpeakerMText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerMText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerMText"; }
|
||||
};
|
||||
|
||||
class SpeakerCText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerCText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCText"; }
|
||||
};
|
||||
|
||||
class SpeakerEText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerEText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerEText"; }
|
||||
};
|
||||
|
||||
class SpeakerGR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerGR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerGR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerHText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerHText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerHText"; }
|
||||
};
|
||||
|
||||
class SpeakerPText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerPText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerPText"; }
|
||||
};
|
||||
|
||||
class SpeakerCHFText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerCHFText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCHFText"; }
|
||||
};
|
||||
|
||||
class SpeakerSKText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerSKText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerSKText"; }
|
||||
};
|
||||
|
||||
class SpeakerCDRText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerCDRText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCDRText"; }
|
||||
};
|
||||
|
||||
class SpeakerFLText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerFLText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerFLText"; }
|
||||
};
|
||||
|
||||
class SpeakerBatText : public ScreenSpeaker {
|
||||
public:
|
||||
SpeakerBatText();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerFLText"; }
|
||||
};
|
||||
|
||||
class SpeakerQR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerQR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerQR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerQU : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerQU();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerQU"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerSKL : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerSKL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerQL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerQL : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerQL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerQL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerSR : public AnimatedSpeaker {
|
||||
public:
|
||||
SceneObject _object3;
|
||||
public:
|
||||
SpeakerSR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerSR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerSL : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerSL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerSL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerCR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerCR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerMR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerMR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerMR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerSAL : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerSAL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerSAL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerML : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerML();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerML"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerCHFL : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerCHFL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCHFL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerCHFR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerCHFR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCHFR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerPL : public AnimatedSpeaker {
|
||||
public:
|
||||
SceneObject _object3;
|
||||
SpeakerAction _speakerAction2;
|
||||
|
||||
SpeakerPL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerPL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
void removeText() override;
|
||||
};
|
||||
|
||||
class SpeakerPR : public AnimatedSpeaker {
|
||||
public:
|
||||
SceneObject _object3;
|
||||
SpeakerAction _speakerAction2;
|
||||
|
||||
SpeakerPR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerPR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
void removeText() override;
|
||||
};
|
||||
|
||||
class SpeakerCDR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerCDR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCDR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerCDL : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerCDL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerCDL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerFLL : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerFLL();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerFLL"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
class SpeakerBatR : public AnimatedSpeaker {
|
||||
public:
|
||||
SpeakerBatR();
|
||||
|
||||
Common::String getClassName() override { return "SpeakerBatR"; }
|
||||
void setText(const Common::String &msg) override;
|
||||
};
|
||||
|
||||
} // End of namespace Ringworld
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user