aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/actor.cpp2
-rw-r--r--engines/scumm/charset.cpp2
-rw-r--r--engines/scumm/costume.cpp10
-rw-r--r--engines/scumm/detection.cpp6
-rw-r--r--engines/scumm/gfx.cpp22
-rw-r--r--engines/scumm/gfx.h10
-rw-r--r--engines/scumm/gfx_towns.cpp40
-rw-r--r--engines/scumm/he/logic_he.cpp2
-rw-r--r--engines/scumm/he/resource_he.cpp2
-rw-r--r--engines/scumm/he/resource_he.h2
-rw-r--r--engines/scumm/he/script_v60he.cpp2
-rw-r--r--engines/scumm/he/script_v72he.cpp2
-rw-r--r--engines/scumm/imuse/imuse.cpp8
-rw-r--r--engines/scumm/imuse/imuse_internal.h2
-rw-r--r--engines/scumm/imuse/imuse_player.cpp6
-rw-r--r--engines/scumm/imuse/sysex_scumm.cpp2
-rw-r--r--engines/scumm/player_towns.cpp56
-rw-r--r--engines/scumm/player_towns.h12
-rw-r--r--engines/scumm/saveload.cpp4
-rw-r--r--engines/scumm/script_v5.cpp4
-rw-r--r--engines/scumm/scumm.cpp14
-rw-r--r--engines/scumm/scumm.h8
-rw-r--r--engines/scumm/sound.cpp2
-rw-r--r--engines/scumm/verbs.cpp18
24 files changed, 119 insertions, 119 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index e4057d1f13..20b929dfd4 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -1066,7 +1066,7 @@ static int checkXYInBoxBounds(int boxnum, int x, int y, int &destX, int &destY)
int dist;
// MM C64: This fixes the trunk bug (#3070065), as well
- // as the fruit bowl, however im not sure if its
+ // as the fruit bowl, however im not sure if its
// the proper solution or not.
if( g_scumm->_game.version == 0 )
yDist = ABS(y - destY);
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 97caa47d6a..7fb834ce98 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -1070,7 +1070,7 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
Graphics::Surface backSurface;
if ((ignoreCharsetMask || !vs->hasTwoBuffers)
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- && (_vm->_game.platform != Common::kPlatformFMTowns)
+ && (_vm->_game.platform != Common::kPlatformFMTowns)
#endif
) {
dstSurface = *vs;
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 75cde5e33a..4ca4988605 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -73,10 +73,10 @@ static const int v1MMNESLookup[25] = {
};
static const byte v0ActorTalkArray[0x19] = {
- 0x00, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x00, 0x46, 0x06,
- 0x06, 0x06, 0x06, 0xFF, 0xFF,
- 0x06, 0xC0, 0x06, 0x06, 0x00,
+ 0x00, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x00, 0x46, 0x06,
+ 0x06, 0x06, 0x06, 0xFF, 0xFF,
+ 0x06, 0xC0, 0x06, 0x06, 0x00,
0xC0, 0xC0, 0x00, 0x06, 0x06
};
@@ -1417,7 +1417,7 @@ byte C64CostumeLoader::increaseAnims(Actor *a) {
if (A->_moving && _vm->_currentRoom != 1 && _vm->_currentRoom != 44) {
if (a->_cost.soundPos == 0)
a->_cost.soundCounter++;
-
+
// Is this the correct location?
// 0x073C
if (v0ActorTalkArray[a->_number] & 0x3F)
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index e5c5906404..18f2f4ddec 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -272,7 +272,7 @@ static BaseScummFile *openDiskImage(const Common::FSNode &node, const GameFilena
GameSettings gs;
memset(&gs, 0, sizeof(GameSettings));
gs.gameid = gfp->gameid;
- gs.id = (Common::String(gfp->gameid) == "maniac" ? GID_MANIAC : GID_ZAK);
+ gs.id = (Common::String(gfp->gameid) == "maniac" ? GID_MANIAC : GID_ZAK);
gs.platform = gfp->platform;
// determine second disk file name
@@ -454,7 +454,7 @@ static void composeFileHashMap(DescMap &fileMD5Map, const Common::FSList &fslist
matched = true;
break;
}
-
+
if (!matched)
continue;
@@ -515,7 +515,7 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
if (d.md5.empty()) {
Common::SeekableReadStream *tmp = 0;
bool isDiskImg = (file.hasSuffix(".d64") || file.hasSuffix(".dsk") || file.hasSuffix(".prg"));
-
+
if (isDiskImg) {
tmp = openDiskImage(d.node, gfp);
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index fd529b36fe..2b0ded1c0a 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -655,9 +655,9 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns) {
towns_drawStripToScreen(vs, x, y, x, top, width, height);
- return;
+ return;
} else
-#endif
+#endif
if (_outputPixelFormat.bytesPerPixel == 2) {
const byte *srcPtr = (const byte *)src;
const byte *textPtr = (byte *)_textSurface.getBasePtr(x * m, y * m);
@@ -1024,7 +1024,7 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
if (rect.left > vs->w)
return;
-
+
// Convert 'rect' to local (virtual screen) coordinates
rect.top -= vs->topline;
rect.bottom -= vs->topline;
@@ -1068,7 +1068,7 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
fill(mask, _textSurface.pitch, backColor, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
}
#endif
-
+
if (_game.features & GF_16BIT_COLOR)
fill(screenBuf, vs->pitch, _16BitPalette[backColor], width, height, vs->format.bytesPerPixel);
else
@@ -1128,7 +1128,7 @@ void ScummEngine::clearTextSurface() {
fill((byte*)_textSurface.pixels, _textSurface.pitch,
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
_game.platform == Common::kPlatformFMTowns ? 0 :
-#endif
+#endif
CHARSET_MASK_TRANSPARENCY, _textSurface.w, _textSurface.h, _textSurface.format.bytesPerPixel);
}
@@ -1345,12 +1345,12 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) {
color = ((color & 0x0f) << 4) | (color & 0x0f);
byte *mask = (byte *)_textSurface.getBasePtr(x * _textSurfaceMultiplier, (y - _screenTop + vs->topline) * _textSurfaceMultiplier);
fill(mask, _textSurface.pitch, color, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
-
+
if (_game.id == GID_MONKEY2 || _game.id == GID_INDY4 || ((_game.id == GID_INDY3 || _game.id == GID_ZAK) && vs->number != kTextVirtScreen) || (_game.id == GID_LOOM && vs->number == kMainVirtScreen))
return;
}
#endif
-
+
fill(backbuff, vs->pitch, color, width, height, vs->format.bytesPerPixel);
}
}
@@ -4010,7 +4010,7 @@ void ScummEngine::scrollEffect(int dir) {
y = 1 + step;
while (y < vs->h) {
moveScreen(0, -step, vs->h);
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_townsScreen) {
towns_drawStripToScreen(vs, 0, vs->topline + vs->h - step, 0, y - step, vs->w, step);
} else
@@ -4023,7 +4023,7 @@ void ScummEngine::scrollEffect(int dir) {
vs->w * m, step * m);
_system->updateScreen();
}
-
+
waitForTimer(delay);
y += step;
}
@@ -4046,7 +4046,7 @@ void ScummEngine::scrollEffect(int dir) {
vs->w * m, step * m);
_system->updateScreen();
}
-
+
waitForTimer(delay);
y += step;
}
@@ -4093,7 +4093,7 @@ void ScummEngine::scrollEffect(int dir) {
0, 0,
step, vs->h);
_system->updateScreen();
- }
+ }
waitForTimer(delay);
x += step;
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index 2e7111e78b..af75a98731 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -450,14 +450,14 @@ public:
void clearLayer(int layer);
void fillLayerRect(int layer, int x, int y, int w, int h, int col);
//void copyRectToLayer(int layer, int x, int y, int w, int h, const uint8 *src);
-
+
uint8 *getLayerPixels(int layer, int x, int y);
int getLayerPitch(int layer);
int getLayerHeight(int layer);
int getLayerBpp(int layer);
int getLayerScaleW(int layer);
int getLayerScaleH(int layer);
-
+
void addDirtyRect(int x, int y, int w, int h);
void toggleLayers(int flag);
void update();
@@ -484,16 +484,16 @@ private:
uint8 **bltInternY;
uint16 *bltTmpPal;
} _layers[2];
-
+
uint8 *_outBuffer;
int _height;
int _width;
int _pitch;
Graphics::PixelFormat _pixelFormat;
-
+
int _numDirtyRects;
- Common::List<Common::Rect> _dirtyRects;
+ Common::List<Common::Rect> _dirtyRects;
OSystem *_system;
};
#endif // DISABLE_TOWNS_DUAL_LAYER_MODE
diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp
index 4ec9c1bbf4..6a3f50a1af 100644
--- a/engines/scumm/gfx_towns.cpp
+++ b/engines/scumm/gfx_towns.cpp
@@ -47,7 +47,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
int dp2 = _townsScreen->getLayerPitch(1) - width * m * _townsScreen->getLayerBpp(1);
int sp1 = vs->pitch - (width * vs->format.bytesPerPixel);
int sp2 = _textSurface.pitch - width * m;
-
+
if (vs->number == kMainVirtScreen || _game.id == GID_INDY3 || _game.id == GID_ZAK) {
for (int h = 0; h < height; ++h) {
if (_outputPixelFormat.bytesPerPixel == 2) {
@@ -63,13 +63,13 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
src1 += vs->pitch;
dst1 += _townsScreen->getLayerPitch(0);
}
-
+
for (int sH = 0; sH < m; ++sH) {
memcpy(dst2, src2, width * m);
src2 += _textSurface.pitch;
dst2 += _townsScreen->getLayerPitch(1);
}
- }
+ }
} else {
dst1 = dst2;
for (int h = 0; h < height; ++h) {
@@ -81,7 +81,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
dst1 = dst2;
uint8 *src3 = src2;
-
+
if (m == 2) {
dst2 += _townsScreen->getLayerPitch(1);
src3 += _townsScreen->getLayerPitch(1);
@@ -95,7 +95,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
dst1++;
}
- src1 += sp1;
+ src1 += sp1;
src2 = src3 + sp2;
dst1 = dst2 + dp2;
dst2 += dp2;
@@ -231,7 +231,7 @@ void TownsScreen::setupLayer(int layer, int width, int height, int numCol, void
if (width > _width || height > _height)
error("TownsScreen::setupLayer(): Layer width/height must be equal or less than screen width/height");
-
+
l->scaleW = _width / width;
l->scaleH = _height / height;
@@ -268,13 +268,13 @@ void TownsScreen::setupLayer(int layer, int width, int height, int numCol, void
delete[] l->bltTmpPal;
l->bltTmpPal = (l->bpp == 1 && _pixelFormat.bytesPerPixel == 2) ? new uint16[l->numCol] : 0;
-
+
l->enabled = true;
_layers[0].onBottom = true;
_layers[1].onBottom = _layers[0].enabled ? false : true;
l->ready = true;
}
-
+
void TownsScreen::clearLayer(int layer) {
if (layer < 0 || layer > 1)
return;
@@ -300,10 +300,10 @@ void TownsScreen::fillLayerRect(int layer, int x, int y, int w, int h, int col)
assert(x >= 0 && y >= 0 && ((x + w) * l->bpp) <= (l->pitch) && (y + h) <= (l->height));
uint8 *pos = l->pixels + y * l->pitch + x * l->bpp;
-
+
for (int i = 0; i < h; ++i) {
if (l->bpp == 2) {
- for (int ii = 0; ii < w; ++ii) {
+ for (int ii = 0; ii < w; ++ii) {
*(uint16*)pos = col;
pos += 2;
}
@@ -359,8 +359,8 @@ int TownsScreen::getLayerScaleH(int layer) {
void TownsScreen::addDirtyRect(int x, int y, int w, int h) {
if (w <= 0 || h <= 0 || _numDirtyRects > DIRTY_RECTS_MAX)
- return;
-
+ return;
+
if (_numDirtyRects == DIRTY_RECTS_MAX) {
// full redraw
_dirtyRects.clear();
@@ -383,25 +383,25 @@ void TownsScreen::addDirtyRect(int x, int y, int w, int h) {
y = r->top;
skip = true;
}
-
+
if (x2 > r->left && x2 < r->right && y > r->top && y < r->bottom) {
x2 = r->right;
y = r->top;
skip = true;
}
-
+
if (x2 > r->left && x2 < r->right && y2 > r->top && y2 < r->bottom) {
x2 = r->right;
y2 = r->bottom;
skip = true;
}
-
+
if (x > r->left && x < r->right && y2 > r->top && y2 < r->bottom) {
x = r->left;
y2 = r->bottom;
skip = true;
- }
-
+ }
+
if (skip) {
r->left = x;
r->top = y;
@@ -486,13 +486,13 @@ void TownsScreen::updateOutputBuffer() {
uint8 col = l->bltInternY[y][l->bltInternX[x]];
if (col || l->onBottom) {
if (l->numCol == 16)
- col = (col >> 4) & (col & 0x0f);
+ col = (col >> 4) & (col & 0x0f);
*dst = col;
}
dst++;
}
dst += ptch;
- }
+ }
}
}
}
@@ -505,7 +505,7 @@ void TownsScreen::outputToScreen() {
_numDirtyRects = 0;
}
-uint16 TownsScreen::calc16BitColor(const uint8 *palEntry) {
+uint16 TownsScreen::calc16BitColor(const uint8 *palEntry) {
return _pixelFormat.RGBToColor(palEntry[0], palEntry[1], palEntry[2]);
}
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index a7d808e316..af56bca2ee 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -1018,7 +1018,7 @@ int LogicHEsoccer::op_1007(int32 *args) {
// Returns the square root of the sum of the squares of the arguments
static inline double sqrtSquare(double a1, double a2, double a3) {
return sqrt(a1 * a1 + a2 * a2 + a3 * a3);
-}
+}
int LogicHEsoccer::op_1008(int32 *args) {
// TODO: Used during a match (kicking?)
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index 4565bb9f26..39240e347f 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -166,7 +166,7 @@ bool MacResExtractor::extractResource(int id, CachedCursor *cc) {
}
Common::SeekableReadStream *dataStream = _resMgr->getResource('crsr', id + 1000);
-
+
if (!dataStream)
return false;
diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h
index 9978869ffc..6996ce81eb 100644
--- a/engines/scumm/he/resource_he.h
+++ b/engines/scumm/he/resource_he.h
@@ -61,7 +61,7 @@ private:
ResExtractor::CachedCursor *findCachedCursor(int id);
ResExtractor::CachedCursor *getCachedCursorSlot();
-
+
CachedCursor _cursorCache[MAX_CACHED_CURSORS];
};
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index fb070b3e27..cf7d9fbd2f 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -744,7 +744,7 @@ void ScummEngine_v60he::o60_closeFile() {
_hOutFileTable[slot] = 0;
}
- delete _hInFileTable[slot];
+ delete _hInFileTable[slot];
_hInFileTable[slot] = 0;
}
}
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 8f16bf0f3a..5af4035930 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -1446,7 +1446,7 @@ void ScummEngine_v72he::o72_openFile() {
_hOutFileTable[slot]->write(initialData, initialSize);
delete[] initialData;
}
-
+
} break;
default:
error("o72_openFile(): wrong open file mode %d", mode);
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 6813566144..317ef36cb9 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -100,16 +100,16 @@ IMuseInternal::~IMuseInternal() {
}
}
-byte *IMuseInternal::findStartOfSound(int sound, int ct) {
+byte *IMuseInternal::findStartOfSound(int sound, int ct) {
int32 size, pos;
-
+
static const uint32 id[] = {
MKTAG('M', 'T', 'h', 'd'),
MKTAG('F', 'O', 'R', 'M'),
MKTAG('M', 'D', 'h', 'd'),
MKTAG('M', 'D', 'p', 'g')
};
-
+
byte *ptr = g_scumm->_res->_types[rtSound][sound]._address;
if (ptr == NULL) {
@@ -952,7 +952,7 @@ void IMuseInternal::handle_marker(uint id, byte data) {
_trigger_count--;
_queue_cleared = false;
_queue_end = (_queue_end + 1) % ARRAYSIZE(_cmd_queue);
-
+
while (_queue_end != _queue_pos && _cmd_queue[_queue_end].array[0] == COMMAND_ID && !_queue_cleared) {
p = _cmd_queue[_queue_end].array;
doCommand_internal(p[1], p[2], p[3], p[4], p[5], p[6], p[7], 0);
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index 8808a3655a..6a7b9fc7d9 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -450,7 +450,7 @@ protected:
kMThd = 1,
kFORM = 2,
kMDhd = 4, // Used in MI2 and INDY4. Contain certain start parameters (priority, volume, etc. ) for the player.
- kMDpg = 8 // These chunks exist in DOTT and SAMNMAX. They don't get processed, however.
+ kMDpg = 8 // These chunks exist in DOTT and SAMNMAX. They don't get processed, however.
};
byte *findStartOfSound(int sound, int ct = (kMThd | kFORM));
diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp
index 0b084f3116..61b9cad2cb 100644
--- a/engines/scumm/imuse/imuse_player.cpp
+++ b/engines/scumm/imuse/imuse_player.cpp
@@ -120,7 +120,7 @@ bool Player::startSound(int sound, MidiDriver *midi) {
_midi = NULL;
return false;
}
-
+
debugC(DEBUG_IMUSE, "Starting music %d", sound);
return true;
}
@@ -194,7 +194,7 @@ int Player::start_seq_sound(int sound, bool reset_vars) {
_parser->property(MidiParser::mpSmartJump, 1);
_parser->loadMusic(ptr, 0);
_parser->setTrack(_track_index);
-
+
ptr = _se->findStartOfSound(sound, IMuseInternal::kMDhd);
setSpeed(reset_vars ? (ptr ? (READ_BE_UINT32(&ptr[4]) && ptr[15] ? ptr[15] : 128) : 128) : _speed);
@@ -226,7 +226,7 @@ void Player::loadStartParameters(int sound) {
_pan = ptr[4];
_transpose = ptr[5];
_detune = ptr[6];
- setSpeed(ptr[7]);
+ setSpeed(ptr[7]);
}
}
}
diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp
index 4eb3bee93c..c3bec93a60 100644
--- a/engines/scumm/imuse/sysex_scumm.cpp
+++ b/engines/scumm/imuse/sysex_scumm.cpp
@@ -76,7 +76,7 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) {
part->set_pri(p[4]);
part->volume((p[5] & 0x0F) << 4 |(p[6] & 0x0F));
part->set_pan((p[7] & 0x0F) << 4 | (p[8] & 0x0F));
- part->_percussion = player->_isMIDI ? ((p[9] & 0x08) > 0) : false;
+ part->_percussion = player->_isMIDI ? ((p[9] & 0x08) > 0) : false;
part->set_transpose((p[9] & 0x0F) << 4 | (p[10] & 0x0F));
part->set_detune((p[11] & 0x0F) << 4 | (p[12] & 0x0F));
part->pitchBendFactor((p[13] & 0x0F) << 4 | (p[14] & 0x0F));
diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp
index e71a8d0587..dd7630d370 100644
--- a/engines/scumm/player_towns.cpp
+++ b/engines/scumm/player_towns.cpp
@@ -32,7 +32,7 @@ Player_Towns::Player_Towns(ScummEngine *vm, bool isVersion2) : _vm(vm), _v2(isVe
void Player_Towns::setSfxVolume(int vol) {
if (!_intf)
- return;
+ return;
_intf->setSoundEffectVolume(vol);
}
@@ -98,17 +98,17 @@ void Player_Towns::playPcmTrack(int sound, const uint8 *data, int velo, int pan,
return;
const uint8 *sfxData = data + 16;
-
+
int numChan = _v2 ? 1 : data[14];
for (int i = 0; i < numChan; i++) {
int chan = allocatePcmChannel(sound, i, priority);
if (!chan)
return;
-
+
_intf->callback(70, _unkFlags);
_intf->callback(3, chan + 0x3f, pan);
_intf->callback(37, chan + 0x3f, note, velo, sfxData);
-
+
_pcmCurrentSound[chan].note = note;
_pcmCurrentSound[chan].velo = velo;
_pcmCurrentSound[chan].pan = pan;
@@ -191,7 +191,7 @@ Player_Towns_v1::Player_Towns_v1(ScummEngine *vm, Audio::Mixer *mixer) : Player_
if (_vm->_game.version == 3) {
_soundOverride = new SoundOvrParameters[_numSoundMax];
memset(_soundOverride, 0, _numSoundMax * sizeof(SoundOvrParameters));
- }
+ }
_driver = new TownsEuphonyDriver(mixer);
}
@@ -204,7 +204,7 @@ Player_Towns_v1::~Player_Towns_v1() {
bool Player_Towns_v1::init() {
if (!_driver)
return false;
-
+
if (!_driver->init())
return false;
@@ -235,13 +235,13 @@ void Player_Towns_v1::startSound(int sound) {
if (type == 0) {
uint8 velocity = 0;
uint8 note = 0;
-
+
if (_vm->_game.version == 3) {
velocity = (_soundOverride[sound].vLeft + _soundOverride[sound].vRight);
note = _soundOverride[sound].note;
}
- velocity = velocity ? velocity >> 2 : ptr[14] >> 1;
+ velocity = velocity ? velocity >> 2 : ptr[14] >> 1;
playPcmTrack(sound, ptr + 6, velocity, 64, note ? note : ptr[50], READ_LE_UINT16(ptr + 10));
} else if (type == 1) {
@@ -267,7 +267,7 @@ void Player_Towns_v1::stopSound(int sound) {
_eupLooping = false;
_driver->stopParser();
}
-
+
stopPcmTrack(sound);
}
@@ -293,7 +293,7 @@ int Player_Towns_v1::getSoundStatus(int sound) const {
int32 Player_Towns_v1::doCommand(int numargs, int args[]) {
int32 res = 0;
-
+
switch (args[0]) {
case 2:
_driver->intf()->callback(73, 0);
@@ -381,12 +381,12 @@ void Player_Towns_v1::saveLoadWithSerializer(Serializer *ser) {
void Player_Towns_v1::restoreAfterLoad() {
setVolumeCD(_cdaVolLeft, _cdaVolRight);
-
+
if (_cdaCurrentSoundTemp) {
uint8 *ptr = _vm->getResourceAddress(rtSound, _cdaCurrentSoundTemp) + 6;
if (_vm->_game.version != 3)
ptr += 2;
-
+
if (ptr[7] == 2) {
playCdaTrack(_cdaCurrentSoundTemp, ptr, true);
_cdaCurrentSound = _cdaCurrentSoundTemp;
@@ -398,7 +398,7 @@ void Player_Towns_v1::restoreAfterLoad() {
uint8 *ptr = _vm->getResourceAddress(rtSound, _eupCurrentSound) + 6;
if (_vm->_game.version != 3)
ptr += 2;
-
+
if (ptr[7] == 1) {
setSoundVolume(_eupCurrentSound, _eupVolLeft, _eupVolRight);
playEuphonyTrack(_eupCurrentSound, ptr);
@@ -458,7 +458,7 @@ void Player_Towns_v1::startSoundEx(int sound, int velo, int pan, int note) {
} else if (ptr[13] == 2) {
int volLeft = velo;
int volRight = velo;
-
+
if (pan < 50)
volRight = ((pan * 2 + 1) * velo + 50) / 100;
else if (pan > 50)
@@ -478,7 +478,7 @@ void Player_Towns_v1::stopSoundSuspendLooping(int sound) {
return;
} else if (sound == _cdaCurrentSound) {
if (_cdaNumLoops && _cdaForceRestart)
- _cdaForceRestart = 1;
+ _cdaForceRestart = 1;
} else {
for (int i = 1; i < 9; i++) {
if (sound == _pcmCurrentSound[i].index) {
@@ -487,7 +487,7 @@ void Player_Towns_v1::stopSoundSuspendLooping(int sound) {
_driver->stopSoundEffect(i + 0x3f);
if (_pcmCurrentSound[i].looping)
_pcmCurrentSound[i].paused = 1;
- else
+ else
_pcmCurrentSound[i].index = 0;
}
}
@@ -532,7 +532,7 @@ void Player_Towns_v1::playEuphonyTrack(int sound, const uint8 *data) {
uint32 trackSize = READ_LE_UINT32(src);
src += 4;
uint8 startTick = *src++;
-
+
_driver->setMusicTempo(*src++);
_driver->startMusicTrack(trackData, trackSize, startTick);
@@ -559,7 +559,7 @@ void Player_Towns_v1::playCdaTrack(int sound, const uint8 *data, bool skipTrackV
}
}
- if (sound == _cdaCurrentSound && _vm->_sound->pollCD() == 1)
+ if (sound == _cdaCurrentSound && _vm->_sound->pollCD() == 1)
return;
ptr += 16;
@@ -585,7 +585,7 @@ Player_Towns_v2::~Player_Towns_v2() {
_intf = 0;
if (_imuseDispose)
- delete _imuse;
+ delete _imuse;
delete[] _sblData;
delete[] _soundOverride;
@@ -594,7 +594,7 @@ Player_Towns_v2::~Player_Towns_v2() {
bool Player_Towns_v2::init() {
if (!_intf)
return false;
-
+
if (!_intf->init())
return false;
@@ -637,7 +637,7 @@ void Player_Towns_v2::startSound(int sound) {
void Player_Towns_v2::stopSound(int sound) {
if (_soundOverride[sound].type == 7) {
- stopPcmTrack(sound);
+ stopPcmTrack(sound);
} else {
_imuse->stopSound(sound);
}
@@ -651,7 +651,7 @@ void Player_Towns_v2::stopAllSounds() {
int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
int32 res = -1;
uint8 *ptr = 0;
-
+
switch (args[0]) {
case 8:
startSound(args[1]);
@@ -675,7 +675,7 @@ int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
case 258:
if (_soundOverride[args[1]].type == 0) {
ptr = _vm->getResourceAddress(rtSound, args[1]);
- if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
+ if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
_soundOverride[args[1]].type = 7;
}
if (_soundOverride[args[1]].type == 7) {
@@ -683,11 +683,11 @@ int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
res = 0;
}
break;
-
+
case 259:
if (_soundOverride[args[1]].type == 0) {
ptr = _vm->getResourceAddress(rtSound, args[1]);
- if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
+ if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
_soundOverride[args[1]].type = 7;
}
if (_soundOverride[args[1]].type == 7) {
@@ -702,7 +702,7 @@ int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
if (res == -1)
return _imuse->doCommand(numargs, args);
-
+
return res;
}
@@ -718,9 +718,9 @@ void Player_Towns_v2::playVocTrack(const uint8 *data) {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x36, 0x04, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00
};
-
+
uint32 len = (READ_LE_UINT32(data) >> 8) - 2;
-
+
int chan = allocatePcmChannel(0xffff, 0, 0x1000);
if (!chan)
return;
diff --git a/engines/scumm/player_towns.h b/engines/scumm/player_towns.h
index 470020d621..5c76d7c6c7 100644
--- a/engines/scumm/player_towns.h
+++ b/engines/scumm/player_towns.h
@@ -47,8 +47,8 @@ public:
virtual void restoreAfterLoad();
// version 1 specific
- virtual int getCurrentCdaSound() { return 0; }
- virtual int getCurrentCdaVolume() { return 0; }
+ virtual int getCurrentCdaSound() { return 0; }
+ virtual int getCurrentCdaVolume() { return 0; }
virtual void setVolumeCD(int left, int right) {}
virtual void setSoundVolume(int sound, int left, int right) {}
virtual void setSoundNote(int sound, int note) {}
@@ -92,8 +92,8 @@ public:
void stopAllSounds();
int getSoundStatus(int sound) const;
- int getCurrentCdaSound() { return _cdaCurrentSound; }
- int getCurrentCdaVolume() { return (_cdaVolLeft + _cdaVolRight + 1) >> 1; }
+ int getCurrentCdaSound() { return _cdaCurrentSound; }
+ int getCurrentCdaVolume() { return (_cdaVolLeft + _cdaVolRight + 1) >> 1; }
int32 doCommand(int numargs, int args[]);
@@ -124,7 +124,7 @@ private:
uint8 _cdaVolLeft;
uint8 _cdaVolRight;
-
+
uint8 _eupCurrentSound;
uint8 _eupLooping;
uint8 _eupVolLeft;
@@ -170,7 +170,7 @@ private:
SoundOvrParameters *_soundOverride;
uint8 *_sblData;
-
+
IMuse *_imuse;
const bool _imuseDispose;
};
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index f9a6b211c3..3cc710c207 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1316,10 +1316,10 @@ void ScummEngine::saveOrLoad(Serializer *s) {
MKEND()
};
- s->saveLoadArrayOf(_textPalette, 48, sizeof(_textPalette[0]), sleUint8);
+ s->saveLoadArrayOf(_textPalette, 48, sizeof(_textPalette[0]), sleUint8);
s->saveLoadArrayOf(_cyclRects, 10, sizeof(_cyclRects[0]), townsFields);
s->saveLoadArrayOf(&_curStringRect, 1, sizeof(_curStringRect), townsFields);
- s->saveLoadArrayOf(_townsCharsetColorMap, 16, sizeof(_townsCharsetColorMap[0]), sleUint8);
+ s->saveLoadArrayOf(_townsCharsetColorMap, 16, sizeof(_townsCharsetColorMap[0]), sleUint8);
s->saveLoadEntries(this, townsExtraEntries);
}
#endif
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 2c8f65496f..a6cf504586 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1611,7 +1611,7 @@ void ScummEngine_v5::o5_resourceRoutines() {
foo = getVarOrDirectByte(PARAM_2);
bar = fetchScriptByte();
if (_townsPlayer)
- _townsPlayer->setSoundVolume(resid, foo, bar);
+ _townsPlayer->setSoundVolume(resid, foo, bar);
break;
case 37:
if (_townsPlayer)
@@ -2319,7 +2319,7 @@ void ScummEngine_v5::o5_verbOps() {
if (_game.platform == Common::kPlatformFMTowns && _game.version == 3 && slot)
continue;
-
+
if (slot == 0) {
for (slot = 1; slot < _numVerbs; slot++) {
if (_verbs[slot].verbid == 0)
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 4fd1f6b32d..ed5537f409 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -329,7 +329,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
memset(&_cyclRects, 0, 16 * sizeof(Common::Rect));
_numCyclRects = 0;
#endif
-
+
//
// Init all VARS to 0xFF
//
@@ -591,7 +591,7 @@ ScummEngine::~ScummEngine() {
delete _actors[i];
delete[] _actors;
}
-
+
delete[] _sortedActors;
delete[] _2byteFontPtr;
@@ -1150,20 +1150,20 @@ Common::Error ScummEngine::init() {
screenWidth *= _textSurfaceMultiplier;
screenHeight *= _textSurfaceMultiplier;
}
- if (_game.features & GF_16BIT_COLOR
+ if (_game.features & GF_16BIT_COLOR
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
|| _game.platform == Common::kPlatformFMTowns
#endif
) {
#ifdef USE_RGB_COLOR
- _outputPixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
+ _outputPixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
if (_game.platform != Common::kPlatformFMTowns && _game.platform != Common::kPlatformPCEngine) {
initGraphics(screenWidth, screenHeight, screenWidth > 320, &_outputPixelFormat);
if (_outputPixelFormat != _system->getScreenFormat())
return Common::kUnsupportedColorMode;
} else {
- Common::List<Graphics::PixelFormat> tryModes = _system->getSupportedFormats();
+ Common::List<Graphics::PixelFormat> tryModes = _system->getSupportedFormats();
for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ++g) {
if (g->bytesPerPixel != 2 || g->aBits()) {
g = tryModes.erase(g);
@@ -1176,7 +1176,7 @@ Common::Error ScummEngine::init() {
break;
}
}
-
+
initGraphics(screenWidth, screenHeight, screenWidth > 320, tryModes);
if (_system->getScreenFormat().bytesPerPixel != 2)
return Common::kUnsupportedColorMode;
@@ -1868,7 +1868,7 @@ void ScummEngine::setupMusic(int midi) {
}
_imuse = IMuse::create(_system, nativeMidiDriver, adlibMidiDriver);
-
+
if (_game.platform == Common::kPlatformFMTowns) {
_musicEngine = _townsPlayer = new Player_Towns_v2(this, _mixer, _imuse, true);
if (!_townsPlayer->init())
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 5700271911..01bde90e1c 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -1004,7 +1004,7 @@ protected:
// Screen rendering
byte *_compositeBuf;
byte *_herculesBuf;
-
+
virtual void drawDirtyScreenParts();
void updateDirtyScreen(VirtScreenNumber slot);
void drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b);
@@ -1148,7 +1148,7 @@ protected:
void restoreCharsetBg();
void clearCharsetMask();
void clearTextSurface();
-
+
virtual void initCharset(int charset);
virtual void printString(int m, const byte *msg);
@@ -1348,10 +1348,10 @@ protected:
Common::Rect _cyclRects[16];
int _numCyclRects;
-
+
Common::Rect _curStringRect;
- byte _townsOverrideShadowColor;
+ byte _townsOverrideShadowColor;
byte _textPalette[48];
byte _townsClearLayerFlag;
byte _townsActiveLayerFlags;
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index c22da8e7c7..27e43b3740 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -312,7 +312,7 @@ void Sound::playSound(int soundID) {
sound = (byte *)malloc(size);
memcpy(sound, ptr + 6, size);
stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED);
- _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
}
else if (_vm->_game.platform != Common::kPlatformFMTowns && READ_BE_UINT32(ptr) == MKTAG('S','O','U','N')) {
if (_vm->_game.version != 3)
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 69caceb53a..0c1554840e 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -152,7 +152,7 @@ void ScummEngine_v0::setNewKidVerbs() {
void ScummEngine_v0::switchActor(int slot) {
resetSentence(false);
-
+
if (_currentRoom == 45)
return;
@@ -728,7 +728,7 @@ void ScummEngine_v0::runObject(int obj, int entry) {
entry = 0x0F;
}
}
-
+
_v0ObjectInInventory = prev;
if (getVerbEntrypoint(obj, entry) != 0) {
@@ -830,7 +830,7 @@ bool ScummEngine_v0::verbObtain(int obj, int objIndex) {
} else {
_verbPickup = false;
}
-
+
// Ignore verbs?
Actor *a = derefActor(VAR(VAR_EGO), "verbObtain");
if (((ActorC64 *)a)->_miscflags & 0x40) {
@@ -989,7 +989,7 @@ bool ScummEngine_v0::verbExec() {
runObject(_activeObjectIndex, entry);
_v0ObjectIndex = false;
} else if (_activeInventory) {
- // Not sure this is the correct way to do this,
+ // Not sure this is the correct way to do this,
// however its working for most situations - segra
if (verbExecutes(_activeInventory, true) == false) {
if (_activeObject2 && _activeObject2Inv && verbExecutes(_activeObject2, true)) {
@@ -1001,7 +1001,7 @@ bool ScummEngine_v0::verbExec() {
runObject(_activeObject, _activeVerb);
} else {
_v0ObjectInInventory = true;
-
+
if (_activeObject2) {
_activeObject = _activeObject2;
@@ -1085,7 +1085,7 @@ void ScummEngine_v0::checkExecVerbs() {
// Click into V2 inventory
checkV2Inventory(_mouse.x, _mouse.y);
-
+
// Did the Inventory position changed (arrows pressed, do nothing)
if (invOff != _inventoryOffset)
return;
@@ -1143,7 +1143,7 @@ void ScummEngine_v0::checkExecVerbs() {
obj = 0;
objIdx = 0;
}
-
+
if (a->_miscflags & 0x80) {
if (_activeVerb != 7 && over != 7) {
_activeVerb = 0;
@@ -1444,9 +1444,9 @@ void ScummEngine::restoreVerbBG(int verb) {
VerbSlot *vs;
vs = &_verbs[verb];
- uint8 col =
+ uint8 col =
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- ((_game.platform == Common::kPlatformFMTowns) && (_game.id == GID_MONKEY2 || _game.id == GID_INDY4) && (vs->bkcolor == _townsOverrideShadowColor)) ? 0 :
+ ((_game.platform == Common::kPlatformFMTowns) && (_game.id == GID_MONKEY2 || _game.id == GID_INDY4) && (vs->bkcolor == _townsOverrideShadowColor)) ? 0 :
#endif
vs->bkcolor;