aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
diff options
context:
space:
mode:
authorTarek Soliman2012-02-15 09:53:31 -0600
committerTarek Soliman2012-02-15 10:07:10 -0600
commita4798602d7a025dc13fd253d584dbf29dbec488d (patch)
treed6e764535eb4eef6d3c313e00a7eaea8b1724a2d /engines/sky
parent921f602ab8631a9d10e0a173b6b331dbafda564a (diff)
downloadscummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.tar.gz
scummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.tar.bz2
scummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.zip
JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g' This seems to have caught some params as well which is not undesirable IMO. It also caught some strings containing this which is undesirable so I excluded them manually. (engines/sci/engine/kernel_tables.h)
Diffstat (limited to 'engines/sky')
-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
12 files changed, 65 insertions, 65 deletions
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));