[Scummvm-git-logs] scummvm master -> 784d088ec64956dd55b5ecc6eff02be0171124f3

mgerhardy noreply at scummvm.org
Thu Dec 16 19:07:17 UTC 2021


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:
784d088ec6 TWINE: fixed regression in circle clip handling


Commit: 784d088ec64956dd55b5ecc6eff02be0171124f3
    https://github.com/scummvm/scummvm/commit/784d088ec64956dd55b5ecc6eff02be0171124f3
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-12-16T20:07:03+01:00

Commit Message:
TWINE: fixed regression in circle clip handling

and properly fixed the rendering artifacts now

https://bugs.scummvm.org/ticket/13123

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


diff --git a/engines/twine/renderer/renderer.cpp b/engines/twine/renderer/renderer.cpp
index fa4c98c667..7f63f3ec08 100644
--- a/engines/twine/renderer/renderer.cpp
+++ b/engines/twine/renderer/renderer.cpp
@@ -1045,9 +1045,9 @@ bool Renderer::prepareCircle(int32 x, int32 y, int32 radius) {
 		return false;
 	}
 	int16 left = (int16)(x - radius);
-	int16 right = (int16)(y - radius);
-	int16 bottom = (int16)(x + radius);
-	int16 top = (int16)(y + radius);
+	int16 right = (int16)(x + radius);
+	int16 bottom = (int16)(y + radius);
+	int16 top = (int16)(y - radius);
 	const Common::Rect &clip = _engine->_interface->_clip;
 	int16 cleft = clip.left;
 	int16 cright = clip.right;
@@ -1058,14 +1058,14 @@ bool Renderer::prepareCircle(int32 x, int32 y, int32 radius) {
 		if (left < cleft) {
 			left = cleft;
 		}
-		if (bottom > cright) {
-			bottom = cright;
+		if (bottom > cbottom) {
+			bottom = cbottom;
 		}
-		if (right < ctop) {
-			right = ctop;
+		if (right > cright) {
+			right = cright;
 		}
-		if (top > cbottom) {
-			top = cbottom;
+		if (top < ctop) {
+			top = ctop;
 		}
 
 		int32 r = 0;




More information about the Scummvm-git-logs mailing list