From 8e221b8d98a8386fc17f7282c79ad1c706a5f700 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 30 Dec 2019 19:20:29 +0100 Subject: DIRECTOR: LINGO: Load 'the entities' and fields per Director version --- engines/director/lingo/lingo-the.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index b9575a2b91..a9bffbbd57 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -119,7 +119,7 @@ TheEntity entities[] = { { kTheShiftDown, "shiftDown", false, 2 }, // D2 f { kTheSoundEnabled, "soundEnabled", false, 2 }, // D2 p { kTheSoundLevel, "soundLevel", false, 2 }, // D2 p - { kTheSprite, "sprite", true, 4 }, // D4 + { kTheSprite, "sprite", true, 2 }, // D4 p { kTheSqrt, "sqrt", false, 2 }, // D2 f { kTheStage, "stage", false, 4 }, // D4 p { kTheStageBottom, "stageBottom", false, 2 }, // D2 f @@ -277,14 +277,18 @@ void Lingo::initTheEntities() { TheEntity *e = entities; while (e->entity != kTheNOEntity) { - _theEntities[e->name] = e; + if (e->version <= _vm->getVersion()) + _theEntities[e->name] = e; + e++; } TheEntityField *f = fields; while (f->entity != kTheNOEntity) { - _theEntityFields[Common::String::format("%d%s", f->entity, f->name)] = f; + if (f->version <= _vm->getVersion()) + _theEntityFields[Common::String::format("%d%s", f->entity, f->name)] = f; + f++; } } -- cgit v1.2.3