aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/gui_hof.cpp2
-rw-r--r--engines/kyra/gui_lol.cpp8
-rw-r--r--engines/kyra/gui_mr.cpp16
-rw-r--r--engines/kyra/gui_v2.cpp2
-rw-r--r--engines/kyra/kyra_hof.cpp26
-rw-r--r--engines/kyra/kyra_mr.cpp2
-rw-r--r--engines/kyra/kyra_v1.cpp2
-rw-r--r--engines/kyra/kyra_v2.h2
-rw-r--r--engines/kyra/lol.cpp6
-rw-r--r--engines/kyra/resource_intern.cpp10
-rw-r--r--engines/kyra/scene_lol.cpp8
-rw-r--r--engines/kyra/screen_lol.cpp10
-rw-r--r--engines/kyra/script.cpp2
-rw-r--r--engines/kyra/script.h38
-rw-r--r--engines/kyra/script_hof.cpp16
-rw-r--r--engines/kyra/script_lol.cpp44
-rw-r--r--engines/kyra/script_mr.cpp12
-rw-r--r--engines/kyra/script_tim.cpp2
-rw-r--r--engines/kyra/script_tim.h2
-rw-r--r--engines/kyra/sequences_hof.cpp8
-rw-r--r--engines/kyra/sequences_mr.cpp4
-rw-r--r--engines/kyra/sound_adlib.cpp2
-rw-r--r--engines/kyra/sound_pcspk.cpp4
-rw-r--r--engines/kyra/sound_towns.cpp22
-rw-r--r--engines/kyra/staticres.cpp2
-rw-r--r--engines/kyra/text_hof.cpp2
-rw-r--r--engines/kyra/text_lol.cpp6
27 files changed, 130 insertions, 130 deletions
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index 4d2046c35d..3bc6ca6c6c 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -554,7 +554,7 @@ void KyraEngine_HoF::bookPrintText(int dstPage, const uint8 *str, int x, int y,
_screen->_charWidth = -2;
_screen->hideMouse();
- _screen->printText((const char*)str, x, y, color, (_flags.lang == Common::JA_JPN) ? 0xf6 : 0);
+ _screen->printText((const char *)str, x, y, color, (_flags.lang == Common::JA_JPN) ? 0xf6 : 0);
_screen->showMouse();
_screen->_charWidth = 0;
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 30a147f710..332a0efeab 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -747,7 +747,7 @@ void LoLEngine::gui_updateInput() {
void LoLEngine::gui_triggerEvent(int eventType) {
Common::Event evt;
- memset(&evt, 0, sizeof(Common::Event));
+ memset(&evt, 0, sizeof(Common::Event));
evt.mouse.x = _mouseX;
evt.mouse.y = _mouseY;
@@ -815,7 +815,7 @@ void LoLEngine::gui_triggerEvent(int eventType) {
}
void LoLEngine::removeInputTop() {
- if (!_eventList.empty()) {
+ if (!_eventList.empty()) {
if (_eventList.begin()->event.type == Common::EVENT_LBUTTONDOWN)
_gui->_mouseClick = 1;
else if (_eventList.begin()->event.type == Common::EVENT_RBUTTONDOWN)
@@ -1891,7 +1891,7 @@ void GUI_LoL::processButton(Button *button) {
case 1:
_screen->hideMouse();
- _screen->printText((const char*)dataPtr, x, y, val2, val3);
+ _screen->printText((const char *)dataPtr, x, y, val2, val3);
_screen->showMouse();
break;
@@ -1932,7 +1932,7 @@ int GUI_LoL::processButtonList(Button *buttonList, uint16 inputFlag, int8 mouseW
if (_mouseClick == 2)
_flagsModifier |= 0x2000;
_mouseClick = 0;
-
+
_backUpButtonList = buttonList;
_buttonListChanged = false;
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index a1de26897d..19c17b9504 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -127,12 +127,12 @@ void KyraEngine_MR::showMessage(const char *string, uint8 c0, uint8 c1) {
}
void KyraEngine_MR::showMessageFromCCode(int string, uint8 c0, int) {
- showMessage((const char*)getTableEntry(_cCodeFile, string), c0, 0xF0);
+ showMessage((const char *)getTableEntry(_cCodeFile, string), c0, 0xF0);
}
void KyraEngine_MR::updateItemCommand(int item, int str, uint8 c0) {
char buffer[100];
- char *src = (char*)getTableEntry(_itemFile, item);
+ char *src = (char *)getTableEntry(_itemFile, item);
while (*src != ' ')
++src;
@@ -142,7 +142,7 @@ void KyraEngine_MR::updateItemCommand(int item, int str, uint8 c0) {
strcpy(buffer, src);
strcat(buffer, " ");
- strcat(buffer, (const char*)getTableEntry(_cCodeFile, str));
+ strcat(buffer, (const char *)getTableEntry(_cCodeFile, str));
showMessage(buffer, c0, 0xF0);
}
@@ -313,7 +313,7 @@ void KyraEngine_MR::drawMalcolmsMoodText() {
if (queryGameFlag(0x219))
return;
- const char *string = (const char*)getTableEntry(_cCodeFile, stringId[_malcolmsMood]);
+ const char *string = (const char *)getTableEntry(_cCodeFile, stringId[_malcolmsMood]);
Screen::FontId oldFont = _screen->setFont(Screen::FID_8_FNT);
_screen->_charWidth = -2;
@@ -603,7 +603,7 @@ int KyraEngine_MR::buttonMoodChange(Button *button) {
}
int KyraEngine_MR::buttonShowScore(Button *button) {
- strcpy(_stringBuffer, (const char*)getTableEntry(_cCodeFile, 18));
+ strcpy(_stringBuffer, (const char *)getTableEntry(_cCodeFile, 18));
char *buffer = _stringBuffer;
@@ -646,12 +646,12 @@ int KyraEngine_MR::buttonJesterStaff(Button *button) {
_screen->showMouse();
} else {
if (queryGameFlag(0x2F))
- objectChat((const char*)getTableEntry(_cCodeFile, 20), 0, 204, 20);
+ objectChat((const char *)getTableEntry(_cCodeFile, 20), 0, 204, 20);
else
- objectChat((const char*)getTableEntry(_cCodeFile, 25), 0, 204, 25);
+ objectChat((const char *)getTableEntry(_cCodeFile, 25), 0, 204, 25);
}
} else {
- objectChat((const char*)getTableEntry(_cCodeFile, 30), 0, 204, 30);
+ objectChat((const char *)getTableEntry(_cCodeFile, 30), 0, 204, 30);
}
return 0;
}
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index f727c02652..c20ba15fe5 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -114,7 +114,7 @@ void GUI_v2::processButton(Button *button) {
case 1:
_screen->hideMouse();
- _screen->printText((const char*)dataPtr, x, y, val2, val3);
+ _screen->printText((const char *)dataPtr, x, y, val2, val3);
_screen->showMouse();
break;
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index c2812b3078..81db5076f9 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -886,7 +886,7 @@ uint8 *KyraEngine_HoF::getTableEntry(uint8 *buffer, int id) {
}
char *KyraEngine_HoF::getTableString(int id, uint8 *buffer, int decode) {
- char *string = (char*)getTableEntry(buffer, id);
+ char *string = (char *)getTableEntry(buffer, id);
if (decode && _flags.lang != Common::JA_JPN) {
Util::decodeString1(string, _internStringBuf);
@@ -951,15 +951,15 @@ void KyraEngine_HoF::updateCommandLineEx(int str1, int str2, int16 palIndex) {
*src = toupper(*src);
}
- strcpy((char*)_unkBuf500Bytes, src);
+ strcpy((char *)_unkBuf500Bytes, src);
if (str2 > 0) {
if (_flags.lang != Common::JA_JPN)
- strcat((char*)_unkBuf500Bytes, " ");
- strcat((char*)_unkBuf500Bytes, getTableString(str2, _cCodeBuffer, 1));
+ strcat((char *)_unkBuf500Bytes, " ");
+ strcat((char *)_unkBuf500Bytes, getTableString(str2, _cCodeBuffer, 1));
}
- showMessage((char*)_unkBuf500Bytes, palIndex);
+ showMessage((char *)_unkBuf500Bytes, palIndex);
}
void KyraEngine_HoF::fadeMessagePalette() {
@@ -1882,10 +1882,10 @@ void KyraEngine_HoF::listItemsInCauldron() {
if (*str == 37)
str += 2;
}
- strcpy((char*)_unkBuf500Bytes, "...");
- strcat((char*)_unkBuf500Bytes, str);
- strcat((char*)_unkBuf500Bytes, "...");
- objectChat((const char*)_unkBuf500Bytes, 0, 0x83, _cauldronTable[i]+54);
+ strcpy((char *)_unkBuf500Bytes, "...");
+ strcat((char *)_unkBuf500Bytes, str);
+ strcat((char *)_unkBuf500Bytes, "...");
+ objectChat((const char *)_unkBuf500Bytes, 0, 0x83, _cauldronTable[i]+54);
}
char *str = buffer;
@@ -1894,10 +1894,10 @@ void KyraEngine_HoF::listItemsInCauldron() {
if (*str == 37)
str += 2;
}
- strcpy((char*)_unkBuf500Bytes, "...");
- strcat((char*)_unkBuf500Bytes, str);
- strcat((char*)_unkBuf500Bytes, ".");
- objectChat((const char*)_unkBuf500Bytes, 0, 0x83, _cauldronTable[itemsInCauldron-1]+54);
+ strcpy((char *)_unkBuf500Bytes, "...");
+ strcat((char *)_unkBuf500Bytes, str);
+ strcat((char *)_unkBuf500Bytes, ".");
+ objectChat((const char *)_unkBuf500Bytes, 0, 0x83, _cauldronTable[itemsInCauldron-1]+54);
}
}
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 167f1822ac..87a5672bee 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -1392,7 +1392,7 @@ bool KyraEngine_MR::updateScore(int scoreId, int strId) {
_scoreFlagTable[scoreIndex] |= (1 << scoreBit);
_screen->hideMouse();
- strcpy(_stringBuffer, (const char*)getTableEntry(_scoreFile, strId));
+ strcpy(_stringBuffer, (const char *)getTableEntry(_scoreFile, strId));
strcat(_stringBuffer, ": ");
assert(scoreId < _scoreTableSize);
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index df74790be7..30da35787e 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -130,7 +130,7 @@ Common::Error KyraEngine_v1::init() {
MidiDriver *driver = 0;
-
+
if (midiDriver == MD_PCSPK) {
driver = new MidiDriver_PCSpeaker(_mixer);
} else {
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index bb3afe1b22..893e7a3fd8 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -157,7 +157,7 @@ protected:
void addItemToAnimList(int item);
void deleteItemAnimEntry(int item);
- virtual void animSetupPaletteEntry(AnimObj *) {}
+ virtual void animSetupPaletteEntry(AnimObj *){}
virtual void setCharacterAnimDim(int w, int h) = 0;
virtual void resetCharacterAnimDim() = 0;
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index bd2d48d793..bf9e522fab 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1547,8 +1547,8 @@ void LoLEngine::fadeText() {
}
void LoLEngine::transformRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage) {
- uint16 *p1 = (uint16*) _tempBuffer5120;
- uint16 *p2 = (uint16*) (_tempBuffer5120 + 640);
+ uint16 *p1 = (uint16*)_tempBuffer5120;
+ uint16 *p2 = (uint16*)(_tempBuffer5120 + 640);
for (int i = 0; i < w; i++)
p1[i] = i;
@@ -3563,7 +3563,7 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
}
void LoLEngine::loadMapLegendData(int level) {
- uint16 *legendData= (uint16*) _tempBuffer5120;
+ uint16 *legendData= (uint16*)_tempBuffer5120;
for (int i = 0; i < 32; i++) {
legendData[i * 6] = 0xffff;
legendData[i * 6 + 5] = 0xffff;
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 3e8a3fd9c7..fd97a168e6 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -678,7 +678,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
int16 cmd = 0;
do {
- cmd = ((int16*) _tables[2])[_src->getKeyLower()];
+ cmd = ((int16*)_tables[2])[_src->getKeyLower()];
_src->advSrcBitsByIndex(cmd < 0 ? calcCmdAndIndex(_tables[3], cmd) : _tables[0][cmd]);
if (cmd == 0x11d) {
@@ -691,7 +691,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
*d++ = cmd & 0xff;
} else if (cmd != 0x100) {
cmd -= 0xfe;
- int16 offset = ((int16*) _tables[4])[_src->getKeyLower()];
+ int16 offset = ((int16*)_tables[4])[_src->getKeyLower()];
_src->advSrcBitsByIndex(offset < 0 ? calcCmdAndIndex(_tables[5], offset) : _tables[1][offset]);
if ((offset & 0xff) >= 4) {
uint8 newIndex = ((offset & 0xff) >> 1) - 1;
@@ -798,13 +798,13 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
cnt--;
s = tbl1 + cnt;
d = &_tables16[2][cnt];
- uint16 * bt = (uint16*) tbl3;
+ uint16 * bt = (uint16*)tbl3;
uint16 inc = 0;
uint16 cnt2 = 0;
do {
uint8 t = *s--;
- uint16 *s2 = (uint16*) tbl2;
+ uint16 *s2 = (uint16*)tbl2;
if (t && t < 9) {
inc = 1 << t;
@@ -822,7 +822,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
t -= 8;
uint8 shiftCnt = 1;
uint8 v = (*d) >> 8;
- s2 = &((uint16*) tbl2)[*d & 0xff];
+ s2 = &((uint16*)tbl2)[*d & 0xff];
do {
if (!*s2) {
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 41649f34a7..5e1fba7215 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -180,8 +180,8 @@ void LoLEngine::loadLevelWallData(int index, bool mapShapes) {
}
int LoLEngine::assignLevelShapes(int index) {
- uint16 *p1 = (uint16 *) _tempBuffer5120;
- uint16 *p2 = (uint16 *) (_tempBuffer5120 + 4000);
+ uint16 *p1 = (uint16 *)_tempBuffer5120;
+ uint16 *p2 = (uint16 *)(_tempBuffer5120 + 4000);
uint16 r = p2[index];
if (r)
@@ -461,7 +461,7 @@ void LoLEngine::resetItems(int flag) {
MonsterInPlay *r = 0;
while (id & 0x8000) {
- r = (MonsterInPlay*)findObject(id);
+ r = (MonsterInPlay *)findObject(id);
id = r->nextAssignedObject;
}
@@ -1150,7 +1150,7 @@ void LoLEngine::movePartySmoothScrollTurnLeft(int speed) {
int d = smoothScrollDrawSpecialGuiShape(_sceneDrawPage1);
gui_drawScene(_sceneDrawPage1);
- int dp = _sceneDrawPage2 == 2 ? _sceneDrawPage2 : _sceneDrawPage1;
+ int dp = _sceneDrawPage2 == 2 ? _sceneDrawPage2 : _sceneDrawPage1;
_smoothScrollTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollTurnStep1(_sceneDrawPage1, _sceneDrawPage2, dp);
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 75bc0cab16..b118f20404 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -65,7 +65,7 @@ bool Screen_LoL::init() {
if (Screen::init()) {
_screenDimTable = _use16ColorMode ? _screenDimTable16C : _screenDimTable256C;
_customDimTable = new ScreenDim*[_screenDimTableCount];
- memset(_customDimTable, 0, sizeof(ScreenDim*) * _screenDimTableCount);
+ memset(_customDimTable, 0, sizeof(ScreenDim *)* _screenDimTableCount);
return true;
}
return false;
@@ -341,11 +341,11 @@ void Screen_LoL::copyGuiShapeFromSceneBackupBuffer(int srcPageNum, uint8 *dstBu
} while (!v);
*dst++ = len;
-
+
len = 69 - len;
memcpy(dst, src, len);
src += (len + 251);
- dst += len;
+ dst += len;
}
}
@@ -360,12 +360,12 @@ void Screen_LoL::copyGuiShapeToSurface(uint8 *srcBuffer, int dstPageNum) {
memcpy(dst, src, len);
src += (len - 1);
dst += len;
-
+
for (int ii = 0; ii < len; ii++)
*dst++ = *src--;
src += (len + 1);
- dst += (v + 38);
+ dst += (v + 38);
}
}
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index 2bb3665e83..02b1874605 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -186,7 +186,7 @@ bool EMCInterpreter::run(EMCState *script) {
// Should be no Problem at all to cast to uint32 here, since that's the biggest ptrdiff the original
// would allow, of course that's not realistic to happen to be somewhere near the limit of uint32 anyway.
- const uint32 instOffset = (uint32)((const byte*)script->ip - (const byte*)script->dataPtr->data);
+ const uint32 instOffset = (uint32)((const byte *)script->ip - (const byte *)script->dataPtr->data);
int16 code = *script->ip++;
int16 opcode = (code >> 8) & 0x1F;
diff --git a/engines/kyra/script.h b/engines/kyra/script.h
index 65b3f477f3..88bbe86c4d 100644
--- a/engines/kyra/script.h
+++ b/engines/kyra/script.h
@@ -63,7 +63,7 @@ struct EMCState {
};
#define stackPos(x) (script->stack[script->sp+x])
-#define stackPosString(x) ((const char*)&script->dataPtr->text[READ_BE_UINT16(&script->dataPtr->text[stackPos(x)<<1])])
+#define stackPosString(x) ((const char *)&script->dataPtr->text[READ_BE_UINT16(&script->dataPtr->text[stackPos(x)<<1])])
class Resource;
class KyraEngine_v1;
@@ -116,24 +116,24 @@ protected:
const OpcodeEntry *_opcodes;
private:
- void op_jmp(EMCState*);
- void op_setRetValue(EMCState*);
- void op_pushRetOrPos(EMCState*);
- void op_push(EMCState*);
- void op_pushReg(EMCState*);
- void op_pushBPNeg(EMCState*);
- void op_pushBPAdd(EMCState*);
- void op_popRetOrPos(EMCState*);
- void op_popReg(EMCState*);
- void op_popBPNeg(EMCState*);
- void op_popBPAdd(EMCState*);
- void op_addSP(EMCState*);
- void op_subSP(EMCState*);
- void op_sysCall(EMCState*);
- void op_ifNotJmp(EMCState*);
- void op_negate(EMCState*);
- void op_eval(EMCState*);
- void op_setRetAndJmp(EMCState*);
+ void op_jmp(EMCState *);
+ void op_setRetValue(EMCState *);
+ void op_pushRetOrPos(EMCState *);
+ void op_push(EMCState *);
+ void op_pushReg(EMCState *);
+ void op_pushBPNeg(EMCState *);
+ void op_pushBPAdd(EMCState *);
+ void op_popRetOrPos(EMCState *);
+ void op_popReg(EMCState *);
+ void op_popBPNeg(EMCState *);
+ void op_popBPAdd(EMCState *);
+ void op_addSP(EMCState *);
+ void op_subSP(EMCState *);
+ void op_sysCall(EMCState *);
+ void op_ifNotJmp(EMCState *);
+ void op_negate(EMCState *);
+ void op_eval(EMCState *);
+ void op_setRetAndJmp(EMCState *);
};
} // end of namespace Kyra
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index 23ec3bd406..b2a581cece 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -153,7 +153,7 @@ int KyraEngine_HoF::o2_meanWhileScene(EMCState *script) {
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
if (!scumm_stricmp(cpsfile, "_MEANWIL.CPS") && _flags.lang == Common::JA_JPN) {
Screen::FontId o = _screen->setFont(Screen::FID_6_FNT);
- _screen->printText((const char*)jpSubtitle, 140, 176, 255, 132);
+ _screen->printText((const char *)jpSubtitle, 140, 176, 255, 132);
_screen->setFont(o);
}
_screen->updateScreen();
@@ -1150,8 +1150,8 @@ int KyraEngine_HoF::o2_mushroomEffect(EMCState *script) {
int KyraEngine_HoF::o2_customChat(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_customChat(%p) ('%s', %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2));
- strcpy((char*)_unkBuf500Bytes, stackPosString(0));
- _chatText = (char*)_unkBuf500Bytes;
+ strcpy((char *)_unkBuf500Bytes, stackPosString(0));
+ _chatText = (char *)_unkBuf500Bytes;
_chatObject = stackPos(1);
_chatVocHigh = _chatVocLow = -1;
@@ -1438,8 +1438,8 @@ int KyraEngine_HoF::o2a_setCharacterFrame(EMCState *script) {
#pragma mark -
int KyraEngine_HoF::t2_initChat(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_initChat(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
- _chatText = (const char*)tim->text + READ_LE_UINT16(tim->text + (param[0] << 1));
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_initChat(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
+ _chatText = (const char *)tim->text + READ_LE_UINT16(tim->text + (param[0] << 1));
_chatObject = param[1];
if (_flags.lang == Common::JA_JPN) {
@@ -1454,13 +1454,13 @@ int KyraEngine_HoF::t2_initChat(const TIM *tim, const uint16 *param) {
}
int KyraEngine_HoF::t2_updateSceneAnim(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_updateSceneAnim(%p, %p) (%d, %d)", (const void*)tim, (const void*)param, param[0], param[1]);
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_updateSceneAnim(%p, %p) (%d, %d)", (const void *)tim, (const void *)param, param[0], param[1]);
updateSceneAnim(param[1], param[0]);
return 0;
}
int KyraEngine_HoF::t2_resetChat(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_resetChat(%p, %p) ()", (const void*)tim, (const void*)param);
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_resetChat(%p, %p) ()", (const void *)tim, (const void *)param);
_text->restoreScreen();
_chatText = 0;
_chatObject = -1;
@@ -1468,7 +1468,7 @@ int KyraEngine_HoF::t2_resetChat(const TIM *tim, const uint16 *param) {
}
int KyraEngine_HoF::t2_playSoundEffect(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_playSoundEffect(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::t2_playSoundEffect(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
snd_playSoundEffect(*param);
return 0;
}
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index f8de48e90a..d1c24c9acf 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -1869,7 +1869,7 @@ int LoLEngine::olol_drawCharPortrait(EMCState *script) {
int LoLEngine::olol_assignSpecialGuiShape(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_assignSpecialGuiShape(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4));
- if (stackPos(0)) {
+ if (stackPos(0)) {
_specialGuiShape = _levelShapes[_levelShapeProperties[_wllShapeMap[stackPos(0)]].shapeIndex[stackPos(1)]];
_specialGuiShapeX = stackPos(2);
_specialGuiShapeY = stackPos(3);
@@ -2035,21 +2035,21 @@ int LoLEngine::olol_getLanguage(EMCState *script) {
#pragma mark -
int LoLEngine::tlol_setupPaletteFade(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::t2_playSoundEffect(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::t2_playSoundEffect(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
_screen->getFadeParams(_screen->getPalette(0), param[0], _tim->_palDelayInc, _tim->_palDiff);
_tim->_palDelayAcc = 0;
return 1;
}
int LoLEngine::tlol_loadPalette(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_loadPalette(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_loadPalette(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
const char *palFile = (const char *)(tim->text + READ_LE_UINT16(tim->text + (param[0]<<1)));
_screen->loadPalette(palFile, _screen->getPalette(0));
return 1;
}
int LoLEngine::tlol_setupPaletteFadeEx(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_setupPaletteFadeEx(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_setupPaletteFadeEx(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
memcpy(_screen->getPalette(0), _screen->getPalette(1), 768);
_screen->getFadeParams(_screen->getPalette(0), param[0], _tim->_palDelayInc, _tim->_palDiff);
@@ -2059,7 +2059,7 @@ int LoLEngine::tlol_setupPaletteFadeEx(const TIM *tim, const uint16 *param) {
int LoLEngine::tlol_processWsaFrame(const TIM *tim, const uint16 *param) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_processWsaFrame(%p, %p) (%d, %d, %d, %d, %d)",
- (const void*)tim, (const void*)param, param[0], param[1], param[2], param[3], param[4]);
+ (const void *)tim, (const void *)param, param[0], param[1], param[2], param[3], param[4]);
TIMInterpreter::Animation *anim = (TIMInterpreter::Animation *)tim->wsa[param[0]].anim;
const int frame = param[1];
const int x2 = param[2];
@@ -2084,25 +2084,25 @@ int LoLEngine::tlol_processWsaFrame(const TIM *tim, const uint16 *param) {
}
int LoLEngine::tlol_displayText(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_displayText(%p, %p) (%d, %d)", (const void*)tim, (const void*)param, param[0], (int16)param[1]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_displayText(%p, %p) (%d, %d)", (const void *)tim, (const void *)param, param[0], (int16)param[1]);
_tim->displayText(param[0], param[1]);
return 1;
}
int LoLEngine::tlol_initSceneWindowDialogue(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_initSceneWindowDialogue(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_initSceneWindowDialogue(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
initSceneWindowDialogue(param[0]);
return 1;
}
int LoLEngine::tlol_restoreAfterSceneWindowDialogue(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_restoreAfterSceneWindowDialogue(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_restoreAfterSceneWindowDialogue(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
restoreAfterSceneWindowDialogue(param[0]);
return 1;
}
int LoLEngine::tlol_giveItem(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_giveItem(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_giveItem(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
int item = makeItem(param[0], param[1], param[2]);
if (addItemToInventory(item))
return 1;
@@ -2112,7 +2112,7 @@ int LoLEngine::tlol_giveItem(const TIM *tim, const uint16 *param) {
}
int LoLEngine::tlol_setPartyPosition(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_setPartyPosition(%p, %p) (%d, %d)", (const void*)tim, (const void*)param, param[0], param[1]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_setPartyPosition(%p, %p) (%d, %d)", (const void *)tim, (const void *)param, param[0], param[1]);
if (param[0] == 1) {
_currentDirection = param[1];
} else if (param[0] == 0) {
@@ -2124,7 +2124,7 @@ int LoLEngine::tlol_setPartyPosition(const TIM *tim, const uint16 *param) {
}
int LoLEngine::tlol_fadeClearWindow(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_fadeClearWindow(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_fadeClearWindow(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
uint8 *tmp = 0;
switch (param[0]) {
@@ -2174,7 +2174,7 @@ int LoLEngine::tlol_fadeClearWindow(const TIM *tim, const uint16 *param) {
}
int LoLEngine::tlol_copyRegion(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_copyRegion(%p, %p) (%d, %d, %d, %d, %d, %d, %d, %d)", (const void*)tim, (const void*)param, param[0], param[1], param[2], param[3], param[4], param[5], param[6], param[7]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_copyRegion(%p, %p) (%d, %d, %d, %d, %d, %d, %d, %d)", (const void *)tim, (const void *)param, param[0], param[1], param[2], param[3], param[4], param[5], param[6], param[7]);
_screen->copyRegion(param[0], param[1], param[2], param[3], param[4], param[5], param[6], param[7], Screen::CR_NO_P_CHECK);
if (!param[7])
_screen->updateScreen();
@@ -2182,13 +2182,13 @@ int LoLEngine::tlol_copyRegion(const TIM *tim, const uint16 *param) {
}
int LoLEngine::tlol_characterChat(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_characterChat(%p, %p) (%d, %d, %d)", (const void*)tim, (const void*)param, param[0], param[1], param[2]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_characterChat(%p, %p) (%d, %d, %d)", (const void *)tim, (const void *)param, param[0], param[1], param[2]);
playCharacterScriptChat(param[0], param[1], 1, getLangString(param[2]), 0, param, 3);
return 1;
}
int LoLEngine::tlol_drawScene(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_drawScene(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_drawScene(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
gui_drawScene(param[0]);
//if (_sceneDrawPage2 != 2 && param[0] == 2)
// _screen->copyRegion(112 << 3, 0, 112 << 3, 0, 176 << 3, 120, _sceneDrawPage2, 2, Screen::CR_NO_P_CHECK);
@@ -2196,13 +2196,13 @@ int LoLEngine::tlol_drawScene(const TIM *tim, const uint16 *param) {
}
int LoLEngine::tlol_update(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_update(%p, %p)", (const void*)tim, (const void*)param);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_update(%p, %p)", (const void *)tim, (const void *)param);
update();
return 1;
}
int LoLEngine::tlol_clearTextField(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_clearTextField(%p, %p)", (const void*)tim, (const void*)param);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_clearTextField(%p, %p)", (const void *)tim, (const void *)param);
if (_currentControlMode && !textEnabled())
return 1;
_screen->setScreenDim(5);
@@ -2214,38 +2214,38 @@ int LoLEngine::tlol_clearTextField(const TIM *tim, const uint16 *param) {
}
int LoLEngine::tlol_loadSoundFile(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_loadSoundFile(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_loadSoundFile(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
snd_loadSoundFile(param[0]);
return 1;
}
int LoLEngine::tlol_playMusicTrack(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_playMusicTrack(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_playMusicTrack(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
snd_playTrack(param[0]);
return 1;
}
int LoLEngine::tlol_playDialogueTalkText(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_playDialogueTalkText(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_playDialogueTalkText(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
if (!snd_playCharacterSpeech(param[0], 0, 0) || textEnabled())
_txt->printDialogueText(4, getLangString(param[0]), 0, param, 1);
return 1;
}
int LoLEngine::tlol_playSoundEffect(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_playSoundEffect(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_playSoundEffect(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
snd_playSoundEffect(param[0], -1);
return 1;
}
int LoLEngine::tlol_startBackgroundAnimation(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_startBackgroundAnimation(%p, %p) (%d, %d)", (const void*)tim, (const void*)param, param[0], param[1]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_startBackgroundAnimation(%p, %p) (%d, %d)", (const void *)tim, (const void *)param, param[0], param[1]);
_tim->startBackgroundAnimation(param[0], param[1]);
return 1;
}
int LoLEngine::tlol_stopBackgroundAnimation(const TIM *tim, const uint16 *param) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_stopBackgroundAnimation(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_stopBackgroundAnimation(%p, %p) (%d)", (const void *)tim, (const void *)param, param[0]);
_tim->stopBackgroundAnimation(param[0]);
return 1;
}
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index 768a93b6ca..558d703f15 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -109,7 +109,7 @@ int KyraEngine_MR::o3_setCharacterFacing(EMCState *script) {
int KyraEngine_MR::o3_showSceneFileMessage(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_showSceneFileMessage(%p) (%d)", (const void *)script, stackPos(0));
- showMessage((const char*)getTableEntry(_scenesFile, stackPos(0)), 0xFF, 0xF0);
+ showMessage((const char *)getTableEntry(_scenesFile, stackPos(0)), 0xFF, 0xF0);
return 0;
}
@@ -197,7 +197,7 @@ int KyraEngine_MR::o3_addItemToCurScene(EMCState *script) {
int KyraEngine_MR::o3_objectChat(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_objectChat(%p) (%d)", (const void *)script, stackPos(0));
int id = stackPos(0);
- const char *str = (const char*)getTableEntry(_useActorBuffer ? _actorFile : _sceneStrings, id);
+ const char *str = (const char *)getTableEntry(_useActorBuffer ? _actorFile : _sceneStrings, id);
if (str) {
objectChat(str, 0, _vocHigh, id);
playStudioSFX(str);
@@ -240,7 +240,7 @@ int KyraEngine_MR::o3_countInventoryItemInstances(EMCState *script) {
int KyraEngine_MR::o3_npcChatSequence(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_npcChatSequence(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
const int id = stackPos(0);
- const char *str = (const char*)getTableEntry(_sceneStrings, id);
+ const char *str = (const char *)getTableEntry(_sceneStrings, id);
if (str)
npcChatSequence(str, stackPos(1), _vocHigh, id);
return 0;
@@ -249,7 +249,7 @@ int KyraEngine_MR::o3_npcChatSequence(EMCState *script) {
int KyraEngine_MR::o3_badConscienceChat(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_badConscienceChat(%p) (%d)", (const void *)script, stackPos(0));
int id = stackPos(0);
- const char *str = (const char*)getTableEntry(_useActorBuffer ? _actorFile : _sceneStrings, id);
+ const char *str = (const char *)getTableEntry(_useActorBuffer ? _actorFile : _sceneStrings, id);
badConscienceChat(str, _vocHigh, id);
return 0;
}
@@ -829,7 +829,7 @@ int KyraEngine_MR::o3_blockOutWalkableRegion(EMCState *script) {
int KyraEngine_MR::o3_showSceneStringsMessage(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_showSceneStringsMessage(%p) (%d)", (const void *)script, stackPos(0));
- showMessage((const char*)getTableEntry(_sceneStrings, stackPos(0)), 0xFF, 0xF0);
+ showMessage((const char *)getTableEntry(_sceneStrings, stackPos(0)), 0xFF, 0xF0);
return 0;
}
@@ -842,7 +842,7 @@ int KyraEngine_MR::o3_showGoodConscience(EMCState *script) {
int KyraEngine_MR::o3_goodConscienceChat(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_goodConscienceChat(%p) (%d)", (const void *)script, stackPos(0));
int id = stackPos(0);
- const char *str = (const char*)getTableEntry(_useActorBuffer ? _actorFile : _sceneStrings, id);
+ const char *str = (const char *)getTableEntry(_useActorBuffer ? _actorFile : _sceneStrings, id);
goodConscienceChat(str, _vocHigh, id);
return 0;
}
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index f8ce7f7f3c..e2ec4ea830 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -843,7 +843,7 @@ TIMInterpreter_LoL::TIMInterpreter_LoL(LoLEngine *engine, Screen_v2 *screen_v2,
_drawPage2 = 0;
- memset(_dialogueButtonString, 0, 3 * sizeof(const char*));
+ memset(_dialogueButtonString, 0, 3 * sizeof(const char *));
_dialogueButtonPosX = _dialogueButtonPosY = _dialogueNumButtons = _dialogueButtonXoffs = _dialogueHighlightedButton = 0;
}
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index c198915e83..19b81c219b 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -212,7 +212,7 @@ protected:
int cmd_stopFuncNow(const uint16 *param);
int cmd_stopAllFuncs(const uint16 *param);
#define cmd_return(n, v) \
- int cmd_return_##n(const uint16 *) { return v; }
+ int cmd_return_##n(const uint16 *){ return v; }
cmd_return( 1, 1);
cmd_return(n1, -1);
#undef cmd_return
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 7b42bfa935..3d5c348af7 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -2554,7 +2554,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
else
cH = d->h;
- char *str = (char*)ptr;
+ char *str = (char *)ptr;
ptr = (uint8*)strpbrk(str, mark);
if (!ptr)
@@ -2597,7 +2597,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
cH -= (textData[cnt].height + (textData[cnt].height >> 3));
textData[cnt + 1].y = cH;
- textData[cnt + 1].text = (uint8*) str;
+ textData[cnt + 1].text = (uint8*)str;
cnt++;
}
@@ -2607,7 +2607,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
bool palCycle = 0;
while (cnt2 < cnt) {
- const char *str = (const char*)textData[cnt2 + 1].text;
+ const char *str = (const char *)textData[cnt2 + 1].text;
const char *str2 = str;
int16 cW = textData[cnt2 + 1].x - 10;
int16 cH = textData[cnt2 + 1].y;
@@ -2657,7 +2657,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
_screen->updateScreen();
if (textData[1].y < -10) {
- textData[1].text += strlen((char*)textData[1].text);
+ textData[1].text += strlen((char *)textData[1].text);
textData[1].text[0] = textData[1].unk1;
cnt--;
memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
diff --git a/engines/kyra/sequences_mr.cpp b/engines/kyra/sequences_mr.cpp
index 54874d26e9..8de0138100 100644
--- a/engines/kyra/sequences_mr.cpp
+++ b/engines/kyra/sequences_mr.cpp
@@ -187,8 +187,8 @@ void KyraEngine_MR::eelScript() {
hideInventory();
removeHandItem();
- objectChat((const char*)getTableEntry(_cCodeFile, 35), 0, 204, 35);
- objectChat((const char*)getTableEntry(_cCodeFile, 40), 0, 204, 40);
+ objectChat((const char *)getTableEntry(_cCodeFile, 35), 0, 204, 35);
+ objectChat((const char *)getTableEntry(_cCodeFile, 40), 0, 204, 40);
setGameFlag(0xD1);
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 78500eead7..ef4223f8e4 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -846,7 +846,7 @@ void AdlibDriver::writeOPL(byte reg, byte val) {
void AdlibDriver::initChannel(Channel &channel) {
debugC(9, kDebugLevelSound, "initChannel(%lu)", (long)(&channel - _channels));
- memset(&channel.dataptr, 0, sizeof(Channel) - ((char*)&channel.dataptr - (char*)&channel));
+ memset(&channel.dataptr, 0, sizeof(Channel) - ((char *)&channel.dataptr - (char *)&channel));
channel.tempo = 0xFF;
channel.priority = 0;
diff --git a/engines/kyra/sound_pcspk.cpp b/engines/kyra/sound_pcspk.cpp
index 1707c55e2e..22c24bf56c 100644
--- a/engines/kyra/sound_pcspk.cpp
+++ b/engines/kyra/sound_pcspk.cpp
@@ -41,7 +41,7 @@ MidiDriver_PCSpeaker::MidiDriver_PCSpeaker(Audio::Mixer *mixer)
for (int i = 0; i < 2; ++i)
_note[i].hardwareChannel = 0xFF;
-
+
_speaker = new Audio::PCSpeaker(_rate);
assert(_speaker);
_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, false, true);
@@ -221,7 +221,7 @@ void MidiDriver_PCSpeaker::overwriteNote(int note) {
turnNoteOff(_note[note].hardwareChannel);
_note[note].enabled = false;
-
+
_note[newNote].hardwareChannel = _note[note].hardwareChannel;
++_channel[_note[newNote].midiChannel].noteCount;
_hardwareChannel[_note[note].hardwareChannel] = _note[newNote].midiChannel;
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index d6a1bacafc..5be783d255 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -285,7 +285,7 @@ void Towns_EuphonyFmChannel::pitchBend(int16 value) {
}
void Towns_EuphonyFmChannel::nextTick(int32 *outbuf, int buflen) {
- _voice->nextTick((int*) outbuf, buflen);
+ _voice->nextTick((int *)outbuf, buflen);
}
void Towns_EuphonyFmChannel::rate(uint16 r) {
@@ -376,13 +376,13 @@ void Towns_EuphonyPcmChannel::controlChange(byte control, byte value) {
void Towns_EuphonyPcmChannel::sysEx_customInstrument(uint32 type, const byte *fmInst) {
if (type == 0x80) {
for (uint8 i = 0; i < 8; i++) {
- const byte * const* pos = (const byte * const*) fmInst;
+ const byte * const* pos = (const byte * const *)fmInst;
for (uint8 ii = 0; ii < 10; ii++) {
if (_voice->id[i] == *(pos[ii] + 8)) {
if (!_voice->_snd[i])
_voice->_snd[i] = new Voice::Snd;
memset (_voice->_snd[i]->name, 0, 9);
- memcpy (_voice->_snd[i]->name, (const char*) pos[ii], 8);
+ memcpy (_voice->_snd[i]->name, (const char *)pos[ii], 8);
_voice->_snd[i]->id = READ_LE_UINT32(pos[ii] + 8);
_voice->_snd[i]->numSamples = READ_LE_UINT32(pos[ii] + 12);
_voice->_snd[i]->loopStart = READ_LE_UINT32(pos[ii] + 16);
@@ -396,7 +396,7 @@ void Towns_EuphonyPcmChannel::sysEx_customInstrument(uint32 type, const byte *fm
}
} else {
memset (_voice->name, 0, 9);
- memcpy (_voice->name, (const char*) fmInst, 8);
+ memcpy (_voice->name, (const char *)fmInst, 8);
for (uint8 i = 0; i < 8; i++) {
_voice->split[i] = READ_LE_UINT16(fmInst + 16 + 2 * i);
@@ -578,7 +578,7 @@ Towns_EuphonyDriver::Towns_EuphonyDriver(Audio::Mixer *mixer)
_channel[14] = _channel[15] = 0;
_fmInstruments = _waveInstruments = 0;
- memset(_waveSounds, 0, sizeof(uint8*) * 10);
+ memset(_waveSounds, 0, sizeof(uint8*)* 10);
rate(getRate());
fading(0);
@@ -687,7 +687,7 @@ void Towns_EuphonyDriver::send(byte chan, uint32 b) {
for (int i = 0; i < 8; i++) {
if (_channel[chan] == _wChannel[i]) {
_channel[chan]->sysEx_customInstrument(0, _waveInstruments + param1 * 0x80);
- _channel[chan]->sysEx_customInstrument(0x80, (const byte*) _waveSounds);
+ _channel[chan]->sysEx_customInstrument(0x80, (const byte *)_waveSounds);
break;
}
}
@@ -887,7 +887,7 @@ void Towns_EuphonyParser::parseNextEvent(EventInfo &info) {
_tempo[0] = (tempo >> 16) & 0xff;
_tempo[1] = (tempo >> 8) & 0xff;
_tempo[2] = tempo & 0xff;
- info.ext.data = (byte*) _tempo;
+ info.ext.data = (byte *)_tempo;
pos += 6;
loop = false;
} else if (cmd == 0xFD || cmd == 0xFE) {
@@ -968,7 +968,7 @@ void Towns_EuphonyParser::setup() {
_mode = data + 0x374;
_channel = data + 0x394;
_adjVelo = data + 0x3B4;
- _adjNote = (int8*) data + 0x3D4;
+ _adjNote = (int8*)data + 0x3D4;
_nextBaseTickStep = _firstBaseTickStep = data[0x804];
_initialTempo = calculateTempo((data[0x805] > 0xfc) ? 0x5a : data[0x805]);
@@ -3242,7 +3242,7 @@ void TownsPC98_OpnCore::generateTables() {
WRITE_BE_UINT32(_oprRates + 36, _numChan == 6 ? 0x00001010 : 0x00081018);
memset(_oprRates, 0x90, 32);
memset(_oprRates + 96, 0x80, 32);
- uint8 *dst = (uint8*) _oprRates + 40;
+ uint8 *dst = (uint8*)_oprRates + 40;
for (int i = 0; i < 40; i += 4)
WRITE_BE_UINT32(dst + i, 0x00081018);
for (int i = 0; i < 48; i += 4)
@@ -3256,7 +3256,7 @@ void TownsPC98_OpnCore::generateTables() {
delete[] _oprRateshift;
_oprRateshift = new uint8[128];
memset(_oprRateshift, 0, 128);
- dst = (uint8*) _oprRateshift + 32;
+ dst = (uint8*)_oprRateshift + 32;
for (int i = 11; i; i--) {
memset(dst, i, 4);
dst += 4;
@@ -4258,7 +4258,7 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle,
bool compressed = (READ_LE_UINT16(src) & 1) ? true : false;
src += 2;
uint32 outsize = READ_LE_UINT32(src);
- uint8 *sfx = (uint8*) malloc(outsize);
+ uint8 *sfx = (uint8*)malloc(outsize);
uint8 *dst = sfx;
src += 4;
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 4572ffee69..9c8b06d0b5 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -1905,7 +1905,7 @@ void LoLEngine::initStaticResource() {
_staticres->unloadId(lolLightningDefs);
}
- _fireBallCoords = (const int16*) _staticres->loadRawDataBe16(lolFireballCoords, _fireBallCoordsSize);
+ _fireBallCoords = (const int16*)_staticres->loadRawDataBe16(lolFireballCoords, _fireBallCoordsSize);
_buttonCallbacks.clear();
_buttonCallbacks.reserve(95);
diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp
index 4fa3ce29f4..754183df18 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -543,7 +543,7 @@ void KyraEngine_HoF::processDialogue(int dlgOffset, int vocH, int csEntry) {
deinitTalkObject(activeTimSequence);
activeTimSequence = -1;
}
- objectChat((const char*) _unkBuf500Bytes, 0, vocHi, vocLo);
+ objectChat((const char *)_unkBuf500Bytes, 0, vocHi, vocLo);
} else {
if (activeTimSequence != nextTimSequence ) {
if (activeTimSequence > -1) {
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index 3e1ee84dec..b9a8282de5 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -36,7 +36,7 @@ TextDisplayer_LoL::TextDisplayer_LoL(LoLEngine *vm, Screen_LoL *screen) : _vm(vm
_scriptParameter(0), _animWidth(0), _animColor1(0), _animColor2(0), _animFlag(true), _lineCount(0),
_printFlag(false), _lineWidth(0), _numCharsTotal(0), _numCharsLeft(0), _numCharsPrinted(0) {
- memset(_stringParameters, 0, 15 * sizeof(char*));
+ memset(_stringParameters, 0, 15 * sizeof(char *));
_buffer = new char[600];
memset(_buffer, 0, 600);
@@ -219,7 +219,7 @@ void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
va_list args;
va_start(args, str);
- vsnprintf((char*) _buffer, 240, str, args);
+ vsnprintf((char *)_buffer, 240, str, args);
va_end(args);
@@ -365,7 +365,7 @@ void TextDisplayer_LoL::displayText(char *str, ...) {
snprintf(_scriptParaString, 11, "%d", va_arg(args, int));
_tempString2 = _scriptParaString;
} else if (a == 's') {
- _tempString2 = va_arg(args, char*);
+ _tempString2 = va_arg(args, char *);
} else {
break;
}