Skip to content

Commit

Permalink
DIRECTOR: Make Lingo::setTheSprite coerce sprite IDs
Browse files Browse the repository at this point in the history
Fixes parts not hiding after being selected on the face
selection screen in Eastern Mind.
  • Loading branch information
moralrecordings committed Aug 30, 2022
1 parent f4b93ec commit b599e82
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions engines/director/lingo/lingo-the.cpp
Expand Up @@ -1466,21 +1466,14 @@ Datum Lingo::getTheSprite(Datum &id1, int field) {
}

void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
int id = 0;
int id = id1.asInt();
Score *score = _vm->getCurrentMovie()->getScore();

if (!score) {
warning("Lingo::setTheSprite(): The sprite %d field \"%s\" setting over non-active score", id, field2str(field));
return;
}

if (id1.type == INT) {
id = id1.u.i;
} else {
warning("Lingo::setTheSprite(): Unknown the sprite id type: %s", id1.type2str());
return;
}

Channel *channel = score->getChannelById(id);
if (!channel)
return;
Expand Down

0 comments on commit b599e82

Please sign in to comment.