[Scummvm-git-logs] scummvm master -> 81b0aad541c80ec03affe8e864953a2bb26284a6

bluegr bluegr at gmail.com
Sat Jul 3 10:26:41 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:
81b0aad541 TRECISION: Simplify shouldShowAnim()


Commit: 81b0aad541c80ec03affe8e864953a2bb26284a6
    https://github.com/scummvm/scummvm/commit/81b0aad541c80ec03affe8e864953a2bb26284a6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-07-03T13:26:30+03:00

Commit Message:
TRECISION: Simplify shouldShowAnim()

Changed paths:
    engines/trecision/video.cpp


diff --git a/engines/trecision/video.cpp b/engines/trecision/video.cpp
index 2deaeb77c1..90ff9179dd 100644
--- a/engines/trecision/video.cpp
+++ b/engines/trecision/video.cpp
@@ -475,16 +475,13 @@ static bool rectsIntersect(Common::Rect r1, Common::Rect r2) {
 }
 
 bool AnimManager::shouldShowAnim(int animation, Common::Rect curRect) {
-	bool hideAnim = false;
-
 	for (int32 i = 0; i < MAXAREA; i++) {
 		const bool intersect = rectsIntersect(_animTab[animation]._lim[i], curRect);
-		hideAnim = intersect && !_animTab[animation].isAnimAreaShown(i + 1);
-		if (hideAnim)
-			break;
+		if (intersect && !_animTab[animation].isAnimAreaShown(i + 1))
+			return false;
 	}
 
-	return !hideAnim;
+	return true;
 }
 
 void AnimManager::drawSmkBackgroundFrame(int animation) {




More information about the Scummvm-git-logs mailing list