diff options
author | Eugene Sandulenko | 2016-08-16 23:58:30 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-16 23:58:30 +0200 |
commit | 9c0d9106509900c7faa42f2952474095a4bbbf11 (patch) | |
tree | 74597bcd0dbb4f69ae54819bdd3a15a469408110 /engines/director/lingo/lingo-the.cpp | |
parent | 4423bb0f1ddeafb19aabd3fb4e83c83ecb8fc0bb (diff) | |
download | scummvm-rg350-9c0d9106509900c7faa42f2952474095a4bbbf11.tar.gz scummvm-rg350-9c0d9106509900c7faa42f2952474095a4bbbf11.tar.bz2 scummvm-rg350-9c0d9106509900c7faa42f2952474095a4bbbf11.zip |
DIRECTOR: Lingo: Implement D2 version of 'the sqrt'
Diffstat (limited to 'engines/director/lingo/lingo-the.cpp')
-rw-r--r-- | engines/director/lingo/lingo-the.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index 20bccf35ac..6579de2f94 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -73,6 +73,7 @@ TheEntity entities[] = { { kTheSelection, "selection", false }, { kTheShiftDown, "shiftDown", false }, { kTheSprite, "sprite", true }, + { kTheSqrt, "sqrt", false }, { kTheStage, "stage", false }, { kTheStillDown, "stillDown", false }, { kTheTicks, "ticks", false }, @@ -327,6 +328,11 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) { d.type = INT; d.u.i = _floatPrecision; break; + case kTheSqrt: + id.toFloat(); + d.type = FLOAT; + d.u.f = sqrt(id.u.f); + break; default: warning("Unprocessed getting field %d of entity %d", field, entity); d.type = VOID; |