aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorTarek Soliman2012-02-15 09:53:31 -0600
committerTarek Soliman2012-02-15 10:07:10 -0600
commita4798602d7a025dc13fd253d584dbf29dbec488d (patch)
treed6e764535eb4eef6d3c313e00a7eaea8b1724a2d /backends
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 'backends')
-rw-r--r--backends/events/maemosdl/maemosdl-events.cpp2
-rw-r--r--backends/fs/symbian/symbian-fs.cpp2
-rw-r--r--backends/fs/symbian/symbianstream.cpp30
-rw-r--r--backends/fs/windows/windows-fs.cpp2
-rw-r--r--backends/keymapper/remap-dialog.cpp2
-rw-r--r--backends/platform/bada/application.cpp2
-rw-r--r--backends/platform/bada/audio.cpp2
-rw-r--r--backends/platform/bada/fs.cpp10
-rw-r--r--backends/platform/bada/missing.cpp2
-rw-r--r--backends/platform/bada/portdefs.h6
-rw-r--r--backends/platform/dc/audio.cpp2
-rw-r--r--backends/platform/dc/dcloader.cpp4
-rw-r--r--backends/platform/dc/display.cpp14
-rw-r--r--backends/platform/ds/arm7/source/main.cpp18
-rw-r--r--backends/platform/ds/arm9/source/blitters.cpp10
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp6
-rw-r--r--backends/platform/iphone/iphone_keyboard.h2
-rw-r--r--backends/platform/iphone/osys_video.cpp2
-rw-r--r--backends/platform/n64/osys_n64_utilities.cpp4
-rw-r--r--backends/platform/ps2/DmaPipe.cpp6
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp18
-rw-r--r--backends/platform/ps2/fileio.cpp12
-rw-r--r--backends/platform/ps2/icon.cpp8
-rw-r--r--backends/platform/ps2/ps2mutex.cpp6
-rw-r--r--backends/platform/ps2/ps2pad.cpp2
-rw-r--r--backends/platform/ps2/systemps2.cpp18
-rw-r--r--backends/platform/psp/display_manager.cpp8
-rw-r--r--backends/platform/sdl/posix/posix.cpp4
-rw-r--r--backends/platform/wince/wince-sdl.cpp12
-rw-r--r--backends/plugins/elf/elf-loader.cpp2
30 files changed, 109 insertions, 109 deletions
diff --git a/backends/events/maemosdl/maemosdl-events.cpp b/backends/events/maemosdl/maemosdl-events.cpp
index acca1a3c02..c01f175863 100644
--- a/backends/events/maemosdl/maemosdl-events.cpp
+++ b/backends/events/maemosdl/maemosdl-events.cpp
@@ -158,7 +158,7 @@ bool MaemoSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &even
bool MaemoSdlEventSource::toggleClickMode() {
_clickEnabled = !_clickEnabled;
- ((SurfaceSdlGraphicsManager*) _graphicsManager)->displayMessageOnOSD(
+ ((SurfaceSdlGraphicsManager *) _graphicsManager)->displayMessageOnOSD(
_clickEnabled ? _("Clicking Enabled") : _("Clicking Disabled"));
return _clickEnabled;
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 1beab3c13a..fc78f7580b 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -153,7 +153,7 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
sprintf(path,"%c:\\", driveNumber+'A');
SymbianFilesystemNode entry(false);
- entry._displayName = (char*) driveString8.PtrZ(); // drive_name
+ entry._displayName = (char *) driveString8.PtrZ(); // drive_name
entry._isDirectory = true;
entry._isValid = true;
entry._isPseudoRoot = false;
diff --git a/backends/fs/symbian/symbianstream.cpp b/backends/fs/symbian/symbianstream.cpp
index f4873292b3..fa7842d3b1 100644
--- a/backends/fs/symbian/symbianstream.cpp
+++ b/backends/fs/symbian/symbianstream.cpp
@@ -96,7 +96,7 @@ TSymbianFileEntry* CreateSymbianFileEntry(const char* name, const char* mode) {
}
size_t ReadData(const void* ptr, size_t size, size_t numItems, TSymbianFileEntry* handle) {
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(handle));
TUint32 totsize = size*numItems;
TPtr8 pointer ( (unsigned char*) ptr, totsize);
@@ -169,29 +169,29 @@ SymbianStdioStream::SymbianStdioStream(void *handle) : _handle(handle) {
}
SymbianStdioStream::~SymbianStdioStream() {
- ((TSymbianFileEntry*)(_handle))->_fileHandle.Close();
+ ((TSymbianFileEntry *)(_handle))->_fileHandle.Close();
- delete (TSymbianFileEntry*)(_handle);
+ delete (TSymbianFileEntry *)(_handle);
}
bool SymbianStdioStream::err() const {
- return ((TSymbianFileEntry*)(_handle))->_lastError != 0;
+ return ((TSymbianFileEntry *)(_handle))->_lastError != 0;
}
void SymbianStdioStream::clearErr() {
- ((TSymbianFileEntry*)(_handle))->_lastError = 0;
- ((TSymbianFileEntry*)(_handle))->_eofReached = 0;
+ ((TSymbianFileEntry *)(_handle))->_lastError = 0;
+ ((TSymbianFileEntry *)(_handle))->_eofReached = 0;
}
bool SymbianStdioStream::eos() const {
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(_handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(_handle));
return entry->_eofReached != 0;
}
int32 SymbianStdioStream::pos() const {
TInt pos = 0;
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(_handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(_handle));
entry->_lastError = entry->_fileHandle.Seek(ESeekCurrent, pos);
if (entry->_lastError == KErrNone && entry->_inputPos != KErrNotFound) {
@@ -204,7 +204,7 @@ int32 SymbianStdioStream::pos() const {
int32 SymbianStdioStream::size() const {
TInt length = 0;
- ((TSymbianFileEntry*)(_handle))->_fileHandle.Size(length);
+ ((TSymbianFileEntry *)(_handle))->_fileHandle.Size(length);
return length;
}
@@ -214,7 +214,7 @@ bool SymbianStdioStream::seek(int32 offs, int whence) {
TSeek seekMode = ESeekStart;
TInt pos = offs;
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(_handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(_handle));
switch (whence) {
case SEEK_SET:
@@ -246,11 +246,11 @@ uint32 SymbianStdioStream::read(void *ptr, uint32 len) {
uint32 SymbianStdioStream::write(const void *ptr, uint32 len) {
TPtrC8 pointer( (unsigned char*) ptr, len);
- ((TSymbianFileEntry*)(_handle))->_inputPos = KErrNotFound;
- ((TSymbianFileEntry*)(_handle))->_lastError = ((TSymbianFileEntry*)(_handle))->_fileHandle.Write(pointer);
- ((TSymbianFileEntry*)(_handle))->_eofReached = EFalse;
+ ((TSymbianFileEntry *)(_handle))->_inputPos = KErrNotFound;
+ ((TSymbianFileEntry *)(_handle))->_lastError = ((TSymbianFileEntry *)(_handle))->_fileHandle.Write(pointer);
+ ((TSymbianFileEntry *)(_handle))->_eofReached = EFalse;
- if (((TSymbianFileEntry*)(_handle))->_lastError == KErrNone) {
+ if (((TSymbianFileEntry *)(_handle))->_lastError == KErrNone) {
return len;
}
@@ -258,7 +258,7 @@ uint32 SymbianStdioStream::write(const void *ptr, uint32 len) {
}
bool SymbianStdioStream::flush() {
- ((TSymbianFileEntry*)(_handle))->_fileHandle.Flush();
+ ((TSymbianFileEntry *)(_handle))->_fileHandle.Flush();
return true;
}
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index c32ad2da94..030f394f81 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -87,7 +87,7 @@ void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const c
char* WindowsFilesystemNode::toAscii(TCHAR *str) {
#ifndef UNICODE
- return (char*)str;
+ return (char *)str;
#else
static char asciiString[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, str, _tcslen(str) + 1, asciiString, sizeof(asciiString), NULL, NULL);
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp
index 6f5716b306..eb2d4c5441 100644
--- a/backends/keymapper/remap-dialog.cpp
+++ b/backends/keymapper/remap-dialog.cpp
@@ -92,7 +92,7 @@ void RemapDialog::open() {
debug(3, "RemapDialog::open keymaps: %d", keymapCount);
- _keymapTable = (Keymap **)malloc(sizeof(Keymap*) * keymapCount);
+ _keymapTable = (Keymap **)malloc(sizeof(Keymap *) * keymapCount);
Keymapper::Domain::iterator it;
uint32 idx = 0;
diff --git a/backends/platform/bada/application.cpp b/backends/platform/bada/application.cpp
index bf585d2782..ba8e544983 100644
--- a/backends/platform/bada/application.cpp
+++ b/backends/platform/bada/application.cpp
@@ -68,7 +68,7 @@ void BadaScummVM::OnUserEventReceivedN(RequestId requestId,
// assertion failure termination
String *message = NULL;
if (args) {
- message = (String*)args->GetAt(0);
+ message = (String *)args->GetAt(0);
}
if (!message) {
message = new String("Unknown error");
diff --git a/backends/platform/bada/audio.cpp b/backends/platform/bada/audio.cpp
index b868e91357..65a5a80fa5 100644
--- a/backends/platform/bada/audio.cpp
+++ b/backends/platform/bada/audio.cpp
@@ -238,7 +238,7 @@ void AudioThread::OnAudioOutBufferEndReached(Osp::Media::AudioOut &src) {
void AudioThread::OnTimerExpired(Timer &timer) {
if (_ready < NUM_AUDIO_BUFFERS) {
uint len = _audioBuffer[_head].GetCapacity();
- int samples = _mixer->mixCallback((byte*)_audioBuffer[_head].GetPointer(), len);
+ int samples = _mixer->mixCallback((byte *)_audioBuffer[_head].GetPointer(), len);
if (samples) {
_head = (_head + 1) % NUM_AUDIO_BUFFERS;
_ready++;
diff --git a/backends/platform/bada/fs.cpp b/backends/platform/bada/fs.cpp
index 0ae0cde43d..37ca496d18 100644
--- a/backends/platform/bada/fs.cpp
+++ b/backends/platform/bada/fs.cpp
@@ -170,17 +170,17 @@ uint32 BadaFileStream::read(void *ptr, uint32 len) {
uint32 available = bufferLength - bufferIndex;
if (len <= available) {
// use allocation
- memcpy((byte*)ptr, &buffer[bufferIndex], len);
+ memcpy((byte *)ptr, &buffer[bufferIndex], len);
bufferIndex += len;
result = len;
} else {
// use remaining allocation
- memcpy((byte*)ptr, &buffer[bufferIndex], available);
+ memcpy((byte *)ptr, &buffer[bufferIndex], available);
uint32 remaining = len - available;
result = available;
if (remaining) {
- result += file->Read(((byte*)ptr) + available, remaining);
+ result += file->Read(((byte *)ptr) + available, remaining);
}
bufferIndex = bufferLength = 0;
}
@@ -192,11 +192,11 @@ uint32 BadaFileStream::read(void *ptr, uint32 len) {
if (bufferLength < len) {
len = bufferLength;
}
- memcpy((byte*)ptr, buffer, len);
+ memcpy((byte *)ptr, buffer, len);
result = bufferIndex = len;
}
} else {
- result = file->Read((byte*)ptr, len);
+ result = file->Read((byte *)ptr, len);
bufferIndex = bufferLength = 0;
}
} else {
diff --git a/backends/platform/bada/missing.cpp b/backends/platform/bada/missing.cpp
index a5433ec61a..10d45ca4b5 100644
--- a/backends/platform/bada/missing.cpp
+++ b/backends/platform/bada/missing.cpp
@@ -96,7 +96,7 @@ int sprintf(char *str, const char *format, ...) {
char *strdup(const char *strSource) {
char *buffer;
int len = strlen(strSource) + 1;
- buffer = (char*)malloc(len);
+ buffer = (char *)malloc(len);
if (buffer) {
memcpy(buffer, strSource, len);
}
diff --git a/backends/platform/bada/portdefs.h b/backends/platform/bada/portdefs.h
index 7d85a9ec35..813c5acde3 100644
--- a/backends/platform/bada/portdefs.h
+++ b/backends/platform/bada/portdefs.h
@@ -65,9 +65,9 @@ void stderr_vfprintf(void*, const char *format, va_list ap);
#undef fputs
#undef fflush
-#define stderr (void*)0
-#define stdout (void*)1
-#define stdin (void*)2
+#define stderr (void *)0
+#define stdout (void *)1
+#define stdin (void *)2
#define fputs(str, file)
#define fflush(file)
#define sscanf simple_sscanf
diff --git a/backends/platform/dc/audio.cpp b/backends/platform/dc/audio.cpp
index 35cb51f349..4f01531486 100644
--- a/backends/platform/dc/audio.cpp
+++ b/backends/platform/dc/audio.cpp
@@ -59,7 +59,7 @@ void OSystem_Dreamcast::checkSound()
if (n<100)
return;
- _mixer->mixCallback((byte*)temp_sound_buffer,
+ _mixer->mixCallback((byte *)temp_sound_buffer,
2*SAMPLES_TO_BYTES(n));
if (fillpos+n > curr_ring_buffer_samples) {
diff --git a/backends/platform/dc/dcloader.cpp b/backends/platform/dc/dcloader.cpp
index 675f7ad8c7..56193c282a 100644
--- a/backends/platform/dc/dcloader.cpp
+++ b/backends/platform/dc/dcloader.cpp
@@ -385,8 +385,8 @@ void *DLObject::symbol(const char *name)
for (int c = symbol_cnt; c--; s++)
if ((s->st_info>>4 == 1 || s->st_info>>4 == 2) &&
strtab[s->st_name] == '_' && !strcmp(name, strtab+s->st_name+1)) {
- DBG(("=> %p\n", (void*)s->st_value));
- return (void*)s->st_value;
+ DBG(("=> %p\n", (void *)s->st_value));
+ return (void *)s->st_value;
}
seterror("Symbol \"%s\" not found.", name);
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index 76658c6590..e886b55869 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -334,8 +334,8 @@ void OSystem_Dreamcast::updateScreenTextures(void)
unsigned short *dst = (unsigned short *)screen_tx[_screen_buffer];
unsigned char *src = screen;
- // while ((*((volatile unsigned int *)(void*)0xa05f810c) & 0x3ff) != 200);
- // *((volatile unsigned int *)(void*)0xa05f8040) = 0xff0000;
+ // while ((*((volatile unsigned int *)(void *)0xa05f810c) & 0x3ff) != 200);
+ // *((volatile unsigned int *)(void *)0xa05f8040) = 0xff0000;
if (_screenFormat == 0)
for ( int y = 0; y<_screen_h; y++ )
@@ -379,7 +379,7 @@ void OSystem_Dreamcast::updateScreenPolygons(void)
struct polygon_list mypoly;
struct packed_colour_vertex_list myvertex;
- // *((volatile unsigned int *)(void*)0xa05f8040) = 0x00ff00;
+ // *((volatile unsigned int *)(void *)0xa05f8040) = 0x00ff00;
mypoly.cmd =
TA_CMD_POLYGON|TA_CMD_POLYGON_TYPE_OPAQUE|TA_CMD_POLYGON_SUBLIST|
@@ -395,7 +395,7 @@ void OSystem_Dreamcast::updateScreenPolygons(void)
mypoly.red = mypoly.green = mypoly.blue = mypoly.alpha = 0;
ta_begin_frame();
- // *((volatile unsigned int *)(void*)0xa05f8040) = 0x0000ff;
+ // *((volatile unsigned int *)(void *)0xa05f8040) = 0x0000ff;
ta_commit_list(&mypoly);
myvertex.cmd = TA_CMD_VERTEX;
@@ -493,12 +493,12 @@ void OSystem_Dreamcast::updateScreenPolygons(void)
_softkbd.draw(330.0*sin(0.013*_softkbd_motion) - 320.0, 200.0,
120-_softkbd_motion);
- // *((volatile unsigned int *)(void*)0xa05f8040) = 0xffff00;
+ // *((volatile unsigned int *)(void *)0xa05f8040) = 0xffff00;
drawMouse(_ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_buf, _ms_visible);
- // *((volatile unsigned int *)(void*)0xa05f8040) = 0xff00ff;
+ // *((volatile unsigned int *)(void *)0xa05f8040) = 0xff00ff;
ta_commit_frame();
- // *((volatile unsigned int *)(void*)0xa05f8040) = 0x0;
+ // *((volatile unsigned int *)(void *)0xa05f8040) = 0x0;
_last_screen_refresh = Timer();
}
diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp
index 2e9cacc669..6e714b22fa 100644
--- a/backends/platform/ds/arm7/source/main.cpp
+++ b/backends/platform/ds/arm7/source/main.cpp
@@ -46,10 +46,10 @@
#include "cartreset_nolibfat.h"
-#define TOUCH_CAL_X1 (*(vs16*)0x027FFCD8)
-#define TOUCH_CAL_Y1 (*(vs16*)0x027FFCDA)
-#define TOUCH_CAL_X2 (*(vs16*)0x027FFCDE)
-#define TOUCH_CAL_Y2 (*(vs16*)0x027FFCE0)
+#define TOUCH_CAL_X1 (*(vs16 *)0x027FFCD8)
+#define TOUCH_CAL_Y1 (*(vs16 *)0x027FFCDA)
+#define TOUCH_CAL_X2 (*(vs16 *)0x027FFCDE)
+#define TOUCH_CAL_Y2 (*(vs16 *)0x027FFCE0)
#define SCREEN_WIDTH 256
#define SCREEN_HEIGHT 192
s32 TOUCH_WIDTH = TOUCH_CAL_X2 - TOUCH_CAL_X1;
@@ -71,10 +71,10 @@ int temp;
int adpcmBufferNum = 0;
// those are pixel positions of the two points you click when calibrating
-#define TOUCH_CNTRL_X1 (*(vu8*)0x027FFCDC)
-#define TOUCH_CNTRL_Y1 (*(vu8*)0x027FFCDD)
-#define TOUCH_CNTRL_X2 (*(vu8*)0x027FFCE2)
-#define TOUCH_CNTRL_Y2 (*(vu8*)0x027FFCE3)
+#define TOUCH_CNTRL_X1 (*(vu8 *)0x027FFCDC)
+#define TOUCH_CNTRL_Y1 (*(vu8 *)0x027FFCDD)
+#define TOUCH_CNTRL_X2 (*(vu8 *)0x027FFCE2)
+#define TOUCH_CNTRL_Y2 (*(vu8 *)0x027FFCE3)
//////////////////////////////////////////////////////////////////////
@@ -330,7 +330,7 @@ void performSleep() {
// int saveInts = REG_IE;
// REG_IE = (1 << 22) | IRQ_VBLANK; // Lid open
-// *((u32*) (0x0380FFF8)) = *((u32*) (0x0380FFF8)) | (REG_IE & REG_IF);
+// *((u32 *) (0x0380FFF8)) = *((u32 *) (0x0380FFF8)) | (REG_IE & REG_IF);
// VBLANK_INTR_WAIT_FLAGS = IRQ_VBLANK;
diff --git a/backends/platform/ds/arm9/source/blitters.cpp b/backends/platform/ds/arm9/source/blitters.cpp
index 0076b302fd..1e8d56615d 100644
--- a/backends/platform/ds/arm9/source/blitters.cpp
+++ b/backends/platform/ds/arm9/source/blitters.cpp
@@ -222,8 +222,8 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3
u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0;
u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2;
- ((u32*)dest)[0] = d10;
- ((u32*)dest)[1] = d32;
+ ((u32 *)dest)[0] = d10;
+ ((u32 *)dest)[1] = d32;
}
#else
static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3, u16 s4,
@@ -290,7 +290,7 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3
gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1];
bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1];
u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0;
- ((u32*)dest)[0] = d10;
+ ((u32 *)dest)[0] = d10;
u32 d2 = 2*s2 + 2*s3 + s3;
u32 d3 = s3 + 4*s4;
@@ -307,7 +307,7 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3
bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3];
u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2;
- ((u32*)dest)[1] = d32;
+ ((u32 *)dest)[1] = d32;
}
// Can't work in place
@@ -377,7 +377,7 @@ void Rescale_320x256xPAL8_To_256x256x1555(u16 *dest, const u8 *src, int destStri
void Rescale_320x256xPAL8_To_256x256x1555(u16 *dest, const u8 *src, int destStride, int srcStride, const u16 *palette) {
u16 fastRam[256];
for (size_t i = 0; i < 128; ++i)
- ((u32*)fastRam)[i] = ((const u32*)palette)[i];
+ ((u32 *)fastRam)[i] = ((const u32*)palette)[i];
for (size_t i = 0; i < 200; ++i) {
Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index dfd906d816..cedbdcb167 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -926,7 +926,7 @@ void displayMode16Bit() {
SUB_BG0_Y0 = 0;
consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 4, 0, false, true);
-// consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(4), (u16*)CHAR_BASE_BLOCK_SUB(0), 16);
+// consoleInitDefault((u16 *)SCREEN_BASE_BLOCK_SUB(4), (u16 *)CHAR_BASE_BLOCK_SUB(0), 16);
for (int r = 0; r < 32 * 32; r++) {
((u16 *) SCREEN_BASE_BLOCK_SUB(4))[r] = buffer[r];
@@ -2414,7 +2414,7 @@ void initHardware() {
BG_PALETTE[255] = RGB15(31,31,31);//by default font will be rendered with color 255
//consoleInit() is a lot more flexible but this gets you up and running quick
-// consoleInitDefault((u16*)SCREEN_BASE_BLOCK(0), (u16*)CHAR_BASE_BLOCK(1), 16);
+// consoleInitDefault((u16 *)SCREEN_BASE_BLOCK(0), (u16 *)CHAR_BASE_BLOCK(1), 16);
//consolePrintSet(0, 6);
//irqs are nice
@@ -2886,7 +2886,7 @@ void dsExceptionHandler() {
setExceptionHandler(NULL);
u32 currentMode = getCPSR() & 0x1f;
- u32 thumbState = ((*(u32*)0x027FFD90) & 0x20);
+ u32 thumbState = ((*(u32 *)0x027FFD90) & 0x20);
u32 codeAddress, exceptionAddress = 0;
diff --git a/backends/platform/iphone/iphone_keyboard.h b/backends/platform/iphone/iphone_keyboard.h
index eecad09398..c4b4a9a2a7 100644
--- a/backends/platform/iphone/iphone_keyboard.h
+++ b/backends/platform/iphone/iphone_keyboard.h
@@ -29,7 +29,7 @@
}
- (id)initWithFrame:(CGRect)frame;
-- (UITextView*)inputView;
+- (UITextView *)inputView;
- (void)setInputDelegate:(id)delegate;
- (void)handleKeyPress:(unichar)c;
diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp
index fa425b108a..f9ae5ea06b 100644
--- a/backends/platform/iphone/osys_video.cpp
+++ b/backends/platform/iphone/osys_video.cpp
@@ -466,7 +466,7 @@ void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
int texWidth = getSizeNextPOT(w);
int texHeight = getSizeNextPOT(h);
int bufferSize = texWidth * texHeight * sizeof(int16);
- int16* mouseBuf = (int16*)malloc(bufferSize);
+ int16* mouseBuf = (int16 *)malloc(bufferSize);
memset(mouseBuf, 0, bufferSize);
for (uint x = 0; x < w; ++x) {
diff --git a/backends/platform/n64/osys_n64_utilities.cpp b/backends/platform/n64/osys_n64_utilities.cpp
index 94d727e421..f007a1bd25 100644
--- a/backends/platform/n64/osys_n64_utilities.cpp
+++ b/backends/platform/n64/osys_n64_utilities.cpp
@@ -100,9 +100,9 @@ void refillAudioBuffers(void) {
Audio::MixerImpl *localmixer = (Audio::MixerImpl *)osys->getMixer();
while (_requiredSoundSlots) {
- sndBuf = (byte*)getAIBuffer();
+ sndBuf = (byte *)getAIBuffer();
- localmixer->mixCallback((byte*)sndBuf, osys->_audioBufferSize);
+ localmixer->mixCallback((byte *)sndBuf, osys->_audioBufferSize);
putAIBuffer();
diff --git a/backends/platform/ps2/DmaPipe.cpp b/backends/platform/ps2/DmaPipe.cpp
index c6f6ab72ac..a346a67566 100644
--- a/backends/platform/ps2/DmaPipe.cpp
+++ b/backends/platform/ps2/DmaPipe.cpp
@@ -48,7 +48,7 @@ private:
DmaPipe::DmaPipe(uint32 size) {
size &= ~0x1F;
- _buf = (uint64*)memalign(64, size);
+ _buf = (uint64 *)memalign(64, size);
_curPipe = 0;
_pipes[0] = new SinglePipe(_buf, size >> 4);
_pipes[1] = new SinglePipe(_buf + (size >> 4), size >> 4);
@@ -260,7 +260,7 @@ void SinglePipe::init(void) {
_buf[0] = 0x0000000070000000;
_buf[1] = 0;
_chainHead = _buf;
- _chainSize = (uint16*)_chainHead;
+ _chainSize = (uint16 *)_chainHead;
_bufPos = _buf + 2;
}
@@ -272,7 +272,7 @@ void SinglePipe::appendChain(uint64 dmaTag) {
_chainHead = _bufPos;
_chainHead[0] = dmaTag;
_chainHead[1] = 0;
- _chainSize = (uint16*)_chainHead;
+ _chainSize = (uint16 *)_chainHead;
_bufPos += 2;
}
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index b70e8b13fa..8df6198c38 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -130,9 +130,9 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_height = height;
_pitch = (width + 127) & ~127;
- _screenBuf = (uint8*)memalign(64, _width * _height);
- _overlayBuf = (uint16*)memalign(64, _width * _height * 2);
- _clut = (uint32*)memalign(64, 256 * 4);
+ _screenBuf = (uint8 *)memalign(64, _width * _height);
+ _overlayBuf = (uint16 *)memalign(64, _width * _height * 2);
+ _clut = (uint32 *)memalign(64, 256 * 4);
memset(_screenBuf, 0, _width * _height);
memset(_clut, 0, 256 * sizeof(uint32));
@@ -291,11 +291,11 @@ void Gs2dScreen::quit(void) {
}
void Gs2dScreen::createAnimTextures(void) {
- uint8 *buf = (uint8*)memalign(64, 16 * 64);
+ uint8 *buf = (uint8 *)memalign(64, 16 * 64);
memset(buf, 0, 16 * 64);
uint32 vramDest = _texPtrs[TEXT];
for (int i = 0; i < 16; i++) {
- uint32 *destPos = (uint32*)buf;
+ uint32 *destPos = (uint32 *)buf;
for (int ch = 15; ch >= 0; ch--) {
const uint32 *src = (const uint32*)(_binaryData + ((_binaryPattern[i] >> ch) & 1) * 4 * 14);
for (int line = 0; line < 14; line++)
@@ -331,8 +331,8 @@ void Gs2dScreen::newScreenSize(uint16 width, uint16 height) {
// malloc new buffers
free(_screenBuf);
free(_overlayBuf);
- _screenBuf = (uint8*)memalign(64, _width * _height);
- _overlayBuf = (uint16*)memalign(64, _width * _height * 2);
+ _screenBuf = (uint8 *)memalign(64, _width * _height);
+ _overlayBuf = (uint16 *)memalign(64, _width * _height * 2);
memset(_screenBuf, 0, _width * height);
memset(_overlayBuf, 0, _width * height * 2);
memset(_clut, 0, 256 * sizeof(uint32));
@@ -556,7 +556,7 @@ void Gs2dScreen::copyPrintfOverlay(const uint8 *buf) {
}
void Gs2dScreen::clearPrintfOverlay(void) {
- uint8 *tmpBuf = (uint8*)memalign(64, 320 * 200);
+ uint8 *tmpBuf = (uint8 *)memalign(64, 320 * 200);
memset(tmpBuf, 4, 320 * 200);
_dmaPipe->uploadTex(_texPtrs[PRINTF], 3 * 128, 0, 0, GS_PSMT8H, tmpBuf, 320, 200);
_dmaPipe->flush();
@@ -619,7 +619,7 @@ void Gs2dScreen::setMouseOverlay(const uint8 *buf, uint16 width, uint16 height,
_mTraCol = transpCol;
_clutChanged = true;
}
- uint8 *bufCopy = (uint8*)memalign(64, M_SIZE * M_SIZE); // make a copy to align to 64 bytes
+ uint8 *bufCopy = (uint8 *)memalign(64, M_SIZE * M_SIZE); // make a copy to align to 64 bytes
memset(bufCopy, _mTraCol, M_SIZE * M_SIZE);
for (int cnt = 0; cnt < height; cnt++)
memcpy(bufCopy + cnt * M_SIZE, buf + cnt * width, width);
diff --git a/backends/platform/ps2/fileio.cpp b/backends/platform/ps2/fileio.cpp
index ef01f3a693..1ec16a3817 100644
--- a/backends/platform/ps2/fileio.cpp
+++ b/backends/platform/ps2/fileio.cpp
@@ -52,7 +52,7 @@ Ps2File::Ps2File() {
_eof = false;
_err = false;
- _cacheBuf = (uint8*)memalign(64, CACHE_SIZE * 2);
+ _cacheBuf = (uint8 *)memalign(64, CACHE_SIZE * 2);
_cacheOpRunning = 0;
_filePos = _physFilePos = _cachePos = 0;
@@ -362,7 +362,7 @@ uint32 Ps2File::read(void *dest, uint32 len) {
_eof = true;
}
- uint8 *destBuf = (uint8*)dest;
+ uint8 *destBuf = (uint8 *)dest;
if ((_filePos < _cachePos) || (_filePos + len > _cachePos + _bytesInCache))
cacheReadSync(); // we have to read from CD, sync cache.
@@ -413,7 +413,7 @@ uint32 Ps2File::read(void *dest, uint32 len) {
#ifdef __PS2_FILE_SEMA__
SignalSema(_sema);
#endif
- return destBuf - (uint8*)dest;
+ return destBuf - (uint8 *)dest;
}
uint32 Ps2File::write(const void *src, uint32 len) {
@@ -518,7 +518,7 @@ FILE *ps2_fopen(const char *fname, const char *mode) {
}
int ps2_fclose(FILE *stream) {
- Ps2File *file = (Ps2File*)stream;
+ Ps2File *file = (Ps2File *)stream;
delete file;
@@ -528,10 +528,10 @@ int ps2_fclose(FILE *stream) {
size_t ps2_fread(void *buf, size_t r, size_t n, FILE *stream) {
assert(r != 0);
- return ((Ps2File*)stream)->read(buf, r * n) / r;
+ return ((Ps2File *)stream)->read(buf, r * n) / r;
}
size_t ps2_fwrite(const void *buf, size_t r, size_t n, FILE *stream) {
assert(r != 0);
- return ((Ps2File*)stream)->write(buf, r * n) / r;
+ return ((Ps2File *)stream)->write(buf, r * n) / r;
}
diff --git a/backends/platform/ps2/icon.cpp b/backends/platform/ps2/icon.cpp
index 9852e6d40b..bda4843647 100644
--- a/backends/platform/ps2/icon.cpp
+++ b/backends/platform/ps2/icon.cpp
@@ -960,13 +960,13 @@ void PS2Icon::setup(mcIcon *icon) {
memcpy(icon->head, "PS2D", 4);
icon->nlOffset = strlen(_info) + 1;
strcpy(title, _info);
- strcpy_sjis((short*)&(icon->title), title);
+ strcpy_sjis((short *)&(icon->title), title);
icon->trans = 0x10;
memcpy(icon->bgCol, _bgcolor, sizeof(_bgcolor));
memcpy(icon->lightDir, _lightdir, sizeof(_lightdir));
memcpy(icon->lightCol, _lightcol, sizeof(_lightcol));
memcpy(icon->lightAmbient, _ambient, sizeof(_ambient));
- strcpy((char*)icon->view, "scummvm.icn");
- strcpy((char*)icon->copy, "scummvm.icn");
- strcpy((char*)icon->del, "scummvm.icn");
+ strcpy((char *)icon->view, "scummvm.icn");
+ strcpy((char *)icon->copy, "scummvm.icn");
+ strcpy((char *)icon->del, "scummvm.icn");
}
diff --git a/backends/platform/ps2/ps2mutex.cpp b/backends/platform/ps2/ps2mutex.cpp
index 5b30fa7862..ae63fe5724 100644
--- a/backends/platform/ps2/ps2mutex.cpp
+++ b/backends/platform/ps2/ps2mutex.cpp
@@ -57,7 +57,7 @@ OSystem::MutexRef OSystem_PS2::createMutex(void) {
void OSystem_PS2::lockMutex(MutexRef mutex) {
WaitSema(_mutexSema);
- Ps2Mutex *sysMutex = (Ps2Mutex*)mutex;
+ Ps2Mutex *sysMutex = (Ps2Mutex *)mutex;
int tid = GetThreadId();
assert(tid != 0);
@@ -75,7 +75,7 @@ void OSystem_PS2::lockMutex(MutexRef mutex) {
void OSystem_PS2::unlockMutex(MutexRef mutex) {
WaitSema(_mutexSema);
- Ps2Mutex *sysMutex = (Ps2Mutex*)mutex;
+ Ps2Mutex *sysMutex = (Ps2Mutex *)mutex;
int tid = GetThreadId();
if (sysMutex->owner && sysMutex->count && (sysMutex->owner == tid))
@@ -90,7 +90,7 @@ void OSystem_PS2::unlockMutex(MutexRef mutex) {
void OSystem_PS2::deleteMutex(MutexRef mutex) {
WaitSema(_mutexSema);
- Ps2Mutex *sysMutex = (Ps2Mutex*)mutex;
+ Ps2Mutex *sysMutex = (Ps2Mutex *)mutex;
if (sysMutex->owner || sysMutex->count)
printf("WARNING: Deleting LOCKED mutex!\n");
DeleteSema(sysMutex->sema);
diff --git a/backends/platform/ps2/ps2pad.cpp b/backends/platform/ps2/ps2pad.cpp
index eeb9dfbd93..b6afc217e6 100644
--- a/backends/platform/ps2/ps2pad.cpp
+++ b/backends/platform/ps2/ps2pad.cpp
@@ -30,7 +30,7 @@
Ps2Pad::Ps2Pad(OSystem_PS2 *system) {
_system = system;
- _padBuf = (uint8*)memalign(64, 256);
+ _padBuf = (uint8 *)memalign(64, 256);
_padStatus = STAT_NONE;
padInit(0); // initialize library
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 481227dd02..d4e993da63 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -384,8 +384,8 @@ void OSystem_PS2::initTimer(void) {
ee_thread_t timerThread, soundThread, thisThread;
ReferThreadStatus(GetThreadId(), &thisThread);
- _timerStack = (uint8*)malloc(TIMER_STACK_SIZE);
- _soundStack = (uint8*)malloc(SOUND_STACK_SIZE);
+ _timerStack = (uint8 *)malloc(TIMER_STACK_SIZE);
+ _soundStack = (uint8 *)malloc(SOUND_STACK_SIZE);
// give timer thread a higher priority than main thread
timerThread.initial_priority = thisThread.current_priority - 1;
@@ -435,7 +435,7 @@ void OSystem_PS2::timerThreadCallback(void) {
}
void OSystem_PS2::soundThreadCallback(void) {
- int16 *soundBufL = (int16*)memalign(64, SMP_PER_BLOCK * sizeof(int16) * 2);
+ int16 *soundBufL = (int16 *)memalign(64, SMP_PER_BLOCK * sizeof(int16) * 2);
int16 *soundBufR = soundBufL + SMP_PER_BLOCK;
int bufferedSamples = 0;
@@ -453,9 +453,9 @@ void OSystem_PS2::soundThreadCallback(void) {
if (bufferedSamples <= 8 * SMP_PER_BLOCK) {
// we have to produce more samples, call sound mixer
// the scratchpad at 0x70000000 is used as temporary soundbuffer
- //_scummSoundProc(_scummSoundParam, (uint8*)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16));
- // Audio::Mixer::mixCallback(_scummMixer, (byte*)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16));
- _scummMixer->mixCallback((byte*)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16));
+ //_scummSoundProc(_scummSoundParam, (uint8 *)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16));
+ // Audio::Mixer::mixCallback(_scummMixer, (byte *)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16));
+ _scummMixer->mixCallback((byte *)0x70000000, SMP_PER_BLOCK * 2 * sizeof(int16));
// demux data into 2 buffers, L and R
__asm__ (
@@ -635,7 +635,7 @@ void OSystem_PS2::clearOverlay(void) {
}
void OSystem_PS2::grabOverlay(OverlayColor *buf, int pitch) {
- _screen->grabOverlay((uint16*)buf, (uint16)pitch);
+ _screen->grabOverlay((uint16 *)buf, (uint16)pitch);
}
void OSystem_PS2::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
@@ -738,12 +738,12 @@ void OSystem_PS2::msgPrintf(int millis, const char *format, ...) {
lnSta = lnEnd + 1;
}
- uint8 *scrBuf = (uint8*)memalign(64, 320 * 200);
+ uint8 *scrBuf = (uint8 *)memalign(64, 320 * 200);
memset(scrBuf, 4, 320 * 200);
uint8 *dstPos = scrBuf + ((200 - posY) >> 1) * 320 + (320 - maxWidth) / 2;
for (int y = 0; y < posY; y++) {
- uint8 *srcPos = (uint8*)surf.getBasePtr((300 - maxWidth) / 2, y);
+ uint8 *srcPos = (uint8 *)surf.getBasePtr((300 - maxWidth) / 2, y);
for (int x = 0; x < maxWidth; x++)
dstPos[x] = srcPos[x] + 5;
dstPos += 320;
diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp
index cdb130e2a0..10a732b1e3 100644
--- a/backends/platform/psp/display_manager.cpp
+++ b/backends/platform/psp/display_manager.cpp
@@ -210,14 +210,14 @@ void MasterGuRenderer::guProgramDisplayBufferSizes() {
switch (GuRenderer::_displayManager->getOutputBitsPerPixel()) {
case 16:
sceGuDrawBuffer(GU_PSM_4444, (void *)0, PSP_BUFFER_WIDTH);
- sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void*)(PSP_FRAME_SIZE * sizeof(uint16)), PSP_BUFFER_WIDTH);
- sceGuDepthBuffer((void*)(PSP_FRAME_SIZE * sizeof(uint16) * 2), PSP_BUFFER_WIDTH);
+ sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void *)(PSP_FRAME_SIZE * sizeof(uint16)), PSP_BUFFER_WIDTH);
+ sceGuDepthBuffer((void *)(PSP_FRAME_SIZE * sizeof(uint16) * 2), PSP_BUFFER_WIDTH);
VramAllocator::instance().allocate(PSP_FRAME_SIZE * sizeof(uint16) * 2);
break;
case 32:
sceGuDrawBuffer(GU_PSM_8888, (void *)0, PSP_BUFFER_WIDTH);
- sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void*)(PSP_FRAME_SIZE * sizeof(uint32)), PSP_BUFFER_WIDTH);
- sceGuDepthBuffer((void*)(PSP_FRAME_SIZE * sizeof(uint32) * 2), PSP_BUFFER_WIDTH);
+ sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, (void *)(PSP_FRAME_SIZE * sizeof(uint32)), PSP_BUFFER_WIDTH);
+ sceGuDepthBuffer((void *)(PSP_FRAME_SIZE * sizeof(uint32) * 2), PSP_BUFFER_WIDTH);
VramAllocator::instance().allocate(PSP_FRAME_SIZE * sizeof(uint32) * 2);
break;
}
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index 05c779a4e0..7a8b1e7b70 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -175,7 +175,7 @@ bool OSystem_POSIX::displayLogFile() {
} else if (pid == 0) {
// Try xdg-open first
- execlp("xdg-open", "xdg-open", _logFilePath.c_str(), (char*)0);
+ execlp("xdg-open", "xdg-open", _logFilePath.c_str(), (char *)0);
// If we're here, that clearly failed.
@@ -184,7 +184,7 @@ bool OSystem_POSIX::displayLogFile() {
// Try xterm+less next
- execlp("xterm", "xterm", "-e", "less", _logFilePath.c_str(), (char*)0);
+ execlp("xterm", "xterm", "-e", "less", _logFilePath.c_str(), (char *)0);
// TODO: If less does not exist we could fall back to 'more'.
// However, we'll have to use 'xterm -hold' for that to prevent the
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 4e17827e5c..a57fcb9628 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -87,15 +87,15 @@ extern "C" void *__wrap_malloc(size_t size) {
void *ptr = __real_malloc(size+4);
// printf("malloc(%d) = %p\n", size, ptr);
if (ptr != NULL) {
- *((HANDLE*)ptr) = 0;
- return 4+(char*)ptr;
+ *((HANDLE *)ptr) = 0;
+ return 4+(char *)ptr;
}
return NULL;
}
HANDLE H = CreateFileMapping((HANDLE)INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size+4, 0);
void *ptr = MapViewOfFile(H, FILE_MAP_ALL_ACCESS, 0, 0, 0);
- *((HANDLE*)ptr) = H;
- return 4+(char*)ptr;
+ *((HANDLE *)ptr) = H;
+ return 4+(char *)ptr;
}
extern "C" void __wrap_free(void *ptr) {
@@ -104,9 +104,9 @@ extern "C" void __wrap_free(void *ptr) {
printf("free(%p)\n", ptr);
*/
if (ptr != NULL) {
- HANDLE H = *(HANDLE*)((char *)ptr-4);
+ HANDLE H = *(HANDLE *)((char *)ptr-4);
if (H == 0) {
- __real_free((char*)ptr-4);
+ __real_free((char *)ptr-4);
return;
}
UnmapViewOfFile((char *)ptr-4);
diff --git a/backends/plugins/elf/elf-loader.cpp b/backends/plugins/elf/elf-loader.cpp
index d75010196a..d60ddce57e 100644
--- a/backends/plugins/elf/elf-loader.cpp
+++ b/backends/plugins/elf/elf-loader.cpp
@@ -480,7 +480,7 @@ void *DLObject::symbol(const char *name) {
!strcmp(name, _strtab + s->st_name)) {
// We found the symbol
debug(2, "elfloader: => 0x%08x", s->st_value);
- return (void*)s->st_value;
+ return (void *)s->st_value;
}
// We didn't find the symbol