[Scummvm-cvs-logs] SF.net SVN: scummvm:[52265] scummvm/trunk/engines/hugo

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat Aug 21 19:27:48 CEST 2010


Revision: 52265
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52265&view=rev
Author:   lordhoto
Date:     2010-08-21 17:27:48 +0000 (Sat, 21 Aug 2010)

Log Message:
-----------
Hugo: Some formatting fixes.

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/game.h
    scummvm/trunk/engines/hugo/parser.cpp

Modified: scummvm/trunk/engines/hugo/game.h
===================================================================
--- scummvm/trunk/engines/hugo/game.h	2010-08-21 14:54:57 UTC (rev 52264)
+++ scummvm/trunk/engines/hugo/game.h	2010-08-21 17:27:48 UTC (rev 52265)
@@ -868,13 +868,13 @@
 	uint32 objLength;
 };
 
-#include "common/pack-start.h"						// START STRUCT PACKING
-struct sound_hdr_t {								// Sound file lookup entry
-	uint16 size;									// Size of sound data in bytes
-	uint32 offset;									// Offset of sound data in file
+#include "common/pack-start.h"                      // START STRUCT PACKING
+struct sound_hdr_t {                                // Sound file lookup entry
+	uint16 size;                                    // Size of sound data in bytes
+	uint32 offset;                                  // Offset of sound data in file
 } PACKED_STRUCT;
-#include "common/pack-end.h"	// END STRUCT PACKING
+#include "common/pack-end.h"                        // END STRUCT PACKING
 
-}
+} // End of namespace Hugo
 
 #endif

Modified: scummvm/trunk/engines/hugo/parser.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser.cpp	2010-08-21 14:54:57 UTC (rev 52264)
+++ scummvm/trunk/engines/hugo/parser.cpp	2010-08-21 17:27:48 UTC (rev 52265)
@@ -53,8 +53,7 @@
 #define CY(Y)   HIWORD(Y)
 
 Parser::Parser(HugoEngine &vm) :
-	_vm(vm), _putIndex(0), _getIndex(0) {
-		_checkDoubleF1Fl = false;
+	_vm(vm), _putIndex(0), _getIndex(0), _checkDoubleF1Fl(false) {
 }
 
 void Parser::keyHandler(uint16 nChar, uint16 nFlags) {
@@ -118,7 +117,7 @@
 		}
 		break;
 	}
-	if 	((_checkDoubleF1Fl) && (nChar != Common::KEYCODE_F1))
+	if (_checkDoubleF1Fl && (nChar != Common::KEYCODE_F1))
 		_checkDoubleF1Fl = false;
 }
 
@@ -682,9 +681,9 @@
 
 void Parser::showDosInventory() {
 // Show user all objects being carried in a variable width 2 column format
-static const char *blanks = "                                        ";
-uint16 index, len, len1 = 0, len2 = 0;
-char buffer[XBYTES * NUM_ROWS] = "\0";
+	static const char *blanks = "                                        ";
+	uint16 index, len, len1 = 0, len2 = 0;
+	char buffer[XBYTES *NUM_ROWS] = "\0";
 
 	index = 0;
 	for (int i = 0; i < _vm._numObj; i++)     /* Find widths of 2 columns */
@@ -700,19 +699,20 @@
 	if (len1 + len2 < (uint16)strlen(_vm._textParser[kTBOutro]))
 		len1 = strlen(_vm._textParser[kTBOutro]);
 
-	strncat (buffer, blanks, (len1 + len2 - strlen(_vm._textParser[kTBIntro])) / 2);
-	strcat (strcat (buffer, _vm._textParser[kTBIntro]), "\n");
+	strncat(buffer, blanks, (len1 + len2 - strlen(_vm._textParser[kTBIntro])) / 2);
+	strcat(strcat(buffer, _vm._textParser[kTBIntro]), "\n");
 	index = 0;
 	for (int i = 0; i < _vm._numObj; i++) {     /* Assign strings */
 		if (_vm._objects[i].carriedFl) {
 			if (index++ & 1)
-				strcat (strcat (buffer, _vm._arrayNouns[_vm._objects[i].nounIndex][1]), "\n");
+				strcat(strcat(buffer, _vm._arrayNouns[_vm._objects[i].nounIndex][1]), "\n");
 			else
-				strncat (strcat (buffer, _vm._arrayNouns[_vm._objects[i].nounIndex][1]), blanks, len1 - strlen(_vm._arrayNouns[_vm._objects[i].nounIndex][1]));
+				strncat(strcat(buffer, _vm._arrayNouns[_vm._objects[i].nounIndex][1]), blanks, len1 - strlen(_vm._arrayNouns[_vm._objects[i].nounIndex][1]));
 		}
 	}
-	if (index & 1) strcat (buffer, "\n");
-	strcat (buffer, _vm._textParser[kTBOutro]);
+	if (index & 1)
+		strcat(buffer, "\n");
+	strcat(buffer, _vm._textParser[kTBOutro]);
 
 	Utils::Box(BOX_ANY, buffer);
 }


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