diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/actor.cpp | 30 | ||||
-rw-r--r-- | engines/scumm/actor.h | 2 | ||||
-rw-r--r-- | engines/scumm/charset.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/charset.h | 4 | ||||
-rw-r--r-- | engines/scumm/costume.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/cursor.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/dialogs.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/logic/soccer.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/object.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/player_apple2.cpp | 68 | ||||
-rw-r--r-- | engines/scumm/player_apple2.h | 10 | ||||
-rw-r--r-- | engines/scumm/player_towns.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/player_v2cms.cpp | 64 | ||||
-rw-r--r-- | engines/scumm/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/script_v0.cpp | 12 | ||||
-rw-r--r-- | engines/scumm/script_v2.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/script_v5.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 2 | ||||
-rw-r--r-- | engines/scumm/sound.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/verbs.cpp | 4 |
22 files changed, 122 insertions, 122 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index b8722b6963..0c375efcdd 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -573,19 +573,19 @@ bool Actor_v2::checkWalkboxesHaveDirectPath(Common::Point &foundPath) { return false; } -bool Actor_v0::intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End, - const Common::Point &line2Start, const Common::Point &line2End, Common::Point &result) +bool Actor_v0::intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End, + const Common::Point &line2Start, const Common::Point &line2End, Common::Point &result) { const Common::Point v1 = line1End - line1Start; // line1(n1) = line1Start + n1 * v1 const Common::Point v2 = line2End - line2Start; // line2(n2) = line2Start + n2 * v2 - + double det = v2.x * v1.y - v1.x * v2.y; if (det == 0) return false; - double n1 = ((double)v2.x * (line2Start.y - line1Start.y) - + double n1 = ((double)v2.x * (line2Start.y - line1Start.y) - (double)v2.y * (line2Start.x - line1Start.x)) / det; - double n2 = ((double)v1.x * (line2Start.y - line1Start.y) - + double n2 = ((double)v1.x * (line2Start.y - line1Start.y) - (double)v1.y * (line2Start.x - line1Start.x)) / det; // both coefficients have to be in [0, 1], otherwise the intersection is @@ -599,16 +599,16 @@ bool Actor_v0::intersectLineSegments(const Common::Point &line1Start, const Comm } /* - * MM v0 allows the actor to walk in a direct line between boxes to the target + * MM v0 allows the actor to walk in a direct line between boxes to the target * if actor and target share a horizontal or vertical corridor. - * If such a corridor is found the actor is not forced to go horizontally or + * If such a corridor is found the actor is not forced to go horizontally or * vertically from one box to the next but can also walk diagonally. * - * Note: the original v0 interpreter sets the target destination for diagonal + * Note: the original v0 interpreter sets the target destination for diagonal * walking only once and then rechecks whenever the actor reaches a new box if the - * walk destination is still suitable for the current box. - * ScummVM does not perform such a check, so it is possible to leave the walkboxes - * in some cases, for example L-shaped rooms like the swimming pool (actor walks over water) + * walk destination is still suitable for the current box. + * ScummVM does not perform such a check, so it is possible to leave the walkboxes + * in some cases, for example L-shaped rooms like the swimming pool (actor walks over water) * or the medical room (actor walks over examination table). * To solve this we intersect the new walk destination with the actor's walkbox borders, * so a recheck is done when the actor leaves his box. This is done by the @@ -992,7 +992,7 @@ void Actor_v0::setDirection(int direction) { res = 7; // Face Camera break; } - + _animFrameRepeat = -1; animateActor(res); if (_moving) @@ -1408,7 +1408,7 @@ void Actor::showActor() { if (_vm->_game.version == 0) { Actor_v0 *a = ((Actor_v0 *)this); - + a->_costCommand = a->_costCommandNew = 0xFF; for (int i = 0; i < 8; ++i) { @@ -2056,7 +2056,7 @@ void Actor_v0::animateCostume() { void Actor_v0::speakCheck() { if (v0ActorTalkArray[_number] & 0x80) return; - + int cmd = newDirToOldDir(_facing); if (_speaking & 0x80) @@ -2884,7 +2884,7 @@ void Actor_v0::animateActor(int anim) { _costCommandNew = anim; _vm->_costumeLoader->costumeDecodeData(this, 0, 0); - + if (dir == -1) return; diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h index 0ed239d005..a733fdb4ed 100644 --- a/engines/scumm/actor.h +++ b/engines/scumm/actor.h @@ -377,7 +377,7 @@ public: virtual void saveLoadWithSerializer(Serializer *ser); protected: - bool intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End, + bool intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End, const Common::Point &line2Start, const Common::Point &line2End, Common::Point &result); virtual bool checkWalkboxesHaveDirectPath(Common::Point &foundPath); }; diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 4064853b6b..9ae75b6683 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -69,7 +69,7 @@ void ScummEngine::loadCJKFont() { _cjkFont->setDrawingMode(Graphics::FontSJIS::kShadowMode); _2byteWidth = _2byteHeight = 12; - _useCJKMode = true; + _useCJKMode = true; #endif } else if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD && _language == Common::JA_JPN) { int numChar = 1413; @@ -499,7 +499,7 @@ int CharsetRendererV3::getCharWidth(uint16 chr) { if (_vm->_useCJKMode && (chr & 0x80)) spacing = _vm->_2byteWidth / 2; - + if (!spacing) spacing = *(_widthTable + chr); @@ -644,7 +644,7 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) { drawBits1(*vs, _left + vs->xstart, drawTop, charPtr, drawTop, origWidth, origHeight); else drawBits1(_vm->_textSurface, _left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier, charPtr, drawTop, origWidth, origHeight); - + if (is2byte) { origWidth /= _vm->_textSurfaceMultiplier; height /= _vm->_textSurfaceMultiplier; @@ -1399,7 +1399,7 @@ void CharsetRendererTownsClassic::drawBitsN(const Graphics::Surface&, byte *dst, _vm->_cjkFont->drawChar(_vm->_textSurface, _sjisCurChar, _left * _vm->_textSurfaceMultiplier, (_top - _vm->_screenTop) * _vm->_textSurfaceMultiplier, _vm->_townsCharsetColorMap[1], _shadowColor); return; } - + bool scale2x = (_vm->_textSurfaceMultiplier == 2); dst = (byte *)_vm->_textSurface.pixels + (_top - _vm->_screenTop) * _vm->_textSurface.pitch * _vm->_textSurfaceMultiplier + _left * _vm->_textSurfaceMultiplier; diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h index b8f1d84045..1c1df51921 100644 --- a/engines/scumm/charset.h +++ b/engines/scumm/charset.h @@ -112,7 +112,7 @@ public: class CharsetRendererClassic : public CharsetRendererCommon { protected: virtual void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height); - void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask); + void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask); virtual bool prepareDraw(uint16 chr); int _width, _height, _origWidth, _origHeight; @@ -195,7 +195,7 @@ public: int getCharWidth(uint16 chr); int getFontHeight(); - + private: void enableShadow(bool enable); void drawBits1(Graphics::Surface &dest, int x, int y, const byte *src, int drawTop, int width, int height); diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index 3f89bc9611..4ebdd00fdc 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -1188,7 +1188,7 @@ byte V0CostumeRenderer::drawLimb(const Actor *a, int limb) { _draw_top = 200; _draw_bottom = 0; } - + // Invalid current position? if (a->_cost.curpos[limb] == 0xFFFF) return 0; @@ -1377,7 +1377,7 @@ byte V0CostumeLoader::increaseAnim(Actor *a, int limb) { // Reset the comstume command a0->_costCommandNew = 0xFF; a0->_costCommand = 0xFF; - + // Set the frame/start to invalid a0->_cost.frame[limb] = 0xFFFF; a0->_cost.start[limb] = 0xFFFF; diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 88681898f5..269ae9e10a 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -180,7 +180,7 @@ void ScummEngine_v70he::setDefaultCursor() { 0xff, 0xff, 0xff, 0, 0, 0, }; - + memset(_grabbedCursor, 5, sizeof(_grabbedCursor)); _cursor.hotspotX = _cursor.hotspotY = 2; diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index edcf2e6fea..dc5acbdb7d 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -382,7 +382,7 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) { DebugPrintf("Actor[%d].costume = %d\n", actnum, a->_costume); } } else if (!strcmp(argv[2], "name")) { - DebugPrintf("Name of actor %d: %s\n", actnum, + DebugPrintf("Name of actor %d: %s\n", actnum, _vm->getObjOrActorName(_vm->actorToObj(actnum))); } else if (!strcmp(argv[2], "condmask")) { if (argc > 3) { diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 0e531daf73..945c5b6611 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -180,7 +180,7 @@ static const ResString string_map_table_v345[] = { // "Moechten Sie wirklich neu starten? (J/N)J" // Will react to J as 'Yes' {5, _s("Are you sure you want to restart? (Y/N)")}, - // I18N: you may specify 'Yes' symbol at the end of the line. See previous comment + // I18N: you may specify 'Yes' symbol at the end of the line. See previous comment {6, _s("Are you sure you want to quit? (Y/N)")}, // Added in SCUMM4 diff --git a/engines/scumm/he/logic/soccer.cpp b/engines/scumm/he/logic/soccer.cpp index 05f377a736..2b29f93173 100644 --- a/engines/scumm/he/logic/soccer.cpp +++ b/engines/scumm/he/logic/soccer.cpp @@ -303,7 +303,7 @@ int LogicHEsoccer::op_1008(int outArray, int srcX, int srcY, int srcZ, int vecX, putInArray(outArray, segmentsSoFar, 5, vecX); putInArray(outArray, segmentsSoFar, 6, vecY); putInArray(outArray, segmentsSoFar++, 7, vecZ); - } + } } else { srcY = 0; int thisVecX = vecX; @@ -628,7 +628,7 @@ int LogicHEsoccer::op_1014(int32 srcX, int32 srcY, int32 srcZ, int32 velX, int32 adjustedVelZ = ((double)srcZ - 3869.0) / 100.0; break; } - + int foundCollision = 0; // work out which collision objects we might collide with (if any) diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 399cd91324..77c75c4ad6 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -335,7 +335,7 @@ int ScummEngine::whereIsObject(int object) const { return WIO_NOT_FOUND; if ((_game.version != 0 || OBJECT_V0_TYPE(object) == 0) && - _objectOwnerTable[object] != OF_OWNER_ROOM) + _objectOwnerTable[object] != OF_OWNER_ROOM) { for (i = 0; i < _numInventory; i++) if (_inventory[i] == object) @@ -1225,7 +1225,7 @@ byte *ScummEngine::getOBCDFromObject(int obj, bool v0CheckInventory) { byte *ptr; if ((_game.version != 0 || OBJECT_V0_TYPE(obj) == 0) && - _objectOwnerTable[obj] != OF_OWNER_ROOM) + _objectOwnerTable[obj] != OF_OWNER_ROOM) { if (_game.version == 0 && !v0CheckInventory) return 0; diff --git a/engines/scumm/player_apple2.cpp b/engines/scumm/player_apple2.cpp index a8e150caa9..58e4f78a94 100644 --- a/engines/scumm/player_apple2.cpp +++ b/engines/scumm/player_apple2.cpp @@ -61,8 +61,8 @@ public: private: void _update(int interval /*a*/, int count /*y*/) { // D076 - assert(interval > 0); // 0 == 256? - assert(count > 0); // 0 == 256? + assert(interval > 0); // 0 == 256? + assert(count > 0); // 0 == 256? for (; count >= 0; --count) { _player->speakerToggle(); @@ -99,7 +99,7 @@ public: ++_pos; return false; - } + } return true; } @@ -112,7 +112,7 @@ private: assert(interval > 0); // 0 == 256? int a = (interval >> 3) + count; - for (int y = a; y > 0; --y) { + for (int y = a; y > 0; --y) { _player->generateSamples(1292 - 5*interval); _player->speakerToggle(); @@ -206,7 +206,7 @@ private: _bitmask1 = 0x3; _bitmask2 = 0x3; - + _updateInterval2 = param0; if (_updateInterval2 == 0) _bitmask2 = 0x0; @@ -234,9 +234,9 @@ private: if (_updateRemain2 == 0) { _updateRemain2 = _updateInterval2; - // use only first voice's data (bitmask1) if both voices are triggered + // use only first voice's data (bitmask1) if both voices are triggered if (_updateRemain1 != 0) { - _speakerShiftReg ^= _bitmask2; + _speakerShiftReg ^= _bitmask2; } } @@ -256,7 +256,7 @@ private: protected: const byte *_params; - + byte _updateRemain1; byte _updateRemain2; @@ -309,7 +309,7 @@ private: for (int i = count; i > 0; --i) { _player->generateSamples(10 + 5*interval); _player->speakerToggle(); - + _player->generateSamples(5 + 5*interval); _player->speakerToggle(); } @@ -332,20 +332,20 @@ private: // LD000[loc] ^ LD00A[loc] const byte AppleII_SoundFunction5_Noise::_noiseTable[256] = { - 0x65, 0x1b, 0xda, 0x11, 0x61, 0xe5, 0x77, 0x57, 0x92, 0xc8, 0x51, 0x1c, 0xd4, 0x91, 0x62, 0x63, - 0x00, 0x38, 0x57, 0xd5, 0x18, 0xd8, 0xdc, 0x40, 0x03, 0x86, 0xd3, 0x2f, 0x10, 0x11, 0xd8, 0x3c, - 0xbe, 0x00, 0x19, 0xc5, 0xd2, 0xc3, 0xca, 0x34, 0x00, 0x28, 0xbf, 0xb9, 0x18, 0x20, 0x01, 0xcc, - 0xda, 0x08, 0xbc, 0x75, 0x7c, 0xb0, 0x8d, 0xe0, 0x09, 0x18, 0xbf, 0x5d, 0xe9, 0x8c, 0x75, 0x64, + 0x65, 0x1b, 0xda, 0x11, 0x61, 0xe5, 0x77, 0x57, 0x92, 0xc8, 0x51, 0x1c, 0xd4, 0x91, 0x62, 0x63, + 0x00, 0x38, 0x57, 0xd5, 0x18, 0xd8, 0xdc, 0x40, 0x03, 0x86, 0xd3, 0x2f, 0x10, 0x11, 0xd8, 0x3c, + 0xbe, 0x00, 0x19, 0xc5, 0xd2, 0xc3, 0xca, 0x34, 0x00, 0x28, 0xbf, 0xb9, 0x18, 0x20, 0x01, 0xcc, + 0xda, 0x08, 0xbc, 0x75, 0x7c, 0xb0, 0x8d, 0xe0, 0x09, 0x18, 0xbf, 0x5d, 0xe9, 0x8c, 0x75, 0x64, 0xe5, 0xb5, 0x5d, 0xe0, 0xb7, 0x7d, 0xe9, 0x8c, 0x55, 0x65, 0xc5, 0xb5, 0x5d, 0xd8, 0x09, 0x0d, - 0x64, 0xf0, 0xf0, 0x08, 0x63, 0x03, 0x00, 0x55, 0x35, 0xc0, 0x00, 0x20, 0x74, 0xa5, 0x1e, 0xe3, - 0x00, 0x06, 0x3c, 0x52, 0xd1, 0x70, 0xd0, 0x57, 0x02, 0xf0, 0x00, 0xb6, 0xfc, 0x02, 0x11, 0x9a, - 0x3b, 0xc8, 0x38, 0xdf, 0x1a, 0xb0, 0xd1, 0xb8, 0xd0, 0x18, 0x8a, 0x4a, 0xea, 0x1b, 0x12, 0x5d, - 0x29, 0x58, 0xd8, 0x43, 0xb8, 0x2d, 0xd2, 0x61, 0x10, 0x3c, 0x0c, 0x5d, 0x1b, 0x61, 0x10, 0x3c, + 0x64, 0xf0, 0xf0, 0x08, 0x63, 0x03, 0x00, 0x55, 0x35, 0xc0, 0x00, 0x20, 0x74, 0xa5, 0x1e, 0xe3, + 0x00, 0x06, 0x3c, 0x52, 0xd1, 0x70, 0xd0, 0x57, 0x02, 0xf0, 0x00, 0xb6, 0xfc, 0x02, 0x11, 0x9a, + 0x3b, 0xc8, 0x38, 0xdf, 0x1a, 0xb0, 0xd1, 0xb8, 0xd0, 0x18, 0x8a, 0x4a, 0xea, 0x1b, 0x12, 0x5d, + 0x29, 0x58, 0xd8, 0x43, 0xb8, 0x2d, 0xd2, 0x61, 0x10, 0x3c, 0x0c, 0x5d, 0x1b, 0x61, 0x10, 0x3c, 0x0a, 0x5d, 0x1d, 0x61, 0x10, 0x3c, 0x0b, 0x19, 0x88, 0x21, 0xc0, 0x21, 0x07, 0x00, 0x65, 0x62, - 0x08, 0xe9, 0x36, 0x40, 0x20, 0x41, 0x06, 0x00, 0x20, 0x00, 0x00, 0xed, 0xa3, 0x00, 0x88, 0x06, - 0x98, 0x01, 0x5d, 0x7f, 0x02, 0x1d, 0x78, 0x03, 0x60, 0xcb, 0x3a, 0x01, 0xbd, 0x78, 0x02, 0x5d, - 0x7e, 0x03, 0x1d, 0xf5, 0xa6, 0x40, 0x81, 0xb4, 0xd0, 0x8d, 0xd3, 0xd0, 0x6d, 0xd5, 0x61, 0x48, - 0x61, 0x4d, 0xd1, 0xc8, 0xb1, 0xd8, 0x69, 0xff, 0x61, 0xd9, 0xed, 0xa0, 0xfe, 0x19, 0x91, 0x37, + 0x08, 0xe9, 0x36, 0x40, 0x20, 0x41, 0x06, 0x00, 0x20, 0x00, 0x00, 0xed, 0xa3, 0x00, 0x88, 0x06, + 0x98, 0x01, 0x5d, 0x7f, 0x02, 0x1d, 0x78, 0x03, 0x60, 0xcb, 0x3a, 0x01, 0xbd, 0x78, 0x02, 0x5d, + 0x7e, 0x03, 0x1d, 0xf5, 0xa6, 0x40, 0x81, 0xb4, 0xd0, 0x8d, 0xd3, 0xd0, 0x6d, 0xd5, 0x61, 0x48, + 0x61, 0x4d, 0xd1, 0xc8, 0xb1, 0xd8, 0x69, 0xff, 0x61, 0xd9, 0xed, 0xa0, 0xfe, 0x19, 0x91, 0x37, 0x19, 0x37, 0x00, 0xf1, 0x00, 0x01, 0x1f, 0x00, 0xad, 0xc1, 0x01, 0x01, 0x2e, 0x00, 0x40, 0xc6, 0x7a, 0x9b, 0x95, 0x43, 0xfc, 0x18, 0xd2, 0x9e, 0x2a, 0x5a, 0x4b, 0x2a, 0xb6, 0x87, 0x30, 0x6c }; @@ -394,20 +394,20 @@ void Player_AppleII::startSound(int nr) { case 0: // empty (nothing to play) resetState(); return; - case 1: - _soundFunc = new AppleII_SoundFunction1_FreqUpDown(); + case 1: + _soundFunc = new AppleII_SoundFunction1_FreqUpDown(); break; - case 2: - _soundFunc = new AppleII_SoundFunction2_SymmetricWave(); + case 2: + _soundFunc = new AppleII_SoundFunction2_SymmetricWave(); break; - case 3: - _soundFunc = new AppleII_SoundFunction3_AsymmetricWave(); + case 3: + _soundFunc = new AppleII_SoundFunction3_AsymmetricWave(); break; - case 4: - _soundFunc = new AppleII_SoundFunction4_Polyphone(); + case 4: + _soundFunc = new AppleII_SoundFunction4_Polyphone(); break; - case 5: - _soundFunc = new AppleII_SoundFunction5_Noise(); + case 5: + _soundFunc = new AppleII_SoundFunction5_Noise(); break; } _soundFunc->init(this, _params); @@ -484,7 +484,7 @@ int Player_AppleII::readBuffer(int16 *buffer, const int numSamples) { // toggle speaker on/off void Player_AppleII::speakerToggle() { - _speakerState ^= 0x1; + _speakerState ^= 0x1; } void Player_AppleII::generateSamples(int cycles) { @@ -492,8 +492,8 @@ void Player_AppleII::generateSamples(int cycles) { } void Player_AppleII::wait(int interval, int count /*y*/) { - assert(count > 0); // 0 == 256? - assert(interval > 0); // 0 == 256? + assert(count > 0); // 0 == 256? + assert(interval > 0); // 0 == 256? generateSamples(11 + count*(8 + 5 * interval)); } diff --git a/engines/scumm/player_apple2.h b/engines/scumm/player_apple2.h index b4a7d409fb..e1ec9d8946 100644 --- a/engines/scumm/player_apple2.h +++ b/engines/scumm/player_apple2.h @@ -36,7 +36,7 @@ namespace Scumm { class ScummEngine; /* - * Optimized for use with periodical read/write phases when the buffer + * Optimized for use with periodical read/write phases when the buffer * is filled in a write phase and completely read in a read phase. * The growing strategy is optimized for repeated small (e.g. 2 bytes) * single writes resulting in large buffers @@ -133,7 +133,7 @@ static const double APPLEII_CPU_CLOCK = 1020484.5; // ~ 1.02 MHz /* * Converts the 1-bit speaker state values into audio samples. - * This is done by aggregation of the speaker states at each + * This is done by aggregation of the speaker states at each * CPU cycle in a sampling period into an audio sample. */ class SampleConverter { @@ -144,7 +144,7 @@ private: } public: - SampleConverter() : + SampleConverter() : _cyclesPerSampleFP(0), _missingCyclesFP(0), _sampleCyclesSumFP(0), @@ -156,7 +156,7 @@ public: void reset() { _missingCyclesFP = 0; _sampleCyclesSumFP = 0; - _buffer.clear(); + _buffer.clear(); } uint32 availableSize() const { @@ -245,7 +245,7 @@ public: virtual void setMusicVolume(int vol) { _sampleConverter.setMusicVolume(vol); } void setSampleRate(int rate) { _sampleRate = rate; - _sampleConverter.setSampleRate(rate); + _sampleConverter.setSampleRate(rate); } virtual void startSound(int sound); virtual void stopSound(int sound); diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp index 2588026e59..33e3e40e39 100644 --- a/engines/scumm/player_towns.cpp +++ b/engines/scumm/player_towns.cpp @@ -87,7 +87,7 @@ void Player_Towns::restoreAfterLoad() { if (!_v2) restoredSounds.push_back(_pcmCurrentSound[i].index); - + uint8 *ptr = _vm->getResourceAddress(rtSound, _pcmCurrentSound[i].index); if (!ptr) continue; diff --git a/engines/scumm/player_v2cms.cpp b/engines/scumm/player_v2cms.cpp index d4b21774ed..c1242e0645 100644 --- a/engines/scumm/player_v2cms.cpp +++ b/engines/scumm/player_v2cms.cpp @@ -718,38 +718,38 @@ void Player_V2CMS::playMusicChips(const MusicChip *table) { } const Player_V2CMS::MidiNote Player_V2CMS::_midiNotes[132] = { - { 3, 0 }, { 31, 0 }, { 58, 0 }, { 83, 0 }, - { 107, 0 }, { 130, 0 }, { 151, 0 }, { 172, 0 }, - { 191, 0 }, { 209, 0 }, { 226, 0 }, { 242, 0 }, - { 3, 1 }, { 31, 1 }, { 58, 1 }, { 83, 1 }, - { 107, 1 }, { 130, 1 }, { 151, 1 }, { 172, 1 }, - { 191, 1 }, { 209, 1 }, { 226, 1 }, { 242, 1 }, - { 3, 2 }, { 31, 2 }, { 58, 2 }, { 83, 2 }, - { 107, 2 }, { 130, 2 }, { 151, 2 }, { 172, 2 }, - { 191, 2 }, { 209, 2 }, { 226, 2 }, { 242, 2 }, - { 3, 3 }, { 31, 3 }, { 58, 3 }, { 83, 3 }, - { 107, 3 }, { 130, 3 }, { 151, 3 }, { 172, 3 }, - { 191, 3 }, { 209, 3 }, { 226, 3 }, { 242, 3 }, - { 3, 4 }, { 31, 4 }, { 58, 4 }, { 83, 4 }, - { 107, 4 }, { 130, 4 }, { 151, 4 }, { 172, 4 }, - { 191, 4 }, { 209, 4 }, { 226, 4 }, { 242, 4 }, - { 3, 5 }, { 31, 5 }, { 58, 5 }, { 83, 5 }, - { 107, 5 }, { 130, 5 }, { 151, 5 }, { 172, 5 }, - { 191, 5 }, { 209, 5 }, { 226, 5 }, { 242, 5 }, - { 3, 6 }, { 31, 6 }, { 58, 6 }, { 83, 6 }, - { 107, 6 }, { 130, 6 }, { 151, 6 }, { 172, 6 }, - { 191, 6 }, { 209, 6 }, { 226, 6 }, { 242, 6 }, - { 3, 7 }, { 31, 7 }, { 58, 7 }, { 83, 7 }, - { 107, 7 }, { 130, 7 }, { 151, 7 }, { 172, 7 }, - { 191, 7 }, { 209, 7 }, { 226, 7 }, { 242, 7 }, - { 3, 8 }, { 31, 8 }, { 58, 8 }, { 83, 8 }, - { 107, 8 }, { 130, 8 }, { 151, 8 }, { 172, 8 }, - { 191, 8 }, { 209, 8 }, { 226, 8 }, { 242, 8 }, - { 3, 9 }, { 31, 9 }, { 58, 9 }, { 83, 9 }, - { 107, 9 }, { 130, 9 }, { 151, 9 }, { 172, 9 }, - { 191, 9 }, { 209, 9 }, { 226, 9 }, { 242, 9 }, - { 3, 10 }, { 31, 10 }, { 58, 10 }, { 83, 10 }, - { 107, 10 }, { 130, 10 }, { 151, 10 }, { 172, 10 }, + { 3, 0 }, { 31, 0 }, { 58, 0 }, { 83, 0 }, + { 107, 0 }, { 130, 0 }, { 151, 0 }, { 172, 0 }, + { 191, 0 }, { 209, 0 }, { 226, 0 }, { 242, 0 }, + { 3, 1 }, { 31, 1 }, { 58, 1 }, { 83, 1 }, + { 107, 1 }, { 130, 1 }, { 151, 1 }, { 172, 1 }, + { 191, 1 }, { 209, 1 }, { 226, 1 }, { 242, 1 }, + { 3, 2 }, { 31, 2 }, { 58, 2 }, { 83, 2 }, + { 107, 2 }, { 130, 2 }, { 151, 2 }, { 172, 2 }, + { 191, 2 }, { 209, 2 }, { 226, 2 }, { 242, 2 }, + { 3, 3 }, { 31, 3 }, { 58, 3 }, { 83, 3 }, + { 107, 3 }, { 130, 3 }, { 151, 3 }, { 172, 3 }, + { 191, 3 }, { 209, 3 }, { 226, 3 }, { 242, 3 }, + { 3, 4 }, { 31, 4 }, { 58, 4 }, { 83, 4 }, + { 107, 4 }, { 130, 4 }, { 151, 4 }, { 172, 4 }, + { 191, 4 }, { 209, 4 }, { 226, 4 }, { 242, 4 }, + { 3, 5 }, { 31, 5 }, { 58, 5 }, { 83, 5 }, + { 107, 5 }, { 130, 5 }, { 151, 5 }, { 172, 5 }, + { 191, 5 }, { 209, 5 }, { 226, 5 }, { 242, 5 }, + { 3, 6 }, { 31, 6 }, { 58, 6 }, { 83, 6 }, + { 107, 6 }, { 130, 6 }, { 151, 6 }, { 172, 6 }, + { 191, 6 }, { 209, 6 }, { 226, 6 }, { 242, 6 }, + { 3, 7 }, { 31, 7 }, { 58, 7 }, { 83, 7 }, + { 107, 7 }, { 130, 7 }, { 151, 7 }, { 172, 7 }, + { 191, 7 }, { 209, 7 }, { 226, 7 }, { 242, 7 }, + { 3, 8 }, { 31, 8 }, { 58, 8 }, { 83, 8 }, + { 107, 8 }, { 130, 8 }, { 151, 8 }, { 172, 8 }, + { 191, 8 }, { 209, 8 }, { 226, 8 }, { 242, 8 }, + { 3, 9 }, { 31, 9 }, { 58, 9 }, { 83, 9 }, + { 107, 9 }, { 130, 9 }, { 151, 9 }, { 172, 9 }, + { 191, 9 }, { 209, 9 }, { 226, 9 }, { 242, 9 }, + { 3, 10 }, { 31, 10 }, { 58, 10 }, { 83, 10 }, + { 107, 10 }, { 130, 10 }, { 151, 10 }, { 172, 10 }, { 191, 10 }, { 209, 10 }, { 226, 10 }, { 242, 10 } }; diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index beac077fd1..72896e097a 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -1298,7 +1298,7 @@ void ScummEngine::saveOrLoad(Serializer *s) { s->saveLoadArrayOf(_16BitPalette, 512, sizeof(_16BitPalette[0]), sleUint16); } - + // FM-Towns specific (extra palette data, color cycle data, etc.) // In earlier save game versions (below 87) the FM-Towns specific data would get saved (and loaded) even in non FM-Towns games. // This would cause an unnecessary save file incompatibility between DS (which uses the DISABLE_TOWNS_DUAL_LAYER_MODE setting) diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp index 44b77f1d18..361287d29f 100644 --- a/engines/scumm/script_v0.cpp +++ b/engines/scumm/script_v0.cpp @@ -602,7 +602,7 @@ void ScummEngine_v0::o_loadRoomWithEgo() { x = r.x; y = r.y; a->putActor(x, y, _currentRoom); - + camera._dest.x = camera._cur.x = a->getPos().x; setCameraAt(a->getPos().x, a->getPos().y); setCameraFollows(a); @@ -635,18 +635,18 @@ void ScummEngine_v0::setMode(byte mode) { case kModeCutscene: _redrawSentenceLine = false; // Note: do not change freeze state here - state = USERSTATE_SET_IFACE | + state = USERSTATE_SET_IFACE | USERSTATE_SET_CURSOR; break; case kModeKeypad: _redrawSentenceLine = false; - state = USERSTATE_SET_IFACE | + state = USERSTATE_SET_IFACE | USERSTATE_SET_CURSOR | USERSTATE_CURSOR_ON | USERSTATE_SET_FREEZE | USERSTATE_FREEZE_ON; break; case kModeNormal: case kModeNoNewKid: - state = USERSTATE_SET_IFACE | USERSTATE_IFACE_ALL | + state = USERSTATE_SET_IFACE | USERSTATE_IFACE_ALL | USERSTATE_SET_CURSOR | USERSTATE_CURSOR_ON | USERSTATE_SET_FREEZE; break; @@ -688,7 +688,7 @@ void ScummEngine_v0::o_animateActor() { Actor_v0 *a = (Actor_v0*) derefActor(act, "o_animateActor"); a->_animFrameRepeat = repeat; - + switch (anim) { case 0xFE: @@ -700,7 +700,7 @@ void ScummEngine_v0::o_animateActor() { // 0x69A3 a->_speaking = 0x00; return; - + case 0xFF: a->stopActorMoving(); return; diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp index ce162b4a6a..96d422d5bb 100644 --- a/engines/scumm/script_v2.cpp +++ b/engines/scumm/script_v2.cpp @@ -993,7 +993,7 @@ void ScummEngine_v2::o2_drawSentence() { const byte *temp; int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB), 0); - if (!((_userState & USERSTATE_IFACE_SENTENCE) || + if (!((_userState & USERSTATE_IFACE_SENTENCE) || (_game.platform == Common::kPlatformNES && (_userState & USERSTATE_IFACE_ALL)))) return; @@ -1486,8 +1486,8 @@ void ScummEngine_v2::o2_cutscene() { VAR(VAR_CURSORSTATE) = 200; // Hide inventory, freeze scripts, hide cursor - setUserState(USERSTATE_SET_IFACE | - USERSTATE_SET_CURSOR | + setUserState(USERSTATE_SET_IFACE | + USERSTATE_SET_CURSOR | USERSTATE_SET_FREEZE | USERSTATE_FREEZE_ON); _sentenceNum = 0; diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index a5591b701f..0bf51a2816 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -1097,7 +1097,7 @@ void ScummEngine_v5::o5_getDist() { int r; getResultPos(); - + o1 = getVarOrDirectWord(PARAM_1); o2 = getVarOrDirectWord(PARAM_2); diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index c9c9e991e4..2c79fb8de0 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1986,11 +1986,11 @@ Common::Error ScummEngine::go() { if (delta < 1) // Ensure we don't get into an endless loop delta = 1; // by not decreasing sleepers. - // WORKAROUND: walking speed in the original v0/v1 interpreter + // WORKAROUND: walking speed in the original v0/v1 interpreter // is sometimes slower (e.g. during scrolling) than in ScummVM. // This is important for the door-closing action in the dungeon, - // otherwise (delta < 6) a single kid is able to escape. - if ((_game.version == 0 && isScriptRunning(132)) || + // otherwise (delta < 6) a single kid is able to escape. + if ((_game.version == 0 && isScriptRunning(132)) || (_game.version == 1 && isScriptRunning(137))) delta = 6; diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 700389414c..a77c1c0141 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1372,7 +1372,7 @@ public: public: bool towns_isRectInStringBox(int x1, int y1, int x2, int y2); byte _townsPaletteFlags; - byte _townsCharsetColorMap[16]; + byte _townsCharsetColorMap[16]; protected: void towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, int srcX, int srcY, int w, int h); diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 43c86db85f..a1cecfa0b3 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -957,7 +957,7 @@ void Sound::setupSfxFile() { if (file.open(tmp)) _sfxFilename = tmp; - + if (_vm->_game.heversion <= 74) _sfxFileEncByte = 0x69; @@ -1182,7 +1182,7 @@ int ScummEngine::readSoundResource(ResId idx) { // its sound resources, and Amiga games, which feature only ROL // resources, since we are a doing Midi -> AdLib conversion for // these. - if ((_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS) && pri != 16 + if ((_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS) && pri != 16 && pri != 15 && pri != 10 && pri != 2 && _game.platform != Common::kPlatformAmiga) pri = -1; diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index 567ca31485..0d0f6cdb95 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -84,7 +84,7 @@ int ScummEngine_v0::verbPrepIdType(int verbid) { switch (verbid) { case kVerbUse: // depends on object1 return kVerbPrepObject; - case kVerbGive: + case kVerbGive: return kVerbPrepTo; case kVerbUnlock: case kVerbFix: return kVerbPrepWith; @@ -693,7 +693,7 @@ void ScummEngine_v0::verbExec() { if (_activeVerb == kVerbWhatIs) return; - + if (!(_activeVerb == kVerbWalkTo && _activeObject == 0)) { doSentence(_activeVerb, _activeObject, _activeObject2); if (_activeVerb != kVerbWalkTo) { |