[Scummvm-cvs-logs] SF.net SVN: scummvm:[48842] scummvm/trunk/engines/saga

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Apr 29 00:23:34 CEST 2010


Revision: 48842
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48842&view=rev
Author:   fingolfin
Date:     2010-04-28 22:23:34 +0000 (Wed, 28 Apr 2010)

Log Message:
-----------
SAGA: Avoid global constructor for pieceOrigins array

Modified Paths:
--------------
    scummvm/trunk/engines/saga/itedata.cpp
    scummvm/trunk/engines/saga/itedata.h
    scummvm/trunk/engines/saga/puzzle.cpp

Modified: scummvm/trunk/engines/saga/itedata.cpp
===================================================================
--- scummvm/trunk/engines/saga/itedata.cpp	2010-04-28 22:23:00 UTC (rev 48841)
+++ scummvm/trunk/engines/saga/itedata.cpp	2010-04-28 22:23:34 UTC (rev 48842)
@@ -428,22 +428,22 @@
 	}
 };
 
-Point pieceOrigins[PUZZLE_PIECES] = {
-	Point(268,  18),
-	Point(270,  51),
-	Point( 19,  51),
-	Point( 73,   0),
-	Point(  0,  34),
-	Point(215,   0),
-	Point(159,   0),
-	Point(  9,  69),
-	Point(288,  18),
-	Point(112,   0),
-	Point( 27,  88),
-	Point( 43,   0),
-	Point(  0,   0),
-	Point(262,   0),
-	Point(271, 103)
+const RawPoint pieceOrigins[PUZZLE_PIECES] = {
+	{ 268,  18 },
+	{ 270,  51 },
+	{  19,  51 },
+	{  73,   0 },
+	{   0,  34 },
+	{ 215,   0 },
+	{ 159,   0 },
+	{   9,  69 },
+	{ 288,  18 },
+	{ 112,   0 },
+	{  27,  88 },
+	{  43,   0 },
+	{   0,   0 },
+	{ 262,   0 },
+	{ 271, 103 }
 };
 
 const char *pieceNames[][PUZZLE_PIECES] = {

Modified: scummvm/trunk/engines/saga/itedata.h
===================================================================
--- scummvm/trunk/engines/saga/itedata.h	2010-04-28 22:23:00 UTC (rev 48841)
+++ scummvm/trunk/engines/saga/itedata.h	2010-04-28 22:23:34 UTC (rev 48842)
@@ -92,7 +92,8 @@
 
 #define PUZZLE_PIECES 15
 
-extern Point pieceOrigins[PUZZLE_PIECES];
+struct RawPoint { int x, y; };
+extern const RawPoint pieceOrigins[PUZZLE_PIECES];
 extern const char *pieceNames[][PUZZLE_PIECES];
 
 #define NUM_SOLICIT_REPLIES 5

Modified: scummvm/trunk/engines/saga/puzzle.cpp
===================================================================
--- scummvm/trunk/engines/saga/puzzle.cpp	2010-04-28 22:23:00 UTC (rev 48841)
+++ scummvm/trunk/engines/saga/puzzle.cpp	2010-04-28 22:23:34 UTC (rev 48842)
@@ -556,8 +556,7 @@
 			sprintf(hintBuf, optionsStr[_lang][kROHint], pieceNames[_lang][piece]);
 
 			_vm->_actor->nonActorSpeech(_hintBox, &hintPtr, 1, PUZZLE_TOOL_SOUNDS + _hintSpeaker + piece * 3, 0);
-		}
-		else {
+		} else {
 				//	If no pieces are in the wrong place
 			_vm->_actor->nonActorSpeech(_hintBox, &hintStr[_lang][3], 1, PUZZLE_HINT_SOUNDS + 3 * 3 + _hintSpeaker, 0);
 		}


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