diff options
author | Eugene Sandulenko | 2017-02-09 18:48:22 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-02-09 18:48:22 +0100 |
commit | c444de0ecaab3757ac6170a283734214166dc696 (patch) | |
tree | b0fb1740987d52c196b1773356d622027bfc3147 /engines/director/lingo | |
parent | 5fb528743b1e98fb769686b5193c4e58cf32143f (diff) | |
download | scummvm-rg350-c444de0ecaab3757ac6170a283734214166dc696.tar.gz scummvm-rg350-c444de0ecaab3757ac6170a283734214166dc696.tar.bz2 scummvm-rg350-c444de0ecaab3757ac6170a283734214166dc696.zip |
DIRECTOR: Made DirectorEngine::_currentScore private
Diffstat (limited to 'engines/director/lingo')
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 4 | ||||
-rw-r--r-- | engines/director/lingo/lingo-funcs.cpp | 14 | ||||
-rw-r--r-- | engines/director/lingo/lingo-the.cpp | 34 |
3 files changed, 26 insertions, 26 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 03e1a86544..f34be6e526 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -904,8 +904,8 @@ void Lingo::b_printFrom(int nargs) { } void Lingo::b_quit(int nargs) { - if (g_director->_currentScore) - g_director->_currentScore->_stopPlay = true; + if (g_director->getCurrentScore()) + g_director->getCurrentScore()->_stopPlay = true; g_lingo->pushVoid(); } diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index 6260fe9562..a6dc3f0c5e 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -185,7 +185,7 @@ void Lingo::func_goto(Datum &frame, Datum &movie) { } _vm->_nextMovie = *movie.u.s; - _vm->_currentScore->_stopPlay = true; + _vm->getCurrentScore()->_stopPlay = true; _vm->_nextMovieFrameS.clear(); _vm->_nextMovieFrameI = -1; @@ -221,24 +221,24 @@ void Lingo::func_goto(Datum &frame, Datum &movie) { } void Lingo::func_gotoloop() { - if (!_vm->_currentScore) + if (!_vm->getCurrentScore()) return; - _vm->_currentScore->gotoLoop(); + _vm->getCurrentScore()->gotoLoop(); } void Lingo::func_gotonext() { - if (!_vm->_currentScore) + if (!_vm->getCurrentScore()) return; - _vm->_currentScore->gotoNext(); + _vm->getCurrentScore()->gotoNext(); } void Lingo::func_gotoprevious() { - if (!_vm->_currentScore) + if (!_vm->getCurrentScore()) return; - _vm->_currentScore->gotoPrevious(); + _vm->getCurrentScore()->gotoPrevious(); } void Lingo::func_cursor(int c) { diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index 090a7fed81..8a5f837d1a 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -317,20 +317,20 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) { d.toInt(); // Enforce Integer - if (!_vm->_currentScore) { + if (!_vm->getCurrentScore()) { warning("The sprite %d field %d setting over non-active score", id, field); return; } - Sprite *sprite = _vm->_currentScore->getSpriteById(id); + Sprite *sprite = _vm->getCurrentScore()->getSpriteById(id); if (!sprite) return; switch (field) { case kTheCastNum: - if (_vm->_currentScore->_casts.contains(d.u.i)) { - sprite->_cast = _vm->_currentScore->_casts[d.u.i]; + if (_vm->getCurrentScore()->_casts.contains(d.u.i)) { + sprite->_cast = _vm->getCurrentScore()->_casts[d.u.i]; sprite->_castId = d.u.i; } break; @@ -519,12 +519,12 @@ Datum Lingo::getTheSprite(Datum &id1, int field) { return d; } - if (!_vm->_currentScore) { + if (!_vm->getCurrentScore()) { warning("The sprite %d field %d setting over non-active score", id, field); return d; } - Sprite *sprite = _vm->_currentScore->getSpriteById(id); + Sprite *sprite = _vm->getCurrentScore()->getSpriteById(id); if (!sprite) return d; @@ -630,14 +630,14 @@ Datum Lingo::getTheCast(Datum &id1, int field) { return d; } - if (!_vm->_currentScore) { + if (!_vm->getCurrentScore()) { warning("The cast %d field %d setting over non-active score", id, field); return d; } Cast *cast; CastInfo *castInfo; - if (!_vm->_currentScore->_casts.contains(id)) { + if (!_vm->getCurrentScore()->_casts.contains(id)) { if (field == kTheLoaded) { d.type = INT; d.u.i = 0; @@ -648,8 +648,8 @@ Datum Lingo::getTheCast(Datum &id1, int field) { warning("The cast %d found", id); } - cast = _vm->_currentScore->_casts[id]; - castInfo = _vm->_currentScore->_castsInfo[id]; + cast = _vm->getCurrentScore()->_casts[id]; + castInfo = _vm->getCurrentScore()->_castsInfo[id]; d.type = INT; @@ -683,7 +683,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) { return d; } - ShapeCast *shape = static_cast<ShapeCast *>(_vm->_currentScore->_casts[id]); + ShapeCast *shape = static_cast<ShapeCast *>(_vm->getCurrentScore()->_casts[id]); d.u.i = shape->bgCol; } break; @@ -695,7 +695,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) { return d; } - ShapeCast *shape = static_cast<ShapeCast *>(_vm->_currentScore->_casts[id]); + ShapeCast *shape = static_cast<ShapeCast *>(_vm->getCurrentScore()->_casts[id]); d.u.i = shape->fgCol; } break; @@ -721,13 +721,13 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) { return; } - if (!_vm->_currentScore) { + if (!_vm->getCurrentScore()) { warning("The cast %d field %d setting over non-active score", id, field); return; } - Cast *cast = _vm->_currentScore->_casts[id]; - CastInfo *castInfo = _vm->_currentScore->_castsInfo[id]; + Cast *cast = _vm->getCurrentScore()->_casts[id]; + CastInfo *castInfo = _vm->getCurrentScore()->_castsInfo[id]; if (!cast) { warning("The cast %d found", id); @@ -761,7 +761,7 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) { if (cast->type != kCastShape) { warning("Field %d of cast %d not found", field, id); } - ShapeCast *shape = static_cast<ShapeCast *>(_vm->_currentScore->_casts[id]); + ShapeCast *shape = static_cast<ShapeCast *>(_vm->getCurrentScore()->_casts[id]); shape->bgCol = d.u.i; shape->modified = 1; } @@ -772,7 +772,7 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) { warning("Field %d of cast %d not found", field, id); return; } - ShapeCast *shape = static_cast<ShapeCast *>(_vm->_currentScore->_casts[id]); + ShapeCast *shape = static_cast<ShapeCast *>(_vm->getCurrentScore()->_casts[id]); shape->fgCol = d.u.i; shape->modified = 1; } |