[Scummvm-cvs-logs] SF.net SVN: scummvm: [28013] scummvm/trunk/engines/agi/agi.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Tue Jul 10 19:41:41 CEST 2007


Revision: 28013
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28013&view=rev
Author:   eriktorbjorn
Date:     2007-07-10 10:41:40 -0700 (Tue, 10 Jul 2007)

Log Message:
-----------
For some reason, AgiTextColor(amigaBlack, _olderAgi? amigaOrange : amigaPurple)
caused a linking error on my computer. Worked around that, and added curly
braces for (IMO) better readability.

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.cpp

Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2007-07-10 17:28:48 UTC (rev 28012)
+++ scummvm/trunk/engines/agi/agi.cpp	2007-07-10 17:41:40 UTC (rev 28013)
@@ -536,22 +536,31 @@
 };
 
 AgiTextColor AgiButtonStyle::getColor(bool hasFocus, bool pressed, bool positive) const {
-	if (_amigaStyle)
-		if (positive)
-			if (pressed) // Positive pressed Amiga-style button
-				return AgiTextColor(amigaBlack, _olderAgi? amigaOrange : amigaPurple);
-			else // Positive unpressed Amiga-style button
+	if (_amigaStyle) {
+		if (positive) {
+			if (pressed) { // Positive pressed Amiga-style button
+				if (_olderAgi) {
+					return AgiTextColor(amigaBlack, amigaOrange);
+				} else {
+					return AgiTextColor(amigaBlack, amigaPurple);
+				}
+			} else { // Positive unpressed Amiga-style button
 				return AgiTextColor(amigaWhite, amigaGreen);
-		else // _amigaStyle && !positive
-			if (pressed) // Negative pressed Amiga-style button
+			}
+		} else { // _amigaStyle && !positive
+			if (pressed) { // Negative pressed Amiga-style button
 				return AgiTextColor(amigaBlack, amigaCyan);
-			else // Negative unpressed Amiga-style button
+			} else { // Negative unpressed Amiga-style button
 				return AgiTextColor(amigaWhite, amigaRed);
-	else // PC-style button
-		if (hasFocus || pressed) // A pressed or in focus PC-style button
+			}
+		}
+	} else { // PC-style button
+		if (hasFocus || pressed) { // A pressed or in focus PC-style button
 			return AgiTextColor(pcWhite, pcBlack);
-		else // An unpressed PC-style button without focus
+		} else { // An unpressed PC-style button without focus
 			return AgiTextColor(pcBlack, pcWhite);
+		}
+	}
 }
 
 AgiTextColor AgiButtonStyle::getColor(bool hasFocus, bool pressed, int baseFgColor, int baseBgColor) const {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list