aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Lingua2014-01-09 20:57:17 -0500
committerMax Lingua2014-01-18 12:40:58 -0500
commit17e8a6f220eb524bfebe07067266799268b45e04 (patch)
treea2ee7ad07ea1d53005802af113f86d8145200f73
parentf5748d16eb55ceca7abc12d8d4ca807106ea3161 (diff)
downloadscummvm-rg350-17e8a6f220eb524bfebe07067266799268b45e04.tar.gz
scummvm-rg350-17e8a6f220eb524bfebe07067266799268b45e04.tar.bz2
scummvm-rg350-17e8a6f220eb524bfebe07067266799268b45e04.zip
PS2: cleaned cast (X*) -> (X *)
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp2
-rw-r--r--backends/platform/ps2/Gs2dScreen.h2
-rw-r--r--backends/platform/ps2/GsDefs.h12
-rw-r--r--backends/platform/ps2/asyncfio.cpp4
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c10
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c8
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c12
-rw-r--r--backends/platform/ps2/iop/rpckbd/src/ps2kbd.c4
-rw-r--r--backends/platform/ps2/sysdefs.h34
-rw-r--r--backends/platform/ps2/systemps2.cpp6
10 files changed, 47 insertions, 47 deletions
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index 58667c0230..3a90c19f3c 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -296,7 +296,7 @@ void Gs2dScreen::createAnimTextures(void) {
for (int i = 0; i < 16; i++) {
uint32 *destPos = (uint32 *)buf;
for (int ch = 15; ch >= 0; ch--) {
- const uint32 *src = (const uint32*)(_binaryData + ((_binaryPattern[i] >> ch) & 1) * 4 * 14);
+ const uint32 *src = (const uint32 *)(_binaryData + ((_binaryPattern[i] >> ch) & 1) * 4 * 14);
for (int line = 0; line < 14; line++)
destPos[line << 4] = src[line];
destPos++;
diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h
index 1a70dad170..c9b9b5401c 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -49,7 +49,7 @@ public:
uint16 getWidth(void);
uint16 getHeight(void);
- void copyPrintfOverlay(const uint8* buf);
+ void copyPrintfOverlay(const uint8 *buf);
void clearPrintfOverlay(void);
Graphics::Surface *lockScreen();
diff --git a/backends/platform/ps2/GsDefs.h b/backends/platform/ps2/GsDefs.h
index fab0c40b35..9e7bab7052 100644
--- a/backends/platform/ps2/GsDefs.h
+++ b/backends/platform/ps2/GsDefs.h
@@ -27,13 +27,13 @@
// Gs2dScreen defines:
-#define PAL_NTSC_FLAG (*(volatile uint8*)0x1FC7FF52)
+#define PAL_NTSC_FLAG (*(volatile uint8 *)0x1FC7FF52)
-#define GS_PMODE *((volatile uint64*)0x12000000)
-#define GS_CSR *((volatile uint64*)0x12001000)
-#define GS_DISPFB1 *((volatile uint64*)0x12000070)
-#define GS_DISPLAY1 *((volatile uint64*)0x12000080)
-#define GS_BGCOLOUR *((volatile uint64*)0x120000E0)
+#define GS_PMODE *((volatile uint64 *)0x12000000)
+#define GS_CSR *((volatile uint64 *)0x12001000)
+#define GS_DISPFB1 *((volatile uint64 *)0x12000070)
+#define GS_DISPLAY1 *((volatile uint64 *)0x12000080)
+#define GS_BGCOLOUR *((volatile uint64 *)0x120000E0)
enum GS_CSR_FIELDS {
CSR_SIGNAL = 1 << 0,
diff --git a/backends/platform/ps2/asyncfio.cpp b/backends/platform/ps2/asyncfio.cpp
index 3f20349107..7e06172722 100644
--- a/backends/platform/ps2/asyncfio.cpp
+++ b/backends/platform/ps2/asyncfio.cpp
@@ -90,7 +90,7 @@ void AsyncFio::read(int fd, void *dest, unsigned int len) {
checkSync();
assert(fd < MAX_HANDLES);
_runningOp = _ioSlots + fd;
- fileXioRead(fd, (unsigned char*)dest, len);
+ fileXioRead(fd, (unsigned char *)dest, len);
SignalSema(_ioSema);
}
@@ -99,7 +99,7 @@ void AsyncFio::write(int fd, const void *src, unsigned int len) {
checkSync();
assert(fd < MAX_HANDLES);
_runningOp = _ioSlots + fd;
- fileXioWrite(fd, (unsigned char*)src, len);
+ fileXioWrite(fd, (unsigned char *)src, len);
SignalSema(_ioSema);
}
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
index e55e62853b..932d589a3b 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
@@ -79,7 +79,7 @@ int cacheEnterDir(ISODirectoryRecord *dir) {
int initRootCache(void) {
CdRMode rmode = { 16, 0, CdSect2048, 0 };
- ISODirectoryRecord *root = (ISODirectoryRecord*)cacheBuf;
+ ISODirectoryRecord *root = (ISODirectoryRecord *)cacheBuf;
if (cdReadSectors(fsRootLba, 1, cacheBuf, &rmode) == 0) {
cachedDir[0] = '\0';
@@ -107,7 +107,7 @@ ISODirectoryRecord *findEntryInCache(const char *name, int nameLen) {
cachedDirOfs = i;
}
- while (entry->len_dr && ((uint8*)entry < cacheBuf + SECTOR_SIZE)) {
+ while (entry->len_dr && ((uint8 *)entry < cacheBuf + SECTOR_SIZE)) {
if ((entry->len_fi > 2) && (entry->name[entry->len_fi - 2] == ';') && (entry->name[entry->len_fi - 1] == '1')) {
if ((nameLen == entry->len_fi - 2) && (strnicmp(name, entry->name, entry->len_fi - 2) == 0))
return entry;
@@ -115,7 +115,7 @@ ISODirectoryRecord *findEntryInCache(const char *name, int nameLen) {
if ((nameLen == entry->len_fi) && (strnicmp(name, entry->name, entry->len_fi) == 0))
return entry;
}
- entry = (ISODirectoryRecord *)( (uint8*)entry + entry->len_dr );
+ entry = (ISODirectoryRecord *)( (uint8 *)entry + entry->len_dr );
}
}
return NULL;
@@ -225,12 +225,12 @@ int initDisc(void) {
case 1:
discType = DISC_MODE1;
printf("Disc: Mode1\n");
- pvd = (ISOPvd*)(cacheBuf + 4);
+ pvd = (ISOPvd *)(cacheBuf + 4);
break;
case 2:
discType = DISC_MODE2;
printf("Disc: Mode2\n");
- pvd = (ISOPvd*)(cacheBuf + 12);
+ pvd = (ISOPvd *)(cacheBuf + 12);
break;
default:
DBG_PRINTF("Unknown Sector Type %02X\n", cacheBuf[3]);
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
index f0a06f927b..5c5cbf94ef 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
@@ -104,7 +104,7 @@ int cd_open(iop_file_t *handle, const char *name, int mode) {
fd->pos = 0;
fd->cachedLba = 0;
- handle->privdata = (void*)fdSlot;
+ handle->privdata = (void *)fdSlot;
return 0;
}
@@ -135,7 +135,7 @@ int cd_read(iop_file_t *handle, void *dest, int length) {
FioHandle *fd = fioHandles + (int)handle->privdata;
CdRMode rmode = { 16, 0, CdSect2048, 0 };
int readLba, readPos, bytesLeft;
- uint8 *destPos = (uint8*)dest;
+ uint8 *destPos = (uint8 *)dest;
int doCopy;
int numLba;
readLba = fd->lba + (fd->pos >> 11);
@@ -177,7 +177,7 @@ int cd_read(iop_file_t *handle, void *dest, int length) {
bytesLeft &= 0x7FF;
}
}
- return destPos - (uint8*)dest;
+ return destPos - (uint8 *)dest;
}
int cd_close(iop_file_t *handle) {
@@ -219,7 +219,7 @@ int cd_dopen(iop_file_t *handle, const char *path) {
}
dioHandles[fdSlot].curOfs = 0;
dioHandles[fdSlot].lbaOfs = 0;
- handle->privdata = (void*)fdSlot;
+ handle->privdata = (void *)fdSlot;
return fdSlot;
}
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
index 5b760faa06..983ae38716 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
@@ -69,11 +69,11 @@ void *rpcReadClock(void *data) {
void *driveStop(void *data) {
if (CdStop() == 1) {
if (CdSync(0) == 0) {
- *(int*)data = CdGetError();
+ *(int *)data = CdGetError();
} else
- *(int*)data = -0x100;
+ *(int *)data = -0x100;
} else
- *(int*)data = -0x101;
+ *(int *)data = -0x101;
return data;
}
@@ -81,11 +81,11 @@ void *driveStandby(void *data) {
int type;
if (CdStandby() == 1) {
if (CdSync(0) == 0) {
- *(int*)data = CdGetError();
+ *(int *)data = CdGetError();
} else
- *(int*)data = -0x100;
+ *(int *)data = -0x100;
} else
- *(int*)data = -0x101;
+ *(int *)data = -0x101;
do { // wait until drive detected disc type
type = CdGetDiskType();
diff --git a/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c b/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c
index 7266afdce5..838ce9fe85 100644
--- a/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c
+++ b/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c
@@ -1089,7 +1089,7 @@ void *ps2kbd_rpc_server(int fno, void *data, int size) {
ps2kbd_rpc_flushbuffer();
break;
case KBD_RPC_SETLEDS:
- ps2kbd_rpc_setleds(*(u8*) data);
+ ps2kbd_rpc_setleds(*(u8 *) data);
break;
case KBD_RPC_RESETKEYMAP:
ps2kbd_rpc_resetkeymap();
@@ -1129,7 +1129,7 @@ int ps2kbd_init_rpc(void) {
int th;
param.attr = 0x02000000;
- param.thread = (void*)ps2kbd_start_rpc;
+ param.thread = (void *)ps2kbd_start_rpc;
param.priority = 40;
param.stacksize = 0x800;
param.option = 0;
diff --git a/backends/platform/ps2/sysdefs.h b/backends/platform/ps2/sysdefs.h
index 0114402233..a4ada47015 100644
--- a/backends/platform/ps2/sysdefs.h
+++ b/backends/platform/ps2/sysdefs.h
@@ -40,30 +40,30 @@ enum Interrupts {
};
// dma 2 registers
-#define D2_CHCR (*(volatile uint32*)0x1000A000)
-#define D2_QWC (*(volatile uint32*)0x1000A020)
-#define D2_TADR (*(volatile uint32*)0x1000A030)
-#define D2_MADR (*(volatile uint32*)0x1000A010)
-#define D2_ASR1 (*(volatile uint32*)0x1000A050)
-#define D2_ASR0 (*(volatile uint32*)0x1000A040)
+#define D2_CHCR (*(volatile uint32 *)0x1000A000)
+#define D2_QWC (*(volatile uint32 *)0x1000A020)
+#define D2_TADR (*(volatile uint32 *)0x1000A030)
+#define D2_MADR (*(volatile uint32 *)0x1000A010)
+#define D2_ASR1 (*(volatile uint32 *)0x1000A050)
+#define D2_ASR0 (*(volatile uint32 *)0x1000A040)
-#define D_CTRL (*(volatile uint32*)0x1000E000)
-#define D_STAT (*(volatile uint32*)0x1000E010)
-#define D_PCR (*(volatile uint32*)0x1000E020)
-#define D_SQWC (*(volatile uint32*)0x1000E030)
-#define D_RBSR (*(volatile uint32*)0x1000E040)
-#define D_RBOR (*(volatile uint32*)0x1000E050)
-#define D_STADR (*(volatile uint32*)0x1000E060)
+#define D_CTRL (*(volatile uint32 *)0x1000E000)
+#define D_STAT (*(volatile uint32 *)0x1000E010)
+#define D_PCR (*(volatile uint32 *)0x1000E020)
+#define D_SQWC (*(volatile uint32 *)0x1000E030)
+#define D_RBSR (*(volatile uint32 *)0x1000E040)
+#define D_RBOR (*(volatile uint32 *)0x1000E050)
+#define D_STADR (*(volatile uint32 *)0x1000E060)
#define CIM2 (1 << 18)
#define CIS2 (1 << 2)
// timer 0 registers
-#define T0_COUNT (*(volatile uint32*)0x10000000)
-#define T0_MODE (*(volatile uint32*)0x10000010)
-#define T0_COMP (*(volatile uint32*)0x10000020)
-#define T0_HOLD (*(volatile uint32*)0x10000030)
+#define T0_COUNT (*(volatile uint32 *)0x10000000)
+#define T0_MODE (*(volatile uint32 *)0x10000010)
+#define T0_COMP (*(volatile uint32 *)0x10000020)
+#define T0_HOLD (*(volatile uint32 *)0x10000030)
#define TIMER_MODE(clks, gate, gates, gatem, zeroret, cue, cmpe, ovfe, equf, ovff) \
((clks) | ((gate) << 2) | ((gates) << 3) | ((gatem) << 4) | ((zeroret) << 6) | \
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index a7d782b07c..9882974f18 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -184,7 +184,7 @@ void systemSoundThread(OSystem_PS2 *system) {
}
void gluePowerOffCallback(void *system) {
- ((OSystem_PS2*)system)->powerOffCallback();
+ ((OSystem_PS2 *)system)->powerOffCallback();
}
void OSystem_PS2::startIrxModules(int numModules, IrxReference *modules) {
@@ -491,7 +491,7 @@ void OSystem_PS2::soundThreadCallback(void) {
// and feed it into the SPU
// non-blocking call, the function will return before the buffer's content
// was transferred.
- SjPCM_Enqueue((short int*)soundBufL, (short int*)soundBufR, SMP_PER_BLOCK, 0);
+ SjPCM_Enqueue((short int *)soundBufL, (short int *)soundBufR, SMP_PER_BLOCK, 0);
bufferedSamples += SMP_PER_BLOCK;
}
}
@@ -555,7 +555,7 @@ void OSystem_PS2::grabPalette(byte *colors, uint start, uint num) {
}
void OSystem_PS2::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) {
- _screen->copyScreenRect((const uint8*)buf, pitch, x, y, w, h);
+ _screen->copyScreenRect((const uint8 *)buf, pitch, x, y, w, h);
}
void OSystem_PS2::updateScreen(void) {