diff options
Diffstat (limited to 'engines/startrek/actors.cpp')
-rw-r--r-- | engines/startrek/actors.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/startrek/actors.cpp b/engines/startrek/actors.cpp index 24434eb995..b8d185e0fb 100644 --- a/engines/startrek/actors.cpp +++ b/engines/startrek/actors.cpp @@ -670,7 +670,7 @@ int StarTrekEngine::findObjectAt(int x, int y) { while (offset != _room->getHotspotEnd()) { uint16 word = _room->readRdfWord(offset); if (word & 0x8000) { - if ((word & actionBit) && isPointInPolygon((int16 *)(_room->_rdfData + offset + 6), x, y)) { + if ((word & actionBit) && _room->isPointInPolygon(offset + 6, x, y)) { int actorIndex = _room->readRdfWord(offset + 6); _objectHasWalkPosition = true; _objectWalkPosition.x = _room->readRdfWord(offset + 2); @@ -681,7 +681,7 @@ int StarTrekEngine::findObjectAt(int x, int y) { int numVertices = _room->readRdfWord(offset + 8); offset = offset + 10 + numVertices * 4; } else { - if (isPointInPolygon((int16 *)(_room->_rdfData + offset), x, y)) { + if (_room->isPointInPolygon(offset, x, y)) { int actorIndex = _room->readRdfWord(offset); return actorIndex; } |