TSAGE: Created stub classes for ASound and Sound, and reworked engine to use proper named methods

This commit is contained in:
Paul Gilbert 2011-04-27 21:23:47 +10:00
parent 89e954c653
commit 16666ec40c
27 changed files with 530 additions and 487 deletions

View File

@ -231,7 +231,7 @@ void SequenceManager::signal() {
case 26: case 26:
v1 = getNextValue(); v1 = getNextValue();
v2 = getNextValue(); v2 = getNextValue();
_soundHandler.startSound(v1, v2 ? this : NULL, 127); _soundHandler.play(v1, v2 ? this : NULL, 127);
break; break;
case 27: { case 27: {
v1 = getNextValue(); v1 = getNextValue();

View File

@ -25,6 +25,7 @@
#include "tsage/core.h" #include "tsage/core.h"
#include "tsage/dialogs.h" #include "tsage/dialogs.h"
#include "tsage/sound.h"
namespace tSage { namespace tSage {
@ -50,7 +51,7 @@ public:
int _objectIndex; int _objectIndex;
SceneObject *_sceneObject; SceneObject *_sceneObject;
SceneObject *_objectList[6]; SceneObject *_objectList[6];
SoundHandler _soundHandler; ASound _soundHandler;
public: public:
SequenceManager(); SequenceManager();

View File

@ -30,6 +30,7 @@
#include "tsage/scenes.h" #include "tsage/scenes.h"
#include "tsage/staticres.h" #include "tsage/staticres.h"
#include "tsage/globals.h" #include "tsage/globals.h"
#include "tsage/sound.h"
namespace tSage { namespace tSage {
@ -2944,53 +2945,22 @@ int SceneRegions::indexOf(const Common::Point &pt) {
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
SoundHandler::SoundHandler() { ASound::ASound() {
_action = NULL; _action = NULL;
_field280 = -1; _field280 = -1;
if (_globals)
_globals->_sceneListeners.push_back(this);
} }
SoundHandler::~SoundHandler() { void ASound::synchronize(Serializer &s) {
if (_globals) EventHandler::synchronize(s);
_globals->_sceneListeners.remove(this);
SYNC_POINTER(_action);
s.syncAsSint16LE(_field280);
} }
void SoundHandler::dispatch() { void ASound::dispatch() {
EventHandler::dispatch();
int v = _sound.proc12();
if (v != -1) {
_field280 = v;
_sound.proc2(-1);
if (_action)
_action->signal();
}
if (_field280 != -1) {
// FIXME: Hardcoded to only flag a sound ended if an action has been set
if (_action) {
// if (!_sound.proc3()) {
_field280 = -1;
if (_action) {
_action->signal();
_action = NULL;
}
}
}
} }
void SoundHandler::startSound(int soundNum, Action *action, int volume) {
_action = action;
_field280 = 0;
setVolume(volume);
_sound.startSound(soundNum);
warning("TODO: SoundHandler::startSound");
}
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
void SceneItemList::addItems(SceneItem *first, ...) { void SceneItemList::addItems(SceneItem *first, ...) {

View File

@ -33,7 +33,6 @@
#include "tsage/graphics.h" #include "tsage/graphics.h"
#include "tsage/resources.h" #include "tsage/resources.h"
#include "tsage/saveload.h" #include "tsage/saveload.h"
#include "tsage/sound.h"
namespace tSage { namespace tSage {
@ -719,74 +718,6 @@ public:
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
class GameSoundHandler {
public:
void proc1() {
warning("TODO: GameSoundHandler::proc1");
}
void proc5(int v) {
warning("TODO: GameSoundHandler::proc5");
}
void proc11(int v1, int v2, int v3, int v4) {
warning("TODO: GameSoundHandler::proc11");
}
int proc12() {
// TODO
return -1;
}
void proc2(int v) {
// TODO
}
int proc3() {
return 0;
}
void setVolume(int volume) {
warning("TODO GameSoundHandler::setVolume");
}
void startSound(int soundNum) {
warning("TODO GameSoundHandler::startSound");
}
};
class SoundHandler : public EventHandler {
public:
GameSoundHandler _sound;
Action *_action;
int _field280;
public:
SoundHandler();
~SoundHandler();
void startSound(int soundNum, Action *action = NULL, int volume = 127);
void proc1(Action *action) {
proc11(0, 5, 10, 1, action);
}
void proc2(int v) {
warning("TODO: SoundHandler::proc2");
}
void proc3() {
warning("TODO: SoundHandler::proc5");
}
void proc4() {
_sound.proc1();
}
void proc5(int v) {
_sound.proc5(v);
}
void proc11(int v1, int v2, int v3, int v4, Action *action) {
if (action)
_action = action;
_sound.proc11(v1, v2, v3, v4);
}
void setVolume(int volume) { _sound.setVolume(volume); }
virtual Common::String getClassName() { return "SoundHandler"; }
virtual void dispatch();
};
/*--------------------------------------------------------------------------*/
class SceneItemList : public SynchronizedList<SceneItem *> { class SceneItemList : public SynchronizedList<SceneItem *> {
public: public:
void addItems(SceneItem *first, ...); void addItems(SceneItem *first, ...);

View File

@ -28,6 +28,7 @@
#include "tsage/dialogs.h" #include "tsage/dialogs.h"
#include "tsage/scenes.h" #include "tsage/scenes.h"
#include "tsage/events.h" #include "tsage/events.h"
#include "tsage/sound.h"
#include "tsage/saveload.h" #include "tsage/saveload.h"
namespace tSage { namespace tSage {
@ -57,7 +58,7 @@ public:
SynchronizedList<EventHandler *> _sceneListeners; SynchronizedList<EventHandler *> _sceneListeners;
bool _flags[256]; bool _flags[256];
Player _player; Player _player;
SoundHandler _soundHandler; ASound _soundHandler;
InvObjectList *_inventory; InvObjectList *_inventory;
Region _paneRegions[2]; Region _paneRegions[2];
int _paneRefreshFlag[2]; int _paneRefreshFlag[2];

View File

@ -207,7 +207,7 @@ void Rect::expandPanes() {
} }
/** /**
* Serialises the given rect * Serializes the given rect
*/ */
void Rect::synchronize(Serializer &s) { void Rect::synchronize(Serializer &s) {
s.syncAsSint16LE(left); s.syncAsSint16LE(left);

View File

@ -111,7 +111,7 @@ void RingworldDemoScene::postInit(SceneObjectList *OwnerList) {
} }
void RingworldDemoScene::signal() { void RingworldDemoScene::signal() {
_soundHandler.startSound(4); _soundHandler.play(4);
_actor1.postInit(); _actor1.postInit();
_actor2.postInit(); _actor2.postInit();
_actor3.postInit(); _actor3.postInit();

View File

@ -28,6 +28,7 @@
#include "tsage/core.h" #include "tsage/core.h"
#include "tsage/scenes.h" #include "tsage/scenes.h"
#include "tsage/globals.h" #include "tsage/globals.h"
#include "tsage/sound.h"
namespace tSage { namespace tSage {
@ -46,7 +47,7 @@ public:
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SceneObject _actor1, _actor2, _actor3; SceneObject _actor1, _actor2, _actor3;
SceneObject _actor4, _actor5, _actor6; SceneObject _actor4, _actor5, _actor6;
SoundHandler _soundHandler; ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void process(Event &event); virtual void process(Event &event);

View File

@ -1342,7 +1342,7 @@ void RingworldGame::start() {
void RingworldGame::restart() { void RingworldGame::restart() {
_globals->_scenePalette.clearListeners(); _globals->_scenePalette.clearListeners();
_globals->_soundHandler.proc3(); _globals->_soundHandler.stop();
// Reset the flags // Reset the flags
_globals->reset(); _globals->reset();

View File

@ -98,7 +98,7 @@ void Scene10::Action1::signal() {
scene->_object4.animate(ANIM_MODE_6, this); scene->_object4.animate(ANIM_MODE_6, this);
break; break;
case 10: case 10:
_globals->_soundHandler.proc1(this); _globals->_soundHandler.fadeOut(this);
break; break;
case 11: case 11:
_globals->_scenePalette.clearListeners(); _globals->_scenePalette.clearListeners();
@ -185,7 +185,7 @@ void Scene10::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
setAction(&_action1); setAction(&_action1);
_globals->_soundHandler.startSound(5); _globals->_soundHandler.play(5);
} }
void Scene10::stripCallback(int v) { void Scene10::stripCallback(int v) {
@ -232,7 +232,7 @@ void Scene15::Action1::signal() {
Common::Point pt(160, 100); Common::Point pt(160, 100);
NpcMover *mover = new NpcMover(); NpcMover *mover = new NpcMover();
scene->_object1.addMover(mover, &pt, this); scene->_object1.addMover(mover, &pt, this);
scene->_soundHandler.startSound(7); scene->_soundHandler.play(7);
break; break;
} }
case 3: case 3:
@ -256,7 +256,7 @@ void Scene15::postInit(SceneObjectList *OwnerList) {
loadScene(15); loadScene(15);
Scene::postInit(); Scene::postInit();
setZoomPercents(0, 100, 200, 100); setZoomPercents(0, 100, 200, 100);
_globals->_soundHandler.startSound(6); _globals->_soundHandler.play(6);
setAction(&_action1); setAction(&_action1);
} }
@ -276,7 +276,7 @@ void Scene20::Action1::signal() {
scene->_stripManager.start(20, this); scene->_stripManager.start(20, this);
break; break;
case 2: case 2:
_globals->_soundHandler.proc1(this); _globals->_soundHandler.fadeOut(this);
break; break;
case 3: case 3:
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL; _globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
@ -341,8 +341,8 @@ void Scene20::Action2::signal() {
break; break;
} }
case 8: case 8:
scene->_sound.proc4(); scene->_sound.release();
scene->_sound.proc1(this); scene->_sound.fadeOut(this);
break; break;
case 9: case 9:
SceneItem::display(0, 0, LIST_END); SceneItem::display(0, 0, LIST_END);
@ -400,8 +400,8 @@ void Scene20::Action3::signal() {
break; break;
} }
case 6: case 6:
scene->_sound.startSound(60, this, 127); scene->_sound.play(60, this, 127);
_globals->_soundHandler.proc4(); _globals->_soundHandler.release();
break; break;
case 7: case 7:
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL; _globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
@ -450,7 +450,7 @@ void Scene20::Action4::signal() {
break; break;
} }
case 4: { case 4: {
scene->_sound.startSound(28); scene->_sound.play(28);
scene->_sceneObject4.postInit(); scene->_sceneObject4.postInit();
scene->_sceneObject4.setVisage(21); scene->_sceneObject4.setVisage(21);
scene->_sceneObject4.setStrip(3); scene->_sceneObject4.setStrip(3);
@ -463,7 +463,7 @@ void Scene20::Action4::signal() {
break; break;
} }
case 5: { case 5: {
scene->_sound.startSound(42); scene->_sound.play(42);
scene->_sceneObject4.remove(); scene->_sceneObject4.remove();
scene->_SceneObjectExt.setVisage(21); scene->_SceneObjectExt.setVisage(21);
scene->_SceneObjectExt.setStrip(1); scene->_SceneObjectExt.setStrip(1);
@ -487,7 +487,7 @@ void Scene20::Action4::signal() {
break; break;
} }
case 6: { case 6: {
scene->_sound.startSound(42); scene->_sound.play(42);
scene->_SceneObjectExt.setStrip(2); scene->_SceneObjectExt.setStrip(2);
scene->_SceneObjectExt.animate(ANIM_MODE_2, NULL); scene->_SceneObjectExt.animate(ANIM_MODE_2, NULL);
@ -506,7 +506,7 @@ void Scene20::Action4::signal() {
case 7: case 7:
_globals->_player.setStrip(2); _globals->_player.setStrip(2);
_globals->_player.animate(ANIM_MODE_2, NULL); _globals->_player.animate(ANIM_MODE_2, NULL);
scene->_sound.startSound(77, this, 127); scene->_sound.play(77, this, 127);
break; break;
case 8: case 8:
_globals->_game->endGame(20, 0); _globals->_game->endGame(20, 0);
@ -549,15 +549,15 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_SceneObjectExt._moveDiff = Common::Point(10, 10); _SceneObjectExt._moveDiff = Common::Point(10, 10);
_sceneObject3._moveDiff = Common::Point(10, 10); _sceneObject3._moveDiff = Common::Point(10, 10);
_globals->_soundHandler.startSound(20); _globals->_soundHandler.play(20);
_sound.startSound(21); _sound.play(21);
_sound.proc5(1); _sound.holdAt(true);
setAction(&_action2); setAction(&_action2);
_sceneBounds = Rect(320, 0, 640, 200); _sceneBounds = Rect(320, 0, 640, 200);
} else if (_globals->_sceneManager._previousScene == 60) { } else if (_globals->_sceneManager._previousScene == 60) {
// Evasion // Evasion
_sound.startSound(30); _sound.play(30);
_globals->_player.postInit(); _globals->_player.postInit();
_globals->_player.setVisage(20); _globals->_player.setVisage(20);
_globals->_player.setPosition(Common::Point(588, 79)); _globals->_player.setPosition(Common::Point(588, 79));
@ -605,7 +605,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_speakerGameText.setTextPos(Common::Point(350, 20)); _speakerGameText.setTextPos(Common::Point(350, 20));
_speakerGameText._textWidth = 260; _speakerGameText._textWidth = 260;
_globals->_soundHandler.startSound(8); _globals->_soundHandler.play(8);
_sceneBounds = Rect(320, 0, 640, 200); _sceneBounds = Rect(320, 0, 640, 200);
} }
@ -669,7 +669,7 @@ void Scene30::BeamAction::signal() {
case 2: case 2:
// Hide the beam and lower the player's hand // Hide the beam and lower the player's hand
scene->_sound.startSound(10, NULL, 127); scene->_sound.play(10, NULL, 127);
_globals->_player.animate(ANIM_MODE_6, this); _globals->_player.animate(ANIM_MODE_6, this);
scene->_beam.remove(); scene->_beam.remove();
break; break;
@ -693,14 +693,14 @@ void Scene30::BeamAction::signal() {
case 4: case 4:
// Open the door // Open the door
scene->_sound.startSound(11, NULL, 127); scene->_sound.play(11, NULL, 127);
scene->_door.animate(ANIM_MODE_5, this); scene->_door.animate(ANIM_MODE_5, this);
break; break;
case 5: case 5:
// Run the Kzin's talk sequence // Run the Kzin's talk sequence
scene->_sound.startSound(13, NULL, 127); scene->_sound.play(13, NULL, 127);
_globals->_soundHandler.startSound(12, NULL, 127); _globals->_soundHandler.play(12, NULL, 127);
scene->_stripManager.start((scene->_sceneMode == 0) ? 30 : 37, this); scene->_stripManager.start((scene->_sceneMode == 0) ? 30 : 37, this);
break; break;
@ -732,7 +732,7 @@ void Scene30::KzinAction::signal() {
setDelay(1200); setDelay(1200);
break; break;
case 1: case 1:
_globals->_soundHandler.proc2(0); _globals->_soundHandler.fadeOut(NULL);
_globals->_player.disableControl(); _globals->_player.disableControl();
setAction(&scene->_sequenceManager, _globals->_sceneManager._scene, 31, &scene->_kzin, &scene->_door, NULL); setAction(&scene->_sequenceManager, _globals->_sceneManager._scene, 31, &scene->_kzin, &scene->_door, NULL);
break; break;
@ -772,12 +772,12 @@ void Scene30::RingAction::signal() {
} }
case 3: case 3:
scene->_sound.startSound(11, NULL, 127); scene->_sound.play(11, NULL, 127);
scene->_door.animate(ANIM_MODE_6, this); scene->_door.animate(ANIM_MODE_6, this);
break; break;
case 4: { case 4: {
scene->_sound.startSound(13, NULL, 127); scene->_sound.play(13, NULL, 127);
NpcMover *kzinMover = new NpcMover(); NpcMover *kzinMover = new NpcMover();
Common::Point pt(354, 5); Common::Point pt(354, 5);
scene->_kzin.addMover(kzinMover, &pt, this); scene->_kzin.addMover(kzinMover, &pt, this);
@ -955,7 +955,7 @@ void Scene40::Action1::signal() {
scene->_doorway.setVisage(46); scene->_doorway.setVisage(46);
scene->_doorway.setPosition(Common::Point(305, 61)); scene->_doorway.setPosition(Common::Point(305, 61));
scene->_doorway.animate(ANIM_MODE_5, this); scene->_doorway.animate(ANIM_MODE_5, this);
scene->_soundHandler.startSound(25); scene->_soundHandler.play(25);
break; break;
case 3: case 3:
scene->_doorway.hide(); scene->_doorway.hide();
@ -976,7 +976,7 @@ void Scene40::Action1::signal() {
scene->_assassin.setFrame(1); scene->_assassin.setFrame(1);
scene->_assassin.setPosition(Common::Point(13, 171)); scene->_assassin.setPosition(Common::Point(13, 171));
scene->_assassin.animate(ANIM_MODE_5, this); scene->_assassin.animate(ANIM_MODE_5, this);
scene->_soundHandler.startSound(25); scene->_soundHandler.play(25);
break; break;
case 5: case 5:
scene->_doorway.show(); scene->_doorway.show();
@ -1011,7 +1011,7 @@ void Scene40::Action1::signal() {
break; break;
} }
case 10: { case 10: {
scene->_soundHandler.startSound(27); scene->_soundHandler.play(27);
Common::Point pt(223, 184); Common::Point pt(223, 184);
NpcMover *mover = new NpcMover(); NpcMover *mover = new NpcMover();
scene->_dyingKzin.addMover(mover, &pt, this); scene->_dyingKzin.addMover(mover, &pt, this);
@ -1024,7 +1024,7 @@ void Scene40::Action1::signal() {
break; break;
} }
case 12: { case 12: {
_globals->_soundHandler.startSound(26); _globals->_soundHandler.play(26);
_globals->_player._uiEnabled = true; _globals->_player._uiEnabled = true;
scene->_assassin.setVisage(42); scene->_assassin.setVisage(42);
scene->_assassin.setPosition(Common::Point(4, 191)); scene->_assassin.setPosition(Common::Point(4, 191));
@ -1043,7 +1043,7 @@ void Scene40::Action1::signal() {
scene->_assassin.setStrip(1); scene->_assassin.setStrip(1);
scene->_assassin.setFrame(1); scene->_assassin.setFrame(1);
scene->_assassin.animate(ANIM_MODE_5, this); scene->_assassin.animate(ANIM_MODE_5, this);
scene->_soundHandler.startSound(28); scene->_soundHandler.play(28);
break; break;
case 15: case 15:
_globals->_player.disableControl(); _globals->_player.disableControl();
@ -1057,7 +1057,7 @@ void Scene40::Action1::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 16: case 16:
_globals->_soundHandler.startSound(77, this); _globals->_soundHandler.play(77, this);
break; break;
case 17: case 17:
_globals->_game->endGame(40, 20); _globals->_game->endGame(40, 20);
@ -1083,7 +1083,7 @@ void Scene40::Action2::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 2: { case 2: {
scene->_soundHandler.startSound(28); scene->_soundHandler.play(28);
scene->_doorway.postInit(); scene->_doorway.postInit();
scene->_doorway.setVisage(16); scene->_doorway.setVisage(16);
scene->_doorway.setStrip2(6); scene->_doorway.setStrip2(6);
@ -1103,7 +1103,7 @@ void Scene40::Action2::signal() {
scene->_assassin.setVisage(44); scene->_assassin.setVisage(44);
scene->_assassin._frame = 1; scene->_assassin._frame = 1;
scene->_assassin.animate(ANIM_MODE_5, this); scene->_assassin.animate(ANIM_MODE_5, this);
scene->_soundHandler.startSound(29); scene->_soundHandler.play(29);
RING_INVENTORY._infoDisk._sceneNumber = 40; RING_INVENTORY._infoDisk._sceneNumber = 40;
break; break;
case 4: case 4:
@ -1234,11 +1234,11 @@ void Scene40::Action6::signal() {
scene->_doorway.setVisage(46); scene->_doorway.setVisage(46);
scene->_doorway.setPosition(Common::Point(305, 61)); scene->_doorway.setPosition(Common::Point(305, 61));
scene->_doorway.animate(ANIM_MODE_5, this); scene->_doorway.animate(ANIM_MODE_5, this);
scene->_soundHandler.startSound(25); scene->_soundHandler.play(25);
break; break;
} }
case 1: case 1:
scene->_soundHandler.startSound(28); scene->_soundHandler.play(28);
scene->_doorway.setPosition(Common::Point(148, 74)); scene->_doorway.setPosition(Common::Point(148, 74));
scene->_doorway.setFrame(1); scene->_doorway.setFrame(1);
scene->_doorway.setStrip(2); scene->_doorway.setStrip(2);
@ -1270,7 +1270,7 @@ void Scene40::Action7::signal() {
scene->_object7.setFrame(15); scene->_object7.setFrame(15);
} }
scene->_object7.animate(ANIM_MODE_5, this); scene->_object7.animate(ANIM_MODE_5, this);
scene->_soundHandler.startSound(25); scene->_soundHandler.play(25);
break; break;
case 2: case 2:
scene->_object7.remove(); scene->_object7.remove();
@ -1322,7 +1322,7 @@ void Scene40::Action8::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 3: case 3:
_globals->_soundHandler.startSound(77, this); _globals->_soundHandler.play(77, this);
break; break;
case 4: case 4:
_globals->_game->endGame(40, 45); _globals->_game->endGame(40, 45);
@ -1480,7 +1480,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_globals->_player.disableControl(); _globals->_player.disableControl();
if (_globals->_sceneManager._previousScene == 20) { if (_globals->_sceneManager._previousScene == 20) {
_globals->_soundHandler.startSound(24); _globals->_soundHandler.play(24);
_globals->_player.setVisage(43); _globals->_player.setVisage(43);
_object1.postInit(); _object1.postInit();
@ -1872,7 +1872,7 @@ void Scene60::Action1::signal() {
scene->_floppyDrive.setPosition(Common::Point(136, 65)); scene->_floppyDrive.setPosition(Common::Point(136, 65));
scene->_floppyDrive.animate(ANIM_MODE_5, this); scene->_floppyDrive.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(35); scene->_soundHandler1.play(35);
break; break;
case 2: case 2:
scene->_redLights.postInit(); scene->_redLights.postInit();
@ -1893,13 +1893,13 @@ void Scene60::Action1::signal() {
scene->_message._numFrames = 5; scene->_message._numFrames = 5;
_globals->_sceneItems.push_front(&scene->_message); _globals->_sceneItems.push_front(&scene->_message);
scene->_soundHandler2.startSound(38); scene->_soundHandler2.play(38);
} }
_globals->_events.setCursor(CURSOR_USE); _globals->_events.setCursor(CURSOR_USE);
break; break;
case 3: case 3:
scene->_soundHandler2.startSound(37); scene->_soundHandler2.play(37);
scene->loadScene(65); scene->loadScene(65);
scene->_message.remove(); scene->_message.remove();
@ -1968,8 +1968,8 @@ void Scene60::Action1::signal() {
scene->_floppyDrive.setFrame(scene->_floppyDrive.getFrameCount()); scene->_floppyDrive.setFrame(scene->_floppyDrive.getFrameCount());
scene->_floppyDrive.animate(ANIM_MODE_6, this); scene->_floppyDrive.animate(ANIM_MODE_6, this);
scene->_soundHandler1.startSound(35); scene->_soundHandler1.play(35);
scene->_soundHandler3.proc3(); scene->_soundHandler3.stop();
scene->_masterButton.setFrame(1); scene->_masterButton.setFrame(1);
scene->_masterButton._state = 0; scene->_masterButton._state = 0;
@ -2019,7 +2019,7 @@ void Scene60::PrevObject::doAction(int action) {
animate(ANIM_MODE_8, 1, NULL); animate(ANIM_MODE_8, 1, NULL);
if (scene->_action1.getActionIndex() > 5) { if (scene->_action1.getActionIndex() > 5) {
scene->_soundHandler3.startSound(36); scene->_soundHandler3.play(36);
scene->_action1.setActionIndex(scene->_action1.getActionIndex() - 2); scene->_action1.setActionIndex(scene->_action1.getActionIndex() - 2);
scene->_action1.setDelay(1); scene->_action1.setDelay(1);
} }
@ -2037,7 +2037,7 @@ void Scene60::NextObject::doAction(int action) {
animate(ANIM_MODE_8, 1, NULL); animate(ANIM_MODE_8, 1, NULL);
if (scene->_action1.getActionIndex() < 8) { if (scene->_action1.getActionIndex() < 8) {
scene->_soundHandler3.startSound(36); scene->_soundHandler3.play(36);
scene->_action1.setDelay(1); scene->_action1.setDelay(1);
} }
} else { } else {
@ -2051,7 +2051,7 @@ void Scene60::ExitObject::doAction(int action) {
if (action == CURSOR_LOOK) { if (action == CURSOR_LOOK) {
SceneItem::display2(60, 18); SceneItem::display2(60, 18);
} else if (action == CURSOR_USE) { } else if (action == CURSOR_USE) {
scene->_soundHandler3.startSound(36); scene->_soundHandler3.play(36);
animate(ANIM_MODE_8, 1, NULL); animate(ANIM_MODE_8, 1, NULL);
scene->_nextButton.remove(); scene->_nextButton.remove();
scene->_prevButton.remove(); scene->_prevButton.remove();
@ -2132,8 +2132,8 @@ void Scene60::ControlObject::doAction(int action) {
if (_animateMode == ANIM_MODE_NONE) if (_animateMode == ANIM_MODE_NONE)
SceneItem::display2(60, 14); SceneItem::display2(60, 14);
else if (!scene->_slaveButton._state) { else if (!scene->_slaveButton._state) {
_globals->_soundHandler.startSound(40); _globals->_soundHandler.play(40);
_globals->_soundHandler.proc5(1); _globals->_soundHandler.holdAt(true);
_globals->_sceneManager.changeScene(20); _globals->_sceneManager.changeScene(20);
} else { } else {
scene->_sceneMode = 15; scene->_sceneMode = 15;
@ -2153,14 +2153,14 @@ void Scene60::SlaveObject::doAction(int action) {
if (scene->_masterButton._state) if (scene->_masterButton._state)
scene->_sceneMode = 19; scene->_sceneMode = 19;
else if (_state) { else if (_state) {
scene->_soundHandler3.proc3(); scene->_soundHandler3.stop();
animate(ANIM_MODE_6, NULL); animate(ANIM_MODE_6, NULL);
_globals->clearFlag(102); _globals->clearFlag(102);
_globals->clearFlag(!_globals->_stripNum ? 117 : 120); _globals->clearFlag(!_globals->_stripNum ? 117 : 120);
_state = 0; _state = 0;
scene->_sceneMode = 9998; scene->_sceneMode = 9998;
} else { } else {
scene->_soundHandler3.startSound(39); scene->_soundHandler3.play(39);
_globals->setFlag(102); _globals->setFlag(102);
_globals->setFlag(!_globals->_stripNum ? 117 : 120); _globals->setFlag(!_globals->_stripNum ? 117 : 120);
animate(ANIM_MODE_5, NULL); animate(ANIM_MODE_5, NULL);
@ -2185,14 +2185,14 @@ void Scene60::MasterObject::doAction(int action) {
else if (scene->_slaveButton._state) else if (scene->_slaveButton._state)
scene->_sceneMode = 20; scene->_sceneMode = 20;
else if (_state) { else if (_state) {
scene->_soundHandler3.proc3(); scene->_soundHandler3.stop();
animate(ANIM_MODE_6, NULL); animate(ANIM_MODE_6, NULL);
_state = 0; _state = 0;
_globals->clearFlag(103); _globals->clearFlag(103);
_globals->clearFlag(!_globals->_stripNum ? 116 : 119); _globals->clearFlag(!_globals->_stripNum ? 116 : 119);
scene->_sceneMode = 9998; scene->_sceneMode = 9998;
} else { } else {
scene->_soundHandler3.startSound(39); scene->_soundHandler3.play(39);
animate(ANIM_MODE_5, NULL); animate(ANIM_MODE_5, NULL);
_state = 1; _state = 1;
_globals->setFlag(103); _globals->setFlag(103);
@ -2347,7 +2347,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_redLights.setPosition(Common::Point(199, 186)); _redLights.setPosition(Common::Point(199, 186));
_redLights.animate(ANIM_MODE_8, 0, NULL); _redLights.animate(ANIM_MODE_8, 0, NULL);
_soundHandler1.startSound(35); _soundHandler1.play(35);
if (!_globals->getFlag(83)) { if (!_globals->getFlag(83)) {
_message.postInit(); _message.postInit();
@ -2359,7 +2359,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_message._numFrames = 5; _message._numFrames = 5;
_globals->_sceneItems.push_front(&_message); _globals->_sceneItems.push_front(&_message);
_soundHandler2.startSound(38); _soundHandler2.play(38);
} }
} }
} else { } else {
@ -2382,7 +2382,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_redLights.animate(ANIM_MODE_8, 0, NULL); _redLights.animate(ANIM_MODE_8, 0, NULL);
_redLights._numFrames = 5; _redLights._numFrames = 5;
_soundHandler1.startSound(35); _soundHandler1.play(35);
if (!_globals->getFlag(83)) { if (!_globals->getFlag(83)) {
_message.postInit(); _message.postInit();
@ -2394,7 +2394,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_message._numFrames = 5; _message._numFrames = 5;
_globals->_sceneItems.push_front(&_message); _globals->_sceneItems.push_front(&_message);
_soundHandler2.startSound(38); _soundHandler2.play(38);
} }
} }
} }
@ -2462,7 +2462,7 @@ void Scene90::Action1::signal() {
setDelay(2); setDelay(2);
break; break;
case 5: case 5:
scene->_soundHandler2.startSound(58); scene->_soundHandler2.play(58);
if (scene->_stripManager._field2E8 == 220) if (scene->_stripManager._field2E8 == 220)
scene->_stripManager.start(91, this, scene); scene->_stripManager.start(91, this, scene);
@ -2477,7 +2477,7 @@ void Scene90::Action1::signal() {
break; break;
case 7: case 7:
scene->_object2.animate(ANIM_MODE_NONE); scene->_object2.animate(ANIM_MODE_NONE);
_globals->_soundHandler.startSound(56); _globals->_soundHandler.play(56);
scene->_object3.animate(ANIM_MODE_5, this); scene->_object3.animate(ANIM_MODE_5, this);
break; break;
case 8: { case 8: {
@ -2507,8 +2507,8 @@ void Scene90::Action1::signal() {
break; break;
} }
case 11: case 11:
_globals->_soundHandler.startSound(57); _globals->_soundHandler.play(57);
_globals->_soundHandler.startSound(68); _globals->_soundHandler.play(68);
scene->_object3.animate(ANIM_MODE_6, NULL); scene->_object3.animate(ANIM_MODE_6, NULL);
SceneItem::display(90, _globals->getFlag(104) ? 15 : 14, SceneItem::display(90, _globals->getFlag(104) ? 15 : 14,
@ -2556,8 +2556,8 @@ void Scene90::Object2::doAction(int action) {
scene->_object6.hide(); scene->_object6.hide();
scene->_sceneMode = 91; scene->_sceneMode = 91;
scene->_soundHandler1.startSound(59); scene->_soundHandler1.play(59);
scene->_soundHandler1.proc5(1); scene->_soundHandler1.holdAt(true);
scene->setAction(&scene->_sequenceManager, scene, 91, this, &scene->_object6, NULL); scene->setAction(&scene->_sequenceManager, scene, 91, this, &scene->_object6, NULL);
break; break;
case CURSOR_LOOK: case CURSOR_LOOK:
@ -2653,9 +2653,9 @@ void Scene90::postInit(SceneObjectList *OwnerList) {
_globals->_sceneItems.push_back(&_object3); _globals->_sceneItems.push_back(&_object3);
_globals->_player.disableControl(); _globals->_player.disableControl();
_globals->_soundHandler.startSound(55); _globals->_soundHandler.play(55);
_soundHandler1.startSound(52); _soundHandler1.play(52);
_soundHandler1.proc5(1); _soundHandler1.holdAt(true);
setAction(&_action1); setAction(&_action1);
@ -2670,7 +2670,7 @@ void Scene90::signal() {
switch (_sceneMode) { switch (_sceneMode) {
case 91: case 91:
_sceneMode = 92; _sceneMode = 92;
_globals->_soundHandler.startSound(77, this); _globals->_soundHandler.play(77, this);
break; break;
case 92: case 92:
_globals->_scenePalette.clearListeners(); _globals->_scenePalette.clearListeners();
@ -2713,7 +2713,7 @@ void Scene95::Action1::signal() {
setDelay(60); setDelay(60);
break; break;
case 2: { case 2: {
scene->_soundHandler.startSound(66); scene->_soundHandler.play(66);
scene->_object3._numFrames = 5; scene->_object3._numFrames = 5;
scene->_object3.animate(ANIM_MODE_5, NULL); scene->_object3.animate(ANIM_MODE_5, NULL);
SceneItem::display(0, 0); SceneItem::display(0, 0);
@ -2728,7 +2728,7 @@ void Scene95::Action1::signal() {
break; break;
} }
case 3: { case 3: {
scene->_soundHandler.startSound(21); scene->_soundHandler.play(21);
Common::Point pt1(235, 72); Common::Point pt1(235, 72);
PlayerMover *mover1 = new PlayerMover(); PlayerMover *mover1 = new PlayerMover();
@ -2768,7 +2768,7 @@ void Scene95::Action1::signal() {
scene->_object1.setVisage(91); scene->_object1.setVisage(91);
scene->_object1.setPosition(Common::Point(-22, 220)); scene->_object1.setPosition(Common::Point(-22, 220));
scene->_soundHandler.startSound(21); scene->_soundHandler.play(21);
Common::Point pt1(5, 198); Common::Point pt1(5, 198);
NpcMover *mover1 = new NpcMover(); NpcMover *mover1 = new NpcMover();
@ -2826,7 +2826,7 @@ void Scene95::postInit(SceneObjectList *OwnerList) {
_object3.setVisage(96); _object3.setVisage(96);
_object3.setPosition(Common::Point(29, 198)); _object3.setPosition(Common::Point(29, 198));
_soundHandler.startSound(67); _soundHandler.play(67);
setAction(&_action1); setAction(&_action1);
} }
@ -3000,7 +3000,7 @@ void Scene6100::Action5::dispatch() {
(tempSet.sqrt(zeroSet) < 150.0)) { (tempSet.sqrt(zeroSet) < 150.0)) {
switch (scene->_hitCount++) { switch (scene->_hitCount++) {
case 1: case 1:
scene->_soundHandler.startSound(233); scene->_soundHandler.play(233);
scene->showMessage(NULL, 0, NULL); scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76)) if (!_globals->getFlag(76))
@ -3008,7 +3008,7 @@ void Scene6100::Action5::dispatch() {
break; break;
case 2: case 2:
scene->_soundHandler.startSound(234); scene->_soundHandler.play(234);
scene->showMessage(NULL, 0, NULL); scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76)) if (!_globals->getFlag(76))
@ -3017,7 +3017,7 @@ void Scene6100::Action5::dispatch() {
break; break;
default: default:
scene->_soundHandler.startSound(233); scene->_soundHandler.play(233);
scene->showMessage(NULL, 0, NULL); scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76)) if (!_globals->getFlag(76))
@ -3217,7 +3217,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
if (!_globals->getFlag(76)) if (!_globals->getFlag(76))
_probe.setAction(&_action4); _probe.setAction(&_action4);
_globals->_soundHandler.startSound(231); _globals->_soundHandler.play(231);
} }
void Scene6100::remove() { void Scene6100::remove() {

View File

@ -30,6 +30,7 @@
#include "tsage/core.h" #include "tsage/core.h"
#include "tsage/scenes.h" #include "tsage/scenes.h"
#include "tsage/globals.h" #include "tsage/globals.h"
#include "tsage/sound.h"
namespace tSage { namespace tSage {
@ -65,7 +66,7 @@ class Scene15 : public Scene {
public: public:
Action1 _action1; Action1 _action1;
SceneObject _object1; SceneObject _object1;
SoundHandler _soundHandler; ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
}; };
@ -97,7 +98,7 @@ public:
Action3 _action3; Action3 _action3;
Action4 _action4; Action4 _action4;
SceneObject _sceneObject1, _SceneObjectExt, _sceneObject3, _sceneObject4, _sceneObject5; SceneObject _sceneObject1, _SceneObjectExt, _sceneObject3, _sceneObject4, _sceneObject5;
SoundHandler _sound; ASound _sound;
public: public:
Scene20(); Scene20();
virtual ~Scene20() {} virtual ~Scene20() {}
@ -143,7 +144,7 @@ class Scene30 : public Scene {
}; };
public: public:
SoundHandler _sound; ASound _sound;
DisplayHotspot _groundHotspot, _wallsHotspot, _courtyardHotspot, _treeHotspot; DisplayHotspot _groundHotspot, _wallsHotspot, _courtyardHotspot, _treeHotspot;
BeamObject _beam; BeamObject _beam;
DoorObject _door; DoorObject _door;
@ -232,7 +233,7 @@ public:
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
SpeakerSText _speakerSText; SpeakerSText _speakerSText;
SpeakerGameText _speakerGameText; SpeakerGameText _speakerGameText;
SoundHandler _soundHandler; ASound _soundHandler;
Action1 _action1; Action1 _action1;
Action2 _action2; Action2 _action2;
Action3 _action3; Action3 _action3;
@ -387,9 +388,9 @@ public:
SceneObject _redLights; SceneObject _redLights;
Item1 _item1; Item1 _item1;
Item _item2, _item3, _item4, _item5, _item6; Item _item2, _item3, _item4, _item5, _item6;
SoundHandler _soundHandler1; ASound _soundHandler1;
SoundHandler _soundHandler2; ASound _soundHandler2;
SoundHandler _soundHandler3; ASound _soundHandler3;
Scene60(); Scene60();
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
@ -423,7 +424,7 @@ public:
DisplayObject _object3, _object4, _object5; DisplayObject _object3, _object4, _object5;
SceneObject _object6; SceneObject _object6;
DisplayHotspot _item1, _item2, _item3; DisplayHotspot _item1, _item2, _item3;
SoundHandler _soundHandler1, _soundHandler2; ASound _soundHandler1, _soundHandler2;
Scene90(); Scene90();
@ -441,7 +442,7 @@ class Scene95 : public Scene {
public: public:
Action1 _action1; Action1 _action1;
SceneObject _object1, _object2, _object3; SceneObject _object1, _object2, _object3;
SoundHandler _soundHandler; ASound _soundHandler;
Scene95(); Scene95();
virtual void postInit(SceneObjectList *OwnerList); virtual void postInit(SceneObjectList *OwnerList);
@ -503,7 +504,7 @@ public:
Action5 _action5; Action5 _action5;
GetBoxAction _getBoxAction; GetBoxAction _getBoxAction;
Action7 _action7; Action7 _action7;
SoundHandler _soundHandler; ASound _soundHandler;
Speaker _speaker1; Speaker _speaker1;
SpeakerQR _speakerQR; SpeakerQR _speakerQR;
SpeakerSL _speakerSL; SpeakerSL _speakerSL;

View File

@ -151,7 +151,7 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
_sceneHotspot5.setup(69, 36, 121, 272, 9100, 45, 46); _sceneHotspot5.setup(69, 36, 121, 272, 9100, 45, 46);
_sceneHotspot6.setup(127, 0, 200, 52, 9100, 47, 48); _sceneHotspot6.setup(127, 0, 200, 52, 9100, 47, 48);
_globals->_soundHandler.startSound(251); _globals->_soundHandler.play(251);
if (_globals->_sceneManager._previousScene == 9150) { if (_globals->_sceneManager._previousScene == 9150) {
if (_globals->getFlag(20)) { if (_globals->getFlag(20)) {
_globals->_player.disableControl(); _globals->_player.disableControl();
@ -236,7 +236,7 @@ void Scene9150::dispatch() {
} else { } else {
_globals->_player.disableControl(); _globals->_player.disableControl();
if (_globals->getFlag(11)) { if (_globals->getFlag(11)) {
_globals->_soundHandler.startSound(286); _globals->_soundHandler.play(286);
_sceneMode = 9153; _sceneMode = 9153;
} else { } else {
_sceneMode = 9156; _sceneMode = 9156;
@ -270,7 +270,7 @@ void Scene9150::postInit(SceneObjectList *OwnerList) {
_sceneHotspot8.setup(133, 584, 142, 640, 9150, 57, -1); _sceneHotspot8.setup(133, 584, 142, 640, 9150, 57, -1);
_sceneHotspot10.setup(83, 304, 103, 323, 9150, 58, 59); _sceneHotspot10.setup(83, 304, 103, 323, 9150, 58, 59);
_globals->_soundHandler.startSound(285); _globals->_soundHandler.play(285);
_globals->_player.disableControl(); _globals->_player.disableControl();
if (_globals->getFlag(20)) { if (_globals->getFlag(20)) {
@ -402,7 +402,8 @@ void Scene9200::postInit(SceneObjectList *OwnerList) {
_object1.animate(ANIM_MODE_2, NULL); _object1.animate(ANIM_MODE_2, NULL);
_object1.setPosition(Common::Point(132, 114)); _object1.setPosition(Common::Point(132, 114));
_object1.fixPriority(140); _object1.fixPriority(140);
_soundHandler.startSound(297); _soundHandler.play(297);
_stripManager.addSpeaker(&_speakerQText); _stripManager.addSpeaker(&_speakerQText);
_stripManager.addSpeaker(&_speakerGR); _stripManager.addSpeaker(&_speakerGR);
_stripManager.addSpeaker(&_speakerGText); _stripManager.addSpeaker(&_speakerGText);
@ -479,7 +480,7 @@ void Scene9300::signal() {
_globals->setFlag(84); _globals->setFlag(84);
// No break on purpose // No break on purpose
case 9303: case 9303:
_globals->_soundHandler.startSound(295); _globals->_soundHandler.play(295);
_globals->_sceneManager.changeScene(9350); _globals->_sceneManager.changeScene(9350);
break; break;
case 9302: case 9302:
@ -509,7 +510,7 @@ void Scene9300::postInit(SceneObjectList *OwnerList) {
_globals->_player.changeZoom(-1); _globals->_player.changeZoom(-1);
_object1.postInit(); _object1.postInit();
_object2.postInit(); _object2.postInit();
_globals->_soundHandler.startSound(289); _globals->_soundHandler.play(289);
_hotspot1.setup(35, 142, 76, 212, 9300, 0, 1); _hotspot1.setup(35, 142, 76, 212, 9300, 0, 1);
_hotspot2.setup(28, 90, 81, 143, 9300, 2, 3); _hotspot2.setup(28, 90, 81, 143, 9300, 2, 3);
@ -764,7 +765,7 @@ void Scene9400::signal() {
void Scene9400::dispatch() { void Scene9400::dispatch() {
if ((_object1._animateMode == 2) && (_object1._strip == 1) && (_object1._frame == 4)){ if ((_object1._animateMode == 2) && (_object1._strip == 1) && (_object1._frame == 4)){
if (_field1032 == 0) { if (_field1032 == 0) {
_soundHandler.startSound(296); _soundHandler.play(296);
_field1032 = 1; _field1032 = 1;
} }
} else { } else {
@ -1083,7 +1084,7 @@ void Scene9500::signal() {
switch (_sceneMode) { switch (_sceneMode) {
case 9503: case 9503:
_globals->_sceneManager.changeScene(9200); _globals->_sceneManager.changeScene(9200);
_globals->_soundHandler.startSound(295); _globals->_soundHandler.play(295);
break; break;
case 9504: case 9504:
_globals->_sceneManager.changeScene(9850); _globals->_sceneManager.changeScene(9850);
@ -1141,7 +1142,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
setZoomPercents(110, 75, 200, 150); setZoomPercents(110, 75, 200, 150);
_globals->_player.postInit(); _globals->_player.postInit();
_globals->_soundHandler.startSound(305); _globals->_soundHandler.play(305);
_candle.postInit(); _candle.postInit();
_candle.setVisage(9500); _candle.setVisage(9500);
@ -1249,7 +1250,7 @@ void Scene9700::signal() {
_globals->_events.setCursor(CURSOR_USE); _globals->_events.setCursor(CURSOR_USE);
break; break;
case 9704: case 9704:
_globals->_soundHandler.startSound(323); _globals->_soundHandler.play(323);
_globals->_sceneManager.changeScene(9750); _globals->_sceneManager.changeScene(9750);
break; break;
} }
@ -1308,7 +1309,7 @@ void Scene9700::postInit(SceneObjectList *OwnerList) {
void Scene9750::signal() { void Scene9750::signal() {
switch (_sceneMode ++) { switch (_sceneMode ++) {
case 9751: case 9751:
_globals->_soundHandler.proc1(this); _globals->_soundHandler.fadeOut(this);
break; break;
case 9752: case 9752:
_globals->_sceneManager.changeScene(2100); _globals->_sceneManager.changeScene(2100);
@ -1440,7 +1441,7 @@ void Scene9850::Hotspot17::doAction(int action) {
SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else { } else {
if (action == CURSOR_USE) if (action == CURSOR_USE)
scene->_soundHandler.startSound(306); scene->_soundHandler.play(306);
NamedHotspot::doAction(action); NamedHotspot::doAction(action);
} }
} }
@ -1452,7 +1453,7 @@ void Scene9850::Hotspot18::doAction(int action) {
SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else { } else {
if (action == CURSOR_USE) if (action == CURSOR_USE)
scene->_soundHandler.startSound(306); scene->_soundHandler.play(306);
NamedHotspot::doAction(action); NamedHotspot::doAction(action);
} }
} }
@ -1464,7 +1465,7 @@ void Scene9850::Hotspot19::doAction(int action) {
SceneItem::display(9850, 31, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); SceneItem::display(9850, 31, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else { } else {
if (action == CURSOR_USE) if (action == CURSOR_USE)
scene->_soundHandler.startSound(313); scene->_soundHandler.play(313);
NamedHotspot::doAction(action); NamedHotspot::doAction(action);
} }
} }
@ -1653,7 +1654,7 @@ void Scene9900::strAction1::signal() {
switch (_actionIndex++) { switch (_actionIndex++) {
case 0: case 0:
scene->_soundHandler.startSound(351); scene->_soundHandler.play(351);
_object9.postInit(); _object9.postInit();
_object9.setVisage(18); _object9.setVisage(18);
_object9._frame = 1; _object9._frame = 1;
@ -1673,7 +1674,7 @@ void Scene9900::strAction1::signal() {
_globals->_scenePalette.addFader(&mask2[0], 1, 5, this); _globals->_scenePalette.addFader(&mask2[0], 1, 5, this);
break; break;
case 3: case 3:
_globals->_soundHandler.startSound(377); _globals->_soundHandler.play(377);
setDelay(120); setDelay(120);
break; break;
case 4: case 4:
@ -1854,7 +1855,7 @@ void Scene9900::signal() {
switch (_sceneMode){ switch (_sceneMode){
case 150: case 150:
_globals->_soundHandler.startSound(380); _globals->_soundHandler.play(380);
_object8.postInit(); _object8.postInit();
_object8.setVisage(2002); _object8.setVisage(2002);
_object8.setStrip(1); _object8.setStrip(1);
@ -1887,7 +1888,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9902, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6); setAction(&_sequenceManager, this, 9902, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break; break;
case 9904: case 9904:
_globals->_soundHandler.startSound(390); _globals->_soundHandler.play(390);
_sceneMode = 9912; _sceneMode = 9912;
setAction(&_strAction2, this); setAction(&_strAction2, this);
break; break;
@ -1918,7 +1919,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9904, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6); setAction(&_sequenceManager, this, 9904, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break; break;
case 9909: case 9909:
_globals->_soundHandler.startSound(375); _globals->_soundHandler.play(375);
_globals->_player.disableControl(); _globals->_player.disableControl();
_sceneMode = 9907; _sceneMode = 9907;
setAction(&_sequenceManager, this, 9907, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6); setAction(&_sequenceManager, this, 9907, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
@ -1929,7 +1930,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9911, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6); setAction(&_sequenceManager, this, 9911, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break; break;
case 9911: case 9911:
_globals->_soundHandler.startSound(367); _globals->_soundHandler.play(367);
_globals->_player.disableControl(); _globals->_player.disableControl();
_sceneMode = 9909; _sceneMode = 9909;
setAction(&_sequenceManager, this, 9909, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6); setAction(&_sequenceManager, this, 9909, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
@ -2080,7 +2081,7 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {
else else
_globals->_stripNum = 2121; _globals->_stripNum = 2121;
_globals->_soundHandler.startSound(118); _globals->_soundHandler.play(118);
} }

View File

@ -129,7 +129,7 @@ public:
SpeakerGText _speakerGText; SpeakerGText _speakerGText;
SpeakerGR _speakerGR; SpeakerGR _speakerGR;
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
SoundHandler _soundHandler; ASound _soundHandler;
SceneHotspot1 _hotspot1; SceneHotspot1 _hotspot1;
NamedHotspot _hotspot2; NamedHotspot _hotspot2;
NamedHotspot _hotspot3; NamedHotspot _hotspot3;
@ -230,7 +230,7 @@ public:
NamedHotspot _hotspot4; NamedHotspot _hotspot4;
NamedHotspot _hotspot5; NamedHotspot _hotspot5;
NamedHotspot _hotspot6; NamedHotspot _hotspot6;
SoundHandler _soundHandler; ASound _soundHandler;
int _field1032; int _field1032;
SceneHotspot7 _hotspot7; SceneHotspot7 _hotspot7;
SceneHotspot8 _hotspot8; SceneHotspot8 _hotspot8;
@ -424,7 +424,7 @@ public:
SceneObject _objLever; SceneObject _objLever;
Object6 _objScimitar; Object6 _objScimitar;
Object7 _objSword; Object7 _objSword;
SoundHandler _soundHandler; ASound _soundHandler;
NamedHotspot _hotspot1; NamedHotspot _hotspot1;
NamedHotspot _hotspot2; NamedHotspot _hotspot2;
NamedHotspot _hotspot3; NamedHotspot _hotspot3;
@ -482,7 +482,7 @@ class Scene9900 : public Scene {
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SceneObject _object1; SceneObject _object1;
SceneObject _object2; SceneObject _object2;

View File

@ -117,6 +117,7 @@ void Scene1000::Action3::signal() {
// First time being played, so show the introduction // First time being played, so show the introduction
ConfMan.setBool(SEEN_INTRO, true); ConfMan.setBool(SEEN_INTRO, true);
ConfMan.flushToDisk(); ConfMan.flushToDisk();
setDelay(1); setDelay(1);
} else { } else {
// Prompt user for whether to start play or watch introduction // Prompt user for whether to start play or watch introduction
@ -124,7 +125,7 @@ void Scene1000::Action3::signal() {
if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) { if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
_actionIndex = 20; _actionIndex = 20;
_globals->_soundHandler.proc1(this); _globals->_soundHandler.fadeOut(this);
} else { } else {
setDelay(1); setDelay(1);
} }
@ -214,7 +215,7 @@ void Scene1000::Action3::signal() {
case 18: case 18:
zoom(false); zoom(false);
_globals->_scenePalette.clearListeners(); _globals->_scenePalette.clearListeners();
_globals->_soundHandler.proc1(this); _globals->_soundHandler.fadeOut(this);
break; break;
case 19: case 19:
_globals->_sceneManager.changeScene(10); _globals->_sceneManager.changeScene(10);
@ -267,7 +268,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
_globals->_soundHandler.startSound(114); _globals->_soundHandler.play(114);
} else if (_globals->_sceneManager._previousScene == 2222) { } else if (_globals->_sceneManager._previousScene == 2222) {
setZoomPercents(150, 10, 180, 100); setZoomPercents(150, 10, 180, 100);
_object1.postInit(); _object1.postInit();
@ -283,7 +284,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
setAction(&_action1); setAction(&_action1);
} else { } else {
_globals->_soundHandler.startSound(4); _globals->_soundHandler.play(4);
setZoomPercents(0, 10, 30, 100); setZoomPercents(0, 10, 30, 100);
_object3.postInit(); _object3.postInit();
_object3.setVisage(1050); _object3.setVisage(1050);
@ -429,7 +430,7 @@ void Scene1001::Action1::signal() {
setDelay(10); setDelay(10);
break; break;
case 16: { case 16: {
scene->_soundHandler1.startSound(90); scene->_soundHandler1.play(90);
scene->_object6.postInit(); scene->_object6.postInit();
scene->_object6.setVisage(16); scene->_object6.setVisage(16);
@ -446,7 +447,7 @@ void Scene1001::Action1::signal() {
break; break;
} }
case 17: { case 17: {
scene->_soundHandler1.startSound(90); scene->_soundHandler1.play(90);
scene->_object6.remove(); scene->_object6.remove();
scene->_object7.postInit(); scene->_object7.postInit();
@ -475,7 +476,7 @@ void Scene1001::Action1::signal() {
setDelay(30); setDelay(30);
break; break;
case 19: { case 19: {
_globals->_soundHandler.startSound(91); _globals->_soundHandler.play(91);
byte adjustData[4] = {0xff, 0xff, 0xff, 0}; byte adjustData[4] = {0xff, 0xff, 0xff, 0};
_globals->_scenePalette.fade(adjustData, false, 0); _globals->_scenePalette.fade(adjustData, false, 0);
@ -496,7 +497,7 @@ void Scene1001::Action1::signal() {
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 22: case 22:
_globals->_soundHandler.startSound(92); _globals->_soundHandler.play(92);
scene->_stripManager.start(111, this); scene->_stripManager.start(111, this);
break; break;
case 23: case 23:
@ -526,7 +527,7 @@ void Scene1001::postInit(SceneObjectList *OwnerList) {
_object3.setStrip2(4); _object3.setStrip2(4);
_object3.setPosition(Common::Point(61, 177)); _object3.setPosition(Common::Point(61, 177));
_globals->_soundHandler.startSound(85); _globals->_soundHandler.play(85);
setAction(&_action1); setAction(&_action1);
} }
@ -647,7 +648,7 @@ void Scene1250::postInit(SceneObjectList *OwnerList) {
setAction(&_action4); setAction(&_action4);
} else { } else {
setAction(&_action3); setAction(&_action3);
_globals->_soundHandler.startSound(114); _globals->_soundHandler.play(114);
} }
} }
@ -734,7 +735,7 @@ void Scene1400::Action1::signal() {
_globals->_sceneManager._scrollerRect = Rect(40, 20, 280, 180); _globals->_sceneManager._scrollerRect = Rect(40, 20, 280, 180);
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL; _globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
_globals->_stripNum = 1500; _globals->_stripNum = 1500;
_globals->_soundHandler.proc3(); _globals->_soundHandler.stop();
_globals->_sceneManager.changeScene(1500); _globals->_sceneManager.changeScene(1500);
break; break;
@ -779,7 +780,7 @@ void Scene1400::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.y = (_globals->_sceneManager._scene->_sceneBounds.top / 100) * 100; _globals->_sceneOffset.y = (_globals->_sceneManager._scene->_sceneBounds.top / 100) * 100;
setAction(&_action1); setAction(&_action1);
_globals->_soundHandler.startSound(118); _globals->_soundHandler.play(118);
} }
/*-------------------------------------------------------------------------- /*--------------------------------------------------------------------------
@ -842,7 +843,7 @@ void Scene1500::Action1::signal() {
setDelay(30); setDelay(30);
break; break;
case 6: case 6:
scene->_soundHandler.startSound(123); scene->_soundHandler.play(123);
scene->_object1.setStrip2(4); scene->_object1.setStrip2(4);
scene->_object1.setFrame(1); scene->_object1.setFrame(1);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
@ -850,13 +851,13 @@ void Scene1500::Action1::signal() {
case 7: case 7:
scene->_object1.setStrip2(5); scene->_object1.setStrip2(5);
scene->_object1.animate(ANIM_MODE_2, NULL); scene->_object1.animate(ANIM_MODE_2, NULL);
scene->_soundHandler.startSound(124, this); scene->_soundHandler.play(124, this);
break; break;
case 8: case 8:
_globals->_soundHandler.startSound(126, this); _globals->_soundHandler.play(126, this);
break; break;
case 9: case 9:
_globals->_soundHandler.startSound(127); _globals->_soundHandler.play(127);
_globals->_sceneManager.changeScene(2000); _globals->_sceneManager.changeScene(2000);
break; break;
} }
@ -893,7 +894,7 @@ void Scene1500::Action2::signal() {
break; break;
} }
case 3: case 3:
scene->_soundHandler.proc4(); scene->_soundHandler.release();
_globals->_stripNum = 1505; _globals->_stripNum = 1505;
_globals->_sceneManager.changeScene(2400); _globals->_sceneManager.changeScene(2400);
break; break;
@ -907,7 +908,7 @@ void Scene1500::postInit(SceneObjectList *OwnerList) {
Scene::postInit(); Scene::postInit();
if ((_globals->_stripNum == 1500) || ((_globals->_stripNum != 1504) && (_globals->_stripNum != 2751))) { if ((_globals->_stripNum == 1500) || ((_globals->_stripNum != 1504) && (_globals->_stripNum != 2751))) {
_globals->_soundHandler.startSound(120); _globals->_soundHandler.play(120);
setZoomPercents(105, 20, 145, 100); setZoomPercents(105, 20, 145, 100);
setAction(&_action1); setAction(&_action1);

View File

@ -72,7 +72,7 @@ public:
Action1 _action1; Action1 _action1;
SceneObject _object1, _object2, _object3, _object4; SceneObject _object1, _object2, _object3, _object4;
SceneObject _object5, _object6, _object7; SceneObject _object5, _object6, _object7;
SoundHandler _soundHandler1, _soundHandler2; ASound _soundHandler1, _soundHandler2;
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
}; };
@ -134,7 +134,7 @@ public:
virtual void signal(); virtual void signal();
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
Action1 _action1; Action1 _action1;
Action2 _action2; Action2 _action2;
SceneObject _object1, _object2, _object3; SceneObject _object1, _object2, _object3;

View File

@ -129,11 +129,11 @@ void Scene2000::Action6::signal() {
setDelay(130); setDelay(130);
break; break;
case 1: case 1:
scene->_soundHandler2.startSound(79); scene->_soundHandler2.play(79);
scene->_stripManager.start(2000, this); scene->_stripManager.start(2000, this);
break; break;
case 2: case 2:
_globals->_soundHandler.startSound(81); _globals->_soundHandler.play(81);
scene->_object6.postInit(); scene->_object6.postInit();
scene->_object6.setVisage(2003); scene->_object6.setVisage(2003);
scene->_object6.setAction(NULL); scene->_object6.setAction(NULL);
@ -148,7 +148,7 @@ void Scene2000::Action6::signal() {
scene->_object6.animate(ANIM_MODE_6, this); scene->_object6.animate(ANIM_MODE_6, this);
break; break;
case 5: case 5:
_globals->_soundHandler.startSound(80); _globals->_soundHandler.play(80);
scene->_object6.remove(); scene->_object6.remove();
_globals->_sceneManager.changeScene(1001); _globals->_sceneManager.changeScene(1001);
break; break;
@ -308,12 +308,12 @@ void Scene2000::Action14::signal() {
setDelay(60); setDelay(60);
break; break;
case 3: case 3:
_globals->_soundHandler.startSound(99); _globals->_soundHandler.play(99);
scene->_object8.show(); scene->_object8.show();
scene->_object8.animate(ANIM_MODE_5, this); scene->_object8.animate(ANIM_MODE_5, this);
break; break;
case 4: case 4:
_globals->_soundHandler.startSound(12); _globals->_soundHandler.play(12);
scene->_object8.setStrip(2); scene->_object8.setStrip(2);
scene->_object8.setFrame(1); scene->_object8.setFrame(1);
scene->_object9.show(); scene->_object9.show();
@ -324,7 +324,7 @@ void Scene2000::Action14::signal() {
scene->_stripManager.start(2001, this, scene); scene->_stripManager.start(2001, this, scene);
break; break;
case 6: case 6:
_globals->_soundHandler.proc1(0/* was false */); _globals->_soundHandler.fadeOut(0/* was false */);
scene->_object8.setStrip(1); scene->_object8.setStrip(1);
scene->_object8.setFrame(scene->_object8.getFrameCount()); scene->_object8.setFrame(scene->_object8.getFrameCount());
scene->_object8.animate(ANIM_MODE_6, this); scene->_object8.animate(ANIM_MODE_6, this);
@ -333,7 +333,7 @@ void Scene2000::Action14::signal() {
scene->_object10.remove(); scene->_object10.remove();
break; break;
case 7: case 7:
_globals->_soundHandler.startSound(111); _globals->_soundHandler.play(111);
scene->_object8.remove(); scene->_object8.remove();
setDelay(5); setDelay(5);
break; break;
@ -425,11 +425,11 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
setAction(&_action13); setAction(&_action13);
break; break;
case 2200: case 2200:
_globals->_soundHandler.startSound(111); _globals->_soundHandler.play(111);
setAction(&_action14); setAction(&_action14);
break; break;
case 2222: case 2222:
_globals->_soundHandler.startSound(115); _globals->_soundHandler.play(115);
setAction(&_action8); setAction(&_action8);
break; break;
case 3500: case 3500:
@ -437,12 +437,12 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
break; break;
default: default:
_object6.remove(); _object6.remove();
_globals->_soundHandler.startSound(80); _globals->_soundHandler.play(80);
setAction(&_action6); setAction(&_action6);
break; break;
} }
_soundHandler1.startSound(78); _soundHandler1.play(78);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
} }
@ -502,7 +502,7 @@ void Scene2100::Action1::signal() {
break; break;
} }
case 2: case 2:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 3: { case 3: {
@ -551,7 +551,7 @@ void Scene2100::Action1::signal() {
} }
} }
scene->_soundHandler.startSound(161); scene->_soundHandler.play(161);
scene->_area1.restore(); scene->_area1.restore();
scene->_area2.restore(); scene->_area2.restore();
scene->_area3.restore(); scene->_area3.restore();
@ -560,7 +560,7 @@ void Scene2100::Action1::signal() {
if (_state == 2100) { if (_state == 2100) {
setDelay(1); setDelay(1);
} else { } else {
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this); scene->_object1.animate(ANIM_MODE_6, this);
} }
break; break;
@ -576,7 +576,7 @@ void Scene2100::Action1::signal() {
break; break;
case 7: case 7:
_globals->_player.fixPriority(-1); _globals->_player.fixPriority(-1);
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this); scene->_object1.animate(ANIM_MODE_6, this);
break; break;
case 8: case 8:
@ -775,17 +775,17 @@ void Scene2100::Action9::signal() {
scene->_stripManager.start(6050, this); scene->_stripManager.start(6050, this);
break; break;
case 2: case 2:
scene->_soundHandler.startSound(99); scene->_soundHandler.play(99);
scene->_object4.show(); scene->_object4.show();
scene->_object4.animate(ANIM_MODE_5, this); scene->_object4.animate(ANIM_MODE_5, this);
break; break;
case 3: case 3:
scene->_soundHandler.startSound(12); scene->_soundHandler.play(12);
scene->_object4.setStrip(2); scene->_object4.setStrip(2);
scene->_stripManager.start(6051, this, scene); scene->_stripManager.start(6051, this, scene);
break; break;
case 4: case 4:
scene->_soundHandler.proc1(0/* was false */); scene->_soundHandler.fadeOut(0/* was false */);
scene->_object4.setStrip(1); scene->_object4.setStrip(1);
scene->_object4.setFrame(scene->_object4.getFrameCount()); scene->_object4.setFrame(scene->_object4.getFrameCount());
scene->_object4.animate(ANIM_MODE_6, this); scene->_object4.animate(ANIM_MODE_6, this);
@ -846,7 +846,7 @@ void Scene2100::Action10::signal() {
break; break;
} }
case 5: case 5:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 6: { case 6: {
@ -879,7 +879,7 @@ void Scene2100::Action10::signal() {
setDelay(45); setDelay(45);
break; break;
case 9: case 9:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this); scene->_object1.animate(ANIM_MODE_6, this);
break; break;
case 10: case 10:
@ -923,7 +923,7 @@ void Scene2100::Action11::signal() {
break; break;
} }
case 3: case 3:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 4: { case 4: {
@ -944,7 +944,7 @@ void Scene2100::Action11::signal() {
setDelay(45); setDelay(45);
break; break;
case 6: case 6:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this); scene->_object1.animate(ANIM_MODE_6, this);
break; break;
case 7: case 7:
@ -969,7 +969,7 @@ void Scene2100::Action12::signal() {
scene->_stripManager.start(6000, this); scene->_stripManager.start(6000, this);
break; break;
case 2: case 2:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 3: { case 3: {
@ -983,7 +983,7 @@ void Scene2100::Action12::signal() {
break; break;
} }
case 4: { case 4: {
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, NULL); scene->_object1.animate(ANIM_MODE_6, NULL);
_globals->_player.fixPriority(-1); _globals->_player.fixPriority(-1);
@ -1095,7 +1095,7 @@ void Scene2100::Action14::signal() {
scene->_stripManager.start(6008, this); scene->_stripManager.start(6008, this);
break; break;
case 4: case 4:
scene->_soundHandler.startSound(99); scene->_soundHandler.play(99);
scene->_object4.show(); scene->_object4.show();
scene->_object4.animate(ANIM_MODE_5, this); scene->_object4.animate(ANIM_MODE_5, this);
break; break;
@ -1104,7 +1104,7 @@ void Scene2100::Action14::signal() {
scene->_stripManager.start(6009, this, scene); scene->_stripManager.start(6009, this, scene);
break; break;
case 6: case 6:
scene->_soundHandler.proc1(0/* was false */); scene->_soundHandler.fadeOut(0/* was false */);
scene->_object4.setStrip(1); scene->_object4.setStrip(1);
scene->_object4.setFrame(scene->_object4.getFrameCount()); scene->_object4.setFrame(scene->_object4.getFrameCount());
scene->_object4.animate(ANIM_MODE_6, this); scene->_object4.animate(ANIM_MODE_6, this);
@ -1135,7 +1135,7 @@ void Scene2100::Action14::signal() {
break; break;
} }
case 10: case 10:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 11: { case 11: {
@ -1150,7 +1150,7 @@ void Scene2100::Action14::signal() {
break; break;
case 13: case 13:
scene->_object3.fixPriority(1); scene->_object3.fixPriority(1);
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this); scene->_object1.animate(ANIM_MODE_6, this);
break; break;
case 14: case 14:
@ -1179,7 +1179,7 @@ void Scene2100::Action15::signal() {
scene->_object3.fixPriority(1); scene->_object3.fixPriority(1);
scene->_object3.changeZoom(-1); scene->_object3.changeZoom(-1);
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 2: { case 2: {
@ -1190,7 +1190,7 @@ void Scene2100::Action15::signal() {
break; break;
} }
case 3: { case 3: {
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this); scene->_object1.animate(ANIM_MODE_6, this);
Common::Point pt(272, 140); Common::Point pt(272, 140);
@ -1250,7 +1250,7 @@ void Scene2100::Action16::signal() {
break; break;
} }
case 5: case 5:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this); scene->_object1.animate(ANIM_MODE_5, this);
break; break;
case 6: { case 6: {
@ -1265,7 +1265,7 @@ void Scene2100::Action16::signal() {
setDelay(45); setDelay(45);
break; break;
case 8: case 8:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this); scene->_object1.animate(ANIM_MODE_6, this);
break; break;
case 9: case 9:
@ -1294,17 +1294,17 @@ void Scene2100::Action17::signal() {
scene->_stripManager.start(7070, this); scene->_stripManager.start(7070, this);
break; break;
case 4: case 4:
scene->_soundHandler.startSound(99); scene->_soundHandler.play(99);
scene->_object4.show(); scene->_object4.show();
scene->_object4.animate(ANIM_MODE_5, this); scene->_object4.animate(ANIM_MODE_5, this);
break; break;
case 5: case 5:
scene->_soundHandler.startSound(12); scene->_soundHandler.play(12);
scene->_object4.setStrip(2); scene->_object4.setStrip(2);
scene->_stripManager.start(7071, this, scene); scene->_stripManager.start(7071, this, scene);
break; break;
case 6: case 6:
scene->_soundHandler.proc1(NULL); scene->_soundHandler.fadeOut(NULL);
scene->_object4.setStrip(1); scene->_object4.setStrip(1);
scene->_object4.setFrame(scene->_object4.getFrameCount()); scene->_object4.setFrame(scene->_object4.getFrameCount());
scene->_object4.animate(ANIM_MODE_6, this); scene->_object4.animate(ANIM_MODE_6, this);
@ -1687,8 +1687,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) { switch (_globals->_sceneManager._previousScene) {
case 2120: case 2120:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_object1.fixPriority(-1); _object1.fixPriority(-1);
_globals->_player.fixPriority(-1); _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(80, 66)); _globals->_player.setPosition(Common::Point(80, 66));
@ -1755,8 +1755,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
} }
break; break;
case 3700: case 3700:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
Scene::setZoomPercents(80, 75, 100, 90); Scene::setZoomPercents(80, 75, 100, 90);
if (_globals->_sceneObjects->contains(&_object2)) if (_globals->_sceneObjects->contains(&_object2))
@ -1774,8 +1774,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2105, &_object3, NULL); setAction(&_sequenceManager, this, 2105, &_object3, NULL);
break; break;
case 4250: case 4250:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->clearFlag(43); _globals->clearFlag(43);
_globals->_player.setVisage(2104); _globals->_player.setVisage(2104);
@ -1793,8 +1793,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2107, &_object4, NULL); setAction(&_sequenceManager, this, 2107, &_object4, NULL);
break; break;
case 5000: case 5000:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
if (_globals->_sceneObjects->contains(&_object2)) if (_globals->_sceneObjects->contains(&_object2))
_object2.remove(); _object2.remove();
@ -1810,8 +1810,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action5); setAction(&_action5);
break; break;
case 5100: case 5100:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_player.setVisage(2104); _globals->_player.setVisage(2104);
_globals->_player.setFrame(1); _globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149)); _globals->_player.setPosition(Common::Point(65, 149));
@ -1829,8 +1829,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action9); setAction(&_action9);
break; break;
case 7000: case 7000:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
if (RING_INVENTORY._stasisBox2._sceneNumber == 1) { if (RING_INVENTORY._stasisBox2._sceneNumber == 1) {
_globals->_player.fixPriority(1); _globals->_player.fixPriority(1);
@ -1857,8 +1857,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
} }
break; break;
case 7600: case 7600:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
if (_globals->_sceneObjects->contains(&_object2)) if (_globals->_sceneObjects->contains(&_object2))
_object2.remove(); _object2.remove();
@ -1869,8 +1869,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action8); setAction(&_action8);
break; break;
case 8100: case 8100:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_player.setVisage(2104); _globals->_player.setVisage(2104);
_globals->_player.setFrame(1); _globals->_player.setFrame(1);
@ -1882,8 +1882,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2106, NULL); setAction(&_sequenceManager, this, 2106, NULL);
break; break;
case 9750: case 9750:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_player.setVisage(2104); _globals->_player.setVisage(2104);
_globals->_player.setFrame(1); _globals->_player.setFrame(1);
@ -1900,8 +1900,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2103, &_object4, NULL); setAction(&_sequenceManager, this, 2103, &_object4, NULL);
break; break;
default: default:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_player._uiEnabled = true; _globals->_player._uiEnabled = true;
break; break;
@ -2070,7 +2070,7 @@ void Scene2120::Action1::dispatch() {
_actionIndex = !_entries[scene->_subjectIndex]._visage ? 4 : 3; _actionIndex = !_entries[scene->_subjectIndex]._visage ? 4 : 3;
setDelay(30); setDelay(30);
scene->_soundHandler.startSound(159); scene->_soundHandler.play(159);
} }
// Next Page button handling // Next Page button handling
@ -2101,7 +2101,7 @@ void Scene2120::Action1::dispatch() {
setDelay(30); setDelay(30);
} }
scene->_soundHandler.startSound(159); scene->_soundHandler.play(159);
} }
// Previous Page button handling // Previous Page button handling
@ -2128,7 +2128,7 @@ void Scene2120::Action1::dispatch() {
break; break;
} }
scene->_soundHandler.startSound(159); scene->_soundHandler.play(159);
} }
// Exit button handling // Exit button handling
@ -2158,7 +2158,7 @@ void Scene2120::Action1::dispatch() {
setDelay(1); setDelay(1);
} }
scene->_soundHandler.startSound(159); scene->_soundHandler.play(159);
} }
} }
@ -2228,7 +2228,7 @@ void Scene2150::Action1::signal() {
break; break;
} }
case 1: case 1:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot1.animate(ANIM_MODE_5, this); scene->_hotspot1.animate(ANIM_MODE_5, this);
break; break;
case 2: { case 2: {
@ -2278,7 +2278,7 @@ void Scene2150::Action1::signal() {
} }
} }
scene->_soundHandler.startSound(161); scene->_soundHandler.play(161);
scene->_area1.restore(); scene->_area1.restore();
scene->_area2.restore(); scene->_area2.restore();
scene->_area3.restore(); scene->_area3.restore();
@ -2287,7 +2287,7 @@ void Scene2150::Action1::signal() {
if (_state == 2150) { if (_state == 2150) {
setDelay(1); setDelay(1);
} else { } else {
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot1.animate(ANIM_MODE_6, this); scene->_hotspot1.animate(ANIM_MODE_6, this);
} }
break; break;
@ -2302,7 +2302,7 @@ void Scene2150::Action1::signal() {
} }
break; break;
case 6: case 6:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot1.animate(ANIM_MODE_6, this); scene->_hotspot1.animate(ANIM_MODE_6, this);
break; break;
case 7: case 7:
@ -2329,10 +2329,10 @@ void Scene2150::Action2::signal() {
_globals->_player.setStrip(8); _globals->_player.setStrip(8);
_globals->_player.animate(ANIM_MODE_8, 1, this); _globals->_player.animate(ANIM_MODE_8, 1, this);
scene->_soundHandler.startSound(163); scene->_soundHandler.play(163);
break; break;
case 2: case 2:
scene->_soundHandler.startSound(164); scene->_soundHandler.play(164);
scene->_hotspot10.animate(ANIM_MODE_5, this); scene->_hotspot10.animate(ANIM_MODE_5, this);
break; break;
case 3: case 3:
@ -2357,7 +2357,7 @@ void Scene2150::Action2::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 5: case 5:
scene->_soundHandler.startSound(164); scene->_soundHandler.play(164);
scene->_hotspot10.animate(ANIM_MODE_6, NULL); scene->_hotspot10.animate(ANIM_MODE_6, NULL);
scene->_hotspot14.remove(); scene->_hotspot14.remove();
@ -2555,8 +2555,8 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) { switch (_globals->_sceneManager._previousScene) {
case 2120: case 2120:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_player.setPosition(Common::Point(108, 99)); _globals->_player.setPosition(Common::Point(108, 99));
break; break;
case 2200: case 2200:
@ -2705,7 +2705,7 @@ void Scene2200::Action3::signal() {
switch (_actionIndex++) { switch (_actionIndex++) {
case 0: { case 0: {
scene->_soundHandler2.startSound(103); scene->_soundHandler2.play(103);
scene->_hotspot4.setStrip(4); scene->_hotspot4.setStrip(4);
scene->_hotspot4.animate(ANIM_MODE_NONE, NULL); scene->_hotspot4.animate(ANIM_MODE_NONE, NULL);
@ -2722,7 +2722,7 @@ void Scene2200::Action3::signal() {
break; break;
} }
case 1: case 1:
scene->_soundHandler2.startSound(104); scene->_soundHandler2.play(104);
scene->_hotspot4.setStrip(2); scene->_hotspot4.setStrip(2);
scene->_hotspot4.setFrame(2); scene->_hotspot4.setFrame(2);
setDelay(120); setDelay(120);
@ -2878,7 +2878,7 @@ void Scene2200::Hotspot9::doAction(int action) {
break; break;
case OBJECT_INFODISK: case OBJECT_INFODISK:
if (_globals->_sceneManager._previousScene == 2310) { if (_globals->_sceneManager._previousScene == 2310) {
scene->_soundHandler2.startSound(35); scene->_soundHandler2.play(35);
_globals->_player.disableControl(); _globals->_player.disableControl();
scene->setAction(&scene->_action3); scene->setAction(&scene->_action3);
} }
@ -2939,8 +2939,8 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot8.remove(); _hotspot8.remove();
break; break;
case 4000: case 4000:
_globals->_soundHandler.startSound(100); _globals->_soundHandler.play(100);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_player.remove(); _globals->_player.remove();
_hotspot5.remove(); _hotspot5.remove();
_hotspot8.remove(); _hotspot8.remove();
@ -2980,9 +2980,9 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot4.fixPriority(255); _hotspot4.fixPriority(255);
_globals->_sceneItems.push_back(&_hotspot4); _globals->_sceneItems.push_back(&_hotspot4);
_soundHandler1.startSound(101); _soundHandler1.play(101);
_soundHandler2.startSound(100); _soundHandler2.play(100);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_sceneItems.push_back(&_hotspot5); _globals->_sceneItems.push_back(&_hotspot5);
setAction(&_action2); setAction(&_action2);
@ -3135,7 +3135,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) {
setAction(&_action1); setAction(&_action1);
} }
_soundHandler.startSound(116); _soundHandler.play(116);
_globals->_sceneManager._scene->_sceneBounds.center(_hotspot1._position); _globals->_sceneManager._scene->_sceneBounds.center(_hotspot1._position);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
@ -3221,7 +3221,7 @@ void Scene2230::Action2::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 3: case 3:
scene->_soundHandler.startSound(157); scene->_soundHandler.play(157);
_globals->_player._moveDiff = Common::Point(1, 1); _globals->_player._moveDiff = Common::Point(1, 1);
_globals->_player.setAction(&scene->_action4); _globals->_player.setAction(&scene->_action4);
_globals->_player._uiEnabled = true; _globals->_player._uiEnabled = true;
@ -3245,7 +3245,7 @@ void Scene2230::Action3::signal() {
NpcMover *mover = new NpcMover(); NpcMover *mover = new NpcMover();
_globals->_player.addMover(mover, &pt, this); _globals->_player.addMover(mover, &pt, this);
scene->_soundHandler.proc3(); scene->_soundHandler.stop();
break; break;
} }
case 1: case 1:
@ -3364,7 +3364,7 @@ void Scene2230::Action7::signal() {
break; break;
} }
case 2: { case 2: {
scene->_soundHandler.startSound(158); scene->_soundHandler.play(158);
scene->_hotspot8.setStrip2(2); scene->_hotspot8.setStrip2(2);
Common::Point pt(scene->_hotspot8._position.x, 97); Common::Point pt(scene->_hotspot8._position.x, 97);
@ -3447,7 +3447,7 @@ void Scene2230::Action8::signal() {
scene->_hotspot2.animate(ANIM_MODE_6, this); scene->_hotspot2.animate(ANIM_MODE_6, this);
break; break;
case 4: { case 4: {
scene->_soundHandler.startSound(158); scene->_soundHandler.play(158);
scene->_hotspot2.remove(); scene->_hotspot2.remove();
scene->_hotspot8._frame = 1; scene->_hotspot8._frame = 1;
@ -3770,7 +3770,7 @@ void Scene2280::Action1::signal() {
break; break;
} }
case 1: case 1:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot16.animate(ANIM_MODE_5, this); scene->_hotspot16.animate(ANIM_MODE_5, this);
break; break;
case 2: { case 2: {
@ -3785,7 +3785,7 @@ void Scene2280::Action1::signal() {
break; break;
case 4: case 4:
_globals->_player.fixPriority(1); _globals->_player.fixPriority(1);
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot16.animate(ANIM_MODE_6, this); scene->_hotspot16.animate(ANIM_MODE_6, this);
break; break;
case 5: case 5:
@ -3806,7 +3806,7 @@ void Scene2280::Action2::signal() {
break; break;
} }
case 1: case 1:
scene->_soundHandler.startSound(265); scene->_soundHandler.play(265);
_globals->_player.setVisage(2162); _globals->_player.setVisage(2162);
_globals->_player._frame = 1; _globals->_player._frame = 1;
@ -3826,7 +3826,7 @@ void Scene2280::Action2::signal() {
scene->_hotspot12.remove(); scene->_hotspot12.remove();
break; break;
case 4: case 4:
scene->_soundHandler.startSound(266); scene->_soundHandler.play(266);
_globals->_player.setVisage(2170); _globals->_player.setVisage(2170);
_globals->_player._frame = 1; _globals->_player._frame = 1;
_globals->_player._strip = 4; _globals->_player._strip = 4;
@ -3854,7 +3854,7 @@ void Scene2280::Action3::signal() {
break; break;
} }
case 1: case 1:
scene->_soundHandler.startSound(265); scene->_soundHandler.play(265);
_globals->_player.setVisage(2162); _globals->_player.setVisage(2162);
_globals->_player._frame = 6; _globals->_player._frame = 6;
@ -4334,8 +4334,8 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_sceneMode = 2281; _sceneMode = 2281;
setAction(&_sequenceManager, this, 2281, &_globals->_player, &_hotspot16, NULL); setAction(&_sequenceManager, this, 2281, &_globals->_player, &_hotspot16, NULL);
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
} }
_globals->_sceneItems.addItems(&_hotspot13, &_hotspot11, &_hotspot9, &_hotspot14, &_hotspot7, _globals->_sceneItems.addItems(&_hotspot13, &_hotspot11, &_hotspot9, &_hotspot14, &_hotspot7,
@ -4385,7 +4385,7 @@ void Scene2300::Action1::signal() {
} }
case 2: { case 2: {
scene->_hotspot8.setAction(&scene->_action4); scene->_hotspot8.setAction(&scene->_action4);
scene->_soundHandler2.startSound(21); scene->_soundHandler2.play(21);
Common::Point pt1(95, scene->_hotspot5._position.y); Common::Point pt1(95, scene->_hotspot5._position.y);
NpcMover *mover1 = new NpcMover(); NpcMover *mover1 = new NpcMover();
@ -4423,7 +4423,7 @@ void Scene2300::Action1::signal() {
break; break;
} }
case 6: case 6:
scene->_soundHandler1.startSound(28); scene->_soundHandler1.play(28);
_globals->_player.disableControl(); _globals->_player.disableControl();
scene->_hotspot2.setVisage(40); scene->_hotspot2.setVisage(40);
@ -4437,7 +4437,7 @@ void Scene2300::Action1::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 7: case 7:
_globals->_soundHandler.startSound(77, this); _globals->_soundHandler.play(77, this);
break; break;
case 8: case 8:
_globals->_game->endGame(2300, 0); _globals->_game->endGame(2300, 0);
@ -4464,7 +4464,7 @@ void Scene2300::Action1::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 11: case 11:
scene->_soundHandler1.startSound(28); scene->_soundHandler1.play(28);
scene->_hotspot5._strip = 2; scene->_hotspot5._strip = 2;
scene->_hotspot6._strip = 2; scene->_hotspot6._strip = 2;
@ -4481,7 +4481,7 @@ void Scene2300::Action1::signal() {
_globals->_player.animate(ANIM_MODE_6, this); _globals->_player.animate(ANIM_MODE_6, this);
break; break;
case 12: case 12:
scene->_soundHandler1.startSound(77); scene->_soundHandler1.play(77);
_globals->_player.setVisage(0); _globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL); _globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setStrip(4); _globals->_player.setStrip(4);
@ -4558,8 +4558,8 @@ void Scene2300::Action2::signal() {
scene->_hotspot2.setFrame(1); scene->_hotspot2.setFrame(1);
scene->_hotspot2.animate(ANIM_MODE_5, this); scene->_hotspot2.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(28); scene->_soundHandler1.play(28);
scene->_soundHandler2.startSound(97); scene->_soundHandler2.play(97);
break; break;
case 7: case 7:
scene->_hotspot7._strip = 2; scene->_hotspot7._strip = 2;
@ -4602,8 +4602,8 @@ void Scene2300::Action3::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 3: case 3:
scene->_soundHandler1.startSound(97); scene->_soundHandler1.play(97);
scene->_soundHandler2.startSound(28); scene->_soundHandler2.play(28);
scene->_hotspot7._strip = 2; scene->_hotspot7._strip = 2;
scene->_hotspot7._frame = 1; scene->_hotspot7._frame = 1;
@ -4615,7 +4615,7 @@ void Scene2300::Action3::signal() {
_globals->_player.animate(ANIM_MODE_6, NULL); _globals->_player.animate(ANIM_MODE_6, NULL);
break; break;
case 4: case 4:
scene->_soundHandler2.startSound(97); scene->_soundHandler2.play(97);
_globals->_player.setVisage(0); _globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL); _globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setStrip(1); _globals->_player.setStrip(1);
@ -4636,7 +4636,7 @@ void Scene2300::Action4::signal() {
switch (_actionIndex++) { switch (_actionIndex++) {
case 0: case 0:
scene->_hotspot8.animate(ANIM_MODE_5, this); scene->_hotspot8.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(11); scene->_soundHandler1.play(11);
break; break;
case 1: case 1:
scene->_hotspot9.postInit(); scene->_hotspot9.postInit();
@ -4646,7 +4646,7 @@ void Scene2300::Action4::signal() {
scene->_hotspot9.setPosition(Common::Point(273, 199)); scene->_hotspot9.setPosition(Common::Point(273, 199));
scene->_hotspot9.fixPriority(19); scene->_hotspot9.fixPriority(19);
scene->_hotspot9.animate(ANIM_MODE_5, this); scene->_hotspot9.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(11); scene->_soundHandler1.play(11);
break; break;
case 2: case 2:
scene->_hotspot8.remove(); scene->_hotspot8.remove();
@ -4657,10 +4657,10 @@ void Scene2300::Action4::signal() {
scene->_hotspot10.setFrame(4); scene->_hotspot10.setFrame(4);
scene->_hotspot10.setPosition(Common::Point(292, 113)); scene->_hotspot10.setPosition(Common::Point(292, 113));
scene->_hotspot10.animate(ANIM_MODE_5, this); scene->_hotspot10.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(11); scene->_soundHandler1.play(11);
break; break;
case 3: case 3:
scene->_soundHandler1.startSound(13); scene->_soundHandler1.play(13);
remove(); remove();
break; break;
} }
@ -4736,7 +4736,7 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
_hotspot8.setVisage(2301); _hotspot8.setVisage(2301);
_hotspot8.setPosition(Common::Point(288, 74)); _hotspot8.setPosition(Common::Point(288, 74));
_globals->_soundHandler.startSound(96); _globals->_soundHandler.play(96);
if (_globals->_sceneManager._previousScene == 2000) { if (_globals->_sceneManager._previousScene == 2000) {
_hotspot8.remove(); _hotspot8.remove();
@ -4767,8 +4767,8 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
_hotspot7.setPosition(Common::Point(229, 125)); _hotspot7.setPosition(Common::Point(229, 125));
_hotspot7._numFrames = 5; _hotspot7._numFrames = 5;
_soundHandler1.startSound(95); _soundHandler1.play(95);
_soundHandler2.startSound(96); _soundHandler2.play(96);
_globals->_sceneItems.push_back(&_hotspot7); _globals->_sceneItems.push_back(&_hotspot7);
setAction(&_action2); setAction(&_action2);
@ -5051,7 +5051,7 @@ void Scene2320::Action2::signal() {
switch (_actionIndex++) { switch (_actionIndex++) {
case 0: { case 0: {
scene->_soundHandler.startSound(253); scene->_soundHandler.play(253);
scene->_hotspot13.fixPriority(99); scene->_hotspot13.fixPriority(99);
Common::Point pt(scene->_hotspot13._position.x, 200); Common::Point pt(scene->_hotspot13._position.x, 200);
@ -5077,7 +5077,7 @@ void Scene2320::Action3::signal() {
break; break;
} }
case 1: case 1:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_5, this); scene->_hotspot6.animate(ANIM_MODE_5, this);
break; break;
case 2: { case 2: {
@ -5126,7 +5126,7 @@ void Scene2320::Action3::signal() {
} }
} }
scene->_soundHandler.startSound(161); scene->_soundHandler.play(161);
scene->_area1.restore(); scene->_area1.restore();
scene->_area2.restore(); scene->_area2.restore();
scene->_area3.restore(); scene->_area3.restore();
@ -5135,7 +5135,7 @@ void Scene2320::Action3::signal() {
if (_state == 2320) { if (_state == 2320) {
setDelay(10); setDelay(10);
} else { } else {
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_6, this); scene->_hotspot6.animate(ANIM_MODE_6, this);
} }
break; break;
@ -5151,7 +5151,7 @@ void Scene2320::Action3::signal() {
break; break;
} }
case 6: case 6:
scene->_soundHandler.startSound(162); scene->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_6, this); scene->_hotspot6.animate(ANIM_MODE_6, this);
break; break;
case 7: case 7:
@ -5236,8 +5236,8 @@ void Scene2320::Action4::signal() {
break; break;
case 10: case 10:
if (_globals->getFlag(109)) { if (_globals->getFlag(109)) {
_globals->_soundHandler.startSound(40); _globals->_soundHandler.play(40);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
Common::Point pt(303, 240); Common::Point pt(303, 240);
NpcMover *mover = new NpcMover(); NpcMover *mover = new NpcMover();
@ -5296,7 +5296,7 @@ void Scene2320::Action4::signal() {
} }
case 19: { case 19: {
scene->_hotspot16.remove(); scene->_hotspot16.remove();
scene->_soundHandler.startSound(253); scene->_soundHandler.play(253);
scene->_hotspot13.show(); scene->_hotspot13.show();
Common::Point pt(319, 157); Common::Point pt(319, 157);
@ -5447,7 +5447,7 @@ void Scene2320::Action7::signal() {
setDelay(30); setDelay(30);
break; break;
case 1: case 1:
_globals->_soundHandler.startSound(162); _globals->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_5, this); scene->_hotspot6.animate(ANIM_MODE_5, this);
break; break;
case 2: case 2:
@ -5872,8 +5872,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) { switch (_globals->_sceneManager._previousScene) {
case 2120: case 2120:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_globals->_player.fixPriority(-1); _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(389, 72)); _globals->_player.setPosition(Common::Point(389, 72));
@ -5890,8 +5890,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
case 4250: case 4250:
case 5000: case 5000:
case 7000: case 7000:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
if ((_globals->_sceneManager._previousScene == 7000) && !_globals->getFlag(80)) if ((_globals->_sceneManager._previousScene == 7000) && !_globals->getFlag(80))
_globals->setFlag(36); _globals->setFlag(36);
@ -5907,8 +5907,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
setAction(&_action6); setAction(&_action6);
break; break;
case 6100: case 6100:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_hotspot8.postInit(); _hotspot8.postInit();
_hotspot8.setVisage(2345); _hotspot8.setVisage(2345);
@ -5919,9 +5919,9 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager1, this, 2325, &_globals->_player, &_hotspot6, &_hotspot8, &_hotspot7, NULL); setAction(&_sequenceManager1, this, 2325, &_globals->_player, &_hotspot6, &_hotspot8, &_hotspot7, NULL);
break; break;
case 7600: case 7600:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_soundHandler.startSound(21); _soundHandler.play(21);
_globals->_player.setVisage(2323); _globals->_player.setVisage(2323);
_globals->_player.setStrip(2); _globals->_player.setStrip(2);
@ -5978,8 +5978,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager1, this, 2325, &_globals->_player, &_hotspot6, &_hotspot8, &_hotspot7, NULL); setAction(&_sequenceManager1, this, 2325, &_globals->_player, &_hotspot6, &_hotspot8, &_hotspot7, NULL);
break; break;
default: default:
_globals->_soundHandler.startSound(160); _globals->_soundHandler.play(160);
_globals->_soundHandler.proc5(true); _globals->_soundHandler.holdAt(true);
_sceneMode = 2321; _sceneMode = 2321;
_globals->_player.setStrip(3); _globals->_player.setStrip(3);
@ -6110,7 +6110,7 @@ void Scene2400::postInit(SceneObjectList *OwnerList) {
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
_globals->_soundHandler.startSound(153); _globals->_soundHandler.play(153);
} }
} // End of namespace tSage } // End of namespace tSage

View File

@ -114,7 +114,7 @@ public:
Action14 _action14; Action14 _action14;
SceneObject _object1, _object2, _object3, _object4, _object5; SceneObject _object1, _object2, _object3, _object4, _object5;
SceneObject _object6, _object7, _object8, _object9, _object10; SceneObject _object6, _object7, _object8, _object9, _object10;
SoundHandler _soundHandler1, _soundHandler2; ASound _soundHandler1, _soundHandler2;
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void stripCallback(int v); virtual void stripCallback(int v);
@ -232,7 +232,7 @@ class Scene2100 : public Scene {
}; };
public: public:
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SoundHandler _soundHandler; ASound _soundHandler;
SpeakerMText _speakerMText; SpeakerMText _speakerMText;
SpeakerMR _speakerMR; SpeakerMR _speakerMR;
SpeakerQL _speakerQL; SpeakerQL _speakerQL;
@ -311,7 +311,7 @@ class Scene2120 : public Scene {
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SceneObject _topicArrowHotspot, _arrowHotspot, _visageHotspot; SceneObject _topicArrowHotspot, _arrowHotspot, _visageHotspot;
SceneObject _subjectButton, _nextPageButton, _previousPageButton, _exitButton; SceneObject _subjectButton, _nextPageButton, _previousPageButton, _exitButton;
Action1 _action1; Action1 _action1;
@ -359,7 +359,7 @@ class Scene2150 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SpeakerGameText _speakerGameText; SpeakerGameText _speakerGameText;
@ -440,7 +440,7 @@ public:
DisplayHotspot _hotspot10; DisplayHotspot _hotspot10;
SceneObject _hotspot2, _hotspot4; SceneObject _hotspot2, _hotspot4;
SceneObject _hotspot6, _hotspot7, _hotspot8; SceneObject _hotspot6, _hotspot7, _hotspot8;
SoundHandler _soundHandler1, _soundHandler2; ASound _soundHandler1, _soundHandler2;
Scene2200(); Scene2200();
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
@ -462,7 +462,7 @@ class Scene2222 : public Scene {
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SpeakerSText _speakerSText; SpeakerSText _speakerSText;
SpeakerMText _speakerMText; SpeakerMText _speakerMText;
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
@ -552,7 +552,7 @@ class Scene2230 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
Action1 _action1; Action1 _action1;
Action2 _action2; Action2 _action2;
Action3 _action3; Action3 _action3;
@ -652,7 +652,7 @@ class Scene2280 : public Scene {
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
Rect _exitRect; Rect _exitRect;
Action1 _action1; Action1 _action1;
@ -712,7 +712,7 @@ class Scene2300 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler1, _soundHandler2; ASound _soundHandler1, _soundHandler2;
SpeakerSL _speakerSL; SpeakerSL _speakerSL;
SpeakerMText _speakerMText; SpeakerMText _speakerMText;
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
@ -834,7 +834,7 @@ class Scene2320 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SequenceManager _sequenceManager1, _sequenceManager2; SequenceManager _sequenceManager1, _sequenceManager2;
SpeakerMText _speakerMText; SpeakerMText _speakerMText;
SpeakerMR _speakerMR; SpeakerMR _speakerMR;

View File

@ -178,7 +178,7 @@ void Scene3700::Action1::signal() {
setDelay(90); setDelay(90);
break; break;
case 3: case 3:
scene->_soundHandler.startSound(196); scene->_soundHandler.play(196);
scene->_viewer.hide(); scene->_viewer.hide();
scene->_hotspot1.postInit(); scene->_hotspot1.postInit();
@ -190,7 +190,7 @@ void Scene3700::Action1::signal() {
setDelay(90); setDelay(90);
break; break;
case 4: case 4:
scene->_soundHandler.startSound(197); scene->_soundHandler.play(197);
scene->_hotspot1.hide(); scene->_hotspot1.hide();
scene->_hotspot2.postInit(); scene->_hotspot2.postInit();
@ -202,7 +202,7 @@ void Scene3700::Action1::signal() {
setDelay(30); setDelay(30);
break; break;
case 5: case 5:
scene->_soundHandler.startSound(198); scene->_soundHandler.play(198);
scene->_hotspot2.hide(); scene->_hotspot2.hide();
scene->_hotspot1.show(); scene->_hotspot1.show();
setDelay(90); setDelay(90);
@ -244,7 +244,7 @@ void Scene3700::postInit(tSage::SceneObjectList *OwnerList) {
_viewer.setPosition(Common::Point(195, 83)); _viewer.setPosition(Common::Point(195, 83));
setAction(&_action1); setAction(&_action1);
_globals->_soundHandler.startSound(195); _globals->_soundHandler.play(195);
} }
} // End of namespace tSage } // End of namespace tSage

View File

@ -82,7 +82,7 @@ public:
SpeakerSText _speakerSText; SpeakerSText _speakerSText;
SpeakerMText _speakerMText; SpeakerMText _speakerMText;
SpeakerMR _speakerMR; SpeakerMR _speakerMR;
SoundHandler _soundHandler; ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
}; };

View File

@ -101,7 +101,7 @@ void Scene4000::Action1::signal() {
ADD_MOVER_NULL(scene->_hotspot5, -40, 86); ADD_MOVER_NULL(scene->_hotspot5, -40, 86);
break; break;
case 5: case 5:
_globals->_soundHandler.startSound(155); _globals->_soundHandler.play(155);
_globals->setFlag(43); _globals->setFlag(43);
_globals->setFlag(114); _globals->setFlag(114);
scene->_stripManager.start(4430, this); scene->_stripManager.start(4430, this);
@ -345,14 +345,14 @@ void Scene4000::Action8::signal() {
setDelay(60); setDelay(60);
break; break;
case 3: case 3:
_globals->_soundHandler.startSound(170); _globals->_soundHandler.play(170);
scene->_smoke2.setVisage(4000); scene->_smoke2.setVisage(4000);
scene->_smoke2.setStrip(6); scene->_smoke2.setStrip(6);
scene->_smoke2.animate(ANIM_MODE_2, NULL); scene->_smoke2.animate(ANIM_MODE_2, NULL);
setDelay(60); setDelay(60);
break; break;
case 4: case 4:
_globals->_soundHandler.startSound(77, this); _globals->_soundHandler.play(77, this);
break; break;
case 5: case 5:
_globals->_game->endGame(4000, 15); _globals->_game->endGame(4000, 15);
@ -418,7 +418,7 @@ void Scene4000::Action11::signal() {
scene->_olo.animate(ANIM_MODE_1, NULL); scene->_olo.animate(ANIM_MODE_1, NULL);
break; break;
case 5: case 5:
scene->_soundHandler1.proc3(); scene->_soundHandler1.stop();
scene->_forceField.remove(); scene->_forceField.remove();
ADD_MOVER(_globals->_player, 340, 163); ADD_MOVER(_globals->_player, 340, 163);
@ -481,12 +481,12 @@ void Scene4000::Action13::signal() {
setDelay(3); setDelay(3);
break; break;
case 1: case 1:
scene->_soundHandler2.startSound(151); scene->_soundHandler2.play(151);
scene->_soundHandler2.proc5(true); scene->_soundHandler2.holdAt(true);
ADD_MOVER(scene->_lander, -30, 70); ADD_MOVER(scene->_lander, -30, 70);
break; break;
case 2: case 2:
scene->_soundHandler2.proc4(); scene->_soundHandler2.release();
_globals->_sceneManager.changeScene(4010); _globals->_sceneManager.changeScene(4010);
break; break;
} }
@ -851,7 +851,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_theTech.setPosition(Common::Point(281, 176)); _theTech.setPosition(Common::Point(281, 176));
if (_globals->getFlag(34)) { if (_globals->getFlag(34)) {
_soundHandler1.startSound(156); _soundHandler1.play(156);
_forceField.postInit(); _forceField.postInit();
_forceField.setVisage(4000); _forceField.setVisage(4000);
@ -884,7 +884,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) { switch (_globals->_sceneManager._previousScene) {
case 2320: case 2320:
_globals->_soundHandler.startSound(155); _globals->_soundHandler.play(155);
if (RING_INVENTORY._ale._sceneNumber == 1) { if (RING_INVENTORY._ale._sceneNumber == 1) {
_guardRock.postInit(); _guardRock.postInit();
@ -946,7 +946,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
} }
if (_globals->_stripNum == 4025) { if (_globals->_stripNum == 4025) {
_soundHandler1.startSound(182); _soundHandler1.play(182);
_forceField.remove(); _forceField.remove();
_hotspot5.postInit(); _hotspot5.postInit();
@ -1024,7 +1024,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
break; break;
case 4050: case 4050:
_globals->_soundHandler.startSound(155); _globals->_soundHandler.play(155);
_globals->_player.disableControl(); _globals->_player.disableControl();
if (_globals->_stripNum == 4050) { if (_globals->_stripNum == 4050) {
@ -1061,7 +1061,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
break; break;
default: default:
_globals->_soundHandler.startSound(155); _globals->_soundHandler.play(155);
_lander.postInit(); _lander.postInit();
_lander.setVisage(4002); _lander.setVisage(4002);
@ -1085,7 +1085,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
RING_INVENTORY._ladder._sceneNumber = 4100; RING_INVENTORY._ladder._sceneNumber = 4100;
RING_INVENTORY._rope._sceneNumber = 4150; RING_INVENTORY._rope._sceneNumber = 4150;
_soundHandler1.startSound(156); _soundHandler1.play(156);
_forceField.postInit(); _forceField.postInit();
_forceField.setVisage(4000); _forceField.setVisage(4000);
@ -1224,8 +1224,8 @@ void Scene4000::dispatch() {
if ((RING_INVENTORY._peg._sceneNumber == 1) && _globals->getFlag(34) && if ((RING_INVENTORY._peg._sceneNumber == 1) && _globals->getFlag(34) &&
_globals->getFlag(37) && !_globals->getFlag(40)) { _globals->getFlag(37) && !_globals->getFlag(40)) {
_globals->_player.disableControl(); _globals->_player.disableControl();
_soundHandler1.startSound(177); _soundHandler1.play(177);
_globals->_soundHandler.startSound(178); _globals->_soundHandler.play(178);
setAction(&_action1); setAction(&_action1);
} }
@ -1873,7 +1873,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_olloFace.fixPriority(152); _olloFace.fixPriority(152);
if(_globals->_sceneManager._previousScene == 4050) { if(_globals->_sceneManager._previousScene == 4050) {
_globals->_soundHandler.startSound(155); _globals->_soundHandler.play(155);
_globals->_player.setPosition(Common::Point(72, 128)); _globals->_player.setPosition(Common::Point(72, 128));
_globals->_player.enableControl(); _globals->_player.enableControl();
@ -2254,7 +2254,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.setStrip(2); _globals->_player.setStrip(2);
setAction(&_action2); setAction(&_action2);
_globals->_soundHandler.startSound(175); _globals->_soundHandler.play(175);
} else { } else {
// Without the rope // Without the rope
_globals->_player.setVisage(5315); _globals->_player.setVisage(5315);
@ -2265,7 +2265,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.animate(ANIM_MODE_2, NULL); _globals->_player.animate(ANIM_MODE_2, NULL);
setAction(&_action4); setAction(&_action4);
_globals->_soundHandler.startSound(176); _globals->_soundHandler.play(176);
} }
break; break;
case 4045: case 4045:
@ -2279,7 +2279,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.setObjectWrapper(new SceneObjectWrapper()); _globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setPosition(Common::Point(193, 193)); _globals->_player.setPosition(Common::Point(193, 193));
_globals->_soundHandler.startSound(175); _globals->_soundHandler.play(175);
break; break;
default: default:
break; break;
@ -2698,7 +2698,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) {
&_hotspot11, &_hotspot9, &_hotspot7, &_hotspot10, &_hotspot8, &_hotspot14, NULL); &_hotspot11, &_hotspot9, &_hotspot7, &_hotspot10, &_hotspot8, &_hotspot14, NULL);
if (_globals->_sceneManager._previousScene == 4150) { if (_globals->_sceneManager._previousScene == 4150) {
_globals->_soundHandler.startSound(155); _globals->_soundHandler.play(155);
if (!_globals->getFlag(42)) { if (!_globals->getFlag(42)) {
_hotspot1.setVisage(4104); _hotspot1.setVisage(4104);
@ -3072,8 +3072,8 @@ void Scene4150::postInit(SceneObjectList *OwnerList) {
&_hotspot10, &_hotspot9, &_hotspot8, &_hotspot7, &_hotspot6, &_hotspot2, &_hotspot10, &_hotspot9, &_hotspot8, &_hotspot7, &_hotspot6, &_hotspot2,
&_hotspot5, NULL); &_hotspot5, NULL);
_globals->_soundHandler.startSound(165); _globals->_soundHandler.play(165);
_soundHandler.startSound(311); _soundHandler.play(311);
} }
void Scene4150::signal() { void Scene4150::signal() {
@ -3087,7 +3087,7 @@ void Scene4150::dispatch() {
Scene::dispatch(); Scene::dispatch();
if (!_action && (_globals->_player._position.x >= 316)) { if (!_action && (_globals->_player._position.x >= 316)) {
_globals->_soundHandler.proc1(NULL); _globals->_soundHandler.fadeOut(NULL);
_globals->_player.disableControl(); _globals->_player.disableControl();
_sceneMode = 4152; _sceneMode = 4152;
setAction(&_sequenceManager, this, 4152, &_globals->_player, NULL); setAction(&_sequenceManager, this, 4152, &_globals->_player, NULL);
@ -3390,7 +3390,7 @@ void Scene4250::Hotspot6::doAction(int action) {
SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 20 : 3); SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 20 : 3);
break; break;
case OBJECT_HELMET: case OBJECT_HELMET:
_globals->_soundHandler.startSound(354); _globals->_soundHandler.play(354);
_globals->_player.disableControl(); _globals->_player.disableControl();
RING_INVENTORY._helmet._sceneNumber = 4250; RING_INVENTORY._helmet._sceneNumber = 4250;
@ -3419,7 +3419,7 @@ void Scene4250::Hotspot6::doAction(int action) {
break; break;
case OBJECT_NULLIFIER: case OBJECT_NULLIFIER:
if (RING_INVENTORY._helmet._sceneNumber == 4250) { if (RING_INVENTORY._helmet._sceneNumber == 4250) {
_globals->_soundHandler.startSound(353); _globals->_soundHandler.play(353);
_globals->_player.disableControl(); _globals->_player.disableControl();
RING_INVENTORY._helmet._sceneNumber = 1; RING_INVENTORY._helmet._sceneNumber = 1;
@ -3626,7 +3626,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot7.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); _hotspot7.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_globals->_sceneItems.push_back(&_hotspot7); _globals->_sceneItems.push_back(&_hotspot7);
_globals->_soundHandler.startSound(185); _globals->_soundHandler.play(185);
} }
void Scene4250::signal() { void Scene4250::signal() {
@ -3659,7 +3659,7 @@ void Scene4250::signal() {
_globals->_player.enableControl(); _globals->_player.enableControl();
break; break;
case 4259: case 4259:
_globals->_soundHandler.startSound(360); _globals->_soundHandler.play(360);
_globals->_sceneManager.changeScene(9900); _globals->_sceneManager.changeScene(9900);
break; break;
case 4261: case 4261:
@ -3727,36 +3727,36 @@ void Scene4300::Action1::signal() {
_globals->setFlag(56); _globals->setFlag(56);
_globals->_scenePalette.addRotation(240, 254, -1); _globals->_scenePalette.addRotation(240, 254, -1);
scene->_hotspot7.animate(ANIM_MODE_6, this); scene->_hotspot7.animate(ANIM_MODE_6, this);
_globals->_soundHandler.startSound(164); _globals->_soundHandler.play(164);
break; break;
case 1: case 1:
_globals->_soundHandler.startSound(340); _globals->_soundHandler.play(340);
scene->_soundHandler1.startSound(341); scene->_soundHandler1.play(341);
scene->_hotspot1.remove(); scene->_hotspot1.remove();
setDelay(3); setDelay(3);
break; break;
case 2: case 2:
scene->_soundHandler1.startSound(341); scene->_soundHandler1.play(341);
scene->_hotspot2.remove(); scene->_hotspot2.remove();
setDelay(6); setDelay(6);
break; break;
case 3: case 3:
scene->_soundHandler1.startSound(341); scene->_soundHandler1.play(341);
scene->_hotspot3.remove(); scene->_hotspot3.remove();
setDelay(6); setDelay(6);
break; break;
case 4: case 4:
scene->_soundHandler1.startSound(341); scene->_soundHandler1.play(341);
scene->_hotspot4.remove(); scene->_hotspot4.remove();
setDelay(12); setDelay(12);
break; break;
case 5: case 5:
scene->_soundHandler1.startSound(341); scene->_soundHandler1.play(341);
scene->_hotspot5.remove(); scene->_hotspot5.remove();
setDelay(12); setDelay(12);
break; break;
case 6: case 6:
scene->_soundHandler1.startSound(341); scene->_soundHandler1.play(341);
scene->_hotspot6.remove(); scene->_hotspot6.remove();
setDelay(60); setDelay(60);
break; break;
@ -3769,7 +3769,7 @@ void Scene4300::Action1::signal() {
scene->_stripManager.start(8015, this, scene); scene->_stripManager.start(8015, this, scene);
break; break;
case 9: case 9:
_globals->_soundHandler.startSound(350); _globals->_soundHandler.play(350);
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL; _globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
_globals->_events.setCursor(CURSOR_USE); _globals->_events.setCursor(CURSOR_USE);
_globals->_player.enableControl(); _globals->_player.enableControl();
@ -3892,7 +3892,7 @@ void Scene4300::Hotspot10::doAction(int action) {
void Scene4300::Hotspot15::signal() { void Scene4300::Hotspot15::signal() {
Scene4300 *scene = (Scene4300 *)_globals->_sceneManager._scene; Scene4300 *scene = (Scene4300 *)_globals->_sceneManager._scene;
scene->_soundHandler2.startSound(345); scene->_soundHandler2.play(345);
_strip = (_globals->_randomSource.getRandomNumber(6) < 2) ? 2 : 1; _strip = (_globals->_randomSource.getRandomNumber(6) < 2) ? 2 : 1;
if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) || if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) ||
@ -3958,7 +3958,7 @@ void Scene4300::Hotspot17::doAction(int action) {
SceneItem::display2(4300, 26); SceneItem::display2(4300, 26);
break; break;
case OBJECT_STASIS_BOX2: case OBJECT_STASIS_BOX2:
scene->_soundHandler1.startSound(352); scene->_soundHandler1.play(352);
_globals->_events.setCursor(CURSOR_USE); _globals->_events.setCursor(CURSOR_USE);
scene->_sceneMode = 4303; scene->_sceneMode = 4303;
@ -4217,11 +4217,11 @@ void Scene4301::Action1::signal() {
switch (_actionIndex++) { switch (_actionIndex++) {
case 0: case 0:
scene->_soundHandler.startSound(164); scene->_soundHandler.play(164);
scene->_hotspot1.animate(ANIM_MODE_5, this); scene->_hotspot1.animate(ANIM_MODE_5, this);
break; break;
case 1: case 1:
_globals->_soundHandler.startSound(335); _globals->_soundHandler.play(335);
_globals->_events.setCursor(CURSOR_USE); _globals->_events.setCursor(CURSOR_USE);
scene->_hotspot2.postInit(); scene->_hotspot2.postInit();
@ -4246,7 +4246,7 @@ void Scene4301::Action1::signal() {
case 10: case 10:
// Puzzle: Wrong code // Puzzle: Wrong code
_globals->_events.setCursor(CURSOR_NONE); _globals->_events.setCursor(CURSOR_NONE);
scene->_soundHandler.startSound(337); scene->_soundHandler.play(337);
if (scene->_hotspot3._flags & OBJFLAG_HIDE) if (scene->_hotspot3._flags & OBJFLAG_HIDE)
scene->_hotspot3.show(); scene->_hotspot3.show();
else else
@ -4261,7 +4261,7 @@ void Scene4301::Action1::signal() {
for (_state = 0; _state < 6; ++_state) for (_state = 0; _state < 6; ++_state)
_buttonList[_state].remove(); _buttonList[_state].remove();
scene->_soundHandler.startSound(338); scene->_soundHandler.play(338);
scene->_hotspot3.hide(); scene->_hotspot3.hide();
_actionIndex = 2; _actionIndex = 2;
@ -4271,7 +4271,7 @@ void Scene4301::Action1::signal() {
case 20: case 20:
// Puzzle: Correct code // Puzzle: Correct code
_globals->_player.disableControl(); _globals->_player.disableControl();
scene->_soundHandler.startSound(339); scene->_soundHandler.play(339);
scene->_hotspot3._frame = 3; scene->_hotspot3._frame = 3;
if (scene->_hotspot3._flags & OBJFLAG_HIDE) if (scene->_hotspot3._flags & OBJFLAG_HIDE)
scene->_hotspot3.show(); scene->_hotspot3.show();
@ -4305,7 +4305,7 @@ void Scene4301::Action1::process(Event &event) {
if ((event.eventType == EVENT_BUTTON_DOWN) && buttonsRect.contains(event.mousePos)) { if ((event.eventType == EVENT_BUTTON_DOWN) && buttonsRect.contains(event.mousePos)) {
event.handled = true; event.handled = true;
scene->_soundHandler.startSound(336); scene->_soundHandler.play(336);
int buttonIndex = ((event.mousePos.y - buttonsRect.top) / 33) * 3 + int buttonIndex = ((event.mousePos.y - buttonsRect.top) / 33) * 3 +
((event.mousePos.x - buttonsRect.left) / 33); ((event.mousePos.x - buttonsRect.left) / 33);

View File

@ -134,7 +134,7 @@ class Scene4000 : public Scene {
}; };
public: public:
SequenceManager _sequenceManager1, _sequenceManager2, _sequenceManager3; SequenceManager _sequenceManager1, _sequenceManager2, _sequenceManager3;
SoundHandler _soundHandler1, _soundHandler2; ASound _soundHandler1, _soundHandler2;
SpeakerQR _speakerQR; SpeakerQR _speakerQR;
SpeakerML _speakerML; SpeakerML _speakerML;
SpeakerMR _speakerMR; SpeakerMR _speakerMR;
@ -471,7 +471,7 @@ class Scene4150 : public Scene {
public: public:
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SoundHandler _soundHandler; ASound _soundHandler;
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
SpeakerQR _speakerQR; SpeakerQR _speakerQR;
SpeakerCDL _speakerCDL; SpeakerCDL _speakerCDL;
@ -541,7 +541,7 @@ class Scene4250 : public Scene {
public: public:
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SoundHandler _soundHandler; ASound _soundHandler;
SpeakerSR _speakerSR; SpeakerSR _speakerSR;
SpeakerSL _speakerSL; SpeakerSL _speakerSL;
SpeakerSText _speakerSText; SpeakerSText _speakerSText;
@ -613,7 +613,7 @@ class Scene4300 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler1, _soundHandler2; ASound _soundHandler1, _soundHandler2;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
GfxButton _gfxButton; GfxButton _gfxButton;
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
@ -672,7 +672,7 @@ class Scene4301 : public Scene {
public: public:
Common::List<int> _list1; Common::List<int> _list1;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SoundHandler _soundHandler; ASound _soundHandler;
Action1 _action1; Action1 _action1;
SceneObject _hotspot1, _hotspot2, _hotspot3; SceneObject _hotspot1, _hotspot2, _hotspot3;
Hotspot4 _hotspot4; Hotspot4 _hotspot4;

View File

@ -41,8 +41,8 @@ void Scene5000::Action1::signal() {
setDelay(10); setDelay(10);
break; break;
case 1: case 1:
scene->_soundHandler.startSound(190); scene->_soundHandler.play(190);
scene->_soundHandler.proc5(true); scene->_soundHandler.holdAt(true);
ADD_MOVER(scene->_hotspot1, 283, 12); ADD_MOVER(scene->_hotspot1, 283, 12);
break; break;
case 2: case 2:
@ -55,7 +55,7 @@ void Scene5000::Action1::signal() {
setDelay(15); setDelay(15);
break; break;
case 4: case 4:
scene->_soundHandler.proc4(); scene->_soundHandler.release();
ADD_MOVER(scene->_hotspot1, 233, 80); ADD_MOVER(scene->_hotspot1, 233, 80);
break; break;
case 5: case 5:
@ -561,7 +561,7 @@ void Scene5000::postInit(SceneObjectList *OwnerList) {
break; break;
} }
_globals->_soundHandler.startSound(190); _globals->_soundHandler.play(190);
} }
void Scene5000::signal() { void Scene5000::signal() {
@ -638,7 +638,7 @@ void Scene5100::Action1::signal() {
} }
break; break;
case 4: case 4:
scene->_soundHandler.startSound(206); scene->_soundHandler.play(206);
scene->_hotspot5.postInit(); scene->_hotspot5.postInit();
scene->_hotspot5.setVisage(5362); scene->_hotspot5.setVisage(5362);
@ -737,7 +737,7 @@ void Scene5100::Action3::signal() {
_globals->_player.animate(ANIM_MODE_5, this); _globals->_player.animate(ANIM_MODE_5, this);
break; break;
case 2: case 2:
scene->_soundHandler.startSound(28); scene->_soundHandler.play(28);
if (static_cast<SceneObject *>(_owner)->_position.x < _globals->_player._position.x) { if (static_cast<SceneObject *>(_owner)->_position.x < _globals->_player._position.x) {
scene->_hotspot2.setVisage(5130); scene->_hotspot2.setVisage(5130);
scene->_hotspot2._strip = 1; scene->_hotspot2._strip = 1;
@ -783,7 +783,7 @@ void Scene5100::Action4::signal() {
switch (_actionIndex++) { switch (_actionIndex++) {
case 0: { case 0: {
_globals->_player.disableControl(); _globals->_player.disableControl();
scene->_soundHandler.startSound(208); scene->_soundHandler.play(208);
SceneItem::display2(5100, 15); SceneItem::display2(5100, 15);
ObjectMover3 *mover = new ObjectMover3(); ObjectMover3 *mover = new ObjectMover3();
@ -1284,7 +1284,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position); _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
loadScene(5100); loadScene(5100);
_globals->_soundHandler.startSound(205); _globals->_soundHandler.play(205);
} }
void Scene5100::signal() { void Scene5100::signal() {
@ -1380,7 +1380,7 @@ void Scene5100::dispatch() {
_globals->_player.disableControl(); _globals->_player.disableControl();
_globals->_player.addMover(NULL); _globals->_player.addMover(NULL);
_soundHandler.startSound(207); _soundHandler.play(207);
_sceneMode = 5103; _sceneMode = 5103;
setAction(&_sequenceManager, this, (_globals->_player._position.x >= 966) ? 5104 : 5103, setAction(&_sequenceManager, this, (_globals->_player._position.x >= 966) ? 5104 : 5103,
&_globals->_player, &_hotspot15, NULL); &_globals->_player, &_hotspot15, NULL);
@ -1391,7 +1391,7 @@ void Scene5100::dispatch() {
(_globals->_sceneManager._previousScene != 5200) && (_sceneMode != 5150)) { (_globals->_sceneManager._previousScene != 5200) && (_sceneMode != 5150)) {
setAction(NULL); setAction(NULL);
_sceneMode = 5150; _sceneMode = 5150;
_soundHandler.startSound(208); _soundHandler.play(208);
if (RING_INVENTORY._vial._sceneNumber == 5100) { if (RING_INVENTORY._vial._sceneNumber == 5100) {
_globals->_player.addMover(NULL); _globals->_player.addMover(NULL);
@ -1466,7 +1466,7 @@ void Scene5200::Action2::signal() {
_globals->_player.animate(ANIM_MODE_4, 3, 1, this); _globals->_player.animate(ANIM_MODE_4, 3, 1, this);
break; break;
case 2: case 2:
scene->_soundHandler.proc3(); scene->_soundHandler.stop();
scene->_hotspot14.remove(); scene->_hotspot14.remove();
RING_INVENTORY._stasisBox._sceneNumber = 1; RING_INVENTORY._stasisBox._sceneNumber = 1;
@ -1481,7 +1481,7 @@ void Scene5200::Action2::signal() {
ADD_MOVER(scene->_hotspot8, 141, 77); ADD_MOVER(scene->_hotspot8, 141, 77);
break; break;
case 4: case 4:
scene->_soundHandler.startSound(303); scene->_soundHandler.play(303);
scene->_hotspot8._strip = 2; scene->_hotspot8._strip = 2;
scene->_hotspot8._frame = 1; scene->_hotspot8._frame = 1;
@ -1518,7 +1518,7 @@ void Scene5200::Action4::signal() {
setDelay(120); setDelay(120);
break; break;
case 1: case 1:
_globals->_soundHandler.startSound(209); _globals->_soundHandler.play(209);
scene->_stripManager.start(5202, this, scene); scene->_stripManager.start(5202, this, scene);
break; break;
case 2: case 2:
@ -1617,8 +1617,8 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_speakerQText._textPos.x = 20; _speakerQText._textPos.x = 20;
if (RING_INVENTORY._stasisBox._sceneNumber == 5200) { if (RING_INVENTORY._stasisBox._sceneNumber == 5200) {
_soundHandler.startSound(216); _soundHandler.play(216);
_soundHandler.proc5(true); _soundHandler.holdAt(true);
_hotspot14.postInit(); _hotspot14.postInit();
_hotspot14.setVisage(5202); _hotspot14.setVisage(5202);
@ -1638,7 +1638,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
// Happens when the player enters the throne room via the secret passage, // Happens when the player enters the throne room via the secret passage,
// after talking with the bat. No NPCs are around and the player can // after talking with the bat. No NPCs are around and the player can
// obtain the stasis box. // obtain the stasis box.
_globals->_soundHandler.startSound(205); _globals->_soundHandler.play(205);
_globals->_player.disableControl(); _globals->_player.disableControl();
_globals->_player.postInit(); _globals->_player.postInit();
@ -2116,7 +2116,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
_hotspot8._sceneRegionId = 8; _hotspot8._sceneRegionId = 8;
_globals->_sceneItems.addItems(&_hotspot8, &_hotspot2, &_hotspot6, &_hotspot3, &_hotspot7, NULL); _globals->_sceneItems.addItems(&_hotspot8, &_hotspot2, &_hotspot6, &_hotspot3, &_hotspot7, NULL);
_globals->_soundHandler.startSound(212); _globals->_soundHandler.play(212);
} }
void Scene5300::signal() { void Scene5300::signal() {
@ -2126,7 +2126,7 @@ void Scene5300::signal() {
_globals->_sceneManager.changeScene(5100); _globals->_sceneManager.changeScene(5100);
break; break;
case 5307: case 5307:
_soundHandler.proc1(NULL); _soundHandler.fadeOut(NULL);
// No break on purpose // No break on purpose
case 5302: case 5302:
case 5308: case 5308:

View File

@ -75,7 +75,7 @@ class Scene5000 : public Scene {
}; };
public: public:
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SoundHandler _soundHandler; ASound _soundHandler;
SpeakerSText _speakerSText; SpeakerSText _speakerSText;
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
Action1 _action1; Action1 _action1;
@ -163,7 +163,7 @@ class Scene5100 : public Scene {
}; };
public: public:
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SoundHandler _soundHandler; ASound _soundHandler;
SpeakerMText _speakerMText; SpeakerMText _speakerMText;
SpeakerQText _speakerQText; SpeakerQText _speakerQText;
SpeakerSText _speakerSText; SpeakerSText _speakerSText;
@ -226,7 +226,7 @@ class Scene5200 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SpeakerFLL _speakerFLL; SpeakerFLL _speakerFLL;
SpeakerFLText _speakerFLText; SpeakerFLText _speakerFLText;
SpeakerQL _speakerQL; SpeakerQL _speakerQL;
@ -291,7 +291,7 @@ class Scene5300 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SpeakerQR _speakerQR; SpeakerQR _speakerQR;
SpeakerQL _speakerQL; SpeakerQL _speakerQL;

View File

@ -59,7 +59,7 @@ void Scene7000::Action1::signal() {
setAction(&scene->_action6, this); setAction(&scene->_action6, this);
break; break;
case 2: case 2:
scene->_soundHandler.startSound(252); scene->_soundHandler.play(252);
scene->_object8.remove(); scene->_object8.remove();
scene->_object1.postInit(); scene->_object1.postInit();
scene->_object1.setVisage(7003); scene->_object1.setVisage(7003);
@ -182,7 +182,7 @@ void Scene7000::Action4::signal() {
setDelay(300); setDelay(300);
break; break;
case 2: case 2:
_globals->_soundHandler.startSound(252); _globals->_soundHandler.play(252);
scene->_object1.show(); scene->_object1.show();
scene->_object1.setStrip(3); scene->_object1.setStrip(3);
scene->_object1.setFrame(1); scene->_object1.setFrame(1);
@ -212,7 +212,7 @@ void Scene7000::Action5::signal() {
} }
case 1: case 1:
_globals->_player.checkAngle(&scene->_object1); _globals->_player.checkAngle(&scene->_object1);
_globals->_soundHandler.startSound(252); _globals->_soundHandler.play(252);
scene->_object1.setStrip(2); scene->_object1.setStrip(2);
scene->_stripManager.start(7015, this); scene->_stripManager.start(7015, this);
break; break;
@ -542,7 +542,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object1.animate(ANIM_MODE_8, 0, NULL); _object1.animate(ANIM_MODE_8, 0, NULL);
_globals->_sceneItems.push_back(&_object1); _globals->_sceneItems.push_back(&_object1);
} }
_soundHandler.startSound(251); _soundHandler.play(251);
if (_globals->_sceneManager._previousScene == 2100) { if (_globals->_sceneManager._previousScene == 2100) {
if (_globals->getFlag(72)) { if (_globals->getFlag(72)) {
_globals->_player.postInit(); _globals->_player.postInit();
@ -561,7 +561,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
setAction(&_action1); setAction(&_action1);
} }
} else { } else {
_globals->_soundHandler.startSound(250); _globals->_soundHandler.play(250);
_globals->setFlag(72); _globals->setFlag(72);
_object3.postInit(); _object3.postInit();
@ -607,9 +607,10 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object3.setVisage(5001); _object3.setVisage(5001);
_object3.setStrip2(1); _object3.setStrip2(1);
_object3.setPosition(Common::Point(307, 0)); _object3.setPosition(Common::Point(307, 0));
_soundHandler.startSound(151); _soundHandler.play(151);
_soundHandler.proc5(1); _soundHandler.holdAt(true);
_globals->_soundHandler.startSound(250); _globals->_soundHandler.play(250);
setAction(&_action3); setAction(&_action3);
} }
@ -1131,9 +1132,9 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object1.setPosition(Common::Point(100, 100)); _object1.setPosition(Common::Point(100, 100));
setAction(&_action11); setAction(&_action11);
_soundHandler1.startSound(270); _soundHandler1.play(270);
_soundHandler2.startSound(275); _soundHandler2.play(275);
_globals->_soundHandler.startSound(270); _globals->_soundHandler.play(270);
} }
/*-------------------------------------------------------------------------- /*--------------------------------------------------------------------------
* Scene 7200 * Scene 7200
@ -1298,7 +1299,7 @@ void Scene7200::postInit(SceneObjectList *OwnerList) {
_swimmer.setPosition(Common::Point(-8, 16)); _swimmer.setPosition(Common::Point(-8, 16));
setAction(&_action1); setAction(&_action1);
_soundHandler.startSound(271); _soundHandler.play(271);
} }
/*-------------------------------------------------------------------------- /*--------------------------------------------------------------------------
@ -1340,7 +1341,7 @@ void Scene7300::Action1::signal() {
break; break;
case 7: case 7:
setDelay(3); setDelay(3);
_globals->_soundHandler.proc1(NULL); _globals->_soundHandler.fadeOut(NULL);
break; break;
case 8: case 8:
_globals->_sceneManager.changeScene(2280); _globals->_sceneManager.changeScene(2280);
@ -1493,7 +1494,7 @@ void Scene7300::postInit(SceneObjectList *OwnerList) {
_object8._numFrames = 2; _object8._numFrames = 2;
setAction(&_action1); setAction(&_action1);
_globals->_soundHandler.startSound(272); _globals->_soundHandler.play(272);
} }
/*-------------------------------------------------------------------------- /*--------------------------------------------------------------------------
@ -1597,8 +1598,8 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
} }
_sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y); _sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y);
loadScene(7600); loadScene(7600);
_soundHandler2.startSound(255); _soundHandler2.play(255);
_soundHandler1.startSound(251); _soundHandler1.play(251);
} }
/*-------------------------------------------------------------------------- /*--------------------------------------------------------------------------
@ -1661,7 +1662,7 @@ void Scene7700::Action3::signal() {
setDelay(60); setDelay(60);
// No break on purpose! // No break on purpose!
case 2: case 2:
scene->_soundHandler.startSound(260); scene->_soundHandler.play(260);
scene->_object8.setVisage(7703); scene->_object8.setVisage(7703);
scene->_object8.setPosition(Common::Point(177, 97)); scene->_object8.setPosition(Common::Point(177, 97));
scene->_object8.setStrip2(3); scene->_object8.setStrip2(3);
@ -1870,7 +1871,7 @@ void Scene7700::SceneHotspot8::doAction(int action) {
break; break;
case CURSOR_USE: case CURSOR_USE:
scene->_sceneMode = 7709; scene->_sceneMode = 7709;
scene->_soundHandler.startSound(259); scene->_soundHandler.play(259);
scene->_object15.setFrame(scene->_object15.getFrameCount()); scene->_object15.setFrame(scene->_object15.getFrameCount());
scene->_object15.animate(ANIM_MODE_6, scene); scene->_object15.animate(ANIM_MODE_6, scene);
if ((scene->_field977 == 2) && (scene->_field97B == 0)) { if ((scene->_field977 == 2) && (scene->_field97B == 0)) {
@ -1896,7 +1897,7 @@ void Scene7700::SceneHotspot9::doAction(int action) {
break; break;
case CURSOR_USE: case CURSOR_USE:
scene->_sceneMode = 7709; scene->_sceneMode = 7709;
scene->_soundHandler.startSound(259); scene->_soundHandler.play(259);
scene->_object15.setFrame(1); scene->_object15.setFrame(1);
scene->_object15.animate(ANIM_MODE_5, scene); scene->_object15.animate(ANIM_MODE_5, scene);
if (scene->_field977 > 2) { if (scene->_field977 > 2) {
@ -2030,7 +2031,7 @@ void Scene7700::Object7::doAction(int action) {
break; break;
case OBJECT_STUNNER: case OBJECT_STUNNER:
if (!_globals->getFlag(78)) { if (!_globals->getFlag(78)) {
_globals->_soundHandler.proc3(); _globals->_soundHandler.stop();
_globals->setFlag(78); _globals->setFlag(78);
setAction(NULL); setAction(NULL);
_globals->_player.disableControl(); _globals->_player.disableControl();
@ -2120,7 +2121,8 @@ void Scene7700::Object9::doAction(int action) {
_globals->_sceneItems.push_front(&scene->_object10); _globals->_sceneItems.push_front(&scene->_object10);
scene->_object10.fixPriority(240); scene->_object10.fixPriority(240);
} }
scene->_soundHandler.startSound(262);
scene->_soundHandler.play(262);
scene->_object14.animate(ANIM_MODE_5, NULL); scene->_object14.animate(ANIM_MODE_5, NULL);
} }
_globals->_events.setCursor(CURSOR_WALK); _globals->_events.setCursor(CURSOR_WALK);
@ -2218,7 +2220,7 @@ void Scene7700::signal() {
} }
break; break;
case 7702: case 7702:
_soundHandler.proc1(0); _soundHandler.fadeOut(0);
_globals->_sceneManager.changeScene(7600); _globals->_sceneManager.changeScene(7600);
break; break;
case 7703: case 7703:
@ -2229,7 +2231,7 @@ void Scene7700::signal() {
_globals->_player.enableControl(); _globals->_player.enableControl();
break; break;
case 7704: case 7704:
_globals->_soundHandler.startSound(256); _globals->_soundHandler.play(256);
_prof.setStrip2(4); _prof.setStrip2(4);
_prof.setFrame2(1); _prof.setFrame2(1);
_prof.setPosition(Common::Point(159, 87)); _prof.setPosition(Common::Point(159, 87));
@ -2516,7 +2518,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_sceneMode = 7701; _sceneMode = 7701;
setAction(&_sequenceManager, this, 7701, &_globals->_player, NULL); setAction(&_sequenceManager, this, 7701, &_globals->_player, NULL);
_soundHandler.startSound(256); _soundHandler.play(256);
} }
Scene7700::Scene7700() { Scene7700::Scene7700() {

View File

@ -94,7 +94,7 @@ class Scene7000 : public Scene {
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
SpeakerSKText _speakerSKText; SpeakerSKText _speakerSKText;
SpeakerSKL _speakerSKL; SpeakerSKL _speakerSKL;
@ -165,8 +165,8 @@ class Scene7100 : public Scene {
}; };
public: public:
SoundHandler _soundHandler1; ASound _soundHandler1;
SoundHandler _soundHandler2; ASound _soundHandler2;
SceneObject _object1; SceneObject _object1;
SceneObject _object2; SceneObject _object2;
SceneObject _object3; SceneObject _object3;
@ -230,7 +230,7 @@ public:
SceneObject _object7; SceneObject _object7;
SceneObject _object8; SceneObject _object8;
SceneObject _object9; SceneObject _object9;
SoundHandler _soundHandler; ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
}; };
@ -296,8 +296,8 @@ public:
SceneObject _object4; SceneObject _object4;
SceneObject _object5; SceneObject _object5;
SceneObject _object6; SceneObject _object6;
SoundHandler _soundHandler1; ASound _soundHandler1;
SoundHandler _soundHandler2; ASound _soundHandler2;
virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void postInit(SceneObjectList *OwnerList = NULL);
}; };
@ -409,7 +409,7 @@ class Scene7700 : public Scene {
virtual void doAction(int action); virtual void doAction(int action);
}; };
public: public:
SoundHandler _soundHandler; ASound _soundHandler;
SequenceManager _sequenceManager; SequenceManager _sequenceManager;
GfxButton _gfxButton; GfxButton _gfxButton;
SpeakerEText _speakerEText; SpeakerEText _speakerEText;

View File

@ -54,4 +54,95 @@ void SoundManager::listenerSynchronize(Serializer &s) {
warning("TODO: SoundManager listenerSynchronize"); warning("TODO: SoundManager listenerSynchronize");
} }
/*--------------------------------------------------------------------------*/
void ASound::play(int soundNum, Action *action, int volume) {
}
void ASound::stop() {
}
void ASound::prime(int v, Action *action) {
}
void ASound::unPrime() {
}
void ASound::go() {
}
void ASound::hault(void) {
}
int ASound::getSoundNum() const { return 0; }
bool ASound::isPlaying() const { return false; }
bool ASound::isPaused() const { return false; }
bool ASound::isMuted() const { return false; }
void ASound::pause() {
}
void ASound::mute() {
}
void ASound::fadeIn() {
}
void ASound::fadeOut(EventHandler *evtHandler) {
}
void ASound::fade(int v1, int v2, int v3, int v4, EventHandler *evtHandler) {
}
void ASound::setTimeIndex(uint32 timeIndex) {
}
uint32 ASound::getTimeIndex() const {
return 0;
}
void ASound::setPri(int v) {
}
void ASound::setLoop(bool flag) {
}
int ASound::getPri() const {
return 0;
}
bool ASound::getLoop() {
return false;
}
void ASound::setVolume(int volume) {
}
int ASound::getVol() const {
return 0;
}
void ASound::holdAt(int v) {
}
void ASound::release() {
}
} // End of namespace tSage } // End of namespace tSage

View File

@ -25,6 +25,7 @@
#include "common/scummsys.h" #include "common/scummsys.h"
#include "tsage/saveload.h" #include "tsage/saveload.h"
#include "tsage/core.h"
namespace tSage { namespace tSage {
@ -41,6 +42,48 @@ public:
void loadNotifierProc(bool postFlag); void loadNotifierProc(bool postFlag);
}; };
class Sound: public EventHandler {
public:
};
class ASound: public Sound {
public:
Sound _sound;
Action *_action;
int _field280;
ASound();
virtual void synchronize(Serializer &s);
virtual void dispatch();
void play(int soundNum, Action *action = NULL, int volume = 127);
void stop();
void prime(int v, Action *action = NULL);
void unPrime();
void go();
void hault(void);
int getSoundNum() const;
bool isPlaying() const;
bool isPaused() const;
bool isMuted() const;
void pause();
void mute();
void fadeIn();
void fadeOut(EventHandler *evtHandler);
void fade(int v1, int v2, int v3, int v4, EventHandler *evtHandler);
void setTimeIndex(uint32 timeIndex);
uint32 getTimeIndex() const;
void setPri(int v);
void setLoop(bool flag);
int getPri() const;
bool getLoop();
void setVolume(int volume);
int getVol() const;
void holdAt(int v);
void release();
};
} // End of namespace tSage } // End of namespace tSage
#endif #endif