diff options
| author | Tarek Soliman | 2012-02-15 09:53:31 -0600 |
|---|---|---|
| committer | Tarek Soliman | 2012-02-15 10:07:10 -0600 |
| commit | a4798602d7a025dc13fd253d584dbf29dbec488d (patch) | |
| tree | d6e764535eb4eef6d3c313e00a7eaea8b1724a2d /graphics | |
| parent | 921f602ab8631a9d10e0a173b6b331dbafda564a (diff) | |
| download | scummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.tar.gz scummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.tar.bz2 scummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.zip | |
JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/VectorRendererSpec.h | 2 | ||||
| -rw-r--r-- | graphics/iff.cpp | 4 | ||||
| -rw-r--r-- | graphics/imagedec.cpp | 2 | ||||
| -rw-r--r-- | graphics/scaler/thumbnail_intern.cpp | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index fe64f9774d..06d32b1f21 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -103,7 +103,7 @@ protected: * @param alpha Alpha intensity of the pixel (0-255) */ inline void blendPixel(int x, int y, PixelType color, uint8 alpha) { - blendPixelPtr((PixelType*)Base::_activeSurface->getBasePtr(x, y), color, alpha); + blendPixelPtr((PixelType *)Base::_activeSurface->getBasePtr(x, y), color, alpha); } /** diff --git a/graphics/iff.cpp b/graphics/iff.cpp index 4bb971f299..7434a6bebc 100644 --- a/graphics/iff.cpp +++ b/graphics/iff.cpp @@ -206,7 +206,7 @@ struct PBMLoader { case ID_BODY: if (_surface) { _surface->create(_decoder._header.width, _decoder._header.height, PixelFormat::createFormatCLUT8()); - _decoder.loadBitmap((byte*)_surface->pixels, chunk._stream); + _decoder.loadBitmap((byte *)_surface->pixels, chunk._stream); } return true; // stop the parser } @@ -234,7 +234,7 @@ bool PackBitsReadStream::eos() const { } uint32 PackBitsReadStream::read(void *dataPtr, uint32 dataSize) { - byte *out = (byte*)dataPtr; + byte *out = (byte *)dataPtr; uint32 left = dataSize; uint32 lenR = 0, lenW = 0; diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp index eb595a750e..9552f095fa 100644 --- a/graphics/imagedec.cpp +++ b/graphics/imagedec.cpp @@ -117,7 +117,7 @@ Surface *BMPDecoder::decodeImage(Common::SeekableReadStream &stream, const Pixel assert(newSurf); newSurf->create(info.width, info.height, format); assert(newSurf->pixels); - OverlayColor *curPixel = (OverlayColor*)newSurf->pixels + (newSurf->h-1) * newSurf->w; + OverlayColor *curPixel = (OverlayColor *)newSurf->pixels + (newSurf->h-1) * newSurf->w; int pitchAdd = info.width % 4; for (int i = 0; i < newSurf->h; ++i) { for (int i2 = 0; i2 < newSurf->w; ++i2) { diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp index ef540b8cd8..88f3cc2077 100644 --- a/graphics/scaler/thumbnail_intern.cpp +++ b/graphics/scaler/thumbnail_intern.cpp @@ -46,7 +46,7 @@ void createThumbnail_2(const uint8 *src, uint32 srcPitch, uint8 *dstPtr, uint32 assert(height % 2 == 0); for (int y = 0; y < height; y += 2) { for (int x = 0; x < width; x += 2, dstPtr += 2) { - *((uint16*)dstPtr) = quadBlockInterpolate<bitFormat>(src + 2 * x, srcPitch); + *((uint16 *)dstPtr) = quadBlockInterpolate<bitFormat>(src + 2 * x, srcPitch); } dstPtr += (dstPitch - 2 * width / 2); src += 2 * srcPitch; @@ -64,7 +64,7 @@ void createThumbnail_4(const uint8 *src, uint32 srcPitch, uint8 *dstPtr, uint32 uint16 downleft = quadBlockInterpolate<bitFormat>(src + srcPitch * 2 + 2 * x, srcPitch); uint16 downright = quadBlockInterpolate<bitFormat>(src + srcPitch * 2 + 2 * (x + 2), srcPitch); - *((uint16*)dstPtr) = interpolate16_1_1_1_1<Graphics::ColorMasks<bitFormat> >(upleft, upright, downleft, downright); + *((uint16 *)dstPtr) = interpolate16_1_1_1_1<Graphics::ColorMasks<bitFormat> >(upleft, upright, downleft, downright); } dstPtr += (dstPitch - 2 * width / 4); src += 4 * srcPitch; @@ -116,9 +116,9 @@ static bool grabScreen565(Graphics::Surface *surf) { byte r = 0, g = 0, b = 0; if (screenFormat.bytesPerPixel == 1) { - r = palette[((uint8*)screen->pixels)[y * screen->pitch + x] * 3]; - g = palette[((uint8*)screen->pixels)[y * screen->pitch + x] * 3 + 1]; - b = palette[((uint8*)screen->pixels)[y * screen->pitch + x] * 3 + 2]; + r = palette[((uint8 *)screen->pixels)[y * screen->pitch + x] * 3]; + g = palette[((uint8 *)screen->pixels)[y * screen->pitch + x] * 3 + 1]; + b = palette[((uint8 *)screen->pixels)[y * screen->pitch + x] * 3 + 2]; } else if (screenFormat.bytesPerPixel == 2) { uint16 col = READ_UINT16(screen->getBasePtr(x, y)); screenFormat.colorToRGB(col, r, g, b); |
