diff options
author | Dmitry Iskrich | 2016-07-05 16:08:25 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 445bf8f5daca5ab8ba80f7e1b03a13ddd062829b (patch) | |
tree | 7740a4827333c7f2ecf45418b226d5da2c87cdd4 | |
parent | aac3497b739fb43c2ec232b1b53e317315071d4e (diff) | |
download | scummvm-rg350-445bf8f5daca5ab8ba80f7e1b03a13ddd062829b.tar.gz scummvm-rg350-445bf8f5daca5ab8ba80f7e1b03a13ddd062829b.tar.bz2 scummvm-rg350-445bf8f5daca5ab8ba80f7e1b03a13ddd062829b.zip |
DIRECTOR: Add sprite controlling fields
-rw-r--r-- | engines/director/lingo/lingo-the.cpp | 21 | ||||
-rw-r--r-- | engines/director/score.cpp | 2 | ||||
-rw-r--r-- | engines/director/score.h | 4 |
3 files changed, 27 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index 4d54110489..59bd248721 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -184,6 +184,15 @@ void Lingo::setTheSprite(int id, TheField field, Datum &d) { case kTheInk: sprite->_ink = static_cast<InkType>(d.u.i); break; + case kTheLocH: + sprite->_startPoint.x = d.u.i; + break; + case kTheLocV: + sprite->_startPoint.y = d.u.i; + break; + case kTheConstraint: + sprite->_constraint = d.u.i; + break; default: error("Unprocessed setting field %d of sprite", field); @@ -229,6 +238,18 @@ Datum Lingo::getTheSprite(int id, TheField field) { case kTheInk: d.u.i = sprite->_ink; break; + case kTheInk: + sprite->_ink = static_cast<InkType>(d.u.i); + break; + case kTheLocH: + d.u.i = sprite->_startPoint.x; + break; + case kTheLocV: + d.u.i = sprite->_startPoint.y; + break; + case kTheConstraint: + d.u.i = sprite->_constraint; + break; default: error("Unprocessed getting field %d of sprite", field); } diff --git a/engines/director/score.cpp b/engines/director/score.cpp index dd3ab54eb8..53b26629c2 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -1535,6 +1535,8 @@ Sprite::Sprite() { _flags = 0; _height = 0; _castId = 0; + _constraint = 0; + _moveable = 0; _castId = 0; } diff --git a/engines/director/score.h b/engines/director/score.h index ee0eaa2972..2f17783d0e 100644 --- a/engines/director/score.h +++ b/engines/director/score.h @@ -286,6 +286,10 @@ public: Common::Point _startPoint; uint16 _width; uint16 _height; + //TODO: default constraint = 0, if turned on, sprite is constrainted to the bounding rect + //As i know, constrainted != 0 only if sprite moveable + byte _constraint; + byte _moveable; }; class Frame { |