diff options
author | Nicola Mettifogo | 2007-09-19 08:40:12 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-09-19 08:40:12 +0000 |
commit | 258901bab96f0050385a9912c8ea0fe2a41b2d6f (patch) | |
tree | a3ae8675b679c9f3b58ac8d97c79369502ea23c1 /engines/scumm | |
parent | a89694c0d61a75a960f5bec6c498659c988401cc (diff) | |
download | scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.tar.gz scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.tar.bz2 scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.zip |
Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
Diffstat (limited to 'engines/scumm')
96 files changed, 398 insertions, 402 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 38517c1d69..de35d4b821 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" // for setFocusRectangle/clearFocusRectangle #include "scumm/scumm.h" #include "scumm/actor.h" @@ -71,7 +71,7 @@ void Actor::initActor(int mode) { _heFlags = 0; _heTalking = false; // end HE specific - + if (mode == -1) { _offsX = _offsY = 0; @@ -385,7 +385,7 @@ void Actor::startWalkActor(int destX, int destY, int dir) { if (_moving && _walkdata.destdir == dir && _walkdata.dest.x == abr.x && _walkdata.dest.y == abr.y) return; } - + if (_pos.x == abr.x && _pos.y == abr.y) { if (dir != _facing) turnToDirection(dir); @@ -937,7 +937,7 @@ static bool inBoxQuickReject(const BoxCoords &box, int x, int y, int threshold) static int checkXYInBoxBounds(int boxnum, int x, int y, int &destX, int &destY) { BoxCoords box = g_scumm->getBoxCoordinates(boxnum); int xmin, xmax; - + // We are supposed to determine the point (destX,destY) contained in // the given box which is closest to the point (x,y), and then return // some kind of "distance" between the two points. @@ -981,7 +981,7 @@ static int checkXYInBoxBounds(int boxnum, int x, int y, int &destX, int &destY) xmin = (ul + ll) / 2; xmax = (ur + lr) / 2; cury = (top + bottom) / 2; - + if (cury < y) { top = cury; ul = xmin; @@ -993,7 +993,7 @@ static int checkXYInBoxBounds(int boxnum, int x, int y, int &destX, int &destY) } } while (cury != y); } - + // Now that we have limited the value of destX to a fixed // interval, it's a trivial matter to finally determine it. if (x < xmin) { @@ -1447,7 +1447,7 @@ void Actor::drawActorCostume(bool hitTestMode) { bcr->_actorY *= V12_Y_MULTIPLIER; } bcr->_actorX -= _vm->_virtscr[kMainVirtScreen].xstart; - + if (_vm->_game.platform == Common::kPlatformNES) { // In the NES version, when the actor is facing right, // we need to shift it 8 pixels to the left @@ -2497,7 +2497,7 @@ void Actor::saveLoadWithSerializer(Serializer *ser) { } ser->saveLoadEntries(this, actorEntries); - + if (ser->isLoading() && _vm->_game.version <= 2 && ser->getVersion() < VER(70)) { _pos.x >>= V12_X_SHIFT; _pos.y >>= V12_Y_SHIFT; diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index 86a19540d6..31e7f75878 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/actor.h" #include "scumm/akos.h" @@ -250,7 +250,7 @@ void AkosCostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) { } if (!found) { error("Sequence not found in actor %p costume %d", (void *)a, a->_costume); - } + } } } @@ -276,7 +276,7 @@ void AkosCostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) { error("Sequence not found in actor %p costume %d", (void *)a, a->_costume); } } - } + } break; } } else { @@ -312,7 +312,7 @@ void AkosRenderer::setPalette(byte *new_palette) { if (_vm->_game.heversion == 70) { for (i = 0; i < size; i++) _palette[i] = _vm->_HEV7ActorPalette[_palette[i]]; - } + } if (size == 256) { byte color = new_palette[0]; @@ -571,7 +571,7 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) { if (color && !masked && !skip_column) { pcolor = _palette[color]; if (_shadow_mode == 1) { - if (pcolor == 13) + if (pcolor == 13) pcolor = _shadow_table[*dst]; } else if (_shadow_mode == 2) { error("codec1_spec2"); // TODO @@ -977,7 +977,7 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { v1.destptr = (byte *)_out.pixels + v1.y * _out.pitch + v1.x; codec1_genericDecode(v1); - + return drawFlag; } @@ -1047,9 +1047,9 @@ byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) { bdd.mirror = !_mirror; drawBomp(bdd); - + _useBompPalette = false; - + return 0; } @@ -1086,7 +1086,7 @@ void AkosRenderer::akos16DecodeLine(byte *buf, int32 numbytes, int32 dir) { *buf = _akos16.color; buf += dir; } - + if (!_akos16.repeatMode) { AKOS16_FILL_BITS() bits = _akos16.bits & 3; @@ -1143,7 +1143,7 @@ void AkosRenderer::akos16Decompress(byte *dest, int32 pitch, const byte *src, in } maskpitch = _numStrips; - + maskptr = _vm->getMaskBuffer(maskLeft, maskTop, zBuf); assert(t_height > 0); @@ -1172,7 +1172,7 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) { error("codec16: _actorHitMode not yet implemented"); return 0; } - + if (!_mirror) { clip.left = (_actorX - xmoveCur - _width) + 1; } else { @@ -1309,7 +1309,7 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { if (diff > 0) { src.bottom -= diff; dst.bottom -= diff; - } + } if (dst.isValidRect() == false) return 0; @@ -1420,7 +1420,7 @@ bool ScummEngine_v6::akos_increaseAnim(Actor *a, int chan, const byte *aksq, con curpos += 3; break; case AKC_SoundStuff: - if (_game.heversion >= 61) + if (_game.heversion >= 61) curpos += 6; else curpos += 8; diff --git a/engines/scumm/base-costume.cpp b/engines/scumm/base-costume.cpp index fe87dc65ec..795abb8685 100644 --- a/engines/scumm/base-costume.cpp +++ b/engines/scumm/base-costume.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/base-costume.h" #include "scumm/costume.h" diff --git a/engines/scumm/bomp.cpp b/engines/scumm/bomp.cpp index 0ffb80970c..ecd6f16923 100644 --- a/engines/scumm/bomp.cpp +++ b/engines/scumm/bomp.cpp @@ -22,7 +22,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/akos.h" #include "scumm/bomp.h" diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp index e79cea4359..0fa8b579ca 100644 --- a/engines/scumm/boxes.cpp +++ b/engines/scumm/boxes.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/actor.h" #include "scumm/boxes.h" @@ -552,7 +552,7 @@ bool ScummEngine::checkXYInBoxBounds(int boxnum, int x, int y) { if (p.sqrDist(tmp) <= 4) return true; } - + // Finally, fall back to the classic algorithm to compute containment // in a convex polygon: For each (oriented) side of the polygon // (quadrangle in this case), compute whether p is "left" or "right" diff --git a/engines/scumm/camera.cpp b/engines/scumm/camera.cpp index ea6ac9b528..e2e6ff0cb6 100644 --- a/engines/scumm/camera.cpp +++ b/engines/scumm/camera.cpp @@ -22,7 +22,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/intern.h" #include "scumm/actor.h" diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 6eb6cfd7c6..4ae98c7ec0 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "scumm/charset.h" #include "scumm/scumm.h" #include "scumm/nut_renderer.h" @@ -36,11 +36,11 @@ namespace Scumm { TODO: Right now our charset renderers directly access _textSurface, as well as the virtual screens of ScummEngine. Ideally, this would not be the case. Instead, -ScummVM would simply pass the appropriate Surface to the resp. methods. +ScummVM would simply pass the appropriate Surface to the resp. methods. Of course it is not quite as simple, various flags and offsets have to be taken into account for that. -The advantage will be cleaner coder (easier to debug, in particular), and a +The advantage will be cleaner coder (easier to debug, in particular), and a better separation of the various modules. */ @@ -89,7 +89,7 @@ void ScummEngine::loadCJKFont() { debug(2, "Loading CJK Font"); _useCJKMode = true; _textSurfaceMultiplier = 1; // No multiplication here - + switch (_language) { case Common::KO_KOR: fp.seek(2, SEEK_CUR); @@ -203,7 +203,7 @@ static int SJIStoFMTChunk(int f, int s) { //converts sjis code to fmt font offse } byte *ScummEngine::get2byteCharPtr(int idx) { - switch (_language) { + switch (_language) { case Common::KO_KOR: idx = ((idx % 256) - 0xb0) * 94 + (idx / 256) - 0xa1; break; @@ -394,7 +394,7 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) { continue; } } - + // Some localizations may override colors // See credits in Chinese COMI if (chr == '^' && pos == 1) { diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index ac61d39d25..83fa71e7b6 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/actor.h" #include "scumm/costume.h" @@ -72,7 +72,7 @@ static const int v1MMNESLookup[25] = { 0x02, 0x00, 0x07, 0x0C, 0x04, 0x09, 0x0A, 0x12, 0x0B, 0x14, 0x0D, 0x11, 0x0F, 0x0E, 0x10, - 0x17, 0x00, 0x01, 0x05, 0x16 + 0x17, 0x00, 0x01, 0x05, 0x16 }; @@ -383,7 +383,7 @@ void ClassicCostumeRenderer::procC64(Codec1 &v1, int actor) { while (len--) { if (!rep) color = *src++; - + if (0 <= y && y < _out.h && 0 <= v1.x && v1.x < _out.w) { if (!_mirror) { LINE(0, 0); LINE(2, 2); LINE(4, 4); LINE(6, 6); @@ -446,7 +446,7 @@ void ClassicCostumeRenderer::proc3(Codec1 &v1) { do { if (_scaleY == 255 || v1.scaletable[scaleIndexY++] < _scaleY) { masked = (y < 0 || y >= _out.h) || (v1.x < 0 || v1.x >= _out.w) || (v1.mask_ptr && (mask[0] & maskbit)); - + if (color && !masked) { if (_shadow_mode & 0x20) { pcolor = _shadow_table[*dst]; @@ -513,7 +513,7 @@ void ClassicCostumeRenderer::proc3_ami(Codec1 &v1) { do { if (_scaleY == 255 || v1.scaletable[_scaleIndexY] < _scaleY) { masked = (y < 0 || y >= _out.h) || (v1.x < 0 || v1.x >= _out.w) || (v1.mask_ptr && (mask[0] & maskbit)); - + if (color && !masked) { *dst = _palette[color]; } @@ -593,8 +593,8 @@ void ClassicCostumeLoader::loadCostume(int id) { error("Costume %d with format 0x%X is invalid", id, _format); } - - // In GF_OLD_BUNDLE games, there is no actual palette, just a single color byte. + + // In GF_OLD_BUNDLE games, there is no actual palette, just a single color byte. // Don't forget, these games were designed around a fixed 16 color HW palette :-) // In addition, all offsets are shifted by 2; we accomodate that via a separate // _baseptr value (instead of adding tons of if's throughout the code). @@ -715,7 +715,7 @@ byte ClassicCostumeRenderer::drawLimb(const Actor *a, int limb) { // Determine the position the limb is at i = cost.curpos[limb] & 0x7FFF; - + // Get the frame pointer for that limb frameptr = _loaded._baseptr + READ_LE_UINT16(_loaded._frameOffsets + limb * 2); @@ -900,12 +900,12 @@ byte ClassicCostumeLoader::increaseAnim(Actor *a, int slot) { i = a->_cost.curpos[slot] & 0x7FFF; end = a->_cost.end[slot]; code = _animCmds[i] & 0x7F; - + if (_vm->_game.version <= 3) { if (_animCmds[i] & 0x80) a->_cost.soundCounter++; } - + do { if (!highflag) { if (i++ >= end) @@ -1054,7 +1054,7 @@ byte C64CostumeRenderer::drawLimb(const Actor *a, int limb) { int xpos = 0; int ypos = _loaded._maxHeight - offsetY; - + if (flipped) { if (offsetX) xpos += (offsetX-1) * 8; diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index b8b2cbcb6d..604846602e 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -22,7 +22,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" #include "common/util.h" #include "graphics/cursorman.h" diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index 68a001c983..83507abf76 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -22,7 +22,7 @@ * $Id$ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/file.h" @@ -745,7 +745,7 @@ void ScummDebugger::drawBox(int box) { r[1] = coords.ur; r[2] = coords.lr; r[3] = coords.ll; - + if (_vm->_game.version <= 2) { for (int i = 0; i < 4; ++i) { r[i].x *= V12_X_MULTIPLIER; diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 90c6e40aa7..544d2d2392 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -23,8 +23,6 @@ * */ -#include "common/stdafx.h" - #include "base/plugins.h" #include "common/config-manager.h" @@ -77,7 +75,7 @@ Common::String ScummEngine::generateFilename(const int room) const { case kGenDiskNum: snprintf(buf, sizeof(buf), _filenamePattern.pattern, diskNumber); break; - + case kGenRoomNum: snprintf(buf, sizeof(buf), _filenamePattern.pattern, room); break; @@ -91,7 +89,7 @@ Common::String ScummEngine::generateFilename(const int room) const { int disk = 0; if (_heV7DiskOffsets) disk = _heV7DiskOffsets[room]; - + switch (disk) { case 2: id = 'b'; @@ -110,7 +108,7 @@ Common::String ScummEngine::generateFilename(const int room) const { } else { id = diskNumber + '0'; } - + if (_filenamePattern.genMethod == kGenHEPC) { // For HE >= 98, we already called snprintf above. if (_game.heversion < 98 || room < 0) @@ -185,7 +183,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com // Search for a node with the given "name", inside fslist. Ignores case -// when performing the matching. The first match is returned, so if you +// when performing the matching. The first match is returned, so if you // search for "resource" and two nodes "RESOURE and "resource" are present, // the first match is used. static bool searchFSNode(const FSList &fslist, const Common::String &name, FilesystemNode &result) { @@ -251,7 +249,7 @@ static Common::Language detectLanguage(const FSList &fslist, byte id) { return Common::DE_DEU; case 257460: // 04cf6a6ba6f57e517bc40eb81862cfb0 return Common::FR_FRA; - case 231402: // 93d13fcede954c78e65435592182a4db + case 231402: // 93d13fcede954c78e65435592182a4db return Common::IT_ITA; case 228772: // 5d9ad90d3a88ea012d25d61791895ebe return Common::PT_BRA; @@ -260,7 +258,7 @@ static Common::Language detectLanguage(const FSList &fslist, byte id) { } } } - + return Common::UNK_LANG; } @@ -287,7 +285,7 @@ static void computeGameSettingsFromMD5(const FSList &fslist, const GameFilenameP } else if (gfp->platform != Common::kPlatformUnknown) { dr.game.platform = gfp->platform; } - + // HACK: Special case to distinguish the V1 demo from the full version // (since they have identical MD5): if (dr.game.id == GID_MANIAC && !strcmp(gfp->pattern, "%02d.MAN")) { @@ -299,7 +297,7 @@ static void computeGameSettingsFromMD5(const FSList &fslist, const GameFilenameP if (dr.extra && strstr(dr.extra, "Demo")) { dr.game.features |= GF_DEMO; } - + // HACK: Detect COMI & Dig languages if (dr.language == UNK_LANG && (dr.game.id == GID_CMI || dr.game.id == GID_DIG)) { dr.language = detectLanguage(fslist, dr.game.id); @@ -314,7 +312,7 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu DescMap fileMD5Map; DetectorResult dr; char md5str[32+1]; - + for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { if (!file->isDirectory()) { DetectorDesc d; @@ -330,7 +328,7 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu // so we can just skip over everything with a differing gameid. if (gameid && scumm_stricmp(gameid, gfp->gameid)) continue; - + // Generate the detectname corresponding to the gfp. If the file doesn't // exist in the directory we are looking at, we can skip to the next // one immediately. @@ -345,8 +343,8 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu dr.language = gfp->language; dr.md5.clear(); dr.extra = 0; - - // ____ _ _ + + // ____ _ _ // | _ \ __ _ _ __| |_ / | // | |_) / _` | '__| __| | | // | __/ (_| | | | |_ | | @@ -378,29 +376,29 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu // Sanity check: We *should* have found a matching gameid / variant at this point. // If not, then there's a bug in our data tables... assert(dr.game.gameid != 0); - + // Add it to the list of detected games results.push_back(dr); } } } - - // If an exact match for this file has already been found, don't bother + + // If an exact match for this file has already been found, don't bother // looking at it anymore. if (d.md5Entry) continue; - // ____ _ ____ + // ____ _ ____ // | _ \ __ _ _ __| |_ |___ \ * // | |_) / _` | '__| __| __) | - // | __/ (_| | | | |_ / __/ + // | __/ (_| | | | |_ / __/ // |_| \__,_|_| \__| |_____| // // PART 2: Fuzzy matching for files with unknown MD5. // - - + + // We loop over the game variants matching the gameid associated to // the gfp record. We then try to decide for each whether it could be // appropriate or not. @@ -426,8 +424,8 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu } continue; } - - + + // Add the game/variant to the candidates list if it is consistent // with the file(s) we are seeing. if (testGame(g, fileMD5Map, file)) @@ -450,7 +448,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com warning("SCUMM detectGames: failed to open '%s' for read access", d.node.getPath().c_str()); return false; } - + if (file == "maniac1.d64" || file == "maniac1.dsk" || file == "zak1.d64") { // TODO } else if (file == "00.LFL") { @@ -458,10 +456,10 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com if (g->version > 3) return false; - // Read a few bytes to narrow down the game. + // Read a few bytes to narrow down the game. byte buf[6]; tmp.read(buf, 6); - + if (buf[0] == 0xbc && buf[1] == 0xb9) { // The NES version of MM if (g->id == GID_MANIAC && g->platform == Common::kPlatformNES) { @@ -472,7 +470,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com (buf[0] == 0xCD && buf[1] == 0xFE)) { // Commodore 64 // Could be V0 or V1. // Candidates: maniac classic, zak classic - + if (g->version >= 2) return false; @@ -556,14 +554,14 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com else unknown, do not accept it */ - + // We now try to exclude various possibilities by the presence of certain // LFL files. Note that we only exclude something based on the *presence* // of a LFL file here; compared to checking for the absence of files, this // has the advantage that we are less likely to accidentally exclude demos // (which, after all, are usually missing many LFL files present in the // full version of the game). - + // No version of Indy3 has 05.LFL but MM, Loom and Zak all have it if (g->id == GID_INDY3 && fileMD5Map.contains("05.LFL")) return false; @@ -605,14 +603,14 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com _numCostumes 199 _numScripts 199 _numSounds 199 - + Any good ideas to distinguish those? Maybe by the presence / absence of some files? At least PASS and the monkeyEGA demo differ by 903.LFL missing... And the count of DISK??.LEC files differs depending on what version - you have (4 or 8 floppy versions). + you have (4 or 8 floppy versions). loomcd of course shipped on only one "disc". - + pass: 000.LFL, 901.LFL, 902.LFL, 904.LFL, disk01.lec monkeyEGA: 000.LFL, 901-904.LFL, DISK01-09.LEC monkeyEGA DEMO: 000.LFL, 901.LFL, 902.LFL, 904.LFL, disk01.lec @@ -622,7 +620,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com const bool has903LFL = fileMD5Map.contains("903.LFL"); const bool hasDisk02 = fileMD5Map.contains("DISK02.LEC"); - + // There is not much we can do based on the presence / absence // of files. Only that if 903.LFL is present, it can't be PASS; // and if DISK02.LEC is present, it can't be LoomCD @@ -639,12 +637,12 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com // So at this point the gameid is determined, but not necessarily // the variant! - + // TODO: Add code that handles this, at least for the non-HE games. // Note sure how realistic it is to correctly detect HE-game // variants, would require me to look at a sufficiently large // sample collection of HE games (assuming I had the time :). - + // TODO: For Mac versions in container file, we can sometimes // distinguish the demo from the regular version by looking // at the content of the container file and then looking for @@ -681,7 +679,7 @@ GameList Engine_SCUMM_detectGames(const FSList &fslist) { // TODO: We still don't handle the FM-TOWNS demos (like zakloom) very well. // In particular, they are detected as ZakTowns, which is bad. - + for (Common::List<DetectorResult>::iterator x = results.begin(); x != results.end(); ++x) { const PlainGameDescriptor *g = findPlainGameDescriptor(x->game.gameid, gameDescriptions); assert(g); @@ -802,7 +800,7 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) { printf("Your game version appears to be unknown. Please, report the following\n"); printf("data to the ScummVM team along with name of the game you tried to add\n"); printf("and its version/language/etc.:\n"); - + printf(" SCUMM gameid '%s', file '%s', MD5 '%s'\n\n", res.game.gameid, generateFilenameForDetection(res.fp.pattern, res.fp.genMethod).c_str(), @@ -812,7 +810,7 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) { } // Check for a user override of the platform. We allow the user to override - // the platform, to make it possible to add games which are not yet in + // the platform, to make it possible to add games which are not yet in // our MD5 database but require a specific platform setting. // TODO: Do we really still need / want the platform override ? if (ConfMan.hasKey("platform")) @@ -839,7 +837,7 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) { *engine = new ScummEngine_v2(syst, res); break; case 3: - if ((res.game.features & GF_OLD256) || res.game.platform == Common::kPlatformPCEngine) + if ((res.game.features & GF_OLD256) || res.game.platform == Common::kPlatformPCEngine) *engine = new ScummEngine_v3(syst, res); else *engine = new ScummEngine_v3old(syst, res); diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 70118b9baf..41feac4264 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -26,8 +26,6 @@ #ifndef SCUMM_DETECTION_TABLES_H #define SCUMM_DETECTION_TABLES_H -#include "common/stdafx.h" - #include "common/advancedDetector.h" #include "common/rect.h" #include "common/util.h" @@ -250,7 +248,7 @@ static const GameSettings gameVariantsTable[] = { {"fbear", "HE 70", 0, GID_FBEAR, 6, 70, MDT_NONE, GF_USE_KEY, Common::kPlatformWindows}, {"puttmoon", "", 0, GID_HEGAME, 6, 61, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK}, - + {"puttputt", "HE 61", 0, GID_HEGAME, 6, 61, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK}, {"puttputt", "HE 60", 0, GID_HEGAME, 6, 60, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, Common::kPlatformPC}, {"puttputt", "Demo", 0, GID_PUTTDEMO, 6, 60, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK}, @@ -648,7 +646,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "pajama2", "PajamaTAL", kGenHEPC, UNK_LANG, UNK, 0 }, { "pajama2", "PyjamaDBMN", kGenHEPC, Common::DE_DEU, UNK, 0 }, { "pajama2", "PyjamaDBMN", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, - { "pajama2", "PyjamaHM", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, + { "pajama2", "PyjamaHM", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, { "pajama2", "PYJAMA2", kGenHEPC, Common::DE_DEU, UNK, 0 }, { "pajama2", "Pyjama Pit 2", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, { "pajama2", "Pyjama Pit 2 Demo", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, @@ -736,7 +734,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "puttzoo", "Putt-Putt Redt De Zoo", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, { "puttzoo", "puttzoo", kGenHEPC, UNK_LANG, UNK, 0 }, { "puttzoo", "Puttzoo Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "puttzoo", "PuttZoo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "puttzoo", "PuttZoo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "puttzoo", "T\xC3\xB6""ff-T\xC3\xB6""ff\xE2\x84\xA2 Zoo Demo", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, // UTF-8 encoding { "puttzoo", "T\xF6""ff-T""\xF6""ff\x99 Zoo Demo", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, // Windows encoding { "puttzoo", "zoodemo", kGenHEPC, UNK_LANG, UNK, 0 }, diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 1666578c4c..828c665c5f 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/savefile.h" @@ -114,7 +114,7 @@ static const ResString string_map_table_v7[] = { {70, "/BOOT.008/Save"}, {71, "/BOOT.009/Load"}, {72, "/BOOT.010/Play"}, - {73, "/BOOT.011/Cancel"}, + {73, "/BOOT.011/Cancel"}, {74, "/BOOT.012/Quit"}, {75, "/BOOT.013/OK"}, {0, ""}, @@ -250,7 +250,7 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, _container->setHints(GUI::THEME_HINT_USE_SHADOW); _gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10); - + _date = new StaticTextWidget(this, 0, 0, 10, 10, "No date saved", kTextAlignCenter); _time = new StaticTextWidget(this, 0, 0, 10, 10, "No time saved", kTextAlignCenter); _playtime = new StaticTextWidget(this, 0, 0, 10, 10, "No playtime saved", kTextAlignCenter); @@ -327,22 +327,22 @@ void SaveLoadChooser::reflowLayout() { int thumbH = ((g_system->getHeight() % 200 && g_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1); _container->resize(thumbX - hPad, thumbY - vPad, kThumbnailWidth + hPad * 2, thumbH + vPad * 2 + kLineHeight * 4); - + // Add the thumbnail display _gfxWidget->resize(thumbX, thumbY, kThumbnailWidth, thumbH); - + int height = thumbY + thumbH + kLineHeight; _date->resize(thumbX, height, kThumbnailWidth, kLineHeight); - + height += kLineHeight; _time->resize(thumbX, height, kThumbnailWidth, kLineHeight); - + height += kLineHeight; _playtime->resize(thumbX, height, kThumbnailWidth, kLineHeight); - + _container->clearFlags(GUI::WIDGET_INVISIBLE); _gfxWidget->clearFlags(GUI::WIDGET_INVISIBLE); _date->clearFlags(GUI::WIDGET_INVISIBLE); @@ -435,7 +435,7 @@ Common::StringList generateSavegameList(ScummEngine *scumm, bool saveMode) { name[0] = 0; descriptions.push_back(name); } - + return descriptions; } @@ -570,7 +570,7 @@ enum { // If OTOH the dialog is closed with "Cancel" we do no such thing. // // These changes will achieve two things at once: Allow us to get rid of using -// "" as value for the domain, and in fact provide a somewhat better user +// "" as value for the domain, and in fact provide a somewhat better user // experience at the same time. ConfigDialog::ConfigDialog() : GUI::OptionsDialog("", "scummconfig") { @@ -907,7 +907,7 @@ void ValueDisplayDialog::open() { _timer = getMillis() + kDisplayDelay; } -SubtitleSettingsDialog::SubtitleSettingsDialog(ScummEngine *scumm, int value) +SubtitleSettingsDialog::SubtitleSettingsDialog(ScummEngine *scumm, int value) : InfoDialog(scumm, ""), _value(value) { } @@ -940,7 +940,7 @@ void SubtitleSettingsDialog::cycleValue() { "Speech and Subtitles", "Subtitles Only" }; - + _value = (_value + 1) % 3; setInfoText(subtitleDesc[_value]); @@ -954,7 +954,7 @@ Indy3IQPointsDialog::Indy3IQPointsDialog(ScummEngine *scumm, char* text) } void Indy3IQPointsDialog::handleKeyDown(Common::KeyState state) { - if (state.ascii == 'i') + if (state.ascii == 'i') close(); else ScummDialog::handleKeyDown(state); diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 8d111492a2..17eedb24ee 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -22,7 +22,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" #include "scumm/scumm.h" #include "scumm/actor.h" @@ -37,7 +37,7 @@ #include "scumm/util.h" #ifdef USE_ARM_GFX_ASM -extern "C" void DrawStripToScreenARM(int height, int width, byte const* text, byte const* src, byte* dst, +extern "C" void DrawStripToScreenARM(int height, int width, byte const* text, byte const* src, byte* dst, int vsPitch, int vmScreenWidth, int textSurfacePitch); extern "C" void Copy8ColARM(byte* dst, int dstPitch, const byte* src, int height); #endif /* USE_ARM_GFX_ASM */ @@ -108,7 +108,7 @@ static const TransitionEffect transitionEffects[6] = { 0, 0, 0, 24 } }, - + // Box wipe (a box expands from the upper-left corner to the lower-right corner) { 25, // Number of iterations @@ -125,7 +125,7 @@ static const TransitionEffect transitionEffects[6] = { 255, 0, 0, 0 } }, - + // Box wipe (a box expands from the lower-right corner to the upper-left corner) { 25, // Number of iterations @@ -142,7 +142,7 @@ static const TransitionEffect transitionEffects[6] = { 255, 0, 0, 0 } }, - + // Inverse box wipe { 25, // Number of iterations @@ -193,7 +193,7 @@ static const TransitionEffect transitionEffects[6] = { 255, 0, 0, 0 } } - + }; @@ -313,7 +313,7 @@ void ScummEngine::initScreens(int b, int h) { initVirtScreen(kVerbVirtScreen, h + adj, _screenWidth, _screenHeight - h - adj, false, false); _screenB = b; _screenH = h; - + _gdi->init(); } @@ -446,7 +446,7 @@ void ScummEngine::markRectAsDirty(VirtScreenNumber virt, int left, int right, in void ScummEngine::drawDirtyScreenParts() { // Update verbs updateDirtyScreen(kVerbVirtScreen); - + // Update the conversation area (at the top of the screen) updateDirtyScreen(kTextVirtScreen); @@ -544,7 +544,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i assert(top >= 0 && bottom <= vs->h); assert(x >= 0 && width <= vs->pitch); assert(_textSurface.pixels); - + // Perform some clipping if (width > vs->w - x) width = vs->w - x; @@ -556,10 +556,10 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i // Convert the vertical coordinates to real screen coords int y = vs->topline + top - _screenTop; int height = bottom - top; - + if (width <= 0 || height <= 0) return; - + const byte *src = vs->getPixels(x, top); int m = _textSurfaceMultiplier; byte *dst; @@ -579,7 +579,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i } dst = _compositeBuf; - + if (_game.version < 7) { // For The Dig, FT and COMI, we just blit everything to the screen at once. // For older games, things are more complicated. First off, we need to @@ -597,7 +597,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i assert(0 == (width & 3)); // Compose the text over the game graphics - + // TODO: Optimize this code. There are several things that come immediately to mind: // (1) Loop unrolling: We could read 4 or even 8 pixels at once, since everything is // a multiple of 8 here. @@ -956,7 +956,7 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) { const int height = rect.height(); const int width = rect.width(); - + if (!height) return; @@ -989,7 +989,7 @@ void ScummEngine::restoreCharsetBg() { return; markRectAsDirty(vs->number, Common::Rect(vs->w, vs->h), USAGE_BIT_RESTORED); - + byte *screenBuf = vs->getPixels(0, 0); if (vs->hasTwoBuffers && _currentRoom != 0 && isLightOn()) { @@ -1037,7 +1037,7 @@ static void blit(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, assert(h > 0); assert(src != NULL); assert(dst != NULL); - + if (w == srcPitch && w == dstPitch) { memcpy(dst, src, w*h); } else { @@ -1052,7 +1052,7 @@ static void blit(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, static void fill(byte *dst, int dstPitch, byte color, int w, int h) { assert(h > 0); assert(dst != NULL); - + if (w == dstPitch) { memset(dst, color, w*h); } else { @@ -1117,7 +1117,7 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) { // Adjust for the topline of the VirtScreen y -= vs->topline; y2 -= vs->topline; - + // Clip the coordinates if (x < 0) x = 0; @@ -1138,7 +1138,7 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) { return; else if (y2 > vs->h) y2 = vs->h; - + width = x2 - x; height = y2 - y; @@ -1226,7 +1226,7 @@ void ScummEngine_v5::drawFlashlight() { if (_flashlight.isDrawn) { markRectAsDirty(kMainVirtScreen, _flashlight.x, _flashlight.x + _flashlight.w, _flashlight.y, _flashlight.y + _flashlight.h, USAGE_BIT_DIRTY); - + if (_flashlight.buffer) { fill(_flashlight.buffer, vs->pitch, 0, _flashlight.w, _flashlight.h); } @@ -1294,7 +1294,7 @@ void ScummEngine_v5::drawFlashlight() { _flashlight.buffer[maxrow + maxcol - j] = 0; } } - + _flashlight.isDrawn = true; } @@ -1399,7 +1399,7 @@ void GdiV2::prepareDrawBitmap(const byte *ptr, VirtScreen *vs, theX = 0; maxX = width; } - + // Decode and draw the image data. assert(height <= 128); for (; theX < maxX; theX++) { @@ -1453,7 +1453,7 @@ void GdiV2::prepareDrawBitmap(const byte *ptr, VirtScreen *vs, do { if (!runFlag) data = *src++; - + if (left <= theX) { *mask_ptr = data; mask_ptr += _numStrips; @@ -1491,7 +1491,7 @@ int Gdi::getZPlanes(const byte *ptr, const byte *zplane_list[9], bool bmapImage) else { numzbuf = _numZBuffer; assert(numzbuf <= 9); - + if (_vm->_game.features & GF_SMALL_HEADER) { if (_vm->_game.features & GF_16COLOR) zplane_list[1] = ptr + READ_LE_UINT16(ptr); @@ -1508,7 +1508,7 @@ int Gdi::getZPlanes(const byte *ptr, const byte *zplane_list[9], bool bmapImage) } else if (_vm->_game.version == 8) { // Find the OFFS chunk of the ZPLN chunk const byte *zplnOffsChunkStart = ptr + 24 + READ_BE_UINT32(ptr + 12); - + // Each ZPLN contains a WRAP chunk, which has (as always) an OFFS subchunk pointing // at ZSTR chunks. These once more contain a WRAP chunk which contains nothing but // an OFFS chunk. The content of this OFFS chunk contains the offsets to the @@ -1529,13 +1529,13 @@ int Gdi::getZPlanes(const byte *ptr, const byte *zplane_list[9], bool bmapImage) MKID_BE('ZP03'), MKID_BE('ZP04') }; - + for (i = 1; i < numzbuf; i++) { zplane_list[i] = _vm->findResource(zplane_tags[i], ptr); } } } - + return numzbuf; } @@ -1574,7 +1574,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const } numzbuf = getZPlanes(ptr, zplane_list, false); - + const byte *tmsk_ptr = NULL; if (_vm->_game.heversion >= 72) { tmsk_ptr = _vm->findResource(MKID_BE('TMSK'), ptr); @@ -1626,7 +1626,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const // COMI and HE games only uses flag value if (_vm->_game.version == 8 || _vm->_game.heversion >= 60) transpStrip = true; - + if (vs->hasTwoBuffers) { byte *frontBuf = (byte *)vs->pixels + y * vs->pitch + x * 8; if (lightsOn) @@ -1843,7 +1843,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) { // in decompressBitmap call drawStripHE() _decomp_shr = code % 10; _decomp_mask = 0xFF >> (8 - _decomp_shr); - + switch (code) { case 134: case 135: @@ -1933,7 +1933,7 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, rect1.right -= rect2.left; rect1.top -= rect2.top; rect1.bottom -= rect2.top; - + ((ScummEngine_v71he *)_vm)->restoreBackgroundHE(rect1); } } @@ -1962,13 +1962,13 @@ void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) { const int rw = rect.width(); const int rh = rect.height(); - + if (rw == 0 || rh == 0) return; src = _virtscr[kMainVirtScreen].getBackPixels(rect.left, rect.top); dst = _virtscr[kMainVirtScreen].getPixels(rect.left, rect.top); - + assert(rw <= _screenWidth && rw > 0); assert(rh <= _screenHeight && rh > 0); blit(dst, _virtscr[kMainVirtScreen].pitch, src, _virtscr[kMainVirtScreen].pitch, rw, rh); @@ -1983,7 +1983,7 @@ void Gdi::resetBackground(int top, int bottom, int strip) { VirtScreen *vs = &_vm->_virtscr[kMainVirtScreen]; byte *backbuff_ptr, *bgbak_ptr; int numLinesToProcess; - + if (top < 0) top = 0; @@ -2031,7 +2031,7 @@ bool Gdi::decompressBitmap(byte *dst, int dstPitch, const byte *src, int numLine bool transpStrip = false; _decomp_shr = code % 10; _decomp_mask = 0xFF >> (8 - _decomp_shr); - + switch (code) { case 1: drawStripRaw(dst, dstPitch, src, numLinesToProcess, false); @@ -2154,7 +2154,7 @@ bool Gdi::decompressBitmap(byte *dst, int dstPitch, const byte *src, int numLine default: error("Gdi::decompressBitmap: default case %d", code); } - + return transpStrip; } @@ -2236,7 +2236,7 @@ void Gdi::decompressMaskImgOr(byte *dst, const byte *src, int height) const { while (height) { b = *src++; - + if (b & 0x80) { b &= 0x7F; c = *src++; @@ -2650,7 +2650,7 @@ StripTable *GdiV2::generateStripTable(const byte *src, int width, int height, St x = 0; y = height; width /= 8; - + for (;;) { length = *src++; const byte runFlag = length & 0x80; @@ -2684,7 +2684,7 @@ void Gdi::drawStripEGA(byte *dst, int dstPitch, const byte *src, int height) con while (x < 8) { color = *src++; - + if (color & 0x80) { run = color & 0x3f; @@ -2723,7 +2723,7 @@ void Gdi::drawStripEGA(byte *dst, int dstPitch, const byte *src, int height) con if (run == 0) { run = *src++; } - + for (z = 0; z < run; z++) { *(dst + y * dstPitch + x) = _roomPalette[color & 0xf] + _paletteMod; @@ -2751,12 +2751,12 @@ void Gdi::drawStripHE(byte *dst, int dstPitch, const byte *src, int width, int h uint32 dataBit, data; byte color; int shift; - + color = *src++; data = READ_LE_UINT24(src); src += 3; shift = 24; - + int x = width; while (1) { if (!transpCheck || color != _transparentColor) @@ -3197,10 +3197,10 @@ void ScummEngine::fadeOut(int effect) { // to get cleared. This fixes glitches, at least, in the first cutscenes // when bypassed of FT and TheDig. if ((_game.version == 7 || _screenEffectFlag) && effect != 0) { - + // Fill screen 0 with black memset(vs->getPixels(0, 0), 0, vs->pitch * vs->h); - + // Fade to black with the specified effect, if any. switch (effect) { case 1: @@ -3305,7 +3305,7 @@ void ScummEngine::transitionEffect(int a) { /** * Update width*height areas of the screen, in random order, until the whole * screen has been updated. For instance: - * + * * dissolveEffect(1, 1) produces a pixel-by-pixel dissolve * dissolveEffect(8, 8) produces a square-by-square dissolve * dissolveEffect(virtsrc[0].width, 1) produces a line-by-line dissolve @@ -3384,7 +3384,7 @@ void ScummEngine::dissolveEffect(int width, int height) { blits = 0; blits_before_refresh = (3 * w * h) / 25; - + // Speed up the effect for CD Loom since it uses it so often. I don't // think the original had any delay at all, so on modern hardware it // wasn't even noticeable. diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 3c7d742ba2..24badd2685 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/he/animation_he.h" #include "scumm/he/intern_he.h" @@ -58,11 +58,11 @@ int MoviePlayer::load(const char *filename, int flags, int image) { // Change file extension to dxa sprintf(videoName, "%s.dxa", baseName); - + if (!loadFile(videoName)) { warning("Failed to load video file %s", videoName); return -1; - } + } debug(1, "Playing video %s", videoName); // Skip sound tag @@ -101,7 +101,7 @@ void MoviePlayer::handleNextFrame() { copyFrameToBuffer(dst, 0, 0, _vm->_screenWidth); } else if (_flags & 1) { copyFrameToBuffer(pvs->getBackPixels(0, 0), 0, 0, _vm->_screenWidth); - + Common::Rect imageRect(_width, _height); _vm->restoreBackgroundHE(imageRect); } else { diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp index 737e2772ff..e611c85e9d 100644 --- a/engines/scumm/he/cup_player_he.cpp +++ b/engines/scumm/he/cup_player_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" #include "sound/audiostream.h" #include "sound/mixer.h" diff --git a/engines/scumm/he/floodfill_he.cpp b/engines/scumm/he/floodfill_he.cpp index ea2043d69f..4fdfe139fc 100644 --- a/engines/scumm/he/floodfill_he.cpp +++ b/engines/scumm/he/floodfill_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/he/floodfill_he.h" #include "scumm/he/intern_he.h" @@ -31,7 +31,7 @@ #include "scumm/scumm.h" namespace Scumm { - + static bool floodFillPixelCheck(int x, int y, const FloodFillState *ffs) { int diffColor = ffs->color1 - ffs->color2; if (x >= 0 && x < ffs->dst_w && y >= 0 && y < ffs->dst_h) { @@ -81,10 +81,10 @@ static void floodFillAddLine(FloodFillLine **ffl, int y, int x1, int x2, int dy) static void floodFillProcess(int x, int y, FloodFillState *ffs, FloodFillPixelCheckCallback pixelCheckCallback) { ffs->dstBox.left = ffs->dstBox.top = 12345; ffs->dstBox.right = ffs->dstBox.bottom = -12345; - + FloodFillLine **fillLineCur = &ffs->fillLineTableCur; FloodFillLine **fillLineEnd = &ffs->fillLineTableEnd; - + assert(*fillLineCur < *fillLineEnd); if (ffs->srcBox.top <= y + 1 && ffs->srcBox.bottom >= y + 1) { (*fillLineCur)->y = y; @@ -93,7 +93,7 @@ static void floodFillProcess(int x, int y, FloodFillState *ffs, FloodFillPixelCh (*fillLineCur)->inc = 1; (*fillLineCur)++; } - + assert(*fillLineCur < *fillLineEnd); if (ffs->srcBox.top <= y && ffs->srcBox.bottom >= y) { (*fillLineCur)->y = y + 1; @@ -105,7 +105,7 @@ static void floodFillProcess(int x, int y, FloodFillState *ffs, FloodFillPixelCh assert(ffs->fillLineTable <= *fillLineCur); FloodFillLine **fillLineStart = fillLineCur; - + while (ffs->fillLineTable < *fillLineStart) { Common::Rect r; int x_start; @@ -190,7 +190,7 @@ void floodFill(FloodFillParameters *ffp, ScummEngine_v90he *vm) { Common::Rect r; r.left = r.top = 12345; r.right = r.bottom = -12345; - + FloodFillState *ffs = new FloodFillState; ffs->fillLineTableCount = vs->h * 2; ffs->fillLineTable = new FloodFillLine[ffs->fillLineTableCount]; @@ -201,25 +201,25 @@ void floodFill(FloodFillParameters *ffp, ScummEngine_v90he *vm) { ffs->srcBox = ffp->box; ffs->fillLineTableCur = &ffs->fillLineTable[0]; ffs->fillLineTableEnd = &ffs->fillLineTable[ffs->fillLineTableCount]; - + if (ffp->x < 0 || ffp->y < 0 || ffp->x >= vs->w || ffp->y >= vs->h) { ffs->color1 = color; } else { ffs->color1 = *(dst + ffp->y * vs->w + ffp->x); } - + debug(5, "floodFill() x=%d y=%d color1=%d ffp->flags=0x%X", ffp->x, ffp->y, ffs->color1, ffp->flags); if (ffs->color1 != color) { floodFillProcess(ffp->x, ffp->y, ffs, floodFillPixelCheck); r = ffs->dstBox; } r.debugPrint(5, "floodFill() dirty_rect"); - + delete[] ffs->fillLineTable; delete ffs; - + vm->VAR(119) = 1; - + if (r.left <= r.right && r.top <= r.bottom) { if (ffp->flags & 0x8000) { vm->restoreBackgroundHE(r); @@ -271,19 +271,19 @@ void Wiz::fillWizFlood(const WizParameters *params) { ffs->srcBox = imageRect; ffs->fillLineTableCur = &ffs->fillLineTable[0]; ffs->fillLineTableEnd = &ffs->fillLineTable[ffs->fillLineTableCount]; - + if (px < 0 || py < 0 || px >= w || py >= h) { ffs->color1 = color; } else { ffs->color1 = *(wizd + py * w + px); } - + debug(0, "floodFill() x=%d y=%d color1=%d", px, py, ffs->color1); if (ffs->color1 != color) { floodFillProcess(px, py, ffs, floodFillPixelCheck); } - + delete[] ffs->fillLineTable; delete ffs; } diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index 7a0869ad24..49acde9465 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/he/intern_he.h" #include "scumm/he/logic_he.h" diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h index af5457295b..4f850e0f32 100644 --- a/engines/scumm/he/logic_he.h +++ b/engines/scumm/he/logic_he.h @@ -26,7 +26,7 @@ #if !defined(SCUMM_HE_LOGIC_HE_H) && !defined(DISABLE_HE) #define SCUMM_HE_LOGIC_HE_H -#include "common/stdafx.h" + namespace Scumm { diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp index 9efc16c60b..aac7bb5848 100644 --- a/engines/scumm/he/palette_he.cpp +++ b/engines/scumm/he/palette_he.cpp @@ -22,7 +22,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" #include "scumm/scumm.h" #include "scumm/he/intern_he.h" diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 651c150cee..9bebd7a47d 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/file.h" #include "scumm/he/intern_he.h" @@ -668,7 +668,7 @@ bool Win32ResExtractor::read_library(WinLibrary *fi) { DOSImageHeader *mz_header = MZ_HEADER(fi->memory); RETURN_IF_BAD_POINTER(false, mz_header->lfanew); - + // Apply endian fix (currently only lfanew is used from the DOSImageHeader, // so we don't bother to 'fix' the rest). LE32(mz_header->lfanew); @@ -726,7 +726,7 @@ bool Win32ResExtractor::read_library(WinLibrary *fi) { error("%s: file contains no resources", fi->file->name()); return false; } - + fix_win32_image_data_directory(dir); fi->first_resource = fi->memory + dir->virtual_address; @@ -1154,7 +1154,7 @@ int MacResExtractor::extractResource(int id, byte **buf) { // Some programs write it as .bin. Try that too if (!in.open(_fileName)) { Common::String tmp(_fileName); - + _fileName += ".bin"; if (!in.open(_fileName)) { @@ -1749,7 +1749,7 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) { src = sdat2Ptr + 8; dst = sdat1Ptr + 8 + _sndPtrOffs; len = sdat2size; - + memcpy(dst, src, len); _sndPtrOffs += sdat2size; @@ -1758,14 +1758,14 @@ void ScummEngine_v80he::createSound(int snd1id, int snd2id) { src = sdat2Ptr + 8; dst = sdat1Ptr + 8 + _sndPtrOffs; len = sdat1size; - + memcpy(dst, src, len); if (sdat2size != sdat1size) { src = sdat2Ptr + 8 + sdat1size; dst = sdat1Ptr + 8; len = sdat2size - sdat1size; - + memcpy(dst, src, len); } diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index e234dd02fc..273f6c6920 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" @@ -1681,7 +1681,7 @@ void ScummEngine_v100he::o100_setSystemMessage() { // behavior can occur, from strange wrong titles, up to crashes (happens // under Mac OS X). // - // Possible fixes/workarounds: + // Possible fixes/workarounds: // - Simply stop using this. It's a rather unimportant "feature" anyway. // - Try to translate the text to ASCII. // - Refine OSystem to accept window captions that are non-ASCII, e.g. diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index 0b9c94fe18..2909a44223 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/savefile.h" #include "scumm/actor.h" diff --git a/engines/scumm/he/script_v70he.cpp b/engines/scumm/he/script_v70he.cpp index 1ced349225..b2009452b4 100644 --- a/engines/scumm/he/script_v70he.cpp +++ b/engines/scumm/he/script_v70he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/system.h" @@ -1105,7 +1105,7 @@ void ScummEngine_v70he::o70_setSystemMessage() { // behavior can occur, from strange wrong titles, up to crashes (happens // under Mac OS X). // - // Possible fixes/workarounds: + // Possible fixes/workarounds: // - Simply stop using this. It's a rather unimportant "feature" anyway. // - Try to translate the text to ASCII. // - Refine OSystem to accept window captions that are non-ASCII, e.g. diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 8953d55546..5db2ae74ec 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/savefile.h" @@ -2256,7 +2256,7 @@ void ScummEngine_v72he::o72_setSystemMessage() { // behavior can occur, from strange wrong titles, up to crashes (happens // under Mac OS X). // - // Possible fixes/workarounds: + // Possible fixes/workarounds: // - Simply stop using this. It's a rather unimportant "feature" anyway. // - Try to translate the text to ASCII. // - Refine OSystem to accept window captions that are non-ASCII, e.g. diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp index a62b65787c..d4a11240bd 100644 --- a/engines/scumm/he/script_v80he.cpp +++ b/engines/scumm/he/script_v80he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-file.h" #include "common/config-manager.h" diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp index a717eecc50..e344db21be 100644 --- a/engines/scumm/he/script_v90he.cpp +++ b/engines/scumm/he/script_v90he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/charset.h" diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index d0a16390dd..b074f644e0 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/file.h" #include "scumm/imuse/imuse.h" @@ -57,7 +57,7 @@ SoundHE::SoundHE(ScummEngine *parent, Audio::Mixer *mixer) _heMusicTracks(0) { memset(_heChannel, 0, sizeof(_heChannel)); -} +} SoundHE::~SoundHE() { free(_heMusic); @@ -81,7 +81,7 @@ void SoundHE::addSoundToQueue2(int sound, int heOffset, int heChannel, int heFla if (_soundQue2[i].sound == sound && !(heFlags & 2)) return; } - + Sound::addSoundToQueue2(sound, heOffset, heChannel, heFlags); } diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp index 15698dedba..1e694ff067 100644 --- a/engines/scumm/he/sprite_he.cpp +++ b/engines/scumm/he/sprite_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/he/intern_he.h" #include "scumm/resource.h" diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index a99f3b1ad5..97995fb155 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" #include "graphics/cursorman.h" diff --git a/engines/scumm/help.cpp b/engines/scumm/help.cpp index 16605605e9..4752cfa43a 100644 --- a/engines/scumm/help.cpp +++ b/engines/scumm/help.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/str.h" #include "common/util.h" diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index e604222733..1da6bdf627 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "base/version.h" diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp index ffe572aaa9..c581f4ba3b 100644 --- a/engines/scumm/imuse/imuse_part.cpp +++ b/engines/scumm/imuse/imuse_part.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/util.h" #include "scumm/imuse/imuse_internal.h" @@ -232,7 +232,7 @@ void Part::noteOn(byte note, byte velocity) { mc = _player->getMidiDriver()->getPercussionChannel(); if (!mc) return; - + // FIXME: The following is evil, EVIL!!! Either prev_vol_eff is // actually meant to be a member of the Part class (i.e. each // instance of Part keeps a separate copy of it); or it really diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp index b6ed9f8d25..253bd919c6 100644 --- a/engines/scumm/imuse/imuse_player.cpp +++ b/engines/scumm/imuse/imuse_player.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/util.h" #include "engines/engine.h" diff --git a/engines/scumm/imuse/instrument.cpp b/engines/scumm/imuse/instrument.cpp index b6ed064bc9..cadafd412a 100644 --- a/engines/scumm/imuse/instrument.cpp +++ b/engines/scumm/imuse/instrument.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/saveload.h" #include "scumm/imuse/instrument.h" diff --git a/engines/scumm/imuse/instrument.h b/engines/scumm/imuse/instrument.h index e8914e899e..4d4e40c528 100644 --- a/engines/scumm/imuse/instrument.h +++ b/engines/scumm/imuse/instrument.h @@ -25,7 +25,7 @@ #ifndef SCUMM_IMUSE_INSTRUMENT_H #define SCUMM_IMUSE_INSTRUMENT_H -#include "common/stdafx.h" + #include "common/scummsys.h" class MidiChannel; diff --git a/engines/scumm/imuse/sysex.h b/engines/scumm/imuse/sysex.h index adffc24e88..bff80de9e7 100644 --- a/engines/scumm/imuse/sysex.h +++ b/engines/scumm/imuse/sysex.h @@ -25,7 +25,7 @@ #ifndef SCUMM_IMUSE_SYSEX_H #define SCUMM_IMUSE_SYSEX_H -#include "common/stdafx.h" + #include "common/util.h" namespace Scumm { diff --git a/engines/scumm/imuse/sysex_samnmax.cpp b/engines/scumm/imuse/sysex_samnmax.cpp index 0586db25ee..cdae767abf 100644 --- a/engines/scumm/imuse/sysex_samnmax.cpp +++ b/engines/scumm/imuse/sysex_samnmax.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/endian.h" #include "common/util.h" diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp index bee790e009..87873d1693 100644 --- a/engines/scumm/imuse/sysex_scumm.cpp +++ b/engines/scumm/imuse/sysex_scumm.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/endian.h" #include "common/util.h" diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp index 6d2e7dd217..776b840145 100644 --- a/engines/scumm/imuse_digi/dimuse.cpp +++ b/engines/scumm/imuse_digi/dimuse.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/system.h" #include "common/timer.h" diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp index 03b3e4e74a..f0b4bc131b 100644 --- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/scummsys.h" #include "scumm/scumm.h" #include "scumm/util.h" diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp index b79c7111f9..8ff8bd2461 100644 --- a/engines/scumm/imuse_digi/dimuse_codecs.cpp +++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/scummsys.h" #include "common/endian.h" #include "common/util.h" diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp index bdfc4bf4fa..af4966b2ff 100644 --- a/engines/scumm/imuse_digi/dimuse_music.cpp +++ b/engines/scumm/imuse_digi/dimuse_music.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/scummsys.h" #include "scumm/scumm.h" #include "scumm/imuse_digi/dimuse.h" diff --git a/engines/scumm/imuse_digi/dimuse_script.cpp b/engines/scumm/imuse_digi/dimuse_script.cpp index ddc0cd5107..0895be540b 100644 --- a/engines/scumm/imuse_digi/dimuse_script.cpp +++ b/engines/scumm/imuse_digi/dimuse_script.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/system.h" #include "common/timer.h" @@ -403,7 +403,7 @@ void IMuseDigital::stopAllSounds() { delete track->streamSou; track->streamSou = NULL; } - + // Mark the track as unused track->used = false; } diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp index be80cb73e8..51f5c76815 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/scummsys.h" #include "common/util.h" diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.h b/engines/scumm/imuse_digi/dimuse_sndmgr.h index e4e2e795a2..f38589df3d 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.h +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.h @@ -25,7 +25,7 @@ #ifndef SCUMM_IMUSE_DIGI_SNDMGR_H #define SCUMM_IMUSE_DIGI_SNDMGR_H -#include "common/stdafx.h" + #include "common/scummsys.h" #include "sound/audiostream.h" #include "scumm/imuse_digi/dimuse_bndmgr.h" diff --git a/engines/scumm/imuse_digi/dimuse_tables.cpp b/engines/scumm/imuse_digi/dimuse_tables.cpp index 9c56063557..e190e5a755 100644 --- a/engines/scumm/imuse_digi/dimuse_tables.cpp +++ b/engines/scumm/imuse_digi/dimuse_tables.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "scumm/imuse_digi/dimuse.h" namespace Scumm { diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index 987e1bc3c9..86570f478d 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "common/timer.h" #include "scumm/actor.h" @@ -321,7 +321,7 @@ IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(const Track *track, int f } fadeTrack = _track[track->trackId + MAX_DIGITAL_TRACKS]; - + // Clone the settings of the given track memcpy(fadeTrack, track, sizeof(Track)); diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 94fafc78de..6b45b7b415 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/events.h" @@ -322,7 +322,7 @@ void ScummEngine::processInput() { if (!lastKeyHit.ascii) return; - + processKeyboard(lastKeyHit); } @@ -334,7 +334,7 @@ void ScummEngine_v8::processKeyboard(Common::KeyState lastKeyHit) { if (lastKeyHit.keycode == Common::KEYCODE_F1 && lastKeyHit.flags == 0) { lastKeyHit = Common::KeyState(Common::KEYCODE_F5, 319); } - + // Alt-F5 should bring up the original save/load dialog, so map it to F1. if (lastKeyHit.keycode == Common::KEYCODE_F5 && lastKeyHit.flags == Common::KBD_ALT) { lastKeyHit = Common::KeyState(Common::KEYCODE_F1, 315); @@ -491,7 +491,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) { } else if (cutsceneExitKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_ESCAPE && lastKeyHit.flags == 0)) { abortCutscene(); - + // FIXME: Is the following line really necessary? _mouseAndKeyboardStat = VAR(VAR_CUTSCENEEXIT_KEY); @@ -522,7 +522,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) { // Display the talk speed ValueDisplayDialog dlg("Subtitle speed: ", 0, 9, 9 - _defaultTalkDelay, '+', '-'); _defaultTalkDelay = 9 - runDialog(dlg); - + // Save the new talkspeed value to ConfMan setTalkspeed(_defaultTalkDelay); diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp index af09daff96..912ff97d19 100644 --- a/engines/scumm/insane/insane.cpp +++ b/engines/scumm/insane/insane.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" diff --git a/engines/scumm/insane/insane_ben.cpp b/engines/scumm/insane/insane_ben.cpp index 1732ce0b11..4f29c85d77 100644 --- a/engines/scumm/insane/insane_ben.cpp +++ b/engines/scumm/insane/insane_ben.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" diff --git a/engines/scumm/insane/insane_enemy.cpp b/engines/scumm/insane/insane_enemy.cpp index 3866cf230d..a152a675ef 100644 --- a/engines/scumm/insane/insane_enemy.cpp +++ b/engines/scumm/insane/insane_enemy.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" @@ -98,7 +98,7 @@ int32 Insane::enemy0handler(int32 actor1, int32 actor2, int32 probability) { act2damage = _actor[actor2].damage; // ebp act1x = _actor[actor1].x; // esi act2x = _actor[actor2].x; // edi - + if (!_actor[actor1].defunct) { if (_enHdlVar[EN_ROTT1][1] > _enHdlVar[EN_ROTT1][2]) { if (act1damage - act2damage >= 30) { @@ -262,7 +262,7 @@ int32 Insane::enemy1handler(int32 actor1, int32 actor2, int32 probability) { act2damage = _actor[actor2].damage; // ebp act1x = _actor[actor1].x; // esi act2x = _actor[actor2].x; // edi - + if (!_actor[actor1].defunct) { if (_enHdlVar[EN_ROTT2][1] > _enHdlVar[EN_ROTT2][2]) { if (act1damage - act2damage >= 30) { @@ -556,7 +556,7 @@ int32 Insane::enemy3handler(int32 actor1, int32 actor2, int32 probability) { act2damage = _actor[actor2].damage; // ebp act1x = _actor[actor1].x; // esi act2x = _actor[actor2].x; // edi - + if (!_actor[actor1].defunct) { if (_enHdlVar[EN_VULTF1][1] > _enHdlVar[EN_VULTF1][2]) { if ((act1damage - act2damage >= 30) && (_vm->_rnd.getRandomNumber(probability - 1) != 1)) @@ -664,7 +664,7 @@ int32 Insane::enemy3handler(int32 actor1, int32 actor2, int32 probability) { } _enHdlVar[EN_VULTF1][7] = _enHdlVar[EN_VULTF1][8]; } - + } _enHdlVar[EN_VULTF1][1]++; _enHdlVar[EN_VULTF1][3]++; @@ -882,7 +882,7 @@ int32 Insane::enemy5handler(int32 actor1, int32 actor2, int32 probability) { act1damage = _actor[actor1].damage; // ebx act1x = _actor[actor1].x; // esi act2x = _actor[actor2].x; // ebp - + dist = ABS(act1x - act2x); if (weaponMaxRange(actor1) >= dist) { @@ -1187,7 +1187,7 @@ int32 Insane::enemy7handler(int32 actor1, int32 actor2, int32 probability) { goto _labelA; } } - + if (weaponMaxRange(actor1) <= dist) { if (act2x < act1x) _actor[actor1].cursorX = -101; @@ -1342,7 +1342,7 @@ void Insane::turnEnemy(bool battle) { if (battle) buttons = actionEnemy(); - debug(5, "11:%d 12:%d 13:%d 10:%d", _actor[1].act[1].state, + debug(5, "11:%d 12:%d 13:%d 10:%d", _actor[1].act[1].state, _actor[1].act[2].state, _actor[1].act[3].state, _actor[1].act[0].state); actor11Reaction(buttons); actor12Reaction(buttons); @@ -1361,7 +1361,7 @@ void Insane::actor11Reaction(int32 buttons) { setEnemyAnimation(1, 6); _actor[1].act[1].state = 41; } - + if (_actor[1].cursorX >= -100) { setEnemyAnimation(1, 7); _actor[1].act[1].state = 40; @@ -1388,7 +1388,7 @@ void Insane::actor11Reaction(int32 buttons) { setEnemyAnimation(1, 8); _actor[1].act[1].state = 39; } - + if (_actor[1].field_8 == 48) _actor[1].tilt = 0; else @@ -1445,7 +1445,7 @@ void Insane::actor11Reaction(int32 buttons) { setEnemyAnimation(1, 12); _actor[1].act[1].state = 57; } - + if (_actor[1].cursorX <= 100) { setEnemyAnimation(1, 11); _actor[1].act[1].state = 56; @@ -1456,13 +1456,13 @@ void Insane::actor11Reaction(int32 buttons) { _actor[1].x += _actor[1].cursorX / 32; break; } - + tmpx = _actor[1].x; tmpy = _actor[1].y + _actor[1].y1; if (_actor[1].act[1].room) smlayer_putActor(1, 1, tmpx, tmpy, _smlayer_room2); - else + else smlayer_putActor(1, 1, tmpx, tmpy, _smlayer_room); _actor[1].animWeaponClass = _actor[1].weaponClass; @@ -1529,7 +1529,7 @@ void Insane::chooseEnemyWeaponAnim(int32 buttons) { default: switchEnemyWeapon(); } - + _weaponEnemyJustSwitched = true; } else { _weaponEnemyJustSwitched = false; @@ -1583,7 +1583,7 @@ void Insane::setEnemyState(void) { _actor[1].act[2].state = 98; else _actor[1].act[2].state = 99; - + return; } @@ -1803,7 +1803,7 @@ void Insane::actor12Reaction(int32 buttons) { smlayer_setActorFacing(1, 2, 20, 180); _actor[1].act[2].state = 16; } - break; + break; default: smlayer_setActorFacing(1, 2, 20, 180); _actor[1].act[2].state = 16; @@ -1971,7 +1971,7 @@ void Insane::actor12Reaction(int32 buttons) { } else { smlayer_setActorFacing(1, 2, 20, 180); _actor[1].act[2].state = 24; - + if (!_actor[1].field_54) smlayer_startSfx(246); } @@ -2065,7 +2065,7 @@ void Insane::actor12Reaction(int32 buttons) { case 34: smlayer_setActorLayer(1, 2, 5); _actor[1].kicking = false; - + if (!smlayer_actorNeedRedraw(1, 2)) { setEnemyState(); _actor[1].act[2].tilt = 0; @@ -2077,7 +2077,7 @@ void Insane::actor12Reaction(int32 buttons) { case 35: smlayer_setActorLayer(1, 2, 5); _actor[1].kicking = false; - + if (!smlayer_actorNeedRedraw(1, 2)) { switchEnemyWeapon(); _actor[1].act[2].tilt = 0; @@ -2386,7 +2386,7 @@ void Insane::actor12Reaction(int32 buttons) { smlayer_setActorLayer(1, 2, 4); _actor[1].kicking = false; if (_actor[1].act[2].frame >= 19) { - queueSceneSwitch(1, _smush_minedrivFlu, "minedriv.san", 64, 0, + queueSceneSwitch(1, _smush_minedrivFlu, "minedriv.san", 64, 0, _continueFrame1, 1300); _actor[1].act[2].state = 96; } @@ -2450,7 +2450,7 @@ void Insane::actor12Reaction(int32 buttons) { _actor[1].act[2].state = 103; case 103: _actor[1].kicking = false; - + if (_actor[1].act[2].frame >= 18 || ((_actor[1].x < 50 || _actor[1].x > 270) && _actor[1].act[2].frame >= 9)) { _enemy[EN_CAVEFISH].isEmpty = 1; @@ -2527,7 +2527,7 @@ void Insane::actor12Reaction(int32 buttons) { case 114: smlayer_setActorLayer(1, 2, 25); _actor[1].kicking = false; - + if (_actor[1].act[2].frame >= 16 || ((_actor[1].x < 50 || _actor[1].x > 270) && (_actor[1].act[2].frame >= 8))) { queueSceneSwitch(11, 0, _enemy[_currEnemy].filename, 64, 0, 0, 0); @@ -2549,7 +2549,7 @@ void Insane::actor12Reaction(int32 buttons) { case 116: smlayer_setActorLayer(1, 2, 25); _actor[1].kicking = false; - + if (_actor[1].act[2].frame >= 17 || ((_actor[1].x < 50 || _actor[1].x > 270) && _actor[1].act[2].frame >= 8)) { queueSceneSwitch(11, 0, _enemy[_currEnemy].filename, 64, 0, 0, 0); @@ -2607,7 +2607,7 @@ void Insane::actor13Reaction(int32 buttons) { case 52: if (_actor[1].runningSound) smlayer_stopSound(_actor[1].runningSound); - + if (_currScenePropIdx) shutCurrentScene(); @@ -2780,7 +2780,7 @@ int32 Insane::actionEnemy(void) { if (_actor[0].x + 90 > _actor[1].x) _actor[1].x = _actor[0].x + 90; } - + if (_actor[1].x < 0) { _actor[1].x = 0; _actor[1].x1 = -_actor[1].x1; diff --git a/engines/scumm/insane/insane_iact.cpp b/engines/scumm/insane/insane_iact.cpp index cc1be928bb..19f9c5aa80 100644 --- a/engines/scumm/insane/insane_iact.cpp +++ b/engines/scumm/insane/insane_iact.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" @@ -115,7 +115,7 @@ void Insane::iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12, par11 = b.readUint16LE(); // +20 cx tmp = b.readUint16LE(); // +22 par13 = b.readUint16LE(); // +24 ax - + if (par13 > _actor[0].x || par11 < _actor[0].x) { _tiresRustle = true; _actor[0].x1 = -_actor[0].x1; @@ -130,12 +130,12 @@ void Insane::iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12, case 6: switch (par2) { case 38: - smlayer_drawSomething(renderBitmap, codecparam, 50-19, 20-13, 3, + smlayer_drawSomething(renderBitmap, codecparam, 50-19, 20-13, 3, _smush_iconsNut, 7, 0, 0); _roadBranch = true; _iactSceneId = par4; break; - case 25: + case 25: _roadBumps = true; _actor[0].y1 = -_actor[0].y1; break; @@ -174,7 +174,7 @@ void Insane::iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12, if (_approachAnim < 0 || _approachAnim > 4) if (readArray(8)) { - smlayer_drawSomething(renderBitmap, codecparam, 270-19, 20-18, 3, + smlayer_drawSomething(renderBitmap, codecparam, 270-19, 20-18, 3, _smush_iconsNut, 20, 0, 0); _benHasGoggles = true; } @@ -234,7 +234,7 @@ void Insane::chooseEnemy(void) { } if (!notfound) { continue; - } + } } else { j = 0; do { @@ -252,11 +252,11 @@ void Insane::chooseEnemy(void) { } while (j < 9 && !notfound); if (!notfound) { _metEnemiesListTail = 0; - count = 0; + count = 0; continue; } } - + ++_metEnemiesListTail; assert(_metEnemiesListTail < ARRAYSIZE(_metEnemiesList)); _metEnemiesList[_metEnemiesListTail] = en2; @@ -350,8 +350,8 @@ void Insane::iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12, case 6: switch (par2) { case 38: - - smlayer_drawSomething(renderBitmap, codecparam, 270-19, 20-13, 3, + + smlayer_drawSomething(renderBitmap, codecparam, 270-19, 20-13, 3, _smush_icons2Nut, 10, 0, 0); _roadBranch = true; _iactSceneId = par4; @@ -373,16 +373,16 @@ void Insane::iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12, smush_setToFinish(); break; - case 25: + case 25: if (readArray(5) == 0) return; - + _carIsBroken = true; smlayer_drawSomething(renderBitmap, codecparam, 160-13, 20-10, 3, // QW _smush_icons2Nut, 8, 0, 0); break; case 11: - smlayer_drawSomething(renderBitmap, codecparam, 50-19, 20-13, 3, + smlayer_drawSomething(renderBitmap, codecparam, 50-19, 20-13, 3, _smush_icons2Nut, 9, 0, 0); _roadBranch = true; _iactSceneId = par4; @@ -436,7 +436,7 @@ void Insane::iactScene6(byte *renderBitmap, int32 codecparam, int32 setupsan12, case 6: switch (par2) { case 38: - smlayer_drawSomething(renderBitmap, codecparam, 270-19, 20-13, 3, + smlayer_drawSomething(renderBitmap, codecparam, 270-19, 20-13, 3, _smush_icons2Nut, 10, 0, 0); _roadBranch = true; _iactSceneId = par4; @@ -458,16 +458,16 @@ void Insane::iactScene6(byte *renderBitmap, int32 codecparam, int32 setupsan12, smush_setToFinish(); break; - case 25: + case 25: if (readArray(5) == 0) return; - + _carIsBroken = true; smlayer_drawSomething(renderBitmap, codecparam, 160-13, 20-10, 3, //QW _smush_icons2Nut, 8, 0, 0); break; case 11: - smlayer_drawSomething(renderBitmap, codecparam, 50-19, 20-13, 3, + smlayer_drawSomething(renderBitmap, codecparam, 50-19, 20-13, 3, _smush_icons2Nut, 9, 0, 0); _roadBranch = true; _iactSceneId = par4; @@ -492,7 +492,7 @@ void Insane::iactScene17(byte *renderBitmap, int32 codecparam, int32 setupsan12, case 6: switch (par2) { case 38: - smlayer_drawSomething(renderBitmap, codecparam, 28, 48, 1, + smlayer_drawSomething(renderBitmap, codecparam, 28, 48, 1, _smush_iconsNut, 6, 0, 0); _roadBranch = true; _iactSceneId = par4; @@ -506,7 +506,7 @@ void Insane::iactScene17(byte *renderBitmap, int32 codecparam, int32 setupsan12, _objectDetected = true; break; case 10: - smlayer_drawSomething(renderBitmap, codecparam, 28, 48, 1, + smlayer_drawSomething(renderBitmap, codecparam, 28, 48, 1, _smush_iconsNut, 6, 0, 0); if (_counter1 <= 4) { if (_counter1 == 4) diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp index 0cf6623664..792739d76a 100644 --- a/engines/scumm/insane/insane_scenes.cpp +++ b/engines/scumm/insane/insane_scenes.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" @@ -1226,7 +1226,7 @@ void Insane::postCase6(byte *renderBitmap, int32 codecparam, int32 setupsan12, flu = &_fluConf[7 + _iactSceneId2]; else flu = &_fluConf[0 + _iactSceneId2]; - + if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0); else diff --git a/engines/scumm/midiparser_eup.cpp b/engines/scumm/midiparser_eup.cpp index 9d26d1232b..592d43f7fe 100644 --- a/engines/scumm/midiparser_eup.cpp +++ b/engines/scumm/midiparser_eup.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "sound/midiparser.h" #include "sound/mididrv.h" #include "common/util.h" diff --git a/engines/scumm/midiparser_ro.cpp b/engines/scumm/midiparser_ro.cpp index fff4f616c0..858a852c22 100644 --- a/engines/scumm/midiparser_ro.cpp +++ b/engines/scumm/midiparser_ro.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "sound/midiparser.h" #include "sound/mididrv.h" #include "common/util.h" diff --git a/engines/scumm/nut_renderer.cpp b/engines/scumm/nut_renderer.cpp index 4d5097cf61..71182ca7a0 100644 --- a/engines/scumm/nut_renderer.cpp +++ b/engines/scumm/nut_renderer.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/file.h" #include "scumm/nut_renderer.h" @@ -118,7 +118,7 @@ void NutRenderer::loadFont(const char *filename) { uint32 offset = 0; uint32 decodedLength = 0; int l; - + _paletteMap = new byte[256]; for (l = 0; l < 256; l++) { _paletteMap[l] = 0; diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 128270538d..d3e96e5bef 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/actor.h" #include "scumm/bomp.h" @@ -113,7 +113,7 @@ void ScummEngine::setOwnerOf(int obj, int owner) { if (owner == 0) { clearOwnerOf(obj); - + // FIXME: See bug #1535358 and many others. Essentially, the following // code, while matching disasm of various versions of the SCUMM engine, // is total bullocks, and leads to odd crashes due to out-of-bounds @@ -125,7 +125,7 @@ void ScummEngine::setOwnerOf(int obj, int owner) { // The bad code: // if (ss->where == WIO_INVENTORY && _inventory[ss->number] == obj) { // That check makes no sense at all: _inventory only contains 80 items, - // which are in the order the player picked up items. We can only + // which are in the order the player picked up items. We can only // guess that the SCUMM coders meant to write // if (ss->where == WIO_INVENTORY && ss->number == obj) { // which would ensure that an object script that nukes itself gets @@ -133,10 +133,10 @@ void ScummEngine::setOwnerOf(int obj, int owner) { // lead to new regressions. // Another fix would be to completely remove this check, which should // not cause much problems, since it'll only succeed by pure chance. - // + // // For now we follow a more defensive route: We perform the check // if ss->number is small enough. - + ss = &vm.slot[_currentScript]; if (ss->where == WIO_INVENTORY) { if (ss->number < _numInventory && _inventory[ss->number] == obj) { @@ -174,7 +174,7 @@ void ScummEngine::clearOwnerOf(int obj) { } } } else { - + // Alternatively, scan the inventory to see if the object is in there... for (i = 0; i < _numInventory; i++) { if (_inventory[i] == obj) { @@ -182,7 +182,7 @@ void ScummEngine::clearOwnerOf(int obj) { // Found the object! Nuke it from the inventory. _res->nukeResource(rtInventory, i); _inventory[i] = 0; - + // Now fill up the gap removing the object from the inventory created. a = _inventory; for (i = 0; i < _numInventory - 1; i++, a++) { diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index a29cf5fdaa..39bac051e8 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -22,7 +22,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" #include "common/util.h" diff --git a/engines/scumm/player_mod.cpp b/engines/scumm/player_mod.cpp index 9005376187..71842d74b0 100644 --- a/engines/scumm/player_mod.cpp +++ b/engines/scumm/player_mod.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/player_mod.h" #include "sound/mixer.h" #include "sound/rate.h" diff --git a/engines/scumm/player_nes.cpp b/engines/scumm/player_nes.cpp index 5d3424da42..2a3cb438be 100644 --- a/engines/scumm/player_nes.cpp +++ b/engines/scumm/player_nes.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" #include "scumm/player_nes.h" #include "scumm/scumm.h" @@ -95,12 +95,12 @@ protected: byte wavehold; uint32 freq; // short uint32 CurD; - + public: byte Timer; int32 Pos; uint32 Cycles; // short - + inline byte GetTimer() const { return Timer; }; }; @@ -364,7 +364,7 @@ void Noise::Reset(void) { CurD = 1; Cycles = 1; EnvCtr = 1; - + } void Noise::Write(int Reg, byte Val) { @@ -450,7 +450,7 @@ protected: uint32 Cycles; int Num; } Frame; - + public: APU(int rate) : SampleRate(rate) { Reset(); @@ -499,7 +499,7 @@ byte APU::Read4015(void) { void APU::Reset (void) { BufPos = 0; - + _square0.Reset(); _square1.Reset(); _triangle.Reset(); @@ -533,10 +533,10 @@ int step(T &obj, int sampcycles, uint frame_Cycles, int frame_Num) { if (!frame_Cycles) { frame_Cycles = 7457; - + if (frame_Num < 4) { obj.QuarterFrame(); - + if (frame_Num & 1) frame_Cycles++; else @@ -546,19 +546,19 @@ int step(T &obj, int sampcycles, uint frame_Cycles, int frame_Num) { } else frame_Num = 0; } - + if (!obj.Cycles) obj.Run(); samppos += obj.Pos; } - + return samppos; } int16 APU::GetSample(void) { int samppos = 0; - + const int sampcycles = 1+(1789773-BufPos-1)/SampleRate; BufPos = BufPos + sampcycles * SampleRate - 1789773; @@ -581,7 +581,7 @@ int16 APU::GetSample(void) { } Frame.Cycles -= tmp; - + return (samppos << 6) / sampcycles; } diff --git a/engines/scumm/player_v1.cpp b/engines/scumm/player_v1.cpp index 8ae2772a6c..c2b82581b3 100644 --- a/engines/scumm/player_v1.cpp +++ b/engines/scumm/player_v1.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" #include "scumm/player_v1.h" #include "scumm/scumm.h" diff --git a/engines/scumm/player_v2.cpp b/engines/scumm/player_v2.cpp index 82bb2cb4ec..01c077e4bc 100644 --- a/engines/scumm/player_v2.cpp +++ b/engines/scumm/player_v2.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" #include "scumm/player_v2.h" #include "scumm/scumm.h" diff --git a/engines/scumm/player_v2a.cpp b/engines/scumm/player_v2a.cpp index ceabbc7d95..8316bc2dc4 100644 --- a/engines/scumm/player_v2a.cpp +++ b/engines/scumm/player_v2a.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" #include "scumm/player_v2a.h" #include "scumm/scumm.h" diff --git a/engines/scumm/player_v3a.cpp b/engines/scumm/player_v3a.cpp index 76913f351d..d53716cba3 100644 --- a/engines/scumm/player_v3a.cpp +++ b/engines/scumm/player_v3a.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" #include "scumm/player_v3a.h" #include "scumm/scumm.h" diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index d96ecc58f6..4042ade9b4 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/str.h" #include "scumm/charset.h" @@ -101,7 +101,7 @@ void ScummEngine::openRoom(const int room) { _fileOffset = _res->roomoffs[rtRoom][room]; return; } - + Common::String filename(generateFilename(room)); // Determine the encryption, if any. @@ -327,7 +327,7 @@ void ScummEngine::readIndexFile() { bool checkTryMedia(BaseScummFile *handle) { byte buf[TRYMEDIA_MARK_LEN]; bool matched = true; - const byte magic[2][TRYMEDIA_MARK_LEN] = + const byte magic[2][TRYMEDIA_MARK_LEN] = {{ 0x00, 'T', 'M', 'S', 'A', 'M' }, { 'i', '=', '$', ':', '(', '$' }}; // Same but 0x69 xored diff --git a/engines/scumm/resource_v2.cpp b/engines/scumm/resource_v2.cpp index 816556775f..323aff849e 100644 --- a/engines/scumm/resource_v2.cpp +++ b/engines/scumm/resource_v2.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/file.h" #include "scumm/scumm.h" diff --git a/engines/scumm/resource_v3.cpp b/engines/scumm/resource_v3.cpp index 5b3fc8e546..ddcba30232 100644 --- a/engines/scumm/resource_v3.cpp +++ b/engines/scumm/resource_v3.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/intern.h" #include "scumm/file.h" diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp index 6a4e3f0c0a..0ced00e254 100644 --- a/engines/scumm/resource_v4.cpp +++ b/engines/scumm/resource_v4.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/intern.h" #include "scumm/file.h" diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp index bb0e0c88f8..dc3af6354d 100644 --- a/engines/scumm/room.cpp +++ b/engines/scumm/room.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/boxes.h" @@ -83,8 +83,8 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) { if (_game.id == GID_SAMNMAX) { // WORKAROUND bug #85373 SAM: Overlapping music at Bigfoot convention // Added sound queue processing between execution of exit - // script and entry script. In the case of this bug, the - // entry script required that the iMuse state be fully up + // script and entry script. In the case of this bug, the + // entry script required that the iMuse state be fully up // to date, including last-moment changes from the previous // exit script. _sound->processSound(); @@ -423,8 +423,8 @@ void ScummEngine::setupRoomSubBlocks() { _HEV7ActorPalette[i] = i; } } - - + + // WORKAROUND bug #1074444: The dreaded DOTT "Can't get teeth" bug // makes it impossible to go on playing w/o cheating in some way. // It's not quite clear what causes it, but the effect is that object @@ -729,7 +729,7 @@ void ScummEngine_v3old::resetRoomSubBlocks() { numOfBoxes++; ptr += 5; } - + ptr = roomptr + *(roomptr + 0x15); size = numOfBoxes * SIZEOF_BOX_C64 + 1; diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index bc18af8426..2aa64ff409 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/savefile.h" @@ -59,10 +59,10 @@ struct SaveInfoSection { uint32 type; uint32 version; uint32 size; - + uint32 timeTValue; // Obsolete since version 2, but kept for compatibility uint32 playtime; - + uint32 date; uint16 time; }; @@ -152,7 +152,7 @@ bool ScummEngine::loadState(int slot, bool compat) { // we see a version that is higher than anything we'd expect... if (hdr.ver > 0xFFFFFF) hdr.ver = SWAP_BYTES_32(hdr.ver); - + // Reject save games which are too old or too new. Note that // We do not really support V7 games, but still accept them here // to work around a bug from the stone age (see below for more @@ -385,23 +385,23 @@ void ScummEngine::makeSavegameName(char *out, int slot, bool temporary) { void ScummEngine::listSavegames(bool *marks, int num) { assert(marks); - + char prefix[256]; char slot[2]; int slotNum; Common::StringList filenames; - + makeSavegameName(prefix, 99, false); prefix[strlen(prefix)-2] = '*'; prefix[strlen(prefix)-1] = 0; memset(marks, false, num * sizeof(bool)); //assume no savegames for this title filenames = _saveFileMan->listSavefiles(prefix); - + for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){ //Obtain the last 2 digits of the filename, since they correspond to the save slot slot[0] = file->c_str()[file->size()-2]; slot[1] = file->c_str()[file->size()-1]; - + slotNum = atoi(slot); if (slotNum >= 0 && slotNum < num) marks[slotNum] = true; //mark this slot as valid @@ -509,8 +509,8 @@ bool ScummEngine::loadInfosFromSlot(int slot, InfoStuff *stuff) { delete in; return false; } - - delete in; + + delete in; return true; } @@ -540,11 +540,11 @@ bool ScummEngine::loadInfos(Common::InSaveFile *file, InfoStuff *stuff) { // For header version 1, we load the data in with our old method if (section.version == 1) { time_t tmp = section.timeTValue; - tm *curTime = localtime(&tmp); + tm *curTime = localtime(&tmp); stuff->date = (curTime->tm_mday & 0xFF) << 24 | ((curTime->tm_mon + 1) & 0xFF) << 16 | (curTime->tm_year + 1900) & 0xFFFF; stuff->time = (curTime->tm_hour & 0xFF) << 8 | (curTime->tm_min) & 0xFF; } - + if (section.version >= 2) { section.date = file->readUint32BE(); section.time = file->readUint16BE(); @@ -552,7 +552,7 @@ bool ScummEngine::loadInfos(Common::InSaveFile *file, InfoStuff *stuff) { stuff->date = section.date; stuff->time = section.time; } - + stuff->playtime = section.playtime; // Skip over the remaining (unsupported) data @@ -572,9 +572,9 @@ void ScummEngine::saveInfos(Common::OutSaveFile* file) { // still save old format for older versions section.timeTValue = time(0); section.playtime = _system->getMillis() / 1000 - _engineStartTime; - + time_t curTime_ = time(0); - tm *curTime = localtime(&curTime_); + tm *curTime = localtime(&curTime_); section.date = (curTime->tm_mday & 0xFF) << 24 | ((curTime->tm_mon + 1) & 0xFF) << 16 | (curTime->tm_year + 1900) & 0xFFFF; section.time = (curTime->tm_hour & 0xFF) << 8 | (curTime->tm_min) & 0xFF; diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index cc56adf622..9268768f2e 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/util.h" @@ -1141,7 +1141,7 @@ void ScummEngine::checkAndRunSentenceScript() { // // For now we assume that if there are more than 460 scripts, then // the pair 29/104 is used, else the pair 28/103. - + if (_res->num[rtScript] > 460) { if (sentenceScript == 104) sentenceScript = 29; diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp index 143e926604..127b453fc6 100644 --- a/engines/scumm/script_v0.cpp +++ b/engines/scumm/script_v0.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/charset.h" #include "scumm/intern.h" diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp index 532acc98a3..8f4f5e3d97 100644 --- a/engines/scumm/script_v2.cpp +++ b/engines/scumm/script_v2.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/charset.h" #include "scumm/intern.h" diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index ab870f3f94..3baf1b4127 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/charset.h" #include "scumm/intern.h" @@ -591,7 +591,7 @@ void ScummEngine_v5::o5_animateActor() { // WORKAROUND bug #859513: While on mars, going outside without your helmet // (or missing some other part of your "space suite" will cause your - // character to complain ("I can't breathe."). Unfortunately, this is + // character to complain ("I can't breathe."). Unfortunately, this is // coupled with an animate command, making it very difficult to return to // safety (from where you came). The following hack works around this by // ignoring that particular turn command. @@ -951,9 +951,9 @@ void ScummEngine_v5::loadVars() { loadIQPoints(); } break; - } - - listSavegames(avail_saves, ARRAYSIZE(avail_saves)); + } + + listSavegames(avail_saves, ARRAYSIZE(avail_saves)); for (slot = a; slot <= b; ++slot) { slotSize = getResourceSize(rtString, slot); slotContent = getResourceAddress(rtString, slot); @@ -965,7 +965,7 @@ void ScummEngine_v5::loadVars() { char *ptr = name; // slotContent ends with {'\0','@'} -> max. length = slotSize-2 for (pos = 0; pos < slotSize - 2; ++pos) { - if (!ptr[pos]) + if (!ptr[pos]) break; // replace special characters if (ptr[pos] >= 32 && ptr[pos] <= 122 && ptr[pos] != 64) @@ -973,7 +973,7 @@ void ScummEngine_v5::loadVars() { else slotContent[pos] = '_'; } - slotContent[pos] = '\0'; + slotContent[pos] = '\0'; } else { slotContent[0] = '\0'; } @@ -1020,7 +1020,7 @@ void ScummEngine_v5::loadIQPoints() { byte *tmp = (byte*)malloc(size); int nread = file->read(tmp, size); if (nread == size) { - memcpy(ptr, tmp, size); + memcpy(ptr, tmp, size); } free(tmp); delete file; @@ -2855,7 +2855,7 @@ void ScummEngine_v5::decodeParseString() { break; case 15:{ // SO_TEXTSTRING const int len = resStrLen(_scriptPointer); - + if (_game.id == GID_LOOM && strcmp((const char *) _scriptPointer, "I am Choas.") == 0) { // WORKAROUND: This happens when Chaos introduces // herself to bishop Mandible. Of all the places to put diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index e436489f25..85ace39498 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" @@ -2238,12 +2238,12 @@ void ScummEngine_v6::o6_wait() { break; return; case 232: // SO_WAIT_FOR_TURN - // WORKAROUND for bug #744441: An angle will often be received as the + // WORKAROUND for bug #744441: An angle will often be received as the // actor number due to script bugs in The Dig. In all cases where this // occurs, _curActor is set just before it, so we can use it instead. // // For now, if the value passed in is divisible by 45, assume it is an - // angle, and use _curActor as the actor to wait for. + // angle, and use _curActor as the actor to wait for. offs = fetchScriptWordSigned(); actnum = pop(); if (actnum % 45 == 0) { diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index 984604516d..0fdde28124 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/system.h" diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 60911a97dd..7bcf3e243b 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "common/md5.h" @@ -121,7 +121,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _gdi = new Gdi(this); } _res = new ResourceManager(this); - + // Convert MD5 checksum back into a digest for (int i = 0; i < 16; ++i) { char tmpStr[3] = "00"; @@ -131,9 +131,9 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) sscanf(tmpStr, "%x", &tmpVal); _gameMD5[i] = (byte)tmpVal; } - + _fileHandle = 0; - + // Init all vars _imuse = NULL; @@ -533,7 +533,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH); } - // Add debug levels + // Add debug levels for (int i = 0; i < ARRAYSIZE(debugChannels); ++i) Common::addSpecialDebugLevel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc); } @@ -591,7 +591,7 @@ ScummEngine::~ScummEngine() { free(_fmtownsBuf); delete _debugger; - + delete _res; delete _gdi; } @@ -603,7 +603,7 @@ ScummEngine_v5::ScummEngine_v5(OSystem *syst, const DetectorResult &dr) // All "classic" games (V5 and older) encrypted their data files // with exception of the GF_OLD256 games and the PC-Engine version // of Loom. - if (!(_game.features & GF_OLD256) && _game.platform != Common::kPlatformPCEngine) + if (!(_game.features & GF_OLD256) && _game.platform != Common::kPlatformPCEngine) _game.features |= GF_USE_KEY; static const uint16 default_cursor_images[4][16] = { @@ -620,12 +620,12 @@ ScummEngine_v5::ScummEngine_v5(OSystem *syst, const DetectorResult &dr) { 0x1e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x13ff, 0x1249, 0x1249, 0xf249, 0x9001, 0x9001, 0x9001, 0x8001, 0x8001, 0x8001, 0xffff }, }; - + static const byte default_cursor_hotspots[10] = { 8, 7, 8, 7, 1, 1, 5, 0, 8, 7, //zak256 }; - + for (int i = 0; i < 4; i++) { memcpy(_cursorImages[i], default_cursor_images[i], 32); @@ -829,7 +829,7 @@ ScummEngine_vCUPhe::ScummEngine_vCUPhe(OSystem *syst, const DetectorResult &dr) _game = dr.game; _filenamePattern = dr.fp, _quit = false; - + _cupPlayer = new CUP_Player(syst, this, _mixer); } @@ -856,7 +856,7 @@ int ScummEngine_vCUPhe::go() { void ScummEngine_vCUPhe::parseEvents() { Common::Event event; - + while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_QUIT: @@ -985,7 +985,7 @@ int ScummEngine::init() { assert(_game.id == GID_MANIAC); _fileHandle = new ScummNESFile(); _containerFile = _filenamePattern.pattern; - + _filenamePattern.pattern = "%.2d.LFL"; _filenamePattern.genMethod = kGenRoomNum; } else if (_game.platform == Common::kPlatformApple2GS) { @@ -994,7 +994,7 @@ int ScummEngine::init() { assert(_game.id == GID_MANIAC); tmpBuf1 = "maniac1.dsk"; tmpBuf2 = "maniac2.dsk"; - + _fileHandle = new ScummDiskImage(tmpBuf1, tmpBuf2, _game); _containerFile = tmpBuf1; @@ -1011,7 +1011,7 @@ int ScummEngine::init() { tmpBuf1 = "zak1.d64"; tmpBuf2 = "zak2.d64"; } - + _fileHandle = new ScummDiskImage(tmpBuf1, tmpBuf2, _game); _containerFile = tmpBuf1; @@ -1020,19 +1020,19 @@ int ScummEngine::init() { } else if (_game.platform == Common::kPlatformMacintosh) { // The mac versions of Indy4, Sam&Max, DOTT, FT and The Dig used a // special meta (container) file format to store the actual SCUMM data - // files. The rescumm utility used to be used to extract those files. - // While that is still possible, we now support reading those files + // files. The rescumm utility used to be used to extract those files. + // While that is still possible, we now support reading those files // directly. The first step is to check whether one of them is present - // (we do that here); the rest is handled by the ScummFile class and + // (we do that here); the rest is handled by the ScummFile class and // code in openResourceFile() (and in the Sound class, for MONSTER.SOU // handling). assert(_game.version >= 5 && _game.heversion == 0); _fileHandle = new ScummFile(); _containerFile = _filenamePattern.pattern; - - + + // We now have to determine the correct _filenamePattern. To do this - // we simply hardcode the possibilites. + // we simply hardcode the possibilites. const char *p1 = 0, *p2 = 0; switch (_game.id) { case GID_INDY4: @@ -1069,9 +1069,9 @@ int ScummEngine::init() { _game.features |= GF_DEMO; } else error("Couldn't find known subfile inside container file '%s'", _containerFile.c_str()); - + _fileHandle->close(); - + } else { error("kGenUnchanged used with unsupported platform"); } @@ -1079,7 +1079,7 @@ int ScummEngine::init() { // Regular access, no container file involved _fileHandle = new ScummFile(); } - + // Load CJK font, if present // Load it earlier so _useCJKMode variable could be set loadCJKFont(); @@ -1126,7 +1126,7 @@ void ScummEngine::setupScumm() { // On some systems it's not safe to run CD audio games from the CD. if (_game.features & GF_AUDIOTRACKS) { checkCD(); - + int cd_num = ConfMan.getInt("cdrom"); if (cd_num >= 0) _system->openCD(cd_num); @@ -1465,7 +1465,7 @@ void ScummEngine_v4::resetScumm() { ScummEngine::resetScumm(); // WORKAROUND for bug in boot script of Loom (CD) - // The boot script sets the characters of string 21, + // The boot script sets the characters of string 21, // before creating the string.resource. if (_game.id == GID_LOOM) { _res->createResource(rtString, 21, 12); @@ -1546,7 +1546,7 @@ void ScummEngine_v99he::resetScumm() { void ScummEngine::setupMusic(int midi) { int midiDriver = MidiDriver::detectMusicDriver(midi); _native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32")); - + switch (midiDriver) { case MD_NULL: _musicType = MDT_NONE; @@ -1598,7 +1598,7 @@ void ScummEngine::setupMusic(int midi) { _musicType = MDT_ADLIB; } } - + // DOTT + SAM use General MIDI, so they shouldn't use GS settings if ((_game.id == GID_TENTACLE) || (_game.id == GID_SAMNMAX)) _enable_gs = false; @@ -1660,7 +1660,7 @@ void ScummEngine::setupMusic(int midi) { if (ConfMan.hasKey("tempo")) _imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo")); // YM2162 driver can't handle midi->getPercussionChannel(), NULL shouldn't init MT-32/GM/GS - if ((midi != MDT_TOWNS) && (midi != MDT_NONE)) { + if ((midi != MDT_TOWNS) && (midi != MDT_NONE)) { _imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32); if (midiDriver != MD_MT32) // MT-32 Emulation shouldn't be GM/GS initialized _imuse->property(IMuse::PROP_GS, _enable_gs); @@ -1734,11 +1734,11 @@ int ScummEngine::go() { if (_debugger->isAttached()) _debugger->onFrame(); - + // Randomize the PRNG by calling it at regular intervals. This ensures // that it will be in a different state each time you run the program. _rnd.getRandomNumber(2); - + diff -= _system->getMillis(); waitForTimer(delta * 15 + diff); diff = _system->getMillis(); @@ -1813,7 +1813,7 @@ int ScummEngine::scummLoop(int delta) { CHARSET_1(); processInput(); - + scummLoop_updateScummVars(); if (_game.features & GF_AUDIOTRACKS) { @@ -1962,12 +1962,12 @@ int ScummEngine_v90he::scummLoop(int delta) { } int ret = ScummEngine::scummLoop(delta); - + _sprite->updateImages(); if (_game.heversion >= 98) { _logicHE->endOfFrame(); } - + return ret; } #endif @@ -2132,7 +2132,7 @@ void ScummEngine_v7::scummLoop_handleSound() { ScummEngine_v6::scummLoop_handleSound(); if (_imuseDigital) { _imuseDigital->flushTracks(); - // In CoMI and the full (non-demo) version of The Dig, also invoke IMuseDigital::refreshScripts + // In CoMI and the full (non-demo) version of The Dig, also invoke IMuseDigital::refreshScripts if ( ((_game.id == GID_DIG) && (!(_game.features & GF_DEMO))) || (_game.id == GID_CMI) ) _imuseDigital->refreshScripts(); } @@ -2257,7 +2257,7 @@ void ScummEngine::pauseEngineIntern(bool pause) { // Pause sound & video _oldSoundsPaused = _sound->_soundsPaused; _sound->pauseSounds(true); - + } else { // Update the screen to make it less likely that the player will see a // brief cursor palette glitch when the GUI is disabled. diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp index 065712fcad..5b8cd3a853 100644 --- a/engines/scumm/smush/channel.cpp +++ b/engines/scumm/smush/channel.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/smush/channel.h" namespace Scumm { diff --git a/engines/scumm/smush/chunk.cpp b/engines/scumm/smush/chunk.cpp index ee24773c82..5e6f05b3e4 100644 --- a/engines/scumm/smush/chunk.cpp +++ b/engines/scumm/smush/chunk.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/smush/chunk.h" #include "scumm/scumm.h" #include "scumm/file.h" @@ -133,7 +133,7 @@ uint32 FileChunk::read(void *buffer, uint32 dataSize) { dataSize = _data->read(buffer, dataSize); _curPos += dataSize; - + return dataSize; } diff --git a/engines/scumm/smush/codec1.cpp b/engines/scumm/smush/codec1.cpp index a1f04b6a29..d0d92fcd79 100644 --- a/engines/scumm/smush/codec1.cpp +++ b/engines/scumm/smush/codec1.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/endian.h" namespace Scumm { diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp index 5207374313..22ba1b443d 100644 --- a/engines/scumm/smush/codec37.cpp +++ b/engines/scumm/smush/codec37.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/endian.h" #include "common/util.h" #include "scumm/bomp.h" diff --git a/engines/scumm/smush/codec47.cpp b/engines/scumm/smush/codec47.cpp index 739c7308d3..0ad3815b1e 100644 --- a/engines/scumm/smush/codec47.cpp +++ b/engines/scumm/smush/codec47.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/endian.h" #include "common/util.h" #include "scumm/bomp.h" diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp index 951a4bdc7e..3a0efbc6b7 100644 --- a/engines/scumm/smush/imuse_channel.cpp +++ b/engines/scumm/smush/imuse_channel.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/endian.h" #include "scumm/scumm.h" // For DEBUG_SMUSH @@ -236,7 +236,7 @@ byte *ImuseChannel::getSoundData() { _sbuffer = 0; _sbufferSize = 0; - + return tmp; } diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp index 1bd74b2446..17296704ea 100644 --- a/engines/scumm/smush/saud_channel.cpp +++ b/engines/scumm/smush/saud_channel.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/endian.h" #include "scumm/util.h" @@ -168,7 +168,7 @@ byte *SaudChannel::getSoundData() { _sbuffer = 0; _sbufferSize = 0; - + return tmp; } diff --git a/engines/scumm/smush/smush_font.cpp b/engines/scumm/smush/smush_font.cpp index 094421cdcb..328fe694c1 100644 --- a/engines/scumm/smush/smush_font.cpp +++ b/engines/scumm/smush/smush_font.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/file.h" #include "scumm/scumm.h" #include "scumm/util.h" diff --git a/engines/scumm/smush/smush_mixer.cpp b/engines/scumm/smush/smush_mixer.cpp index 04103bb8d8..0a0cda5b76 100644 --- a/engines/scumm/smush/smush_mixer.cpp +++ b/engines/scumm/smush/smush_mixer.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/util.h" #include "scumm/smush/smush_mixer.h" diff --git a/engines/scumm/smush/smush_mixer.h b/engines/scumm/smush/smush_mixer.h index 86adcd3bdc..0bf6de2762 100644 --- a/engines/scumm/smush/smush_mixer.h +++ b/engines/scumm/smush/smush_mixer.h @@ -26,7 +26,7 @@ #ifndef SCUMM_SMUSH_MIXER_H #define SCUMM_SMUSH_MIXER_H -#include "common/stdafx.h" + #include "scumm/sound.h" namespace Scumm { diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 612f2771db..7c66c8124d 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "engines/engine.h" diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 62f65c22c1..c33f1130fd 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/file.h" #include "scumm/imuse/imuse.h" @@ -200,7 +200,7 @@ void Sound::playSound(int soundID) { else if (READ_BE_UINT32(ptr) == 0x460e200d) { // This sound resource occurs in the Macintosh version of Monkey Island. // I do now know whether it is used in any place other than the one - // mentioned in the bug report above; in case it is, I put a check here. + // mentioned in the bug report above; in case it is, I put a check here. assert(soundID == 39); // The samplerate is copied from the sound resouce 39 of the PC CD/VGA @@ -927,7 +927,7 @@ BaseScummFile *Sound::openSfxFile() { Common::String basename[2]; Common::String tmp; - + const char *ptr = strchr(_vm->_filenamePattern.pattern, '.'); if (ptr) { basename[0] = Common::String(_vm->_filenamePattern.pattern, ptr - _vm->_filenamePattern.pattern + 1); diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 83b4e90cf6..993c8e93e0 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" @@ -163,7 +163,7 @@ void ScummEngine_v6::drawBlastTexts() { do { c = *buf++; - + // FIXME: This is a workaround for bugs #864030 and #1399843: // In COMI, some text contains ASCII character 11 = 0xB. It's // not quite clear what it is good for; so for now we just ignore @@ -171,7 +171,7 @@ void ScummEngine_v6::drawBlastTexts() { // this is a 'vertical tab'). if (c == 0x0B) continue; - + // Some localizations may override colors // See credits in Chinese COMI if (c == '^' && (buf == _blastTextQueue[i].text + 1)) { @@ -568,7 +568,7 @@ void ScummEngine::CHARSET_1() { if (c == 13) { newLine:; _nextLeft = _string[0].xpos; -#ifndef DISABLE_SCUMM_7_8 +#ifndef DISABLE_SCUMM_7_8 if (_game.version >= 7 && subtitleLine != subtitleBuffer) { ((ScummEngine_v7 *)this)->addSubtitleToQueue(subtitleBuffer, subtitlePos, _charsetColor, _charset->getCurID()); subtitleLine = subtitleBuffer; @@ -1023,7 +1023,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize) *dst++ = 0xE1; continue; } - + // WORKAROUND for bug #1514457: Yet another script bug in Indy3. // Once more a german 'sz' was encoded incorrectly, but this time // they simply encoded it as 0xFF instead of 0xE1. Happens twice diff --git a/engines/scumm/thumbnail.cpp b/engines/scumm/thumbnail.cpp index 360d0de932..c928ed3421 100644 --- a/engines/scumm/thumbnail.cpp +++ b/engines/scumm/thumbnail.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/system.h" #include "common/savefile.h" #include "graphics/scaler.h" diff --git a/engines/scumm/usage_bits.cpp b/engines/scumm/usage_bits.cpp index ebf9261afb..da262defc9 100644 --- a/engines/scumm/usage_bits.cpp +++ b/engines/scumm/usage_bits.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/scumm.h" #include "scumm/usage_bits.h" diff --git a/engines/scumm/util.h b/engines/scumm/util.h index 0cf94eaff0..c05a90cfe6 100644 --- a/engines/scumm/util.h +++ b/engines/scumm/util.h @@ -26,7 +26,7 @@ #ifndef SCUMM_UTIL_H #define SCUMM_UTIL_H -#include "common/stdafx.h" + #include "common/scummsys.h" namespace Scumm { diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index 0dd4c83a0d..a00da335d2 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "common/config-manager.h" #include "scumm/scumm.h" #include "scumm/intern.h" diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index fe9c9824de..98dba43f13 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -23,7 +23,7 @@ * */ -#include "common/stdafx.h" + #include "scumm/actor.h" #include "scumm/charset.h" #include "scumm/intern.h" |