aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/director/lingo/lingo-the.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index f772d0490f..4d54110489 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -163,6 +163,8 @@ void Lingo::setTheEntity(TheEntity entity, int id, TheField field, Datum &d) {
void Lingo::setTheSprite(int id, TheField field, Datum &d) {
Sprite *sprite = _vm->_currentScore->getSpriteById(id);
+ d.toInt(); // Enforce Integer
+
switch (field) {
case kTheCastNum:
if (_vm->_currentScore->_casts.contains(d.u.i)) {
@@ -208,25 +210,23 @@ Datum Lingo::getTheEntity(TheEntity entity, int id, TheField field) {
Datum Lingo::getTheSprite(int id, TheField field) {
Datum d;
Sprite *sprite = _vm->_currentScore->getSpriteById(id);
+
+ d.type = INT;
+
switch (field) {
case kTheCastNum:
- d.type = INT;
d.u.i = sprite->_castId;
break;
case kTheWidth:
- d.type = INT;
d.u.i = sprite->_width;
break;
case kTheHeight:
- d.type = INT;
d.u.i = sprite->_height;
break;
case kTheTrails:
- d.type = INT;
d.u.i = sprite->_trails;
break;
case kTheInk:
- d.type = INT;
d.u.i = sprite->_ink;
break;
default: