diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index 08006fe1b70..5a0f79721ed 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -1333,7 +1333,7 @@ void Cast::doCast(int param1) { for (int idx = 0; idx < 5 && !_vm->shouldQuit() && !_vm->_events->isKeyMousePressed(); ++idx) _vm->_events->pollEventsAndWait(); - + if (_vm->_events->isKeyMousePressed()) break; @@ -1682,7 +1682,7 @@ void River::updateObstacles() { void River::riverSetPhysX() { int xAmt = (_vm->_scrollCol * 16) + _vm->_scrollX; - + for (RiverStruct *cur = _topList; cur <= _botList; ++cur) { cur->_xp = xAmt - (_screenVertX - cur->_riverX); } diff --git a/engines/access/amazon/amazon_room.h b/engines/access/amazon/amazon_room.h index 6396f80199c..003178ea152 100644 --- a/engines/access/amazon/amazon_room.h +++ b/engines/access/amazon/amazon_room.h @@ -61,7 +61,7 @@ public: virtual ~AmazonRoom(); virtual void init4Quads(); - + virtual void roomMenu(); }; diff --git a/engines/access/animation.h b/engines/access/animation.h index 72621c4d114..49417ec5fc1 100644 --- a/engines/access/animation.h +++ b/engines/access/animation.h @@ -49,7 +49,7 @@ public: ~AnimationManager(); void freeAnimationData(); void loadAnimations(Resource *res); - + Animation *findAnimation(int animId); Animation *setAnimation(int animId); diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index 37f4c7082e8..577746f7b48 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -173,7 +173,7 @@ void BaseSurface::copyTo(BaseSurface *dest) { if (dest->empty()) dest->create(this->w, this->h); - dest->blitFrom(*this); + dest->blitFrom(*this); } void BaseSurface::saveBlock(const Common::Rect &bounds) { diff --git a/engines/access/debugger.cpp b/engines/access/debugger.cpp index 48c7290249a..308733ece2f 100644 --- a/engines/access/debugger.cpp +++ b/engines/access/debugger.cpp @@ -94,7 +94,7 @@ bool Debugger::Cmd_LoadScene(int argc, const char **argv) { debugPrintf("Unused Room Number\n"); return true; } - + _vm->_player->_roomNumber = newRoom; _vm->_room->_function = FN_CLEAR1; diff --git a/engines/access/decompress.cpp b/engines/access/decompress.cpp index 3de376c1939..6d5b613fe26 100644 --- a/engines/access/decompress.cpp +++ b/engines/access/decompress.cpp @@ -31,7 +31,7 @@ namespace Access { void LzwDecompressor::decompress(byte *source, byte *dest) { _source = source; - + byte litByte = 0; uint16 oldCode = 0; uint16 copyLength, maxCodeValue, code, nextCode, lastCode; diff --git a/engines/access/events.cpp b/engines/access/events.cpp index 21ff0d09289..3d3b97e0286 100644 --- a/engines/access/events.cpp +++ b/engines/access/events.cpp @@ -65,9 +65,9 @@ void EventsManager::setNormalCursor(CursorType cursorId) { void EventsManager::setCursor(CursorType cursorId) { if (cursorId == _cursorId) - return; + return; _cursorId = cursorId; - + if (cursorId == CURSOR_INVENTORY) { // Set the cursor CursorMan.replaceCursor(_invCursor.getPixels(), _invCursor.w, _invCursor.h, @@ -209,9 +209,9 @@ void EventsManager::keyControl(Common::KeyCode keycode, bool isKeyDown) { } return; } - + _keyCode = keycode; - + switch (keycode) { case Common::KEYCODE_UP: case Common::KEYCODE_KP8: diff --git a/engines/access/files.h b/engines/access/files.h index 61fccc24315..151890f3384 100644 --- a/engines/access/files.h +++ b/engines/access/files.h @@ -77,7 +77,7 @@ private: * Handles setting up the resource with a stream for the located resource */ void handleFile(Resource *res); - + /** * Handles loading a screen surface and palette with decoded resource */ diff --git a/engines/access/inventory.h b/engines/access/inventory.h index 1d88bf45555..e91ca2484ed 100644 --- a/engines/access/inventory.h +++ b/engines/access/inventory.h @@ -119,7 +119,7 @@ public: int _startTravelItem; public: InventoryManager(AccessEngine *vm); - + int &operator[](int idx); int useItem(); diff --git a/engines/access/player.cpp b/engines/access/player.cpp index 0162491aeed..ccef0d6740d 100644 --- a/engines/access/player.cpp +++ b/engines/access/player.cpp @@ -142,7 +142,7 @@ void Player::loadTexPalette() { int size = texPal->_size; assert(size == 768); _manPal1 = new byte[size]; - memcpy(_manPal1, texPal->data(), size); + memcpy(_manPal1, texPal->data(), size); } void Player::loadSprites(const Common::String &name) { diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp index 2d29ad0718c..7da9dfc429d 100644 --- a/engines/access/screen.cpp +++ b/engines/access/screen.cpp @@ -300,10 +300,10 @@ void Screen::cyclePaletteBackwards() { _vm->_timers[6]._flag++; byte *pStart = &_rawPalette[_cycleStart * 3]; byte *pEnd = &_rawPalette[_endCycle * 3]; - + for (int idx = _startCycle; idx < _endCycle; ++idx) { g_system->getPaletteManager()->setPalette(pStart, idx, 1); - + pStart += 3; if (pStart == pEnd) pStart = &_rawPalette[_cycleStart * 3]; diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 38313640f18..2cebc3e3c6b 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -840,7 +840,7 @@ void Scripts::cmdTexChoice() { _vm->_fonts._charSet._lo = 1; _vm->_fonts._charSet._hi = 8; _vm->_fonts._charFor._hi = 255; - + if (_vm->getGameID() == GType_MartianMemorandum) { _vm->_fonts._charFor._lo = 247; _vm->_screen->_maxChars = 23; @@ -912,7 +912,7 @@ void Scripts::cmdTexChoice() { _vm->_events->debounceLeft(); int x = _vm->_events->_mousePos.x; for (int i = 0; i < BTN_COUNT; i++) { - if (((_vm->getGameID() == GType_MartianMemorandum) && (x >= BTN_RANGES_v1[i][0]) && (x < BTN_RANGES_v1[i][1])) + if (((_vm->getGameID() == GType_MartianMemorandum) && (x >= BTN_RANGES_v1[i][0]) && (x < BTN_RANGES_v1[i][1])) || ((_vm->getGameID() == GType_Amazon) && (x >= BTN_RANGES_v2[i][0]) && (x < BTN_RANGES_v2[i][1]))) { choice = i; @@ -1049,7 +1049,7 @@ void Scripts::cmdDispAbout() { if (btnSelected == 2) _vm->_useItem = -1; else - _vm->_useItem = _vm->_travelBox->_tempListIdx[boxX]; + _vm->_useItem = _vm->_travelBox->_tempListIdx[boxX]; } void Scripts::cmdPushLocation() { diff --git a/engines/access/scripts.h b/engines/access/scripts.h index 4cfedf3b3f2..ad9cb8661e9 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -73,12 +73,12 @@ protected: void cmdAnim(); void cmdSetFlag(); void cmdCheckFlag(); - + /** * Jump to another script */ void cmdGoto(); - + void cmdAddScore(); void cmdSetInventory(); void cmdCheckInventory(); @@ -162,7 +162,7 @@ public: void freeScriptData(); void searchForSequence(); - + int executeScript(); void findNull(); diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp index cf52bc58c58..baa14ce21ec 100644 --- a/engines/access/sound.cpp +++ b/engines/access/sound.cpp @@ -155,7 +155,7 @@ void SoundManager::playSound(Resource *res, int priority, bool loop, int soundIn error("Unknown format"); if (loop) { - _queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0, + _queue.push_back(QueuedSound(new Audio::LoopingAudioStream(audioStream, 0, DisposeAfterUse::NO), soundIndex)); } else { _queue.push_back(QueuedSound(audioStream, soundIndex)); diff --git a/engines/access/video.cpp b/engines/access/video.cpp index 22842a58554..54231a9efea 100644 --- a/engines/access/video.cpp +++ b/engines/access/video.cpp @@ -97,7 +97,7 @@ void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, con void VideoPlayer::setVideo(BaseSurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate) { // Open up video stream _videoData = _vm->_files->loadFile(videoFile); - + setVideo(vidSurface, pt, rate); } diff --git a/engines/adl/disk.h b/engines/adl/disk.h index 653d76ff10c..4c0df834fa1 100644 --- a/engines/adl/disk.h +++ b/engines/adl/disk.h @@ -135,7 +135,7 @@ private: enum FileType { kFileTypeText = 0, kFileTypeAppleSoft = 2, - kFileTypeBinary = 4 + kFileTypeBinary = 4 }; enum { diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 19aca6f2c4e..381c462adef 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -353,7 +353,7 @@ int AgiEngine::playGame() { if (appleIIgsDelayOverwrite->gameId == getGameID()) break; // game found appleIIgsDelayOverwrite++; - } + } } do { diff --git a/engines/agi/mouse_cursor.h b/engines/agi/mouse_cursor.h index c086359b0f2..f8dc21dc4cb 100644 --- a/engines/agi/mouse_cursor.h +++ b/engines/agi/mouse_cursor.h @@ -192,7 +192,7 @@ static const byte MOUSECURSOR_MACINTOSH_BUSY[] = { 1,2,2,2,2,1,2,2,2,1, 1,2,2,2,2,1,2,2,2,1, 1,2,2,2,2,1,2,2,2,1, - 1,2,2,1,1,1,2,2,2,1, + 1,2,2,1,1,1,2,2,2,1, 1,2,2,2,2,2,2,2,2,1, 1,2,2,2,2,2,2,2,2,1, 0,1,2,2,2,2,2,2,1,0, diff --git a/engines/agi/systemui.cpp b/engines/agi/systemui.cpp index 1f26267ad63..c7ca7cd5d4f 100644 --- a/engines/agi/systemui.cpp +++ b/engines/agi/systemui.cpp @@ -975,7 +975,7 @@ void SystemUI::askForVerificationKeyPress(uint16 newKey) { if (executeButton) { if (_askForVerificationMouseActiveButtonNr >= 0) { SystemUIButtonEntry *button = &_buttonArray[_askForVerificationMouseActiveButtonNr]; - + if (button->active) { if (!button->isDefault) { // Not default button? -> that's cancel diff --git a/engines/agi/systemui.h b/engines/agi/systemui.h index 283de8794c1..1f6e2988bff 100644 --- a/engines/agi/systemui.h +++ b/engines/agi/systemui.h @@ -69,7 +69,7 @@ public: bool quitDialog(); private: - + public: const char *getInventoryTextNothing(); diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp index d11ff201eaa..3a7158a203e 100644 --- a/engines/agos/midi.cpp +++ b/engines/agos/midi.cpp @@ -179,7 +179,7 @@ int MidiPlayer::open(int gameType, bool isDemo) { //setTimerRate(_driver->getBaseTempo()); return 0; } - + case kMusicModeMilesAudio: { switch (musicType) { case MT_ADLIB: { diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index 1ba0f563531..6ec89311082 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -1317,7 +1317,7 @@ bool AGOSEngine_Elvira2::loadGame(const Common::String &filename, bool restartMo if (getGameType() == GType_WW && getPlatform() == Common::kPlatformDOS && derefItem(item->parent) == NULL) item->parent = 0; - + parent_item = derefItem(parent); setItemParent(item, parent_item); diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index f92e030c884..aef81fad8a2 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -1624,7 +1624,7 @@ yyparse () #endif #endif { - + int yystate; int yyn; int yyresult; diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index d268be4aec8..5c0eeedf7e2 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -34,7 +34,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -52,7 +52,7 @@ typedef uint64_t flex_uint64_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -168,7 +168,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -225,7 +225,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -764,7 +764,7 @@ extern int yywrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -888,7 +888,7 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - + #line 69 "engines/director/lingo/lingo-lex.l" @@ -1641,7 +1641,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); @@ -1696,7 +1696,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ @@ -1739,7 +1739,7 @@ static int yy_get_next_buffer (void) { int c; - + *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1808,12 +1808,12 @@ static int yy_get_next_buffer (void) /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1826,11 +1826,11 @@ static int yy_get_next_buffer (void) /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); @@ -1870,13 +1870,13 @@ static void yy_load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1899,11 +1899,11 @@ static void yy_load_buffer_state (void) /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return; @@ -1919,7 +1919,7 @@ static void yy_load_buffer_state (void) #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1928,7 +1928,7 @@ extern int isatty (int ); { int oerrno = errno; - + yy_flush_buffer(b ); b->yy_input_file = file; @@ -1944,13 +1944,13 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { @@ -1979,7 +1979,7 @@ extern int isatty (int ); * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -2009,7 +2009,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void yypop_buffer_state (void) { @@ -2033,7 +2033,7 @@ void yypop_buffer_state (void) static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; - + if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this @@ -2046,9 +2046,9 @@ static void yyensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -2076,13 +2076,13 @@ static void yyensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -2111,14 +2111,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - + return yy_scan_bytes(yystr,strlen(yystr) ); } @@ -2126,7 +2126,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) @@ -2134,7 +2134,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len YY_BUFFER_STATE b; char *buf; yy_size_t n, i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); @@ -2188,16 +2188,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int yyget_lineno (void) { - + return yylineno; } /** Get the input stream. - * + * */ FILE *yyget_in (void) { @@ -2205,7 +2205,7 @@ FILE *yyget_in (void) } /** Get the output stream. - * + * */ FILE *yyget_out (void) { @@ -2213,7 +2213,7 @@ FILE *yyget_out (void) } /** Get the length of the current token. - * + * */ yy_size_t yyget_leng (void) { @@ -2221,7 +2221,7 @@ yy_size_t yyget_leng (void) } /** Get the current token. - * + * */ char *yyget_text (void) @@ -2231,18 +2231,18 @@ char *yyget_text (void) /** Set the current line number. * @param line_number - * + * */ void yyset_lineno (int line_number ) { - + yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) @@ -2296,7 +2296,7 @@ static int yy_init_globals (void) /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); diff --git a/engines/dm/detection.cpp b/engines/dm/detection.cpp index 8ac2aa552c2..f3828896f1f 100644 --- a/engines/dm/detection.cpp +++ b/engines/dm/detection.cpp @@ -71,7 +71,7 @@ static const DMADGameDescription gameDescriptions[] = { { kDMSavePlatformAcceptAny } }, - { + { AD_TABLE_END_MARKER, kDMSaveTargetNone, kDMSaveFormatNone, kDMSavePlatformNone, {kDMSaveTargetNone}, {kDMSaveFormatNone}, {kDMSavePlatformNone} } diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 39ae3da50f9..46d90366cda 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -63,7 +63,7 @@ DoorFrames::DoorFrames(Frame f1, Frame f2_1, Frame f2_2, Frame f2_3, _rightHorizontal[1] = f4_2; _rightHorizontal[2] = f4_3; } - + DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) { _bitmapScreen = nullptr; _bitmaps = nullptr; @@ -898,7 +898,7 @@ void DisplayMan::fillBoxBitmap(byte *destBitmap, Box &box, Color color, int16 by void DisplayMan::blitBoxFilledWithMaskedBitmap(byte *src, byte *dest, byte *mask, byte *tmp, Box& box, int16 lastUnitIndex, int16 firstUnitIndex, int16 destByteWidth, Color transparent, int16 xPos, int16 yPos, int16 destHeight, int16 height2) { - + // FIXME: does not produce the same effect as the original byte nextUnitIndex = firstUnitIndex; diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp index 111280c9586..8bc37702263 100644 --- a/engines/dm/loadsave.cpp +++ b/engines/dm/loadsave.cpp @@ -393,7 +393,7 @@ bool DMEngine::writeCompleteSaveFile(int16 saveSlot, Common::String& saveDescrip file->flush(); file->finalize(); delete file; - + return true; } diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index b459c4539bb..3b1ac7cb600 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -398,7 +398,7 @@ void DrasculaEngine::increaseFrameNum() { curHeight = (int)newHeight; curWidth = (int)newWidth; } - + // Fix bug #5903 DRASCULA-IT: Crash/graphic glitch at castle towers // Chapter 5 Room 45 is the castle tower part // Fixing the character's coordinate(0,0) in the tower section to prevent out of window coordinates and crash diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 6bfb2e18233..8634b6c5860 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -217,7 +217,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { int letterY = 0, letterX = 0, i; uint len = strlen(said); byte c; - + byte *srcSurface = tableSurface; if (_lang == kSpanish && currentChapter == 6) srcSurface = extraSurface; @@ -329,7 +329,7 @@ bool DrasculaEngine::textFitsCentered(char *text, int x) { //if (x > 160) // x = 315 - x; //return (halfLen <= x); - + // The commented out code above is what the original engine is doing. Instead of testing the // upper bound if x is greater than 160 it takes the complement to 315 and test only the lower // bounds. @@ -349,15 +349,15 @@ bool DrasculaEngine::textFitsCentered(char *text, int x) { void DrasculaEngine::centerText(const char *message, int textX, int textY) { char msg[200]; Common::strlcpy(msg, message, 200); - + // We make sure to have a width of at least 120 pixels by clipping the center. // In theory since the screen width is 320 I would expect something like this: // x = CLIP(x, 60, 260); // return (x - halfLen >= 0 && x + halfLen <= 319); - + // The engines does things differently though. It tries to clips text at 315 instead of 319. // See also the comment in textFitsCentered(). - + textX = CLIP(textX, 60, 255); // If the message fits on screen as-is, just print it here @@ -424,7 +424,7 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) { Common::strlcpy(messageLines[curLine++], messageCurLine, 41); } } - + // The original starts to draw (nbLines + 2) lines above textY. // Also clip to the screen height although the original does not do it. int y = textY - (curLine + 2) * CHAR_HEIGHT; diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index e99898da5a3..a1d7d615ea9 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -255,7 +255,7 @@ bool DrasculaEngine::loadGame(int slot) { if (!(in = _saveFileMan->openForLoading(saveFileName))) { error("missing savegame file %s", saveFileName.c_str()); } - + // If we currently are in room 102 while being attached below the pendulum // the character is invisible and some surface are temporarily used for other // things. Reset those before loading the savegame otherwise we may have some @@ -267,7 +267,7 @@ bool DrasculaEngine::loadGame(int slot) { loadPic(97, extraSurface); loadPic(99, backSurface); } - + loadMetaData(in, slot, true); Graphics::skipThumbnail(*in); @@ -300,7 +300,7 @@ bool DrasculaEngine::loadGame(int slot) { if (!sscanf(currentData, "%d.ald", &roomNum)) { error("Bad save format"); } - + // When loading room 102 while being attached below the pendulum Some variables // are not correctly set and can cause random crashes when calling enterRoom below. // The crash occurs in moveCharacters() when accessing factor_red[curY + curHeight]. @@ -309,10 +309,10 @@ bool DrasculaEngine::loadGame(int slot) { curY = 108; curWidth = curHeight = 0; } - + enterRoom(roomNum); selectVerb(kVerbNone); - + // When loading room 102 while being attached below the pendulum we // need to call activatePendulum() to properly initialized the scene. if (_roomNumber == 102 && flags[1] == 2) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index cc329b206ba..7ac2cc64061 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -379,10 +379,10 @@ void DrasculaEngine::talk(const char *said, const char *filename) { int y_mask_talk = 170; int face; - + // Fix bug #5903 DRASCULA-IT: Crash/graphic glitch at castle towers // Chapter 5 Room 45 is the castle tower part - // We use this variable as a condition below because at the castle towers we don't want to draw out the head + // We use this variable as a condition below because at the castle towers we don't want to draw out the head bool notTowers = !((currentChapter == 5) && (_roomNumber == 45)); if (currentChapter == 6) { @@ -488,7 +488,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { centerText(said, 160, 25); } } - + updateScreen(); updateEvents(); diff --git a/engines/gnap/fontdata.h b/engines/gnap/fontdata.h index 61128211fc2..0631d1d2144 100644 --- a/engines/gnap/fontdata.h +++ b/engines/gnap/fontdata.h @@ -32,7 +32,7 @@ struct FONT_CHAR_INFO { FONT_CHAR_INFO(byte width, uint16 offset) : _width(width), _offset(offset) {} }; -/* +/* ** Font data for DejaVu Sans 9pt */ diff --git a/engines/gnap/gamesys.h b/engines/gnap/gamesys.h index b9752bde06c..789789e5e70 100644 --- a/engines/gnap/gamesys.h +++ b/engines/gnap/gamesys.h @@ -168,7 +168,7 @@ public: int32 _gameSysClock, _lastUpdateClock; bool _animationsDone; - + Graphics::Surface *_backgroundSurface; Graphics::Surface *_frontSurface; diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 47fdaacf7a6..eaeb64a64de 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -1681,7 +1681,7 @@ void Script::o2_copyscreentobg() { // TODO: Parameter if (val) warning("o2_copyscreentobg: Param is %d", val); - + Graphics::Surface *screen = _vm->_system->lockScreen(); _vm->_graphicsMan->_background.copyFrom(screen->getSubArea(Common::Rect(0, 80, 640, 320))); _vm->_system->unlockScreen(); diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 4f0a0da777a..11a64114b50 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -379,7 +379,7 @@ void LabEngine::decIncInv(uint16 *curInv, bool decreaseFl) { newInv = 1; interfaceOff(); - + while (newInv && (newInv <= _numInv)) { if (_conditions->in(newInv) && !_inventory[newInv]._bitmapName.empty()) { _nextFileName = getInvName(newInv); diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp index 0a603f7691a..62e1f752026 100644 --- a/engines/lab/eventman.cpp +++ b/engines/lab/eventman.cpp @@ -151,7 +151,7 @@ IntuiMessage *EventManager::getMsg() { message._msgClass = kMessageButtonUp; message._code = lastButtonHit->_buttonId; message._qualifier = _keyPressed.flags; - + return &message; } else return nullptr; diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 68e6e63c1d9..58b7e253f18 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -267,7 +267,7 @@ void LabEngine::doActions(const ActionList &actionList) { // Puts a file into memory _graphics->loadPict(action->_messages[0]); break; - + case kActionLoadBitmap: error("Unused opcode kActionLoadBitmap has been called"); diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index 9cb35d10881..44d3caaf436 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -147,7 +147,7 @@ void Resource::readViews(uint16 roomNum) { Common::String Resource::translateFileName(const Common::String filename) { Common::String upperFilename; - // The DOS and Windows version aren't looking for the right file, + // The DOS and Windows version aren't looking for the right file, if (!filename.compareToIgnoreCase("P:ZigInt/BLK") && (_vm->getPlatform() != Common::kPlatformAmiga)) upperFilename = "P:ZigInt/ZIGINT.BLK"; else diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 7c3cb39931e..577384f99ac 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -397,7 +397,7 @@ void LabEngine::processMonitor(const Common::String &ntext, TextFont *monitorFon // Exit button return; } - + if (mouseX <= _utils->vgaScaleX(59)) { // Back button if (isInteractive) { diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index bae59f05cc0..3452f444803 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -51,7 +51,7 @@ ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) { vfxHeight = 0; _fxPalette = new byte[768]; - + _blendedPaletteStatus._active = false; _blendedPaletteStatus._palette = _blendedPaletteStatus._newPalette = nullptr; _blendedPaletteStatus._colorCount = 0; diff --git a/engines/mads/camera.cpp b/engines/mads/camera.cpp index c9b2f1429e3..eb5942842ae 100644 --- a/engines/mads/camera.cpp +++ b/engines/mads/camera.cpp @@ -148,7 +148,7 @@ bool Camera::camPan(int16 *picture_view, int16 *player_loc, int display_size, in if (_direction < 0) newTarget -= _distOffCenter; - else + else newTarget += _distOffCenter; newTarget = MAX(0, newTarget); diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp index 469aaedb810..e5c90768da9 100644 --- a/engines/mads/conversations.cpp +++ b/engines/mads/conversations.cpp @@ -72,7 +72,7 @@ void GameConversations::load(int id) { _conversations[slotIndex]._convId = id; // Load the conversation data - Common::String cnvFilename = Common::String::format("CONV%03d.CNV", id); + Common::String cnvFilename = Common::String::format("CONV%03d.CNV", id); _conversations[slotIndex]._data.load(cnvFilename); // Load the conversation's CND data @@ -371,7 +371,7 @@ void GameConversations::update(bool flag) { _personSpeaking = 0; executeEntry(_verbId); generateMessage(_runningConv->_cnd._messageList1, _runningConv->_cnd._messageList3); - + if (_heroTrigger && _popupVisible) { _vm->_game->_scene._action._activeAction._verbId = _verbId; _vm->_game->_trigger = _heroTrigger; @@ -438,7 +438,7 @@ void GameConversations::generateMessage(Common::Array &messageList, Common: // Create the new text dialog _dialog = new TextDialog(_vm, FONT_INTERFACE, - Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]), + Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]), portrait, _popupMaxLen[_personSpeaking]); // Add in the lines @@ -785,7 +785,7 @@ void ConversationConditionals::load(const Common::String &filename) { // **** Section: Imports ************************************************* int streamNum = 1; - + _importVariables.resize(importsCount); if (importsCount > 0) { convFile = convFileUnpacked.getItemStream(streamNum++); @@ -848,7 +848,7 @@ void DialogScript::load(Common::SeekableReadStream &s, uint startingOffset) { instructionOffsets[startingOffset + s.pos()] = size(); push_back(ScriptEntry()); ScriptEntry &se = (*this)[size() - 1]; - + // Load the instruction se.load(s); } diff --git a/engines/mads/conversations.h b/engines/mads/conversations.h index 7b7d3485ef4..57e89964a5d 100644 --- a/engines/mads/conversations.h +++ b/engines/mads/conversations.h @@ -172,7 +172,7 @@ struct ScriptEntry { DialogCommand _command; Conditional _conditionals[3]; - + // Extra parameters for different opcodes int _index; Common::Array _entries; @@ -338,7 +338,7 @@ private: int _personSpeaking; TextDialog *_dialog; bool _dialogAltFlag; - + /** * Returns the record for the specified conversation, if it's loaded */ @@ -435,7 +435,7 @@ public: * Set the hero trigger */ void setHeroTrigger(int val); - + /** * Set the interlocutor trigger */ @@ -473,7 +473,7 @@ public: void exportValue(int val); void reset(int id); - + /** * Handles updating the conversation display */ diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h index 8a0cc3575d2..d44b5f20228 100644 --- a/engines/mads/nebular/menu_nebular.h +++ b/engines/mads/nebular/menu_nebular.h @@ -35,7 +35,7 @@ class MADSEngine; namespace Nebular { -enum MADSGameAction { +enum MADSGameAction { START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT, SETS, EVOLVE }; diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 5f71c99a945..15dd44a4af1 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -194,7 +194,7 @@ ASound::ASound(Audio::Mixer *mixer, OPL::OPL *opl, const Common::String &filenam _channelData[i]._freqBase = 0; _channelData[i]._field6 = 0; } - + for (int i = 0; i < ADLIB_CHANNEL_COUNT; ++i) _channels[i]._owner = this; diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index 0940e795620..f1fe7eaf59f 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -320,11 +320,11 @@ void Player::activateTrigger() { _commandsAllowed |= _enableAtTarget; _enableAtTarget = false; - + if (_walkTrigger) { game._trigger = _walkTrigger; game._triggerMode = SEQUENCE_TRIGGER_DAEMON; - + if (game._triggerMode != SEQUENCE_TRIGGER_DAEMON) { action._activeAction = _walkTriggerAction; } diff --git a/engines/mads/screen.h b/engines/mads/screen.h index eeb15453f89..15436942fec 100644 --- a/engines/mads/screen.h +++ b/engines/mads/screen.h @@ -254,7 +254,7 @@ public: /** * Return the current drawing/clip area */ - const Common::Rect getClipBounds() const { + const Common::Rect getClipBounds() const { const Common::Point pt = getOffsetFromOwner(); return Common::Rect(pt.x, pt.y, pt.x + this->w, pt.y + this->h); } diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 204f71fe43c..adde5fc67c5 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -339,7 +339,7 @@ UserInterface::UserInterface(MADSEngine *vm) : _vm(vm), _dirtyAreas(vm), Common::fill(&_categoryIndexes[0], &_categoryIndexes[7], 0); // Map the user interface to the bottom of the game's screen surface - create(*_vm->_screen, Common::Rect(0, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, + create(*_vm->_screen, Common::Rect(0, MADS_SCENE_HEIGHT, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT)); _surface.create(MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h index 99db6419485..443f2fb67e5 100644 --- a/engines/mohawk/dialogs.h +++ b/engines/mohawk/dialogs.h @@ -81,7 +81,7 @@ public: virtual void open() override; virtual void reflowLayout() override; virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override; - + int getLoadSlot() const {return _loadSlot;} private: @@ -92,7 +92,7 @@ private: GUI::SaveLoadChooser *_loadDialog; GUI::SaveLoadChooser *_saveDialog; - + int _loadSlot; void save(); diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 579e3792b34..6ee18d1576e 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -3889,7 +3889,7 @@ bool LBMiniGameItem::togglePlaying(bool playing, bool restart) { // Go back to the menu if requested, otherwise go to the requested page if (returnToMenu) _vm->addNotifyEvent(NotifyEvent(kLBNotifyGoToControls, 1)); - else + else _vm->addNotifyEvent(NotifyEvent(kLBNotifyChangePage, destPage)); return false; diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp index ffab55fa1fb..f9ba6a42fa4 100644 --- a/engines/mohawk/myst_stacks/myst.cpp +++ b/engines/mohawk/myst_stacks/myst.cpp @@ -3609,7 +3609,7 @@ void Myst::gullsFly2_run() { VideoHandle handle = _vm->_video->playMovie(_vm->wrapMovieFilename(gulls[video], kMystStack)); if (!handle) error("Failed to open gulls movie"); - + handle->moveTo(424, 0); _gullsNextTime = time + _vm->_rnd->getRandomNumber(16667) + 13334; } diff --git a/engines/mohawk/riven_sound.h b/engines/mohawk/riven_sound.h index f673d1ee3fa..c79ccc3e3af 100644 --- a/engines/mohawk/riven_sound.h +++ b/engines/mohawk/riven_sound.h @@ -70,7 +70,7 @@ public: /** * Play an effect sound - * + * * @param id Sound ID in the stack * @param volume Playback volume, between 0 and 255 * @param playOnDraw Start playing when the current card is drawn instead of immediatly diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index d0edab9def8..e2b09b6afde 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -346,7 +346,7 @@ private: // Utility functions for managing entries VideoEntryPtr open(uint16 id); VideoEntryPtr open(const Common::String &fileName); - + VideoList::iterator findEntry(VideoEntryPtr ptr); void removeEntry(VideoEntryPtr ptr); diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 97f219b46e7..34109fff39b 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -675,7 +675,7 @@ bool Console::cmdRegisters(int argc, const char **argv) { bool Console::parseResourceNumber36(const char *userParameter, uint16 &resourceNumber, uint32 &resourceTuple) { int userParameterLen = strlen(userParameter); - + if (userParameterLen != 10) { debugPrintf("Audio36/Sync36 resource numbers must be specified as RRRNNVVCCS\n"); debugPrintf("where RRR is the resource number/map\n"); @@ -760,7 +760,7 @@ void Console::cmdDiskDumpWorker(ResourceType resourceType, int resourceNumber, u ResourceId resourceId; Resource *resource = NULL; char outFileName[50]; - + switch (resourceType) { case kResourceTypeAudio36: case kResourceTypeSync36: { @@ -877,7 +877,7 @@ bool Console::cmdList(int argc, const char **argv) { currentMap = map; displayCount = 0; } - + if (displayCount % 3 == 0) debugPrintf(" "); @@ -2946,7 +2946,7 @@ bool Console::cmdScriptObjects(int argc, const char **argv) { debugPrintf("