diff options
author | Johannes Schickel | 2010-08-21 17:27:48 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-08-21 17:27:48 +0000 |
commit | 1a0d7c87d36a9bf1aa27186b1299b3a5348656b6 (patch) | |
tree | c9c403714b0d69688d2f84957f01e798f02f2a1e /engines | |
parent | 4742b4d728ba772d47cc497681c9bfb0144475bc (diff) | |
download | scummvm-rg350-1a0d7c87d36a9bf1aa27186b1299b3a5348656b6.tar.gz scummvm-rg350-1a0d7c87d36a9bf1aa27186b1299b3a5348656b6.tar.bz2 scummvm-rg350-1a0d7c87d36a9bf1aa27186b1299b3a5348656b6.zip |
Hugo: Some formatting fixes.
svn-id: r52265
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hugo/game.h | 12 | ||||
-rw-r--r-- | engines/hugo/parser.cpp | 24 |
2 files changed, 18 insertions, 18 deletions
diff --git a/engines/hugo/game.h b/engines/hugo/game.h index ccac23d3c8..d032a4b817 100644 --- a/engines/hugo/game.h +++ b/engines/hugo/game.h @@ -868,13 +868,13 @@ struct objBlock_t { 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 diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index dec98087e6..ad2b107329 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -53,8 +53,7 @@ namespace Hugo { #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 @@ void Parser::keyHandler(uint16 nChar, uint16 nFlags) { } break; } - if ((_checkDoubleF1Fl) && (nChar != Common::KEYCODE_F1)) + if (_checkDoubleF1Fl && (nChar != Common::KEYCODE_F1)) _checkDoubleF1Fl = false; } @@ -682,9 +681,9 @@ bool Parser::isObjectVerb(object_t *obj, char *line, char *comment) { 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 @@ char buffer[XBYTES * NUM_ROWS] = "\0"; 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); } |