[Scummvm-git-logs] scummvm master -> aabd5b2ec88fcfb9baadfefcf2e4a42ffd8cde20

madmoose thomas at fach-pedersen.net
Mon May 7 19:32:14 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
aabd5b2ec8 BLADERUNNER: Fix build


Commit: aabd5b2ec88fcfb9baadfefcf2e4a42ffd8cde20
    https://github.com/scummvm/scummvm/commit/aabd5b2ec88fcfb9baadfefcf2e4a42ffd8cde20
Author: Thomas Fach-Pedersen (thomas at fach-pedersen.net)
Date: 2018-05-07T19:31:53+02:00

Commit Message:
BLADERUNNER: Fix build

Changed paths:
    engines/bladerunner/obstacles.cpp


diff --git a/engines/bladerunner/obstacles.cpp b/engines/bladerunner/obstacles.cpp
index b8fc1f1..06c19ad 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)) {





More information about the Scummvm-git-logs mailing list