aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarek Soliman2012-02-15 09:53:31 -0600
committerTarek Soliman2012-02-15 10:07:10 -0600
commita4798602d7a025dc13fd253d584dbf29dbec488d (patch)
treed6e764535eb4eef6d3c313e00a7eaea8b1724a2d
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)
-rw-r--r--audio/decoders/flac.cpp4
-rw-r--r--audio/decoders/iff_sound.cpp2
-rw-r--r--audio/decoders/qdm2.cpp6
-rw-r--r--audio/softsynth/opl/dbopl.cpp4
-rw-r--r--audio/softsynth/sid.h4
-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
-rw-r--r--common/fft.cpp2
-rw-r--r--common/memorypool.cpp2
-rw-r--r--common/memorypool.h2
-rw-r--r--common/unzip.cpp8
-rw-r--r--common/xmlparser.h2
-rw-r--r--devtools/create_kyradat/extract.cpp12
-rw-r--r--devtools/skycpt/AsciiCptCompile.cpp2
-rw-r--r--devtools/skycpt/TextFile.cpp4
-rw-r--r--devtools/skycpt/cptcompiler.cpp34
-rw-r--r--engines/agi/preagi_mickey.h2
-rw-r--r--engines/agi/preagi_troll.cpp4
-rw-r--r--engines/agi/sound_2gs.cpp6
-rw-r--r--engines/agi/sound_sarien.cpp4
-rw-r--r--engines/agi/sprite.cpp2
-rw-r--r--engines/cine/gfx.cpp2
-rw-r--r--engines/cruise/background.cpp2
-rw-r--r--engines/cruise/backgroundIncrust.cpp6
-rw-r--r--engines/cruise/cruise_main.cpp4
-rw-r--r--engines/cruise/dataLoader.cpp2
-rw-r--r--engines/cruise/font.cpp2
-rw-r--r--engines/cruise/function.cpp10
-rw-r--r--engines/cruise/mainDraw.cpp8
-rw-r--r--engines/cruise/saveload.cpp4
-rw-r--r--engines/cruise/script.cpp4
-rw-r--r--engines/dreamweb/saveload.cpp2
-rw-r--r--engines/groovie/script.cpp2
-rw-r--r--engines/hugo/schedule.cpp2
-rw-r--r--engines/hugo/sound.cpp2
-rw-r--r--engines/kyra/eobcommon.h6
-rw-r--r--engines/kyra/kyra_rpg.cpp4
-rw-r--r--engines/kyra/saveload_rpg.cpp2
-rw-r--r--engines/kyra/screen.cpp2
-rw-r--r--engines/lastexpress/entities/alexei.cpp2
-rw-r--r--engines/lastexpress/entities/entity_intern.h4
-rw-r--r--engines/lastexpress/game/entities.cpp6
-rw-r--r--engines/lure/sound.cpp2
-rw-r--r--engines/made/database.cpp24
-rw-r--r--engines/made/graphics.cpp4
-rw-r--r--engines/made/resource.h2
-rw-r--r--engines/made/screen.cpp8
-rw-r--r--engines/made/screenfx.cpp4
-rw-r--r--engines/mohawk/video.cpp2
-rw-r--r--engines/parallaction/balloons.cpp4
-rw-r--r--engines/parallaction/callables_br.cpp14
-rw-r--r--engines/parallaction/callables_ns.cpp16
-rw-r--r--engines/parallaction/disk.cpp4
-rw-r--r--engines/parallaction/disk_br.cpp10
-rw-r--r--engines/parallaction/disk_ns.cpp16
-rw-r--r--engines/parallaction/font.cpp16
-rw-r--r--engines/parallaction/gfxbase.cpp8
-rw-r--r--engines/parallaction/graphics.cpp32
-rw-r--r--engines/parallaction/graphics.h2
-rw-r--r--engines/parallaction/gui_br.cpp4
-rw-r--r--engines/parallaction/inventory.cpp4
-rw-r--r--engines/parallaction/inventory.h2
-rw-r--r--engines/parallaction/objects.cpp2
-rw-r--r--engines/parallaction/parallaction.h72
-rw-r--r--engines/parallaction/sound_br.cpp2
-rw-r--r--engines/queen/music.cpp2
-rw-r--r--engines/saga/animation.cpp2
-rw-r--r--engines/saga/gfx.cpp2
-rw-r--r--engines/saga/isomap.cpp2
-rw-r--r--engines/saga/script.h4
-rw-r--r--engines/sci/console.cpp8
-rw-r--r--engines/sci/engine/kfile.cpp2
-rw-r--r--engines/sci/engine/message.cpp2
-rw-r--r--engines/sci/engine/scriptdebug.cpp2
-rw-r--r--engines/sci/engine/seg_manager.cpp2
-rw-r--r--engines/sci/engine/segment.cpp2
-rw-r--r--engines/sci/graphics/screen.cpp8
-rw-r--r--engines/sci/parser/said.cpp2
-rw-r--r--engines/sci/sound/drivers/amigamac.cpp6
-rw-r--r--engines/scumm/actor.cpp2
-rw-r--r--engines/scumm/costume.cpp2
-rw-r--r--engines/scumm/cursor.cpp2
-rw-r--r--engines/scumm/detection.cpp2
-rw-r--r--engines/scumm/gfx.cpp10
-rw-r--r--engines/scumm/gfx_towns.cpp12
-rw-r--r--engines/scumm/he/sound_he.cpp2
-rw-r--r--engines/scumm/player_apple2.h2
-rw-r--r--engines/scumm/player_sid.cpp2
-rw-r--r--engines/scumm/player_v1.cpp4
-rw-r--r--engines/scumm/resource.cpp4
-rw-r--r--engines/scumm/saveload.cpp12
-rw-r--r--engines/scumm/saveload.h4
-rw-r--r--engines/scumm/script_v4.cpp4
-rw-r--r--engines/scumm/script_v8.cpp2
-rw-r--r--engines/scumm/string.cpp2
-rw-r--r--engines/sky/autoroute.cpp2
-rw-r--r--engines/sky/compact.cpp34
-rw-r--r--engines/sky/control.cpp20
-rw-r--r--engines/sky/control.h2
-rw-r--r--engines/sky/disk.cpp4
-rw-r--r--engines/sky/intro.cpp26
-rw-r--r--engines/sky/logic.cpp22
-rw-r--r--engines/sky/mouse.cpp2
-rw-r--r--engines/sky/music/adlibchannel.cpp10
-rw-r--r--engines/sky/music/gmmusic.cpp2
-rw-r--r--engines/sky/music/mt32music.cpp2
-rw-r--r--engines/sky/text.cpp4
-rw-r--r--engines/sword2/music.cpp2
-rw-r--r--engines/sword25/util/lua/luaconf.h2
-rw-r--r--engines/sword25/util/pluto/pluto.cpp26
-rw-r--r--engines/tinsel/graphics.cpp2
-rw-r--r--engines/tinsel/heapmem.cpp8
-rw-r--r--engines/toltecs/menu.cpp4
-rw-r--r--engines/toltecs/movie.cpp2
-rw-r--r--engines/toltecs/screen.cpp2
-rw-r--r--engines/toltecs/script.cpp10
-rw-r--r--engines/toltecs/segmap.cpp4
-rw-r--r--engines/toon/audio.cpp2
-rw-r--r--engines/toon/character.cpp2
-rw-r--r--engines/toon/script_func.h2
-rw-r--r--graphics/VectorRendererSpec.h2
-rw-r--r--graphics/iff.cpp4
-rw-r--r--graphics/imagedec.cpp2
-rw-r--r--graphics/scaler/thumbnail_intern.cpp10
-rw-r--r--gui/launcher.cpp4
-rw-r--r--test/common/pack.h2
-rw-r--r--video/dxa_decoder.cpp8
155 files changed, 500 insertions, 500 deletions
diff --git a/audio/decoders/flac.cpp b/audio/decoders/flac.cpp
index d06a7b9c0e..bbaf5fd5ae 100644
--- a/audio/decoders/flac.cpp
+++ b/audio/decoders/flac.cpp
@@ -209,7 +209,7 @@ FLACStream::FLACStream(Common::SeekableReadStream *inStream, bool dispose)
::FLAC__seekable_stream_decoder_set_write_callback(_decoder, &FLACStream::callWrapWrite);
::FLAC__seekable_stream_decoder_set_metadata_callback(_decoder, &FLACStream::callWrapMetadata);
::FLAC__seekable_stream_decoder_set_error_callback(_decoder, &FLACStream::callWrapError);
- ::FLAC__seekable_stream_decoder_set_client_data(_decoder, (void*)this);
+ ::FLAC__seekable_stream_decoder_set_client_data(_decoder, (void *)this);
success = (::FLAC__seekable_stream_decoder_init(_decoder) == FLAC__SEEKABLE_STREAM_DECODER_OK);
#else
@@ -223,7 +223,7 @@ FLACStream::FLACStream(Common::SeekableReadStream *inStream, bool dispose)
&FLACStream::callWrapWrite,
&FLACStream::callWrapMetadata,
&FLACStream::callWrapError,
- (void*)this
+ (void *)this
) == FLAC__STREAM_DECODER_INIT_STATUS_OK);
#endif
if (success) {
diff --git a/audio/decoders/iff_sound.cpp b/audio/decoders/iff_sound.cpp
index 4efdce0338..b0c41f0180 100644
--- a/audio/decoders/iff_sound.cpp
+++ b/audio/decoders/iff_sound.cpp
@@ -75,7 +75,7 @@ struct A8SVXLoader {
case ID_BODY:
_dataSize = chunk._size;
- _data = (int8*)malloc(_dataSize);
+ _data = (int8 *)malloc(_dataSize);
assert(_data);
loadData(chunk._stream);
return true;
diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index 113b88fbf6..735fb2b6a0 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -589,7 +589,7 @@ DECL_FFT(32768,16384,8192)
DECL_FFT(65536,32768,16384)
void fftCalc(FFTContext *s, FFTComplex *z) {
- static void (* const fftDispatch[])(FFTComplex*) = {
+ static void (* const fftDispatch[])(FFTComplex *) = {
fft4, fft8, fft16, fft32, fft64, fft128, fft256, fft512, fft1024,
fft2048, fft4096, fft8192, fft16384, fft32768, fft65536,
};
@@ -857,8 +857,8 @@ void rdftCalc(RDFTContext *s, float *data) {
if (s->inverse) {
data[0] *= k1;
data[1] *= k1;
- fftPermute(&s->fft, (FFTComplex*)data);
- fftCalc(&s->fft, (FFTComplex*)data);
+ fftPermute(&s->fft, (FFTComplex *)data);
+ fftCalc(&s->fft, (FFTComplex *)data);
}
}
diff --git a/audio/softsynth/opl/dbopl.cpp b/audio/softsynth/opl/dbopl.cpp
index 02c2317b25..43eb40e7ba 100644
--- a/audio/softsynth/opl/dbopl.cpp
+++ b/audio/softsynth/opl/dbopl.cpp
@@ -1131,14 +1131,14 @@ void Chip::WriteBD( Bit8u val ) {
#define REGOP( _FUNC_ ) \
index = ( ( reg >> 3) & 0x20 ) | ( reg & 0x1f ); \
if ( OpOffsetTable[ index ] ) { \
- Operator* regOp = (Operator*)( ((char *)this ) + OpOffsetTable[ index ] ); \
+ Operator* regOp = (Operator *)( ((char *)this ) + OpOffsetTable[ index ] ); \
regOp->_FUNC_( this, val ); \
}
#define REGCHAN( _FUNC_ ) \
index = ( ( reg >> 4) & 0x10 ) | ( reg & 0xf ); \
if ( ChanOffsetTable[ index ] ) { \
- Channel* regChan = (Channel*)( ((char *)this ) + ChanOffsetTable[ index ] ); \
+ Channel* regChan = (Channel *)( ((char *)this ) + ChanOffsetTable[ index ] ); \
regChan->_FUNC_( this, val ); \
}
diff --git a/audio/softsynth/sid.h b/audio/softsynth/sid.h
index 19577e94d1..88da0eb326 100644
--- a/audio/softsynth/sid.h
+++ b/audio/softsynth/sid.h
@@ -55,7 +55,7 @@ class WaveformGenerator {
public:
WaveformGenerator();
- void set_sync_source(WaveformGenerator*);
+ void set_sync_source(WaveformGenerator *);
void updateClock(cycle_count delta_t);
void synchronize();
@@ -272,7 +272,7 @@ class Voice {
public:
Voice();
- void set_sync_source(Voice*);
+ void set_sync_source(Voice *);
void reset();
void writeCONTROL_REG(reg8);
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
diff --git a/common/fft.cpp b/common/fft.cpp
index 5852698b61..034570964f 100644
--- a/common/fft.cpp
+++ b/common/fft.cpp
@@ -231,7 +231,7 @@ DECL_FFT(14, 16384, 8192, 4096)
DECL_FFT(15, 32768, 16384, 8192)
DECL_FFT(16, 65536, 32768, 16384)
-static void (* const fft_dispatch[])(Complex*) = {
+static void (* const fft_dispatch[])(Complex *) = {
fft4, fft8, fft16, fft32, fft64, fft128, fft256, fft512, fft1024,
fft2048, fft4096, fft8192, fft16384, fft32768, fft65536,
};
diff --git a/common/memorypool.cpp b/common/memorypool.cpp
index 19adc54d00..e3742eeae0 100644
--- a/common/memorypool.cpp
+++ b/common/memorypool.cpp
@@ -33,7 +33,7 @@ static size_t adjustChunkSize(size_t chunkSize) {
// You must at least fit the pointer in the node (technically unneeded considering the next rounding statement)
chunkSize = MAX(chunkSize, sizeof(void *));
// There might be an alignment problem on some platforms when trying to load a void* on a non natural boundary
- // so we round to the next sizeof(void*)
+ // so we round to the next sizeof(void *)
chunkSize = (chunkSize + sizeof(void *) - 1) & (~(sizeof(void *) - 1));
return chunkSize;
diff --git a/common/memorypool.h b/common/memorypool.h
index 5ba09cebed..9a4e523d53 100644
--- a/common/memorypool.h
+++ b/common/memorypool.h
@@ -105,7 +105,7 @@ template<size_t CHUNK_SIZE, size_t NUM_INTERNAL_CHUNKS = 32>
class FixedSizeMemoryPool : public MemoryPool {
private:
enum {
- REAL_CHUNK_SIZE = (CHUNK_SIZE + sizeof(void*) - 1) & (~(sizeof(void*) - 1))
+ REAL_CHUNK_SIZE = (CHUNK_SIZE + sizeof(void *) - 1) & (~(sizeof(void *) - 1))
};
byte _storage[NUM_INTERNAL_CHUNKS * REAL_CHUNK_SIZE];
diff --git a/common/unzip.cpp b/common/unzip.cpp
index 8061f712d4..8cfcd605fa 100644
--- a/common/unzip.cpp
+++ b/common/unzip.cpp
@@ -111,7 +111,7 @@ typedef struct {
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
/* like the STRICT of WIN32, we define a pointer that cannot be converted
- from (void*) without cast */
+ from (void *) without cast */
typedef struct TagunzFile__ { int unused; } unzFile__;
typedef unzFile__ *unzFile;
#else
@@ -1062,7 +1062,7 @@ int unzOpenCurrentFile (unzFile file) {
if (pfile_in_zip_read_info==NULL)
return UNZ_INTERNALERROR;
- pfile_in_zip_read_info->read_buffer=(char*)malloc(UNZ_BUFSIZE);
+ pfile_in_zip_read_info->read_buffer=(char *)malloc(UNZ_BUFSIZE);
pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
pfile_in_zip_read_info->pos_local_extrafield=0;
@@ -1151,7 +1151,7 @@ int unzReadCurrentFile(unzFile file, voidp buf, unsigned len) {
if (len==0)
return 0;
- pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
+ pfile_in_zip_read_info->stream.next_out = (Bytef *)buf;
pfile_in_zip_read_info->stream.avail_out = (uInt)len;
@@ -1177,7 +1177,7 @@ int unzReadCurrentFile(unzFile file, voidp buf, unsigned len) {
pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
- pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->read_buffer;
+ pfile_in_zip_read_info->stream.next_in = (Bytef *)pfile_in_zip_read_info->read_buffer;
pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
}
diff --git a/common/xmlparser.h b/common/xmlparser.h
index 62bb048f8c..04fb54efbb 100644
--- a/common/xmlparser.h
+++ b/common/xmlparser.h
@@ -68,7 +68,7 @@ class SeekableReadStream;
struct CustomXMLKeyLayout : public XMLKeyLayout {\
typedef bool (parserName::*ParserCallback)(ParserNode *node);\
ParserCallback callback;\
- bool doCallback(XMLParser *parent, ParserNode *node) {return ((kLocalParserName*)parent->*callback)(node);} };\
+ bool doCallback(XMLParser *parent, ParserNode *node) {return ((kLocalParserName *)parent->*callback)(node);} };\
virtual void buildLayout() { \
Common::Stack<XMLKeyLayout *> layout; \
CustomXMLKeyLayout *lay = 0; \
diff --git a/devtools/create_kyradat/extract.cpp b/devtools/create_kyradat/extract.cpp
index b755b8d3ec..34308f1b5b 100644
--- a/devtools/create_kyradat/extract.cpp
+++ b/devtools/create_kyradat/extract.cpp
@@ -314,7 +314,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da
input += 0x11; output += 0x0F;
}
- strcpy((char*) output, (const char*) input);
+ strcpy((char *) output, (const char*) input);
uint32 stringsize = strlen((const char*)output) + 1;
input += stringsize; output += stringsize;
// skip empty entries
@@ -370,7 +370,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da
} else if (patch == 5) {
const byte *c = data + size;
do {
- strcpy((char*) output, (const char*) input);
+ strcpy((char *) output, (const char*) input);
uint32 stringsize = strlen((const char*)output) + 1;
input += stringsize; output += stringsize;
@@ -403,7 +403,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da
output += 44;
data += 44;
for (int t = 1; t != 10; t++) {
- sprintf((char*) output, "COST%d_SH.PAK", t);
+ sprintf((char *) output, "COST%d_SH.PAK", t);
output += 13;
}
data += 126;
@@ -576,7 +576,7 @@ bool extractHofSeqData(PAKFile &out, const ExtractInformation *info, const byte
byte *buffer = new byte[bufferSize];
assert(buffer);
memset(buffer, 0, bufferSize );
- uint16 *header = (uint16*) buffer;
+ uint16 *header = (uint16 *) buffer;
byte *output = buffer + headerSize;
uint16 *hdout = header;
@@ -751,7 +751,7 @@ bool extractHofSeqData(PAKFile &out, const ExtractInformation *info, const byte
byte *finBuffer = new byte[finBufferSize];
assert(finBuffer);
uint16 diff = headerSize - finHeaderSize;
- uint16 *finHeader = (uint16*) finBuffer;
+ uint16 *finHeader = (uint16 *) finBuffer;
for (int i = 1; i < finHeaderSize; i++)
WRITE_BE_UINT16(&finHeader[i], (READ_BE_UINT16(&header[i]) - diff));
@@ -760,7 +760,7 @@ bool extractHofSeqData(PAKFile &out, const ExtractInformation *info, const byte
memcpy (finBuffer + finHeaderSize, buffer + headerSize, finBufferSize - finHeaderSize);
delete[] buffer;
- finHeader = (uint16*) (finBuffer + ((numSequences + 2) * sizeof(uint16)));
+ finHeader = (uint16 *) (finBuffer + ((numSequences + 2) * sizeof(uint16)));
for (int i = 0; i < numNestedSequences; i++) {
uint8 * offs = finBuffer + READ_BE_UINT16(finHeader++) + 26;
uint16 ctrl = READ_BE_UINT16(offs);
diff --git a/devtools/skycpt/AsciiCptCompile.cpp b/devtools/skycpt/AsciiCptCompile.cpp
index 154c13b8cd..f339f6816c 100644
--- a/devtools/skycpt/AsciiCptCompile.cpp
+++ b/devtools/skycpt/AsciiCptCompile.cpp
@@ -49,7 +49,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
int main(int argc, char* argv[])
{
uint8 testBuf[4] = { 0x11, 0x22, 0x33, 0x44 };
- if (*(uint32*)testBuf != 0x44332211) {
+ if (*(uint32 *)testBuf != 0x44332211) {
printf("Sorry, this program only works on little endian systems.\nGoodbye.\n");
return 0;
}
diff --git a/devtools/skycpt/TextFile.cpp b/devtools/skycpt/TextFile.cpp
index e9887dc87b..038b1b9329 100644
--- a/devtools/skycpt/TextFile.cpp
+++ b/devtools/skycpt/TextFile.cpp
@@ -60,7 +60,7 @@ char *TextFile::giveLine(uint32 num) {
}
void TextFile::read(FILE *inf) {
- char *line = (char*)malloc(4096);
+ char *line = (char *)malloc(4096);
_lines = (char**)malloc(4096 * sizeof(char *));
_numLines = 0;
uint32 linesMax = 4096;
@@ -78,7 +78,7 @@ void TextFile::read(FILE *inf) {
start++;
}
uint32 length = crop(start);
- _lines[_numLines] = (char*)malloc(length + 1);
+ _lines[_numLines] = (char *)malloc(length + 1);
memcpy(_lines[_numLines], start, length + 1);
_numLines++;
}
diff --git a/devtools/skycpt/cptcompiler.cpp b/devtools/skycpt/cptcompiler.cpp
index f6ee926075..2c7d33c73b 100644
--- a/devtools/skycpt/cptcompiler.cpp
+++ b/devtools/skycpt/cptcompiler.cpp
@@ -50,7 +50,7 @@ void processMainLists(FILE *inf, CptObj *destArr, uint16 *idList) {
char line[1024];
dofgets(line, 1024, inf);
assert(lineMatchSection(line, "MAINLISTS"));
- uint16 *resBuf = (uint16*)malloc(MAX_OBJ_SIZE);
+ uint16 *resBuf = (uint16 *)malloc(MAX_OBJ_SIZE);
uint32 idNum = 0;
do {
dofgets(line, 1024, inf);
@@ -60,7 +60,7 @@ void processMainLists(FILE *inf, CptObj *destArr, uint16 *idList) {
CptObj *dest = destArr + id;
assertEmpty(dest);
dest->type = MAINLIST;
- dest->dbgName = (char*)malloc(strlen(cptName) + 1);
+ dest->dbgName = (char *)malloc(strlen(cptName) + 1);
strcpy(dest->dbgName, cptName);
memset(resBuf, 0, MAX_OBJ_SIZE);
uint32 resPos = 0;
@@ -82,7 +82,7 @@ void processMainLists(FILE *inf, CptObj *destArr, uint16 *idList) {
} while (1);
assert(resPos < (MAX_OBJ_SIZE / 2));
dest->len = resPos;
- dest->data = (uint16*)malloc(resPos * 2);
+ dest->data = (uint16 *)malloc(resPos * 2);
memcpy(dest->data, resBuf, resPos * 2);
} else
break;
@@ -95,7 +95,7 @@ void processCpts(FILE *inf, CptObj *destArr) {
char line[1024];
dofgets(line, 1024, inf);
assert(lineMatchSection(line, "COMPACTS"));
- uint16 *resBuf = (uint16*)malloc(MAX_OBJ_SIZE);
+ uint16 *resBuf = (uint16 *)malloc(MAX_OBJ_SIZE);
do {
dofgets(line, 1024, inf);
if (!isEndOfSection(line)) {
@@ -103,7 +103,7 @@ void processCpts(FILE *inf, CptObj *destArr) {
uint16 id = getInfo(line, "COMPACT", cptName);
CptObj *dest = destArr + id;
assertEmpty(dest);
- dest->dbgName = (char*)malloc(strlen(cptName) + 1);
+ dest->dbgName = (char *)malloc(strlen(cptName) + 1);
dest->type = COMPACT;
strcpy(dest->dbgName, cptName);
memset(resBuf, 0, MAX_OBJ_SIZE);
@@ -134,7 +134,7 @@ void processCpts(FILE *inf, CptObj *destArr) {
} while (1);
assert(resPos < (MAX_OBJ_SIZE / 2));
dest->len = resPos;
- dest->data = (uint16*)malloc(resPos * 2);
+ dest->data = (uint16 *)malloc(resPos * 2);
memcpy(dest->data, resBuf, resPos * 2);
} else
break;
@@ -147,7 +147,7 @@ void processTurntabs(FILE *inf, CptObj *destArr) {
char line[1024];
dofgets(line, 1024, inf);
assert(lineMatchSection(line, "TURNTABS"));
- uint16 *resBuf = (uint16*)malloc(MAX_OBJ_SIZE);
+ uint16 *resBuf = (uint16 *)malloc(MAX_OBJ_SIZE);
do {
dofgets(line, 1024, inf);
if (!isEndOfSection(line)) {
@@ -155,7 +155,7 @@ void processTurntabs(FILE *inf, CptObj *destArr) {
uint16 id = getInfo(line, "TURNTAB", cptName);
CptObj *dest = destArr + id;
assertEmpty(dest);
- dest->dbgName = (char*)malloc(strlen(cptName) + 1);
+ dest->dbgName = (char *)malloc(strlen(cptName) + 1);
dest->type = TURNTAB;
strcpy(dest->dbgName, cptName);
memset(resBuf, 0, MAX_OBJ_SIZE);
@@ -176,7 +176,7 @@ void processTurntabs(FILE *inf, CptObj *destArr) {
} while (1);
assert(resPos < (MAX_OBJ_SIZE / 2));
dest->len = resPos;
- dest->data = (uint16*)malloc(resPos * 2);
+ dest->data = (uint16 *)malloc(resPos * 2);
memcpy(dest->data, resBuf, resPos * 2);
} else
break;
@@ -189,7 +189,7 @@ void processBins(FILE *inf, CptObj *destArr, const char *typeName, const char *o
char line[1024];
dofgets(line, 1024, inf);
assert(lineMatchSection(line, typeName));
- uint16 *resBuf = (uint16*)malloc(MAX_OBJ_SIZE);
+ uint16 *resBuf = (uint16 *)malloc(MAX_OBJ_SIZE);
do {
dofgets(line, 1024, inf);
if (!isEndOfSection(line)) {
@@ -197,7 +197,7 @@ void processBins(FILE *inf, CptObj *destArr, const char *typeName, const char *o
uint16 id = getInfo(line, objName, cptName);
CptObj *dest = destArr + id;
assertEmpty(dest);
- dest->dbgName = (char*)malloc(strlen(cptName) + 1);
+ dest->dbgName = (char *)malloc(strlen(cptName) + 1);
dest->type = cTypeId;
strcpy(dest->dbgName, cptName);
memset(resBuf, 0, MAX_OBJ_SIZE);
@@ -218,7 +218,7 @@ void processBins(FILE *inf, CptObj *destArr, const char *typeName, const char *o
} while (1);
assert(resPos < (MAX_OBJ_SIZE / 2));
dest->len = resPos;
- dest->data = (uint16*)malloc(resPos * 2);
+ dest->data = (uint16 *)malloc(resPos * 2);
memcpy(dest->data, resBuf, resPos * 2);
} else
break;
@@ -242,7 +242,7 @@ void processSymlinks(FILE *inf, CptObj *destArr, uint16 *baseLists) {
uint16 fromId = getInfo(line, "SYMLINK", cptName);
CptObj *from = destArr + fromId;
assertEmpty(from);
- dlinkNames[dlinkCount] = (char*)malloc(strlen(cptName) + 1);
+ dlinkNames[dlinkCount] = (char *)malloc(strlen(cptName) + 1);
strcpy(dlinkNames[dlinkCount], cptName);
dofgets(line, 1024, inf);
@@ -272,7 +272,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
CptObj *resCpts;
uint16 baseLists[NUM_DATA_LISTS];
memset(baseLists, 0, NUM_DATA_LISTS * 2);
- resCpts = (CptObj*)malloc(MAX_CPTS * sizeof(CptObj));
+ resCpts = (CptObj *)malloc(MAX_CPTS * sizeof(CptObj));
memset(resCpts, 0, MAX_CPTS * sizeof(CptObj));
printf(" MainLists...\n");
processMainLists(inf, resCpts, baseLists);
@@ -323,7 +323,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
fwrite(&binSize, 1, 4, debOutf);
fwrite(&binSize, 1, 4, resOutf);
- char *asciiBuf = (char*)malloc(ASCII_SIZE);
+ char *asciiBuf = (char *)malloc(ASCII_SIZE);
char *asciiPos = asciiBuf;
// now process all the compacts
@@ -491,7 +491,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
assert((ftell(res288) / 2) < 65536);
uint16 resSize = (uint16)(ftell(res288) / 2);
fseek(res288, 0, SEEK_SET);
- uint16 *buf288 = (uint16*)malloc(resSize * 2);
+ uint16 *buf288 = (uint16 *)malloc(resSize * 2);
fread(buf288, 2, resSize, res288);
fclose(res288);
fwrite(&resSize, 1, 2, debOutf);
@@ -514,7 +514,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
fseek(resDiff, 0, SEEK_END);
assert(ftell(resDiff) == (resSize * 2));
fseek(resDiff, 0, SEEK_SET);
- uint16 *bufDif = (uint16*)malloc(resSize *2);
+ uint16 *bufDif = (uint16 *)malloc(resSize *2);
fread(bufDif, 2, resSize, resDiff);
fclose(resDiff);
for (uint16 eCnt = 0; eCnt < resSize; eCnt++)
diff --git a/engines/agi/preagi_mickey.h b/engines/agi/preagi_mickey.h
index 673839a592..18b0593d78 100644
--- a/engines/agi/preagi_mickey.h
+++ b/engines/agi/preagi_mickey.h
@@ -704,7 +704,7 @@ protected:
void readOfsData(int, int, uint8*, long);
bool chooseY_N(int, bool);
int choose1to9(int);
- void printStr(char*);
+ void printStr(char *);
void printLine(const char*);
void printExeStr(int);
void printExeMsg(int);
diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp
index 50b2945383..b7d2801076 100644
--- a/engines/agi/preagi_troll.cpp
+++ b/engines/agi/preagi_troll.cpp
@@ -455,7 +455,7 @@ int TrollEngine::drawRoom(char *menu) {
_gfx->doUpdate();
char tmp[10];
- strncat(menu, (char*)_gameData + _locMessagesIdx[_currentRoom], 39);
+ strncat(menu, (char *)_gameData + _locMessagesIdx[_currentRoom], 39);
for (int i = 0; i < 3; i++) {
if (_roomDescs[_roomPicture - 1].options[i]) {
@@ -725,7 +725,7 @@ void TrollEngine::fillOffsets() {
void TrollEngine::init() {
_picture->setPictureVersion(AGIPIC_V15);
- //SetScreenPar(320, 200, (char*)ibm_fontdata);
+ //SetScreenPar(320, 200, (char *)ibm_fontdata);
const int gaps[] = { 0x3A40, 0x4600, 0x4800, 0x5800, 0x5a00, 0x6a00,
0x6c00, 0x7400, 0x7600, 0x7c00, 0x7e00, 0x8e00,
diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp
index b15950f31d..bfc8d4d8f3 100644
--- a/engines/agi/sound_2gs.cpp
+++ b/engines/agi/sound_2gs.cpp
@@ -68,10 +68,10 @@ int SoundGen2GS::readBuffer(int16 *buffer, const int numSamples) {
static uint data_available = 0;
static uint data_offset = 0;
uint n = numSamples << 1;
- uint8 *p = (uint8*)buffer;
+ uint8 *p = (uint8 *)buffer;
while (n > data_available) {
- memcpy(p, (uint8*)_out + data_offset, data_available);
+ memcpy(p, (uint8 *)_out + data_offset, data_available);
p += data_available;
n -= data_available;
@@ -81,7 +81,7 @@ int SoundGen2GS::readBuffer(int16 *buffer, const int numSamples) {
data_offset = 0;
}
- memcpy(p, (uint8*)_out + data_offset, n);
+ memcpy(p, (uint8 *)_out + data_offset, n);
data_offset += n;
data_available -= n;
diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp
index a2baf89d12..576801bc56 100644
--- a/engines/agi/sound_sarien.cpp
+++ b/engines/agi/sound_sarien.cpp
@@ -330,7 +330,7 @@ void SoundGenSarien::fillAudio(int16 *stream, uint len) {
debugC(5, kDebugLevelSound, "(%p, %d)", (void *)stream, len);
while (len > data_available) {
- memcpy((uint8 *)stream + p, (uint8*)_sndBuffer + data_offset, data_available);
+ memcpy((uint8 *)stream + p, (uint8 *)_sndBuffer + data_offset, data_available);
p += data_available;
len -= data_available;
@@ -339,7 +339,7 @@ void SoundGenSarien::fillAudio(int16 *stream, uint len) {
data_offset = 0;
}
- memcpy((uint8 *)stream + p, (uint8*)_sndBuffer + data_offset, len);
+ memcpy((uint8 *)stream + p, (uint8 *)_sndBuffer + data_offset, len);
data_offset += len;
data_available -= len;
}
diff --git a/engines/agi/sprite.cpp b/engines/agi/sprite.cpp
index 8d13be3f68..ea2d329fb0 100644
--- a/engines/agi/sprite.cpp
+++ b/engines/agi/sprite.cpp
@@ -55,7 +55,7 @@ void *SpritesMgr::poolAlloc(int size) {
// Adjust size to sizeof(void *) boundary to prevent data misalignment
// errors.
- const int alignPadding = sizeof(void*) - 1;
+ const int alignPadding = sizeof(void *) - 1;
size = (size + alignPadding) & ~alignPadding;
x = _poolTop;
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index 01e05bed6d..918d522606 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -1801,7 +1801,7 @@ void maskBgOverlay(const byte *bgPtr, const byte *maskPtr, int16 width, int16 he
for (it = g_cine->_bgIncrustList.begin(); it != g_cine->_bgIncrustList.end(); ++it) {
tmpWidth = g_cine->_animDataTable[it->frame]._realWidth;
tmpHeight = g_cine->_animDataTable[it->frame]._height;
- mask = (byte*)malloc(tmpWidth * tmpHeight);
+ mask = (byte *)malloc(tmpWidth * tmpHeight);
if (it->param == 0) {
generateMask(g_cine->_animDataTable[it->frame].data(), mask, tmpWidth * tmpHeight, it->part);
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp
index 4d1284a802..9da5413013 100644
--- a/engines/cruise/background.cpp
+++ b/engines/cruise/background.cpp
@@ -129,7 +129,7 @@ int loadBackground(const char *name, int idx) {
flagSpeed = 0;
}
- if (!strcmp((char*)ptr, "PAL")) {
+ if (!strcmp((char *)ptr, "PAL")) {
memcpy(palScreen[idx], ptr + 4, 256*3);
gfxModuleData_setPal256(palScreen[idx]);
} else {
diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp
index 39286670ed..ddda8dee45 100644
--- a/engines/cruise/backgroundIncrust.cpp
+++ b/engines/cruise/backgroundIncrust.cpp
@@ -46,7 +46,7 @@ void backupBackground(backgroundIncrustStruct *pIncrust, int X, int Y, int width
pIncrust->savedX = X;
pIncrust->savedY = Y;
- pIncrust->ptr = (uint8*)MemAlloc(width * height);
+ pIncrust->ptr = (uint8 *)MemAlloc(width * height);
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int xp = j + X;
@@ -169,7 +169,7 @@ backgroundIncrustStruct *addBackgroundIncrust(int16 overlayIdx, int16 objectIdx,
int sizeTable[4]; // 0 = left, 1 = right, 2 = bottom, 3 = top
// this function checks if the dataPtr is not 0, else it retrives the data for X, Y, scale and DataPtr again (OLD: mainDrawSub1Sub1)
- flipPoly(params.fileIdx, (int16*)filesDatabase[params.fileIdx].subData.ptr, params.scale, &newFrame, newElement->X, newElement->Y, &newX, &newY, &newScale);
+ flipPoly(params.fileIdx, (int16 *)filesDatabase[params.fileIdx].subData.ptr, params.scale, &newFrame, newElement->X, newElement->Y, &newX, &newY, &newScale);
// this function fills the sizeTable for the poly (OLD: mainDrawSub1Sub2)
getPolySize(newX, newY, newScale, sizeTable, (unsigned char*)newFrame);
@@ -213,7 +213,7 @@ void regenerateBackgroundIncrust(backgroundIncrustStruct *pHead) {
drawSprite(width, height, NULL, filesDatabase[frame].subData.ptr, pl->Y, pl->X, backgroundScreens[pl->backgroundIdx], filesDatabase[frame].subData.ptrMask);
} else {
// Poly
- addBackgroundIncrustSub1(frame, pl->X, pl->Y, NULL, pl->scale, (char*)backgroundScreens[pl->backgroundIdx], (char *)filesDatabase[frame].subData.ptr);
+ addBackgroundIncrustSub1(frame, pl->X, pl->Y, NULL, pl->scale, (char *)backgroundScreens[pl->backgroundIdx], (char *)filesDatabase[frame].subData.ptr);
}
backgroundChanged[pl->backgroundIdx] = true;
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 7ce9b4ec78..6e2847d6d7 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -691,7 +691,7 @@ int findObject(int mouseX, int mouseY, int *outObjOvl, int *outObjIdx) {
if ((filesDatabase[j].subData.resourceType == OBJ_TYPE_POLY) && (filesDatabase[j].subData.ptr)) {
int zoom = params.scale;
- int16* dataPtr = (int16*)filesDatabase[j].subData.ptr;
+ int16* dataPtr = (int16 *)filesDatabase[j].subData.ptr;
if (*dataPtr == 0) {
int16 offset;
@@ -723,7 +723,7 @@ int findObject(int mouseX, int mouseY, int *outObjOvl, int *outObjIdx) {
y -= newY;
}
- if (dataPtr && findPoly((char*)dataPtr, x, y, zoom, mouseX, mouseY)) {
+ if (dataPtr && findPoly((char *)dataPtr, x, y, zoom, mouseX, mouseY)) {
*outObjOvl = linkedObjOvl;
*outObjIdx = linkedObjIdx;
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index 76479d7a10..94d075ecc3 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -420,7 +420,7 @@ int loadSetEntry(const char *name, uint8 *ptr, int currentEntryIdx, int currentD
int sec = 0;
uint16 numIdx;
- if (!strcmp((char*)ptr, "SEC")) {
+ if (!strcmp((char *)ptr, "SEC")) {
sec = 1;
}
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp
index a6680f7a02..2fd86a11b7 100644
--- a/engines/cruise/font.cpp
+++ b/engines/cruise/font.cpp
@@ -106,7 +106,7 @@ void loadFNT(const char *fileName) {
fontFileHandle.read(header, 4);
- if (strcmp((char*)header, "FNT") == 0) {
+ if (strcmp((char *)header, "FNT") == 0) {
uint32 fontSize = fontFileHandle.readUint32BE();
_systemFNT = (uint8 *)mallocAndZero(fontSize);
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 27b9be7e79..610465e962 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -142,7 +142,7 @@ int16 Op_AddProc() {
if (procBss) {
for (long int i = 0; i < pop1; i++) {
- int16* ptr = (int16*)(procBss + i * 2);
+ int16* ptr = (int16 *)(procBss + i * 2);
*ptr = param[i];
bigEndianShortToNative(ptr);
}
@@ -1046,7 +1046,7 @@ int16 Op_ComputeLine() {
int y1 = popVar();
int x1 = popVar();
- point* pDest = (point*)popPtr();
+ point* pDest = (point *)popPtr();
int maxValue = cor_droite(x1, y1, x2, y2, pDest);
@@ -1334,7 +1334,7 @@ int16 Op_TrackAnim() { // setup actor position
}
int16 Op_BgName() {
- char* bgName = (char*)popPtr();
+ char* bgName = (char *)popPtr();
int bgIdx = popVar();
if ((bgIdx >= 0) && (bgIdx < NBSCREENS) && bgName) {
@@ -1524,7 +1524,7 @@ int16 Op_Itoa() {
param[i] = popVar();
int val = popVar();
- char* pDest = (char*)popPtr();
+ char* pDest = (char *)popPtr();
if (!nbp)
sprintf(txt, "%d", val);
@@ -1645,7 +1645,7 @@ int16 Op_SetVolume() {
}
int16 Op_SongExist() {
- const char *songName = (char*)popPtr();
+ const char *songName = (char *)popPtr();
if (songName) {
char name[33];
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 9a5df69cae..24f65500db 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -185,7 +185,7 @@ void flipPoly(int fileId, int16 *dataPtr, int scale, char** newFrame, int X, int
Y -= newY;
}
- *newFrame = (char*)dataPtr;
+ *newFrame = (char *)dataPtr;
*outX = X;
*outY = Y;
*outScale = scale;
@@ -1077,7 +1077,7 @@ void mainDrawPolygons(int fileIndex, cellStruct *plWork, int X, int scale, int Y
int sizeTable[4]; // 0 = left, 1 = right, 2 = bottom, 3 = top
// this function checks if the dataPtr is not 0, else it retrives the data for X, Y, scale and DataPtr again (OLD: mainDrawSub1Sub1)
- flipPoly(fileIndex, (int16*)dataPtr, scale, &newFrame, X, Y, &newX, &newY, &newScale);
+ flipPoly(fileIndex, (int16 *)dataPtr, scale, &newFrame, X, Y, &newX, &newY, &newScale);
// this function fills the sizeTable for the poly (OLD: mainDrawSub1Sub2)
getPolySize(newX, newY, newScale, sizeTable, (unsigned char*)newFrame);
@@ -1143,7 +1143,7 @@ void mainDrawPolygons(int fileIndex, cellStruct *plWork, int X, int scale, int Y
}
// this function builds the poly model and then calls the draw functions (OLD: mainDrawSub1Sub5)
- buildPolyModel(newX, newY, newScale, (char*)polygonMask, destBuffer, newFrame);
+ buildPolyModel(newX, newY, newScale, (char *)polygonMask, destBuffer, newFrame);
}
void drawMessage(const gfxEntryStruct *pGfxPtr, int globalX, int globalY, int width, int newColor, uint8 *ouputPtr) {
@@ -1419,7 +1419,7 @@ void mainDraw(int16 param) {
currentObjPtr = cellHead.next;
#ifdef _DEBUG
- /* polyOutputBuffer = (char*)bgPtr;
+ /* polyOutputBuffer = (char *)bgPtr;
drawCtp(); */
#endif
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index e2bd1ebc34..26bea0441c 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -924,10 +924,10 @@ Common::Error loadSavegameData(int saveGameIdx) {
if (ptr) {
ASSERT(0);
- //*(int16*)(currentcellHead->datas+0x2E) = getSprite(ptr,*(int16*)(currentcellHead->datas+0xE));
+ //*(int16 *)(currentcellHead->datas+0x2E) = getSprite(ptr,*(int16 *)(currentcellHead->datas+0xE));
} else {
ASSERT(0);
- //*(int16*)(currentcellHead->datas+0x2E) = 0;
+ //*(int16 *)(currentcellHead->datas+0x2E) = 0;
}
}
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp
index cf28548e7d..d753d938bd 100644
--- a/engines/cruise/script.cpp
+++ b/engines/cruise/script.cpp
@@ -33,7 +33,7 @@ scriptInstanceStruct procHead;
scriptInstanceStruct *currentScriptPtr;
int8 getByteFromScript() {
- int8 var = *(int8*)(currentData3DataPtr + currentScriptPtr->scriptOffset);
+ int8 var = *(int8 *)(currentData3DataPtr + currentScriptPtr->scriptOffset);
++currentScriptPtr->scriptOffset;
return (var);
@@ -202,7 +202,7 @@ int32 opcodeType1() {
di = currentScriptPtr->overlayNumber;
}
- if ((var == 0x85) && !strcmp((char*)currentCtpName, "S26.CTP") && !di && mode == 1) { // patch in bar
+ if ((var == 0x85) && !strcmp((char *)currentCtpName, "S26.CTP") && !di && mode == 1) { // patch in bar
var = 0x87;
}
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 761ce7696f..4779d0baef 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -260,7 +260,7 @@ void DreamWebEngine::saveGame() {
}
char descbuf[17] = { 2, 0 };
- Common::strlcpy((char*)descbuf + 1, game_description.c_str(), 16);
+ Common::strlcpy((char *)descbuf + 1, game_description.c_str(), 16);
unsigned int desclen = game_description.size();
if (desclen > 15)
desclen = 15;
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index a8b4417459..68415233f4 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -373,7 +373,7 @@ bool Script::hotspot(Common::Rect rect, uint16 address, uint8 cursor) {
DebugMan.isDebugChannelEnabled(kGroovieDebugAll)) {
rect.translate(0, -80);
_vm->_graphicsMan->_foreground.frameRect(rect, 250);
- _vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320);
+ _vm->_system->copyRectToScreen((byte *)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320);
_vm->_system->updateScreen();
}
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index 892c144393..896e8fa2ce 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -1104,7 +1104,7 @@ void Scheduler::restoreEvents(Common::ReadStream *f) {
if ((index == -1) && (subElem == -1))
_events[i].action = 0;
else
- _events[i].action = (act*)&_actListArr[index][subElem];
+ _events[i].action = (act *)&_actListArr[index][subElem];
_events[i].localActionFl = (f->readByte() == 1) ? true : false;
_events[i].time = f->readUint32BE();
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index 9dcd7d346a..d0b4e3dfe8 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -256,7 +256,7 @@ void SoundHandler::checkMusic() {
}
void SoundHandler::loopPlayer(void *refCon) {
- ((SoundHandler*)refCon)->pcspkr_player();
+ ((SoundHandler *)refCon)->pcspkr_player();
}
/**
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index 4e2e1c5298..dff2427ddb 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -945,11 +945,11 @@ protected:
void printNoEffectWarning();
void spellCallback_start_empty() {}
- bool spellCallback_end_empty(void*) { return true; }
+ bool spellCallback_end_empty(void *) { return true; }
void spellCallback_start_armor();
void spellCallback_start_burningHands();
void spellCallback_start_detectMagic();
- bool spellCallback_end_detectMagic(void*);
+ bool spellCallback_end_detectMagic(void *);
void spellCallback_start_magicMissile();
bool spellCallback_end_magicMissile(void *obj);
void spellCallback_start_shockingGrasp();
@@ -981,7 +981,7 @@ protected:
void spellCallback_start_fleshToStone();
void spellCallback_start_stoneToFlesh();
void spellCallback_start_trueSeeing();
- bool spellCallback_end_trueSeeing(void*);
+ bool spellCallback_end_trueSeeing(void *);
void spellCallback_start_slayLiving();
void spellCallback_start_powerWordStun();
void spellCallback_start_causeLightWounds();
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index b8d56b3ecb..b28292562a 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -148,7 +148,7 @@ Common::Error KyraRpgEngine::init() {
_levelDecorationProperties = new LevelDecorationProperty[100];
memset(_levelDecorationProperties, 0, 100 * sizeof(LevelDecorationProperty));
_levelDecorationShapes = new uint8*[400];
- memset(_levelDecorationShapes, 0, 400 * sizeof(uint8*));
+ memset(_levelDecorationShapes, 0, 400 * sizeof(uint8 *));
_levelBlockProperties = new LevelBlockProperty[1025];
memset(_levelBlockProperties, 0, 1025 * sizeof(LevelBlockProperty));
@@ -178,7 +178,7 @@ Common::Error KyraRpgEngine::init() {
_vcnExpTable[i] = i & 0x0f;
_doorShapes = new uint8*[6];
- memset(_doorShapes, 0, 6 * sizeof(uint8*));
+ memset(_doorShapes, 0, 6 * sizeof(uint8 *));
initStaticResource();
diff --git a/engines/kyra/saveload_rpg.cpp b/engines/kyra/saveload_rpg.cpp
index 2e9f0228cf..f3eef0d811 100644
--- a/engines/kyra/saveload_rpg.cpp
+++ b/engines/kyra/saveload_rpg.cpp
@@ -118,7 +118,7 @@ void KyraRpgEngine::restoreFlyingObjectTempData(LevelTempData *tmp) {
}
void KyraRpgEngine::releaseFlyingObjectTempData(LevelTempData *tmp) {
- EoBFlyingObject *p = (EoBFlyingObject*)tmp->flyingObjects;
+ EoBFlyingObject *p = (EoBFlyingObject *)tmp->flyingObjects;
delete[] p;
}
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 2b701e3b81..6a76cfd0d5 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -3200,7 +3200,7 @@ void Screen::crossFadeRegion(int x1, int y1, int x2, int y2, int w, int h, int s
hideMouse();
- uint16 *wB = (uint16*)_pagePtrs[14];
+ uint16 *wB = (uint16 *)_pagePtrs[14];
uint8 *hB = _pagePtrs[14] + 640;
for (int i = 0; i < w; i++)
diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp
index 073ca3f175..54c2d87b89 100644
--- a/engines/lastexpress/entities/alexei.cpp
+++ b/engines/lastexpress/entities/alexei.cpp
@@ -355,7 +355,7 @@ IMPLEMENT_FUNCTION_IS(16, Alexei, function16, TimeValue)
break;
case kActionDefault:
- getEntities()->drawSequenceLeft(kEntityAlexei, (char*)&params->seq);
+ getEntities()->drawSequenceLeft(kEntityAlexei, (char *)&params->seq);
getObjects()->update(kObjectCompartment2, kEntityAlexei, kObjectLocation1, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectHandleInsideBathroom, kEntityAlexei, kObjectLocation1, kCursorHandKnock, kCursorHand);
break;
diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h
index bf75e022de..2da0da15b3 100644
--- a/engines/lastexpress/entities/entity_intern.h
+++ b/engines/lastexpress/entities/entity_intern.h
@@ -94,7 +94,7 @@ void class::setup_##name() { \
// Expose parameters and check validity
#define EXPOSE_PARAMS(type) \
- type *params = (type*)_data->getCurrentParameters(); \
+ type *params = (type *)_data->getCurrentParameters(); \
if (!params) \
error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \
@@ -307,7 +307,7 @@ void class::setup_##name() { \
//////////////////////////////////////////////////////////////////////////
#define RESET_ENTITY_STATE(entity, class, function) \
getEntities()->resetState(entity); \
- ((class*)getEntities()->get(entity))->function();
+ ((class *)getEntities()->get(entity))->function();
//////////////////////////////////////////////////////////////////////////
// Parameters macros (for default IIII parameters)
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index 894663dda6..f27087a609 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -615,9 +615,9 @@ void Entities::resetSequences(EntityIndex entityIndex) const {
getData(entityIndex)->field_4A9 = false;
getData(entityIndex)->field_4AA = false;
- strcpy((char*)&getData(entityIndex)->sequenceNameCopy, "");
- strcpy((char*)&getData(entityIndex)->sequenceName, "");
- strcpy((char*)&getData(entityIndex)->sequenceName2, "");
+ strcpy((char *)&getData(entityIndex)->sequenceNameCopy, "");
+ strcpy((char *)&getData(entityIndex)->sequenceName, "");
+ strcpy((char *)&getData(entityIndex)->sequenceName2, "");
getScenes()->resetQueue();
}
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index 0aecae22ec..bf0abdea07 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -635,7 +635,7 @@ MidiMusic::MidiMusic(MidiDriver *driver, ChannelEntry channels[NUM_CHANNELS],
for (uint i = 0; i < packedSize; i++)
#if defined(SCUMM_NEED_ALIGNMENT)
- memcpy(dataDest++, (byte*)((byte*)data + *(idx + i) * sizeof(uint16)), sizeof(uint16));
+ memcpy(dataDest++, (byte *)((byte *)data + *(idx + i) * sizeof(uint16)), sizeof(uint16));
#else
*dataDest++ = data[*(idx + i)];
#endif
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;
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index 7958906897..8d72fa3f72 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -261,7 +261,7 @@ bool VideoManager::updateMovies() {
// Clip the width/height to make sure we stay on the screen (Myst does this a few times)
uint16 width = MIN<int32>(_videoStreams[i]->getWidth(), _vm->_system->getWidth() - _videoStreams[i].x);
uint16 height = MIN<int32>(_videoStreams[i]->getHeight(), _vm->_system->getHeight() - _videoStreams[i].y);
- _vm->_system->copyRectToScreen((byte*)frame->pixels, frame->pitch, _videoStreams[i].x, _videoStreams[i].y, width, height);
+ _vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, _videoStreams[i].x, _videoStreams[i].y, width, height);
// We've drawn something to the screen, make sure we update it
updateScreen = true;
diff --git a/engines/parallaction/balloons.cpp b/engines/parallaction/balloons.cpp
index f74eef18e1..1ddd401b20 100644
--- a/engines/parallaction/balloons.cpp
+++ b/engines/parallaction/balloons.cpp
@@ -179,7 +179,7 @@ protected:
uint16 rx = 10;
uint16 ry = 4 + _lines * _font->height(); // y
- byte *dst = (byte*)_surf->getBasePtr(rx, ry);
+ byte *dst = (byte *)_surf->getBasePtr(rx, ry);
_font->setColor(_color);
_font->drawString(dst, _surf->w, _line.c_str());
}
@@ -494,7 +494,7 @@ protected:
uint16 rx = _x + (_surf->w - _lineWidth) / 2;
uint16 ry = _y + _lines * _font->height(); // y
- byte *dst = (byte*)_surf->getBasePtr(rx, ry);
+ byte *dst = (byte *)_surf->getBasePtr(rx, ry);
_font->setColor(_color);
_font->drawString(dst, _surf->w, _line.c_str());
}
diff --git a/engines/parallaction/callables_br.cpp b/engines/parallaction/callables_br.cpp
index ac5ff88560..7d3e63dfba 100644
--- a/engines/parallaction/callables_br.cpp
+++ b/engines/parallaction/callables_br.cpp
@@ -26,31 +26,31 @@
namespace Parallaction {
-void Parallaction_br::_c_null(void*) {
+void Parallaction_br::_c_null(void *) {
// do nothing :)
}
-void Parallaction_br::_c_blufade(void*) {
+void Parallaction_br::_c_blufade(void *) {
warning("Parallaction_br::_c_blufade() not yet implemented");
}
-void Parallaction_br::_c_resetpalette(void*) {
+void Parallaction_br::_c_resetpalette(void *) {
warning("Parallaction_br::_c_resetpalette() not yet implemented");
}
-void Parallaction_br::_c_ferrcycle(void*) {
+void Parallaction_br::_c_ferrcycle(void *) {
warning("Parallaction_br::_c_ferrcycle() not yet implemented");
}
-void Parallaction_br::_c_lipsinc(void*) {
+void Parallaction_br::_c_lipsinc(void *) {
warning("Unexpected lipsinc routine call! Please notify the team");
}
-void Parallaction_br::_c_albcycle(void*) {
+void Parallaction_br::_c_albcycle(void *) {
warning("Parallaction_br::_c_albcycle() not yet implemented");
}
-void Parallaction_br::_c_password(void*) {
+void Parallaction_br::_c_password(void *) {
warning("Parallaction_br::_c_password() not yet implemented");
}
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp
index 77f54fcc98..64885c7ff3 100644
--- a/engines/parallaction/callables_ns.cpp
+++ b/engines/parallaction/callables_ns.cpp
@@ -260,7 +260,7 @@ void Parallaction_ns::stopMovingSarcophagus() {
void Parallaction_ns::_c_moveSarc(void *parm) {
if (!_movingSarcophagus) {
- startMovingSarcophagus(*(ZonePtr*)parm);
+ startMovingSarcophagus(*(ZonePtr *)parm);
} else {
stopMovingSarcophagus();
}
@@ -417,18 +417,18 @@ void Parallaction_ns::_c_testResult(void *parm) {
return;
}
-void Parallaction_ns::_c_offSound(void*) {
+void Parallaction_ns::_c_offSound(void *) {
_soundManI->stopSfx(0);
_soundManI->stopSfx(1);
_soundManI->stopSfx(2);
_soundManI->stopSfx(3);
}
-void Parallaction_ns::_c_startMusic(void*) {
+void Parallaction_ns::_c_startMusic(void *) {
_soundManI->playMusic();
}
-void Parallaction_ns::_c_closeMusic(void*) {
+void Parallaction_ns::_c_closeMusic(void *) {
_soundManI->stopMusic();
}
@@ -490,7 +490,7 @@ void Parallaction_ns::_c_moveSheet(void *parm) {
}
void zeroMask(int x, int y, int color, void *data) {
- BackgroundInfo *info = (BackgroundInfo*)data;
+ BackgroundInfo *info = (BackgroundInfo *)data;
uint16 _ax = x + y * info->_mask->w;
info->_mask->data[_ax >> 2] &= ~(3 << ((_ax & 3) << 1));
@@ -575,16 +575,16 @@ int16 projectorProgram[] = {
25, 116, 25, 115, 25, 114, 25, 113, 25, 112, 25, 111, 25, 110, 25, -1, -1
};
-void Parallaction_ns::_c_projector(void*) {
+void Parallaction_ns::_c_projector(void *) {
_gfx->setHalfbriteMode(true);
_gfx->setProjectorProgram(projectorProgram);
}
-void Parallaction_ns::_c_HBOff(void*) {
+void Parallaction_ns::_c_HBOff(void *) {
_gfx->setHalfbriteMode(false);
}
-void Parallaction_ns::_c_HBOn(void*) {
+void Parallaction_ns::_c_HBOn(void *) {
_gfx->setHalfbriteMode(true);
}
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
index 61172d0896..f20e05771a 100644
--- a/engines/parallaction/disk.cpp
+++ b/engines/parallaction/disk.cpp
@@ -38,7 +38,7 @@ void ILBMLoader::setupBuffer(uint32 w, uint32 h) {
}
_surf->create(w, h, Graphics::PixelFormat::createFormatCLUT8());
_mode = Graphics::ILBMDecoder::ILBM_UNPACK_PLANES;
- _intBuffer = (byte*)_surf->pixels;
+ _intBuffer = (byte *)_surf->pixels;
break;
case BODYMODE_MASKBUFFER:
@@ -82,7 +82,7 @@ bool ILBMLoader::callback(Common::IFFChunk &chunk) {
case ID_CRNG:
if (_crng) {
PaletteFxRange *ptr = &_crng[_numCRNG];
- chunk._stream->read((byte*)ptr, chunk._size);
+ chunk._stream->read((byte *)ptr, chunk._size);
ptr->_timer = FROM_BE_16(ptr->_timer);
ptr->_step = FROM_BE_16(ptr->_step);
ptr->_flags = FROM_BE_16(ptr->_flags);
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index f9e368ab39..5e39c893db 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -283,7 +283,7 @@ Sprites* DosDisk_br::createSprites(Common::ReadStream *stream) {
spr->w = stream->readUint16LE();
spr->h = stream->readUint16LE();
- spr->packedData = (byte*)malloc(spr->size);
+ spr->packedData = (byte *)malloc(spr->size);
stream->read(spr->packedData, spr->size);
}
delete stream;
@@ -450,7 +450,7 @@ void AmigaDisk_br::init() {
void AmigaDisk_br::adjustForPalette(Graphics::Surface &surf, int transparentColor) {
uint size = surf.w * surf.h;
- byte *data = (byte*)surf.pixels;
+ byte *data = (byte *)surf.pixels;
for (uint i = 0; i < size; i++, data++) {
if (transparentColor == -1 || transparentColor != *data)
*data += 16;
@@ -609,7 +609,7 @@ GfxObj* AmigaDisk_br::loadStatic(const char* name) {
stream->read(shadow, shadowSize);
for (int32 i = 0; i < surf->h; ++i) {
byte *src = shadow + shadowWidth * i;
- byte *dst = (byte*)surf->pixels + surf->pitch * i;
+ byte *dst = (byte *)surf->pixels + surf->pitch * i;
for (int32 j = 0; j < surf->w; ++j, ++dst) {
byte bit = src[j/8] & (1 << (7 - (j & 7)));
@@ -637,7 +637,7 @@ Sprites* AmigaDisk_br::createSprites(Common::ReadStream *stream) {
spr->w = stream->readUint16BE();
spr->h = stream->readUint16BE() - 1;
- spr->packedData = (byte*)malloc(spr->size);
+ spr->packedData = (byte *)malloc(spr->size);
stream->read(spr->packedData, spr->size);
}
@@ -725,7 +725,7 @@ GfxObj* AmigaDisk_br::loadObjects(const char *name, uint8 part) {
max = 72;
byte *data = new byte[max * 2601];
- byte *srcPtr = (byte*)loader._surf->getBasePtr(0,0);
+ byte *srcPtr = (byte *)loader._surf->getBasePtr(0,0);
int w = loader._surf->w;
// Convert to the expected display format
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index e145743f09..b2285d0da3 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -473,7 +473,7 @@ void DosDisk_ns::loadBackground(BackgroundInfo& info, const char *filename) {
// read bitmap, mask and path data and extract them into the 3 buffers
info.bg.create(info.width, info.height, Graphics::PixelFormat::createFormatCLUT8());
createMaskAndPathBuffers(info);
- unpackBackground(stream, (byte*)info.bg.pixels, info._mask->data, info._path->data);
+ unpackBackground(stream, (byte *)info.bg.pixels, info._mask->data, info._path->data);
delete stream;
}
@@ -661,10 +661,10 @@ public:
stream.seek(-4, SEEK_END);
uint32 decrlen = stream.readUint32BE() >> 8;
- byte *dest = (byte*)malloc(decrlen);
+ byte *dest = (byte *)malloc(decrlen);
uint32 crlen = stream.size() - 4;
- byte *src = (byte*)malloc(crlen);
+ byte *src = (byte *)malloc(crlen);
stream.seek(4, SEEK_SET);
stream.read(src, crlen);
@@ -757,14 +757,14 @@ void AmigaDisk_ns::unpackFrame(byte *dst, byte *src, uint16 planeSize) {
*/
void AmigaDisk_ns::patchFrame(byte *dst, byte *dlta, uint16 bytesPerPlane, uint16 height) {
- uint32 *dataIndex = (uint32*)dlta;
- uint32 *ofslenIndex = (uint32*)dlta + 8;
+ uint32 *dataIndex = (uint32 *)dlta;
+ uint32 *ofslenIndex = (uint32 *)dlta + 8;
- uint16 *base = (uint16*)dlta;
+ uint16 *base = (uint16 *)dlta;
uint16 wordsPerLine = bytesPerPlane >> 1;
for (uint j = 0; j < NUM_PLANES; j++) {
- uint16 *dst16 = (uint16*)(dst + j * bytesPerPlane * height);
+ uint16 *dst16 = (uint16 *)(dst + j * bytesPerPlane * height);
uint16 *data = base + READ_BE_UINT32(dataIndex);
dataIndex++;
@@ -804,7 +804,7 @@ void AmigaDisk_ns::unpackBitmap(byte *dst, byte *src, uint16 numFrames, uint16 b
uint size = READ_BE_UINT32(src + 4);
if (tempBuffer == 0)
- tempBuffer = (byte*)malloc(planeSize * NUM_PLANES);
+ tempBuffer = (byte *)malloc(planeSize * NUM_PLANES);
memcpy(tempBuffer, baseFrame, planeSize * NUM_PLANES);
diff --git a/engines/parallaction/font.cpp b/engines/parallaction/font.cpp
index cc7f320e1c..d4c9aefd32 100644
--- a/engines/parallaction/font.cpp
+++ b/engines/parallaction/font.cpp
@@ -57,17 +57,17 @@ public:
_numGlyphs = stream.readByte();
_height = stream.readUint32BE();
- _widths = (byte*)malloc(_numGlyphs);
+ _widths = (byte *)malloc(_numGlyphs);
stream.read(_widths, _numGlyphs);
- _offsets = (uint*)malloc(_numGlyphs * sizeof(uint));
+ _offsets = (uint *)malloc(_numGlyphs * sizeof(uint));
_offsets[0] = 0;
for (uint i = 1; i < _numGlyphs; i++)
_offsets[i] = _offsets[i-1] + _widths[i-1] * _height;
uint size = _offsets[_numGlyphs-1] + _widths[_numGlyphs-1] * _height;
- _data = (byte*)malloc(size);
+ _data = (byte *)malloc(size);
stream.read(_data, size);
}
@@ -503,25 +503,25 @@ AmigaFont::AmigaFont(Common::SeekableReadStream &stream) {
stream.seek(32); // skips dummy header
_dataSize = stream.size() - stream.pos();
- _data = (byte*)malloc(_dataSize);
+ _data = (byte *)malloc(_dataSize);
stream.read(_data, _dataSize);
- _font = (AmigaDiskFont*)(_data + 78);
+ _font = (AmigaDiskFont *)(_data + 78);
_font->_ySize = FROM_BE_16(_font->_ySize);
_font->_xSize = FROM_BE_16(_font->_xSize);
_font->_baseline = FROM_BE_16(_font->_baseline);
_font->_modulo = FROM_BE_16(_font->_modulo);
- _charLoc = (CharLoc*)(_data + FROM_BE_32(_font->_charLoc));
+ _charLoc = (CharLoc *)(_data + FROM_BE_32(_font->_charLoc));
_charData = _data + FROM_BE_32(_font->_charData);
_charSpace = 0;
_charKern = 0;
if (_font->_charSpace != 0)
- _charSpace = (uint16*)(_data + FROM_BE_32(_font->_charSpace));
+ _charSpace = (uint16 *)(_data + FROM_BE_32(_font->_charSpace));
if (_font->_charKern != 0)
- _charKern = (uint16*)(_data + FROM_BE_32(_font->_charKern));
+ _charKern = (uint16 *)(_data + FROM_BE_32(_font->_charKern));
}
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index c351551e36..852235ce34 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -235,7 +235,7 @@ void Gfx::drawGfxObject(GfxObj *obj, Graphics::Surface &surf) {
}
void Gfx::drawText(Font *font, Graphics::Surface* surf, uint16 x, uint16 y, const char *text, byte color) {
- byte *dst = (byte*)surf->getBasePtr(x, y);
+ byte *dst = (byte *)surf->getBasePtr(x, y);
font->setColor(color);
font->drawString(dst, surf->w, text);
}
@@ -308,7 +308,7 @@ void Gfx::bltMaskScale(const Common::Rect& r, byte *data, Graphics::Surface *sur
dp.y = dstRect.top;
byte *s = data + srcRect.left + srcRect.top * width;
- byte *d = (byte*)surf->getBasePtr(dp.x, dp.y);
+ byte *d = (byte *)surf->getBasePtr(dp.x, dp.y);
uint line = 0, col = 0;
@@ -380,7 +380,7 @@ void Gfx::bltMaskNoScale(const Common::Rect& r, byte *data, Graphics::Surface *s
q.translate(-r.left, -r.top);
byte *s = data + q.left + q.top * r.width();
- byte *d = (byte*)surf->getBasePtr(dp.x, dp.y);
+ byte *d = (byte *)surf->getBasePtr(dp.x, dp.y);
uint sPitch = r.width() - q.width();
uint dPitch = surf->w - q.width();
@@ -422,7 +422,7 @@ void Gfx::bltNoMaskNoScale(const Common::Rect& r, byte *data, Graphics::Surface
q.translate(-r.left, -r.top);
byte *s = data + q.left + q.top * r.width();
- byte *d = (byte*)surf->getBasePtr(dp.x, dp.y);
+ byte *d = (byte *)surf->getBasePtr(dp.x, dp.y);
uint sPitch = r.width() - q.width();
uint dPitch = surf->w - q.width();
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index a006edf114..6868505c52 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -44,7 +44,7 @@ namespace Parallaction {
void halfbritePixel(int x, int y, int color, void *data) {
Graphics::Surface *surf = (Graphics::Surface *)data;
- byte *pixel = (byte*)surf->getBasePtr(x, y);
+ byte *pixel = (byte *)surf->getBasePtr(x, y);
*pixel &= ~0x20;
}
@@ -319,7 +319,7 @@ void Gfx::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int
y += _scrollPosY;
}
- byte *dst = (byte*)_backBuffer.getBasePtr(x, y);
+ byte *dst = (byte *)_backBuffer.getBasePtr(x, y);
for (int i = 0; i < h; i++) {
memcpy(dst, buf, w);
buf += pitch;
@@ -357,7 +357,7 @@ void Gfx::unlockScreen() {
void Gfx::updateScreenIntern() {
if (_doubleBuffering) {
- byte *data = (byte*)_backBuffer.getBasePtr(_scrollPosX, _scrollPosY);
+ byte *data = (byte *)_backBuffer.getBasePtr(_scrollPosX, _scrollPosY);
_vm->_system->copyRectToScreen(data, _backBuffer.pitch, 0, 0, _vm->_screenWidth, _vm->_screenHeight);
}
@@ -425,7 +425,7 @@ void Gfx::updateScreen() {
// background may not cover the whole screen, so adjust bulk update size
uint w = _backgroundInfo->width;
uint h = _backgroundInfo->height;
- byte *backgroundData = (byte*)_backgroundInfo->bg.getBasePtr(0, 0);
+ byte *backgroundData = (byte *)_backgroundInfo->bg.getBasePtr(0, 0);
uint16 backgroundPitch = _backgroundInfo->bg.pitch;
copyRectToScreen(backgroundData, backgroundPitch, _backgroundInfo->_x, _backgroundInfo->_y, w, h);
}
@@ -450,7 +450,7 @@ void Gfx::applyHalfbriteEffect_NS(Graphics::Surface &surf) {
return;
}
- byte *buf = (byte*)surf.pixels;
+ byte *buf = (byte *)surf.pixels;
for (int i = 0; i < surf.w*surf.h; i++) {
*buf++ |= 0x20;
}
@@ -493,7 +493,7 @@ void Gfx::patchBackground(Graphics::Surface &surf, int16 x, int16 y, bool mask)
r.moveTo(x, y);
uint16 z = (mask) ? _backgroundInfo->getMaskLayer(y) : LAYER_FOREGROUND;
- blt(r, (byte*)surf.pixels, &_backgroundInfo->bg, z, 100, 0);
+ blt(r, (byte *)surf.pixels, &_backgroundInfo->bg, z, 100, 0);
}
void Gfx::fillBackground(const Common::Rect& r, byte color) {
@@ -502,7 +502,7 @@ void Gfx::fillBackground(const Common::Rect& r, byte color) {
void Gfx::invertBackground(const Common::Rect& r) {
- byte *d = (byte*)_backgroundInfo->bg.getBasePtr(r.left, r.top);
+ byte *d = (byte *)_backgroundInfo->bg.getBasePtr(r.left, r.top);
for (int i = 0; i < r.height(); i++) {
for (int j = 0; j < r.width(); j++) {
@@ -536,12 +536,12 @@ GfxObj *Gfx::renderFloatingLabel(Font *font, char *text) {
setupLabelSurface(*cnv, w, h);
font->setColor((_gameType == GType_BRA) ? 0 : 7);
- font->drawString((byte*)cnv->pixels + 1, cnv->w, text);
- font->drawString((byte*)cnv->pixels + 1 + cnv->w * 2, cnv->w, text);
- font->drawString((byte*)cnv->pixels + cnv->w, cnv->w, text);
- font->drawString((byte*)cnv->pixels + 2 + cnv->w, cnv->w, text);
+ font->drawString((byte *)cnv->pixels + 1, cnv->w, text);
+ font->drawString((byte *)cnv->pixels + 1 + cnv->w * 2, cnv->w, text);
+ font->drawString((byte *)cnv->pixels + cnv->w, cnv->w, text);
+ font->drawString((byte *)cnv->pixels + 2 + cnv->w, cnv->w, text);
font->setColor((_gameType == GType_BRA) ? 11 : 1);
- font->drawString((byte*)cnv->pixels + 1 + cnv->w, cnv->w, text);
+ font->drawString((byte *)cnv->pixels + 1 + cnv->w, cnv->w, text);
} else {
w = font->getStringWidth(text);
h = font->height();
@@ -703,8 +703,8 @@ void Gfx::unregisterLabel(GfxObj *label) {
void Gfx::copyRect(const Common::Rect &r, Graphics::Surface &src, Graphics::Surface &dst) {
- byte *s = (byte*)src.getBasePtr(r.left, r.top);
- byte *d = (byte*)dst.getBasePtr(0, 0);
+ byte *s = (byte *)src.getBasePtr(r.left, r.top);
+ byte *d = (byte *)dst.getBasePtr(0, 0);
for (uint16 i = 0; i < r.height(); i++) {
memcpy(d, s, r.width());
@@ -1017,7 +1017,7 @@ void MaskBuffer::create(uint16 width, uint16 height) {
internalWidth = w >> 2;
h = height;
size = (internalWidth * h);
- data = (byte*)calloc(size, 1);
+ data = (byte *)calloc(size, 1);
}
void MaskBuffer::free() {
@@ -1096,7 +1096,7 @@ void PathBuffer::create(uint16 width, uint16 height) {
internalWidth = w >> 3;
h = height;
size = (internalWidth * h);
- data = (byte*)calloc(size, 1);
+ data = (byte *)calloc(size, 1);
}
void PathBuffer::free() {
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 99bc811763..b43dd193b5 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -103,7 +103,7 @@ public:
}
byte* getData(uint16 index) {
assert(index == 0);
- return (byte*)_surf->getBasePtr(0,0);
+ return (byte *)_surf->getBasePtr(0,0);
}
void getRect(uint16 index, Common::Rect &r) {
assert(index == 0);
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index 56148d78d8..5bc5acf630 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -488,10 +488,10 @@ public:
_font->setColor(0);
int x = (w - questionW)/2;
int y = 13;
- _font->drawString((byte*)surf->getBasePtr(x, y), surf->pitch, question);
+ _font->drawString((byte *)surf->getBasePtr(x, y), surf->pitch, question);
x = (w - optionW)/2;
y = 13 + _font->height()*2;
- _font->drawString((byte*)surf->getBasePtr(x,y), surf->pitch, option);
+ _font->drawString((byte *)surf->getBasePtr(x,y), surf->pitch, option);
_obj = new GfxObj(kGfxObjTypeMenu, new SurfaceToFrames(surf), "quitdialog");
assert(_obj);
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index 8fd9f56802..1cae63be42 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -183,7 +183,7 @@ ItemPosition InventoryRenderer::hitTest(const Common::Point &p) const {
void InventoryRenderer::drawItem(ItemPosition pos, ItemName name) {
Common::Rect r;
getItemRect(pos, r);
- byte* d = (byte*)_surf.getBasePtr(r.left, r.top);
+ byte* d = (byte *)_surf.getBasePtr(r.left, r.top);
drawItem(name, d, _surf.pitch);
}
@@ -238,7 +238,7 @@ void InventoryRenderer::getItemRect(ItemPosition pos, Common::Rect &r) {
}
Inventory::Inventory(int maxItems, InventoryItem *verbs) : _numItems(0), _maxItems(maxItems) {
- _items = (InventoryItem*)calloc(_maxItems, sizeof(InventoryItem));
+ _items = (InventoryItem *)calloc(_maxItems, sizeof(InventoryItem));
int i = 0;
for ( ; verbs[i]._id; i++) {
diff --git a/engines/parallaction/inventory.h b/engines/parallaction/inventory.h
index 91c06d1e93..a3b7bf953f 100644
--- a/engines/parallaction/inventory.h
+++ b/engines/parallaction/inventory.h
@@ -108,7 +108,7 @@ public:
void highlightItem(ItemPosition pos, byte color);
void drawItem(ItemName name, byte *buffer, uint pitch);
- byte* getData() const { return (byte*)_surf.pixels; }
+ byte* getData() const { return (byte *)_surf.pixels; }
void getRect(Common::Rect &r) const;
int16 getNumLines() const;
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index 222a0a9552..d3529c5dd9 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -386,7 +386,7 @@ ScriptVar::~ScriptVar() {
Table::Table(uint32 size) : _size(size), _used(0), _disposeMemory(true) {
- _data = (char**)calloc(size, sizeof(char*));
+ _data = (char**)calloc(size, sizeof(char *));
}
Table::Table(uint32 size, const char **data) : _size(size), _used(size), _disposeMemory(false) {
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index 6c3ff11d15..0d56b62e2f 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -447,7 +447,7 @@ private:
// callables data
- typedef void (Parallaction_ns::*Callable)(void*);
+ typedef void (Parallaction_ns::*Callable)(void *);
const Callable *_callables;
ZonePtr _moveSarcGetZone;
ZonePtr _moveSarcExaZone;
@@ -468,37 +468,37 @@ private:
PathWalker_NS *_walker;
// common callables
- void _c_play_boogie(void*);
- void _c_startIntro(void*);
- void _c_endIntro(void*);
- void _c_moveSheet(void*);
- void _c_sketch(void*);
- void _c_shade(void*);
- void _c_score(void*);
- void _c_fade(void*);
- void _c_moveSarc(void*);
- void _c_contaFoglie(void*);
- void _c_zeroFoglie(void*);
- void _c_trasformata(void*);
- void _c_offMouse(void*);
- void _c_onMouse(void*);
- void _c_setMask(void*);
- void _c_endComment(void*);
- void _c_frankenstein(void*);
- void _c_finito(void*);
- void _c_ridux(void*);
- void _c_testResult(void*);
+ void _c_play_boogie(void *);
+ void _c_startIntro(void *);
+ void _c_endIntro(void *);
+ void _c_moveSheet(void *);
+ void _c_sketch(void *);
+ void _c_shade(void *);
+ void _c_score(void *);
+ void _c_fade(void *);
+ void _c_moveSarc(void *);
+ void _c_contaFoglie(void *);
+ void _c_zeroFoglie(void *);
+ void _c_trasformata(void *);
+ void _c_offMouse(void *);
+ void _c_onMouse(void *);
+ void _c_setMask(void *);
+ void _c_endComment(void *);
+ void _c_frankenstein(void *);
+ void _c_finito(void *);
+ void _c_ridux(void *);
+ void _c_testResult(void *);
// dos specific callables
- void _c_null(void*);
+ void _c_null(void *);
// amiga specific callables
- void _c_projector(void*);
- void _c_HBOff(void*);
- void _c_offSound(void*);
- void _c_startMusic(void*);
- void _c_closeMusic(void*);
- void _c_HBOn(void*);
+ void _c_projector(void *);
+ void _c_HBOff(void *);
+ void _c_offSound(void *);
+ void _c_startMusic(void *);
+ void _c_closeMusic(void *);
+ void _c_HBOn(void *);
};
@@ -582,7 +582,7 @@ private:
void startIngameMenu();
void freeCharacter();
- typedef void (Parallaction_br::*Callable)(void*);
+ typedef void (Parallaction_br::*Callable)(void *);
const Callable *_callables;
static const Callable _dosCallables[6];
static const Callable _amigaCallables[6];
@@ -592,13 +592,13 @@ private:
PathWalker_BR *_walker;
// dos callables
- void _c_null(void*);
- void _c_blufade(void*);
- void _c_resetpalette(void*);
- void _c_ferrcycle(void*);
- void _c_lipsinc(void*);
- void _c_albcycle(void*);
- void _c_password(void*);
+ void _c_null(void *);
+ void _c_blufade(void *);
+ void _c_resetpalette(void *);
+ void _c_ferrcycle(void *);
+ void _c_lipsinc(void *);
+ void _c_albcycle(void *);
+ void _c_password(void *);
};
extern Parallaction *_vm;
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index 16ffd24a82..0925e55309 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -378,7 +378,7 @@ Audio::AudioStream *AmigaSoundMan_br::loadChannelData(const char *filename, Chan
if (_vm->getFeatures() & GF_DEMO) {
uint32 dataSize = stream->size();
- int8 *data = (int8*)malloc(dataSize);
+ int8 *data = (int8 *)malloc(dataSize);
if (stream->read(data, dataSize) != dataSize)
error("DosSoundMan_br::loadChannelData: Read failed");
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index 858692703c..2835954003 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -303,7 +303,7 @@ void MidiMusic::playMusic() {
for (uint i = 0; i < packedSize; i++)
#if defined(SCUMM_NEED_ALIGNMENT)
- memcpy(&_buf[i], (byte*)((byte*)data + *(idx + i) * sizeof(uint16)), sizeof(uint16));
+ memcpy(&_buf[i], (byte *)((byte *)data + *(idx + i) * sizeof(uint16)), sizeof(uint16));
#else
_buf[i] = data[*(idx + i)];
#endif
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp
index 8b2d1e9dad..fd602ff4fb 100644
--- a/engines/saga/animation.cpp
+++ b/engines/saga/animation.cpp
@@ -501,7 +501,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) {
}
anim = getAnimation(animId);
- displayBuffer = (byte*)_vm->_render->getBackGroundSurface()->pixels;
+ displayBuffer = (byte *)_vm->_render->getBackGroundSurface()->pixels;
if (playing) {
anim->state = ANIM_PLAYING;
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index 8e98f0fbe7..62250a0820 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -156,7 +156,7 @@ void Surface::transitionDissolve(const byte *sourceBuffer, const Common::Rect &s
if (sourceRect.contains(x1, y1)) {
color = sourceBuffer[(x1-sourceRect.left) + sourceRect.width()*(y1-sourceRect.top)];
if (flags == 0 || color)
- ((byte*)pixels)[seq] = color;
+ ((byte *)pixels)[seq] = color;
}
}
}
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index ec6b13f313..945b4ad5a7 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -346,7 +346,7 @@ int16 IsoMap::findMulti(int16 tileIndex, int16 absU, int16 absV, int16 absH) {
if (offset + sizeof(int16) > _multiTableData.size() * sizeof(int16)) {
error("wrong multiTileEntryData->offset");
}
- tiles = (int16*)((byte*)&_multiTableData.front() + offset);
+ tiles = (int16 *)((byte *)&_multiTableData.front() + offset);
tileIndex = *tiles;
if (tileIndex >= 256) {
warning("something terrible happened");
diff --git a/engines/saga/script.h b/engines/saga/script.h
index 227b58a298..c4ea2d62b3 100644
--- a/engines/saga/script.h
+++ b/engines/saga/script.h
@@ -196,9 +196,9 @@ public:
case kAddressModule:
return _moduleBase;
case kAddressStack:
- return (byte*)&_stackBuf[_frameIndex];
+ return (byte *)&_stackBuf[_frameIndex];
case kAddressThread:
- return (byte*)_threadVars;
+ return (byte *)_threadVars;
default:
return _commonBase;
}
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 395ba4a8c7..9607a8e66d 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -1433,7 +1433,7 @@ bool Console::cmdSaid(int argc, const char **argv) {
_engine->getVocabulary()->dumpParseTree();
_engine->getVocabulary()->parserIsValid = true;
- int ret = said((byte*)spec, true);
+ int ret = said((byte *)spec, true);
DebugPrintf("kSaid: %s\n", (ret == SAID_NO_MATCH ? "No match" : "Match"));
}
@@ -1605,7 +1605,7 @@ bool Console::cmdWindowList(int argc, const char **argv) {
bool Console::cmdSavedBits(int argc, const char **argv) {
SegManager *segman = _engine->_gamestate->_segMan;
SegmentId id = segman->findSegmentByType(SEG_TYPE_HUNK);
- HunkTable* hunks = (HunkTable*)segman->getSegmentObj(id);
+ HunkTable* hunks = (HunkTable *)segman->getSegmentObj(id);
if (!hunks) {
DebugPrintf("No hunk segment found.\n");
return true;
@@ -1617,7 +1617,7 @@ bool Console::cmdSavedBits(int argc, const char **argv) {
uint16 offset = entries[i].offset;
const Hunk& h = hunks->_table[offset];
if (strcmp(h.type, "SaveBits()") == 0) {
- byte* memoryPtr = (byte*)h.mem;
+ byte* memoryPtr = (byte *)h.mem;
if (memoryPtr) {
DebugPrintf("%04x:%04x:", PRINT_REG(entries[i]));
@@ -1671,7 +1671,7 @@ bool Console::cmdShowSavedBits(int argc, const char **argv) {
SegManager *segman = _engine->_gamestate->_segMan;
SegmentId id = segman->findSegmentByType(SEG_TYPE_HUNK);
- HunkTable* hunks = (HunkTable*)segman->getSegmentObj(id);
+ HunkTable* hunks = (HunkTable *)segman->getSegmentObj(id);
if (!hunks) {
DebugPrintf("No hunk segment found.\n");
return true;
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index ce903626e7..aade40fd9f 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -823,7 +823,7 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) {
int size = argv[2].toUint16();
char *buf = new char[size];
bool success = false;
- s->_segMan->memcpy((byte*)buf, argv[1], size);
+ s->_segMan->memcpy((byte *)buf, argv[1], size);
debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size);
FileHandle *f = getFileFromHandle(s, handle);
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index f30f4e923e..cddd01e10c 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -345,7 +345,7 @@ bool MessageState::stringLit(Common::String &outStr, const Common::String &inStr
}
bool MessageState::stringStage(Common::String &outstr, const Common::String &inStr, uint &index) {
- // Stage directions of the form (n*), where n is anything but a digit or a lowercase character
+ // Stage directions of the form (n *), where n is anything but a digit or a lowercase character
if (inStr[index] != '(')
return false;
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 554a6b6a2c..ef61b2e28a 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -727,7 +727,7 @@ void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *ke
switch (mobj->getType()) {
case SEG_TYPE_HUNK:
{
- HunkTable *ht = (HunkTable*)mobj;
+ HunkTable *ht = (HunkTable *)mobj;
int index = argv[parmNr].offset;
if (ht->isValidEntry(index)) {
// NOTE: This ", deleted" isn't as useful as it could
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 04c61f7b7c..cc127c8dbc 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -691,7 +691,7 @@ void SegManager::memcpy(reg_t dest, const byte* src, size_t n) {
if (dest_r.isRaw) {
// raw -> raw
- ::memcpy((char*)dest_r.raw, src, n);
+ ::memcpy((char *)dest_r.raw, src, n);
} else {
// raw -> non-raw
for (uint i = 0; i < n; i++)
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index fcf9774a08..36b7d92c07 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -306,7 +306,7 @@ SegmentRef StringTable::dereference(reg_t pointer) {
SegmentRef ret;
ret.isRaw = true;
ret.maxSize = _table[pointer.offset].getSize();
- ret.raw = (byte*)_table[pointer.offset].getRawData();
+ ret.raw = (byte *)_table[pointer.offset].getRawData();
return ret;
}
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 6469bc0cb3..4020518b72 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -438,7 +438,7 @@ void GfxScreen::bitsSaveScreen(Common::Rect rect, byte *screen, uint16 screenWid
screen += (rect.top * screenWidth) + rect.left;
for (y = rect.top; y < rect.bottom; y++) {
- memcpy(memoryPtr, (void*)screen, width); memoryPtr += width;
+ memcpy(memoryPtr, (void *)screen, width); memoryPtr += width;
screen += screenWidth;
}
}
@@ -458,7 +458,7 @@ void GfxScreen::bitsSaveDisplayScreen(Common::Rect rect, byte *&memoryPtr) {
}
for (y = rect.top; y < rect.bottom; y++) {
- memcpy(memoryPtr, (void*)screen, width); memoryPtr += width;
+ memcpy(memoryPtr, (void *)screen, width); memoryPtr += width;
screen += _displayWidth;
}
}
@@ -503,7 +503,7 @@ void GfxScreen::bitsRestoreScreen(Common::Rect rect, byte *&memoryPtr, byte *scr
screen += (rect.top * screenWidth) + rect.left;
for (y = rect.top; y < rect.bottom; y++) {
- memcpy((void*) screen, memoryPtr, width); memoryPtr += width;
+ memcpy((void *) screen, memoryPtr, width); memoryPtr += width;
screen += screenWidth;
}
}
@@ -523,7 +523,7 @@ void GfxScreen::bitsRestoreDisplayScreen(Common::Rect rect, byte *&memoryPtr) {
}
for (y = rect.top; y < rect.bottom; y++) {
- memcpy((void*) screen, memoryPtr, width); memoryPtr += width;
+ memcpy((void *) screen, memoryPtr, width); memoryPtr += width;
screen += _displayWidth;
}
}
diff --git a/engines/sci/parser/said.cpp b/engines/sci/parser/said.cpp
index d44109faec..eff4a29f49 100644
--- a/engines/sci/parser/said.cpp
+++ b/engines/sci/parser/said.cpp
@@ -743,7 +743,7 @@ static void node_print_desc(ParseTreeNode* node) {
}
}
#else
-static void node_print_desc(ParseTreeNode*) { }
+static void node_print_desc(ParseTreeNode *) { }
#endif
diff --git a/engines/sci/sound/drivers/amigamac.cpp b/engines/sci/sound/drivers/amigamac.cpp
index 41697d4a07..131a85f371 100644
--- a/engines/sci/sound/drivers/amigamac.cpp
+++ b/engines/sci/sound/drivers/amigamac.cpp
@@ -524,7 +524,7 @@ MidiDriver_AmigaMac::InstrumentSample *MidiDriver_AmigaMac::readInstrumentSCI0(C
instrument->size = seg_size[0];
instrument->loop_size = seg_size[1];
- instrument->loop = (int8*)malloc(instrument->loop_size + 1);
+ instrument->loop = (int8 *)malloc(instrument->loop_size + 1);
memcpy(instrument->loop, instrument->samples + loop_offset, instrument->loop_size);
instrument->samples[instrument->size] = instrument->loop[0];
@@ -708,7 +708,7 @@ void MidiDriver_AmigaMac::generateSamples(int16 *data, int len) {
if (len == 0)
return;
- int16 *buffers = (int16*)malloc(len * 2 * kChannels);
+ int16 *buffers = (int16 *)malloc(len * 2 * kChannels);
memset(buffers, 0, len * 2 * kChannels);
@@ -869,7 +869,7 @@ bool MidiDriver_AmigaMac::loadInstrumentsSCI0Mac(Common::SeekableReadStream &fil
instrument->size = seg_size[0];
instrument->loop_size = seg_size[1] - seg_size[0];
- instrument->loop = (int8*)malloc(instrument->loop_size + 1);
+ instrument->loop = (int8 *)malloc(instrument->loop_size + 1);
memcpy(instrument->loop, instrument->samples + loop_offset, instrument->loop_size);
instrument->samples[instrument->size] = instrument->loop[0];
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 53496428e3..b8722b6963 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -2040,7 +2040,7 @@ void Actor_v0::limbFrameCheck(int limb) {
_limbFrameRepeat[limb] = _limbFrameRepeatNew[limb];
// 0x25C3
- _cost.active[limb] = ((V0CostumeLoader*)_vm->_costumeLoader)->getFrame(this, limb);
+ _cost.active[limb] = ((V0CostumeLoader *)_vm->_costumeLoader)->getFrame(this, limb);
_cost.curpos[limb] = 0;
_needRedraw = true;
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 2bbf3b3801..6e7e9ff688 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -668,7 +668,7 @@ void ClassicCostumeRenderer::procPCEngine(Codec1 &v1) {
(v1.mask_ptr && (mask[0] & maskbit));
if (pcolor && !masked) {
- WRITE_UINT16(dst, ((uint16*)_palette)[pcolor]);
+ WRITE_UINT16(dst, ((uint16 *)_palette)[pcolor]);
}
xPos += xStep;
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 36f06a4889..42f11498d9 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -636,7 +636,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
byte *dst2 = (_textSurfaceMultiplier == 2) ? dst1 + 16 * scl : dst1;
if (_outputPixelFormat.bytesPerPixel == 2) {
for (int b = 0; b < scl; b += 2) {
- *((uint16*)dst1) = *((uint16*)dst2) = color;
+ *((uint16 *)dst1) = *((uint16 *)dst2) = color;
dst1 += 2;
dst2 += 2;
}
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 3e1ad53ed6..b47982af00 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -598,7 +598,7 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
}
if (isDiskImg)
- closeDiskImage((ScummDiskImage*)tmp);
+ closeDiskImage((ScummDiskImage *)tmp);
delete tmp;
}
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index bc6cfc761e..48ccdfd1cf 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1136,7 +1136,7 @@ void ScummEngine::clearTextSurface() {
_townsScreen->fillLayerRect(1, 0, 0, _textSurface.w, _textSurface.h, 0);
#endif
- fill((byte*)_textSurface.pixels, _textSurface.pitch,
+ fill((byte *)_textSurface.pixels, _textSurface.pitch,
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
_game.platform == Common::kPlatformFMTowns ? 0 :
#endif
@@ -2773,7 +2773,7 @@ void GdiNES::drawStripNESMask(byte *dst, int stripnr, int top, int height) const
void readOffsetTable(const byte *ptr, uint16 **table, int *count) {
int pos = 0;
*count = READ_LE_UINT16(ptr) / 2 + 1;
- *table = (uint16*)malloc(*count * sizeof(uint16));
+ *table = (uint16 *)malloc(*count * sizeof(uint16));
for (int i = 0; i < *count; i++) {
(*table)[i] = READ_LE_UINT16(ptr + pos) + pos + 2;
pos += 2;
@@ -2977,10 +2977,10 @@ void GdiPCEngine::decodePCEngineTileData(const byte *ptr) {
if (_distaff) {
free(_PCE.staffTiles);
- _PCE.staffTiles = (byte*)calloc(_PCE.numTiles * 8 * 8, sizeof(byte));
+ _PCE.staffTiles = (byte *)calloc(_PCE.numTiles * 8 * 8, sizeof(byte));
} else {
free(_PCE.roomTiles);
- _PCE.roomTiles = (byte*)calloc(_PCE.numTiles * 8 * 8, sizeof(byte));
+ _PCE.roomTiles = (byte *)calloc(_PCE.numTiles * 8 * 8, sizeof(byte));
}
for (int i = 0; i < _PCE.numTiles; ++i) {
@@ -3023,7 +3023,7 @@ void GdiPCEngine::decodePCEngineMaskData(const byte *ptr) {
readOffsetTable(ptr, &maskOffsets, &_PCE.numMasks);
free(_PCE.masks);
- _PCE.masks = (byte*)malloc(_PCE.numMasks * 8 * sizeof(byte));
+ _PCE.masks = (byte *)malloc(_PCE.numMasks * 8 * sizeof(byte));
for (int i = 0; i < _PCE.numMasks; ++i) {
mask = &_PCE.masks[i * 8];
diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp
index 6a3f50a1af..8bffcab4a0 100644
--- a/engines/scumm/gfx_towns.cpp
+++ b/engines/scumm/gfx_towns.cpp
@@ -39,7 +39,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
int m = _textSurfaceMultiplier;
uint8 *src1 = vs->getPixels(srcX, srcY);
- uint8 *src2 = (uint8*)_textSurface.getBasePtr(srcX * m, (srcY + vs->topline - _screenTop) * m);
+ uint8 *src2 = (uint8 *)_textSurface.getBasePtr(srcX * m, (srcY + vs->topline - _screenTop) * m);
uint8 *dst1 = _townsScreen->getLayerPixels(0, dstX, dstY);
uint8 *dst2 = _townsScreen->getLayerPixels(1, dstX * m, dstY * m);
@@ -52,7 +52,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
for (int h = 0; h < height; ++h) {
if (_outputPixelFormat.bytesPerPixel == 2) {
for (int w = 0; w < width; ++w) {
- *(uint16*)dst1 = _16BitPalette[*src1++];
+ *(uint16 *)dst1 = _16BitPalette[*src1++];
dst1 += _outputPixelFormat.bytesPerPixel;
}
@@ -245,7 +245,7 @@ void TownsScreen::setupLayer(int layer, int width, int height, int numCol, void
l->numCol = numCol;
l->bpp = ((numCol - 1) & 0xff00) ? 2 : 1;
l->pitch = width * l->bpp;
- l->palette = (uint8*)pal;
+ l->palette = (uint8 *)pal;
if (l->palette && _pixelFormat.bytesPerPixel == 1)
warning("TownsScreen::setupLayer(): Layer palette usage requires 16 bit graphics setting.\nLayer palette will be ignored.");
@@ -304,7 +304,7 @@ void TownsScreen::fillLayerRect(int layer, int x, int y, int w, int h, int col)
for (int i = 0; i < h; ++i) {
if (l->bpp == 2) {
for (int ii = 0; ii < w; ++ii) {
- *(uint16*)pos = col;
+ *(uint16 *)pos = col;
pos += 2;
}
pos += (l->pitch - w * 2);
@@ -472,10 +472,10 @@ void TownsScreen::updateOutputBuffer() {
if (col || l->onBottom) {
if (l->numCol == 16)
col = (col >> 4) & (col & 0x0f);
- *(uint16*)dst = l->bltTmpPal[col];
+ *(uint16 *)dst = l->bltTmpPal[col];
}
} else {
- *(uint16*)dst = *(uint16*)src;
+ *(uint16 *)dst = *(uint16 *)src;
}
dst += 2;
}
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 85e2a2f1dd..1007d2a7b0 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -652,7 +652,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
* even addresses, so the use of (void *) in the
* following cast shuts the compiler from warning
* unnecessarily. */
- size = voxStream->readBuffer((int16*)(void *)sound, size * 2);
+ size = voxStream->readBuffer((int16 *)(void *)sound, size * 2);
size *= 2; // 16bits.
delete voxStream;
diff --git a/engines/scumm/player_apple2.h b/engines/scumm/player_apple2.h
index c3e1b7fc60..b4a7d409fb 100644
--- a/engines/scumm/player_apple2.h
+++ b/engines/scumm/player_apple2.h
@@ -209,7 +209,7 @@ public:
}
uint32 readSamples(void *buffer, int numSamples) {
- return _buffer.read((byte*)buffer, numSamples * 2) / 2;
+ return _buffer.read((byte *)buffer, numSamples * 2) / 2;
}
private:
diff --git a/engines/scumm/player_sid.cpp b/engines/scumm/player_sid.cpp
index ecfaef22c1..7a609364e5 100644
--- a/engines/scumm/player_sid.cpp
+++ b/engines/scumm/player_sid.cpp
@@ -1293,7 +1293,7 @@ int Player_SID::readBuffer(int16 *buffer, const int numSamples) {
_cpuCyclesLeft = timingProps[_videoSystem].cyclesPerFrame;
}
// fetch samples
- int sampleCount = _sid->updateClock(_cpuCyclesLeft, (short*)buffer, samplesLeft);
+ int sampleCount = _sid->updateClock(_cpuCyclesLeft, (short *)buffer, samplesLeft);
samplesLeft -= sampleCount;
buffer += sampleCount;
}
diff --git a/engines/scumm/player_v1.cpp b/engines/scumm/player_v1.cpp
index 8afede8c5a..8e784e9866 100644
--- a/engines/scumm/player_v1.cpp
+++ b/engines/scumm/player_v1.cpp
@@ -351,8 +351,8 @@ parse_again:
*_value_ptr_2 = _start_2;
}
debug(6, "chunk 1: %lu: %d step %d for %d, %lu: %d step %d for %d",
- (long)(_value_ptr - (uint*)_channels), _start, _delta, _time_left,
- (long)(_value_ptr_2 - (uint*)_channels), _start_2, _delta_2, _time_left_2);
+ (long)(_value_ptr - (uint *)_channels), _start, _delta, _time_left,
+ (long)(_value_ptr_2 - (uint *)_channels), _start_2, _delta_2, _time_left_2);
break;
case 2:
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index f445a44ded..b2093e9c1a 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -232,7 +232,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
#endif
} else {
sprintf(buf, "Cannot find file: '%s'", filename);
- InfoDialog dialog(this, (char*)buf);
+ InfoDialog dialog(this, (char *)buf);
runDialog(dialog);
error("Cannot find file: '%s'", filename);
}
@@ -350,7 +350,7 @@ void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) {
switch (blocktype) {
case MKTAG('A','N','A','M'): // Used by: The Dig, FT
num = _fileHandle->readUint16LE();
- ptr = (char*)malloc(num * 9);
+ ptr = (char *)malloc(num * 9);
_fileHandle->read(ptr, num * 9);
_imuseDigital->setAudioNames(num, ptr);
break;
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 6e54377199..beac077fd1 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -875,21 +875,21 @@ void ScummEngine::saveOrLoad(Serializer *s) {
// vm.localvar grew from 25 to 40 script entries and then from
// 16 to 32 bit variables (but that wasn't reflect here)... and
// THEN from 16 to 25 variables.
- MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 25, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(8), VER(8)),
- MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 40, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(9), VER(14)),
+ MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 25, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(8), VER(8)),
+ MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 17, 40, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(9), VER(14)),
// We used to save 25 * 40 = 1000 blocks; but actually, each 'row consisted of 26 entry,
// i.e. 26 * 40 = 1040. Thus the last 40 blocks of localvar where not saved at all. To be
// able to load this screwed format, we use a trick: We load 26 * 38 = 988 blocks.
// Then, we mark the followin 12 blocks (24 bytes) as obsolete.
- MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 26, 38, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(15), VER(17)),
+ MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint16, 26, 38, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(15), VER(17)),
MK_OBSOLETE_ARRAY(ScummEngine, vm.localvar[39][0], sleUint16, 12, VER(15), VER(17)),
// This was the first proper multi dimensional version of the localvars, with 32 bit values
- MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint32, 26, 40, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(18), VER(19)),
+ MKARRAY2_OLD(ScummEngine, vm.localvar[0][0], sleUint32, 26, 40, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(18), VER(19)),
// Then we doubled the script slots again, from 40 to 80
- MKARRAY2(ScummEngine, vm.localvar[0][0], sleUint32, 26, NUM_SCRIPT_SLOT, (byte*)vm.localvar[1] - (byte*)vm.localvar[0], VER(20)),
+ MKARRAY2(ScummEngine, vm.localvar[0][0], sleUint32, 26, NUM_SCRIPT_SLOT, (byte *)vm.localvar[1] - (byte *)vm.localvar[0], VER(20)),
MKARRAY(ScummEngine, _resourceMapper[0], sleByte, 128, VER(8)),
@@ -1538,7 +1538,7 @@ void ScummEngine_v5::saveOrLoad(Serializer *s) {
ScummEngine::saveOrLoad(s);
const SaveLoadEntry cursorEntries[] = {
- MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte*)_cursorImages[1] - (byte*)_cursorImages[0], VER(44)),
+ MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte *)_cursorImages[1] - (byte *)_cursorImages[0], VER(44)),
MKARRAY(ScummEngine_v5, _cursorHotspots[0], sleByte, 8, VER(44)),
MKEND()
};
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index 90feee6dc0..d5f7ea526e 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -74,13 +74,13 @@ namespace Scumm {
* what POD means refer to <http://en.wikipedia.org/wiki/Plain_Old_Data_Structures> or
* to <http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=32&rl=1>)
*/
-#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42)
+#define OFFS(type,item) (((ptrdiff_t)(&((type *)42)->type::item))-42)
/**
* Similar to the OFFS macro, this macro computes the size (in bytes) of a
* member of a given struct/class type.
*/
-#define SIZE(type,item) sizeof(((type*)42)->type::item)
+#define SIZE(type,item) sizeof(((type *)42)->type::item)
// Any item that is still in use automatically gets a maxVersion equal to CURRENT_VER
#define MKLINE(type,item,saveas,minVer) {OFFS(type,item),saveas,SIZE(type,item),minVer,CURRENT_VER}
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 8340f62dbc..1de9f08168 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -350,7 +350,7 @@ void ScummEngine_v4::loadIQPoints(byte *ptr, int size) {
file = _saveFileMan->openForLoading(filename);
if (file != NULL) {
- byte *tmp = (byte*)malloc(size);
+ byte *tmp = (byte *)malloc(size);
int nread = file->read(tmp, size);
if (nread == size) {
memcpy(ptr, tmp, size);
@@ -414,7 +414,7 @@ void ScummEngine_v4::o4_saveLoadGame() {
// use name entered by the user
char* ptr;
int firstSlot = (_game.id == GID_LOOM) ? STRINGID_SAVENAME1_LOOM : STRINGID_SAVENAME1;
- ptr = (char*)getStringAddress(slot + firstSlot - 1);
+ ptr = (char *)getStringAddress(slot + firstSlot - 1);
strncpy(name, ptr, sizeof(name));
}
diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp
index c8b92be3c8..f6f376f3c9 100644
--- a/engines/scumm/script_v8.cpp
+++ b/engines/scumm/script_v8.cpp
@@ -1122,7 +1122,7 @@ void ScummEngine_v8::o8_kernelSetFunctions() {
}
case 26: { // saveGameWrite
// FIXME: This doesn't work
- char *address = (char*)getStringAddress(args[2]);
+ char *address = (char *)getStringAddress(args[2]);
debug(0, "o8_kernelSetFunctions: saveGame(%d, %s)", args[1], address);
break;
}
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 61bb89328d..3d254b1ce4 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -112,7 +112,7 @@ void ScummEngine::showMessageDialog(const byte *msg) {
if (_string[3].color == 0)
_string[3].color = 4;
- InfoDialog dialog(this, (char*)buf);
+ InfoDialog dialog(this, (char *)buf);
VAR(VAR_KEYPRESS) = runDialog(dialog);
}
diff --git a/engines/sky/autoroute.cpp b/engines/sky/autoroute.cpp
index 5273b21807..ab791cb066 100644
--- a/engines/sky/autoroute.cpp
+++ b/engines/sky/autoroute.cpp
@@ -242,7 +242,7 @@ uint16 AutoRoute::autoRoute(Compact *cpt) {
clipCoordX(cpt->arTargetX, destX, initDestX);
clipCoordY(cpt->arTargetY, destY, initDestY);
- uint16 *routeDest = (uint16*)_skyCompact->fetchCpt(cpt->animScratchId);
+ uint16 *routeDest = (uint16 *)_skyCompact->fetchCpt(cpt->animScratchId);
memset(routeDest, 0, 64);
if ((startX == destX) && (startY == destY))
return 2;
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index fd81cb9bea..cf9bd55b1a 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -34,7 +34,7 @@ namespace Sky {
#define SKY_CPT_SIZE 419427
-#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->item))-42)
+#define OFFS(type,item) (((ptrdiff_t)(&((type *)42)->item))-42)
#define MK32(type,item) OFFS(type, item),0,0,0
#define MK16(type,item) OFFS(type, item),0
#define MK32_A5(type, item) MK32(type, item[0]), MK32(type, item[1]), \
@@ -147,28 +147,28 @@ SkyCompact::SkyCompact() {
_numDataLists = _cptFile->readUint16LE();
_cptNames = (char***)malloc(_numDataLists * sizeof(char**));
_dataListLen = (uint16 *)malloc(_numDataLists * sizeof(uint16));
- _cptSizes = (uint16 **)malloc(_numDataLists * sizeof(uint16*));
- _cptTypes = (uint16 **)malloc(_numDataLists * sizeof(uint16*));
+ _cptSizes = (uint16 **)malloc(_numDataLists * sizeof(uint16 *));
+ _cptTypes = (uint16 **)malloc(_numDataLists * sizeof(uint16 *));
_compacts = (Compact***)malloc(_numDataLists * sizeof(Compact**));
for (int i = 0; i < _numDataLists; i++) {
_dataListLen[i] = _cptFile->readUint16LE();
- _cptNames[i] = (char**)malloc(_dataListLen[i] * sizeof(char*));
+ _cptNames[i] = (char**)malloc(_dataListLen[i] * sizeof(char *));
_cptSizes[i] = (uint16 *)malloc(_dataListLen[i] * sizeof(uint16));
_cptTypes[i] = (uint16 *)malloc(_dataListLen[i] * sizeof(uint16));
- _compacts[i] = (Compact**)malloc(_dataListLen[i] * sizeof(Compact*));
+ _compacts[i] = (Compact**)malloc(_dataListLen[i] * sizeof(Compact *));
}
uint32 rawSize = _cptFile->readUint32LE() * sizeof(uint16);
- uint16 *rawPos = _rawBuf = (uint16*)malloc(rawSize);
+ uint16 *rawPos = _rawBuf = (uint16 *)malloc(rawSize);
uint32 srcSize = _cptFile->readUint32LE() * sizeof(uint16);
- uint16 *srcBuf = (uint16*)malloc(srcSize);
+ uint16 *srcBuf = (uint16 *)malloc(srcSize);
uint16 *srcPos = srcBuf;
_cptFile->read(srcBuf, srcSize);
uint32 asciiSize = _cptFile->readUint32LE();
- char *asciiPos = _asciiBuf = (char*)malloc(asciiSize);
+ char *asciiPos = _asciiBuf = (char *)malloc(asciiSize);
_cptFile->read(_asciiBuf, asciiSize);
// and fill them with the compact data
@@ -177,7 +177,7 @@ SkyCompact::SkyCompact() {
_cptSizes[lcnt][ecnt] = READ_LE_UINT16(srcPos++);
if (_cptSizes[lcnt][ecnt]) {
_cptTypes[lcnt][ecnt] = READ_LE_UINT16(srcPos++);
- _compacts[lcnt][ecnt] = (Compact*)rawPos;
+ _compacts[lcnt][ecnt] = (Compact *)rawPos;
_cptNames[lcnt][ecnt] = asciiPos;
asciiPos += strlen(asciiPos) + 1;
@@ -193,7 +193,7 @@ SkyCompact::SkyCompact() {
free(srcBuf);
uint16 numDlincs = _cptFile->readUint16LE();
- uint16 *dlincBuf = (uint16*)malloc(numDlincs * 2 * sizeof(uint16));
+ uint16 *dlincBuf = (uint16 *)malloc(numDlincs * 2 * sizeof(uint16));
uint16 *dlincPos = dlincBuf;
_cptFile->read(dlincBuf, numDlincs * 2 * sizeof(uint16));
// these compacts don't actually exist but only point to other ones...
@@ -213,13 +213,13 @@ SkyCompact::SkyCompact() {
// if this is v0.0288, parse this diff data
uint16 numDiffs = _cptFile->readUint16LE();
uint16 diffSize = _cptFile->readUint16LE();
- uint16 *diffBuf = (uint16*)malloc(diffSize * sizeof(uint16));
+ uint16 *diffBuf = (uint16 *)malloc(diffSize * sizeof(uint16));
_cptFile->read(diffBuf, diffSize * sizeof(uint16));
if (SkyEngine::_systemVars.gameVersion == 288) {
uint16 *diffPos = diffBuf;
for (cnt = 0; cnt < numDiffs; cnt++) {
uint16 cptId = READ_LE_UINT16(diffPos++);
- uint16 *rawCpt = (uint16*)fetchCpt(cptId);
+ uint16 *rawCpt = (uint16 *)fetchCpt(cptId);
rawCpt += READ_LE_UINT16(diffPos++);
uint16 len = READ_LE_UINT16(diffPos++);
for (uint16 elemCnt = 0; elemCnt < len; elemCnt++)
@@ -231,7 +231,7 @@ SkyCompact::SkyCompact() {
// these are the IDs that have to be saved into savegame files.
_numSaveIds = _cptFile->readUint16LE();
- _saveIds = (uint16*)malloc(_numSaveIds * sizeof(uint16));
+ _saveIds = (uint16 *)malloc(_numSaveIds * sizeof(uint16));
_cptFile->read(_saveIds, _numSaveIds * sizeof(uint16));
for (cnt = 0; cnt < _numSaveIds; cnt++)
_saveIds[cnt] = FROM_LE_16(_saveIds[cnt]);
@@ -318,7 +318,7 @@ uint16 *SkyCompact::getSub(Compact *cpt, uint16 mode) {
}
uint16 *SkyCompact::getGrafixPtr(Compact *cpt) {
- uint16 *gfxBase = (uint16*)fetchCpt(cpt->grafixProgId);
+ uint16 *gfxBase = (uint16 *)fetchCpt(cpt->grafixProgId);
if (gfxBase == NULL)
return NULL;
@@ -358,7 +358,7 @@ MegaSet *SkyCompact::getMegaSet(Compact *cpt) {
*/
uint16 *SkyCompact::getTurnTable(Compact *cpt, uint16 dir) {
MegaSet *m = getMegaSet(cpt);
- TurnTable *turnTable = (TurnTable*)fetchCpt(m->turnTableId);
+ TurnTable *turnTable = (TurnTable *)fetchCpt(m->turnTableId);
switch (dir) {
case 0:
return turnTable->turnTableUp;
@@ -418,7 +418,7 @@ void *SkyCompact::getCompactElem(Compact *cpt, uint16 off) {
uint8 *SkyCompact::createResetData(uint16 gameVersion) {
_cptFile->seek(_resetDataPos);
uint32 dataSize = _cptFile->readUint16LE() * sizeof(uint16);
- uint16 *resetBuf = (uint16*)malloc(dataSize);
+ uint16 *resetBuf = (uint16 *)malloc(dataSize);
_cptFile->read(resetBuf, dataSize);
uint16 numDiffs = _cptFile->readUint16LE();
for (uint16 cnt = 0; cnt < numDiffs; cnt++) {
@@ -429,7 +429,7 @@ uint8 *SkyCompact::createResetData(uint16 gameVersion) {
uint16 pos = _cptFile->readUint16LE();
resetBuf[pos] = TO_LE_16(_cptFile->readUint16LE());
}
- return (uint8*)resetBuf;
+ return (uint8 *)resetBuf;
} else
_cptFile->seek(diffFields * 2 * sizeof(uint16), SEEK_CUR);
}
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index a40e77d1cb..83dab4ee77 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -1160,7 +1160,7 @@ uint32 Control::prepareSaveData(uint8 *destBuf) {
for (cnt = 0; cnt < _skyCompact->_numSaveIds; cnt++) {
uint16 numElems;
- uint16 *rawCpt = (uint16*)_skyCompact->fetchCptInfo(_skyCompact->_saveIds[cnt], &numElems, NULL, NULL);
+ uint16 *rawCpt = (uint16 *)_skyCompact->fetchCptInfo(_skyCompact->_saveIds[cnt], &numElems, NULL, NULL);
for (uint16 elemCnt = 0; elemCnt < numElems; elemCnt++)
STOSW(destPos, rawCpt[elemCnt]);
}
@@ -1209,9 +1209,9 @@ void Control::importOldCompact(Compact* destCpt, uint8 **srcPos, uint16 numElems
else if (graphType == OG_COMPACT)
destCpt->grafixProgId = target;
else if (graphType == OG_TALKTABLE)
- destCpt->grafixProgId = ((uint16*)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST))[target];
+ destCpt->grafixProgId = ((uint16 *)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST))[target];
else if (graphType == OG_COMPACTELEM)
- destCpt->grafixProgId = *(uint16*)_skyCompact->getCompactElem(destCpt, target);
+ destCpt->grafixProgId = *(uint16 *)_skyCompact->getCompactElem(destCpt, target);
else
error("Illegal GrafixProg type encountered for compact %s", name);
}
@@ -1330,7 +1330,7 @@ uint16 Control::parseSaveData(uint8 *srcBuf) {
LODSD(srcPos, mouseType);
LODSD(srcPos, palette);
- _skyLogic->parseSaveData((uint32*)srcPos);
+ _skyLogic->parseSaveData((uint32 *)srcPos);
srcPos += NUM_SKY_SCRIPTVARS * sizeof(uint32);
for (cnt = 0; cnt < 60; cnt++)
@@ -1339,7 +1339,7 @@ uint16 Control::parseSaveData(uint8 *srcBuf) {
if (saveRev == SAVE_FILE_REVISION) {
for (cnt = 0; cnt < _skyCompact->_numSaveIds; cnt++) {
uint16 numElems;
- uint16 *rawCpt = (uint16*)_skyCompact->fetchCptInfo(_skyCompact->_saveIds[cnt], &numElems, NULL, NULL);
+ uint16 *rawCpt = (uint16 *)_skyCompact->fetchCptInfo(_skyCompact->_saveIds[cnt], &numElems, NULL, NULL);
for (uint16 elemCnt = 0; elemCnt < numElems; elemCnt++)
LODSW(srcPos, rawCpt[elemCnt]);
}
@@ -1348,19 +1348,19 @@ uint16 Control::parseSaveData(uint8 *srcBuf) {
uint16 numElems;
uint16 type;
char name[128];
- uint16 *rawCpt = (uint16*)_skyCompact->fetchCptInfo(_skyCompact->_saveIds[cnt], &numElems, &type, name);
+ uint16 *rawCpt = (uint16 *)_skyCompact->fetchCptInfo(_skyCompact->_saveIds[cnt], &numElems, &type, name);
if (type == COMPACT) {
- importOldCompact((Compact*)rawCpt, &srcPos, numElems, type, name);
+ importOldCompact((Compact *)rawCpt, &srcPos, numElems, type, name);
} else if (type == ROUTEBUF) {
assert(numElems == 32);
for (uint32 elemCnt = 0; elemCnt < numElems; elemCnt++)
LODSW(srcPos, rawCpt[elemCnt]);
}
}
- uint16 *rawCpt = (uint16*)_skyCompact->fetchCpt(0xBF);
+ uint16 *rawCpt = (uint16 *)_skyCompact->fetchCpt(0xBF);
for (cnt = 0; cnt < 3; cnt++)
LODSW(srcPos, rawCpt[cnt]);
- rawCpt = (uint16*)_skyCompact->fetchCpt(0xC2);
+ rawCpt = (uint16 *)_skyCompact->fetchCpt(0xC2);
for (cnt = 0; cnt < 13; cnt++)
LODSW(srcPos, rawCpt[cnt]);
}
@@ -1467,7 +1467,7 @@ void Control::restartGame() {
return; // no restart for floppy demo
uint8 *resetData = _skyCompact->createResetData((uint16)SkyEngine::_systemVars.gameVersion);
- parseSaveData((uint8*)resetData);
+ parseSaveData((uint8 *)resetData);
free(resetData);
_skyScreen->forceRefresh();
diff --git a/engines/sky/control.h b/engines/sky/control.h
index 42ada564df..280f7e19cd 100644
--- a/engines/sky/control.h
+++ b/engines/sky/control.h
@@ -136,7 +136,7 @@ class ConResource {
public:
ConResource(void *pSpData, uint32 pNSprites, uint32 pCurSprite, uint16 pX, uint16 pY, uint32 pText, uint8 pOnClick, OSystem *system, uint8 *screen);
virtual ~ConResource() {}
- void setSprite(void *pSpData) { _spriteData = (DataFileHeader*)pSpData; }
+ void setSprite(void *pSpData) { _spriteData = (DataFileHeader *)pSpData; }
void setText(uint32 pText) { if (pText) _text = pText + 0x7000; else _text = 0; }
void setXY(uint16 x, uint16 y) { _x = x; _y = y; }
bool isMouseOver(uint32 mouseX, uint32 mouseY);
diff --git a/engines/sky/disk.cpp b/engines/sky/disk.cpp
index 99b707dcf1..e97aeb01a2 100644
--- a/engines/sky/disk.cpp
+++ b/engines/sky/disk.cpp
@@ -117,7 +117,7 @@ uint8 *Disk::loadFile(uint16 fileNr) {
cflag = (uint8)((fileFlags >> 23) & 0x1);
//if cflag == 0 then file is compressed, 1 == uncompressed
- DataFileHeader *fileHeader = (DataFileHeader*)fileDest;
+ DataFileHeader *fileHeader = (DataFileHeader *)fileDest;
if ((!cflag) && ((FROM_LE_16(fileHeader->flag) >> 7) & 1)) {
debug(4, "File is RNC compressed.");
@@ -175,7 +175,7 @@ uint8 *Disk::loadFile(uint16 fileNr) {
}
uint16 *Disk::loadScriptFile(uint16 fileNr) {
- uint16 *buf = (uint16*)loadFile(fileNr);
+ uint16 *buf = (uint16 *)loadFile(fileNr);
#ifdef SCUMM_BIG_ENDIAN
for (uint i = 0; i < _lastLoadedFileSize / 2; i++)
buf[i] = FROM_LE_16(buf[i]);
diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp
index f1ea4d2df2..2f75a19b69 100644
--- a/engines/sky/intro.cpp
+++ b/engines/sky/intro.cpp
@@ -633,8 +633,8 @@ Intro::Intro(Disk *disk, Screen *screen, MusicBase *music, Sound *sound, Text *t
_skyText = text;
_mixer = mixer;
_system = system;
- _textBuf = (uint8*)malloc(10000);
- _saveBuf = (uint8*)malloc(10000);
+ _textBuf = (uint8 *)malloc(10000);
+ _saveBuf = (uint8 *)malloc(10000);
_bgBuf = NULL;
_relDelay = 0;
}
@@ -774,7 +774,7 @@ bool Intro::nextPart(uint16 *&data) {
}
bool Intro::floppyScrollFlirt() {
- uint8 *scrollScreen = (uint8*)malloc(FRAME_SIZE * 2);
+ uint8 *scrollScreen = (uint8 *)malloc(FRAME_SIZE * 2);
memset(scrollScreen, 0, FRAME_SIZE);
memcpy(scrollScreen + FRAME_SIZE, _skyScreen->giveCurrent(), FRAME_SIZE);
uint8 *scrollPos = scrollScreen + FRAME_SIZE;
@@ -828,8 +828,8 @@ bool Intro::commandFlirt(uint16 *&data) {
_skyText->displayText(*data++, _textBuf, true, INTRO_TEXT_WIDTH, 255);
break;
case IC_SHOW_TEXT:
- ((DataFileHeader*)_textBuf)->s_x = *data++;
- ((DataFileHeader*)_textBuf)->s_y = *data++;
+ ((DataFileHeader *)_textBuf)->s_x = *data++;
+ ((DataFileHeader *)_textBuf)->s_y = *data++;
showTextBuf();
break;
case IC_REMOVE_TEXT:
@@ -858,10 +858,10 @@ bool Intro::commandFlirt(uint16 *&data) {
}
void Intro::showTextBuf() {
- uint16 x = ((DataFileHeader*)_textBuf)->s_x;
- uint16 y = ((DataFileHeader*)_textBuf)->s_y;
- uint16 width = ((DataFileHeader*)_textBuf)->s_width;
- uint16 height = ((DataFileHeader*)_textBuf)->s_height;
+ uint16 x = ((DataFileHeader *)_textBuf)->s_x;
+ uint16 y = ((DataFileHeader *)_textBuf)->s_y;
+ uint16 width = ((DataFileHeader *)_textBuf)->s_width;
+ uint16 height = ((DataFileHeader *)_textBuf)->s_height;
uint8 *screenBuf = _skyScreen->giveCurrent() + y * GAME_SCREEN_WIDTH + x;
memcpy(_saveBuf, _textBuf, sizeof(DataFileHeader));
uint8 *saveBuf = _saveBuf + sizeof(DataFileHeader);
@@ -880,10 +880,10 @@ void Intro::showTextBuf() {
}
void Intro::restoreScreen() {
- uint16 x = ((DataFileHeader*)_saveBuf)->s_x;
- uint16 y = ((DataFileHeader*)_saveBuf)->s_y;
- uint16 width = ((DataFileHeader*)_saveBuf)->s_width;
- uint16 height = ((DataFileHeader*)_saveBuf)->s_height;
+ uint16 x = ((DataFileHeader *)_saveBuf)->s_x;
+ uint16 y = ((DataFileHeader *)_saveBuf)->s_y;
+ uint16 width = ((DataFileHeader *)_saveBuf)->s_width;
+ uint16 height = ((DataFileHeader *)_saveBuf)->s_height;
uint8 *screenBuf = _skyScreen->giveCurrent() + y * GAME_SCREEN_WIDTH + x;
uint8 *saveBuf = _saveBuf + sizeof(DataFileHeader);
for (uint16 cnt = 0; cnt < height; cnt++) {
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index 18fb4f7e82..e92e768272 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -382,8 +382,8 @@ void Logic::mainAnim() {
}
};
- uint16 animId = *(uint16*)_skyCompact->getCompactElem(_compact, C_ANIM_UP + _compact->megaSet + dir * 4);
- uint16 *animList = (uint16*)_skyCompact->fetchCpt(animId);
+ uint16 animId = *(uint16 *)_skyCompact->getCompactElem(_compact, C_ANIM_UP + _compact->megaSet + dir * 4);
+ uint16 *animList = (uint16 *)_skyCompact->fetchCpt(animId);
uint16 arAnimIndex = _compact->arAnimIndex;
if (!animList[arAnimIndex / 2]) {
@@ -400,7 +400,7 @@ void Logic::mainAnim() {
}
void Logic::arTurn() {
- uint16 *turnData = (uint16*)_skyCompact->fetchCpt(_compact->turnProgId) + _compact->turnProgPos;
+ uint16 *turnData = (uint16 *)_skyCompact->fetchCpt(_compact->turnProgId) + _compact->turnProgPos;
_compact->frame = *turnData++;
_compact->turnProgPos++;
@@ -453,7 +453,7 @@ void Logic::anim() {
}
void Logic::turn() {
- uint16 *turnData = (uint16*)_skyCompact->fetchCpt(_compact->turnProgId) + _compact->turnProgPos;
+ uint16 *turnData = (uint16 *)_skyCompact->fetchCpt(_compact->turnProgId) + _compact->turnProgPos;
if (*turnData) {
_compact->frame = *turnData;
_compact->turnProgPos++;
@@ -1425,12 +1425,12 @@ uint16 Logic::script(uint16 scriptNo, uint16 offset) {
bool Logic::fnCacheChip(uint32 a, uint32 b, uint32 c) {
_skySound->fnStopFx();
- _skyDisk->fnCacheChip((uint16*)_skyCompact->fetchCpt((uint16)a));
+ _skyDisk->fnCacheChip((uint16 *)_skyCompact->fetchCpt((uint16)a));
return true;
}
bool Logic::fnCacheFast(uint32 a, uint32 b, uint32 c) {
- _skyDisk->fnCacheFast((uint16*)_skyCompact->fetchCpt((uint16)a));
+ _skyDisk->fnCacheFast((uint16 *)_skyCompact->fetchCpt((uint16)a));
return true;
}
@@ -1577,7 +1577,7 @@ bool Logic::fnGetTo(uint32 targetPlaceId, uint32 mode, uint32 c) {
warning("can't find _compact's getToTable. Place compact is NULL");
return false;
}
- uint16 *getToTable = (uint16*)_skyCompact->fetchCpt(cpt->getToTableId);
+ uint16 *getToTable = (uint16 *)_skyCompact->fetchCpt(cpt->getToTableId);
if (!getToTable) {
warning("Place compact's getToTable is NULL");
return false;
@@ -1596,7 +1596,7 @@ bool Logic::fnGetTo(uint32 targetPlaceId, uint32 mode, uint32 c) {
bool Logic::fnSetToStand(uint32 a, uint32 b, uint32 c) {
_compact->mood = 1; // high level stood still
- _compact->grafixProgId = *(uint16*)_skyCompact->getCompactElem(_compact, C_STAND_UP + _compact->megaSet + _compact->dir * 4);
+ _compact->grafixProgId = *(uint16 *)_skyCompact->getCompactElem(_compact, C_STAND_UP + _compact->megaSet + _compact->dir * 4);
_compact->grafixProgPos = 0;
uint16 *standList = _skyCompact->getGrafixPtr(_compact);
@@ -2158,8 +2158,8 @@ bool Logic::fnSetMegaSet(uint32 mega, uint32 setNo, uint32 c) {
bool Logic::fnMoveItems(uint32 listNo, uint32 screenNo, uint32 c) {
// Move a list of id's to another screen
- uint16 *p = (uint16*)_skyCompact->fetchCpt(CPT_MOVE_LIST);
- p = (uint16*)_skyCompact->fetchCpt(p[listNo]);
+ uint16 *p = (uint16 *)_skyCompact->fetchCpt(CPT_MOVE_LIST);
+ p = (uint16 *)_skyCompact->fetchCpt(p[listNo]);
for (int i = 0; i < 2; i++) {
if (!*p)
return true;
@@ -2528,7 +2528,7 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
animNum += target->megaSet / NEXT_MEGA_SET;
animNum &= 0xFF;
- uint16 *talkTable = (uint16*)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST);
+ uint16 *talkTable = (uint16 *)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST);
target->grafixProgId = talkTable[animNum];
target->grafixProgPos = 0;
uint16 *animPtr = _skyCompact->getGrafixPtr(target);
diff --git a/engines/sky/mouse.cpp b/engines/sky/mouse.cpp
index 98f942889e..74a92c8f00 100644
--- a/engines/sky/mouse.cpp
+++ b/engines/sky/mouse.cpp
@@ -319,7 +319,7 @@ void Mouse::fnOpenCloseHand(bool open) {
if (open)
cursor++;
- uint32 size = ((DataFileHeader*)_objectMouseData)->s_sp_size;
+ uint32 size = ((DataFileHeader *)_objectMouseData)->s_sp_size;
uint8 *srcData;
uint8 *destData;
diff --git a/engines/sky/music/adlibchannel.cpp b/engines/sky/music/adlibchannel.cpp
index 896b58aa22..99509554c7 100644
--- a/engines/sky/music/adlibchannel.cpp
+++ b/engines/sky/music/adlibchannel.cpp
@@ -49,32 +49,32 @@ AdLibChannel::AdLibChannel(FM_OPL *opl, uint8 *pMusicData, uint16 startOfData) {
if (SkyEngine::_systemVars.gameVersion == 109) {
//instrumentDataLoc = (_musicData[0x11D0] << 8) | _musicData[0x11CF];
- //_frequenceTable = (uint16*)(_musicData + 0x835);
+ //_frequenceTable = (uint16 *)(_musicData + 0x835);
//_registerTable = _musicData + 0xE35;
//_opOutputTable = _musicData + 0xE47;
//_adlibRegMirror = _musicData + 0xF4A;
instrumentDataLoc = READ_LE_UINT16(_musicData + 0x1204);
- _frequenceTable = (uint16*)(_musicData + 0x868);
+ _frequenceTable = (uint16 *)(_musicData + 0x868);
_registerTable = _musicData + 0xE68;
_opOutputTable = _musicData + 0xE7A;
_adlibRegMirror = _musicData + 0xF7D;
} else if (SkyEngine::_systemVars.gameVersion == 267) {
instrumentDataLoc = READ_LE_UINT16(_musicData + 0x11FB);
- _frequenceTable = (uint16*)(_musicData + 0x7F4);
+ _frequenceTable = (uint16 *)(_musicData + 0x7F4);
_registerTable = _musicData + 0xDF4;
_opOutputTable = _musicData + 0xE06;
_adlibRegMirror = _musicData + 0xF55;
} else {
instrumentDataLoc = READ_LE_UINT16(_musicData + 0x1205);
- _frequenceTable = (uint16*)(_musicData + 0x7FE);
+ _frequenceTable = (uint16 *)(_musicData + 0x7FE);
_registerTable = _musicData + 0xDFE;
_opOutputTable = _musicData + 0xE10;
_adlibRegMirror = _musicData + 0xF5F;
}
_instrumentMap = _musicData+instrumentDataLoc;
- _instruments = (InstrumentStruct*)(_instrumentMap+0x80);
+ _instruments = (InstrumentStruct *)(_instrumentMap+0x80);
}
AdLibChannel::~AdLibChannel() {
diff --git a/engines/sky/music/gmmusic.cpp b/engines/sky/music/gmmusic.cpp
index 85240ea82e..84f6a654d0 100644
--- a/engines/sky/music/gmmusic.cpp
+++ b/engines/sky/music/gmmusic.cpp
@@ -31,7 +31,7 @@
namespace Sky {
void GmMusic::passTimerFunc(void *param) {
- ((GmMusic*)param)->timerCall();
+ ((GmMusic *)param)->timerCall();
}
GmMusic::GmMusic(MidiDriver *pMidiDrv, Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pMixer, pDisk) {
diff --git a/engines/sky/music/mt32music.cpp b/engines/sky/music/mt32music.cpp
index 18ebf123ff..a3fdd42713 100644
--- a/engines/sky/music/mt32music.cpp
+++ b/engines/sky/music/mt32music.cpp
@@ -31,7 +31,7 @@
namespace Sky {
void MT32Music::passTimerFunc(void *param) {
- ((MT32Music*)param)->timerCall();
+ ((MT32Music *)param)->timerCall();
}
MT32Music::MT32Music(MidiDriver *pMidiDrv, Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pMixer, pDisk) {
diff --git a/engines/sky/text.cpp b/engines/sky/text.cpp
index 3e119b3b20..38a01116fe 100644
--- a/engines/sky/text.cpp
+++ b/engines/sky/text.cpp
@@ -136,7 +136,7 @@ void Text::getText(uint32 textNr) { //load text #"textNr" into textBuffer
textNr &= 0x1F;
if (blockNr) {
- uint16 *blockPtr = (uint16*)(textDataPtr + 4);
+ uint16 *blockPtr = (uint16 *)(textDataPtr + 4);
uint32 nr32MsgBlocks = blockNr >> 5;
do {
@@ -298,7 +298,7 @@ DisplayedText Text::displayText(char *textPtr, uint8 *dest, bool center, uint16
uint32 numBytes = (dtLineSize * numLines) + sizeof(DataFileHeader) + 4;
if (!dest)
- dest = (uint8*)malloc(numBytes);
+ dest = (uint8 *)malloc(numBytes);
// clear text sprite buffer
memset(dest + sizeof(DataFileHeader), 0, numBytes - sizeof(DataFileHeader));
diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp
index 1bb08fd36f..40a4021a5c 100644
--- a/engines/sword2/music.cpp
+++ b/engines/sword2/music.cpp
@@ -115,7 +115,7 @@ static Audio::AudioStream *getAudioStream(SoundFileHandle *fh, const char *base,
fh->idxLen = fh->file.readUint32LE();
fh->file.seek(entrySize * 4);
- fh->idxTab = (uint32*)malloc(fh->idxLen * 3 * sizeof(uint32));
+ fh->idxTab = (uint32 *)malloc(fh->idxLen * 3 * sizeof(uint32));
for (uint32 cnt = 0; cnt < fh->idxLen; cnt++) {
fh->idxTab[cnt * 3 + 0] = fh->file.readUint32LE();
fh->idxTab[cnt * 3 + 1] = fh->file.readUint32LE();
diff --git a/engines/sword25/util/lua/luaconf.h b/engines/sword25/util/lua/luaconf.h
index f5affe9fd7..38ff9e1320 100644
--- a/engines/sword25/util/lua/luaconf.h
+++ b/engines/sword25/util/lua/luaconf.h
@@ -643,7 +643,7 @@ union luai_Cast { double l_d; long l_l; };
** CHANGE it if you have a way to implement it in your system.
*/
#define lua_popen(L,c,m) ((void)((void)c, m), \
- luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0)
+ luaL_error(L, LUA_QL("popen") " not supported"), (FILE *)0)
#define lua_pclose(L,file) ((void)((void)L, file), 0)
/*
diff --git a/engines/sword25/util/pluto/pluto.cpp b/engines/sword25/util/pluto/pluto.cpp
index 957f5af795..d645e5ed2a 100644
--- a/engines/sword25/util/pluto/pluto.cpp
+++ b/engines/sword25/util/pluto/pluto.cpp
@@ -159,7 +159,7 @@ static int persistspecialobject(PersistInfo *pi, int defaction)
lua_pushvalue(pi->L, -3);
/* perms reftbl ... obj mt __persist obj */
#ifdef PLUTO_PASS_USERDATA_TO_PERSIST
- lua_pushlightuserdata(pi->L, (void*)pi->writer);
+ lua_pushlightuserdata(pi->L, (void *)pi->writer);
lua_pushlightuserdata(pi->L, pi->ud);
/* perms reftbl ... obj mt __persist obj ud */
lua_call(pi->L, 3, 1);
@@ -663,7 +663,7 @@ static void persist(PersistInfo *pi)
}
lua_pushvalue(pi->L, -1);
/* perms reftbl ... obj obj */
- lua_pushlightuserdata(pi->L, (void*)(++(pi->counter)));
+ lua_pushlightuserdata(pi->L, (void *)(++(pi->counter)));
/* perms reftbl ... obj obj ref */
lua_rawset(pi->L, 2);
/* perms reftbl ... obj */
@@ -854,7 +854,7 @@ static void registerobject(int ref, UnpersistInfo *upi)
{
/* perms reftbl ... obj */
lua_checkstack(upi->L, 2);
- lua_pushlightuserdata(upi->L, (void*)ref);
+ lua_pushlightuserdata(upi->L, (void *)ref);
/* perms reftbl ... obj ref */
lua_pushvalue(upi->L, -2);
/* perms reftbl ... obj ref obj */
@@ -989,7 +989,7 @@ static void unpersisttable(int ref, UnpersistInfo *upi)
static UpVal *makeupval(lua_State *L, int stackpos)
{
UpVal *uv = pdep_new(L, UpVal);
- pdep_link(L, (GCObject*)uv, LUA_TUPVAL);
+ pdep_link(L, (GCObject *)uv, LUA_TUPVAL);
uv->tt = LUA_TUPVAL;
uv->v = &uv->u.value;
uv->u.l.prev = NULL;
@@ -1025,8 +1025,8 @@ static Proto *makefakeproto(lua_State *L, lu_byte nups)
static void boxupval_start(lua_State *L)
{
LClosure *lcl;
- lcl = (LClosure*)pdep_newLclosure(L, 1, hvalue(&L->l_gt));
- pushclosure(L, (Closure*)lcl);
+ lcl = (LClosure *)pdep_newLclosure(L, 1, hvalue(&L->l_gt));
+ pushclosure(L, (Closure *)lcl);
/* ... func */
lcl->p = makefakeproto(L, 1);
@@ -1053,7 +1053,7 @@ static void unboxupval(lua_State *L)
LClosure *lcl;
UpVal *uv;
- lcl = (LClosure*)clvalue(getobject(L, -1));
+ lcl = (LClosure *)clvalue(getobject(L, -1));
uv = lcl->upvals[0];
lua_pop(L, 1);
/* ... */
@@ -1071,8 +1071,8 @@ static void unpersistfunction(int ref, UnpersistInfo *upi)
verify(LIF(Z,read)(&upi->zio, &nupvalues, sizeof(lu_byte)) == 0);
- lcl = (LClosure*)pdep_newLclosure(upi->L, nupvalues, hvalue(&upi->L->l_gt));
- pushclosure(upi->L, (Closure*)lcl);
+ lcl = (LClosure *)pdep_newLclosure(upi->L, nupvalues, hvalue(&upi->L->l_gt));
+ pushclosure(upi->L, (Closure *)lcl);
/* perms reftbl ... func */
/* Put *some* proto in the closure, before the GC can find it */
@@ -1393,9 +1393,9 @@ static void unpersistthread(int ref, UnpersistInfo *upi)
verify(LIF(Z,read)(&upi->zio, &stackpos, sizeof(size_t)) == 0);
uv->v = L2->stack + stackpos;
- gcunlink(upi->L, (GCObject*)uv);
+ gcunlink(upi->L, (GCObject *)uv);
uv->marked = luaC_white(g);
- *nextslot = (GCObject*)uv;
+ *nextslot = (GCObject *)uv;
nextslot = &uv->next;
uv->u.l.prev = &G(L2)->uvhead;
uv->u.l.next = G(L2)->uvhead.u.l.next;
@@ -1482,7 +1482,7 @@ static int inreftable(lua_State *L, int ref)
int res;
lua_checkstack(L, 1);
/* perms reftbl ... */
- lua_pushlightuserdata(L, (void*)ref);
+ lua_pushlightuserdata(L, (void *)ref);
/* perms reftbl ... ref */
lua_gettable(L, 2);
/* perms reftbl ... obj? */
@@ -1571,7 +1571,7 @@ static void unpersist(UnpersistInfo *upi)
lua_pushnil(upi->L);
/* perms reftbl ... nil */
} else {
- lua_pushlightuserdata(upi->L, (void*)ref);
+ lua_pushlightuserdata(upi->L, (void *)ref);
/* perms reftbl ... ref */
lua_gettable(upi->L, 2);
/* perms reftbl ... obj? */
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index 545310185c..4f3cc36994 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -67,7 +67,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
// Calculate needed index numbers, align width and height not next multiple of four
imageWidth = (imageWidth % 4) ? ((imageWidth / 4) + 1) * 4 : imageWidth;
imageHeight = (imageHeight % 4) ? ((imageHeight / 4) + 1) * 4 : imageHeight;
- destinationBuffer = (uint8*)malloc((imageWidth * imageHeight) / 8);
+ destinationBuffer = (uint8 *)malloc((imageWidth * imageHeight) / 8);
dstIdx = destinationBuffer;
remainingBlocks = (imageWidth * imageHeight) / 16;
diff --git a/engines/tinsel/heapmem.cpp b/engines/tinsel/heapmem.cpp
index 026dc9457e..819493bda1 100644
--- a/engines/tinsel/heapmem.cpp
+++ b/engines/tinsel/heapmem.cpp
@@ -234,8 +234,8 @@ static MEM_NODE *MemoryAlloc(long size) {
MEM_NODE *pHeap = &heapSentinel;
#ifdef SCUMM_NEED_ALIGNMENT
- const int alignPadding = sizeof(void*) - 1;
- size = (size + alignPadding) & ~alignPadding; //round up to nearest multiple of sizeof(void*), this ensures the addresses that are returned are alignment-safe.
+ const int alignPadding = sizeof(void *) - 1;
+ size = (size + alignPadding) & ~alignPadding; //round up to nearest multiple of sizeof(void *), this ensures the addresses that are returned are alignment-safe.
#endif
// compact the heap to make up room for 'size' bytes, if necessary
@@ -310,8 +310,8 @@ MEM_NODE *MemoryNoAlloc() {
MEM_NODE *MemoryAllocFixed(long size) {
#ifdef SCUMM_NEED_ALIGNMENT
- const int alignPadding = sizeof(void*) - 1;
- size = (size + alignPadding) & ~alignPadding; //round up to nearest multiple of sizeof(void*), this ensures the addresses that are returned are alignment-safe.
+ const int alignPadding = sizeof(void *) - 1;
+ size = (size + alignPadding) & ~alignPadding; //round up to nearest multiple of sizeof(void *), this ensures the addresses that are returned are alignment-safe.
#endif
// Search for a free entry in s_fixedMnodesList
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index 7e7349802d..172ec0a565 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -406,7 +406,7 @@ void MenuSystem::clickItem(ItemID id) {
}
void MenuSystem::restoreRect(int x, int y, int w, int h) {
- byte *src = (byte*)_background->getBasePtr(x, y);
+ byte *src = (byte *)_background->getBasePtr(x, y);
byte *dst = _vm->_screen->_frontScreen + x + y * 640;
while (h--) {
memcpy(dst, src, w);
@@ -416,7 +416,7 @@ void MenuSystem::restoreRect(int x, int y, int w, int h) {
}
void MenuSystem::shadeRect(int x, int y, int w, int h, byte color1, byte color2) {
- byte *src = (byte*)_background->getBasePtr(x, y);
+ byte *src = (byte *)_background->getBasePtr(x, y);
for (int xc = 0; xc < w; xc++) {
src[xc] = color2;
src[xc + h * 640] = color1;
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 28021950a7..76d42ebf0a 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -215,7 +215,7 @@ void MoviePlayer::fetchAudioChunks() {
byte chunkType = _vm->_arc->readByte();
uint32 chunkSize = _vm->_arc->readUint32LE();
if (chunkType == 4) {
- byte *chunkBuffer = (byte*)malloc(chunkSize);
+ byte *chunkBuffer = (byte *)malloc(chunkSize);
_vm->_arc->read(chunkBuffer, chunkSize);
_audioStream->queueBuffer(chunkBuffer, chunkSize, DisposeAfterUse::YES, Audio::FLAG_UNSIGNED);
chunkBuffer = NULL;
diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp
index d66ed18d8c..b781490b69 100644
--- a/engines/toltecs/screen.cpp
+++ b/engines/toltecs/screen.cpp
@@ -658,7 +658,7 @@ void Screen::drawSurface(int16 x, int16 y, Graphics::Surface *surface) {
int16 skipX = 0;
int16 width = surface->w;
int16 height = surface->h;
- byte *surfacePixels = (byte*)surface->getBasePtr(0, 0);
+ byte *surfacePixels = (byte *)surface->getBasePtr(0, 0);
byte *frontScreen;
// Not on screen, skip
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 107f4ea11e..9683831980 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -786,7 +786,7 @@ void ScriptInterpreter::sfGetRandomNumber() {
}
void ScriptInterpreter::sfDrawGuiTextMulti() {
- _vm->_screen->drawGuiTextMulti((byte*)localPtr(arg16(3)));
+ _vm->_screen->drawGuiTextMulti((byte *)localPtr(arg16(3)));
}
void ScriptInterpreter::sfUpdateVerbLine() {
@@ -907,11 +907,11 @@ void ScriptInterpreter::sfDrawGuiImage() {
}
void ScriptInterpreter::sfAddAnimatedSpriteNoLoop() {
- _vm->_screen->addAnimatedSprite(arg16(5), arg16(3), arg16(7), (byte*)localPtr(0), (int16*)localPtr(arg16(9)), false, 2);
+ _vm->_screen->addAnimatedSprite(arg16(5), arg16(3), arg16(7), (byte *)localPtr(0), (int16 *)localPtr(arg16(9)), false, 2);
}
void ScriptInterpreter::sfAddAnimatedSprite() {
- _vm->_screen->addAnimatedSprite(arg16(5), arg16(3), arg16(7), (byte*)localPtr(0), (int16*)localPtr(arg16(9)), true, 2);
+ _vm->_screen->addAnimatedSprite(arg16(5), arg16(3), arg16(7), (byte *)localPtr(0), (int16 *)localPtr(arg16(9)), true, 2);
}
void ScriptInterpreter::sfAddStaticSprite() {
@@ -919,11 +919,11 @@ void ScriptInterpreter::sfAddStaticSprite() {
}
void ScriptInterpreter::sfAddAnimatedSpriteScaled() {
- _vm->_screen->addAnimatedSprite(arg16(5), arg16(3), arg16(7), (byte*)localPtr(0), (int16*)localPtr(arg16(9)), true, 1);
+ _vm->_screen->addAnimatedSprite(arg16(5), arg16(3), arg16(7), (byte *)localPtr(0), (int16 *)localPtr(arg16(9)), true, 1);
}
void ScriptInterpreter::sfFindPath() {
- _vm->_segmap->findPath((int16*)(getSlotData(arg16(13)) + arg16(11)), arg16(9), arg16(7), arg16(5), arg16(3));
+ _vm->_segmap->findPath((int16 *)(getSlotData(arg16(13)) + arg16(11)), arg16(9), arg16(7), arg16(5), arg16(3));
}
void ScriptInterpreter::sfWalk() {
diff --git a/engines/toltecs/segmap.cpp b/engines/toltecs/segmap.cpp
index 10e5f56096..f7d806c67b 100644
--- a/engines/toltecs/segmap.cpp
+++ b/engines/toltecs/segmap.cpp
@@ -269,7 +269,7 @@ struct LineData {
};
void plotProc(int x, int y, int color, void *data) {
- LineData *ld = (LineData*)data;
+ LineData *ld = (LineData *)data;
ld->surf[x + y * ld->pitch] = color;
}
@@ -373,7 +373,7 @@ void SegmentMap::loadSegmapMaskRectSurface(byte *maskData, SegmapMaskRect &maskR
maskRect.surface->create(maskRect.width, maskRect.height, Graphics::PixelFormat::createFormatCLUT8());
byte *backScreen = _vm->_screen->_backScreen + maskRect.x + (maskRect.y * _vm->_sceneWidth);
- byte *dest = (byte*)maskRect.surface->getBasePtr(0, 0);
+ byte *dest = (byte *)maskRect.surface->getBasePtr(0, 0);
for (int16 h = 0; h < maskRect.height; h++) {
int16 w = maskRect.width;
diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp
index b9adfa7eeb..77822ab078 100644
--- a/engines/toon/audio.cpp
+++ b/engines/toon/audio.cpp
@@ -514,7 +514,7 @@ Common::SeekableReadStream *AudioStreamPackage::getStream(int32 id, bool ownMemo
int32 size = 0;
getInfo(id, &offset, &size);
if (ownMemory) {
- byte *memory = (byte*)malloc(size);
+ byte *memory = (byte *)malloc(size);
_file->seek(offset);
_file->read(memory, size);
return new Common::MemoryReadStream(memory, size, DisposeAfterUse::YES);
diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp
index 715bd33433..0e5189957b 100644
--- a/engines/toon/character.cpp
+++ b/engines/toon/character.cpp
@@ -997,7 +997,7 @@ bool Character::loadShadowAnimation(const Common::String &animName) {
void Character::plotPath(Graphics::Surface& surface) {
for (int i = 0; i < _currentPathNodeCount; i++) {
- *(byte*)surface.getBasePtr(_currentPathX[i], _currentPathY[i]) = ( i < _currentPathNode);
+ *(byte *)surface.getBasePtr(_currentPathX[i], _currentPathY[i]) = ( i < _currentPathNode);
}
}
diff --git a/engines/toon/script_func.h b/engines/toon/script_func.h
index ef1cb59f47..e22c4b34fa 100644
--- a/engines/toon/script_func.h
+++ b/engines/toon/script_func.h
@@ -39,7 +39,7 @@ public:
Common::Array<const OpcodeV2 *> _opcodes;
ToonEngine *_vm;
-#define SYSFUNC(x) int32 x(EMCState*)
+#define SYSFUNC(x) int32 x(EMCState *)
SYSFUNC(sys_Cmd_Dummy);
SYSFUNC(sys_Cmd_Change_Actor_X_And_Y);
SYSFUNC(sys_Cmd_Init_Talking_Character);
diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h
index fe64f9774d..06d32b1f21 100644
--- a/graphics/VectorRendererSpec.h
+++ b/graphics/VectorRendererSpec.h
@@ -103,7 +103,7 @@ protected:
* @param alpha Alpha intensity of the pixel (0-255)
*/
inline void blendPixel(int x, int y, PixelType color, uint8 alpha) {
- blendPixelPtr((PixelType*)Base::_activeSurface->getBasePtr(x, y), color, alpha);
+ blendPixelPtr((PixelType *)Base::_activeSurface->getBasePtr(x, y), color, alpha);
}
/**
diff --git a/graphics/iff.cpp b/graphics/iff.cpp
index 4bb971f299..7434a6bebc 100644
--- a/graphics/iff.cpp
+++ b/graphics/iff.cpp
@@ -206,7 +206,7 @@ struct PBMLoader {
case ID_BODY:
if (_surface) {
_surface->create(_decoder._header.width, _decoder._header.height, PixelFormat::createFormatCLUT8());
- _decoder.loadBitmap((byte*)_surface->pixels, chunk._stream);
+ _decoder.loadBitmap((byte *)_surface->pixels, chunk._stream);
}
return true; // stop the parser
}
@@ -234,7 +234,7 @@ bool PackBitsReadStream::eos() const {
}
uint32 PackBitsReadStream::read(void *dataPtr, uint32 dataSize) {
- byte *out = (byte*)dataPtr;
+ byte *out = (byte *)dataPtr;
uint32 left = dataSize;
uint32 lenR = 0, lenW = 0;
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp
index eb595a750e..9552f095fa 100644
--- a/graphics/imagedec.cpp
+++ b/graphics/imagedec.cpp
@@ -117,7 +117,7 @@ Surface *BMPDecoder::decodeImage(Common::SeekableReadStream &stream, const Pixel
assert(newSurf);
newSurf->create(info.width, info.height, format);
assert(newSurf->pixels);
- OverlayColor *curPixel = (OverlayColor*)newSurf->pixels + (newSurf->h-1) * newSurf->w;
+ OverlayColor *curPixel = (OverlayColor *)newSurf->pixels + (newSurf->h-1) * newSurf->w;
int pitchAdd = info.width % 4;
for (int i = 0; i < newSurf->h; ++i) {
for (int i2 = 0; i2 < newSurf->w; ++i2) {
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);
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index c737b81b33..e689838ce7 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -1084,7 +1084,7 @@ void LauncherDialog::updateButtons() {
void LauncherDialog::reflowLayout() {
#ifndef DISABLE_FANCY_THEMES
if (g_gui.xmlEval()->getVar("Globals.ShowLauncherLogo") == 1 && g_gui.theme()->supportsImages()) {
- StaticTextWidget *ver = (StaticTextWidget*)findWidget("Launcher.Version");
+ StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
if (ver) {
ver->setAlign((Graphics::TextAlign)g_gui.xmlEval()->getVar("Launcher.Version.Align", Graphics::kTextAlignCenter));
ver->setLabel(gScummVMVersionDate);
@@ -1095,7 +1095,7 @@ void LauncherDialog::reflowLayout() {
_logo->useThemeTransparency(true);
_logo->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageLogo));
} else {
- StaticTextWidget *ver = (StaticTextWidget*)findWidget("Launcher.Version");
+ StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
if (ver) {
ver->setAlign((Graphics::TextAlign)g_gui.xmlEval()->getVar("Launcher.Version.Align", Graphics::kTextAlignCenter));
ver->setLabel(gScummVMFullVersion);
diff --git a/test/common/pack.h b/test/common/pack.h
index 724457f838..f62b31e9dc 100644
--- a/test/common/pack.h
+++ b/test/common/pack.h
@@ -15,7 +15,7 @@ struct TestStruct {
#include <common/pack-end.h> // END STRUCT PACKING
-#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42)
+#define OFFS(type,item) (((ptrdiff_t)(&((type *)42)->type::item))-42)
class PackTestSuite : public CxxTest::TestSuite
{
diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp
index ca62228178..7d1112a59c 100644
--- a/video/dxa_decoder.cpp
+++ b/video/dxa_decoder.cpp
@@ -318,7 +318,7 @@ void DXADecoder::decode13(int size) {
for (uint32 by = 0; by < _curHeight; by += BLOCKH) {
for (uint32 bx = 0; bx < _width; bx += BLOCKW) {
uint8 type = *codeBuf++;
- uint8 *b2 = (uint8*)_frameBuffer1 + bx + by * _width;
+ uint8 *b2 = (uint8 *)_frameBuffer1 + bx + by * _width;
switch (type) {
case 0:
@@ -369,7 +369,7 @@ void DXADecoder::decode13(int size) {
if (mbyte & 0x08)
my = -my;
- uint8 *b1 = (uint8*)_frameBuffer2 + (bx+mx) + (by+my) * _width;
+ uint8 *b1 = (uint8 *)_frameBuffer2 + (bx+mx) + (by+my) * _width;
for (int yc = 0; yc < BLOCKH; yc++) {
memcpy(b2, b1, BLOCKW);
b1 += _width;
@@ -385,7 +385,7 @@ void DXADecoder::decode13(int size) {
for (int subBlock = 0; subBlock < 4; subBlock++) {
int sx = bx + subX[subBlock], sy = by + subY[subBlock];
- b2 = (uint8*)_frameBuffer1 + sx + sy * _width;
+ b2 = (uint8 *)_frameBuffer1 + sx + sy * _width;
switch (subMask & 0xC0) {
// 00: skip
case 0x00:
@@ -413,7 +413,7 @@ void DXADecoder::decode13(int size) {
if (mbyte & 0x08)
my = -my;
- uint8 *b1 = (uint8*)_frameBuffer2 + (sx+mx) + (sy+my) * _width;
+ uint8 *b1 = (uint8 *)_frameBuffer2 + (sx+mx) + (sy+my) * _width;
for (int yc = 0; yc < BLOCKH / 2; yc++) {
memcpy(b2, b1, BLOCKW / 2);
b1 += _width;