diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/actor.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/costume.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/cursor.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/detection.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/gfx.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/gfx_towns.cpp | 12 | ||||
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/player_apple2.h | 2 | ||||
-rw-r--r-- | engines/scumm/player_sid.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/player_v1.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/resource.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/saveload.cpp | 12 | ||||
-rw-r--r-- | engines/scumm/saveload.h | 4 | ||||
-rw-r--r-- | engines/scumm/script_v4.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/script_v8.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/string.cpp | 2 |
16 files changed, 34 insertions, 34 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 53496428e3..b8722b6963 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -2040,7 +2040,7 @@ void Actor_v0::limbFrameCheck(int limb) { _limbFrameRepeat[limb] = _limbFrameRepeatNew[limb]; // 0x25C3 - _cost.active[limb] = ((V0CostumeLoader*)_vm->_costumeLoader)->getFrame(this, limb); + _cost.active[limb] = ((V0CostumeLoader *)_vm->_costumeLoader)->getFrame(this, limb); _cost.curpos[limb] = 0; _needRedraw = true; diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index 2bbf3b3801..6e7e9ff688 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -668,7 +668,7 @@ void ClassicCostumeRenderer::procPCEngine(Codec1 &v1) { (v1.mask_ptr && (mask[0] & maskbit)); if (pcolor && !masked) { - WRITE_UINT16(dst, ((uint16*)_palette)[pcolor]); + WRITE_UINT16(dst, ((uint16 *)_palette)[pcolor]); } xPos += xStep; diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 36f06a4889..42f11498d9 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -636,7 +636,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) { byte *dst2 = (_textSurfaceMultiplier == 2) ? dst1 + 16 * scl : dst1; if (_outputPixelFormat.bytesPerPixel == 2) { for (int b = 0; b < scl; b += 2) { - *((uint16*)dst1) = *((uint16*)dst2) = color; + *((uint16 *)dst1) = *((uint16 *)dst2) = color; dst1 += 2; dst2 += 2; } diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 3e1ad53ed6..b47982af00 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -598,7 +598,7 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul } if (isDiskImg) - closeDiskImage((ScummDiskImage*)tmp); + closeDiskImage((ScummDiskImage *)tmp); delete tmp; } diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index bc6cfc761e..48ccdfd1cf 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -1136,7 +1136,7 @@ void ScummEngine::clearTextSurface() { _townsScreen->fillLayerRect(1, 0, 0, _textSurface.w, _textSurface.h, 0); #endif - fill((byte*)_textSurface.pixels, _textSurface.pitch, + fill((byte *)_textSurface.pixels, _textSurface.pitch, #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE _game.platform == Common::kPlatformFMTowns ? 0 : #endif @@ -2773,7 +2773,7 @@ void GdiNES::drawStripNESMask(byte *dst, int stripnr, int top, int height) const void readOffsetTable(const byte *ptr, uint16 **table, int *count) { int pos = 0; *count = READ_LE_UINT16(ptr) / 2 + 1; - *table = (uint16*)malloc(*count * sizeof(uint16)); + *table = (uint16 *)malloc(*count * sizeof(uint16)); for (int i = 0; i < *count; i++) { (*table)[i] = READ_LE_UINT16(ptr + pos) + pos + 2; pos += 2; @@ -2977,10 +2977,10 @@ void GdiPCEngine::decodePCEngineTileData(const byte *ptr) { if (_distaff) { free(_PCE.staffTiles); - _PCE.staffTiles = (byte*)calloc(_PCE.numTiles * 8 * 8, sizeof(byte)); + _PCE.staffTiles = (byte *)calloc(_PCE.numTiles * 8 * 8, sizeof(byte)); } else { free(_PCE.roomTiles); - _PCE.roomTiles = (byte*)calloc(_PCE.numTiles * 8 * 8, sizeof(byte)); + _PCE.roomTiles = (byte *)calloc(_PCE.numTiles * 8 * 8, sizeof(byte)); } for (int i = 0; i < _PCE.numTiles; ++i) { @@ -3023,7 +3023,7 @@ void GdiPCEngine::decodePCEngineMaskData(const byte *ptr) { readOffsetTable(ptr, &maskOffsets, &_PCE.numMasks); free(_PCE.masks); - _PCE.masks = (byte*)malloc(_PCE.numMasks * 8 * sizeof(byte)); + _PCE.masks = (byte *)malloc(_PCE.numMasks * 8 * sizeof(byte)); for (int i = 0; i < _PCE.numMasks; ++i) { mask = &_PCE.masks[i * 8]; diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp index 6a3f50a1af..8bffcab4a0 100644 --- a/engines/scumm/gfx_towns.cpp +++ b/engines/scumm/gfx_towns.cpp @@ -39,7 +39,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in int m = _textSurfaceMultiplier; uint8 *src1 = vs->getPixels(srcX, srcY); - uint8 *src2 = (uint8*)_textSurface.getBasePtr(srcX * m, (srcY + vs->topline - _screenTop) * m); + uint8 *src2 = (uint8 *)_textSurface.getBasePtr(srcX * m, (srcY + vs->topline - _screenTop) * m); uint8 *dst1 = _townsScreen->getLayerPixels(0, dstX, dstY); uint8 *dst2 = _townsScreen->getLayerPixels(1, dstX * m, dstY * m); @@ -52,7 +52,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in for (int h = 0; h < height; ++h) { if (_outputPixelFormat.bytesPerPixel == 2) { for (int w = 0; w < width; ++w) { - *(uint16*)dst1 = _16BitPalette[*src1++]; + *(uint16 *)dst1 = _16BitPalette[*src1++]; dst1 += _outputPixelFormat.bytesPerPixel; } @@ -245,7 +245,7 @@ void TownsScreen::setupLayer(int layer, int width, int height, int numCol, void l->numCol = numCol; l->bpp = ((numCol - 1) & 0xff00) ? 2 : 1; l->pitch = width * l->bpp; - l->palette = (uint8*)pal; + l->palette = (uint8 *)pal; if (l->palette && _pixelFormat.bytesPerPixel == 1) warning("TownsScreen::setupLayer(): Layer palette usage requires 16 bit graphics setting.\nLayer palette will be ignored."); @@ -304,7 +304,7 @@ void TownsScreen::fillLayerRect(int layer, int x, int y, int w, int h, int col) for (int i = 0; i < h; ++i) { if (l->bpp == 2) { for (int ii = 0; ii < w; ++ii) { - *(uint16*)pos = col; + *(uint16 *)pos = col; pos += 2; } pos += (l->pitch - w * 2); @@ -472,10 +472,10 @@ void TownsScreen::updateOutputBuffer() { if (col || l->onBottom) { if (l->numCol == 16) col = (col >> 4) & (col & 0x0f); - *(uint16*)dst = l->bltTmpPal[col]; + *(uint16 *)dst = l->bltTmpPal[col]; } } else { - *(uint16*)dst = *(uint16*)src; + *(uint16 *)dst = *(uint16 *)src; } dst += 2; } diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 85e2a2f1dd..1007d2a7b0 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -652,7 +652,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) * even addresses, so the use of (void *) in the * following cast shuts the compiler from warning * unnecessarily. */ - size = voxStream->readBuffer((int16*)(void *)sound, size * 2); + size = voxStream->readBuffer((int16 *)(void *)sound, size * 2); size *= 2; // 16bits. delete voxStream; diff --git a/engines/scumm/player_apple2.h b/engines/scumm/player_apple2.h index c3e1b7fc60..b4a7d409fb 100644 --- a/engines/scumm/player_apple2.h +++ b/engines/scumm/player_apple2.h @@ -209,7 +209,7 @@ public: } uint32 readSamples(void *buffer, int numSamples) { - return _buffer.read((byte*)buffer, numSamples * 2) / 2; + return _buffer.read((byte *)buffer, numSamples * 2) / 2; } private: diff --git a/engines/scumm/player_sid.cpp b/engines/scumm/player_sid.cpp index ecfaef22c1..7a609364e5 100644 --- a/engines/scumm/player_sid.cpp +++ b/engines/scumm/player_sid.cpp @@ -1293,7 +1293,7 @@ int Player_SID::readBuffer(int16 *buffer, const int numSamples) { _cpuCyclesLeft = timingProps[_videoSystem].cyclesPerFrame; } // fetch samples - int sampleCount = _sid->updateClock(_cpuCyclesLeft, (short*)buffer, samplesLeft); + int sampleCount = _sid->updateClock(_cpuCyclesLeft, (short *)buffer, samplesLeft); samplesLeft -= sampleCount; buffer += sampleCount; } diff --git a/engines/scumm/player_v1.cpp b/engines/scumm/player_v1.cpp index 8afede8c5a..8e784e9866 100644 --- a/engines/scumm/player_v1.cpp +++ b/engines/scumm/player_v1.cpp @@ -351,8 +351,8 @@ parse_again: *_value_ptr_2 = _start_2; } debug(6, "chunk 1: %lu: %d step %d for %d, %lu: %d step %d for %d", - (long)(_value_ptr - (uint*)_channels), _start, _delta, _time_left, - (long)(_value_ptr_2 - (uint*)_channels), _start_2, _delta_2, _time_left_2); + (long)(_value_ptr - (uint *)_channels), _start, _delta, _time_left, + (long)(_value_ptr_2 - (uint *)_channels), _start_2, _delta_2, _time_left_2); break; case 2: diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index f445a44ded..b2093e9c1a 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -232,7 +232,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) { #endif } else { sprintf(buf, "Cannot find file: '%s'", filename); - InfoDialog dialog(this, (char*)buf); + InfoDialog dialog(this, (char *)buf); runDialog(dialog); error("Cannot find file: '%s'", filename); } @@ -350,7 +350,7 @@ void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) { switch (blocktype) { case MKTAG('A','N','A','M'): // Used by: The Dig, FT num = _fileHandle->readUint16LE(); - ptr = (char*)malloc(num * 9); + ptr = (char *)malloc(num * 9); _fileHandle->read(ptr, num * 9); _imuseDigital->setAudioNames(num, ptr); break; diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 6e54377199..beac077fd1 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -875,21 +875,21 @@ void ScummEngine::saveOrLoad(Serializer *s) { // vm.localvar grew from 25 to 40 script entries and then from // 16 to 32 bit variables (but that wasn't reflect here)... and // THEN from 16 to 25 variables. - MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 25, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(8), VER(8)), - MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 40, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(9), VER(14)), + MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 25, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(8), VER(8)), + MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 40, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(9), VER(14)), // We used to save 25 * 40 = 1000 blocks; but actually, each 'row consisted of 26 entry, // i.e. 26 * 40 = 1040. Thus the last 40 blocks of localvar where not saved at all. To be // able to load this screwed format, we use a trick: We load 26 * 38 = 988 blocks. // Then, we mark the followin 12 blocks (24 bytes) as obsolete. - MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 26, 38, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(15), VER(17)), + MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 26, 38, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(15), VER(17)), MK_OBSOLETE_ARRAY(ScummEngine, vm.localvar[39][0], sleUint16, 12, VER(15), VER(17)), // This was the first proper multi dimensional version of the localvars, with 32 bit values - MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint32, 26, 40, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(18), VER(19)), + MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint32, 26, 40, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(18), VER(19)), // Then we doubled the script slots again, from 40 to 80 - MKARRAY2(ScummEngine, vm.localvar[0][0], sleUint32, 26, NUM_SCRIPT_SLOT, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(20)), + MKARRAY2(ScummEngine, vm.localvar[0][0], sleUint32, 26, NUM_SCRIPT_SLOT, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(20)), MKARRAY(ScummEngine, _resourceMapper[0], sleByte, 128, VER(8)), @@ -1538,7 +1538,7 @@ void ScummEngine_v5::saveOrLoad(Serializer *s) { ScummEngine::saveOrLoad(s); const SaveLoadEntry cursorEntries[] = { - MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte*)_cursorImages[1] - (byte*)_cursorImages[0], VER(44)), + MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte *)_cursorImages[1] - (byte *)_cursorImages[0], VER(44)), MKARRAY(ScummEngine_v5, _cursorHotspots[0], sleByte, 8, VER(44)), MKEND() }; diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h index 90feee6dc0..d5f7ea526e 100644 --- a/engines/scumm/saveload.h +++ b/engines/scumm/saveload.h @@ -74,13 +74,13 @@ namespace Scumm { * what POD means refer to <http://en.wikipedia.org/wiki/Plain_Old_Data_Structures> or * to <http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=32&rl=1>) */ -#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42) +#define OFFS(type,item) (((ptrdiff_t)(&((type *)42)->type::item))-42) /** * Similar to the OFFS macro, this macro computes the size (in bytes) of a * member of a given struct/class type. */ -#define SIZE(type,item) sizeof(((type*)42)->type::item) +#define SIZE(type,item) sizeof(((type *)42)->type::item) // Any item that is still in use automatically gets a maxVersion equal to CURRENT_VER #define MKLINE(type,item,saveas,minVer) {OFFS(type,item),saveas,SIZE(type,item),minVer,CURRENT_VER} diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp index 8340f62dbc..1de9f08168 100644 --- a/engines/scumm/script_v4.cpp +++ b/engines/scumm/script_v4.cpp @@ -350,7 +350,7 @@ void ScummEngine_v4::loadIQPoints(byte *ptr, int size) { file = _saveFileMan->openForLoading(filename); if (file != NULL) { - byte *tmp = (byte*)malloc(size); + byte *tmp = (byte *)malloc(size); int nread = file->read(tmp, size); if (nread == size) { memcpy(ptr, tmp, size); @@ -414,7 +414,7 @@ void ScummEngine_v4::o4_saveLoadGame() { // use name entered by the user char* ptr; int firstSlot = (_game.id == GID_LOOM) ? STRINGID_SAVENAME1_LOOM : STRINGID_SAVENAME1; - ptr = (char*)getStringAddress(slot + firstSlot - 1); + ptr = (char *)getStringAddress(slot + firstSlot - 1); strncpy(name, ptr, sizeof(name)); } diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index c8b92be3c8..f6f376f3c9 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -1122,7 +1122,7 @@ void ScummEngine_v8::o8_kernelSetFunctions() { } case 26: { // saveGameWrite // FIXME: This doesn't work - char *address = (char*)getStringAddress(args[2]); + char *address = (char *)getStringAddress(args[2]); debug(0, "o8_kernelSetFunctions: saveGame(%d, %s)", args[1], address); break; } diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index bcb45e2e92..975307d0d0 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -112,7 +112,7 @@ void ScummEngine::showMessageDialog(const byte *msg) { if (_string[3].color == 0) _string[3].color = 4; - InfoDialog dialog(this, (char*)buf); + InfoDialog dialog(this, (char *)buf); VAR(VAR_KEYPRESS) = runDialog(dialog); } |