[Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.42,1.43 animation.cpp,1.65,1.66 d_sound.cpp,1.151,1.152 menu.cpp,1.34,1.35 palette.cpp,1.39,1.40 render.cpp,1.76,1.77 sprite.cpp,1.50,1.51
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Thu May 12 06:15:04 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword2 anims.cpp,1.71,1.72 build_display.cpp,1.74,1.75 console.cpp,1.54,1.55 controls.cpp,1.89,1.90 debug.cpp,1.49,1.50 function.cpp,1.84,1.85 icons.cpp,1.43,1.44 interpreter.cpp,1.53,1.54 interpreter.h,1.16,1.17 layers.cpp,1.37,1.38 logic.cpp,1.55,1.56 maketext.cpp,1.48,1.49 memory.cpp,1.35,1.36 protocol.cpp,1.30,1.31 resman.cpp,1.112,1.113 router.cpp,1.47,1.48 save_rest.cpp,1.72,1.73 sound.cpp,1.61,1.62 speech.cpp,1.74,1.75 startup.cpp,1.50,1.51 sword2.cpp,1.144,1.145 walker.cpp,1.47,1.48
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.151,2.152 script_v72he.cpp,2.289,2.290
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25257/driver
Modified Files:
_mouse.cpp animation.cpp d_sound.cpp menu.cpp palette.cpp
render.cpp sprite.cpp
Log Message:
Whitespace: "(type *)something" instead of "(type *) something", because
that's how we write it in most other places.
Index: _mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/_mouse.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- _mouse.cpp 27 Feb 2005 16:11:17 -0000 1.42
+++ _mouse.cpp 12 May 2005 13:12:13 -0000 1.43
@@ -122,7 +122,7 @@
memset(mouseData, 0, mouse_width * mouse_height);
if (_luggageAnim)
- decompressMouse(mouseData, (byte *) _luggageAnim + READ_LE_UINT32(_luggageOffset), _luggageAnim->mousew,
+ decompressMouse(mouseData, (byte *)_luggageAnim + READ_LE_UINT32(_luggageOffset), _luggageAnim->mousew,
_luggageAnim->mouseh, mouse_width, deltaX, deltaY);
if (_mouseAnim)
@@ -144,7 +144,7 @@
if (++_mouseFrame == _mouseAnim->noAnimFrames)
_mouseFrame = MOUSEFLASHFRAME;
- _mouseSprite = (byte *) _mouseAnim + READ_LE_UINT32(_mouseOffsets + _mouseFrame);
+ _mouseSprite = (byte *)_mouseAnim + READ_LE_UINT32(_mouseOffsets + _mouseFrame);
if (_mouseFrame != prevMouseFrame)
drawMouse();
@@ -172,12 +172,12 @@
else
_mouseFrame = MOUSEFLASHFRAME;
- _mouseAnim = (MouseAnim *) malloc(size);
+ _mouseAnim = (MouseAnim *)malloc(size);
if (!_mouseAnim)
return RDERR_OUTOFMEMORY;
- memcpy((byte *) _mouseAnim, ma, size);
- _mouseOffsets = (int32 *) ((byte *) _mouseAnim + sizeof(MouseAnim));
+ memcpy((byte *)_mouseAnim, ma, size);
+ _mouseOffsets = (int32 *)((byte *)_mouseAnim + sizeof(MouseAnim));
animateMouse();
drawMouse();
@@ -207,12 +207,12 @@
}
if (ma) {
- _luggageAnim = (MouseAnim *) malloc(size);
+ _luggageAnim = (MouseAnim *)malloc(size);
if (!_luggageAnim)
return RDERR_OUTOFMEMORY;
- memcpy((byte *) _luggageAnim, ma, size);
- _luggageOffset = (int32 *) ((byte *) _luggageAnim + sizeof(MouseAnim));
+ memcpy((byte *)_luggageAnim, ma, size);
+ _luggageOffset = (int32 *)((byte *)_luggageAnim + sizeof(MouseAnim));
animateMouse();
drawMouse();
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- animation.cpp 11 May 2005 00:01:38 -0000 1.65
+++ animation.cpp 12 May 2005 13:12:14 -0000 1.66
@@ -177,7 +177,7 @@
if (leadInRes) {
byte *leadIn = _vm->_resman->openResource(leadInRes);
uint32 leadInLen = _vm->_resman->fetchLen(leadInRes) - sizeof(StandardHeader);
- StandardHeader *header = (StandardHeader *) leadIn;
+ StandardHeader *header = (StandardHeader *)leadIn;
assert(header->fileType == WAV_FILE);
@@ -192,7 +192,7 @@
if (leadOutRes) {
leadOut = _vm->_resman->openResource(leadOutRes);
leadOutLen = _vm->_resman->fetchLen(leadOutRes) - sizeof(StandardHeader);
- StandardHeader *header = (StandardHeader *) leadOut;
+ StandardHeader *header = (StandardHeader *)leadOut;
assert(header->fileType == WAV_FILE);
@@ -420,7 +420,7 @@
data = _vm->_fontRenderer->makeTextSprite(msg, RENDERWIDE, 255, _vm->_speechFontId);
}
- FrameHeader *frame = (FrameHeader *) data;
+ FrameHeader *frame = (FrameHeader *)data;
SpriteInfo msgSprite;
byte *msgSurface;
Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -d -r1.151 -r1.152
--- d_sound.cpp 11 May 2005 00:01:44 -0000 1.151
+++ d_sound.cpp 12 May 2005 13:12:14 -0000 1.152
@@ -423,9 +423,9 @@
if (!_mixBuffer || numSamples > _mixBufferLen) {
if (_mixBuffer)
- _mixBuffer = (int16 *) realloc(_mixBuffer, 2 * numSamples);
+ _mixBuffer = (int16 *)realloc(_mixBuffer, 2 * numSamples);
else
- _mixBuffer = (int16 *) malloc(2 * numSamples);
+ _mixBuffer = (int16 *)malloc(2 * numSamples);
_mixBufferLen = numSamples;
}
@@ -724,14 +724,14 @@
uint32 bufferSize = 2 * numSamples;
- *buf = (uint16 *) malloc(bufferSize);
+ *buf = (uint16 *)malloc(bufferSize);
if (!*buf) {
delete input;
fh->file->close();
return 0;
}
- uint32 readSamples = input->readBuffer((int16 *) *buf, numSamples);
+ uint32 readSamples = input->readBuffer((int16 *)*buf, numSamples);
fh->file->close();
delete input;
Index: menu.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/menu.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- menu.cpp 27 Feb 2005 16:11:18 -0000 1.34
+++ menu.cpp 12 May 2005 13:12:15 -0000 1.35
@@ -278,7 +278,7 @@
// Only put the icon in the pocket if it is not NULL
if (icon != NULL) {
_iconCount++;
- _icons[menu][pocket] = (byte *) malloc(RDMENU_ICONWIDE * RDMENU_ICONDEEP);
+ _icons[menu][pocket] = (byte *)malloc(RDMENU_ICONWIDE * RDMENU_ICONDEEP);
if (_icons[menu][pocket] == NULL)
return RDERR_OUTOFMEMORY;
memcpy(_icons[menu][pocket], icon, RDMENU_ICONWIDE * RDMENU_ICONDEEP);
Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/palette.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- palette.cpp 8 May 2005 13:04:54 -0000 1.39
+++ palette.cpp 12 May 2005 13:12:15 -0000 1.40
@@ -88,7 +88,7 @@
if (palRes) {
byte *pal = _vm->_resman->openResource(palRes);
- StandardHeader *head = (StandardHeader *) pal;
+ StandardHeader *head = (StandardHeader *)pal;
assert(head->fileType == PALETTE_FILE);
pal += sizeof(StandardHeader);
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/render.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- render.cpp 2 May 2005 05:41:01 -0000 1.76
+++ render.cpp 12 May 2005 13:12:15 -0000 1.77
@@ -213,7 +213,7 @@
}
static void plot(int x, int y, int colour, void *data) {
- Screen *screen = (Screen *) data;
+ Screen *screen = (Screen *)data;
screen->plotPoint(x, y, (uint8) colour);
}
@@ -427,13 +427,13 @@
_xBlocks[_layer] = (p->w + BLOCKWIDTH - 1) / BLOCKWIDTH;
_yBlocks[_layer] = (p->h + BLOCKHEIGHT - 1) / BLOCKHEIGHT;
- _blockSurfaces[_layer] = (BlockSurface **) calloc(_xBlocks[_layer] * _yBlocks[_layer], sizeof(BlockSurface *));
+ _blockSurfaces[_layer] = (BlockSurface **)calloc(_xBlocks[_layer] * _yBlocks[_layer], sizeof(BlockSurface *));
if (!_blockSurfaces[_layer])
return RDERR_OUTOFMEMORY;
// Decode the parallax layer into a large chunk of memory
- byte *memchunk = (byte *) calloc(_xBlocks[_layer] * _yBlocks[_layer], BLOCKWIDTH * BLOCKHEIGHT);
+ byte *memchunk = (byte *)calloc(_xBlocks[_layer] * _yBlocks[_layer], BLOCKWIDTH * BLOCKHEIGHT);
if (!memchunk)
return RDERR_OUTOFMEMORY;
@@ -441,7 +441,7 @@
if (!p->offset[i])
continue;
- byte *pLine = (byte *) p + FROM_LE_32(p->offset[i]);
+ byte *pLine = (byte *)p + FROM_LE_32(p->offset[i]);
uint16 packets = READ_LE_UINT16(pLine);
uint16 offset = READ_LE_UINT16(pLine + 2);
@@ -503,7 +503,7 @@
// Only assign a surface to the block if it contains data.
if (block_has_data) {
- _blockSurfaces[_layer][i] = (BlockSurface *) malloc(sizeof(BlockSurface));
+ _blockSurfaces[_layer][i] = (BlockSurface *)malloc(sizeof(BlockSurface));
// Copy the data into the surfaces.
dst = _blockSurfaces[_layer][i]->data;
Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/sprite.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- sprite.cpp 2 May 2005 09:20:27 -0000 1.50
+++ sprite.cpp 12 May 2005 13:12:15 -0000 1.51
@@ -247,7 +247,7 @@
*/
int32 Screen::createSurface(SpriteInfo *s, byte **sprite) {
- *sprite = (byte *) malloc(s->w * s->h);
+ *sprite = (byte *)malloc(s->w * s->h);
if (!*sprite)
return RDERR_OUTOFMEMORY;
@@ -371,7 +371,7 @@
if (s->type & RDSPR_NOCOMPRESSION)
sprite = s->data;
else {
- sprite = (byte *) malloc(s->w * s->h);
+ sprite = (byte *)malloc(s->w * s->h);
freeSprite = true;
if (!sprite)
return RDERR_OUTOFMEMORY;
@@ -389,7 +389,7 @@
}
if (s->type & RDSPR_FLIP) {
- newSprite = (byte *) malloc(s->w * s->h);
+ newSprite = (byte *)malloc(s->w * s->h);
if (newSprite == NULL) {
if (freeSprite)
free(sprite);
@@ -482,7 +482,7 @@
return RDERR_NOTIMPLEMENTED;
}
- newSprite = (byte *) malloc(s->scaledWidth * s->scaledHeight);
+ newSprite = (byte *)malloc(s->scaledWidth * s->scaledHeight);
if (newSprite == NULL) {
if (freeSprite)
free(sprite);
@@ -516,7 +516,7 @@
// RDSPR_NOCOMPRESSION case.
if (!freeSprite) {
- newSprite = (byte *) malloc(s->w * s->h);
+ newSprite = (byte *)malloc(s->w * s->h);
memcpy(newSprite, sprite, s->w * s->h);
sprite = newSprite;
freeSprite = true;
@@ -624,7 +624,7 @@
if (_lightMask)
return RDERR_NOTCLOSED;
- _lightMask = (byte *) malloc(s->w * s->h);
+ _lightMask = (byte *)malloc(s->w * s->h);
if (!_lightMask)
return RDERR_OUTOFMEMORY;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword2 anims.cpp,1.71,1.72 build_display.cpp,1.74,1.75 console.cpp,1.54,1.55 controls.cpp,1.89,1.90 debug.cpp,1.49,1.50 function.cpp,1.84,1.85 icons.cpp,1.43,1.44 interpreter.cpp,1.53,1.54 interpreter.h,1.16,1.17 layers.cpp,1.37,1.38 logic.cpp,1.55,1.56 maketext.cpp,1.48,1.49 memory.cpp,1.35,1.36 protocol.cpp,1.30,1.31 resman.cpp,1.112,1.113 router.cpp,1.47,1.48 save_rest.cpp,1.72,1.73 sound.cpp,1.61,1.62 speech.cpp,1.74,1.75 startup.cpp,1.50,1.51 sword2.cpp,1.144,1.145 walker.cpp,1.47,1.48
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.151,2.152 script_v72he.cpp,2.289,2.290
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list