diff options
33 files changed, 124 insertions, 124 deletions
diff --git a/engines/kyra/animator_lok.cpp b/engines/kyra/animator_lok.cpp index 910857121e..b906d3a724 100644 --- a/engines/kyra/animator_lok.cpp +++ b/engines/kyra/animator_lok.cpp @@ -329,14 +329,14 @@ void Animator_LoK::prepDrawAllObjects() {  				if (!_vm->_scaleMode) {  					if (flagUnk3 & 0x100) -						_screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x100, (uint8*)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer); +						_screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x100, (uint8 *)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer);  					else if (flagUnk2 & 0x4000)  						_screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4000, int(_vm->_brandonInvFlag), drawLayer);  					else  						_screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1, drawLayer);  				} else {  					if (flagUnk3 & 0x100) -						_screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x104, (uint8*)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY); +						_screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x104, (uint8 *)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY);  					else if (flagUnk2 & 0x4000)  						_screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4004, int(_vm->_brandonInvFlag), drawLayer, _brandonScaleX, _brandonScaleY);  					else diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h index e636f634da..ff387debd6 100644 --- a/engines/kyra/gui.h +++ b/engines/kyra/gui.h @@ -37,10 +37,10 @@  namespace Kyra { -#define BUTTON_FUNCTOR(type, x, y) Button::Callback(new Common::Functor1Mem<Button*, int, type>(x, y)) +#define BUTTON_FUNCTOR(type, x, y) Button::Callback(new Common::Functor1Mem<Button *, int, type>(x, y))  struct Button { -	typedef Common::Functor1<Button*, int> CallbackFunctor; +	typedef Common::Functor1<Button *, int> CallbackFunctor;  	typedef Common::SharedPtr<CallbackFunctor> Callback;  	Button() : nextButton(0), index(0), keyCode(0), keyCode2(0), data0Val1(0), data1Val1(0), data2Val1(0), flags(0), diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp index 728b519109..ded1326110 100644 --- a/engines/kyra/gui_lol.cpp +++ b/engines/kyra/gui_lol.cpp @@ -2614,7 +2614,7 @@ void GUI_LoL::updateSavegameList() {  		KyraEngine_v1::SaveHeader header;  		Common::InSaveFile *in; -		_savegameList = new char*[_savegameListSize]; +		_savegameList = new char *[_savegameListSize];  		for (int i = 0; i < _savegameListSize; i++) {  			in = _vm->openSaveForReading(_vm->getSavegameFilename(i), header); @@ -2751,7 +2751,7 @@ int GUI_LoL::clickedSaveMenu(Button *button) {  	_newMenu = &_savenameMenu;  	int16 s = (int16)button->arg;  	_menuResult = _saveMenu.item[-s - 2].saveSlot + 1; -	_saveDescription = (char*)_vm->_tempBuffer5120 + 1000; +	_saveDescription = (char *)_vm->_tempBuffer5120 + 1000;  	_saveDescription[0] = 0;  	if (_saveMenu.item[-s - 2].saveSlot != -3)  		strcpy(_saveDescription, _saveMenu.item[-s - 2].itemString); diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 953fe246bc..2716f0b285 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -125,7 +125,7 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn  	_inventoryButtons = _buttonList = 0;  	_dlgBuffer = 0; -	_conversationState = new int8*[19]; +	_conversationState = new int8 *[19];  	for (int i = 0; i < 19; i++)  		_conversationState[i] = new int8[14];  	_npcTalkChpIndex = _npcTalkDlgIndex = -1; @@ -172,7 +172,7 @@ KyraEngine_HoF::~KyraEngine_HoF() {  		delete[] _conversationState[i];  	delete[] _conversationState; -	for (Common::Array<const TIMOpcode*>::iterator i = _timOpcodes.begin(); i != _timOpcodes.end(); ++i) +	for (Common::Array<const TIMOpcode *>::iterator i = _timOpcodes.begin(); i != _timOpcodes.end(); ++i)  		delete *i;  	_timOpcodes.clear();  } diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index af3c065d8e..05d04fe993 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -654,7 +654,7 @@ protected:  	int t2_resetChat(const TIM *tim, const uint16 *param);  	int t2_playSoundEffect(const TIM *tim, const uint16 *param); -	Common::Array<const TIMOpcode*> _timOpcodes; +	Common::Array<const TIMOpcode *> _timOpcodes;  	// sound  	int _oldTalkFile; diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 1ce280d069..c0c9bf06c4 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -135,13 +135,13 @@ public:  	typedef void (KyraEngine_LoK::*IntroProc)();  	// static data access -	const char * const*seqWSATable() { return _seq_WSATable; } -	const char * const*seqCPSTable() { return _seq_CPSTable; } -	const char * const*seqCOLTable() { return _seq_COLTable; } -	const char * const*seqTextsTable() { return _seq_textsTable; } +	const char * const *seqWSATable() { return _seq_WSATable; } +	const char * const *seqCPSTable() { return _seq_CPSTable; } +	const char * const *seqCOLTable() { return _seq_COLTable; } +	const char * const *seqTextsTable() { return _seq_textsTable; } -	const uint8 * const*palTable1() { return &_specialPalettes[0]; } -	const uint8 * const*palTable2() { return &_specialPalettes[29]; } +	const uint8 * const *palTable1() { return &_specialPalettes[0]; } +	const uint8 * const *palTable2() { return &_specialPalettes[29]; }  protected:  	virtual Common::Error go(); diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 614b5dd19b..cf90c73dbd 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -185,7 +185,7 @@ KyraEngine_MR::~KyraEngine_MR() {  	delete[] _sceneStrings;  	delete[] _talkObjectList; -	for (Common::Array<const Opcode*>::iterator i = _opcodesDialog.begin(); i != _opcodesDialog.end(); ++i) +	for (Common::Array<const Opcode *>::iterator i = _opcodesDialog.begin(); i != _opcodesDialog.end(); ++i)  		delete *i;  	_opcodesDialog.clear(); @@ -1320,7 +1320,7 @@ int KyraEngine_MR::loadLanguageFile(const char *file, uint8 *&buffer) {  uint8 *KyraEngine_MR::getTableEntry(uint8 *buffer, int id) {  	uint16 tableEntries = READ_LE_UINT16(buffer); -	const uint16 *indexTable = (const uint16*)(buffer + 2); +	const uint16 *indexTable = (const uint16 *)(buffer + 2);  	const uint16 *offsetTable = indexTable + tableEntries;  	int num = 0; diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 0b852eb025..00b32425c2 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -212,7 +212,7 @@ Common::Error KyraEngine_v1::init() {  }  KyraEngine_v1::~KyraEngine_v1() { -	for (Common::Array<const Opcode*>::iterator i = _opcodes.begin(); i != _opcodes.end(); ++i) +	for (Common::Array<const Opcode *>::iterator i = _opcodes.begin(); i != _opcodes.end(); ++i)  		delete *i;  	_opcodes.clear();  	_keyMap.clear(); diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 93c7ba2d22..f05e113456 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -317,7 +317,7 @@ protected:  	// opcode  	virtual void setupOpcodeTable() = 0; -	Common::Array<const Opcode*> _opcodes; +	Common::Array<const Opcode *> _opcodes;  	int o1_queryGameFlag(EMCState *script);  	int o1_setGameFlag(EMCState *script); diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index ca6499e74e..6aaa8c3687 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -257,7 +257,7 @@ protected:  	virtual void uninitAnimationShapes(int count, uint8 *filedata) = 0;  	// Shapes -	typedef Common::HashMap<int, uint8*> ShapeMap; +	typedef Common::HashMap<int, uint8 *> ShapeMap;  	ShapeMap _gameShapes;  	uint8 *getShapePtr(int index) const; diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index bb221406e1..5a066e5d0c 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -323,15 +323,15 @@ LoLEngine::~LoLEngine() {  	delete[] _automapShapes; -	for (Common::Array<const TIMOpcode*>::iterator i = _timIntroOpcodes.begin(); i != _timIntroOpcodes.end(); ++i) +	for (Common::Array<const TIMOpcode *>::iterator i = _timIntroOpcodes.begin(); i != _timIntroOpcodes.end(); ++i)  		delete *i;  	_timIntroOpcodes.clear(); -	for (Common::Array<const TIMOpcode*>::iterator i = _timOutroOpcodes.begin(); i != _timOutroOpcodes.end(); ++i) +	for (Common::Array<const TIMOpcode *>::iterator i = _timOutroOpcodes.begin(); i != _timOutroOpcodes.end(); ++i)  		delete *i;  	_timOutroOpcodes.clear(); -	for (Common::Array<const TIMOpcode*>::iterator i = _timIngameOpcodes.begin(); i != _timIngameOpcodes.end(); ++i) +	for (Common::Array<const TIMOpcode *>::iterator i = _timIngameOpcodes.begin(); i != _timIngameOpcodes.end(); ++i)  		delete *i;  	_timIngameOpcodes.clear(); @@ -401,7 +401,7 @@ LoLEngine::~LoLEngine() {  	delete[] _mapCursorOverlay;  	delete[] _mapOverlay; -	for (Common::Array<const SpellProc*>::iterator i = _spellProcs.begin(); i != _spellProcs.end(); ++i) +	for (Common::Array<const SpellProc *>::iterator i = _spellProcs.begin(); i != _spellProcs.end(); ++i)  		delete *i;  	_spellProcs.clear(); @@ -472,8 +472,8 @@ Common::Error LoLEngine::init() {  	memset(_lvlShapeLeftRight, 0, 36 * sizeof(int16));  	_levelShapeProperties = new LevelShapeProperty[100];  	memset(_levelShapeProperties, 0, 100 * sizeof(LevelShapeProperty)); -	_levelShapes = new uint8*[400]; -	memset(_levelShapes, 0, 400 * sizeof(uint8*)); +	_levelShapes = new uint8 *[400]; +	memset(_levelShapes, 0, 400 * sizeof(uint8 *));  	_blockDrawingBuffer = new uint16[1320];  	memset(_blockDrawingBuffer, 0, 1320 * sizeof(uint16));  	_sceneWindowBuffer = new uint8[21120]; @@ -504,19 +504,19 @@ Common::Error LoLEngine::init() {  	_sceneDrawPage1 = 2;  	_sceneDrawPage2 = 6; -	_monsterShapes = new uint8*[48]; -	memset(_monsterShapes, 0, 48 * sizeof(uint8*)); -	_monsterPalettes = new uint8*[48]; -	memset(_monsterPalettes, 0, 48 * sizeof(uint8*)); +	_monsterShapes = new uint8 *[48]; +	memset(_monsterShapes, 0, 48 * sizeof(uint8 *)); +	_monsterPalettes = new uint8 *[48]; +	memset(_monsterPalettes, 0, 48 * sizeof(uint8 *)); -	_monsterShapesEx = new uint8*[576]; -	memset(_monsterShapesEx, 0, 576 * sizeof(uint8*)); +	_monsterShapesEx = new uint8 *[576]; +	memset(_monsterShapesEx, 0, 576 * sizeof(uint8 *));  	memset(&_scriptData, 0, sizeof(EMCData));  	_hasTempDataFlags = 0;  	_activeMagicMenu = -1; -	_automapShapes = new const uint8*[109]; +	_automapShapes = new const uint8 *[109];  	_mapOverlay = new uint8[256];  	memset(_availableSpells, -1, 8); @@ -634,7 +634,7 @@ void LoLEngine::loadItemIconShapes() {  	_screen->loadBitmap("ITEMICN.SHP", 3, 3, 0);  	const uint8 *shp = _screen->getCPagePtr(3);  	_numItemIconShapes = READ_LE_UINT16(shp); -	_itemIconShapes = new uint8*[_numItemIconShapes]; +	_itemIconShapes = new uint8 *[_numItemIconShapes];  	for (int i = 0; i < _numItemIconShapes; i++)  		_itemIconShapes[i] = _screen->makeShapeCopy(shp, i); @@ -644,7 +644,7 @@ void LoLEngine::loadItemIconShapes() {  		_screen->loadBitmap("GAMESHP.SHP", 3, 3, 0);  		shp = _screen->getCPagePtr(3);  		_numGameShapes = READ_LE_UINT16(shp); -		_gameShapes = new uint8*[_numGameShapes]; +		_gameShapes = new uint8 *[_numGameShapes];  		for (int i = 0; i < _numGameShapes; i++)  			_gameShapes[i] = _screen->makeShapeCopy(shp, i);  	} @@ -824,42 +824,42 @@ void LoLEngine::startup() {  	_screen->loadBitmap("ITEMSHP.SHP", 3, 3, 0);  	const uint8 *shp = _screen->getCPagePtr(3);  	_numItemShapes = READ_LE_UINT16(shp); -	_itemShapes = new uint8*[_numItemShapes]; +	_itemShapes = new uint8 *[_numItemShapes];  	for (int i = 0; i < _numItemShapes; i++)  		_itemShapes[i] = _screen->makeShapeCopy(shp, i);  	_screen->loadBitmap("THROWN.SHP", 3, 3, 0);  	shp = _screen->getCPagePtr(3);  	_numThrownShapes = READ_LE_UINT16(shp); -	_thrownShapes = new uint8*[_numThrownShapes]; +	_thrownShapes = new uint8 *[_numThrownShapes];  	for (int i = 0; i < _numThrownShapes; i++)  		_thrownShapes[i] = _screen->makeShapeCopy(shp, i);  	_screen->loadBitmap("ICE.SHP", 3, 3, 0);  	shp = _screen->getCPagePtr(3);  	_numEffectShapes = READ_LE_UINT16(shp); -	_effectShapes = new uint8*[_numEffectShapes]; +	_effectShapes = new uint8 *[_numEffectShapes];  	for (int i = 0; i < _numEffectShapes; i++)  		_effectShapes[i] = _screen->makeShapeCopy(shp, i);  	_screen->loadBitmap("FIREBALL.SHP", 3, 3, 0);  	shp = _screen->getCPagePtr(3);  	_numFireballShapes = READ_LE_UINT16(shp); -	_fireballShapes = new uint8*[_numFireballShapes]; +	_fireballShapes = new uint8 *[_numFireballShapes];  	for (int i = 0; i < _numFireballShapes; i++)  		_fireballShapes[i] = _screen->makeShapeCopy(shp, i);  	_screen->loadBitmap("HEAL.SHP", 3, 3, 0);  	shp = _screen->getCPagePtr(3);  	_numHealShapes = READ_LE_UINT16(shp); -	_healShapes = new uint8*[_numHealShapes]; +	_healShapes = new uint8 *[_numHealShapes];  	for (int i = 0; i < _numHealShapes; i++)  		_healShapes[i] = _screen->makeShapeCopy(shp, i);  	_screen->loadBitmap("HEALI.SHP", 3, 3, 0);  	shp = _screen->getCPagePtr(3);  	_numHealiShapes = READ_LE_UINT16(shp); -	_healiShapes = new uint8*[_numHealiShapes]; +	_healiShapes = new uint8 *[_numHealiShapes];  	for (int i = 0; i < _numHealiShapes; i++)  		_healiShapes[i] = _screen->makeShapeCopy(shp, i); @@ -1671,8 +1671,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; @@ -1939,7 +1939,7 @@ void LoLEngine::giveItemToMonster(MonsterInPlay *monster, uint16 item) {  }  const uint16 *LoLEngine::getCharacterOrMonsterStats(int id) { -	return (id & 0x8000) ? (const uint16*)_monsters[id & 0x7fff].properties->fightingStats : _characters[id].defaultModifiers; +	return (id & 0x8000) ? (const uint16 *)_monsters[id & 0x7fff].properties->fightingStats : _characters[id].defaultModifiers;  }  uint16 *LoLEngine::getCharacterOrMonsterItemsMight(int id) { @@ -4145,7 +4145,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; @@ -4256,7 +4256,7 @@ void LoLEngine::drawMapPage(int pageNum) {  		sx = mapGetStartPosX();  		sy = mapGetStartPosY(); -		uint16 *legendData = (uint16*)_tempBuffer5120; +		uint16 *legendData = (uint16 *)_tempBuffer5120;  		uint8 yOffset = _flags.use16ColorMode ? 4 : 0;  		for (int ii = 0; ii < 32; ii++)  { diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 65ae6c2695..b5a657ac15 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -830,14 +830,14 @@ private:  	// tim opcode  	void setupOpcodeTable(); -	Common::Array<const TIMOpcode*> _timIntroOpcodes; +	Common::Array<const TIMOpcode *> _timIntroOpcodes;  	int tlol_setupPaletteFade(const TIM *tim, const uint16 *param);  	int tlol_loadPalette(const TIM *tim, const uint16 *param);  	int tlol_setupPaletteFadeEx(const TIM *tim, const uint16 *param);  	int tlol_processWsaFrame(const TIM *tim, const uint16 *param);  	int tlol_displayText(const TIM *tim, const uint16 *param); -	Common::Array<const TIMOpcode*> _timOutroOpcodes; +	Common::Array<const TIMOpcode *> _timOutroOpcodes;  	int tlol_fadeInScene(const TIM *tim, const uint16 *param);  	int tlol_unusedResourceFunc(const TIM *tim, const uint16 *param);  	int tlol_fadeInPalette(const TIM *tim, const uint16 *param); @@ -846,7 +846,7 @@ private:  	int tlol_delayForChat(const TIM *tim, const uint16 *param);  	int tlol_fadeOutSound(const TIM *tim, const uint16 *param); -	Common::Array<const TIMOpcode*> _timIngameOpcodes; +	Common::Array<const TIMOpcode *> _timIngameOpcodes;  	int tlol_initSceneWindowDialogue(const TIM *tim, const uint16 *param);  	int tlol_restoreAfterSceneWindowDialogue(const TIM *tim, const uint16 *param);  	int tlol_giveItem(const TIM *tim, const uint16 *param); @@ -1343,9 +1343,9 @@ private:  	uint8 *_pageBuffer2;  	// spells -	typedef Common::Functor1Mem<ActiveSpell*, int, LoLEngine> SpellProc; -	Common::Array<const SpellProc*> _spellProcs; -	typedef void (LoLEngine::*SpellProcCallback)(WSAMovie_v2*, int, int); +	typedef Common::Functor1Mem<ActiveSpell *, int, LoLEngine> SpellProc; +	Common::Array<const SpellProc *> _spellProcs; +	typedef void (LoLEngine::*SpellProcCallback)(WSAMovie_v2 *, int, int);  	int castSpell(int charNum, int spellType, int spellLevel); diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 0081e96af6..7983be9a68 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -74,12 +74,12 @@ public:  	bool exists(const char *file, bool errorOutOnFail=false);  	uint32 getFileSize(const char *file); -	uint8* fileData(const char *file, uint32 *size); +	uint8 *fileData(const char *file, uint32 *size);  	Common::SeekableReadStream *createReadStream(const Common::String &file);  	bool loadFileToBuf(const char *file, void *buf, uint32 maxSize);  protected: -	typedef Common::HashMap<Common::String, Common::Archive*, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> ArchiveMap; +	typedef Common::HashMap<Common::String, Common::Archive *, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> ArchiveMap;  	ArchiveMap _archiveCache;  	Common::SearchSet _files; diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp index 49c2c85a32..1021cface5 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,12 +822,12 @@ 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) {  					*s2 = (uint16)(~cnt2); -					*(uint32*)&bt[cnt2] = 0; +					*(uint32 *)&bt[cnt2] = 0;  					cnt2 += 2;  				} @@ -844,7 +844,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex  }  uint8 FileExpander::calcCmdAndIndex(const uint8 *tbl, int16 ¶) { -	const uint16 *t = (const uint16*)tbl; +	const uint16 *t = (const uint16 *)tbl;  	_src->advSrcBitsByIndex(8);  	uint8 newIndex = 0;  	uint16 v = _src->getKeyLower(); @@ -1239,7 +1239,7 @@ uint8 *CmpVocDecoder::process(uint8 *src, uint32 insize, uint32 *outsize, bool d  			for (int i = -128; i < 128; i++)  				_stTbl[i + 128] = (int32)((float)i / t + 0.5f); -			int8 *ps = (int8*)_sndArray; +			int8 *ps = (int8 *)_sndArray;  			for (int i = 0; i < 8192; i++)  				_floatArray[i + 1] = _stTbl[128 + *ps++]; diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index d088aeb66d..7f3959d5fe 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -352,8 +352,8 @@ void Screen::scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int  		for (int x = 0; x < w; ++x, dstL1 += 2, dstL2 += 2) {  			uint16 col = *src++;  			col |= col << 8; -			*(uint16*)(dstL1) = col; -			*(uint16*)(dstL2) = col; +			*(uint16 *)(dstL1) = col; +			*(uint16 *)(dstL2) = col;  		}  		dstL1 += dstAdd; dstL2 += dstAdd;  		src += srcAdd; @@ -1272,19 +1272,19 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int  	_dsDrawLayer = 0;  	if (flags & 0x8000) { -		_dsTable2 = va_arg(args, uint8*); +		_dsTable2 = va_arg(args, uint8 *);  	}  	if (flags & 0x100) { -		_dsTable = va_arg(args, uint8*); +		_dsTable = va_arg(args, uint8 *);  		_dsTableLoopCount = va_arg(args, int);  		if (!_dsTableLoopCount)  			flags &= ~0x100;  	}  	if (flags & 0x1000) { -		_dsTable3 = va_arg(args, uint8*); -		_dsTable4 = va_arg(args, uint8*); +		_dsTable3 = va_arg(args, uint8 *); +		_dsTable4 = va_arg(args, uint8 *);  	}  	if (flags & 0x200) { @@ -1309,7 +1309,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int  	}  	if ((flags & 0x2000) && _vm->gameFlags().gameID != GI_KYRA1) -		_dsTable5 = va_arg(args,  uint8*); +		_dsTable5 = va_arg(args, uint8 *);  	static const DsMarginSkipFunc dsMarginFunc[] = {  		&Screen::drawShapeMarginNoScaleUpwind, diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index 6b94043005..e350d2c977 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -658,8 +658,8 @@ void Screen_LoL::copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, in  	if (mode == 2) {  		va_list args;  		va_start(args, mode); -		table1 = va_arg(args, uint8*); -		table2 = va_arg(args, uint8*); +		table1 = va_arg(args, uint8 *); +		table2 = va_arg(args, uint8 *);  		va_end(args);  	} diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp index f5e5188fd5..0343cbfeae 100644 --- a/engines/kyra/script.cpp +++ b/engines/kyra/script.cpp @@ -102,7 +102,7 @@ bool EMCInterpreter::callback(Common::IFFChunk &chunk) {  	return false;  } -bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Common::Array<const Opcode*> *opcodes) { +bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Common::Array<const Opcode *> *opcodes) {  	Common::SeekableReadStream *stream = _vm->resource()->createReadStream(filename);  	if (!stream) {  		error("Couldn't open script file '%s'", filename); diff --git a/engines/kyra/script.h b/engines/kyra/script.h index 94315ff8a9..68620829bb 100644 --- a/engines/kyra/script.h +++ b/engines/kyra/script.h @@ -34,7 +34,7 @@  namespace Kyra {  struct EMCState; -typedef Common::Functor1<EMCState*, int> Opcode; +typedef Common::Functor1<EMCState *, int> Opcode;  struct EMCData {  	char filename[13]; @@ -44,7 +44,7 @@ struct EMCData {  	uint16 *ordr;  	uint16 dataSize; -	const Common::Array<const Opcode*> *sysFuncs; +	const Common::Array<const Opcode *> *sysFuncs;  };  struct EMCState { diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 3e748e7471..f30f5787e7 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -1477,17 +1477,17 @@ int KyraEngine_HoF::t2_playSoundEffect(const TIM *tim, const uint16 *param) {  #pragma mark - -typedef Common::Functor1Mem<EMCState*, int, KyraEngine_HoF> OpcodeV2; +typedef Common::Functor1Mem<EMCState *, int, KyraEngine_HoF> OpcodeV2;  #define SetOpcodeTable(x) table = &x;  #define Opcode(x) table->push_back(new OpcodeV2(this, &KyraEngine_HoF::x))  #define OpcodeUnImpl() table->push_back(new OpcodeV2(this, 0)) -typedef Common::Functor2Mem<const TIM*, const uint16*, int, KyraEngine_HoF> TIMOpcodeV2; +typedef Common::Functor2Mem<const TIM *, const uint16 *, int, KyraEngine_HoF> TIMOpcodeV2;  #define OpcodeTim(x) _timOpcodes.push_back(new TIMOpcodeV2(this, &KyraEngine_HoF::x))  #define OpcodeTimUnImpl() _timOpcodes.push_back(new TIMOpcodeV2(this, 0))  void KyraEngine_HoF::setupOpcodeTable() { -	Common::Array<const Opcode*> *table = 0; +	Common::Array<const Opcode *> *table = 0;  	_opcodes.reserve(176);  	SetOpcodeTable(_opcodes); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 0a0799f0ae..1b4a11f793 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -1754,7 +1754,7 @@ int KyraEngine_LoK::o1_dummy(EMCState *script) {  #pragma mark - -typedef Common::Functor1Mem<EMCState*, int, KyraEngine_LoK> OpcodeV1; +typedef Common::Functor1Mem<EMCState *, int, KyraEngine_LoK> OpcodeV1;  #define SetOpcodeTable(x) table = &x;  #define Opcode(x) table->push_back(new OpcodeV1(this, &KyraEngine_LoK::x))  void KyraEngine_LoK::setupOpcodeTable() { diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index 810b36f94b..1034e86d4e 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -2690,7 +2690,7 @@ int LoLEngine::tlol_delayForChat(const TIM *tim, const uint16 *param) {  #pragma mark - -typedef Common::Functor1Mem<EMCState*, int, LoLEngine> OpcodeV2; +typedef Common::Functor1Mem<EMCState *, int, LoLEngine> OpcodeV2;  #define SetOpcodeTable(x) table = &x;  #define Opcode(x) table->push_back(new OpcodeV2(this, &LoLEngine::x))  #define OpcodeUnImpl() table->push_back(new OpcodeV2(this, 0)) @@ -2701,7 +2701,7 @@ typedef Common::Functor2Mem<const TIM *, const uint16 *, int, LoLEngine> TIMOpco  #define OpcodeTimUnImpl() timTable->push_back(new TIMOpcodeLoL(this, 0))  void LoLEngine::setupOpcodeTable() { -	Common::Array<const Opcode*> *table = 0; +	Common::Array<const Opcode *> *table = 0;  	_opcodes.reserve(192);  	SetOpcodeTable(_opcodes); @@ -2993,7 +2993,7 @@ void LoLEngine::setupOpcodeTable() {  	Opcode(olol_getLanguage);  	Opcode(olol_dummy0); -	Common::Array<const TIMOpcode*> *timTable = 0; +	Common::Array<const TIMOpcode *> *timTable = 0;  	_timIntroOpcodes.reserve(8);  	SetTimOpcodeTable(_timIntroOpcodes); diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index b404747eb6..ae125b5b99 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -1137,12 +1137,12 @@ int KyraEngine_MR::o3d_delay(EMCState *script) {  #pragma mark - -typedef Common::Functor1Mem<EMCState*, int, KyraEngine_MR> OpcodeV3; +typedef Common::Functor1Mem<EMCState *, int, KyraEngine_MR> OpcodeV3;  #define SetOpcodeTable(x) table = &x;  #define Opcode(x) table->push_back(new OpcodeV3(this, &KyraEngine_MR::x))  #define OpcodeUnImpl() table->push_back(new OpcodeV3(this, 0))  void KyraEngine_MR::setupOpcodeTable() { -	Common::Array<const Opcode*> *table = 0; +	Common::Array<const Opcode *> *table = 0;  	_opcodes.reserve(176);  	SetOpcodeTable(_opcodes); diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 97fefa2a93..4ec6e7f349 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -604,7 +604,7 @@ int TIMInterpreter::execCommand(int cmd, const uint16 *param) {  		return 0;  	} -	debugC(5, kDebugLevelScript, "TIMInterpreter::%s(%p)", _commands[cmd].desc, (const void* )param); +	debugC(5, kDebugLevelScript, "TIMInterpreter::%s(%p)", _commands[cmd].desc, (const void *)param);  	return (this->*_commands[cmd].proc)(param);  } @@ -1171,7 +1171,7 @@ int TIMInterpreter_LoL::execCommand(int cmd, const uint16 *param) {  		return 0;  	} -	debugC(5, kDebugLevelScript, "TIMInterpreter::%s(%p)", _commands[cmd].desc, (const void* )param); +	debugC(5, kDebugLevelScript, "TIMInterpreter::%s(%p)", _commands[cmd].desc, (const void *)param);  	return (this->*_commands[cmd].proc)(param);  } diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h index ff22f790c9..91f2e8589e 100644 --- a/engines/kyra/script_tim.h +++ b/engines/kyra/script_tim.h @@ -106,7 +106,7 @@ private:  };  struct TIM; -typedef Common::Functor2<const TIM*, const uint16*, int> TIMOpcode; +typedef Common::Functor2<const TIM *, const uint16 *, int> TIMOpcode;  struct TIM {  	char filename[13]; @@ -148,7 +148,7 @@ struct TIM {  	uint16 *avtl;  	uint8 *text; -	const Common::Array<const TIMOpcode*> *opcodes; +	const Common::Array<const TIMOpcode *> *opcodes;  	// TODO: Get rid of this ugly HACK to allow the  	// Lands of Lore outro to be working properly. @@ -161,7 +161,7 @@ public:  	TIMInterpreter(KyraEngine_v1 *engine, Screen_v2 *screen_v2, OSystem *system);  	virtual ~TIMInterpreter(); -	TIM *load(const char *filename, const Common::Array<const TIMOpcode*> *opcodes); +	TIM *load(const char *filename, const Common::Array<const TIMOpcode *> *opcodes);  	void unload(TIM *&tim) const;  	bool callback(Common::IFFChunk &chunk); diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp index 8e048cad25..5160224591 100644 --- a/engines/kyra/seqplayer.cpp +++ b/engines/kyra/seqplayer.cpp @@ -579,7 +579,7 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) {  		SEQOP(2, s1_prefetchVocFile)  	}; -	const SeqEntry* commands; +	const SeqEntry *commands;  	int numCommands;  	if (_vm->gameFlags().isTalkie) { diff --git a/engines/kyra/seqplayer.h b/engines/kyra/seqplayer.h index 7e1b06d955..b75410af53 100644 --- a/engines/kyra/seqplayer.h +++ b/engines/kyra/seqplayer.h @@ -59,7 +59,7 @@ protected:  	struct SeqEntry {  		uint8 len;  		SeqProc proc; -		const char* desc; +		const char *desc;  	};  	// the sequence procs diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 84b6801091..0a3e13bb26 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2556,9 +2556,9 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int  			char *str = (char *)ptr; -			ptr = (uint8*)strpbrk(str, mark); +			ptr = (uint8 *)strpbrk(str, mark);  			if (!ptr) -				ptr = (uint8*)strchr(str, 0); +				ptr = (uint8 *)strchr(str, 0);  			textData[cnt + 1].unk1 = *ptr;  			*ptr = 0; @@ -2596,7 +2596,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++;  		} diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index 75bb8fae55..9ab4aa0053 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -509,7 +509,7 @@ int AdLibDriver::snd_setSoundData(va_list &list) {  		delete[] _soundData;  		_soundData = 0;  	} -	_soundData = va_arg(list, uint8*); +	_soundData = va_arg(list, uint8 *);  	return 0;  } diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp index 10125f639e..5ded3e31e7 100644 --- a/engines/kyra/sound_amiga.cpp +++ b/engines/kyra/sound_amiga.cpp @@ -62,7 +62,7 @@ bool SoundAmiga::init() {  void SoundAmiga::loadSoundFile(uint file) {  	debugC(5, kDebugLevelSound, "SoundAmiga::loadSoundFile(%d)", file); -	static const char *const tableFilenames[3][2] = { +	static const char * const tableFilenames[3][2] = {  		{ "introscr.mx",  "introinst.mx" },  		{ "kyramusic.mx", 0 },  		{ "finalescr.mx", "introinst.mx" } @@ -70,8 +70,8 @@ void SoundAmiga::loadSoundFile(uint file) {  	assert(file < ARRAYSIZE(tableFilenames));  	if (_fileLoaded == (FileType)file)  		return; -	const char* scoreName = tableFilenames[file][0]; -	const char* sampleName = tableFilenames[file][1]; +	const char *scoreName = tableFilenames[file][0]; +	const char *sampleName = tableFilenames[file][1];  	bool loaded = false;  	Common::SeekableReadStream *scoreIn = _vm->resource()->createReadStream(scoreName); diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index daa1ccacc0..b0d3f994f2 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -377,7 +377,7 @@ 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]) @@ -390,8 +390,8 @@ void Towns_EuphonyPcmChannel::sysEx_customInstrument(uint32 type, const byte *fm  					_voice->_snd[i]->loopLength = READ_LE_UINT32(pos[ii] + 20);  					_voice->_snd[i]->samplingRate = READ_LE_UINT16(pos[ii] + 24);  					_voice->_snd[i]->keyOffset = READ_LE_UINT16(pos[ii] + 26); -					_voice->_snd[i]->keyNote = *(const uint8*)(pos[ii] + 28); -					_voice->_snd[i]->_samples = (const int8*)(pos[ii] + 32); +					_voice->_snd[i]->keyNote = *(const uint8 *)(pos[ii] + 28); +					_voice->_snd[i]->_samples = (const int8 *)(pos[ii] + 32);  				}  			}  		} @@ -579,7 +579,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); @@ -966,7 +966,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]); @@ -1900,7 +1900,7 @@ void TownsPC98_OpnChannel::processEvents() {  void TownsPC98_OpnChannel::processFrequency() {  	if (_flags & CHS_RECALCFREQ) { -		_frequency = (((const uint16*)_drv->_opnFreqTable)[_frqBlockMSB & 0x0f] + _frqLSB) | (((_frqBlockMSB & 0x70) >> 1) << 8); +		_frequency = (((const uint16 *)_drv->_opnFreqTable)[_frqBlockMSB & 0x0f] + _frqLSB) | (((_frqBlockMSB & 0x70) >> 1) << 8);  		_drv->writeReg(_part, _regOffset + 0xa4, (_frequency >> 8));  		_drv->writeReg(_part, _regOffset + 0xa0, (_frequency & 0xff)); @@ -2297,7 +2297,7 @@ void TownsPC98_OpnChannelSSG::processFrequency() {  	if (_flags & CHS_RECALCFREQ) {  		_block = _frqBlockMSB >> 4; -		_frequency = ((const uint16*)_drv->_opnFreqTableSSG)[_frqBlockMSB & 0x0f] + _frqLSB; +		_frequency = ((const uint16 *)_drv->_opnFreqTableSSG)[_frqBlockMSB & 0x0f] + _frqLSB;  		uint16 f = _frequency >> _block;  		_drv->writeReg(_part, _regOffset << 1, f & 0xff); @@ -3237,7 +3237,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) @@ -3251,7 +3251,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; @@ -3451,11 +3451,11 @@ bool TownsPC98_OpnDriver::init() {  	TownsPC98_OpnCore::init(); -	_channels = new TownsPC98_OpnChannel*[_numChan]; +	_channels = new TownsPC98_OpnChannel *[_numChan];  	for (int i = 0; i < _numChan; i++) {  		int ii = i * 6;  		_channels[i] = new TownsPC98_OpnChannel(this, _drvTables[ii], _drvTables[ii + 1], -			_drvTables[ii + 2],	_drvTables[ii + 3],	_drvTables[ii + 4], _drvTables[ii + 5]); +			_drvTables[ii + 2], _drvTables[ii + 3], _drvTables[ii + 4], _drvTables[ii + 5]);  		_channels[i]->init();  	} @@ -3463,19 +3463,19 @@ bool TownsPC98_OpnDriver::init() {  		_ssgPatches = new uint8[256];  		memcpy(_ssgPatches, _drvTables + 156, 256); -		_ssgChannels = new TownsPC98_OpnChannelSSG*[_numSSG]; +		_ssgChannels = new TownsPC98_OpnChannelSSG *[_numSSG];  		for (int i = 0; i < _numSSG; i++) {  			int ii = i * 6;  			_ssgChannels[i] = new TownsPC98_OpnChannelSSG(this, _drvTables[ii], _drvTables[ii + 1], -				_drvTables[ii + 2],	_drvTables[ii + 3],	_drvTables[ii + 4], _drvTables[ii + 5]); +				_drvTables[ii + 2], _drvTables[ii + 3], _drvTables[ii + 4], _drvTables[ii + 5]);  			_ssgChannels[i]->init();  		} -		_sfxChannels = new TownsPC98_OpnSfxChannel*[2]; +		_sfxChannels = new TownsPC98_OpnSfxChannel *[2];  		for (int i = 0; i < 2; i++) {  			int ii = (i + 1) * 6;  			_sfxChannels[i] = new TownsPC98_OpnSfxChannel(this, _drvTables[ii], _drvTables[ii + 1], -				_drvTables[ii + 2],	_drvTables[ii + 3],	_drvTables[ii + 4], _drvTables[ii + 5]); +				_drvTables[ii + 2], _drvTables[ii + 3], _drvTables[ii + 4], _drvTables[ii + 5]);  			_sfxChannels[i]->init();  		}  	} @@ -3880,7 +3880,7 @@ void SoundTowns::playSoundEffect(uint8 track) {  	if (offset == -1)  		return; -	uint32 *sfxHeader = (uint32*)(fileBody + offset); +	uint32 *sfxHeader = (uint32 *)(fileBody + offset);  	uint32 sfxHeaderID = READ_LE_UINT32(sfxHeader);  	uint32 sfxHeaderInBufferSize = READ_LE_UINT32(&sfxHeader[1]); @@ -4261,7 +4261,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/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp index a4ff0684f7..3b63618d6d 100644 --- a/engines/kyra/sprites_lol.cpp +++ b/engines/kyra/sprites_lol.cpp @@ -97,7 +97,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy  		uint8 numCol = *tmpPal2;  		for (int ii = 0; ii < numCol; ii++) { -			uint8 *cl = (uint8*)memchr(tmpPal1, tmpPal2[1 + ii], 64); +			uint8 *cl = (uint8 *)memchr(tmpPal1, tmpPal2[1 + ii], 64);  			if (!cl)  				continue;  			tmpPal3[ii] = (uint16) (cl - tmpPal1); diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 38526cb997..2f2acd78d1 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -537,9 +537,9 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi  		tmp_s[i].flags = stream.readUint16BE();  		tmp_s[i].wsaFile = new char[14]; -		stream.read(const_cast<char*>(tmp_s[i].wsaFile), 14); +		stream.read(const_cast<char *>(tmp_s[i].wsaFile), 14);  		tmp_s[i].cpsFile = new char[14]; -		stream.read(const_cast<char*>(tmp_s[i].cpsFile), 14); +		stream.read(const_cast<char *>(tmp_s[i].cpsFile), 14);  		tmp_s[i].startupCommand = stream.readByte();  		tmp_s[i].finalCommand = stream.readByte();  		tmp_s[i].stringIndex1 = stream.readUint16BE(); @@ -563,7 +563,7 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi  		tmp_n[i].flags = stream.readUint16BE();  		tmp_n[i].wsaFile = new char[14]; -		stream.read(const_cast<char*>(tmp_n[i].wsaFile), 14); +		stream.read(const_cast<char *>(tmp_n[i].wsaFile), 14);  		tmp_n[i].startframe = stream.readUint16BE();  		tmp_n[i].endFrame = stream.readUint16BE();  		tmp_n[i].frameDelay = stream.readUint16BE(); @@ -1225,7 +1225,7 @@ void KyraEngine_HoF::initStaticResource() {  	// replace sequence talkie files with localized versions  	const char *const *seqSoundList = _staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize);  	const char *const *tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmpSize); -	char **tmpSndLst = new char*[_sequenceSoundListSize]; +	char **tmpSndLst = new char *[_sequenceSoundListSize];  	for (int i = 0; i < _sequenceSoundListSize; i++) {  		const int len = strlen(seqSoundList[i]); @@ -1452,7 +1452,7 @@ void LoLEngine::initStaticResource() {  	const char *const *tmpSndList = _staticres->loadStrings(kLolIngameSfxFiles, _ingameSoundListSize);  	if (tmpSndList) { -		_ingameSoundList = new char*[_ingameSoundListSize]; +		_ingameSoundList = new char *[_ingameSoundListSize];  		for (int i = 0; i < _ingameSoundListSize; i++) {  			_ingameSoundList[i] = new char[strlen(tmpSndList[i]) + 1];  			strcpy(_ingameSoundList[i], tmpSndList[i]); @@ -1507,7 +1507,7 @@ void LoLEngine::initStaticResource() {  		_staticres->unloadId(kLolLightningDefs);  	} -	_fireBallCoords = (const int16*)_staticres->loadRawDataBe16(kLolFireballCoords, _fireBallCoordsSize); +	_fireBallCoords = (const int16 *)_staticres->loadRawDataBe16(kLolFireballCoords, _fireBallCoordsSize);  	_buttonCallbacks.clear();  	_buttonCallbacks.reserve(95); @@ -1894,7 +1894,7 @@ void KyraEngine_LoK::setupButtonData() {  	_buttonData = new Button[15];  	assert(_buttonData); -	_buttonDataListPtr = new Button*[15]; +	_buttonDataListPtr = new Button *[15];  	assert(_buttonDataListPtr);  	GUI_V1_BUTTON(_buttonData[1], 0x01, 1, 1, 1, 0x0487, 0, 0x009, 0xA4, 0x36, 0x1E, 0); diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp index b8f79c7644..3a7d1ed0de 100644 --- a/engines/kyra/timer_lok.cpp +++ b/engines/kyra/timer_lok.cpp @@ -131,8 +131,8 @@ void KyraEngine_LoK::setTextFadeTimerCountdown(int16 countdown) {  }  void KyraEngine_LoK::timerSetFlags2(int timerNum) { -	if (!((uint32*)(_flagsTable+0x2D))[timerNum]) -		((uint32*)(_flagsTable+0x2D))[timerNum] = 1; +	if (!((uint32 *)(_flagsTable+0x2D))[timerNum]) +		((uint32 *)(_flagsTable+0x2D))[timerNum] = 1;  }  void KyraEngine_LoK::timerCheckAnimFlag1(int timerNum) {  | 
