aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorThomas Fach-Pedersen2018-05-07 19:31:53 +0200
committerThomas Fach-Pedersen2018-05-07 19:31:53 +0200
commitaabd5b2ec88fcfb9baadfefcf2e4a42ffd8cde20 (patch)
tree111a5ceaaab236e5c215e823eccd6945a991a23d /engines/bladerunner
parente3363635cbac7f3b0f322e3cd2c532e97cff6abb (diff)
downloadscummvm-rg350-aabd5b2ec88fcfb9baadfefcf2e4a42ffd8cde20.tar.gz
scummvm-rg350-aabd5b2ec88fcfb9baadfefcf2e4a42ffd8cde20.tar.bz2
scummvm-rg350-aabd5b2ec88fcfb9baadfefcf2e4a42ffd8cde20.zip
BLADERUNNER: Fix build
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/obstacles.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/bladerunner/obstacles.cpp b/engines/bladerunner/obstacles.cpp
index b8fc1f16fa..06c19ad4af 100644
--- a/engines/bladerunner/obstacles.cpp
+++ b/engines/bladerunner/obstacles.cpp
@@ -90,13 +90,13 @@ bool Obstacles::lineLineIntersection(LineSegment a, LineSegment b, Vector2 *inte
if (a.start.x == a.end.x && b.start.y == b.end.y && IN_RANGE(a.start.x, b.start.x, b.end.x) && IN_RANGE(b.start.y, a.start.y, a.end.y)) {
// A is vertical, B is horizontal
- *intersection = Vector2 { a.start.x, b.start.y };
+ *intersection = Vector2(a.start.x, b.start.y);
return true;
}
if (a.start.y == a.end.y && b.start.x == b.end.x && IN_RANGE(a.start.y, b.start.y, b.end.y) && IN_RANGE(b.start.x, a.start.x, a.end.x)) {
// A is horizontal, B is vertical
- *intersection = Vector2 { b.start.x, a.start.y };
+ *intersection = Vector2(b.start.x, a.start.y);
return true;
}
@@ -117,10 +117,10 @@ bool Obstacles::linePolygonIntersection(LineSegment lineA, VertexType lineAType,
Vector2 newIntersectionPoint;
if (lineLineIntersection(lineA, lineB, &newIntersectionPoint)) {
- if (lineAType == TOP_RIGHT && lineBType == TOP_LEFT
- || lineAType == BOTTOM_RIGHT && lineBType == TOP_RIGHT
- || lineAType == BOTTOM_LEFT && lineBType == BOTTOM_RIGHT
- || lineAType == TOP_LEFT && lineBType == BOTTOM_LEFT
+ if ((lineAType == TOP_RIGHT && lineBType == TOP_LEFT)
+ || (lineAType == BOTTOM_RIGHT && lineBType == TOP_RIGHT)
+ || (lineAType == BOTTOM_LEFT && lineBType == BOTTOM_RIGHT)
+ || (lineAType == TOP_LEFT && lineBType == BOTTOM_LEFT)
) {
if (!WITHIN_TOLERANCE(lineB.end.x, intersectionPoint->x)
|| !WITHIN_TOLERANCE(lineB.end.y, intersectionPoint->y)) {