diff options
author | Eugene Sandulenko | 2017-02-24 19:11:53 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-02-24 19:11:53 +0100 |
commit | 99f976e3aeb2879d9fbe7efe30b1f2a9a52a535b (patch) | |
tree | cfdb048e40090a9f172e90e4e71d5e40ac179f5d /engines/director | |
parent | e65df86ef1f22089eb9803502087daba3a29c2e2 (diff) | |
download | scummvm-rg350-99f976e3aeb2879d9fbe7efe30b1f2a9a52a535b.tar.gz scummvm-rg350-99f976e3aeb2879d9fbe7efe30b1f2a9a52a535b.tar.bz2 scummvm-rg350-99f976e3aeb2879d9fbe7efe30b1f2a9a52a535b.zip |
DIRECTOR: Lingo: Initial code for func_play()
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/director.h | 1 | ||||
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 14 | ||||
-rw-r--r-- | engines/director/lingo/lingo-funcs.cpp | 18 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 1 |
4 files changed, 17 insertions, 17 deletions
diff --git a/engines/director/director.h b/engines/director/director.h index e6835bca3a..1c3d77fc71 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -121,6 +121,7 @@ public: bool _skipFrameAdvance; MovieReference _nextMovie; + Common::List<MovieReference> _movieStack; protected: virtual Common::Error run(); diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 3cc3d0d540..d2cdfb2d07 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -1003,19 +1003,7 @@ void Lingo::c_play() { if (mode.u.i == 1 || mode.u.i == 3) frame = g_lingo->pop(); - if (frame.type == VOID) { - frame.u.s = new Common::String("<void>"); - frame.type = STRING; - } - frame.toString(); - - if (movie.type == VOID) { - movie.u.s = new Common::String("<void>"); - movie.type = STRING; - } - movie.toString(); - - warning("STUB: c_play(%s, %s)", frame.u.s->c_str(), movie.u.s->c_str()); + g_lingo->func_play(frame, movie); } void Lingo::c_playdone() { diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index d4e24bcd32..9232bd1a52 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -172,7 +172,7 @@ void Lingo::func_mciwait(Common::String &s) { } void Lingo::func_goto(Datum &frame, Datum &movie) { - g_director->_playbackPaused = false; + _vm->_playbackPaused = false; if (!_vm->getCurrentScore()) return; @@ -255,7 +255,7 @@ void Lingo::func_gotoloop() { _vm->getCurrentScore()->gotoLoop(); - g_director->_skipFrameAdvance = true; + _vm->_skipFrameAdvance = true; } void Lingo::func_gotonext() { @@ -264,7 +264,7 @@ void Lingo::func_gotonext() { _vm->getCurrentScore()->gotoNext(); - g_director->_skipFrameAdvance = true; + _vm->_skipFrameAdvance = true; } void Lingo::func_gotoprevious() { @@ -273,7 +273,17 @@ void Lingo::func_gotoprevious() { _vm->getCurrentScore()->gotoPrevious(); - g_director->_skipFrameAdvance = true; + _vm->_skipFrameAdvance = true; +} + +void Lingo::func_play(Datum &frame, Datum &movie) { + MovieReference ref; + + ref.frameI = _vm->getCurrentScore()->getCurrentFrame(); + + _vm->_movieStack.push_back(ref); + + func_goto(frame, movie); } void Lingo::func_cursor(int c) { diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 550156c1c7..6170acfdaf 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -498,6 +498,7 @@ public: void func_gotoloop(); void func_gotonext(); void func_gotoprevious(); + void func_play(Datum &frame, Datum &movie); void func_cursor(int c); int func_marker(int m); |