diff options
author | Eugene Sandulenko | 2018-03-23 23:45:52 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-24 02:45:26 +0100 |
commit | bb492da8aaf5e072cd22eea44c2344309e92be4f (patch) | |
tree | 46d1c5baa8c5cf775473352146015e72fe7d6655 /engines/bladerunner | |
parent | 967de5d4aa400608cd586bb585d9e0904f44cd20 (diff) | |
download | scummvm-rg350-bb492da8aaf5e072cd22eea44c2344309e92be4f.tar.gz scummvm-rg350-bb492da8aaf5e072cd22eea44c2344309e92be4f.tar.bz2 scummvm-rg350-bb492da8aaf5e072cd22eea44c2344309e92be4f.zip |
BLADERUNNER: Unstub PoliceMazeTargetTrack::add()
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/police_maze.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/engines/bladerunner/police_maze.cpp b/engines/bladerunner/police_maze.cpp index 395804d626..7345dc0490 100644 --- a/engines/bladerunner/police_maze.cpp +++ b/engines/bladerunner/police_maze.cpp @@ -152,7 +152,32 @@ void PoliceMazeTargetTrack::clear(bool isLoadingGame) { } void PoliceMazeTargetTrack::add(int trackId, float startX, float startY, float startZ, float endX, float endY, float endZ, int count, void *list, bool a11) { - warning("PoliceMazeTargetTrack::add(%d, %f, %f, %f, %f, %f, %f, %d, %p, %d)", trackId, startX, startY, startZ, endX, endY, endZ, count, (void *)list, a11); + _data = (int *)list; + + if (true /* !GameIsLoading */) { // FIXME + _itemId = trackId; + _count = count; + _dataIndex = 0; + + double coef = 1.0f / (long double)count; + + double coefX = (endX - startX) * coef; + double coefY = (endY - startY) * coef; + double coefZ = (endZ - startZ) * coef; + + for (int i = 0; i < count; i++) { + _points[i].x = i * coefX + startX; + _points[i].y = i * coefY + startY; + _points[i].z = i * coefZ + startZ; + } + + _points[count].x = endX; + _points[count].y = endY; + _points[count].z = endZ; + + _visible = !a11; + } + _isPresent = true; } void PoliceMazeTargetTrack::tick() { |