aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-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
104 files changed, 331 insertions, 331 deletions
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);