diff options
author | Andrew Kurushin | 2005-04-03 15:32:04 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-04-03 15:32:04 +0000 |
commit | 8ea88c95d663fac08a1492c2d3c7138e7392dbbc (patch) | |
tree | 60869aa13063d9dcff93ade2a4f7fd3992d4fef8 /saga/objectmap.cpp | |
parent | b507231f7135f0af2a27b047f1982685736e0e7b (diff) | |
download | scummvm-rg350-8ea88c95d663fac08a1492c2d3c7138e7392dbbc.tar.gz scummvm-rg350-8ea88c95d663fac08a1492c2d3c7138e7392dbbc.tar.bz2 scummvm-rg350-8ea88c95d663fac08a1492c2d3c7138e7392dbbc.zip |
- fixed tile doors drawing
- right mouse action fixed
svn-id: r17347
Diffstat (limited to 'saga/objectmap.cpp')
-rw-r--r-- | saga/objectmap.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/saga/objectmap.cpp b/saga/objectmap.cpp index 4a037e98c0..0ba295ce35 100644 --- a/saga/objectmap.cpp +++ b/saga/objectmap.cpp @@ -133,13 +133,26 @@ bool HitZone::hitTest(const Point &testPoint) { } void HitZone::draw(SURFACE *ds, int color) { - int i, pointsCount; + int i, pointsCount, j; + Location location; HitZone::ClickArea *clickArea; Point *points; for (i = 0; i < _clickAreasCount; i++) { clickArea = &_clickAreas[i]; pointsCount = clickArea->pointsCount; - points = clickArea->points; + if (_vm->_scene->getFlags() & kSceneFlagISO) { + points = (Point*)malloc(sizeof(Point) * pointsCount); + for (j = 0; j < pointsCount; j++) { + location.u() = clickArea->points[j].x; + location.v() = clickArea->points[j].y; + location.z = 0; + _vm->_isoMap->tileCoordsToScreenPoint(location, points[j]); + } + // + } else { + points = clickArea->points; + } + if (pointsCount == 2) { // 2 points represent a box drawFrame(ds, &points[0], &points[1], color); @@ -149,6 +162,10 @@ void HitZone::draw(SURFACE *ds, int color) { drawPolyLine(ds, points, pointsCount, color); } } + if (_vm->_scene->getFlags() & kSceneFlagISO) { + free(points); + } + } } |