ASYLUM: Removed Video reference from Shared
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@353 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
This commit is contained in:
parent
9868f8c40a
commit
9f39977ddd
6 changed files with 10 additions and 14 deletions
|
@ -850,7 +850,7 @@ int kRunBlowUpPuzzle(ActionCommand *cmd, Scene *scn) {
|
||||||
// FIXME: improve this to call other blowUpPuzzles than VCR
|
// FIXME: improve this to call other blowUpPuzzles than VCR
|
||||||
//int puzzleIdx = cmd->param1;
|
//int puzzleIdx = cmd->param1;
|
||||||
|
|
||||||
scn->setBlowUpPuzzle(new BlowUpPuzzleVCR());
|
scn->setBlowUpPuzzle(new BlowUpPuzzleVCR(scn));
|
||||||
scn->getBlowUpPuzzle()->openBlowUp();
|
scn->getBlowUpPuzzle()->openBlowUp();
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -90,7 +90,6 @@ Common::Error AsylumEngine::init() {
|
||||||
|
|
||||||
Shared.setScreen(_screen);
|
Shared.setScreen(_screen);
|
||||||
Shared.setSound(_sound);
|
Shared.setSound(_sound);
|
||||||
Shared.setVideo(_video);
|
|
||||||
|
|
||||||
_introPlaying = false;
|
_introPlaying = false;
|
||||||
|
|
||||||
|
@ -111,7 +110,7 @@ Common::Error AsylumEngine::go() {
|
||||||
// in the processActionList() method when the necessary action is fired.
|
// in the processActionList() method when the necessary action is fired.
|
||||||
// Once the blowup puzzle testing is removed from checkForEvent(), this
|
// Once the blowup puzzle testing is removed from checkForEvent(), this
|
||||||
// can be removed as well.
|
// can be removed as well.
|
||||||
_scene->setBlowUpPuzzle(new BlowUpPuzzleVCR()); // this will be done by a Script command
|
_scene->setBlowUpPuzzle(new BlowUpPuzzleVCR(_scene));
|
||||||
|
|
||||||
// XXX This can probably also be rolled into the scene constructor.
|
// XXX This can probably also be rolled into the scene constructor.
|
||||||
// Investigate if this will fuck up the execution sequence though :P
|
// Investigate if this will fuck up the execution sequence though :P
|
||||||
|
|
|
@ -78,6 +78,8 @@ public:
|
||||||
bool isGameFlagSet(int flag);
|
bool isGameFlagSet(int flag);
|
||||||
bool isGameFlagNotSet(int flag);
|
bool isGameFlagNotSet(int flag);
|
||||||
|
|
||||||
|
Video* video(){ return _video; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void checkForEvent(bool doUpdate);
|
void checkForEvent(bool doUpdate);
|
||||||
void waitForTimer(int msec_delay);
|
void waitForTimer(int msec_delay);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
namespace Asylum {
|
namespace Asylum {
|
||||||
|
|
||||||
BlowUpPuzzle::BlowUpPuzzle() {
|
BlowUpPuzzle::BlowUpPuzzle(Scene *scene): _scene(scene) {
|
||||||
}
|
}
|
||||||
|
|
||||||
BlowUpPuzzle::~BlowUpPuzzle() {
|
BlowUpPuzzle::~BlowUpPuzzle() {
|
||||||
|
@ -38,7 +38,7 @@ BlowUpPuzzle::~BlowUpPuzzle() {
|
||||||
|
|
||||||
// BlowUp Puzzle VCR ---------------------------------------------------------------------------------------------
|
// BlowUp Puzzle VCR ---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
BlowUpPuzzleVCR::BlowUpPuzzleVCR() {
|
BlowUpPuzzleVCR::BlowUpPuzzleVCR(Scene *scene): BlowUpPuzzle(scene) {
|
||||||
_leftClickUp = false;
|
_leftClickUp = false;
|
||||||
_leftClickDown = false;
|
_leftClickDown = false;
|
||||||
_rightClickDown = false;
|
_rightClickDown = false;
|
||||||
|
@ -165,7 +165,7 @@ void BlowUpPuzzleVCR::update() {
|
||||||
|
|
||||||
// TODO: fade palette to grey
|
// TODO: fade palette to grey
|
||||||
|
|
||||||
Shared.getVideo()->playVideo(2, kSubtitlesOn);
|
_scene->vm()->video()->playVideo(2, kSubtitlesOn);
|
||||||
|
|
||||||
_isAccomplished = false;
|
_isAccomplished = false;
|
||||||
_active = false;
|
_active = false;
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct GraphicQueueItem;
|
||||||
|
|
||||||
class BlowUpPuzzle {
|
class BlowUpPuzzle {
|
||||||
public:
|
public:
|
||||||
BlowUpPuzzle();
|
BlowUpPuzzle(Scene *scene);
|
||||||
virtual ~BlowUpPuzzle();
|
virtual ~BlowUpPuzzle();
|
||||||
|
|
||||||
virtual void handleEvent(Common::Event *event, bool doUpdate){};
|
virtual void handleEvent(Common::Event *event, bool doUpdate){};
|
||||||
|
@ -56,6 +56,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
Common::Event *_ev;
|
Common::Event *_ev;
|
||||||
|
|
||||||
|
Scene *_scene;
|
||||||
Cursor *_cursor;
|
Cursor *_cursor;
|
||||||
bool _leftClickUp;
|
bool _leftClickUp;
|
||||||
bool _leftClickDown;
|
bool _leftClickDown;
|
||||||
|
@ -92,7 +93,7 @@ const Common::Rect BlowUpPuzzleVCRPolies[10] = {
|
||||||
|
|
||||||
class BlowUpPuzzleVCR : public BlowUpPuzzle {
|
class BlowUpPuzzleVCR : public BlowUpPuzzle {
|
||||||
public:
|
public:
|
||||||
BlowUpPuzzleVCR();
|
BlowUpPuzzleVCR(Scene *scene);
|
||||||
~BlowUpPuzzleVCR();
|
~BlowUpPuzzleVCR();
|
||||||
|
|
||||||
void handleEvent(Common::Event *event, bool doUpdate);
|
void handleEvent(Common::Event *event, bool doUpdate);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
namespace Asylum {
|
namespace Asylum {
|
||||||
|
|
||||||
class Video;
|
|
||||||
class Screen;
|
class Screen;
|
||||||
class Sound;
|
class Sound;
|
||||||
|
|
||||||
|
@ -50,10 +49,6 @@ class Sound;
|
||||||
*/
|
*/
|
||||||
class SharedResources: public Common::Singleton<SharedResources> {
|
class SharedResources: public Common::Singleton<SharedResources> {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void setVideo(Video* video) { _video = video; }
|
|
||||||
Video* getVideo() { return _video; }
|
|
||||||
|
|
||||||
void setScreen(Screen* screen) { _screen = screen; }
|
void setScreen(Screen* screen) { _screen = screen; }
|
||||||
Screen* getScreen() { return _screen; }
|
Screen* getScreen() { return _screen; }
|
||||||
|
|
||||||
|
@ -70,7 +65,6 @@ private:
|
||||||
SharedResources();
|
SharedResources();
|
||||||
~SharedResources();
|
~SharedResources();
|
||||||
|
|
||||||
Video *_video;
|
|
||||||
Screen *_screen;
|
Screen *_screen;
|
||||||
Sound *_sound;
|
Sound *_sound;
|
||||||
Scene *_scene;
|
Scene *_scene;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue