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

mgerhardy martin.gerhardy at gmail.com
Thu Feb 25 07:25:04 UTC 2021


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

Summary:
5560ddc278 AGS: fixed unresolved symbols while linking oute_finder_jps
b2efa1f884 TWINE: renamed variables


Commit: 5560ddc278b9c5ef1e1351de7b435c706081fa88
    https://github.com/scummvm/scummvm/commit/5560ddc278b9c5ef1e1351de7b435c706081fa88
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-02-25T08:24:30+01:00

Commit Message:
AGS: fixed unresolved symbols while linking oute_finder_jps

Changed paths:
    engines/ags/engine/ac/route_finder_jps.cpp
    engines/ags/engine/ac/route_finder_jps.h


diff --git a/engines/ags/engine/ac/route_finder_jps.cpp b/engines/ags/engine/ac/route_finder_jps.cpp
index a84d411a31..a3f99b0088 100644
--- a/engines/ags/engine/ac/route_finder_jps.cpp
+++ b/engines/ags/engine/ac/route_finder_jps.cpp
@@ -73,26 +73,6 @@ void Navigation::IncFrameId() {
 	}
 }
 
-inline int Navigation::PackSquare(int x, int y) {
-	return (y << 16) + x;
-}
-
-inline void Navigation::UnpackSquare(int sq, int &x, int &y) {
-	y = sq >> 16;
-	x = sq & ((1 << 16) - 1);
-}
-
-inline bool Navigation::Outside(int x, int y) const {
-	return
-		(unsigned)x >= (unsigned)mapWidth ||
-		(unsigned)y >= (unsigned)mapHeight;
-}
-
-inline bool Navigation::Walkable(int x, int y) const {
-	// invert condition because of AGS
-	return map[y][x] != 0;
-}
-
 bool Navigation::Passable(int x, int y) const {
 	return !Outside(x, y) && Walkable(x, y);
 }
diff --git a/engines/ags/engine/ac/route_finder_jps.h b/engines/ags/engine/ac/route_finder_jps.h
index b4963f8aab..04ac097d14 100644
--- a/engines/ags/engine/ac/route_finder_jps.h
+++ b/engines/ags/engine/ac/route_finder_jps.h
@@ -67,8 +67,8 @@ public:
 		map[y] = row;
 	}
 
-	inline static int PackSquare(int x, int y);
-	inline static void UnpackSquare(int sq, int &x, int &y);
+	static int PackSquare(int x, int y);
+	static void UnpackSquare(int sq, int &x, int &y);
 
 private:
 	// priority queue entry
@@ -172,4 +172,24 @@ private:
 	}
 };
 
+inline int Navigation::PackSquare(int x, int y) {
+	return (y << 16) + x;
+}
+
+inline void Navigation::UnpackSquare(int sq, int &x, int &y) {
+	y = sq >> 16;
+	x = sq & ((1 << 16) - 1);
+}
+
+inline bool Navigation::Outside(int x, int y) const {
+	return
+		(unsigned)x >= (unsigned)mapWidth ||
+		(unsigned)y >= (unsigned)mapHeight;
+}
+
+inline bool Navigation::Walkable(int x, int y) const {
+	// invert condition because of AGS
+	return map[y][x] != 0;
+}
+
 } // namespace AGS3


Commit: b2efa1f8849f2f83467573f6da086ef5a2de81e8
    https://github.com/scummvm/scummvm/commit/b2efa1f8849f2f83467573f6da086ef5a2de81e8
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-02-25T08:24:46+01:00

Commit Message:
TWINE: renamed variables

Changed paths:
    engines/twine/renderer/renderer.cpp


diff --git a/engines/twine/renderer/renderer.cpp b/engines/twine/renderer/renderer.cpp
index ff3e9fae7a..4df791c7e8 100644
--- a/engines/twine/renderer/renderer.cpp
+++ b/engines/twine/renderer/renderer.cpp
@@ -1519,16 +1519,16 @@ void Renderer::renderInventoryItem(int32 x, int32 y, const uint8 *bodyPtr, int32
 	renderIsoModel(0, 0, 0, ANGLE_0, angle, ANGLE_0, bodyPtr);
 }
 
-void Renderer::computeHolomapPolygon(int32 y1, int32 x1, int32 y2, int32 x2, int16 *polygonTabPtr) {
-	int32 minY = y2;
+void Renderer::computeHolomapPolygon(int32 top, int32 x1, int32 bottom, int32 x2, int16 *polygonTabPtr) {
+	int32 minY = bottom;
 	int32 minX = x1;
-	if (y1 < y2) {
-		minY = y1;
-		y1 = y2;
+	if (top < bottom) {
+		minY = top;
+		top = bottom;
 		minX = x2;
 		x2 = x1;
 	}
-	uint32 deltaY = y1 - minY;
+	uint32 deltaY = top - minY;
 	int16 *currentPolygonTabEntry = &polygonTabPtr[minY];
 	if (x2 <= minX) {
 		uint32 deltaX = (uint32)(uint16)((int16)minX - (int16)x2) << 0x10;




More information about the Scummvm-git-logs mailing list