aboutsummaryrefslogtreecommitdiff
path: root/graphics/scaler
diff options
context:
space:
mode:
authorTarek Soliman2012-02-15 09:53:31 -0600
committerTarek Soliman2012-02-15 10:07:10 -0600
commita4798602d7a025dc13fd253d584dbf29dbec488d (patch)
treed6e764535eb4eef6d3c313e00a7eaea8b1724a2d /graphics/scaler
parent921f602ab8631a9d10e0a173b6b331dbafda564a (diff)
downloadscummvm-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/scaler')
-rw-r--r--graphics/scaler/thumbnail_intern.cpp10
1 files changed, 5 insertions, 5 deletions
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);