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 /engines/made | |
| 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 'engines/made')
| -rw-r--r-- | engines/made/database.cpp | 24 | ||||
| -rw-r--r-- | engines/made/graphics.cpp | 4 | ||||
| -rw-r--r-- | engines/made/resource.h | 2 | ||||
| -rw-r--r-- | engines/made/screen.cpp | 8 | ||||
| -rw-r--r-- | engines/made/screenfx.cpp | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/engines/made/database.cpp b/engines/made/database.cpp index 454fe09a38..2b87f97392 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -56,7 +56,7 @@ const char *Object::getString() { void Object::setString(const char *str) { if (getClass() == 0x7FFF) { - char *objStr = (char*)getData(); + char *objStr = (char *)getData(); if (str) strncpy(objStr, str, getSize()); else @@ -86,10 +86,10 @@ int16 Object::getVectorSize() { int16 Object::getVectorItem(int16 index) { if (getClass() == 0x7FFF) { - byte *vector = (byte*)getData(); + byte *vector = (byte *)getData(); return vector[index]; } else if (getClass() <= 0x7FFE) { - int16 *vector = (int16*)getData(); + int16 *vector = (int16 *)getData(); return READ_LE_UINT16(&vector[index]); } else { // should never reach here @@ -100,10 +100,10 @@ int16 Object::getVectorItem(int16 index) { void Object::setVectorItem(int16 index, int16 value) { if (getClass() == 0x7FFF) { - byte *vector = (byte*)getData(); + byte *vector = (byte *)getData(); vector[index] = value; } else if (getClass() <= 0x7FFE) { - int16 *vector = (int16*)getData(); + int16 *vector = (int16 *)getData(); WRITE_LE_UINT16(&vector[index], value); } } @@ -526,7 +526,7 @@ int16 *GameDatabaseV2::findObjectProperty(int16 objectIndex, int16 propertyId, i error("GameDatabaseV2::findObjectProperty(%04X, %04X) Not an object", objectIndex, propertyId); } - int16 *prop = (int16*)obj->getData(); + int16 *prop = (int16 *)obj->getData(); byte count1 = obj->getCount1(); byte count2 = obj->getCount2(); @@ -553,7 +553,7 @@ int16 *GameDatabaseV2::findObjectProperty(int16 objectIndex, int16 propertyId, i obj = getObject(parentObjectIndex); - prop = (int16*)obj->getData(); + prop = (int16 *)obj->getData(); count1 = obj->getCount1(); count2 = obj->getCount2(); @@ -750,7 +750,7 @@ int16 *GameDatabaseV3::findObjectProperty(int16 objectIndex, int16 propertyId, i error("GameDatabaseV2::findObjectProperty(%04X, %04X) Not an object", objectIndex, propertyId); } - int16 *prop = (int16*)obj->getData(); + int16 *prop = (int16 *)obj->getData(); byte count1 = obj->getCount1(); byte count2 = obj->getCount2(); @@ -762,7 +762,7 @@ int16 *GameDatabaseV3::findObjectProperty(int16 objectIndex, int16 propertyId, i if ((READ_LE_UINT16(prop) & 0x3FFF) == propertyId) { if (READ_LE_UINT16(prop) & 0x4000) { propertyFlag = 1; - return (int16*)_gameState + READ_LE_UINT16(propPtr1); + return (int16 *)_gameState + READ_LE_UINT16(propPtr1); } else { propertyFlag = obj->getFlags() & 1; return propPtr1; @@ -782,7 +782,7 @@ int16 *GameDatabaseV3::findObjectProperty(int16 objectIndex, int16 propertyId, i obj = getObject(parentObjectIndex); - prop = (int16*)obj->getData(); + prop = (int16 *)obj->getData(); count1 = obj->getCount1(); count2 = obj->getCount2(); @@ -794,7 +794,7 @@ int16 *GameDatabaseV3::findObjectProperty(int16 objectIndex, int16 propertyId, i if ((READ_LE_UINT16(prop) & 0x3FFF) == propertyId) { if (READ_LE_UINT16(prop) & 0x4000) { propertyFlag = 1; - return (int16*)_gameState + READ_LE_UINT16(propPtr1); + return (int16 *)_gameState + READ_LE_UINT16(propPtr1); } else { propertyFlag = obj->getFlags() & 1; return propPtr1; @@ -806,7 +806,7 @@ int16 *GameDatabaseV3::findObjectProperty(int16 objectIndex, int16 propertyId, i if ((READ_LE_UINT16(prop) & 0x3FFF) == propertyId) { if (READ_LE_UINT16(prop) & 0x4000) { propertyFlag = 1; - return (int16*)_gameState + READ_LE_UINT16(propertyPtr); + return (int16 *)_gameState + READ_LE_UINT16(propertyPtr); } else { propertyFlag = obj->getFlags() & 1; return propertyPtr; diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp index 30496d8595..4d3fc7116a 100644 --- a/engines/made/graphics.cpp +++ b/engines/made/graphics.cpp @@ -83,7 +83,7 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u if ((maskFlags != 0) && (maskFlags != 2) && (pixelFlags != 0) && (pixelFlags != 2) && (cmdFlags != 0)) error("decompressImage() Unsupported flags: cmdFlags = %02X; maskFlags = %02X, pixelFlags = %02X", cmdFlags, maskFlags, pixelFlags); - byte *destPtr = (byte*)surface.getBasePtr(0, 0); + byte *destPtr = (byte *)surface.getBasePtr(0, 0); byte lineBuf[640 * 4]; byte bitBuf[40]; @@ -196,7 +196,7 @@ void decompressMovieImage(byte *source, Graphics::Surface &surface, uint16 cmdOf byte *maskBuffer = source + maskOffs; byte *pixelBuffer = source + pixelOffs; - byte *destPtr = (byte*)surface.getBasePtr(0, 0); + byte *destPtr = (byte *)surface.getBasePtr(0, 0); byte bitBuf[40]; diff --git a/engines/made/resource.h b/engines/made/resource.h index da227a39a0..a789069272 100644 --- a/engines/made/resource.h +++ b/engines/made/resource.h @@ -224,7 +224,7 @@ protected: ResourceSlot *slot = getResourceSlot(resType, index); if (!slot) return NULL; - T *res = (T*)getResourceFromCache(slot); + T *res = (T *)getResourceFromCache(slot); if (!res) { byte *buffer; uint32 size; diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 168902d577..b49bfff840 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -179,10 +179,10 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f clipHeight = clipInfo.clipRect.bottom - y; } - source = (byte*)sourceSurface->getBasePtr(0, startY); - dest = (byte*)clipInfo.destSurface->getBasePtr(x, y); + source = (byte *)sourceSurface->getBasePtr(0, startY); + dest = (byte *)clipInfo.destSurface->getBasePtr(x, y); if (_vm->getGameID() != GID_RTZ) - maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y); + maskp = (byte *)_maskDrawCtx.destSurface->getBasePtr(x, y); int32 sourcePitch, linePtrAdd, sourceAdd; byte *linePtr; @@ -633,7 +633,7 @@ void Screen::printChar(uint c, int16 x, int16 y, byte color) { return; byte p; - byte *dest = (byte*)_fontDrawCtx.destSurface->getBasePtr(x, y); + byte *dest = (byte *)_fontDrawCtx.destSurface->getBasePtr(x, y); for (uint yc = 0; yc < height; yc++) { p = charData[yc]; diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index ff0d393885..4e0d463b53 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -231,10 +231,10 @@ void ScreenEffects::copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, i vfxY1 = y1 & 7; - byte *source = (byte*)surface->getBasePtr(x1, y1); + byte *source = (byte *)surface->getBasePtr(x1, y1); Graphics::Surface *vgaScreen = _screen->lockScreen(); - byte *dest = (byte*)vgaScreen->getBasePtr(x1, y1); + byte *dest = (byte *)vgaScreen->getBasePtr(x1, y1); int16 addX = x2 / 16; |
