[Scummvm-cvs-logs] scummvm master -> bee175ae5088f42a9eca61c3c1755de2dbfb8c3c

lordhoto lordhoto at gmail.com
Wed Jan 9 06:18:15 CET 2013


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8d5b4b75d4 KYRA: Make all hex constants use uppercase letters.
8520475153 KYRA: Mark overloaded methods of Sound subclasses as virtual.
bee175ae50 KYRA: Get rid of some unnecessary overwrites.


Commit: 8d5b4b75d406bb56130fb4ccd91edda4ba1f4906
    https://github.com/scummvm/scummvm/commit/8d5b4b75d406bb56130fb4ccd91edda4ba1f4906
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-01-08T21:01:28-08:00

Commit Message:
KYRA: Make all hex constants use uppercase letters.

Done with:
git ls-files "*.cpp" *".h" | xargs sed -i -e 's/0x\([0-9a-f]*\)/0x\U\1/g'

Changed paths:
    engines/kyra/chargen.cpp
    engines/kyra/darkmoon.cpp
    engines/kyra/eob.cpp
    engines/kyra/eobcommon.cpp
    engines/kyra/gui_eob.cpp
    engines/kyra/gui_hof.cpp
    engines/kyra/gui_lol.cpp
    engines/kyra/gui_lol.h
    engines/kyra/gui_rpg.cpp
    engines/kyra/items_eob.cpp
    engines/kyra/items_hof.cpp
    engines/kyra/items_lok.cpp
    engines/kyra/items_lol.cpp
    engines/kyra/kyra_rpg.cpp
    engines/kyra/lol.cpp
    engines/kyra/magic_eob.cpp
    engines/kyra/resource_intern.cpp
    engines/kyra/saveload_eob.cpp
    engines/kyra/saveload_lol.cpp
    engines/kyra/scene_eob.cpp
    engines/kyra/scene_lol.cpp
    engines/kyra/scene_rpg.cpp
    engines/kyra/screen.cpp
    engines/kyra/screen_eob.cpp
    engines/kyra/screen_hof.cpp
    engines/kyra/screen_lol.cpp
    engines/kyra/screen_v2.cpp
    engines/kyra/script_eob.cpp
    engines/kyra/script_hof.cpp
    engines/kyra/script_lok.cpp
    engines/kyra/script_lol.cpp
    engines/kyra/script_mr.cpp
    engines/kyra/script_tim.cpp
    engines/kyra/sequences_darkmoon.cpp
    engines/kyra/sequences_eob.cpp
    engines/kyra/sequences_hof.cpp
    engines/kyra/sequences_lok.cpp
    engines/kyra/sequences_lol.cpp
    engines/kyra/sound.h
    engines/kyra/sound_adlib.cpp
    engines/kyra/sound_adlib.h
    engines/kyra/sound_digital.cpp
    engines/kyra/sound_intern.h
    engines/kyra/sound_lol.cpp
    engines/kyra/sound_towns.cpp
    engines/kyra/sprites_eob.cpp
    engines/kyra/sprites_lol.cpp
    engines/kyra/sprites_rpg.cpp
    engines/kyra/staticres.cpp
    engines/kyra/staticres_eob.cpp
    engines/kyra/staticres_lol.cpp
    engines/kyra/text_hof.cpp
    engines/kyra/text_lol.cpp
    engines/kyra/text_rpg.cpp
    engines/kyra/timer_eob.cpp
    engines/kyra/timer_lol.cpp
    engines/kyra/vqa.cpp



diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index 7ea2feb..80a95da 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -193,7 +193,7 @@ bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) {
 		}
 
 		if (inputFlag & 0x8000) {
-			inputFlag = (inputFlag & 0x0f) - 1;
+			inputFlag = (inputFlag & 0x0F) - 1;
 			if (inputFlag == 4) {
 				loop = false;
 			} else {
@@ -402,7 +402,7 @@ int CharacterGenerator::viewDeleteCharacter() {
 		}
 
 		if (inputFlag & 0x8000) {
-			inputFlag = (inputFlag & 0x0f) - 1;
+			inputFlag = (inputFlag & 0x0F) - 1;
 			if (inputFlag == 4) {
 				res = 1;
 				loop = false;
@@ -524,7 +524,7 @@ int CharacterGenerator::classMenu(int raceSex) {
 
 	while (res == -1 && !_vm->shouldQuit()) {
 		updateMagicShapes();
-		int in = getInput(0) & 0xff;
+		int in = getInput(0) & 0xFF;
 		Common::Point mp = _vm->getMousePos();
 
 		if (in == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_b]) {
@@ -572,7 +572,7 @@ int CharacterGenerator::alignmentMenu(int cClass) {
 
 	while (res == -1 && !_vm->shouldQuit()) {
 		updateMagicShapes();
-		int in = getInput(0) & 0xff;
+		int in = getInput(0) & 0xFF;
 		Common::Point mp = _vm->getMousePos();
 
 		if (in == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_ESCAPE] || _vm->_gui->_menuLastInFlags == _vm->_keyMap[Common::KEYCODE_b]) {
@@ -658,14 +658,14 @@ void CharacterGenerator::generateStats(int index) {
 			sv[i] = _chargenMaxStats[i];
 	}
 
-	c->strengthCur = c->strengthMax = sv[0] & 0xff;
+	c->strengthCur = c->strengthMax = sv[0] & 0xFF;
 	c->strengthExtCur = c->strengthExtMax = sv[0] >> 8;
-	c->intelligenceCur = c->intelligenceMax = sv[1] & 0xff;
-	c->wisdomCur = c->wisdomMax = sv[2] & 0xff;
-	c->dexterityCur = c->dexterityMax = sv[3] & 0xff;
-	c->constitutionCur = c->constitutionMax = sv[4] & 0xff;
-	c->charismaCur = c->charismaMax = sv[5] & 0xff;
-	c->armorClass = 10 + _vm->getDexterityArmorClassModifier(sv[3] & 0xff);
+	c->intelligenceCur = c->intelligenceMax = sv[1] & 0xFF;
+	c->wisdomCur = c->wisdomMax = sv[2] & 0xFF;
+	c->dexterityCur = c->dexterityMax = sv[3] & 0xFF;
+	c->constitutionCur = c->constitutionMax = sv[4] & 0xFF;
+	c->charismaCur = c->charismaMax = sv[5] & 0xFF;
+	c->armorClass = 10 + _vm->getDexterityArmorClassModifier(sv[3] & 0xFF);
 	c->hitPointsCur = 0;
 
 	for (int l = 0; l < 3; l++) {
@@ -817,7 +817,7 @@ void CharacterGenerator::faceSelectMenu() {
 			} else if (in == _vm->_keyMap[Common::KEYCODE_RETURN] || in == _vm->_keyMap[Common::KEYCODE_KP5]) {
 				in = 3;
 			} else if (in & 0x8000) {
-				in &= 0xff;
+				in &= 0xFF;
 			} else {
 				in = 0;
 			}
@@ -1017,7 +1017,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
 			ci = -2;
 
 		} else if (inputFlag & 0x8000) {
-			inputFlag = (inputFlag & 0x0f) - 1;
+			inputFlag = (inputFlag & 0x0F) - 1;
 			if (index != inputFlag) {
 				ci = inputFlag;
 				loop = false;
@@ -1037,7 +1037,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
 				v2--;
 			}
 
-			v1 = CLIP<uint8>(v1, _chargenMinStats[index], _chargenMaxStats[index] & 0xff);
+			v1 = CLIP<uint8>(v1, _chargenMinStats[index], _chargenMaxStats[index] & 0xFF);
 			v2 = (v1 == 18 && _chargenMaxStats[index] >= 19) ? CLIP<uint8>(v2, 0, 100) : 0;
 			if (s2)
 				*s2 = v2;
@@ -1614,7 +1614,7 @@ int TransferPartyWiz::selectCharactersMenu() {
 	bool update = false;
 
 	for (bool loop = true; loop && (!_vm->shouldQuit());) {
-		int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+		int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
 		_vm->removeInputTop();
 
 		if (inputFlag) {
@@ -1827,7 +1827,7 @@ Item TransferPartyWiz::convertItem(Item eob1Item) {
 	itm2->flags = itm1->flags | 0x40;
 	itm2->icon = itm1->icon;
 	itm2->type = itm1->type;
-	itm2->level = 0xff;
+	itm2->level = 0xFF;
 
 	switch (itm2->type) {
 	case 35:
@@ -1850,7 +1850,7 @@ Item TransferPartyWiz::convertItem(Item eob1Item) {
 			return 0;
 		}
 		itm2->value = itm1->value;
-		itm2->flags = ((itm1->flags & 0x3f) + 3) | 0x40;
+		itm2->flags = ((itm1->flags & 0x3F) + 3) | 0x40;
 		break;
 	case 18:
 		itm2->icon = 19;
@@ -1860,7 +1860,7 @@ Item TransferPartyWiz::convertItem(Item eob1Item) {
 		break;
 	}
 
-	switch ((_vm->_itemTypes[itm2->type].extraProperties & 0x7f) - 1) {
+	switch ((_vm->_itemTypes[itm2->type].extraProperties & 0x7F) - 1) {
 	case 0:
 	case 1:
 	case 2:
diff --git a/engines/kyra/darkmoon.cpp b/engines/kyra/darkmoon.cpp
index 054b2b2..130fb10 100644
--- a/engines/kyra/darkmoon.cpp
+++ b/engines/kyra/darkmoon.cpp
@@ -136,7 +136,7 @@ void DarkMoonEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
 	if (itm->type == 48 || itm->type == 62) {
 		if (itm->value == 5)
 			return;
-		int charges = itm->flags & 0x3f;
+		int charges = itm->flags & 0x3F;
 		if (--charges)
 			--itm->flags;
 		else
@@ -450,7 +450,7 @@ void DarkMoonEngine::characterLevelGain(int charIndex) {
 	int s = _numLevelsPerClass[c->cClass];
 	for (int i = 0; i < s; i++) {
 		uint32 er = getRequiredExperience(c->cClass, i, c->level[i] + 1);
-		if (er == 0xffffffff)
+		if (er == 0xFFFFFFFF)
 			continue;
 
 		increaseCharacterExperience(charIndex, er - c->experience[i] + 1);
diff --git a/engines/kyra/eob.cpp b/engines/kyra/eob.cpp
index a7bde9f..4e1707b 100644
--- a/engines/kyra/eob.cpp
+++ b/engines/kyra/eob.cpp
@@ -316,7 +316,7 @@ void EoBEngine::runNpcDialogue(int npcIndex) {
 void EoBEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
 	EoBItem *itm = &_items[_characters[charIndex].inventory[slot]];
 	if (itm->type == 48) {
-		int charges = itm->flags & 0x3f;
+		int charges = itm->flags & 0x3F;
 		if (--charges)
 			--itm->flags;
 		else
@@ -359,7 +359,7 @@ void EoBEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int s
 	_screen->loadShapeSetBitmap("DOOR", 5, 3);
 	_screen->_curPage = 2;
 
-	if (doorType1 != 0xff) {
+	if (doorType1 != 0xFF) {
 		for (int i = 0; i < 3; i++) {
 			const uint8 *enc = &_doorShapeEncodeDefs[(doorType1 * 3 + i) << 2];
 			_doorShapes[shapeId1 + i] = _screen->encodeShape(enc[0], enc[1], enc[2], enc[3], false, (_flags.gameID == GI_EOB1) ? _cgaMappingLevel[_cgaLevelMappingIndex[_currentLevel - 1]] : 0);
@@ -370,7 +370,7 @@ void EoBEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int s
 		}
 	}
 
-	if (doorType2 != 0xff) {
+	if (doorType2 != 0xFF) {
 		for (int i = 0; i < 3; i++) {
 			const uint8 *enc = &_doorShapeEncodeDefs[(doorType2 * 3 + i) << 2];
 			_doorShapes[shapeId2 + i] = _screen->encodeShape(enc[0], enc[1], enc[2], enc[3], false, (_flags.gameID == GI_EOB1) ? _cgaMappingLevel[_cgaLevelMappingIndex[_currentLevel - 1]] : 0);
@@ -460,7 +460,7 @@ void EoBEngine::turnUndeadAuto() {
 	int oc = _openBookChar;
 
 	for (int i = 0; i < 6; i++) {
-		if (!testCharacter(i, 0x0d))
+		if (!testCharacter(i, 0x0D))
 			continue;
 
 		EoBCharacter *c = &_characters[i];
@@ -505,7 +505,7 @@ bool EoBEngine::checkPartyStatusExtra() {
 	_txt->printMessage(_menuStringsDefeat[0]);
 	while (!shouldQuit()) {
 		removeInputTop();
-		if (checkInput(0, false, 0) & 0xff)
+		if (checkInput(0, false, 0) & 0xFF)
 			break;
 	}
 	_screen->copyPage(10, 0);
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index 6c899b8..d477209 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -364,7 +364,7 @@ void EoBCoreEngine::initKeymap() {
 }
 
 Common::Error EoBCoreEngine::init() {
-	// In EOB the timer proc is directly invoked via interrupt 0x1c, 18.2 times per second.
+	// In EOB the timer proc is directly invoked via interrupt 0x1C, 18.2 times per second.
 	// This makes a tick length of 54.94.
 	_tickLength = 55;
 
@@ -488,8 +488,8 @@ Common::Error EoBCoreEngine::init() {
 
 	_monsterFlashOverlay = new uint8[16];
 	_monsterStoneOverlay = new uint8[16];
-	memset(_monsterFlashOverlay, (_configRenderMode == Common::kRenderCGA) ? 0xff : 0x0f, 16 * sizeof(uint8));
-	memset(_monsterStoneOverlay, 0x0d, 16 * sizeof(uint8));
+	memset(_monsterFlashOverlay, (_configRenderMode == Common::kRenderCGA) ? 0xFF : 0x0F, 16 * sizeof(uint8));
+	memset(_monsterStoneOverlay, 0x0D, 16 * sizeof(uint8));
 	_monsterFlashOverlay[0] = _monsterStoneOverlay[0] = 0;
 
 	// Prevent autosave on game startup
@@ -985,7 +985,7 @@ void EoBCoreEngine::recalcArmorClass(int index) {
 
 		int tp = _items[itm].type;
 
-		if (!(_itemTypes[tp].allowedClasses & _classModifierFlags[c->cClass]) || (_itemTypes[tp].extraProperties & 0x7f) || (i >= 1 && i <= 2 && tp != 27 && !(_flags.gameID == GI_EOB2 && tp == 57)))
+		if (!(_itemTypes[tp].allowedClasses & _classModifierFlags[c->cClass]) || (_itemTypes[tp].extraProperties & 0x7F) || (i >= 1 && i <= 2 && tp != 27 && !(_flags.gameID == GI_EOB2 && tp == 57)))
 			continue;
 
 		c->armorClass += _itemTypes[tp].armorClass;
@@ -997,12 +997,12 @@ void EoBCoreEngine::recalcArmorClass(int index) {
 		int8 m2 = 0;
 
 		if (c->inventory[25]) {
-			if (!(_itemTypes[_items[c->inventory[25]].type].extraProperties & 0x7f))
+			if (!(_itemTypes[_items[c->inventory[25]].type].extraProperties & 0x7F))
 				m1 = _items[c->inventory[25]].value;
 		}
 
 		if (c->inventory[26]) {
-			if (!(_itemTypes[_items[c->inventory[26]].type].extraProperties & 0x7f))
+			if (!(_itemTypes[_items[c->inventory[26]].type].extraProperties & 0x7F))
 				m2 = _items[c->inventory[26]].value;
 		}
 
@@ -1054,7 +1054,7 @@ int EoBCoreEngine::validateWeaponSlotItem(int index, int slot) {
 	if (!itm2)
 		return 1;
 
-	int f = (_itemTypes[tp2].extraProperties & 0x7f);
+	int f = (_itemTypes[tp2].extraProperties & 0x7F);
 	if (f <= 0 || f > 3)
 		return r;
 
@@ -1269,12 +1269,12 @@ void EoBCoreEngine::removeCharacterFromParty(int charIndex) {
 		if (i == 16 || !c->inventory[i])
 			continue;
 
-		setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3ff].drawObjects, _currentBlock, c->inventory[i], _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
+		setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3FF].drawObjects, _currentBlock, c->inventory[i], _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
 		c->inventory[i] = 0;
 	}
 
 	while (c->inventory[16])
-		setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3ff].drawObjects, _currentBlock, getQueuedItem(&c->inventory[16], 0, -1), _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
+		setItemPosition((Item *)&_levelBlockProperties[_currentBlock & 0x3FF].drawObjects, _currentBlock, getQueuedItem(&c->inventory[16], 0, -1), _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
 
 	c->inventory[16] = 0;
 
@@ -1320,7 +1320,7 @@ void EoBCoreEngine::increaseCharacterExperience(int charIndex, int32 points) {
 		_characters[charIndex].experience[i] += points;
 
 		uint32 er = getRequiredExperience(cl, i, _characters[charIndex].level[i] + 1);
-		if (er == 0xffffffff)
+		if (er == 0xFFFFFFFF)
 			continue;
 
 		if (_characters[charIndex].experience[i] >= er)
@@ -1331,7 +1331,7 @@ void EoBCoreEngine::increaseCharacterExperience(int charIndex, int32 points) {
 uint32 EoBCoreEngine::getRequiredExperience(int cClass, int levelIndex, int level) {
 	cClass = getCharacterClassType(cClass, levelIndex);
 	if (cClass == -1)
-		return 0xffffffff;
+		return 0xFFFFFFFF;
 
 	const uint32 *tbl = _expRequirementTables[cClass];
 	return tbl[level - 1];
@@ -1619,7 +1619,7 @@ void EoBCoreEngine::displayParchment(int id) {
 		removeInputTop();
 		while (!shouldQuit()) {
 			delay(_tickLength);
-			if (checkInput(0, false, 0) & 0xff)
+			if (checkInput(0, false, 0) & 0xFF)
 				break;
 			removeInputTop();
 		}
@@ -1652,7 +1652,7 @@ int EoBCoreEngine::countResurrectionCandidates() {
 			if (!inv)
 				continue;
 
-			if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[inv].type].extraProperties & 0x7f) != 8)) || (_flags.gameID == GI_EOB2 && _items[inv].type != 33))
+			if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[inv].type].extraProperties & 0x7F) != 8)) || (_flags.gameID == GI_EOB2 && _items[inv].type != 33))
 				continue;
 
 			_rrNames[_rrCount] = _npcPreset[_items[inv].value - 1].name;
@@ -1661,7 +1661,7 @@ int EoBCoreEngine::countResurrectionCandidates() {
 	}
 
 	if (_itemInHand > 0) {
-		if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[_itemInHand].type].extraProperties & 0x7f) == 8)) || (_flags.gameID == GI_EOB2 && _items[_itemInHand].type == 33)) {
+		if ((_flags.gameID == GI_EOB1 && ((_itemTypes[_items[_itemInHand].type].extraProperties & 0x7F) == 8)) || (_flags.gameID == GI_EOB2 && _items[_itemInHand].type == 33)) {
 			_rrNames[_rrCount] = _npcPreset[_items[_itemInHand].value - 1].name;
 			_rrId[_rrCount++] = -_items[_itemInHand].value;
 		}
@@ -1780,7 +1780,7 @@ void EoBCoreEngine::useSlotWeapon(int charIndex, int slotIndex, Item item) {
 	if (c->effectFlags & 0x40)
 		removeCharacterEffect(10, charIndex, 1); // remove invisibility effect
 
-	int ep = _itemTypes[tp].extraProperties & 0x7f;
+	int ep = _itemTypes[tp].extraProperties & 0x7F;
 	int8 inflict = 0;
 
 	if (ep == 1) {
@@ -1823,14 +1823,14 @@ int EoBCoreEngine::closeDistanceAttack(int charIndex, Item item) {
 
 	if (r == -1) {
 		uint8 w = _specialWallTypes[_levelBlockProperties[d].walls[_sceneDrawVarDown]];
-		if (w == 0xff) {
+		if (w == 0xFF) {
 			if (_flags.gameID == GI_EOB1) {
 				_levelBlockProperties[d].walls[_sceneDrawVarDown]++;
 				_levelBlockProperties[d].walls[_sceneDrawVarDown ^ 2]++;
 
 			} else {
 				for (int i = 0; i < 4; i++) {
-					if (_specialWallTypes[_levelBlockProperties[d].walls[i]] == 0xff)
+					if (_specialWallTypes[_levelBlockProperties[d].walls[i]] == 0xFF)
 						_levelBlockProperties[d].walls[i]++;
 				}
 			}
@@ -1921,7 +1921,7 @@ int EoBCoreEngine::projectileWeaponAttack(int charIndex, Item item) {
 
 void EoBCoreEngine::inflictMonsterDamage(EoBMonsterInPlay *m, int damage, bool giveExperience) {
 	m->hitPointsCur -= damage;
-	m->flags = (m->flags & 0xf7) | 1;
+	m->flags = (m->flags & 0xF7) | 1;
 
 	if (_monsterProps[m->type].capsFlags & 0x2000) {
 		explodeMonster(m);
@@ -2027,7 +2027,7 @@ bool EoBCoreEngine::characterAttackHitTest(int charIndex, int monsterIndex, int
 	if (charIndex < 0)
 		return true;
 
-	int p = item ? (_flags.gameID == GI_EOB1 ? _items[item].type : (_itemTypes[_items[item].type].extraProperties & 0x7f)) : 0;
+	int p = item ? (_flags.gameID == GI_EOB1 ? _items[item].type : (_itemTypes[_items[item].type].extraProperties & 0x7F)) : 0;
 
 	if (_monsters[monsterIndex].flags & 0x20)
 		return true;// EOB 2 only ?
@@ -2206,7 +2206,7 @@ void EoBCoreEngine::statusAttack(int charIndex, int attackStatusFlags, const cha
 		c->flags |= attackStatusFlags;
 	}
 
-	if ((attackStatusFlags & 0x0c) && (_openBookChar == charIndex) && _updateFlags) {
+	if ((attackStatusFlags & 0x0C) && (_openBookChar == charIndex) && _updateFlags) {
 		Button b;
 		clickedSpellbookAbort(&b);
 	}
@@ -2312,7 +2312,7 @@ int EoBCoreEngine::getSaveThrowModifier(int hpModifier, int level, int type) {
 }
 
 bool EoBCoreEngine::calcDamageCheckItemType(int itemType) {
-	itemType = _itemTypes[itemType].extraProperties & 0x7f;
+	itemType = _itemTypes[itemType].extraProperties & 0x7F;
 	return (itemType == 2 || itemType == 3) ? true : false;
 }
 
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 1c827e2..ed3aaef 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -86,7 +86,7 @@ void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
 	int txtCol1 = 12;
 	int txtCol2 = 15;
 
-	if ((_flags.gameID == GI_EOB1 && c->flags & 6) || (_flags.gameID == GI_EOB2 && c->flags & 0x0e)) {
+	if ((_flags.gameID == GI_EOB1 && c->flags & 6) || (_flags.gameID == GI_EOB2 && c->flags & 0x0E)) {
 		txtCol1 = 8;
 		txtCol2 = 6;
 	}
@@ -285,7 +285,7 @@ void EoBCoreEngine::gui_drawWeaponSlot(int charIndex, int slot) {
 	else
 		_screen->drawShape(_screen->_curPage, _itemIconShapes[85 + slot], x + 8, y, 0);
 
-	if ((_characters[charIndex].disabledSlots & (1 << slot)) || !validateWeaponSlotItem(charIndex, slot) || (_characters[charIndex].hitPointsCur <= 0) || (_characters[charIndex].flags & 0x0c))
+	if ((_characters[charIndex].disabledSlots & (1 << slot)) || !validateWeaponSlotItem(charIndex, slot) || (_characters[charIndex].hitPointsCur <= 0) || (_characters[charIndex].flags & 0x0C))
 		_screen->drawShape(_screen->_curPage, _weaponSlotGrid, x, y, 0);
 }
 
@@ -808,13 +808,13 @@ int EoBCoreEngine::clickedSceneDropPickupItem(Button *button) {
 	if (button->arg > 1) {
 		block = calcNewBlockPosition(_currentBlock, _currentDirection);
 		int f = _wllWallFlags[_levelBlockProperties[block].walls[_sceneDrawVarDown]];
-		if (!(f & 0x0b))
+		if (!(f & 0x0B))
 			return 1;
 	}
 	int d = _dropItemDirIndex[(_currentDirection << 2) + button->arg];
 
 	if (_itemInHand) {
-		setItemPosition((Item *)&_levelBlockProperties[block & 0x3ff].drawObjects, block, _itemInHand, d);
+		setItemPosition((Item *)&_levelBlockProperties[block & 0x3FF].drawObjects, block, _itemInHand, d);
 		setHandItem(0);
 		runLevelScript(block, 4);
 	} else {
@@ -856,7 +856,7 @@ int EoBCoreEngine::clickedWeaponSlot(Button *button) {
 	static const uint8 sY[] = { 27, 27, 79, 79, 131, 131 };
 	int slot = sY[button->arg] > _mouseY ? 0 : 1;
 
-	if ((_gui->_flagsMouseLeft & 0x7f) == 1)
+	if ((_gui->_flagsMouseLeft & 0x7F) == 1)
 		gui_processWeaponSlotClickLeft(button->arg, slot);
 	else
 		gui_processWeaponSlotClickRight(button->arg, slot);
@@ -1031,9 +1031,9 @@ int EoBCoreEngine::clickedSpellbookList(Button *button) {
 }
 
 int EoBCoreEngine::clickedCastSpellOnCharacter(Button *button) {
-	_activeSpellCharId = button->arg & 0xff;
+	_activeSpellCharId = button->arg & 0xFF;
 
-	if (_activeSpellCharId == 0xff) {
+	if (_activeSpellCharId == 0xFF) {
 		printWarning(_magicStrings3[_flags.gameID == GI_EOB1 ? 2 : 1]);
 		if (_castScrollSlot) {
 			gui_updateSlotAfterScrollUse();
@@ -1215,7 +1215,7 @@ void EoBCoreEngine::gui_processWeaponSlotClickLeft(int charIndex, int slotIndex)
 
 	int ih = _itemInHand;
 	int t = _items[ih].type;
-	uint16 v = (ih) ? _itemTypes[t].invFlags : 0xffff;
+	uint16 v = (ih) ? _itemTypes[t].invFlags : 0xFFFF;
 
 	if (v & _slotValidationFlags[slotIndex]) {
 		setHandItem(itm);
@@ -1227,7 +1227,7 @@ void EoBCoreEngine::gui_processWeaponSlotClickLeft(int charIndex, int slotIndex)
 }
 
 void EoBCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex) {
-	if (!testCharacter(charIndex, 0x0d))
+	if (!testCharacter(charIndex, 0x0D))
 		return;
 
 	Item itm = _characters[charIndex].inventory[slotIndex];
@@ -1244,7 +1244,7 @@ void EoBCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex
 
 	int8 tp = _items[itm].type;
 	int8 vl = _items[itm].value;
-	uint8 ep = _itemTypes[tp].extraProperties & 0x7f;
+	uint8 ep = _itemTypes[tp].extraProperties & 0x7F;
 
 	switch (ep) {
 	case 0:
@@ -1376,7 +1376,7 @@ GUI_EoB::GUI_EoB(EoBCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
 	_backupButtonList = 0;
 	_progress = 0;
 	_prcButtonUnk3 = 1;
-	_cflag = 0xffff;
+	_cflag = 0xFFFF;
 
 	_menuLineSpacing = 0;
 	_menuLastInFlags = 0;
@@ -1385,8 +1385,8 @@ GUI_EoB::GUI_EoB(EoBCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
 
 	_numPages = (_vm->game() == GI_EOB2) ? 8 : 5;
 	_numVisPages = (_vm->game() == GI_EOB2) ? 6 : 5;
-	_clericSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xf7ffffff : 0x7bffff;
-	_paladinSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xa9bbd1d : 0x800ff2;
+	_clericSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xF7FFFFFF : 0x7BFFFF;
+	_paladinSpellAvltyFlags = (_vm->game() == GI_EOB2) ? 0xA9BBD1D : 0x800FF2;
 	_numAssignedSpellsOfType = new int8[72];
 	memset(_numAssignedSpellsOfType, 0, 72);
 
@@ -1524,7 +1524,7 @@ void GUI_EoB::processButton(Button *button) {
 
 int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8 mouseWheel) {
 	_progress = 0;
-	uint16 in = inputFlags & 0xff;
+	uint16 in = inputFlags & 0xFF;
 	uint16 buttonReleaseFlag = 0;
 	bool clickEvt = false;
 	//_vm->_processingButtons = true;
@@ -1543,13 +1543,13 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 
 		////////////////////////////
 		if (!buttonList && !(inputFlags & 0x800))
-			return inputFlags & 0xff;
+			return inputFlags & 0xFF;
 		////////////////////////////
 
 		inputFlags = 0;
 		clickEvt = true;
 	} else if (inputFlags & 0x8000) {
-		inputFlags &= 0xff;
+		inputFlags &= 0xFF;
 	}
 
 	uint16 result = 0;
@@ -1582,7 +1582,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 
 		_specialProcessButton = 0;
 		_prcButtonUnk3 = 1;
-		_cflag = 0xffff;
+		_cflag = 0xFFFF;
 	}
 
 	int sd = 0;
@@ -1616,12 +1616,12 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 		if (flgs2 & 1)
 			flgs2 |= 8;
 		else
-			flgs2 &= 0xfff7;
+			flgs2 &= 0xFFF7;
 
 		if (flgs2 & 4)
 			flgs2 |= 0x10;
 		else
-			flgs2 &= 0xffef;
+			flgs2 &= 0xFFEF;
 
 		uint16 vL = 0;
 		uint16 vR = 0;
@@ -1640,8 +1640,8 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 				v6 = 1;
 			}
 		} else if (_flagsModifier || clickEvt) {
-			vL = flgs & 0xf00;
-			vR = flgs & 0xf000;
+			vL = flgs & 0xF00;
+			vR = flgs & 0xF000;
 
 			if (_prcButtonUnk3) {
 				if (sd != buttonList->dimTableIndex) {
@@ -1675,7 +1675,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 								flgs2 |= 4;
 								vc = 1;
 							} else {
-								flgs2 &= 0xfffb;
+								flgs2 &= 0xFFFB;
 							}
 
 							if (flgs & 0x100) {
@@ -1702,7 +1702,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 								flgs2 |= 4;
 								vc = 1;
 							} else {
-								flgs2 &= 0xfffb;
+								flgs2 &= 0xFFFB;
 							}
 
 							if (!(flgs & 0x200))
@@ -1730,12 +1730,12 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 							}
 
 							if ((flgs & 2) && (flgs2 & 1))
-								flgs2 &= 0xfffe;
+								flgs2 &= 0xFFFE;
 							break;
 
 						case 3:
 							if ((flgs & 4) || (!buttonList->data2Val1))
-								flgs2 &= 0xfffb;
+								flgs2 &= 0xFFFB;
 							else
 								flgs2 |= 4;
 
@@ -1745,7 +1745,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 							}
 
 							if ((flgs & 2) && (flgs2 & 1))
-								flgs2 &= 0xfffe;
+								flgs2 &= 0xFFFE;
 							break;
 
 						default:
@@ -1761,7 +1761,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 							if ((flgs & 4) && buttonList->data2Val1)
 								flgs2 |= 4;
 							else
-								flgs2 &= 0xfffb;
+								flgs2 &= 0xFFFB;
 
 							if (flgs & 0x1000) {
 								v6 = 1;
@@ -1786,7 +1786,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 							if ((flgs & 4) && buttonList->data2Val1)
 								flgs2 |= 4;
 							else
-								flgs2 &= 0xfffb;
+								flgs2 &= 0xFFFB;
 
 							if (!(flgs & 0x2000))
 								break;
@@ -1812,12 +1812,12 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 							}
 
 							if ((flgs & 2) && (flgs2 & 1))
-								flgs2 &= 0xfffe;
+								flgs2 &= 0xFFFE;
 							break;
 
 						case 3:
 							if ((flgs & 4) || (!buttonList->data2Val1))
-								flgs2 &= 0xfffb;
+								flgs2 &= 0xFFFB;
 							else
 								flgs2 |= 4;
 
@@ -1827,7 +1827,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 							}
 
 							if ((flgs & 2) && (flgs2 & 1))
-								flgs2 &= 0xfffe;
+								flgs2 &= 0xFFFE;
 							break;
 
 						default:
@@ -1835,7 +1835,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 						}
 					}
 				} else { // if (_vm->_mouseX >= x2 && _vm->_mouseX <= (x2 + buttonList->width)....)
-					flgs2 &= 0xfff9;
+					flgs2 &= 0xFFF9;
 
 					if ((flgs & 0x40) && (!(flgs & 0x80)) && _specialProcessButton && !v8) {
 						static const uint16 flagsTable[] = { 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000 };
@@ -1859,7 +1859,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 					}
 
 					if ((flgs & 2) && (flgs2 & 1))
-						flgs2 &= 0xfffe;
+						flgs2 &= 0xFFFE;
 				} // end if (_vm->_mouseX >= x2 && _vm->_mouseX <= (x2 + buttonList->width)....)
 			} // end if (_prcButtonUnk3)
 		} // end if (_flagsModifier || clickEvt)
@@ -1896,7 +1896,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
 	};
 
 	if ((_flagsMouseLeft == 1 || _flagsMouseRight == 1) && !v18)
-		_cflag = 0xffff;
+		_cflag = 0xFFFF;
 
 	if (!result)
 		result = inputFlags;
@@ -1938,7 +1938,7 @@ int GUI_EoB::simpleMenu_process(int sd, const char *const *strings, void *b, int
 	int x = (_screen->_curDim->sx + dm->sx) << 3;
 	int y = _screen->_curDim->sy + dm->sy;
 
-	int inFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+	int inFlag = _vm->checkInput(0, false, 0) & 0x8FF;
 	_vm->removeInputTop();
 	Common::Point mousePos = _vm->getMousePos();
 
@@ -2051,7 +2051,7 @@ void GUI_EoB::runCampMenu() {
 			newMenu = -1;
 		}
 
-		int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80ff;
+		int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80FF;
 		_vm->removeInputTop();
 
 		if (inputFlag == _vm->_keyMap[Common::KEYCODE_ESCAPE])
@@ -2060,7 +2060,7 @@ void GUI_EoB::runCampMenu() {
 			inputFlag = 0x8000 + prevHighlightButton->index;
 		}
 
-		Button *clickedButton = _vm->gui_getButton(buttonList, inputFlag & 0x7fff);
+		Button *clickedButton = _vm->gui_getButton(buttonList, inputFlag & 0x7FFF);
 
 		if (clickedButton) {
 			drawMenuButton(prevHighlightButton, false, false, true);
@@ -2140,8 +2140,8 @@ void GUI_EoB::runCampMenu() {
 					displayTextBox(44);
 				// fall through
 
-			case 0x800c:
-			case 0x800f:
+			case 0x800C:
+			case 0x800F:
 				if (lastMenu == 1 || lastMenu == 2)
 					newMenu = 0;
 				else if (inputFlag == _vm->_keyMap[Common::KEYCODE_ESCAPE])
@@ -2163,7 +2163,7 @@ void GUI_EoB::runCampMenu() {
 				newMenu = 1;
 				break;
 
-			case 0x800a:
+			case 0x800A:
 				for (; i < 6; i++) {
 					if (_vm->testCharacter(i, 1))
 						cnt++;
@@ -2183,19 +2183,19 @@ void GUI_EoB::runCampMenu() {
 				newMenu = 0;
 				break;
 
-			case 0x800b:
+			case 0x800B:
 				if (confirmDialogue(46))
 					_vm->quitGame();
 				newMenu = 0;
 				break;
 
-			case 0x800d:
+			case 0x800D:
 				_vm->_configSounds ^= true;
 				_vm->_configMusic = _vm->_configSounds ? 1 : 0;
 				newMenu = 2;
 				break;
 
-			case 0x800e:
+			case 0x800E:
 				_vm->_configHpBarGraphs ^= true;
 				newMenu = 2;
 				redrawPortraits = true;
@@ -2290,7 +2290,7 @@ bool GUI_EoB::confirmDialogue2(int dim, int id, int deflt) {
 		else if (_vm->posWithinRect(p.x, p.y, x[1], y, x[1] + 32, y + 14))
 			newHighlight = 1;
 
-		int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+		int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
 		_vm->removeInputTop();
 
 		if (inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
@@ -2351,7 +2351,7 @@ void GUI_EoB::messageDialogue(int dim, int id, int buttonTextCol) {
 	_screen->updateScreen();
 
 	for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
-		int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+		int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
 		_vm->removeInputTop();
 
 		if (inputFlag == 199 || inputFlag == 201) {
@@ -2392,7 +2392,7 @@ void GUI_EoB::messageDialogue2(int dim, int id, int buttonTextCol) {
 	_screen->updateScreen();
 
 	for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
-		int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+		int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
 		_vm->removeInputTop();
 
 		if (inputFlag == 199 || inputFlag == 201) {
@@ -2764,7 +2764,7 @@ int GUI_EoB::selectSaveSlotDialogue(int x, int y, int id) {
 	int slot = -1;
 
 	for (bool runLoop = true; runLoop && !_vm->shouldQuit();) {
-		int inputFlag = _vm->checkInput(0, false, 0) & 0x8ff;
+		int inputFlag = _vm->checkInput(0, false, 0) & 0x8FF;
 		_vm->removeInputTop();
 
 		if (inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
@@ -3008,11 +3008,11 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
 			lastHighLightText = newHighLightText;
 		}
 
-		int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80ff;
+		int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80FF;
 		_vm->removeInputTop();
 
 		if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP6] || inputFlag == _vm->_keyMap[Common::KEYCODE_RIGHT]) {
-			inputFlag = 0x801a + ((lastHighLightButton + 1) % _numVisPages);
+			inputFlag = 0x801A + ((lastHighLightButton + 1) % _numVisPages);
 		} else if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP4] || inputFlag == _vm->_keyMap[Common::KEYCODE_LEFT]) {
 			inputFlag = lastHighLightButton ? 0x8019 + lastHighLightButton : 0x8019 + _numVisPages;
 		} else if (inputFlag == _vm->_keyMap[Common::KEYCODE_ESCAPE]) {
@@ -3027,7 +3027,7 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
 		}
 
 		if (inputFlag & 0x8000) {
-			b = _vm->gui_getButton(buttonList, inputFlag & 0x7fff);
+			b = _vm->gui_getButton(buttonList, inputFlag & 0x7FFF);
 			drawMenuButton(b, true, true, true);
 			_screen->updateScreen();
 			_vm->_system->delayMillis(80);
@@ -3074,9 +3074,9 @@ void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
 			runLoop = false;
 
 		} else if (inputFlag & 0x8000) {
-			newHighLightButton = inputFlag - 0x801a;
+			newHighLightButton = inputFlag - 0x801A;
 			if (newHighLightButton == lastHighLightButton)
-				drawMenuButton(_vm->gui_getButton(buttonList, inputFlag & 0x7fff), false, true, true);
+				drawMenuButton(_vm->gui_getButton(buttonList, inputFlag & 0x7FFF), false, true, true);
 		}
 	}
 
@@ -3553,7 +3553,7 @@ bool GUI_EoB::confirmDialogue(int id) {
 			lastHighlight = newHighlight;
 		}
 
-		int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80ff;
+		int inputFlag = _vm->checkInput(buttonList, false, 0) & 0x80FF;
 		_vm->removeInputTop();
 
 		if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP5] || inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index 36fbb0b..3a2c07b 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -521,7 +521,7 @@ void KyraEngine_HoF::bookPrintText(int dstPage, const uint8 *str, int x, int y,
 	Screen::FontId oldFont = _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_BOOKFONT_FNT);
 	_screen->_charWidth = -2;
 
-	_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->_charWidth = 0;
 	_screen->setFont(oldFont);
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index a79da06..8b95230 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -120,7 +120,7 @@ void LoLEngine::gui_drawScroll() {
 	if (h) {
 		_screen->copyRegion(201, 1, 17, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
 		_screen->copyRegion(208, 1, 89, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
-		_screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xbb : 206);
+		_screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xBB : 206);
 	}
 
 	_screen->copyRegion(112, 16, 12, h + 15, 87, 14, 2, 2, Screen::CR_NO_P_CHECK);
@@ -172,7 +172,7 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
 	gui_drawAllCharPortraitsWithStats();
 
 	if (_flags.use16ColorMode)
-		_screen->fprintString("%s", 156, 8, 0xe1, 0, 1, l->name);
+		_screen->fprintString("%s", 156, 8, 0xE1, 0, 1, l->name);
 	else
 		_screen->fprintString("%s", 157, 9, 254, 0, 5, l->name);
 
@@ -182,7 +182,7 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
 		gui_drawCharInventoryItem(i);
 
 	Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
-	_screen->fprintString("%s", 182, 103, _flags.use16ColorMode ? 0xbb : 172, 0, 5, getLangString(0x4033));
+	_screen->fprintString("%s", 182, 103, _flags.use16ColorMode ? 0xBB : 172, 0, 5, getLangString(0x4033));
 	_screen->setFont(of);
 
 	static const uint16 statusFlags[] = { 0x0080, 0x0000, 0x1000, 0x0002, 0x100, 0x0001, 0x0000, 0x0000 };
@@ -206,7 +206,7 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
 		int32 b = l->experiencePts[i] - _expRequirements[l->skillLevels[i] - 1];
 		int32 e = _expRequirements[l->skillLevels[i]] - _expRequirements[l->skillLevels[i] - 1];
 
-		while (e & 0xffff8000) {
+		while (e & 0xFFFF8000) {
 			e >>= 1;
 			c = b;
 			b >>= 1;
@@ -245,7 +245,7 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
 		// protection
 		if (_flags.use16ColorMode) {
 			y = (index + 2) << 3;
-			col = 0xa1;
+			col = 0xA1;
 			if (redraw)
 				_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
 		} else {
@@ -260,7 +260,7 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
 		y = s * 10 + 62;
 		if (_flags.use16ColorMode) {
 			y = (s + 8) << 3;
-			col = _characters[_selectedCharacter].flags & (0x200 << s) ? 0xe1 : 0x81;
+			col = _characters[_selectedCharacter].flags & (0x200 << s) ? 0xE1 : 0x81;
 			if (redraw)
 				_screen->fprintString("%s", offs + 108, y, col, 0, 0, getLangString(0x4014 + index));
 		} else {
@@ -327,7 +327,7 @@ void LoLEngine::gui_drawCharInventoryItem(int itemIndex) {
 	uint8 x = *coords++;
 	uint8 y = *coords;
 
-	if (y == 0xff)
+	if (y == 0xFF)
 		return;
 
 	if (!_screen->_curPage)
@@ -366,7 +366,7 @@ void LoLEngine::gui_drawCharPortraitWithStats(int charNum) {
 	gui_drawCharFaceShape(charNum, 0, 1, _screen->_curPage);
 
 	if (_flags.use16ColorMode) {
-		gui_drawLiveMagicBar(33, 32, _characters[charNum].magicPointsCur, 0, _characters[charNum].magicPointsMax, 5, 32, 0xaa, 0x44, 0);
+		gui_drawLiveMagicBar(33, 32, _characters[charNum].magicPointsCur, 0, _characters[charNum].magicPointsMax, 5, 32, 0xAA, 0x44, 0);
 		gui_drawLiveMagicBar(39, 32, _characters[charNum].hitPointsCur, 0, _characters[charNum].hitPointsMax, 5, 32, 0x66, 0x44, 1);
 		_screen->printText(getLangString(0x4253), 33, 1, 0x99, 0);
 		_screen->printText(getLangString(0x4254), 39, 1, 0x55, 0);
@@ -493,7 +493,7 @@ void LoLEngine::gui_drawLiveMagicBar(int x, int y, int curPoints, int unk, int m
 	if (flag) {
 		t = maxPoints >> 1;
 		if (t > curPoints)
-			col1 = _flags.use16ColorMode ? 0xbb : 144;
+			col1 = _flags.use16ColorMode ? 0xBB : 144;
 		t = maxPoints >> 2;
 		if (t > curPoints)
 			col1 = _flags.use16ColorMode ? 0x88 : 132;
@@ -525,9 +525,9 @@ void LoLEngine::calcCharPortraitXpos() {
 }
 
 void LoLEngine::gui_drawMoneyBox(int pageNum) {
-	static const uint16 moneyX256[] = { 0x128, 0x134, 0x12b, 0x131, 0x12e};
+	static const uint16 moneyX256[] = { 0x128, 0x134, 0x12B, 0x131, 0x12E};
 	static const uint16 moneyY256[] = { 0x73, 0x73, 0x74, 0x74, 0x75};
-	static const uint16 moneyX16[] = { 0x127, 0x133, 0x12a, 0x130, 0x12d};
+	static const uint16 moneyX16[] = { 0x127, 0x133, 0x12A, 0x130, 0x12D};
 	static const uint16 moneyY16[] = { 0x74, 0x74, 0x75, 0x75, 0x76};
 
 	int backupPage = _screen->_curPage;
@@ -551,11 +551,11 @@ void LoLEngine::gui_drawMoneyBox(int pageNum) {
 			continue;
 
 		uint8 h = _moneyColumnHeight[i] - 1;
-		_screen->drawClippedLine(moneyX[i], moneyY[i], moneyX[i], moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xd2);
-		_screen->drawClippedLine(moneyX[i] + 1, moneyY[i], moneyX[i] + 1, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xd1);
-		_screen->drawClippedLine(moneyX[i] + 2, moneyY[i], moneyX[i] + 2, moneyY[i] - h, _flags.use16ColorMode ? 3 : 0xd0);
-		_screen->drawClippedLine(moneyX[i] + 3, moneyY[i], moneyX[i] + 3, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xd1);
-		_screen->drawClippedLine(moneyX[i] + 4, moneyY[i], moneyX[i] + 4, moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xd2);
+		_screen->drawClippedLine(moneyX[i], moneyY[i], moneyX[i], moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xD2);
+		_screen->drawClippedLine(moneyX[i] + 1, moneyY[i], moneyX[i] + 1, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xD1);
+		_screen->drawClippedLine(moneyX[i] + 2, moneyY[i], moneyX[i] + 2, moneyY[i] - h, _flags.use16ColorMode ? 3 : 0xD0);
+		_screen->drawClippedLine(moneyX[i] + 3, moneyY[i], moneyX[i] + 3, moneyY[i] - h, _flags.use16ColorMode ? 2 : 0xD1);
+		_screen->drawClippedLine(moneyX[i] + 4, moneyY[i], moneyX[i] + 4, moneyY[i] - h, _flags.use16ColorMode ? 1 : 0xD2);
 	}
 
 	Screen::FontId backupFont = _screen->setFont(Screen::FID_6_FNT);
@@ -584,7 +584,7 @@ void LoLEngine::gui_drawCompass() {
 		_compassDirection = _currentDirection << 6;
 	}
 
-	int t = ((_compassDirection + 4) >> 3) & 0x1f;
+	int t = ((_compassDirection + 4) >> 3) & 0x1F;
 
 	if (t == _compassDirectionIndex)
 		return;
@@ -744,13 +744,13 @@ void LoLEngine::gui_toggleFightButtons(bool disable) {
 		if (disable)
 			_characters[i].flags |= 0x2000;
 		else
-			_characters[i].flags &= 0xdfff;
+			_characters[i].flags &= 0xDFFF;
 
 		if (disable && !textEnabled()) {
 			int u = _selectedCharacter;
 			_selectedCharacter = 99;
 			int f = _updateFlags;
-			_updateFlags &= 0xfffd;
+			_updateFlags &= 0xFFFD;
 
 			gui_drawCharPortraitWithStats(i);
 
@@ -774,7 +774,7 @@ void LoLEngine::gui_updateInput() {
 
 	if (inputFlag && _activeMagicMenu != -1 && !(inputFlag & 0x8800)) {
 		gui_enableDefaultPlayfieldButtons();
-		_characters[_activeMagicMenu].flags &= 0xffef;
+		_characters[_activeMagicMenu].flags &= 0xFFEF;
 		gui_drawCharPortraitWithStats(_activeMagicMenu);
 		gui_triggerEvent(inputFlag);
 		_preserveEvents = false;
@@ -875,7 +875,7 @@ void LoLEngine::gui_initCharInventorySpecialButtons(int charNum) {
 	const uint8 *s = &_charInvDefs[_charInvIndex[_characters[charNum].raceClassSex] * 22];
 
 	for (int i = 0; i < 11; i++) {
-		if (*s != 0xff)
+		if (*s != 0xFF)
 			gui_initButton(33 + i, s[0], s[1], i);
 		s += 2;
 	}
@@ -916,7 +916,7 @@ void LoLEngine::gui_initButton(int index, int x, int y, int val) {
 	*b = Button();
 
 	b->nextButton = 0;
-	b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xfe;
+	b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xFE;
 	b->data0Val3 = b->data1Val3 = b->data2Val3 = 0x01;
 
 	b->index = cnt;
@@ -925,7 +925,7 @@ void LoLEngine::gui_initButton(int index, int x, int y, int val) {
 	b->dimTableIndex = _buttonData[index].screenDim;
 	b->flags = _buttonData[index].buttonflags;
 
-	b->arg = (val != -1) ? (uint8)(val & 0xff) : _buttonData[index].index;
+	b->arg = (val != -1) ? (uint8)(val & 0xFF) : _buttonData[index].index;
 
 	if (index == 15) {
 		// magic sub menu
@@ -1100,17 +1100,17 @@ int LoLEngine::clickedMagicSubmenu(Button *button) {
 	gui_enableDefaultPlayfieldButtons();
 
 	if (checkMagic(c, _availableSpells[_selectedSpell], spellLevel)) {
-		_characters[c].flags &= 0xffef;
+		_characters[c].flags &= 0xFFEF;
 		gui_drawCharPortraitWithStats(c);
 	} else {
 		_characters[c].flags |= 4;
-		_characters[c].flags &= 0xffef;
+		_characters[c].flags &= 0xFFEF;
 
 		if (castSpell(c, _availableSpells[_selectedSpell], spellLevel)) {
 			setCharacterUpdateEvent(c, 1, 8, 1);
 			increaseExperience(c, 2, spellLevel * spellLevel);
 		} else {
-			_characters[c].flags &= 0xfffb;
+			_characters[c].flags &= 0xFFFB;
 			gui_drawCharPortraitWithStats(c);
 		}
 	}
@@ -1120,7 +1120,7 @@ int LoLEngine::clickedMagicSubmenu(Button *button) {
 }
 
 int LoLEngine::clickedScreen(Button *button) {
-	_characters[_activeMagicMenu].flags &= 0xffef;
+	_characters[_activeMagicMenu].flags &= 0xFFEF;
 	gui_drawCharPortraitWithStats(_activeMagicMenu);
 	_activeMagicMenu = -1;
 
@@ -1178,12 +1178,12 @@ int LoLEngine::clickedPortraitEtcRight(Button *button) {
 			runItemScript(c, _itemInHand, 0x400, 0, 0);
 			runLevelScriptCustom(_currentBlock, 0x400, c, _itemInHand, 0, 0);
 		} else {
-			_txt->printMessage(2, getLangString(0x402c), _characters[c].name);
+			_txt->printMessage(2, getLangString(0x402C), _characters[c].name);
 		}
 		return 1;
 	}
 
-	_txt->printMessage(2, "%s", getLangString((flg & 8) ? 0x4029 : ((flg & 0x10) ? 0x402a : 0x402b)));
+	_txt->printMessage(2, "%s", getLangString((flg & 8) ? 0x4029 : ((flg & 0x10) ? 0x402A : 0x402B)));
 	return 1;
 }
 
@@ -1235,13 +1235,13 @@ int LoLEngine::clickedCharInventorySlot(Button *button) {
 }
 
 int LoLEngine::clickedExitCharInventory(Button *button) {
-	_updateFlags &= 0xfff3;
+	_updateFlags &= 0xFFF3;
 	gui_enableDefaultPlayfieldButtons();
 	_weaponsDisabled = false;
 
 	for (int i = 0; i < 4; i++) {
 		if (_charInventoryUnk & (1 << i))
-			_characters[i].flags &= 0xf1ff;
+			_characters[i].flags &= 0xF1FF;
 	}
 
 	_screen->copyBlockToPage(2, 0, 0, 320, 200, _pageBuffer1);
@@ -1315,7 +1315,7 @@ int LoLEngine::clickedScenePickupItem(Button *button) {
 
 	uint16 block = (p <= 128) ? calcNewBlockPosition(_currentBlock, _currentDirection) : _currentBlock;
 
-	int found = checkSceneForItems(&_levelBlockProperties[block].drawObjects, p & 0x7f);
+	int found = checkSceneForItems(&_levelBlockProperties[block].drawObjects, p & 0x7F);
 
 	if (found != -1) {
 		removeLevelItem(found, block);
@@ -1465,7 +1465,7 @@ int LoLEngine::clickedSpellTargetCharacter(Button *button) {
 	int t = button->arg;
 	_txt->printMessage(0, "%s.\r", _characters[t].name);
 
-	if ((_spellProperties[_activeSpell.spell].flags & 0xff) == 1) {
+	if ((_spellProperties[_activeSpell.spell].flags & 0xFF) == 1) {
 		_activeSpell.target = t;
 		castHealOnSingleCharacter(&_activeSpell);
 	}
@@ -1504,7 +1504,7 @@ int LoLEngine::clickedSceneThrowItem(Button *button) {
 	uint16 y = 0;
 	calcCoordinates(x, y, _currentBlock, 0x80, 0x80);
 
-	if (launchObject(0, _itemInHand, x, y, 12, _currentDirection << 1, 6, _selectedCharacter, 0x3f)) {
+	if (launchObject(0, _itemInHand, x, y, 12, _currentDirection << 1, 6, _selectedCharacter, 0x3F)) {
 		snd_playSoundEffect(18, -1);
 		setHandItem(0);
 	}
@@ -1520,7 +1520,7 @@ int LoLEngine::clickedOptions(Button *button) {
 	_updateFlags |= 4;
 
 	Button b;
-	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
 	b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
 
 	if (_weaponsDisabled)
@@ -1540,7 +1540,7 @@ int LoLEngine::clickedOptions(Button *button) {
 
 	_gui->runMenu(_gui->_mainMenu);
 
-	_updateFlags &= 0xfffb;
+	_updateFlags &= 0xFFFB;
 	setMouseCursorToItemInHand();
 	resetLampStatus();
 	gui_enableDefaultPlayfieldButtons();
@@ -1564,7 +1564,7 @@ int LoLEngine::clickedRestParty(Button *button) {
 	gui_toggleButtonDisplayMode(_flags.isTalkie ? 77 : 75, 1);
 
 	Button b;
-	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
 	b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
 
 	if (_weaponsDisabled)
@@ -1710,7 +1710,7 @@ int LoLEngine::clickedRestParty(Button *button) {
 			bool setframe = true;
 
 			if (_characters[i].flags & 0x1000) {
-				_characters[i].flags &= 0xefff;
+				_characters[i].flags &= 0xEFFF;
 
 				if (_partyAwake) {
 					if (_characters[i].damageSuffered) {
@@ -1733,7 +1733,7 @@ int LoLEngine::clickedRestParty(Button *button) {
 				setTemporaryFaceFrame(i, frm, upd, 1);
 		}
 
-		_updateFlags &= 0xfffe;
+		_updateFlags &= 0xFFFE;
 		_partyAwake = true;
 		updateDrawPage2();
 		gui_drawScene(0);
@@ -1742,7 +1742,7 @@ int LoLEngine::clickedRestParty(Button *button) {
 
 	} else {
 		for (int i = 0; i < 4; i++)
-			_characters[i].flags &= 0xefff;
+			_characters[i].flags &= 0xEFFF;
 
 		if (needPoisoningFlags) {
 			setTemporaryFaceFrameForAllCharacters(0, 0, 0);
@@ -1750,7 +1750,7 @@ int LoLEngine::clickedRestParty(Button *button) {
 				if (needPoisoningFlags & (1 << i))
 					setTemporaryFaceFrame(i, 3, 8, 0);
 			}
-			_txt->printMessage(0x8000, "%s", getLangString(0x405a));
+			_txt->printMessage(0x8000, "%s", getLangString(0x405A));
 			gui_drawAllCharPortraitsWithStats();
 
 		} else {
@@ -1773,10 +1773,10 @@ int LoLEngine::clickedCompass(Button *button) {
 		return 0;
 
 	if (_compassBroken) {
-		if (characterSays(0x425b, -1, true))
-			_txt->printMessage(4, "%s", getLangString(0x425b));
+		if (characterSays(0x425B, -1, true))
+			_txt->printMessage(4, "%s", getLangString(0x425B));
 	} else {
-		_txt->printMessage(0, "%s", getLangString(0x402f + _currentDirection));
+		_txt->printMessage(0, "%s", getLangString(0x402F + _currentDirection));
 	}
 
 	return 1;
@@ -1813,8 +1813,8 @@ int LoLEngine::clickedLamp(Button *button) {
 		_lampOilStatus += 100;
 
 	} else {
-		uint16 s = (_lampOilStatus >= 100) ? 0x4060 : ((!_lampOilStatus) ? 0x405c : (_lampOilStatus / 33) + 0x405d);
-		_txt->printMessage(0, getLangString(0x405b), getLangString(s));
+		uint16 s = (_lampOilStatus >= 100) ? 0x4060 : ((!_lampOilStatus) ? 0x405C : (_lampOilStatus / 33) + 0x405D);
+		_txt->printMessage(0, getLangString(0x405B), getLangString(s));
 	}
 
 	if (_brightness)
@@ -1836,7 +1836,7 @@ int LoLEngine::clickedStatusIcon(Button *button) {
 	if (str == 0 || str > 3)
 		return 1;
 
-	_txt->printMessage(0x8002, "%s", getLangString(str == 1 ? 0x424c : (str == 2 ? 0x424e : 0x424d)));
+	_txt->printMessage(0x8002, "%s", getLangString(str == 1 ? 0x424C : (str == 2 ? 0x424E : 0x424D)));
 	return 1;
 }
 
@@ -2239,7 +2239,7 @@ int GUI_LoL::runMenu(Menu &menu) {
 
 		if (_currentMenu == &_gameOptions) {
 			char *s = (char *)_vm->_tempBuffer5120;
-			Common::strlcpy(s, _vm->getLangString(0x406f + _vm->_monsterDifficulty), 30);
+			Common::strlcpy(s, _vm->getLangString(0x406F + _vm->_monsterDifficulty), 30);
 			_currentMenu->item[_vm->gameFlags().isTalkie ? 0 : 2].itemString = s;
 			s += (strlen(s) + 1);
 
@@ -2252,7 +2252,7 @@ int GUI_LoL::runMenu(Menu &menu) {
 			s += (strlen(s) + 1);
 
 			if (_vm->gameFlags().isTalkie) {
-				Common::strlcpy(s, _vm->getLangString(0x42d6 + _vm->_lang), 30);
+				Common::strlcpy(s, _vm->getLangString(0x42D6 + _vm->_lang), 30);
 				_currentMenu->item[3].itemString = s;
 				s += (strlen(s) + 1);
 
@@ -2315,7 +2315,7 @@ int GUI_LoL::runMenu(Menu &menu) {
 				for (int ii = 0; ii < 3; ++ii) {
 					Button *b = getButtonListData() + 1 + (i - 1) * 3 + ii;
 					b->nextButton = 0;
-					b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xfe;
+					b->data0Val2 = b->data1Val2 = b->data2Val2 = 0xFE;
 					b->data0Val3 = b->data1Val3 = b->data2Val3 = 0x01;
 
 					b->index = ii;
@@ -2367,9 +2367,9 @@ int GUI_LoL::runMenu(Menu &menu) {
 			int mw = (d->w << 3) + 1;
 			int mh = d->h + 1;
 			if (_vm->gameFlags().use16ColorMode) {
-				_screen->drawShadedBox(mx, my, mx + mw + 1, my + mh + 1, 0xdd, 0xff);
-				_screen->drawLine(true, mx + mw + 1, my, mh + 1, 0xcc);
-				_screen->drawLine(false, mx, my + mh + 1, mw + 2, 0xcc);
+				_screen->drawShadedBox(mx, my, mx + mw + 1, my + mh + 1, 0xDD, 0xFF);
+				_screen->drawLine(true, mx + mw + 1, my, mh + 1, 0xCC);
+				_screen->drawLine(false, mx, my + mh + 1, mw + 2, 0xCC);
 			} else {
 				_screen->drawShadedBox(mx, my, mx + mw, my + mh, 227, 223);
 			}
@@ -2622,7 +2622,7 @@ int GUI_LoL::clickedMainMenu(Button *button) {
 		_newMenu = &_audioOptions;
 		break;
 	case 0x4006:
-		_choiceMenu.menuNameId = 0x400a;
+		_choiceMenu.menuNameId = 0x400A;
 		_newMenu = &_choiceMenu;
 		break;
 	case 0x4005:
@@ -2677,7 +2677,7 @@ int GUI_LoL::clickedDeleteMenu(Button *button) {
 		return 1;
 	}
 
-	_choiceMenu.menuNameId = 0x400b;
+	_choiceMenu.menuNameId = 0x400B;
 	_newMenu = &_choiceMenu;
 	int16 s = (int16)button->arg;
 	_menuResult = _deleteMenu.item[-s - 2].saveSlot + 1;
@@ -2689,7 +2689,7 @@ int GUI_LoL::clickedOptionsMenu(Button *button) {
 	updateMenuButton(button);
 
 	switch (button->arg) {
-	case 0xfff9:
+	case 0xFFF9:
 		_vm->_configMusic ^= 1;
 		_vm->sound()->enableMusic(_vm->_configMusic);
 
@@ -2698,23 +2698,23 @@ int GUI_LoL::clickedOptionsMenu(Button *button) {
 		else
 			_vm->_sound->beginFadeOut();
 		break;
-	case 0xfff8:
+	case 0xFFF8:
 		_vm->_configSounds ^= true;
 		_vm->sound()->enableSFX(_vm->_configSounds);
 		break;
-	case 0xfff7:
+	case 0xFFF7:
 		_vm->_monsterDifficulty = (_vm->_monsterDifficulty + 1) % 3;
 		break;
-	case 0xfff6:
+	case 0xFFF6:
 		_vm->_smoothScrollingEnabled ^= true;
 		break;
-	case 0xfff5:
+	case 0xFFF5:
 		_vm->_floatingCursorsEnabled ^= true;
 		break;
-	case 0xfff4:
+	case 0xFFF4:
 		_vm->_lang = (_vm->_lang + 1) % 3;
 		break;
-	case 0xfff3:
+	case 0xFFF3:
 		_vm->_configVoice ^= 3;
 		break;
 	case 0x4072: {
@@ -2793,7 +2793,7 @@ int GUI_LoL::clickedAudioMenu(Button *button) {
 			} while (1);
 		} else if (button->arg == 5) {
 			_vm->_lastSpeechId = -1;
-			_vm->snd_playCharacterSpeech(0x42e0, 0, 0);
+			_vm->snd_playCharacterSpeech(0x42E0, 0, 0);
 		}
 	}
 
diff --git a/engines/kyra/gui_lol.h b/engines/kyra/gui_lol.h
index dbf54e4..79d4b6b 100644
--- a/engines/kyra/gui_lol.h
+++ b/engines/kyra/gui_lol.h
@@ -36,9 +36,9 @@ namespace Kyra {
 		menu.width = (dim->w << 3); \
 		menu.height = (dim->h); \
 		if (_vm->gameFlags().use16ColorMode) { \
-		menu.bkgdColor = 0xcc; \
-		menu.color1 = 0xff; \
-		menu.color2 = 0xdd; \
+		menu.bkgdColor = 0xCC; \
+		menu.color1 = 0xFF; \
+		menu.color2 = 0xDD; \
 		} else { \
 		menu.bkgdColor = 225; \
 		menu.color1 = 223; \
@@ -49,7 +49,7 @@ namespace Kyra {
 		menu.numberOfItems = d; \
 		menu.titleX = (dim->sx << 3) + (dim->w << 2); \
 		menu.titleY = 6; \
-		menu.textColor = _vm->gameFlags().use16ColorMode ? 0xe1 : 254; \
+		menu.textColor = _vm->gameFlags().use16ColorMode ? 0xE1 : 254; \
 		menu.scrollUpButtonX = e; \
 		menu.scrollUpButtonY = f; \
 		menu.scrollDownButtonX = g; \
@@ -65,13 +65,13 @@ namespace Kyra {
 		item.y = c; \
 		item.width = d; \
 		item.height = e; \
-		item.textColor =  _vm->gameFlags().use16ColorMode ? 0xc1 : 204; \
-		item.highlightColor = _vm->gameFlags().use16ColorMode ? 0xe1 : 254; \
+		item.textColor =  _vm->gameFlags().use16ColorMode ? 0xC1 : 204; \
+		item.highlightColor = _vm->gameFlags().use16ColorMode ? 0xE1 : 254; \
 		item.titleX = -1; \
 		if (_vm->gameFlags().use16ColorMode) { \
-		item.bkgdColor = 0xcc; \
-		item.color1 = 0xff; \
-		item.color2 = 0xdd; \
+		item.bkgdColor = 0xCC; \
+		item.color1 = 0xFF; \
+		item.color2 = 0xDD; \
 		} else { \
 		item.bkgdColor = 225; \
 		item.color1 = 223; \
diff --git a/engines/kyra/gui_rpg.cpp b/engines/kyra/gui_rpg.cpp
index be40050..71c1d1d 100644
--- a/engines/kyra/gui_rpg.cpp
+++ b/engines/kyra/gui_rpg.cpp
@@ -107,7 +107,7 @@ bool KyraRpgEngine::clickedShape(int shapeIndex) {
 
 		uint16 s = _levelDecorationProperties[shapeIndex].shapeIndex[1];
 
-		if (s == 0xffff)
+		if (s == 0xFFFF)
 			continue;
 
 		int w = _flags.gameID == GI_LOL ? _levelDecorationShapes[s][3] : (_levelDecorationShapes[s][2] << 3);
diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp
index 0994e12..6c7ccf1 100644
--- a/engines/kyra/items_eob.cpp
+++ b/engines/kyra/items_eob.cpp
@@ -118,7 +118,7 @@ void EoBCoreEngine::setItemPosition(Item *itemQueue, int block, Item item, int p
 	EoBItem *itm = &_items[item];
 	itm->pos = pos;
 	itm->block = block;
-	itm->level = block < 0 ? 0xff : _currentLevel;
+	itm->level = block < 0 ? 0xFF : _currentLevel;
 
 	if (!*itemQueue) {
 		*itemQueue = itm->next = itm->prev = item;
@@ -141,7 +141,7 @@ void EoBCoreEngine::createInventoryItem(EoBCharacter *c, Item itemIndex, int16 i
 	if (itemValue != -1)
 		_items[itemIndex].value = itemValue;
 
-	if (itemValue && ((_itemTypes[_items[itemIndex].type].extraProperties & 0x7f) < 4))
+	if (itemValue && ((_itemTypes[_items[itemIndex].type].extraProperties & 0x7F) < 4))
 		_items[itemIndex].flags |= 0x80;
 
 	if (c->inventory[preferedInventorySlot]) {
@@ -208,7 +208,7 @@ int EoBCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int sl
 	}
 
 	int itm = _characters[charIndex].inventory[slot];
-	int ex = _itemTypes[_items[itm].type].extraProperties & 0x7f;
+	int ex = _itemTypes[_items[itm].type].extraProperties & 0x7F;
 
 	if (_items[itm].flags & 0x20 && (_flags.gameID == GI_EOB1 || slot < 2)) {
 		if (_flags.gameID == GI_EOB2 && ex > 0 && ex < 4)
@@ -216,7 +216,7 @@ int EoBCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int sl
 		return 0;
 	}
 
-	uint16 v = item ? _itemTypes[_items[item].type].invFlags : 0xffff;
+	uint16 v = item ? _itemTypes[_items[item].type].invFlags : 0xFFFF;
 	if (v & _slotValidationFlags[slot])
 		return 1;
 
@@ -359,7 +359,7 @@ void EoBCoreEngine::printFullItemName(Item item) {
 	EoBItem *itm = &_items[item];
 	const char *nameUnid = _itemNames[itm->nameUnid];
 	const char *nameId = _itemNames[itm->nameId];
-	uint8 f = _itemTypes[itm->type].extraProperties & 0x7f;
+	uint8 f = _itemTypes[itm->type].extraProperties & 0x7F;
 	int8 v = itm->value;
 
 	const char *tstr2 = 0;
diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp
index ef2c50c..e1d3c65 100644
--- a/engines/kyra/items_hof.cpp
+++ b/engines/kyra/items_hof.cpp
@@ -84,7 +84,7 @@ bool KyraEngine_HoF::dropItem(int unk1, Item item, int x, int y, int unk2) {
 
 	bool success = processItemDrop(_mainCharacter.sceneId, item, x, y, unk1, unk2);
 	if (!success) {
-		snd_playSoundEffect(0x0d);
+		snd_playSoundEffect(0x0D);
 		if (countAllItems() >= 30)
 			showMessageFromCCode(5, 0x84, 0);
 	}
@@ -205,7 +205,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
 	if (startX == dstX && startY == dstY) {
 		if (_layerFlagTable[_screen->getLayer(dstX, dstY)] && item != 13) {
 			updateCharFacing();
-			snd_playSoundEffect(0x2d);
+			snd_playSoundEffect(0x2D);
 			removeHandItem();
 			objectChat(getTableString(0xFF, _cCodeBuffer, 1), 0, 0x83, 0xFF);
 		} else {
@@ -213,7 +213,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
 			_itemList[itemSlot].y = dstY;
 			_itemList[itemSlot].id = item;
 			_itemList[itemSlot].sceneId = _mainCharacter.sceneId;
-			snd_playSoundEffect(0x0c);
+			snd_playSoundEffect(0x0C);
 			addItemToAnimList(itemSlot);
 		}
 	} else {
@@ -283,7 +283,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
 
 		if (_layerFlagTable[_screen->getLayer(dstX, dstY)] && item != 13) {
 			updateCharFacing();
-			snd_playSoundEffect(0x2d);
+			snd_playSoundEffect(0x2D);
 			removeHandItem();
 			_screen->showMouse();
 			objectChat(getTableString(0xFF, _cCodeBuffer, 1), 0, 0x83, 0xFF);
@@ -292,7 +292,7 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
 			_itemList[itemSlot].y = dstY;
 			_itemList[itemSlot].id = item;
 			_itemList[itemSlot].sceneId = _mainCharacter.sceneId;
-			snd_playSoundEffect(0x0c);
+			snd_playSoundEffect(0x0C);
 			addItemToAnimList(itemSlot);
 			_screen->showMouse();
 		}
@@ -307,7 +307,7 @@ void KyraEngine_HoF::exchangeMouseItem(int itemPos) {
 	_itemInHand = itemId;
 
 	addItemToAnimList(itemPos);
-	snd_playSoundEffect(0x0b);
+	snd_playSoundEffect(0x0B);
 	setMouseCursor(_itemInHand);
 	int str2 = 7;
 
@@ -331,7 +331,7 @@ bool KyraEngine_HoF::pickUpItem(int x, int y) {
 		deleteItemAnimEntry(itemPos);
 		int itemId = _itemList[itemPos].id;
 		_itemList[itemPos].id = kItemNone;
-		snd_playSoundEffect(0x0b);
+		snd_playSoundEffect(0x0B);
 		setMouseCursor(itemId);
 		int str2 = 7;
 
diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp
index b92cd61..8ee07e8 100644
--- a/engines/kyra/items_lok.cpp
+++ b/engines/kyra/items_lok.cpp
@@ -29,9 +29,9 @@ namespace Kyra {
 
 int KyraEngine_LoK::findDuplicateItemShape(int shape) {
 	static const uint8 dupTable[] = {
-		0x48, 0x46, 0x49, 0x47, 0x4a, 0x46, 0x4b, 0x47,
-		0x4c, 0x46, 0x4d, 0x47, 0x5b, 0x5a, 0x5c, 0x5a,
-		0x5d, 0x5a, 0x5e, 0x5a, 0xFF, 0xFF
+		0x48, 0x46, 0x49, 0x47, 0x4A, 0x46, 0x4B, 0x47,
+		0x4C, 0x46, 0x4D, 0x47, 0x5B, 0x5A, 0x5C, 0x5A,
+		0x5D, 0x5A, 0x5E, 0x5A, 0xFF, 0xFF
 	};
 
 	int i = 0;
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index 409b53f..f7fd04b 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -29,7 +29,7 @@ namespace Kyra {
 
 LoLObject *LoLEngine::findObject(uint16 index) {
 	if (index & 0x8000)
-		return &_monsters[index & 0x7fff];
+		return &_monsters[index & 0x7FFF];
 	else
 		return &_itemsInPlay[index];
 }
@@ -221,7 +221,7 @@ Item LoLEngine::makeItem(int itemType, int curFrame, int flags) {
 	memset(&_itemsInPlay[slot], 0, sizeof(LoLItem));
 
 	_itemsInPlay[slot].itemPropertyIndex = itemType;
-	_itemsInPlay[slot].shpCurFrame_flg = (curFrame & 0x1fff) | flags;
+	_itemsInPlay[slot].shpCurFrame_flg = (curFrame & 0x1FFF) | flags;
 	_itemsInPlay[slot].level = -1;
 
 	return slot;
@@ -292,7 +292,7 @@ void LoLEngine::runItemScript(int charNum, Item item, int flags, int next, int r
 	memset(&scriptState, 0, sizeof(EMCState));
 
 	uint8 func = item ? _itemProperties[_itemsInPlay[item].itemPropertyIndex].itemScriptFunc : 3;
-	if (func == 0xff)
+	if (func == 0xFF)
 		return;
 
 	_emc->init(&scriptState, &_itemScript);
@@ -351,8 +351,8 @@ bool LoLEngine::itemEquipped(int charNum, uint16 itemType) {
 
 void LoLEngine::setItemPosition(Item item, uint16 x, uint16 y, int flyingHeight, int moveable) {
 	if (!flyingHeight) {
-		x = (x & 0xffc0) | 0x40;
-		y = (y & 0xffc0) | 0x40;
+		x = (x & 0xFFC0) | 0x40;
+		y = (y & 0xFFC0) | 0x40;
 	}
 
 	uint16 block = calcBlockIndex(x, y);
@@ -364,7 +364,7 @@ void LoLEngine::setItemPosition(Item item, uint16 x, uint16 y, int flyingHeight,
 	if (moveable)
 		_itemsInPlay[item].shpCurFrame_flg |= 0x4000;
 	else
-		_itemsInPlay[item].shpCurFrame_flg &= 0xbfff;
+		_itemsInPlay[item].shpCurFrame_flg &= 0xBFFF;
 
 
 	assignItemToBlock(&_levelBlockProperties[block].assignedObjects, item);
@@ -429,9 +429,9 @@ bool LoLEngine::launchObject(int objectType, Item item, int startX, int startY,
 
 	if (attackerId != -1) {
 		if (attackerId & 0x8000) {
-			t->flags &= 0xfd;
+			t->flags &= 0xFD;
 		} else {
-			t->flags &= 0xfb;
+			t->flags &= 0xFB;
 			increaseExperience(attackerId, 1, 2);
 		}
 	}
@@ -455,8 +455,8 @@ void LoLEngine::endObjectFlight(FlyingObject *t, int x, int y, int collisionType
 
 	if (t->objectType == 0 || t->objectType == 1) {
 		objectFlightProcessHits(t, cx, cy, collisionType);
-		t->x = (cx & 0xffc0) | 0x40;
-		t->y = (cy & 0xffc0) | 0x40;
+		t->x = (cx & 0xFFC0) | 0x40;
+		t->y = (cy & 0xFFC0) | 0x40;
 		t->flyingHeight = 0;
 		updateObjectFlightPosition(t);
 	}
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index df2297e..1365411 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -180,7 +180,7 @@ Common::Error KyraRpgEngine::init() {
 
 	_vcnColTable = new uint8[128];
 	for (int i = 0; i < 128; i++)
-		_vcnColTable[i] = i & 0x0f;
+		_vcnColTable[i] = i & 0x0F;
 
 	_doorShapes = new uint8*[6];
 	memset(_doorShapes, 0, 6 * sizeof(uint8 *));
@@ -209,9 +209,9 @@ void KyraRpgEngine::drawDialogueButtons() {
 	for (int i = 0; i < _dialogueNumButtons; i++) {
 		int x = _dialogueButtonPosX[i];
 		if (gameFlags().use16ColorMode) {
-			gui_drawBox(x, ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1, 74, 10, 0xee, 0xcc, -1);
+			gui_drawBox(x, ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1, 74, 10, 0xEE, 0xCC, -1);
 			screen()->printText(_dialogueButtonString[i], (x + 37 - (screen()->getTextWidth(_dialogueButtonString[i])) / 2) & ~3,
-			                    ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xc1 : 0xe1, 0);
+			                    ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xC1 : 0xE1, 0);
 		} else {
 			gui_drawBox(x, (_dialogueButtonYoffs + _dialogueButtonPosY[i]), _dialogueButtonWidth, guiSettings()->buttons.height, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
 			screen()->printText(_dialogueButtonString[i], x + (_dialogueButtonWidth >> 1) - (screen()->getTextWidth(_dialogueButtonString[i])) / 2,
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index dcfd2b7..aa4e7a2 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -114,7 +114,7 @@ LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraRpgEngine(sy
 	_selectedSpell = 0;
 	_updateCharNum = _portraitSpeechAnimMode = _textColorFlag = 0;
 	_palUpdateTimer = _updatePortraitNext = 0;
-	_lampStatusTimer = 0xffffffff;
+	_lampStatusTimer = 0xFFFFFFFF;
 
 	_weaponsDisabled = false;
 	_charInventoryUnk = 0;
@@ -381,10 +381,10 @@ Common::Error LoLEngine::init() {
 	_screen->setAnimBlockPtr(10000);
 	_screen->setScreenDim(0);
 
-	_pageBuffer1 = new uint8[0xfa00];
-	memset(_pageBuffer1, 0, 0xfa00);
-	_pageBuffer2 = new uint8[0xfa00];
-	memset(_pageBuffer2, 0, 0xfa00);
+	_pageBuffer1 = new uint8[0xFA00];
+	memset(_pageBuffer1, 0, 0xFA00);
+	_pageBuffer2 = new uint8[0xFA00];
+	memset(_pageBuffer2, 0, 0xFA00);
 
 	_itemsInPlay = new LoLItem[400];
 	memset(_itemsInPlay, 0, sizeof(LoLItem) * 400);
@@ -674,7 +674,7 @@ void LoLEngine::checkFloatingPointerRegions() {
 uint8 *LoLEngine::getItemIconShapePtr(int index) {
 	int ix = _itemProperties[_itemsInPlay[index].itemPropertyIndex].shpIndex;
 	if (_itemProperties[_itemsInPlay[index].itemPropertyIndex].flags & 0x200)
-		ix += (_itemsInPlay[index].shpCurFrame_flg & 0x1fff) - 1;
+		ix += (_itemsInPlay[index].shpCurFrame_flg & 0x1FFF) - 1;
 
 	return _itemIconShapes[ix];
 }
@@ -1029,7 +1029,7 @@ void LoLEngine::decodeSjis(const char *src, char *dst) {
 	uint8 cmd = 0;
 	while ((cmd = *src++) != 0) {
 		if (cmd == 27) {
-			cmd = *src++ & 0x7f;
+			cmd = *src++ & 0x7F;
 			memcpy(dst, src, cmd * 2);
 			dst += cmd * 2;
 			src += cmd * 2;
@@ -1341,7 +1341,7 @@ int LoLEngine::calculateProtection(int index) {
 	int c = 0;
 	if (index & 0x8000) {
 		// Monster
-		index &= 0x7fff;
+		index &= 0x7FFF;
 		c = (_monsters[index].properties->itemProtection * _monsters[index].properties->fightingStats[2]) >> 8;
 	} else {
 		// Character
@@ -1490,7 +1490,7 @@ void LoLEngine::increaseCharacterHitpoints(int charNum, int points, bool ignoreD
 		points = 1;
 
 	_characters[charNum].hitPointsCur = CLIP<int16>(_characters[charNum].hitPointsCur + points, 1, _characters[charNum].hitPointsMax);
-	_characters[charNum].flags &= 0xfff7;
+	_characters[charNum].flags &= 0xFFF7;
 }
 
 void LoLEngine::setupScreenDims() {
@@ -1561,10 +1561,10 @@ void LoLEngine::gui_specialSceneSuspendControls(int controlMode) {
 
 void LoLEngine::gui_specialSceneRestoreControls(int restoreLamp) {
 	if (restoreLamp) {
-		_updateFlags &= 0xfffa;
+		_updateFlags &= 0xFFFA;
 		resetLampStatus();
 	}
-	_updateFlags &= 0xfffe;
+	_updateFlags &= 0xFFFE;
 	_specialSceneFlag = 0;
 	checkFloatingPointerRegions();
 }
@@ -1572,7 +1572,7 @@ void LoLEngine::gui_specialSceneRestoreControls(int restoreLamp) {
 void LoLEngine::restoreAfterSceneWindowDialogue(int redraw) {
 	gui_enableControls();
 	_txt->setupField(false);
-	_updateFlags &= 0xffdf;
+	_updateFlags &= 0xFFDF;
 
 	setDefaultButtonState();
 
@@ -1601,8 +1601,8 @@ void LoLEngine::initDialogueSequence(int controlMode, int pageNum) {
 
 		if (_flags.use16ColorMode) {
 			_screen->fillRect(0, 128, 319, 199, 0x44);
-			gui_drawBox(0, 129, 320, 71, 0xee, 0xcc, -1);
-			gui_drawBox(1, 130, 318, 69, 0xee, 0xcc, 0x11);
+			gui_drawBox(0, 129, 320, 71, 0xEE, 0xCC, -1);
+			gui_drawBox(1, 130, 318, 69, 0xEE, 0xCC, 0x11);
 		} else {
 			_screen->fillRect(0, 128, 319, 199, 1);
 			gui_drawBox(0, 129, 320, 71, 136, 251, -1);
@@ -1651,7 +1651,7 @@ void LoLEngine::restoreAfterDialogueSequence(int controlMode) {
 	if (_currentControlMode) {
 		_screen->modifyScreenDim(4, 11, 124, 28, 45);
 		_screen->modifyScreenDim(5, 85, 123, 233, 54);
-		_updateFlags &= 0xfffd;
+		_updateFlags &= 0xFFFD;
 	} else {
 		const ScreenDim *d = _screen->getScreenDim(5);
 		_screen->fillRect(d->sx, d->sy, d->sx + d->w - (_flags.use16ColorMode ? 3 : 2), d->sy + d->h - 2, d->unkA);
@@ -1714,14 +1714,14 @@ void LoLEngine::generateBrightnessPalette(const Palette &src, Palette &dst, int
 
 		brightness = (8 - brightness) << 5;
 		if (modifier >= 0 && modifier < 8 && (_flagsTable[31] & 0x08)) {
-			brightness = 256 - ((((modifier & 0xfffe) << 5) * (256 - brightness)) >> 8);
+			brightness = 256 - ((((modifier & 0xFFFE) << 5) * (256 - brightness)) >> 8);
 			if (brightness < 0)
 				brightness = 0;
 		}
 
 		for (int i = 0; i < 384; i++) {
 			uint16 c = (dst[i] * brightness) >> 8;
-			dst[i] = c & 0xff;
+			dst[i] = c & 0xFF;
 		}
 	}
 }
@@ -1731,9 +1731,9 @@ void LoLEngine::generateFlashPalette(const Palette &src, Palette &dst, int color
 
 	for (int i = 2; i < 128; i++) {
 		for (int ii = 0; ii < 3; ii++) {
-			uint8 t = src[i * 3 + ii] & 0x3f;
+			uint8 t = src[i * 3 + ii] & 0x3F;
 			if (colorFlags & (1 << ii))
-				t += ((0x3f - t) >> 1);
+				t += ((0x3F - t) >> 1);
 			else
 				t -= (t >> 1);
 			dst[i * 3 + ii] = t;
@@ -1755,7 +1755,7 @@ void LoLEngine::createTransparencyTables() {
 			0x88, 0x00, 0x99, 0x00, 0xAA, 0x00, 0xBB, 0x00, 0xCC, 0x00, 0xDD, 0x00, 0xEE, 0x00, 0xFF, 0x00
 		};
 
-		memset(tpal, 0xff, 768);
+		memset(tpal, 0xFF, 768);
 		_res->loadFileToBuf("LOL.NOL", tpal, 48);
 
 		for (int i = 15; i > -1; i--) {
@@ -1763,7 +1763,7 @@ void LoLEngine::createTransparencyTables() {
 			tpal[s] = tpal[i * 3];
 			tpal[s + 1] = tpal[i * 3 + 1];
 			tpal[s + 2] = tpal[i * 3 + 2];
-			tpal[i * 3 + 2] = tpal[i * 3 + 1] = tpal[i * 3] = 0xff;
+			tpal[i * 3 + 2] = tpal[i * 3 + 1] = tpal[i * 3] = 0xFF;
 		}
 
 		_screen->createTransparencyTablesIntern(colTbl, 16, tpal, tpal,  _transparencyTable1, _transparencyTable2, 80);
@@ -1953,15 +1953,15 @@ void LoLEngine::giveItemToMonster(LoLMonster *monster, Item 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) {
-	return (id & 0x8000) ? _monsters[id & 0x7fff].properties->itemsMight : _characters[id].itemsMight;
+	return (id & 0x8000) ? _monsters[id & 0x7FFF].properties->itemsMight : _characters[id].itemsMight;
 }
 
 uint16 *LoLEngine::getCharacterOrMonsterProtectionAgainstItems(int id) {
-	return (id & 0x8000) ? _monsters[id & 0x7fff].properties->protectionAgainstItems : _characters[id].protectionAgainstItems;
+	return (id & 0x8000) ? _monsters[id & 0x7FFF].properties->protectionAgainstItems : _characters[id].protectionAgainstItems;
 }
 
 void LoLEngine::delay(uint32 millis, bool doUpdate, bool) {
@@ -2098,7 +2098,7 @@ int LoLEngine::processMagicSpark(int charNum, int spellLevel) {
 	uint16 target = getNearestMonsterFromCharacterForBlock(targetBlock, charNum);
 
 	static const uint8 dmg[] = { 7, 15, 25, 60 };
-	if (target != 0xffff) {
+	if (target != 0xFFFF) {
 		inflictMagicalDamage(target, charNum, dmg[spellLevel], 5, 0);
 		updateDrawPage2();
 		gui_drawScene(0);
@@ -2116,8 +2116,8 @@ int LoLEngine::processMagicSpark(int charNum, int spellLevel) {
 	const uint16 height = mov->height();
 
 	for (int i = 0; i < 6; i++) {
-		wX[i] = (_rnd.getRandomNumber(0x7fff) % 64) + ((176 - width) >> 1) + 80;
-		wY[i] = (_rnd.getRandomNumber(0x7fff) % 32) + ((120 - height) >> 1) - 16;
+		wX[i] = (_rnd.getRandomNumber(0x7FFF) % 64) + ((176 - width) >> 1) + 80;
+		wY[i] = (_rnd.getRandomNumber(0x7FFF) % 32) + ((120 - height) >> 1) - 16;
 		wFrames[i] = i << 1;
 	}
 
@@ -2167,7 +2167,7 @@ int LoLEngine::processMagicHeal(int charNum, int spellLevel) {
 		tpal.copy(_screen->getPalette(1));
 
 		if (_flags.use16ColorMode) {
-			tpal.fill(16, 240, 0xff);
+			tpal.fill(16, 240, 0xFF);
 			uint8 *dst = tpal.getData();
 			for (int i = 1; i < 16; i++) {
 				int s = ((i << 4) | i) * 3;
@@ -2250,7 +2250,7 @@ int LoLEngine::processMagicHeal(int charNum, int spellLevel) {
 
 			_screen->copyRegion(charNum * 77, 32, pX[charNum], pY, 77, 44, 2, 2, Screen::CR_NO_P_CHECK);
 
-			pts[charNum] &= 0xff;
+			pts[charNum] &= 0xFF;
 			pts[charNum] += ((diff[charNum] << 8) / 16);
 			increaseCharacterHitpoints(charNum, pts[charNum] / 256, true);
 			gui_drawCharPortraitWithStats(charNum);
@@ -2333,8 +2333,8 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
 			tpal[i * 3 + 1] = v;
 			tpal[i * 3 + 2] = v << 1;
 
-			if (tpal[i * 3 + 2] > 0x3f)
-				tpal[i * 3 + 2] = 0x3f;
+			if (tpal[i * 3 + 2] > 0x3F)
+				tpal[i * 3 + 2] = 0x3F;
 		}
 	}
 
@@ -2395,7 +2395,7 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
 			int might = rollDice(iceDamageMin[spellLevel], iceDamageMax[spellLevel]) + iceDamageAdd[spellLevel];
 			int dmg = calcInflictableDamagePerItem(charNum, 0, might, 3, 2);
 
-			LoLMonster *m = &_monsters[o & 0x7fff];
+			LoLMonster *m = &_monsters[o & 0x7FFF];
 			if (m->hitPoints <= dmg) {
 				increaseExperience(charNum, 2, m->hitPoints);
 				o = m->nextAssignedObject;
@@ -2474,7 +2474,7 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
 			while (o & 0x8000) {
 				static const uint8 fireballDamage[] = { 20, 40, 80, 100 };
 				int dmg = calcInflictableDamagePerItem(charNum, o, fireballDamage[spellLevel], 4, 1);
-				LoLMonster *m = &_monsters[o & 0x7fff];
+				LoLMonster *m = &_monsters[o & 0x7FFF];
 				o = m->nextAssignedObject;
 				_envSfxUseQueue = true;
 				inflictDamage(m->id | 0x8000, dmg, charNum, 2, 4);
@@ -2524,8 +2524,8 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
 			static const int8 finShpIndex2[] = { -1, 1, 2, 3, 4, -1 };
 			uint8 *shp = fb->finalize ? _fireballShapes[finShpIndex1[fb->finProgress]] : _fireballShapes[0];
 
-			int fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xff]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
-			int fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xff]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
+			int fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xFF]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
+			int fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xFF]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
 			int sW = ((fb->progress / 8 + shp[3] + fireBallWH) << 8) / shp[3];
 			int sH = ((fb->progress / 8 + shp[2] + fireBallWH) << 8) / shp[2];
 
@@ -2537,8 +2537,8 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
 
 				if (finShpIndex2[fb->finProgress] != -1) {
 					shp = _fireballShapes[finShpIndex2[fb->finProgress]];
-					fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xff]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
-					fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xff]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
+					fX = (((fb->progress * _fireBallCoords[fb->tblIndex & 0xFF]) >> 16) + fb->destX) - ((fb->progress / 8 + shp[3] + fireBallWH) >> 1);
+					fY = (((fb->progress * _fireBallCoords[(fb->tblIndex + 64) & 0xFF]) >> 16) + fb->destY) - ((fb->progress / 8 + shp[2] + fireBallWH) >> 1);
 					sW = ((fb->progress / 8 + shp[3] + fireBallWH) << 8) / shp[3];
 					sH = ((fb->progress / 8 + shp[2] + fireBallWH) << 8) / shp[2];
 					_screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 4, sW, sH);
@@ -2639,7 +2639,7 @@ int LoLEngine::processMagicHandOfFate(int spellLevel) {
 				uint16 o = _levelBlockProperties[b1].assignedObjects;
 				while (o & 0x8000) {
 					uint16 o2 = o;
-					LoLMonster *m = &_monsters[o & 0x7fff];
+					LoLMonster *m = &_monsters[o & 0x7FFF];
 					o = findObject(o)->nextAssignedObject;
 					int nX = 0;
 					int nY = 0;
@@ -2667,7 +2667,7 @@ int LoLEngine::processMagicHandOfFate(int spellLevel) {
 			// This might be a bug in the original code, but using
 			// the hand of fate spell won't give any experience points
 			int dmg = calcInflictableDamagePerItem(-1, t, damage[spellLevel - 2], 0x80, 1);
-			inflictDamage(t, dmg, 0xffff, 3, 0x80);
+			inflictDamage(t, dmg, 0xFFFF, 3, 0x80);
 		}
 	}
 
@@ -2783,7 +2783,7 @@ int LoLEngine::processMagicFog() {
 	uint16 o = _levelBlockProperties[calcNewBlockPosition(_currentBlock, _currentDirection)].assignedObjects;
 	while (o & 0x8000) {
 		inflictMagicalDamage(o, -1, 15, 6, 0);
-		o = _monsters[o & 0x7fff].nextAssignedObject;
+		o = _monsters[o & 0x7FFF].nextAssignedObject;
 	}
 
 	gui_drawScene(0);
@@ -2808,7 +2808,7 @@ int LoLEngine::processMagicSwarm(int charNum, int damage) {
 	int t = 0;
 	uint16 o = _levelBlockProperties[calcNewBlockPosition(_currentBlock, _currentDirection)].assignedObjects;
 	while (o & 0x8000) {
-		o &= 0x7fff;
+		o &= 0x7FFF;
 		if (_monsters[o].mode != 13) {
 			destIds[t++] = o;
 
@@ -2816,7 +2816,7 @@ int LoLEngine::processMagicSwarm(int charNum, int damage) {
 				_envSfxUseQueue = true;
 				inflictMagicalDamage(o | 0x8000, charNum, damage, 0, 0);
 				_envSfxUseQueue = false;
-				_monsters[o].flags &= 0xffef;
+				_monsters[o].flags &= 0xFFEF;
 			}
 		}
 		o = _monsters[o].nextAssignedObject;
@@ -2908,9 +2908,9 @@ int LoLEngine::processMagicVaelansCube() {
 
 	uint16 o = _levelBlockProperties[bl].assignedObjects;
 	while (o & 0x8000) {
-		LoLMonster *m = &_monsters[o & 0x7fff];
+		LoLMonster *m = &_monsters[o & 0x7FFF];
 		if (m->properties->flags & 0x1000) {
-			inflictDamage(o, 100, 0xffff, 0, 0x80);
+			inflictDamage(o, 100, 0xFFFF, 0, 0x80);
 			res = 1;
 		}
 		o = m->nextAssignedObject;
@@ -3036,7 +3036,7 @@ void LoLEngine::drinkBezelCup(int numUses, int charNum) {
 	uint16 step = 0;
 
 	do {
-		step = (step & 0xff) + (hpDiff * 256) / (bezelAnimData[numUses * 3 + 1]);
+		step = (step & 0xFF) + (hpDiff * 256) / (bezelAnimData[numUses * 3 + 1]);
 		increaseCharacterHitpoints(charNum, step / 256, true);
 		gui_drawCharPortraitWithStats(charNum);
 
@@ -3073,7 +3073,7 @@ void LoLEngine::addSpellToScroll(int spell, int charNum) {
 		}
 
 		if (_availableSpells[i] == spell) {
-			_txt->printMessage(2, "%s", getLangString(0x42d0));
+			_txt->printMessage(2, "%s", getLangString(0x42D0));
 			return;
 		}
 	}
@@ -3101,7 +3101,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
 			_screen->copyRegion(201, 1, 17, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
 			_screen->copyRegion(208, 1, 89, 15, 6, h, 2, 2, Screen::CR_NO_P_CHECK);
 			int cp = _screen->setCurPage(2);
-			_screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xbb : 206);
+			_screen->fillRect(21, 15, 89, h + 15, _flags.use16ColorMode ? 0xBB : 206);
 			_screen->copyRegion(112, 16, 12, h + 15, 87, 14, 2, 2, Screen::CR_NO_P_CHECK);
 
 			int y = 15;
@@ -3289,7 +3289,7 @@ int LoLEngine::checkMagic(int charNum, int spellNum, int spellLevel) {
 }
 
 int LoLEngine::getSpellTargetBlock(int currentBlock, int direction, int maxDistance, uint16 &targetBlock) {
-	targetBlock = 0xffff;
+	targetBlock = 0xFFFF;
 	uint16 c = calcNewBlockPosition(currentBlock, direction);
 
 	int i = 0;
@@ -3321,9 +3321,9 @@ void LoLEngine::inflictMagicalDamageForBlock(int block, int attacker, int damage
 	uint16 o = _levelBlockProperties[block].assignedObjects;
 	while (o & 0x8000) {
 		inflictDamage(o, calcInflictableDamagePerItem(attacker, o, damage, index, 2), attacker, 2, index);
-		if ((_monsters[o & 0x7fff].flags & 0x20) && (_currentLevel != 22))
+		if ((_monsters[o & 0x7FFF].flags & 0x20) && (_currentLevel != 22))
 			break;
-		o = _monsters[o & 0x7fff].nextAssignedObject;
+		o = _monsters[o & 0x7FFF].nextAssignedObject;
 	}
 }
 
@@ -3336,7 +3336,7 @@ int LoLEngine::battleHitSkillTest(int16 attacker, int16 target, int skill) {
 		return 1;
 
 	if (target & 0x8000) {
-		if (_monsters[target & 0x7fff].mode >= 13)
+		if (_monsters[target & 0x7FFF].mode >= 13)
 			return 0;
 	}
 
@@ -3345,8 +3345,8 @@ int LoLEngine::battleHitSkillTest(int16 attacker, int16 target, int skill) {
 	int sk = 0;
 
 	if (attacker & 0x8000) {
-		hitChanceModifier = _monsters[target & 0x7fff].properties->fightingStats[0];
-		sk = 100 - _monsters[target & 0x7fff].properties->skillLevel;
+		hitChanceModifier = _monsters[target & 0x7FFF].properties->fightingStats[0];
+		sk = 100 - _monsters[target & 0x7FFF].properties->skillLevel;
 	} else {
 		hitChanceModifier = _characters[attacker].defaultModifiers[0];
 		int8 m = _characters[attacker].skillModifiers[skill];
@@ -3356,8 +3356,8 @@ int LoLEngine::battleHitSkillTest(int16 attacker, int16 target, int skill) {
 	}
 
 	if (target & 0x8000) {
-		evadeChanceModifier = (_monsterModifiers[9 + _monsterDifficulty] * _monsters[target & 0x7fff].properties->fightingStats[3]) >> 8;
-		_monsters[target & 0x7fff].flags |= 0x10;
+		evadeChanceModifier = (_monsterModifiers[9 + _monsterDifficulty] * _monsters[target & 0x7FFF].properties->fightingStats[3]) >> 8;
+		_monsters[target & 0x7FFF].flags |= 0x10;
 	} else {
 		evadeChanceModifier = _characters[target].defaultModifiers[3];
 	}
@@ -3392,7 +3392,7 @@ int LoLEngine::inflictDamage(uint16 target, int damage, uint16 attacker, int ski
 	LoLCharacter *c = 0;
 
 	if (target & 0x8000) {
-		m = &_monsters[target & 0x7fff];
+		m = &_monsters[target & 0x7FFF];
 		if (m->mode >= 13)
 			return 0;
 
@@ -3482,7 +3482,7 @@ void LoLEngine::removeCharacterEffects(LoLCharacter *c, int first, int last) {
 	for (int i = first; i <= last; i++) {
 		switch (i - 1) {
 		case 0:
-			c->flags &= 0xfffb;
+			c->flags &= 0xFFFB;
 			c->weaponHit = 0;
 			break;
 
@@ -3491,19 +3491,19 @@ void LoLEngine::removeCharacterEffects(LoLCharacter *c, int first, int last) {
 			break;
 
 		case 2:
-			c->flags &= 0xffbf;
+			c->flags &= 0xFFBF;
 			break;
 
 		case 3:
-			c->flags &= 0xff7f;
+			c->flags &= 0xFF7F;
 			break;
 
 		case 4:
-			c->flags &= 0xfeff;
+			c->flags &= 0xFEFF;
 			break;
 
 		case 6:
-			c->flags &= 0xefff;
+			c->flags &= 0xEFFF;
 			break;
 
 		default:
@@ -3557,7 +3557,7 @@ int LoLEngine::calcInflictableDamagePerItem(int16 attacker, int16 target, uint16
 
 void LoLEngine::checkForPartyDeath() {
 	Button b;
-	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
 	b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
 
 	for (int i = 0; i < 4; i++) {
@@ -3596,7 +3596,7 @@ void LoLEngine::checkForPartyDeath() {
 		_gui->runMenu(_gui->_deathMenu);
 
 		setMouseCursorToItemInHand();
-		_updateFlags &= 0xfffb;
+		_updateFlags &= 0xFFFB;
 		resetLampStatus();
 
 		gui_enableDefaultPlayfieldButtons();
@@ -3613,7 +3613,7 @@ void LoLEngine::applyMonsterAttackSkill(LoLMonster *monster, int16 target, int16
 
 	switch (monster->properties->attackSkillType - 1) {
 	case 0:
-		t = removeCharacterItem(target, 0x7ff);
+		t = removeCharacterItem(target, 0x7FF);
 		if (t) {
 			giveItemToMonster(monster, t);
 			if (characterSays(0x4019, _characters[target].id, true))
@@ -3630,16 +3630,16 @@ void LoLEngine::applyMonsterAttackSkill(LoLMonster *monster, int16 target, int16
 		t = removeCharacterItem(target, 0x20);
 		if (t) {
 			deleteItem(t);
-			if (characterSays(0x401b, _characters[target].id, true))
-				_txt->printMessage(6, "%s", getLangString(0x401b));
+			if (characterSays(0x401B, _characters[target].id, true))
+				_txt->printMessage(6, "%s", getLangString(0x401B));
 		}
 		break;
 
 	case 3:
-		t = removeCharacterItem(target, 0x0f);
+		t = removeCharacterItem(target, 0x0F);
 		if (t) {
-			if (characterSays(0x401e, _characters[target].id, true))
-				_txt->printMessage(6, getLangString(0x401e), _characters[target].name);
+			if (characterSays(0x401E, _characters[target].id, true))
+				_txt->printMessage(6, getLangString(0x401E), _characters[target].name);
 			setItemPosition(t, monster->x, monster->y, 0, 1);
 		}
 		break;
@@ -3684,27 +3684,27 @@ void LoLEngine::applyMonsterDefenseSkill(LoLMonster *monster, int16 attacker, in
 	switch (monster->properties->defenseSkillType - 1) {
 	case 0:
 	case 1:
-		if ((flags & 0x3f) == 2 || skill)
+		if ((flags & 0x3F) == 2 || skill)
 			return;
 
 		for (int i = 0; i < 3; i++) {
 			itm = _characters[attacker].items[i];
 			if (!itm)
 				continue;
-			if ((_itemProperties[_itemsInPlay[itm].itemPropertyIndex].protection & 0x3f) != flags)
+			if ((_itemProperties[_itemsInPlay[itm].itemPropertyIndex].protection & 0x3F) != flags)
 				continue;
 
-			removeCharacterItem(attacker, 0x7fff);
+			removeCharacterItem(attacker, 0x7FFF);
 
 			if (monster->properties->defenseSkillType == 1) {
 				giveItemToMonster(monster, itm);
-				if (characterSays(0x401c, _characters[attacker].id, true))
-					_txt->printMessage(6, "%s", getLangString(0x401c));
+				if (characterSays(0x401C, _characters[attacker].id, true))
+					_txt->printMessage(6, "%s", getLangString(0x401C));
 
 			} else {
 				deleteItem(itm);
-				if (characterSays(0x401d, _characters[attacker].id, true))
-					_txt->printMessage(6, "%s", getLangString(0x401d));
+				if (characterSays(0x401D, _characters[attacker].id, true))
+					_txt->printMessage(6, "%s", getLangString(0x401D));
 			}
 		}
 		break;
@@ -3895,7 +3895,7 @@ void LoLEngine::launchMagicViper() {
 void LoLEngine::breakIceWall(uint8 *pal1, uint8 *pal2) {
 	_screen->hideMouse();
 	uint16 bl = calcNewBlockPosition(_currentBlock, _currentDirection);
-	_levelBlockProperties[bl].flags &= 0xef;
+	_levelBlockProperties[bl].flags &= 0xEF;
 	_screen->copyPage(0, 2);
 	gui_drawScene(2);
 	_screen->copyPage(2, 10);
@@ -3923,10 +3923,10 @@ uint16 LoLEngine::getNearestMonsterFromCharacterForBlock(uint16 block, int charN
 	uint16 cX = 0;
 	uint16 cY = 0;
 
-	uint16 id = 0xffff;
-	int minDist = 0x7fff;
+	uint16 id = 0xFFFF;
+	int minDist = 0x7FFF;
 
-	if (block == 0xffff)
+	if (block == 0xFFFF)
 		return id;
 
 	calcCoordinatesForSingleCharacter(charNum, cX, cY);
@@ -3934,7 +3934,7 @@ uint16 LoLEngine::getNearestMonsterFromCharacterForBlock(uint16 block, int charN
 	int o = _levelBlockProperties[block].assignedObjects;
 
 	while (o & 0x8000) {
-		LoLMonster *m = &_monsters[o & 0x7fff];
+		LoLMonster *m = &_monsters[o & 0x7FFF];
 		if (m->mode >= 13) {
 			o = m->nextAssignedObject;
 			continue;
@@ -3953,8 +3953,8 @@ uint16 LoLEngine::getNearestMonsterFromCharacterForBlock(uint16 block, int charN
 }
 
 uint16 LoLEngine::getNearestMonsterFromPos(int x, int y) {
-	uint16 id = 0xffff;
-	int minDist = 0x7fff;
+	uint16 id = 0xFFFF;
+	int minDist = 0x7FFF;
 
 	for (int i = 0; i < 30; i++) {
 		if (_monsters[i].mode > 13)
@@ -3971,8 +3971,8 @@ uint16 LoLEngine::getNearestMonsterFromPos(int x, int y) {
 }
 
 uint16 LoLEngine::getNearestPartyMemberFromPos(int x, int y) {
-	uint16 id = 0xffff;
-	int minDist = 0x7fff;
+	uint16 id = 0xFFFF;
+	int minDist = 0x7FFF;
 
 	for (int i = 0; i < 4; i++) {
 		if (!(_characters[i].flags & 1) || _characters[i].hitPointsCur <= 0)
@@ -4054,7 +4054,7 @@ void LoLEngine::displayAutomap() {
 			delayTimer = _system->getMillis() + 8 * _tickLength;
 		}
 
-		int f = checkInput(0) & 0xff;
+		int f = checkInput(0) & 0xFF;
 		removeInputTop();
 
 		if (f) {
@@ -4094,7 +4094,7 @@ void LoLEngine::updateAutoMap(uint16 block) {
 		return;
 	_levelBlockProperties[block].flags |= 7;
 
-	uint16 x = block & 0x1f;
+	uint16 x = block & 0x1F;
 	uint16 y = block >> 5;
 
 	updateAutoMapIntern(block, x, y, -1, -1);
@@ -4112,7 +4112,7 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
 	x += xOffs;
 	y += yOffs;
 
-	if ((x & 0xffe0) || (y & 0xffe0))
+	if ((x & 0xFFE0) || (y & 0xFFE0))
 		return false;
 
 	xOffs++;
@@ -4122,7 +4122,7 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
 	uint16 b = block + blockPosTable[6 + xOffs];
 
 	if (fx != -1) {
-		if (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xc0)
+		if (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xC0)
 			return false;
 	}
 
@@ -4130,13 +4130,13 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
 	b = block + blockPosTable[9 + yOffs];
 
 	if (fy != -1) {
-		if (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xc0)
+		if (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xC0)
 			return false;
 	}
 
 	b = block + blockPosTable[6 + xOffs] + blockPosTable[9 + yOffs];
 
-	if ((fx != -1) && (fy != -1) && (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xc0) && (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xc0))
+	if ((fx != -1) && (fy != -1) && (_wllAutomapData[_levelBlockProperties[b].walls[fx]] & 0xC0) && (_wllAutomapData[_levelBlockProperties[b].walls[fy]] & 0xC0))
 		return false;
 
 	_levelBlockProperties[b].flags |= 7;
@@ -4147,8 +4147,8 @@ bool LoLEngine::updateAutoMapIntern(uint16 block, uint16 x, uint16 y, int16 xOff
 void LoLEngine::loadMapLegendData(int level) {
 	uint16 *legendData = (uint16 *)_tempBuffer5120;
 	for (int i = 0; i < 32; i++) {
-		legendData[i * 6] = 0xffff;
-		legendData[i * 6 + 5] = 0xffff;
+		legendData[i * 6] = 0xFFFF;
+		legendData[i * 6 + 5] = 0xFFFF;
 	}
 
 	Common::String file = Common::String::format("level%d.xxx", level);
@@ -4199,7 +4199,7 @@ void LoLEngine::drawMapPage(int pageNum) {
 
 		for (; bl < 1024; bl++) {
 			uint8 *w = _levelBlockProperties[bl].walls;
-			if ((_levelBlockProperties[bl].flags & 7) == 7 && (!(_wllAutomapData[w[0]] & 0xc0)) && (!(_wllAutomapData[w[2]] & 0xc0)) && (!(_wllAutomapData[w[1]] & 0xc0)) && (!(_wllAutomapData[w[3]] & 0xc0))) {
+			if ((_levelBlockProperties[bl].flags & 7) == 7 && (!(_wllAutomapData[w[0]] & 0xC0)) && (!(_wllAutomapData[w[2]] & 0xC0)) && (!(_wllAutomapData[w[1]] & 0xC0)) && (!(_wllAutomapData[w[3]] & 0xC0))) {
 				uint16 b0 = calcNewBlockPosition(bl, 0);
 				uint16 b2 = calcNewBlockPosition(bl, 2);
 				uint16 b1 = calcNewBlockPosition(bl, 1);
@@ -4216,25 +4216,25 @@ void LoLEngine::drawMapPage(int pageNum) {
 				// draw north wall
 				drawMapBlockWall(b3, w31, sx, sy, 3);
 				drawMapShape(w31, sx, sy, 3);
-				if (_wllAutomapData[w31] & 0xc0)
+				if (_wllAutomapData[w31] & 0xC0)
 					_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx, sy, _screen->_curPage, sx, sy, 1, 6, 0, _mapOverlay);
 
 				// draw west wall
 				drawMapBlockWall(b1, w13, sx, sy, 1);
 				drawMapShape(w13, sx, sy, 1);
-				if (_wllAutomapData[w13] & 0xc0)
+				if (_wllAutomapData[w13] & 0xC0)
 					_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx + 6, sy, _screen->_curPage, sx + 6, sy, 1, 6, 0, _mapOverlay);
 
 				// draw east wall
 				drawMapBlockWall(b0, w02, sx, sy, 0);
 				drawMapShape(w02, sx, sy, 0);
-				if (_wllAutomapData[w02] & 0xc0)
+				if (_wllAutomapData[w02] & 0xC0)
 					_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx, sy, _screen->_curPage, sx, sy, 7, 1, 0, _mapOverlay);
 
 				//draw south wall
 				drawMapBlockWall(b2, w20, sx, sy, 2);
 				drawMapShape(w20, sx, sy, 2);
-				if (_wllAutomapData[w20] & 0xc0)
+				if (_wllAutomapData[w20] & 0xC0)
 					_screen->copyBlockAndApplyOverlay(_screen->_curPage, sx, sy + 5, _screen->_curPage, sx, sy + 5, 7, 1, 0, _mapOverlay);
 			}
 
@@ -4260,19 +4260,19 @@ void LoLEngine::drawMapPage(int pageNum) {
 
 		for (int ii = 0; ii < 32; ii++)  {
 			uint16 *l = &legendData[ii * 6];
-			if (l[0] == 0xffff)
+			if (l[0] == 0xFFFF)
 				break;
 
 			uint16 cbl = l[0] + (l[1] << 5);
 			if ((_levelBlockProperties[cbl].flags & 7) != 7)
 				continue;
 
-			if (l[2] == 0xffff)
+			if (l[2] == 0xFFFF)
 				continue;
 
 			printMapText(l[2], 244 + xOffset, (tY << 3) + 22 + yOffset);
 
-			if (l[5] == 0xffff) {
+			if (l[5] == 0xFFFF) {
 				tY++;
 				continue;
 			}
@@ -4343,7 +4343,7 @@ bool LoLEngine::automapProcessButtons(int inputFlag) {
 void LoLEngine::automapForwardButton() {
 	int i = _currentMapLevel + 1;
 	while (!(_hasTempDataFlags & (1 << (i - 1))))
-		i = (i + 1) & 0x1f;
+		i = (i + 1) & 0x1F;
 	if (i == _currentMapLevel)
 		return;
 
@@ -4360,7 +4360,7 @@ void LoLEngine::automapForwardButton() {
 void LoLEngine::automapBackButton() {
 	int i = _currentMapLevel - 1;
 	while (!(_hasTempDataFlags & (1 << (i - 1))))
-		i = (i - 1) & 0x1f;
+		i = (i - 1) & 0x1F;
 	if (i == _currentMapLevel)
 		return;
 
@@ -4401,7 +4401,7 @@ void LoLEngine::redrawMapCursor() {
 }
 
 void LoLEngine::drawMapBlockWall(uint16 block, uint8 wall, int x, int y, int direction) {
-	if (((1 << direction) & _levelBlockProperties[block].flags) || ((_wllAutomapData[wall] & 0x1f) != 13))
+	if (((1 << direction) & _levelBlockProperties[block].flags) || ((_wllAutomapData[wall] & 0x1F) != 13))
 		return;
 
 	int cp = _screen->_curPage;
@@ -4411,8 +4411,8 @@ void LoLEngine::drawMapBlockWall(uint16 block, uint8 wall, int x, int y, int dir
 }
 
 void LoLEngine::drawMapShape(uint8 wall, int x, int y, int direction) {
-	int l = _wllAutomapData[wall] & 0x1f;
-	if (l == 0x1f)
+	int l = _wllAutomapData[wall] & 0x1F;
+	if (l == 0x1F)
 		return;
 
 	_screen->drawShape(_screen->_curPage, _automapShapes[(l << 2) + direction], x + _mapCoords[10][direction] - 2, y + _mapCoords[11][direction] - 2, 0, 0);
@@ -4478,7 +4478,7 @@ int LoLEngine::mapGetStartPosY() {
 }
 
 void LoLEngine::mapIncludeLegendData(int type) {
-	type &= 0x7f;
+	type &= 0x7F;
 	for (int i = 0; i < 11; i++) {
 		if (_defaultLegendData[i].shapeIndex != type)
 			continue;
@@ -4499,7 +4499,7 @@ void LoLEngine::printMapText(uint16 stringId, int x, int y) {
 void LoLEngine::printMapExitButtonText() {
 	int cp = _screen->setCurPage(2);
 	Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
-	_screen->fprintString("%s", 295, 182, _flags.use16ColorMode ? 0xbb : 172, 0, 5, getLangString(0x4033));
+	_screen->fprintString("%s", 295, 182, _flags.use16ColorMode ? 0xBB : 172, 0, 5, getLangString(0x4033));
 	_screen->setFont(of);
 	_screen->setCurPage(cp);
 }
diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp
index b5f2a4e..2180c53 100644
--- a/engines/kyra/magic_eob.cpp
+++ b/engines/kyra/magic_eob.cpp
@@ -308,7 +308,7 @@ void EoBCoreEngine::startSpell(int spell) {
 	EoBCharacter *c = &_characters[_activeSpellCharId];
 	snd_playSoundEffect(s->sound);
 
-	if (s->flags & 0xa0)
+	if (s->flags & 0xA0)
 		sparkEffectDefensive(_activeSpellCharId);
 	else if (s->flags & 0x40)
 		sparkEffectDefensive(-1);
@@ -623,7 +623,7 @@ bool EoBCoreEngine::turnUndeadHit(EoBMonsterInPlay *m, int hitChance, int caster
 	assert(_monsterProps[m->type].tuResist > 0);
 	uint8 e = _turnUndeadEffect[_monsterProps[m->type].tuResist * 14 + MIN(casterLevel, 14)];
 
-	if (e == 0xff) {
+	if (e == 0xFF) {
 		calcAndInflictMonsterDamage(m, 0, 0, 500, 0x200, 5, 3);
 	} else if (hitChance < e) {
 		return false;
@@ -711,7 +711,7 @@ Item EoBCoreEngine::createMagicWeaponItem(int flags, int icon, int value, int ty
 void EoBCoreEngine::removeMagicWeaponItem(Item item) {
 	_itemTypes[_items[item].type].armorClass = -30;
 	_items[item].block = -2;
-	_items[item].level = 0xff;
+	_items[item].level = 0xFF;
 }
 
 void EoBCoreEngine::updateWallOfForceTimers() {
@@ -841,7 +841,7 @@ bool EoBCoreEngine::spellCallback_end_magicMissile(void *obj) {
 }
 
 void EoBCoreEngine::spellCallback_start_shockingGrasp() {
-	int t = createMagicWeaponType(0, 0, 0, 0x0f, 1, 8, getMageLevel(_openBookChar), 1);
+	int t = createMagicWeaponType(0, 0, 0, 0x0F, 1, 8, getMageLevel(_openBookChar), 1);
 	Item i = (t != -1) ? createMagicWeaponItem(0x10, 82, 0, t) : -1;
 	if (t == -1 || i == -1) {
 		if (_flags.gameID == GI_EOB2)
@@ -948,7 +948,7 @@ bool EoBCoreEngine::spellCallback_end_lightningBolt(void *obj) {
 }
 
 void EoBCoreEngine::spellCallback_start_vampiricTouch() {
-	int t = createMagicWeaponType(0, 0, 0, 0x0f, getMageLevel(_openBookChar) >> 1, 6, 0, 1);
+	int t = createMagicWeaponType(0, 0, 0, 0x0F, getMageLevel(_openBookChar) >> 1, 6, 0, 1);
 	Item i = (t != -1) ? createMagicWeaponItem(0x18, 83, 0, t) : -1;
 	if (t == -1 || i == -1) {
 		if (_flags.gameID == GI_EOB2)
@@ -989,7 +989,7 @@ bool EoBCoreEngine::spellCallback_end_iceStorm(void *obj) {
 	if (res) {
 		for (int i = 0; i < 4; i++) {
 			uint16 bl = fo->curBlock;
-			fo->curBlock = (fo->curBlock + blockAdv[i]) & 0x3ff;
+			fo->curBlock = (fo->curBlock + blockAdv[i]) & 0x3FF;
 			magicObjectDamageHit(fo, 1, 6, 0, getMageLevel(fo->attackerId));
 			fo->curBlock = bl;
 		}
@@ -1027,7 +1027,7 @@ void EoBCoreEngine::spellCallback_start_coneOfCold() {
 	_preventMonsterFlash = true;
 
 	for (int i = 0; i < 7; i++) {
-		for (const int16 *m = findBlockMonsters((_currentBlock + tbl[i]) & 0x3ff, 4, _currentDirection, 1, 1); *m != -1; m++)
+		for (const int16 *m = findBlockMonsters((_currentBlock + tbl[i]) & 0x3FF, 4, _currentDirection, 1, 1); *m != -1; m++)
 			calcAndInflictMonsterDamage(&_monsters[*m], cl, 4, cl, 0x41, 5, 0);
 	}
 
@@ -1054,7 +1054,7 @@ void EoBCoreEngine::spellCallback_start_wallOfForce() {
 		return;
 	}
 
-	uint32 dur = 0xffffffff;
+	uint32 dur = 0xFFFFFFFF;
 	int s = 0;
 	int i = 0;
 
@@ -1158,7 +1158,7 @@ bool EoBCoreEngine::spellCallback_end_aid(void *obj) {
 }
 
 void EoBCoreEngine::spellCallback_start_flameBlade() {
-	int t = createMagicWeaponType(0, 0, 0, 0x0f, 1, 4, 4, 1);
+	int t = createMagicWeaponType(0, 0, 0, 0x0F, 1, 4, 4, 1);
 	Item i = (t != -1) ? createMagicWeaponItem(0, 84, 0, t) : -1;
 	if (t == -1 || i == -1) {
 		if (_flags.gameID == GI_EOB2)
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 6f7591c..4c41348 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -496,7 +496,7 @@ public:
 	void advSrcBitsBy1();
 	void advSrcBitsByIndex(uint8 newIndex);
 
-	uint8 getKeyLower() const { return _key & 0xff; }
+	uint8 getKeyLower() const { return _key & 0xFF; }
 	void setIndex(uint8 index) { _index = index; }
 	uint16 getKeyMasked(uint8 newIndex);
 	uint16 keyMaskedAlign(uint16 val);
@@ -515,7 +515,7 @@ void FileExpanderSource::advSrcBitsBy1() {
 	_key >>= 1;
 	if (!--_bitsLeft) {
 		if (_dataPtr < _endofBuffer)
-			_key = ((*_dataPtr++) << 8) | (_key & 0xff);
+			_key = ((*_dataPtr++) << 8) | (_key & 0xFF);
 		_bitsLeft = 8;
 	}
 }
@@ -528,7 +528,7 @@ void FileExpanderSource::advSrcBitsByIndex(uint8 newIndex) {
 		_index = -_bitsLeft;
 		_bitsLeft = 8 - _index;
 		if (_dataPtr < _endofBuffer)
-			_key = (*_dataPtr++ << 8) | (_key & 0xff);
+			_key = (*_dataPtr++ << 8) | (_key & 0xFF);
 	}
 	_key >>= _index;
 }
@@ -540,13 +540,13 @@ uint16 FileExpanderSource::getKeyMasked(uint8 newIndex) {
 
 	if (_index > 8) {
 		newIndex = _index - 8;
-		res = (_key & 0xff) & mskTable[8];
+		res = (_key & 0xFF) & mskTable[8];
 		advSrcBitsByIndex(8);
 		_index = newIndex;
-		res |= (((_key & 0xff) & mskTable[_index]) << 8);
+		res |= (((_key & 0xFF) & mskTable[_index]) << 8);
 		advSrcBitsByIndex(_index);
 	} else {
-		res = (_key & 0xff) & mskTable[_index];
+		res = (_key & 0xFF) & mskTable[_index];
 		advSrcBitsByIndex(_index);
 	}
 
@@ -568,10 +568,10 @@ void FileExpanderSource::copyBytes(uint8 *& dst) {
 
 uint16 FileExpanderSource::keyMaskedAlign(uint16 val) {
 	val -= 0x101;
-	_index = (val & 0xff) >> 2;
+	_index = (val & 0xFF) >> 2;
 	int16 b = ((_bitsLeft << 8) | _index) - 1;
 	_bitsLeft = b >> 8;
-	_index = b & 0xff;
+	_index = b & 0xFF;
 	uint16 res = (((val & 3) + 4) << _index) + 0x101;
 	return res + getKeyMasked(_index);
 }
@@ -727,20 +727,20 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
 			cmd = ((int16 *)_tables[2])[_src->getKeyLower()];
 			_src->advSrcBitsByIndex(cmd < 0 ? calcCmdAndIndex(_tables[3], cmd) : _tables[0][cmd]);
 
-			if (cmd == 0x11d) {
+			if (cmd == 0x11D) {
 				cmd = 0x200;
 			} else if (cmd > 0x108) {
 				cmd = _src->keyMaskedAlign(cmd);
 			}
 
 			if (!(cmd >> 8)) {
-				*d++ = cmd & 0xff;
+				*d++ = cmd & 0xFF;
 			} else if (cmd != 0x100) {
-				cmd -= 0xfe;
+				cmd -= 0xFE;
 				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;
+				if ((offset & 0xFF) >= 4) {
+					uint8 newIndex = ((offset & 0xFF) >> 1) - 1;
 					offset = (((offset & 1) + 2) << newIndex);
 					offset += _src->getKeyMasked(newIndex);
 				}
@@ -775,7 +775,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
 void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex2, int cnt) {
 	uint8 *tbl1 = _tables[srcIndex];
 	uint8 *tbl2 = _tables[dstIndex];
-	uint8 *tbl3 = dstIndex2 == 0xff ? 0 : _tables[dstIndex2];
+	uint8 *tbl3 = dstIndex2 == 0xFF ? 0 : _tables[dstIndex2];
 
 	if (!cnt)
 		return;
@@ -859,7 +859,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
 			do {
 				s2[o] = cnt;
 				o += inc;
-			} while (!(o & 0xf00));
+			} while (!(o & 0xF00));
 
 		} else if (t > 8) {
 			if (!bt)
@@ -868,7 +868,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) {
@@ -897,7 +897,7 @@ uint8 FileExpander::calcCmdAndIndex(const uint8 *tbl, int16 &para) {
 
 	do {
 		newIndex++;
-		para = t[((~para) & 0xfffe) | (v & 1)];
+		para = t[((~para) & 0xFFFE) | (v & 1)];
 		v >>= 1;
 	} while (para < 0);
 
@@ -1020,7 +1020,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
 
 	pos = 0;
 
-	const uint32 kExecSize = 0x0bba;
+	const uint32 kExecSize = 0x0BBA;
 	const uint32 kHeaderSize = 30;
 	const uint32 kHeaderSize2 = 46;
 
diff --git a/engines/kyra/saveload_eob.cpp b/engines/kyra/saveload_eob.cpp
index 70c690e..e4f53a8 100644
--- a/engines/kyra/saveload_eob.cpp
+++ b/engines/kyra/saveload_eob.cpp
@@ -453,7 +453,7 @@ Common::Error EoBCoreEngine::saveGameStateIntern(int slot, const char *saveName,
 
 		out->write(l->wallsXorData, 4096);
 		for (int ii = 0; ii < 1024; ii++)
-			out->writeByte(l->flags[ii] & 0xff);
+			out->writeByte(l->flags[ii] & 0xFF);
 
 		EoBMonsterInPlay *lm = (EoBMonsterInPlay *)_lvlTempData[i]->monsters;
 		EoBFlyingObject *lf = (EoBFlyingObject *)_lvlTempData[i]->flyingObjects;
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index b684066..58e3d94 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -41,7 +41,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
 	SaveHeader header;
 	Common::InSaveFile *saveFile = openSaveForReading(fileName, header);
 	if (!saveFile) {
-		_txt->printMessage(2, "%s", getLangString(0x425d));
+		_txt->printMessage(2, "%s", getLangString(0x425D));
 		return Common::kNoError;
 	}
 
@@ -437,7 +437,7 @@ Common::Error LoLEngine::saveGameStateIntern(int slot, const char *saveName, con
 
 		out->write(l->wallsXorData, 4096);
 		for (int ii = 0; ii < 1024; ii++)
-			out->writeByte(l->flags[ii] & 0xff);
+			out->writeByte(l->flags[ii] & 0xFF);
 
 		LoLMonster *lm = (LoLMonster *)_lvlTempData[i]->monsters;
 		FlyingObject *lf = (FlyingObject *)_lvlTempData[i]->flyingObjects;
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index 53f000a..84cf4a3 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -157,7 +157,7 @@ Common::String EoBCoreEngine::initLevelData(int sub) {
 		_curGfxFile = (const char *)pos;
 		pos += slen;
 
-		if (*pos++ != 0xff && _flags.gameID == GI_EOB2) {
+		if (*pos++ != 0xFF && _flags.gameID == GI_EOB2) {
 			tmpStr = Common::String::format(paletteFilePattern, (const char *)pos);
 			pos += 13;
 		}
@@ -174,7 +174,7 @@ Common::String EoBCoreEngine::initLevelData(int sub) {
 		if (_configRenderMode != Common::kRenderCGA) {
 			Palette backupPal(256);
 			backupPal.copy(_screen->getPalette(0), 224, 32, 224);
-			_screen->getPalette(0).fill(224, 32, 0x3f);
+			_screen->getPalette(0).fill(224, 32, 0x3F);
 			uint8 *src = _screen->getPalette(0).getData();
 
 			_screen->createFadeTable(src, _screen->getFadeTable(0), 4, 75);     // green
@@ -271,7 +271,7 @@ void EoBCoreEngine::addLevelItems() {
 	for (int i = 0; i < 600; i++) {
 		if (_items[i].level != _currentLevel || _items[i].block <= 0)
 			continue;
-		setItemPosition((Item *)&_levelBlockProperties[_items[i].block & 0x3ff].drawObjects, _items[i].block, i, _items[i].pos);
+		setItemPosition((Item *)&_levelBlockProperties[_items[i].block & 0x3FF].drawObjects, _items[i].block, i, _items[i].pos);
 	}
 }
 
@@ -305,10 +305,10 @@ void EoBCoreEngine::loadVcnData(const char *file, const uint8 *cgaMapping) {
 		while (dst < _vcnBlocks + vcnSize) {
 			const uint16 *table = _screen->getCGADitheringTable((tblSwitch++) & 1);
 			for (int ii = 0; ii < 2; ii++) {
-				*dst++ = (table[pos[0]] & 0x000f) | ((table[pos[0]] & 0x0f00) >> 4);
-				*dst++ = (table[pos[1]] & 0x000f) | ((table[pos[1]] & 0x0f00) >> 4);
-				*dst2++ = ((pos[0] & 0xf0 ? 0x30 : 0) | (pos[0] & 0x0f ? 0x03 : 0)) ^ 0x33;
-				*dst2++ = ((pos[1] & 0xf0 ? 0x30 : 0) | (pos[1] & 0x0f ? 0x03 : 0)) ^ 0x33;
+				*dst++ = (table[pos[0]] & 0x000F) | ((table[pos[0]] & 0x0F00) >> 4);
+				*dst++ = (table[pos[1]] & 0x000F) | ((table[pos[1]] & 0x0F00) >> 4);
+				*dst2++ = ((pos[0] & 0xF0 ? 0x30 : 0) | (pos[0] & 0x0F ? 0x03 : 0)) ^ 0x33;
+				*dst2++ = ((pos[1] & 0xF0 ? 0x30 : 0) | (pos[1] & 0x0F ? 0x03 : 0)) ^ 0x33;
 				pos += 2;
 			}
 		}
@@ -379,8 +379,8 @@ void EoBCoreEngine::loadDecorations(const char *cpsFile, const char *decFile) {
 		LevelDecorationProperty *l = &_levelDecorationData[i];
 		for (int ii = 0; ii < 10; ii++) {
 			l->shapeIndex[ii] = s->readByte();
-			if (l->shapeIndex[ii] == 0xff)
-				l->shapeIndex[ii] = 0xffff;
+			if (l->shapeIndex[ii] == 0xFF)
+				l->shapeIndex[ii] = 0xFFFF;
 		}
 		l->next = s->readByte();
 		l->flags = s->readByte();
@@ -427,7 +427,7 @@ void EoBCoreEngine::assignWallsAndDecorations(int wallIndex, int vmpIndex, int d
 
 		for (int i = 0; i < 10; i++) {
 			uint16 t = _levelDecorationProperties[_mappedDecorationsCount].shapeIndex[i];
-			if (t == 0xffff)
+			if (t == 0xFFFF)
 				continue;
 
 			if (_levelDecorationShapes[t])
@@ -479,7 +479,7 @@ void EoBCoreEngine::toggleWallState(int wall, int toggle) {
 		if (toggle)
 			_wllWallFlags[wall + i] |= 2;
 		else
-			_wllWallFlags[wall + i] &= 0xfd;
+			_wllWallFlags[wall + i] &= 0xFD;
 	}
 }
 
@@ -593,7 +593,7 @@ void EoBCoreEngine::drawDecorations(int index) {
 				if ((i == 0) && (flg & 1 || ((flg & 2) && _wllProcessFlag)))
 					ix = -ix;
 
-				if (_levelDecorationProperties[l].shapeIndex[shpIx] == 0xffff) {
+				if (_levelDecorationProperties[l].shapeIndex[shpIx] == 0xFFFF) {
 					l = _levelDecorationProperties[l].next;
 					continue;
 				}
@@ -708,7 +708,7 @@ int EoBCoreEngine::clickedNiche(uint16 block, uint16 direction) {
 		if (_dscItemShapeMap[_items[_itemInHand].icon] <= 14) {
 			_txt->printMessage(_pryDoorStrings[5]);
 		} else {
-			setItemPosition((Item *)&_levelBlockProperties[block & 0x3ff].drawObjects, block, _itemInHand, 8);
+			setItemPosition((Item *)&_levelBlockProperties[block & 0x3FF].drawObjects, block, _itemInHand, 8);
 			runLevelScript(block, 4);
 			setHandItem(0);
 			_sceneUpdateRequired = true;
@@ -731,7 +731,7 @@ int EoBCoreEngine::clickedDoorPry(uint16 block, uint16 direction) {
 
 	int d = -1;
 	for (int i = 0; i < 6; i++)  {
-		if (!testCharacter(i, 0x0d))
+		if (!testCharacter(i, 0x0D))
 			continue;
 		if (d >= 0) {
 			int s1 = _characters[i].strengthCur + _characters[i].strengthExtCur;
@@ -776,7 +776,7 @@ int EoBCoreEngine::clickedDoorNoPry(uint16 block, uint16 direction) {
 int EoBCoreEngine::specialWallAction(int block, int direction) {
 	direction ^= 2;
 	uint8 type = _specialWallTypes[_levelBlockProperties[block].walls[direction]];
-	if (!type || !(_clickedSpecialFlag & (((_levelBlockProperties[block].flags & 0xf8) >> 3) | 0xe0)))
+	if (!type || !(_clickedSpecialFlag & (((_levelBlockProperties[block].flags & 0xF8) >> 3) | 0xE0)))
 		return 0;
 
 	int res = 0;
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index d916348..f1045d2 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -193,7 +193,7 @@ int LoLEngine::assignLevelDecorationShapes(int index) {
 
 	for (int i = 0; i < 10; i++) {
 		uint16 t = _levelDecorationProperties[o].shapeIndex[i];
-		if (t == 0xffff)
+		if (t == 0xFFFF)
 			continue;
 
 		uint16 pv = p1[t];
@@ -254,7 +254,7 @@ void LoLEngine::loadBlockProperties(const char *cmzFile) {
 		_levelBlockProperties[i].direction = 5;
 
 		if (_wllAutomapData[_levelBlockProperties[i].walls[0]] == 17) {
-			_levelBlockProperties[i].flags &= 0xef;
+			_levelBlockProperties[i].flags &= 0xEF;
 			_levelBlockProperties[i].flags |= 0x20;
 		}
 	}
@@ -315,9 +315,9 @@ void LoLEngine::loadLevelGraphics(const char *file, int specialColor, int weight
 		if (_lastSpecialColor == 1)
 			_lastSpecialColor = 0x44;
 		else if (_lastSpecialColor == 0x66)
-			_lastSpecialColor = scumm_stricmp(file, "YVEL2") ? 0xcc : 0x44;
-		else if (_lastSpecialColor == 0x6b)
-			_lastSpecialColor = 0xcc;
+			_lastSpecialColor = scumm_stricmp(file, "YVEL2") ? 0xCC : 0x44;
+		else if (_lastSpecialColor == 0x6B)
+			_lastSpecialColor = 0xCC;
 		else
 			_lastSpecialColor = 0x44;
 	}
@@ -431,17 +431,17 @@ void LoLEngine::loadLevelGraphics(const char *file, int specialColor, int weight
 		}
 
 		for (int ii = l; ii < 256; ii++)
-			levelOverlay[ii] = ii & 0xff;
+			levelOverlay[ii] = ii & 0xFF;
 	}
 
 	uint8 *levelOverlay = _screen->getLevelOverlay(7);
 	for (int i = 0; i < 256; i++)
-		levelOverlay[i] = i & 0xff;
+		levelOverlay[i] = i & 0xFF;
 
 	if (_flags.use16ColorMode) {
-		_screen->getLevelOverlay(6)[0xee] = 0xee;
+		_screen->getLevelOverlay(6)[0xEE] = 0xEE;
 		if (_lastSpecialColor == 0x44)
-			_screen->getLevelOverlay(5)[0xee] = 0xee;
+			_screen->getLevelOverlay(5)[0xEE] = 0xEE;
 
 		for (int i = 0; i < 7; i++)
 			memcpy(_screen->getLevelOverlay(i), _screen->getLevelOverlay(i + 1), 256);
@@ -505,14 +505,14 @@ void LoLEngine::resetBlockProperties() {
 	for (int i = 0; i < 1024; i++) {
 		LevelBlockProperty *l = &_levelBlockProperties[i];
 		if (l->flags & 0x10) {
-			l->flags &= 0xef;
+			l->flags &= 0xEF;
 			if (testWallInvisibility(i, 0) && testWallInvisibility(i, 1))
 				l->flags |= 0x40;
 		} else {
 			if (l->flags & 0x40)
-				l->flags &= 0xbf;
+				l->flags &= 0xBF;
 			else if (l->flags & 0x80)
-				l->flags &= 0x7f;
+				l->flags &= 0x7F;
 		}
 	}
 }
@@ -574,7 +574,7 @@ void LoLEngine::updateLampStatus() {
 				setPaletteBrightness(_screen->getPalette(0), _brightness, newLampEffect);
 			_lampStatusTimer = _system->getMillis() + (10 + rollDice(1, 30)) * _tickLength;
 		} else {
-			if ((_lampEffect & 0xfe) == (newLampEffect & 0xfe)) {
+			if ((_lampEffect & 0xFE) == (newLampEffect & 0xFE)) {
 				if (_system->getMillis() <= _lampStatusTimer) {
 					newLampEffect = _lampEffect;
 				} else {
@@ -702,7 +702,7 @@ void LoLEngine::moveParty(uint16 direction, int unk1, int unk2, int buttonShape)
 			runLevelScript(opos, 8);
 			runLevelScript(npos, 2);
 
-			if (_levelBlockProperties[npos].walls[0] == 0x1a)
+			if (_levelBlockProperties[npos].walls[0] == 0x1A)
 				memset(_levelBlockProperties[npos].walls, 0, 4);
 		}
 	}
@@ -711,12 +711,12 @@ void LoLEngine::moveParty(uint16 direction, int unk1, int unk2, int buttonShape)
 }
 
 uint16 LoLEngine::calcBlockIndex(uint16 x, uint16 y) {
-	return (((y & 0xff00) >> 3) | (x >> 8)) & 0x3ff;
+	return (((y & 0xFF00) >> 3) | (x >> 8)) & 0x3FF;
 }
 
 void LoLEngine::calcCoordinates(uint16 &x, uint16 &y, int block, uint16 xOffs, uint16 yOffs) {
-	x = (block & 0x1f) << 8 | xOffs;
-	y = ((block & 0xffe0) << 3) | yOffs;
+	x = (block & 0x1F) << 8 | xOffs;
+	y = ((block & 0xFFE0) << 3) | yOffs;
 }
 
 void LoLEngine::calcCoordinatesForSingleCharacter(int charNum, uint16 &x, uint16 &y) {
@@ -732,8 +732,8 @@ void LoLEngine::calcCoordinatesForSingleCharacter(int charNum, uint16 &x, uint16
 
 	calcCoordinatesAddDirectionOffset(x, y, _currentDirection);
 
-	x |= (_partyPosX & 0xff00);
-	y |= (_partyPosY & 0xff00);
+	x |= (_partyPosX & 0xFF00);
+	y |= (_partyPosY & 0xFF00);
 }
 
 void LoLEngine::calcCoordinatesAddDirectionOffset(uint16 &x, uint16 &y, int direction) {
@@ -777,7 +777,7 @@ void LoLEngine::notifyBlockNotPassable(int scrollFlag) {
 		movePartySmoothScrollBlocked(2);
 
 	snd_stopSpeech(true);
-	_txt->printMessage(0x8002, "%s", getLangString(0x403f));
+	_txt->printMessage(0x8002, "%s", getLangString(0x403F));
 	snd_playSoundEffect(19, -1);
 }
 
@@ -804,7 +804,7 @@ int LoLEngine::clickedNiche(uint16 block, uint16 direction) {
 		return 0;
 
 	uint16 x = 0x80;
-	uint16 y = 0xff;
+	uint16 y = 0xFF;
 	calcCoordinatesAddDirectionOffset(x, y, _currentDirection);
 	calcCoordinates(x, y, block, x, y);
 	setItemPosition(_itemInHand, x, y, 8, 1);
@@ -1180,7 +1180,7 @@ void LoLEngine::processGasExplosion(int soundId) {
 		memcpy(p2, p1, 768);
 
 		for (int i = 1; i < 128; i++)
-			p2[i * 3] = 0x3f;
+			p2[i * 3] = 0x3F;
 
 		uint32 ctime = _system->getMillis();
 		while (_screen->timedPaletteFadeStep(_screen->getPalette(0).getData(), p2, _system->getMillis() - ctime, 10))
@@ -1244,10 +1244,10 @@ void LoLEngine::setWallType(int block, int wall, int val) {
 		for (int i = 0; i < 4; i++)
 			_levelBlockProperties[block].walls[i] = val;
 		if (_wllAutomapData[val] == 17) {
-			_levelBlockProperties[block].flags &= 0xef;
+			_levelBlockProperties[block].flags &= 0xEF;
 			_levelBlockProperties[block].flags |= 0x20;
 		} else {
-			_levelBlockProperties[block].flags &= 0xdf;
+			_levelBlockProperties[block].flags &= 0xDF;
 		}
 	} else {
 		_levelBlockProperties[block].walls[wall] = val;
@@ -1491,7 +1491,7 @@ void LoLEngine::drawDecorations(int index) {
 						ov = 0;
 				}
 				ovl = _screen->getLevelOverlay(ov);
-			} else if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xffff) {
+			} else if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xFFFF) {
 				scaleW = scaleH = 0x100;
 				int ov = 7;
 				if (_flags.use16ColorMode) {
@@ -1504,7 +1504,7 @@ void LoLEngine::drawDecorations(int index) {
 				ovl = _screen->getLevelOverlay(ov);
 			}
 
-			if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xffff) {
+			if (_levelDecorationProperties[l].shapeIndex[shpIx] != 0xFFFF) {
 				shapeData = _levelDecorationShapes[_levelDecorationProperties[l].shapeIndex[shpIx]];
 				if (shapeData) {
 					if (ix < 0) {
@@ -1538,10 +1538,10 @@ void LoLEngine::drawDecorations(int index) {
 }
 
 void LoLEngine::drawBlockEffects(int index, int type) {
-	static const uint16 yOffs[] = { 0xff, 0xff, 0x80, 0x80 };
+	static const uint16 yOffs[] = { 0xFF, 0xFF, 0x80, 0x80 };
 	uint8 flg = _visibleBlocks[index]->flags;
 	// flags: 0x10 = ice wall, 0x20 = teleporter, 0x40 = blue slime spot, 0x80 = blood spot
-	if (!(flg & 0xf0))
+	if (!(flg & 0xF0))
 		return;
 
 	type = (type == 0) ? 2 : 0;
@@ -1562,8 +1562,8 @@ void LoLEngine::drawBlockEffects(int index, int type) {
 
 		calcCoordinatesAddDirectionOffset(x, y, _currentDirection);
 
-		x |= ((_visibleBlockIndex[index] & 0x1f) << 8);
-		y |= ((_visibleBlockIndex[index] & 0xffe0) << 3);
+		x |= ((_visibleBlockIndex[index] & 0x1F) << 8);
+		y |= ((_visibleBlockIndex[index] & 0xFFE0) << 3);
 
 		drawItemOrMonster(_effectShapes[type], ovl, x, y, 0, (type == 1) ? -20 : 0, drawFlag, -1, false);
 	}
diff --git a/engines/kyra/scene_rpg.cpp b/engines/kyra/scene_rpg.cpp
index 5a04333..6d724ef 100644
--- a/engines/kyra/scene_rpg.cpp
+++ b/engines/kyra/scene_rpg.cpp
@@ -151,7 +151,7 @@ void KyraRpgEngine::generateBlockDrawingBuffer() {
 
 	memset(_blockDrawingBuffer, 0, 660 * sizeof(uint16));
 
-	_wllProcessFlag = ((_currentBlock >> 5) + (_currentBlock & 0x1f) + _currentDirection) & 1;
+	_wllProcessFlag = ((_currentBlock >> 5) + (_currentBlock & 0x1F) + _currentDirection) & 1;
 
 	if (_wllProcessFlag) // floor and ceiling
 		generateVmpTileDataFlipped(0, 15, 1, -330, 22, 15);
@@ -318,7 +318,7 @@ bool KyraRpgEngine::hasWall(int index) {
 
 void KyraRpgEngine::assignVisibleBlocks(int block, int direction) {
 	for (int i = 0; i < 18; i++) {
-		uint16 t = (block + _dscBlockIndex[direction * 18 + i]) & 0x3ff;
+		uint16 t = (block + _dscBlockIndex[direction * 18 + i]) & 0x3FF;
 		_visibleBlockIndex[i] = t;
 
 		_visibleBlocks[i] = &_levelBlockProperties[t];
@@ -366,7 +366,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 
 			if (vcnOffset & 0x4000) {
 				horizontalFlip = true;
-				vcnOffset &= 0x3fff;
+				vcnOffset &= 0x3FFF;
 			}
 
 			uint8 *src = 0;
@@ -378,7 +378,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 				vcnOffset = bdb[329];
 				if (vcnOffset & 0x4000) {
 					horizontalFlip = true;
-					vcnOffset &= 0x3fff;
+					vcnOffset &= 0x3FFF;
 				}
 
 				src = (_vcfBlocks ? _vcfBlocks : _vcnBlocks) + (vcnOffset << 5);
@@ -391,7 +391,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 					src += 3;
 					for (int blockX = 0; blockX < 4; blockX++) {
 						uint8 bl = *src--;
-						*d++ = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
+						*d++ = _vcnColTable[((bl & 0x0F) + wllVcnOffset) | shift];
 						*d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
 					}
 					src += 5;
@@ -402,7 +402,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 					for (int blockX = 0; blockX < 4; blockX++) {
 						uint8 bl = *src++;
 						*d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
-						*d++ = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
+						*d++ = _vcnColTable[((bl & 0x0F) + wllVcnOffset) | shift];
 					}
 					d += 168;
 				}
@@ -414,7 +414,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 				horizontalFlip = false;
 
 				if (vcnExtraOffsetWll & 0x4000) {
-					vcnExtraOffsetWll &= 0x3fff;
+					vcnExtraOffsetWll &= 0x3FFF;
 					horizontalFlip = true;
 				}
 
@@ -429,11 +429,11 @@ void KyraRpgEngine::drawVcnBlocks() {
 						for (int blockX = 0; blockX < 4; blockX++) {
 							uint8 bl = *src--;
 							uint8 mask = _vcnTransitionMask ? *maskTable-- : 0;
-							uint8 h = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
+							uint8 h = _vcnColTable[((bl & 0x0F) + wllVcnRmdOffset) | shift];
 							uint8 l = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
 
 							if (_vcnTransitionMask)
-								*d = (*d & (mask & 0x0f)) | h;
+								*d = (*d & (mask & 0x0F)) | h;
 							else if (h)
 								*d = h;
 							d++;
@@ -454,7 +454,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 							uint8 bl = *src++;
 							uint8 mask = _vcnTransitionMask ? *maskTable++ : 0;
 							uint8 h = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
-							uint8 l = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
+							uint8 l = _vcnColTable[((bl & 0x0F) + wllVcnRmdOffset) | shift];
 
 							if (_vcnTransitionMask)
 								*d = (*d & (mask >> 4)) | h;
@@ -463,7 +463,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 							d++;
 
 							if (_vcnTransitionMask)
-								*d = (*d & (mask & 0x0f)) | l;
+								*d = (*d & (mask & 0x0F)) | l;
 							else if (l)
 								*d = l;
 							d++;
@@ -482,7 +482,7 @@ void KyraRpgEngine::drawVcnBlocks() {
 
 uint16 KyraRpgEngine::calcNewBlockPosition(uint16 curBlock, uint16 direction) {
 	static const int16 blockPosTable[] = { -32, 1, 32, -1 };
-	return (curBlock + blockPosTable[direction]) & 0x3ff;
+	return (curBlock + blockPosTable[direction]) & 0x3FF;
 }
 
 int KyraRpgEngine::clickedWallShape(uint16 block, uint16 direction) {
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 6c77870..5dd7cfb 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -1490,7 +1490,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
 
 	int scaleCounterV = 0;
 
-	const int drawFunc = flags & 0x0f;
+	const int drawFunc = flags & 0x0F;
 	_dsProcessMargin = dsMarginFunc[drawFunc];
 	_dsScaleSkip = dsSkipFunc[drawFunc];
 	_dsProcessLine = dsLineFunc[drawFunc];
@@ -1747,7 +1747,7 @@ int Screen::drawShapeMarginScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt)
 	_dsTmpWidth += cnt;
 
 	int i = (_dsOffscreenLeft - cnt) * _dsScaleW;
-	int res = i & 0xff;
+	int res = i & 0xFF;
 	i >>= 8;
 	i -= _dsOffscreenScaleVal2;
 	dst += i;
@@ -1773,7 +1773,7 @@ int Screen::drawShapeMarginScaleDownwind(uint8 *&dst, const uint8 *&src, int &cn
 	_dsTmpWidth += cnt;
 
 	int i = (_dsOffscreenLeft - cnt) * _dsScaleW;
-	int res = i & 0xff;
+	int res = i & 0xFF;
 	i >>= 8;
 	i -= _dsOffscreenScaleVal2;
 	dst -= i;
@@ -1862,7 +1862,7 @@ void Screen::drawShapeProcessLineScaleUpwind(uint8 *&dst, const uint8 *&src, int
 				int r = c * _dsScaleW + scaleState;
 				dst += (r >> 8);
 				cnt -= (r >> 8);
-				scaleState = r & 0xff;
+				scaleState = r & 0xFF;
 			}
 		} else if (scaleState) {
 			(this->*_dsPlot)(dst++, c);
@@ -1890,7 +1890,7 @@ void Screen::drawShapeProcessLineScaleDownwind(uint8 *&dst, const uint8 *&src, i
 				int r = c * _dsScaleW + scaleState;
 				dst -= (r >> 8);
 				cnt -= (r >> 8);
-				scaleState = r & 0xff;
+				scaleState = r & 0xFF;
 			}
 		} else {
 			(this->*_dsPlot)(dst--, c);
@@ -1938,9 +1938,9 @@ void Screen::drawShapePlotType5(uint8 *dst, uint8 cmd) {
 
 void Screen::drawShapePlotType6(uint8 *dst, uint8 cmd) {
 	int t = _drawShapeVar4 + _drawShapeVar5;
-	if (t & 0xff00) {
+	if (t & 0xFF00) {
 		cmd = dst[_drawShapeVar3];
-		t &= 0xff;
+		t &= 0xFF;
 	} else {
 		cmd = _dsTable2[cmd];
 	}
@@ -1951,7 +1951,7 @@ void Screen::drawShapePlotType6(uint8 *dst, uint8 cmd) {
 
 void Screen::drawShapePlotType8(uint8 *dst, uint8 cmd) {
 	uint32 relOffs = dst - _dsDstPage;
-	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+	int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
 	if (_dsDrawLayer < t)
 		cmd = _shapePages[1][relOffs];
 
@@ -1960,7 +1960,7 @@ void Screen::drawShapePlotType8(uint8 *dst, uint8 cmd) {
 
 void Screen::drawShapePlotType9(uint8 *dst, uint8 cmd) {
 	uint32 relOffs = dst - _dsDstPage;
-	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+	int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
 	if (_dsDrawLayer < t) {
 		cmd = _shapePages[1][relOffs];
 	} else {
@@ -1974,7 +1974,7 @@ void Screen::drawShapePlotType9(uint8 *dst, uint8 cmd) {
 
 void Screen::drawShapePlotType11_15(uint8 *dst, uint8 cmd) {
 	uint32 relOffs = dst - _dsDstPage;
-	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+	int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
 
 	if (_dsDrawLayer < t) {
 		cmd = _shapePages[1][relOffs];
@@ -1990,7 +1990,7 @@ void Screen::drawShapePlotType11_15(uint8 *dst, uint8 cmd) {
 
 void Screen::drawShapePlotType12(uint8 *dst, uint8 cmd) {
 	uint32 relOffs = dst - _dsDstPage;
-	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+	int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
 	if (_dsDrawLayer < t) {
 		cmd = _shapePages[1][relOffs];
 	} else {
@@ -2002,7 +2002,7 @@ void Screen::drawShapePlotType12(uint8 *dst, uint8 cmd) {
 
 void Screen::drawShapePlotType13(uint8 *dst, uint8 cmd) {
 	uint32 relOffs = dst - _dsDstPage;
-	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+	int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
 	if (_dsDrawLayer < t) {
 		cmd = _shapePages[1][relOffs];
 	} else {
@@ -2017,14 +2017,14 @@ void Screen::drawShapePlotType13(uint8 *dst, uint8 cmd) {
 
 void Screen::drawShapePlotType14(uint8 *dst, uint8 cmd) {
 	uint32 relOffs = dst - _dsDstPage;
-	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
+	int t = (_shapePages[0][relOffs] & 0x7F) & 0x87;
 	if (_dsDrawLayer < t) {
 		cmd = _shapePages[1][relOffs];
 	} else {
 		t = _drawShapeVar4 + _drawShapeVar5;
-		if (t & 0xff00) {
+		if (t & 0xFF00) {
 			cmd = dst[_drawShapeVar3];
-			t &= 0xff;
+			t &= 0xFF;
 		} else {
 			cmd = _dsTable2[cmd];
 		}
@@ -2118,7 +2118,7 @@ void Screen::decodeFrame1(const uint8 *src, uint8 *dst, uint32 size) {
 	uint8 nib = 0;
 
 	uint16 code = decodeEGAGetCode(src, nib);
-	uint8 last = code & 0xff;
+	uint8 last = code & 0xFF;
 
 	uint8 *dstPrev = dst;
 	uint16 count = 1;
@@ -2131,7 +2131,7 @@ void Screen::decodeFrame1(const uint8 *src, uint8 *dst, uint32 size) {
 		uint8 cmd = code >> 8;
 
 		if (cmd--) {
-			code = (cmd << 8) | (code & 0xff);
+			code = (cmd << 8) | (code & 0xFF);
 			uint8 *tmpDst = dst;
 
 			if (code < numPatterns) {
@@ -2159,7 +2159,7 @@ void Screen::decodeFrame1(const uint8 *src, uint8 *dst, uint32 size) {
 			count = countPrev;
 
 		} else {
-			*dst++ = last = (code & 0xff);
+			*dst++ = last = (code & 0xFF);
 
 			if (numPatterns < 3840) {
 				patterns[numPatterns].pos = dstPrev;
@@ -2180,7 +2180,7 @@ uint16 Screen::decodeEGAGetCode(const uint8 *&pos, uint8 &nib) {
 		res >>= 4;
 	} else {
 		pos++;
-		res &= 0xfff;
+		res &= 0xFFF;
 	}
 	return res;
 }
@@ -3643,7 +3643,7 @@ void Palette::loadVGAPalette(Common::ReadStream &stream, int startIndex, int col
 
 	uint8 *pos = _palData + startIndex * 3;
 	for (int i = 0 ; i < colors * 3; i++)
-		*pos++ = stream.readByte() & 0x3f;
+		*pos++ = stream.readByte() & 0x3F;
 }
 
 void Palette::loadEGAPalette(Common::ReadStream &stream, int startIndex, int colors) {
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index 7cb5050..b1b2635 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -94,7 +94,7 @@ bool Screen_EoB::init() {
 			_egaDitheringTable = new uint8[256];
 			_egaDitheringTempPage = new uint8[SCREEN_W * 2 * SCREEN_H * 2];
 			for (int i = 0; i < 256; i++)
-				_egaDitheringTable[i] = i & 0x0f;
+				_egaDitheringTable[i] = i & 0x0F;
 		} else if (_renderMode == Common::kRenderCGA) {
 			_cgaMappingDefault = _vm->staticres()->loadRawData(kEoB1CgaMappingDefault, temp);
 			_cgaDitheringTables[0] = new uint16[256];
@@ -105,7 +105,7 @@ bool Screen_EoB::init() {
 			_cgaScaleTable = new uint8[256];
 			memset(_cgaScaleTable, 0, 256 * sizeof(uint8));
 			for (int i = 0; i < 256; i++)
-				_cgaScaleTable[i] = ((i & 0xf0) >> 2) | (i & 0x03);
+				_cgaScaleTable[i] = ((i & 0xF0) >> 2) | (i & 0x03);
 		}
 
 		return true;
@@ -260,14 +260,14 @@ void Screen_EoB::convertPage(int srcPage, int dstPage, const uint8 *cgaMapping)
 		for (int height = SCREEN_H; height; height--) {
 			const uint16 *table = _cgaDitheringTables[(tblSwitch++) & 1];
 			for (int width = SCREEN_W / 2; width; width--) {
-				WRITE_LE_UINT16(d++, table[((src[1] & 0x0f) << 4) | (src[0] & 0x0f)]);
+				WRITE_LE_UINT16(d++, table[((src[1] & 0x0F) << 4) | (src[0] & 0x0F)]);
 				src += 2;
 			}
 		}
 	} else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
 		uint32 len = SCREEN_W * SCREEN_H;
 		while (len--)
-			*dst++ = *src++ & 0x0f;
+			*dst++ = *src++ & 0x0F;
 	} else {
 		copyPage(srcPage, dstPage);
 	}
@@ -321,9 +321,9 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
 		uint8 *dst = shp;
 
 		*dst++ = 4;
-		*dst++ = (h & 0xff);
-		*dst++ = (w & 0xff);
-		*dst++ = (h & 0xff);
+		*dst++ = (h & 0xFF);
+		*dst++ = (w & 0xFF);
+		*dst++ = (h & 0xFF);
 
 		uint8 *dst2 = dst + (h * (w << 1));
 
@@ -334,8 +334,8 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
 			const uint16 *table = _cgaDitheringTables[(tblSwitch++) & 1];
 
 			while (w1--) {
-				uint16 p0 = table[((src[1] & 0x0f) << 4) | (src[0] & 0x0f)];
-				uint16 p1 = table[((src[3] & 0x0f) << 4) | (src[2] & 0x0f)];
+				uint16 p0 = table[((src[1] & 0x0F) << 4) | (src[0] & 0x0F)];
+				uint16 p1 = table[((src[3] & 0x0F) << 4) | (src[2] & 0x0F)];
 
 				*dst++ = ((p0 & 0x0003) << 6) | ((p0 & 0x0300) >> 4) | ((p1 & 0x0003) << 2) | ((p1 & 0x0300) >> 8);
 
@@ -380,9 +380,9 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
 		uint8 *dst = shp;
 
 		*dst++ = 8;
-		*dst++ = (h & 0xff);
-		*dst++ = (w & 0xff);
-		*dst++ = (h & 0xff);
+		*dst++ = (h & 0xFF);
+		*dst++ = (w & 0xFF);
+		*dst++ = (h & 0xFF);
 
 		srcLineStart = getPagePtr(_curPage | 1) + y * 320 + (x << 3);
 		src = srcLineStart;
@@ -405,7 +405,7 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
 						*dst++ = 0;
 						numZero -= 255;
 					}
-					val = numZero & 0xff;
+					val = numZero & 0xFF;
 				}
 				*dst++ = val;
 			} while (src != lineEnd);
@@ -420,7 +420,7 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
 
 		if (_renderMode != Common::kRenderEGA || _useHiResEGADithering) {
 			colorMap = new uint8[0x100];
-			memset(colorMap, 0xff, 0x100);
+			memset(colorMap, 0xFF, 0x100);
 		}
 
 		shapesize = h * (w << 2) + 20;
@@ -429,12 +429,12 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
 		uint8 *dst = shp;
 
 		*dst++ = 2;
-		*dst++ = (h & 0xff);
-		*dst++ = (w & 0xff);
-		*dst++ = (h & 0xff);
+		*dst++ = (h & 0xFF);
+		*dst++ = (w & 0xFF);
+		*dst++ = (h & 0xFF);
 
 		if (_renderMode != Common::kRenderEGA || _useHiResEGADithering) {
-			memset(dst, 0xff, 0x10);
+			memset(dst, 0xFF, 0x10);
 		} else {
 			for (int i = 0; i < 16; i++)
 				dst[i] = i;
@@ -449,10 +449,10 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
 			uint16 w1 = w << 3;
 			while (w1--) {
 				uint8 s = *src++;
-				uint8 c = s & 0x0f;
+				uint8 c = s & 0x0F;
 				if (colorMap) {
 					c = colorMap[s];
-					if (c == 0xff) {
+					if (c == 0xFF) {
 						if (col < 0x10) {
 							*pal++ = s;
 							c = colorMap[s] = col++;
@@ -662,7 +662,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
 			pal = ovl ? ovl : src;
 			src += 16;
 		} else {
-			static const uint8 cgaDefOvl[] = { 0x00, 0x55, 0xaa, 0xff };
+			static const uint8 cgaDefOvl[] = { 0x00, 0x55, 0xAA, 0xFF };
 			pal = ovl ? ovl : cgaDefOvl;
 			for (int i = 0; i < 4; i++)
 				cgaPal[i] = pal[i] & 3;
@@ -817,7 +817,7 @@ const uint8 *Screen_EoB::scaleShapeStep(const uint8 *shp) {
 		else
 			i = -i;
 
-		_dsScaleTrans = (i << 4) | (i & 0x0f);
+		_dsScaleTrans = (i << 4) | (i & 0x0F);
 		for (int ii = 0; ii < 16; ii++)
 			*d++ = *shp++;
 	}
@@ -1193,14 +1193,14 @@ void Screen_EoB::createFadeTable(uint8 *palData, uint8 *dst, uint8 rootColor, ui
 
 	for (uint8 i = 1; i; i++) {
 		uint16 tmp = (uint16)((*src - r) * weight) << 1;
-		tr = *src++ - ((tmp >> 8) & 0xff);
+		tr = *src++ - ((tmp >> 8) & 0xFF);
 		tmp = (uint16)((*src - g) * weight) << 1;
-		tg = *src++ - ((tmp >> 8) & 0xff);
+		tg = *src++ - ((tmp >> 8) & 0xFF);
 		tmp = (uint16)((*src - b) * weight) << 1;
-		tb = *src++ - ((tmp >> 8) & 0xff);
+		tb = *src++ - ((tmp >> 8) & 0xFF);
 
 		uint8 *d = palData + 3;
-		uint16 v = 0xffff;
+		uint16 v = 0xFFFF;
 		uint8 col = rootColor;
 
 		for (uint8 ii = 1; ii; ii++) {
@@ -1261,7 +1261,7 @@ void Screen_EoB::ditherRect(const uint8 *src, uint8 *dst, int dstPitch, int srcW
 			if (in != colorKey) {
 				in = _egaDitheringTable[in];
 				*dst++ = *dst2++ = in >> 4;
-				*dst++ = *dst2++ = in & 0x0f;
+				*dst++ = *dst2++ = in & 0x0F;
 			} else {
 				dst[0] = dst[1] = dst2[0] = dst2[1] = colorKey;
 				dst += 2;
@@ -1297,9 +1297,9 @@ void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col) {
 void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc, uint32 transOffsetDst, uint32 transOffsetSrc) {
 	for (int i = 0; i < _dsDiv; i++) {
 		shpDst[0] = (_cgaScaleTable[shpSrc[0]] << 2) | (shpSrc[1] >> 6);
-		shpDst[1] = ((shpSrc[1] & 0x0f) << 4) | ((shpSrc[2] >> 2) & 0x0f);
+		shpDst[1] = ((shpSrc[1] & 0x0F) << 4) | ((shpSrc[2] >> 2) & 0x0F);
 		shpDst[transOffsetDst] = (_cgaScaleTable[shpSrc[transOffsetSrc]] << 2) | (shpSrc[transOffsetSrc + 1] >> 6);
-		shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x0f) << 4) | ((shpSrc[transOffsetSrc + 2] >> 2) & 0x0f);
+		shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x0F) << 4) | ((shpSrc[transOffsetSrc + 2] >> 2) & 0x0F);
 		shpSrc += 3;
 		shpDst += 2;
 	}
@@ -1308,15 +1308,15 @@ void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc,
 		shpDst[0] = _cgaScaleTable[shpSrc[0]] << 2;
 		shpDst[1] = 0;
 		shpDst[transOffsetDst] = (_cgaScaleTable[shpSrc[transOffsetSrc]] << 2) | 3;
-		shpDst[transOffsetDst + 1] = 0xff;
+		shpDst[transOffsetDst + 1] = 0xFF;
 		shpSrc++;
 		shpDst += 2;
 
 	} else if (_dsRem == 2) {
 		shpDst[0] = (_cgaScaleTable[shpSrc[0]] << 2) | (shpSrc[1] >> 6);
-		shpDst[1] = (shpSrc[1] & 0x3f) << 2;
+		shpDst[1] = (shpSrc[1] & 0x3F) << 2;
 		shpDst[transOffsetDst] = (_cgaScaleTable[shpSrc[transOffsetSrc]] << 2) | (shpSrc[transOffsetSrc + 1] >> 6);
-		shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x3f) << 2) | 3;
+		shpDst[transOffsetDst + 1] = ((shpSrc[transOffsetSrc + 1] & 0x3F) << 2) | 3;
 		shpSrc += 2;
 		shpDst += 2;
 	}
@@ -1325,7 +1325,7 @@ void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc,
 void Screen_EoB::scaleShapeProcessLine4Bit(uint8 *&dst, const uint8 *&src) {
 	for (int i = 0; i < _dsDiv; i++) {
 		*dst++ = *src++;
-		*dst++ = (READ_BE_UINT16(src) >> 4) & 0xff;
+		*dst++ = (READ_BE_UINT16(src) >> 4) & 0xFF;
 		src += 2;
 	}
 
@@ -1333,7 +1333,7 @@ void Screen_EoB::scaleShapeProcessLine4Bit(uint8 *&dst, const uint8 *&src) {
 		*dst++ = *src++;
 		*dst++ = _dsScaleTrans;
 	} else if (_dsRem == 2) {
-		*dst++ = (src[0] & 0xf0) | (src[1] >> 4);
+		*dst++ = (src[0] & 0xF0) | (src[1] >> 4);
 		src += 2;
 		*dst++ = _dsScaleTrans;
 		*dst++ = _dsScaleTrans;
@@ -1362,7 +1362,7 @@ void Screen_EoB::generateEGADitheringTable(const Palette &pal) {
 
 		for (int ii = 256; ii; ii--) {
 			const uint8 *palEntry = _egaMatchTable + (ii - 1) * 3;
-			if (*palEntry == 0xff)
+			if (*palEntry == 0xFF)
 				continue;
 
 			int e_r = palEntry[0] - r;
@@ -1382,8 +1382,8 @@ void Screen_EoB::generateEGADitheringTable(const Palette &pal) {
 
 void Screen_EoB::generateCGADitheringTables(const uint8 *mappingData) {
 	for (int i = 0; i < 256; i++) {
-		_cgaDitheringTables[0][i] = (mappingData[(i >> 4) + 16] << 8) | mappingData[i & 0x0f];
-		_cgaDitheringTables[1][i] = (mappingData[i >> 4] << 8) | mappingData[(i & 0x0f) + 16];
+		_cgaDitheringTables[0][i] = (mappingData[(i >> 4) + 16] << 8) | mappingData[i & 0x0F];
+		_cgaDitheringTables[1][i] = (mappingData[i >> 4] << 8) | mappingData[(i & 0x0F) + 16];
 	}
 }
 
@@ -1509,42 +1509,42 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
 	if (_width == 6) {
 		switch (c) {
 		case 0x81:
-		case 0x9a:
-			c = 0x5d;
+		case 0x9A:
+			c = 0x5D;
 			break;
 		case 0x84:
-		case 0x8e:
-			c = 0x5b;
+		case 0x8E:
+			c = 0x5B;
 			break;
 		case 0x94:
 		case 0x99:
 			c = 0x40;
-		case 0xe1:
+		case 0xE1:
 			// TODO: recheck this: no conversion for 'ß' ?
 			break;
 		}
 	} else if (_width == 8) {
 		switch (c) {
 		case 0x81:
-		case 0x9a:
-		case 0x5d:
-			c = 0x1d;
+		case 0x9A:
+		case 0x5D:
+			c = 0x1D;
 			break;
 		case 0x84:
-		case 0x5b:
-			c = 0x1e;
+		case 0x5B:
+			c = 0x1E;
 			break;
 		case 0x94:
 		case 0x40:
-			c = 0x1f;
+			c = 0x1F;
 			break;
-		case 0x8e:
-			c = 0x1b;
+		case 0x8E:
+			c = 0x1B;
 			break;
 		case 0x99:
-			c = 0x1c;
+			c = 0x1C;
 			break;
-		case 0xe1:
+		case 0xE1:
 			c = 0x19;
 			break;
 		}
@@ -1564,8 +1564,8 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
 	uint16 cgaMask2 = cgaColorMask[color2 & 3];
 
 	if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA) {
-		color1 &= 0x0f;
-		color2 &= 0x0f;
+		color1 &= 0x0F;
+		color2 &= 0x0F;
 	}
 
 	int cH = _height;
@@ -1596,7 +1596,7 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
 			uint8 sh = 6;
 			for (int i = 0; i < _width; i++) {
 				cDst |= ((dst[i] & 3) << sh);
-				sh = (sh - 2) & 0x0f;
+				sh = (sh - 2) & 0x0F;
 			}
 
 			uint16 out = (~(cmp1 | cmp2) & cDst) | (cmp1 & cgaMask1) | (cmp2 & cgaMask2);
@@ -1604,7 +1604,7 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
 			sh = 6;
 			for (int i = 0; i < _width; i++) {
 				*dst++ = (out >> sh) & 3;
-				sh = (sh - 2) & 0x0f;
+				sh = (sh - 2) & 0x0F;
 			}
 
 			last = s;
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index a8ec2cc..b7de798 100644
--- a/engines/kyra/screen_hof.cpp
+++ b/engines/kyra/screen_hof.cpp
@@ -34,16 +34,16 @@ void Screen_HoF::generateGrayOverlay(const Palette &srcPal, uint8 *grayOverlay,
 
 	for (int i = 0; i != lastColor; i++) {
 		if (flag) {
-			int v = ((((srcPal[3 * i] & 0x3f) + (srcPal[3 * i + 1] & 0x3f)
-				+ (srcPal[3 * i + 2] & 0x3f)) / 3) * factor) / 0x40;
-			tmpPal[3 * i] = tmpPal[3 * i + 1] = tmpPal[3 * i + 2] = v & 0xff;
+			int v = ((((srcPal[3 * i] & 0x3F) + (srcPal[3 * i + 1] & 0x3F)
+				+ (srcPal[3 * i + 2] & 0x3F)) / 3) * factor) / 0x40;
+			tmpPal[3 * i] = tmpPal[3 * i + 1] = tmpPal[3 * i + 2] = v & 0xFF;
 		} else {
-			int v = (((srcPal[3 * i] & 0x3f) * factor) / 0x40) + addR;
-			tmpPal[3 * i] = (v > 0x3f) ? 0x3f : v & 0xff;
-			v = (((srcPal[3 * i + 1] & 0x3f) * factor) / 0x40) + addG;
-			tmpPal[3 * i + 1] = (v > 0x3f) ? 0x3f : v & 0xff;
-			v = (((srcPal[3 * i + 2] & 0x3f) * factor) / 0x40) + addB;
-			tmpPal[3 * i + 2] = (v > 0x3f) ? 0x3f : v & 0xff;
+			int v = (((srcPal[3 * i] & 0x3F) * factor) / 0x40) + addR;
+			tmpPal[3 * i] = (v > 0x3F) ? 0x3F : v & 0xFF;
+			v = (((srcPal[3 * i + 1] & 0x3F) * factor) / 0x40) + addG;
+			tmpPal[3 * i + 1] = (v > 0x3F) ? 0x3F : v & 0xFF;
+			v = (((srcPal[3 * i + 2] & 0x3F) * factor) / 0x40) + addB;
+			tmpPal[3 * i + 2] = (v > 0x3F) ? 0x3F : v & 0xFF;
 		}
 	}
 
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 4e64f51..16a77c8 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -133,12 +133,12 @@ void Screen_LoL::generateGrayOverlay(const Palette &srcPal, uint8 *grayOverlay,
 	Palette tmpPal(lastColor);
 
 	for (int i = 0; i != lastColor; i++) {
-		int v = (((srcPal[3 * i] & 0x3f) * factor) / 0x40) + addR;
-		tmpPal[3 * i] = (v > 0x3f) ? 0x3f : v & 0xff;
-		v = (((srcPal[3 * i + 1] & 0x3f) * factor) / 0x40) + addG;
-		tmpPal[3 * i + 1] = (v > 0x3f) ? 0x3f : v & 0xff;
-		v = (((srcPal[3 * i + 2] & 0x3f) * factor) / 0x40) + addB;
-		tmpPal[3 * i + 2] = (v > 0x3f) ? 0x3f : v & 0xff;
+		int v = (((srcPal[3 * i] & 0x3F) * factor) / 0x40) + addR;
+		tmpPal[3 * i] = (v > 0x3F) ? 0x3F : v & 0xFF;
+		v = (((srcPal[3 * i + 1] & 0x3F) * factor) / 0x40) + addG;
+		tmpPal[3 * i + 1] = (v > 0x3F) ? 0x3F : v & 0xFF;
+		v = (((srcPal[3 * i + 2] & 0x3F) * factor) / 0x40) + addB;
+		tmpPal[3 * i + 2] = (v > 0x3F) ? 0x3F : v & 0xFF;
 	}
 
 	for (int i = 0; i < lastColor; i++)
@@ -149,7 +149,7 @@ void Screen_LoL::createTransparencyTablesIntern(const uint8 *ovl, int a, const u
 	Palette screenPal(256);
 	screenPal.copy(fxPal2, 0, 256);
 
-	memset(outTable1, 0xff, 256);
+	memset(outTable1, 0xFF, 256);
 
 	for (int i = 0; i < a; i++)
 		outTable1[ovl[i]] = i;
@@ -268,7 +268,7 @@ void Screen_LoL::fadeClearSceneWindow(int delay) {
 
 void Screen_LoL::backupSceneWindow(int srcPageNum, int dstPageNum) {
 	uint8 *src = getPagePtr(srcPageNum) + 112;
-	uint8 *dst = getPagePtr(dstPageNum) + 0xa500;
+	uint8 *dst = getPagePtr(dstPageNum) + 0xA500;
 
 	for (int h = 0; h < 120; h++) {
 		for (int w = 0; w < 176; w++)
@@ -278,7 +278,7 @@ void Screen_LoL::backupSceneWindow(int srcPageNum, int dstPageNum) {
 }
 
 void Screen_LoL::restoreSceneWindow(int srcPageNum, int dstPageNum) {
-	uint8 *src = getPagePtr(srcPageNum) + 0xa500;
+	uint8 *src = getPagePtr(srcPageNum) + 0xA500;
 	uint8 *dst = getPagePtr(dstPageNum) + 112;
 
 	for (int h = 0; h < 120; h++) {
@@ -292,7 +292,7 @@ void Screen_LoL::restoreSceneWindow(int srcPageNum, int dstPageNum) {
 }
 
 void Screen_LoL::clearGuiShapeMemory(int pageNum) {
-	uint8 *dst = getPagePtr(pageNum) + 0x79b0;
+	uint8 *dst = getPagePtr(pageNum) + 0x79B0;
 	for (int i = 0; i < 23; i++) {
 		memset(dst, 0, 176);
 		dst += 320;
@@ -300,7 +300,7 @@ void Screen_LoL::clearGuiShapeMemory(int pageNum) {
 }
 
 void Screen_LoL::copyGuiShapeFromSceneBackupBuffer(int srcPageNum,  int dstPageNum) {
-	uint8 *src = getPagePtr(srcPageNum) + 0x79c3;
+	uint8 *src = getPagePtr(srcPageNum) + 0x79C3;
 	uint8 *dst = getPagePtr(dstPageNum);
 
 	for (int i = 0; i < 23; i++) {
@@ -323,7 +323,7 @@ void Screen_LoL::copyGuiShapeFromSceneBackupBuffer(int srcPageNum,  int dstPageN
 
 void Screen_LoL::copyGuiShapeToSurface(int srcPageNum, int dstPageNum) {
 	uint8 *src = getPagePtr(srcPageNum);
-	uint8 *dst = getPagePtr(dstPageNum) + 0xe7c3;
+	uint8 *dst = getPagePtr(dstPageNum) + 0xE7C3;
 
 	for (int i = 0; i < 23; i++) {
 		uint8 v = *src++;
@@ -342,8 +342,8 @@ void Screen_LoL::copyGuiShapeToSurface(int srcPageNum, int dstPageNum) {
 }
 
 void Screen_LoL::smoothScrollZoomStepTop(int srcPageNum, int dstPageNum, int x, int y) {
-	uint8 *src = getPagePtr(srcPageNum) + 0xa500 + y * 176 + x;
-	uint8 *dst = getPagePtr(dstPageNum) + 0xa500;
+	uint8 *src = getPagePtr(srcPageNum) + 0xA500 + y * 176 + x;
+	uint8 *dst = getPagePtr(dstPageNum) + 0xA500;
 
 	x <<= 1;
 	uint16 width = 176 - x;
@@ -363,7 +363,7 @@ void Screen_LoL::smoothScrollZoomStepTop(int srcPageNum, int dstPageNum, int x,
 		do {
 			scaleXc += scaleX;
 			int numbytes = cntW + (scaleXc >> 16);
-			scaleXc &= 0xffff;
+			scaleXc &= 0xFFFF;
 			memset(dst, *src++, numbytes);
 			dst += numbytes;
 		} while (--widthCnt);
@@ -385,8 +385,8 @@ void Screen_LoL::smoothScrollZoomStepTop(int srcPageNum, int dstPageNum, int x,
 }
 
 void Screen_LoL::smoothScrollZoomStepBottom(int srcPageNum, int dstPageNum, int x, int y) {
-	uint8 *src = getPagePtr(srcPageNum) + 0xc4a0 + x;
-	uint8 *dst = getPagePtr(dstPageNum) + 0xc4a0;
+	uint8 *src = getPagePtr(srcPageNum) + 0xC4A0 + x;
+	uint8 *dst = getPagePtr(dstPageNum) + 0xC4A0;
 
 	x <<= 1;
 	uint16 width = 176 - x;
@@ -406,7 +406,7 @@ void Screen_LoL::smoothScrollZoomStepBottom(int srcPageNum, int dstPageNum, int
 		do {
 			scaleXc += scaleX;
 			int numbytes = cntW + (scaleXc >> 16);
-			scaleXc &= 0xffff;
+			scaleXc &= 0xFFFF;
 			memset(dst, *src++, numbytes);
 			dst += numbytes;
 		} while (--widthCnt);
@@ -453,7 +453,7 @@ void Screen_LoL::smoothScrollHorizontalStep(int pageNum, int srcX, int dstX, int
 
 void Screen_LoL::smoothScrollTurnStep1(int srcPage1Num, int srcPage2Num, int dstPageNum) {
 	uint8 *s = getPagePtr(srcPage1Num) + 273;
-	uint8 *d = getPagePtr(dstPageNum) + 0xa500;
+	uint8 *d = getPagePtr(dstPageNum) + 0xA500;
 
 	for (int i = 0; i < 120; i++) {
 		uint8 a = *s++;
@@ -472,7 +472,7 @@ void Screen_LoL::smoothScrollTurnStep1(int srcPage1Num, int srcPage2Num, int dst
 	}
 
 	s = getPagePtr(srcPage2Num) + 112;
-	d = getPagePtr(dstPageNum)  + 0xa52c;
+	d = getPagePtr(dstPageNum)  + 0xA52C;
 
 	for (int i = 0; i < 120; i++) {
 		for (int ii = 0; ii < 33; ii++) {
@@ -490,7 +490,7 @@ void Screen_LoL::smoothScrollTurnStep1(int srcPage1Num, int srcPage2Num, int dst
 
 void Screen_LoL::smoothScrollTurnStep2(int srcPage1Num, int srcPage2Num, int dstPageNum) {
 	uint8 *s = getPagePtr(srcPage1Num) + 244;
-	uint8 *d = getPagePtr(dstPageNum) + 0xa500;
+	uint8 *d = getPagePtr(dstPageNum) + 0xA500;
 
 	for (int k = 0; k < 2; k++) {
 		for (int i = 0; i < 120; i++) {
@@ -505,13 +505,13 @@ void Screen_LoL::smoothScrollTurnStep2(int srcPage1Num, int srcPage2Num, int dst
 		}
 
 		s = getPagePtr(srcPage2Num) + 112;
-		d = getPagePtr(dstPageNum) + 0xa558;
+		d = getPagePtr(dstPageNum) + 0xA558;
 	}
 }
 
 void Screen_LoL::smoothScrollTurnStep3(int srcPage1Num, int srcPage2Num, int dstPageNum) {
 	uint8 *s = getPagePtr(srcPage1Num) + 189;
-	uint8 *d = getPagePtr(dstPageNum) + 0xa500;
+	uint8 *d = getPagePtr(dstPageNum) + 0xA500;
 
 	for (int i = 0; i < 120; i++) {
 		for (int ii = 0; ii < 33; ii++) {
@@ -527,7 +527,7 @@ void Screen_LoL::smoothScrollTurnStep3(int srcPage1Num, int srcPage2Num, int dst
 	}
 
 	s = getPagePtr(srcPage2Num) + 112;
-	d = getPagePtr(dstPageNum)  + 0xa584;
+	d = getPagePtr(dstPageNum)  + 0xA584;
 
 	for (int i = 0; i < 120; i++) {
 		for (int ii = 0; ii < 14; ii++) {
@@ -781,8 +781,8 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT
 
 	for (int i = 0; i < 3; i++) {
 		if (elapsedTicks < totalTicks) {
-			srcV = *src & 0x3f;
-			dstV = *dst & 0x3f;
+			srcV = *src & 0x3F;
+			dstV = *dst & 0x3F;
 
 			outV = srcV - dstV;
 			if (outV)
@@ -794,7 +794,7 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT
 			res = false;
 		}
 
-		tmpPalEntry[i] = outV & 0xff;
+		tmpPalEntry[i] = outV & 0xFF;
 		src++;
 		dst++;
 		p++;
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 407d73a..cc7d526 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -117,11 +117,11 @@ void Screen_v2::applyOverlay(int x, int y, int w, int h, int pageNum, const uint
 }
 
 int Screen_v2::findLeastDifferentColor(const uint8 *paletteEntry, const Palette &pal, uint8 firstColor, uint16 numColors, bool skipSpecialColors) {
-	int m = 0x7fff;
+	int m = 0x7FFF;
 	int r = 0x101;
 
 	for (int i = 0; i < numColors; i++) {
-		if (skipSpecialColors && i >= 0xc0 && i <= 0xc3)
+		if (skipSpecialColors && i >= 0xC0 && i <= 0xC3)
 			continue;
 
 		int v = paletteEntry[0] - pal[(i + firstColor) * 3 + 0];
@@ -170,14 +170,14 @@ bool Screen_v2::timedPaletteFadeStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTim
 		uint8 out = 0;
 
 		if (elapsedTime < totalTime) {
-			int32 d = ((pal2[i] & 0x3f) - (pal1[i] & 0x3f));
+			int32 d = ((pal2[i] & 0x3F) - (pal1[i] & 0x3F));
 			if (d)
 				res = true;
 
 			int32 val = ((((d << 8) / (int32)totalTime) * (int32)elapsedTime) >> 8);
-			out = ((pal1[i] & 0x3f) + (int8)val);
+			out = ((pal1[i] & 0x3F) + (int8)val);
 		} else {
-			out = p1[i] = (pal2[i] & 0x3f);
+			out = p1[i] = (pal2[i] & 0x3F);
 			res = false;
 		}
 
@@ -311,13 +311,13 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
 				if (w1 == 1) {
 					memset(dt, *s, w2);
 				} else {
-					t = ((((((w2 - w1 + 1) & 0xffff) << 8) / w1) + 0x100) & 0xffff) << 8;
+					t = ((((((w2 - w1 + 1) & 0xFFFF) << 8) / w1) + 0x100) & 0xFFFF) << 8;
 					int bp = 0;
 					for (int i = 0; i < w1; i++) {
 						int cnt = (t >> 16);
-						bp += (t & 0xffff);
-						if (bp > 0xffff) {
-							bp -= 0xffff;
+						bp += (t & 0xFFFF);
+						if (bp > 0xFFFF) {
+							bp -= 0xFFFF;
 							cnt++;
 						}
 						memset(dt, *s++, cnt);
@@ -328,13 +328,13 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
 				if (w2 == 1) {
 					*dt = *s;
 				} else {
-					t = (((((w1 - w2) & 0xffff) << 8) / w2) & 0xffff) << 8;
+					t = (((((w1 - w2) & 0xFFFF) << 8) / w2) & 0xFFFF) << 8;
 					int bp = 0;
 					for (int i = 0; i < w2; i++) {
 						*dt++ = *s++;
-						bp += (t & 0xffff);
-						if (bp > 0xffff) {
-							bp -= 0xffff;
+						bp += (t & 0xFFFF);
+						if (bp > 0xFFFF) {
+							bp -= 0xFFFF;
 							s++;
 						}
 						s += (t >> 16);
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index c07c41f..e5ccbf2 100644
--- a/engines/kyra/script_eob.cpp
+++ b/engines/kyra/script_eob.cpp
@@ -175,7 +175,7 @@ void EoBInfProcessor::run(int func, int flags) {
 
 	uint16 f = _vm->_levelBlockProperties[func].flags;
 
-	uint16 subFlags = ((f & 0xfff8) >> 3) | 0xe0;
+	uint16 subFlags = ((f & 0xFFF8) >> 3) | 0xE0;
 	if (!(flags & subFlags))
 		return;
 
@@ -233,7 +233,7 @@ void EoBInfProcessor::reset() {
 }
 
 const char *EoBInfProcessor::getString(uint16 index) {
-	if (index == 0xffff)
+	if (index == 0xFFFF)
 		return 0;
 
 	int8 *res = _scriptData + READ_LE_UINT16(_scriptData);
@@ -348,7 +348,7 @@ int EoBInfProcessor::oeob_movePartyOrObject(int8 *data) {
 	int8 *pos = data;
 
 	int8 a = *pos++;
-	uint16 b = 0xffff;
+	uint16 b = 0xFFFF;
 	uint16 c = 0;
 	uint16 d = 0;
 
@@ -972,7 +972,7 @@ int EoBInfProcessor::oeob_eval_v2(int8 *data) {
 		case 9:
 			switch (*pos++) {
 			case -36:
-				_stack[_stackIndex++] = _vm->_itemTypes[_vm->_items[_vm->_lastUsedItem].type].extraProperties & 0x7f;
+				_stack[_stackIndex++] = _vm->_itemTypes[_vm->_items[_vm->_lastUsedItem].type].extraProperties & 0x7F;
 				break;
 			case -31:
 				_stack[_stackIndex++] = _vm->_items[_vm->_lastUsedItem].type;
@@ -1097,7 +1097,7 @@ int EoBInfProcessor::oeob_eval_v2(int8 *data) {
 		case 26:
 			a = 0;
 			for (i = 0; i < 6; i++) {
-				if (_vm->testCharacter(i, 0x0f))
+				if (_vm->testCharacter(i, 0x0F))
 					a++;
 			}
 			_stack[_stackIndex++] = a;
@@ -1260,7 +1260,7 @@ int EoBInfProcessor::oeob_loadNewLevelOrMonsters(int8 *data) {
 		pos += 2;
 		uint8 dir = (uint8)*pos++;
 
-		if (dir != 0xff)
+		if (dir != 0xFF)
 			_vm->_currentDirection = dir;
 
 		for (int i = 0; i < 30; i++)
@@ -1328,11 +1328,11 @@ int EoBInfProcessor::oeob_createItem_v1(int8 *data) {
 	uint8 itmPos = *pos++;
 
 	if (itm) {
-		if (block == 0xffff && !_vm->_itemInHand) {
+		if (block == 0xFFFF && !_vm->_itemInHand) {
 			_vm->setHandItem(itm);
 			debugC(5, kDebugLevelScript, "         - create hand item '%d'", itm);
-		} else if (block != 0xffff) {
-			_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3ff].drawObjects, block, itm, itmPos);
+		} else if (block != 0xFFFF) {
+			_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3FF].drawObjects, block, itm, itmPos);
 			debugC(5, kDebugLevelScript, "         - create item '%d' on block '0x%.04X', position '%d'", itm, block, itmPos);
 		}
 	}
@@ -1363,19 +1363,19 @@ int EoBInfProcessor::oeob_createItem_v2(int8 *data) {
 	if (!itm)
 		return pos - data;
 
-	if (block == 0xffff) {
+	if (block == 0xFFFF) {
 		if (!_vm->_itemInHand) {
 			_vm->setHandItem(itm);
 			debugC(5, kDebugLevelScript, "         - create hand item '%d' (value '%d', flags '0x%X', icon number '%d')", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon);
 		} else {
-			_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3ff].drawObjects, _vm->_currentBlock, itm, _itemPos[_vm->rollDice(1, 2, -1)]);
+			_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3FF].drawObjects, _vm->_currentBlock, itm, _itemPos[_vm->rollDice(1, 2, -1)]);
 			debugC(5, kDebugLevelScript, "         - create item '%d' (value '%d', flags '0x%X', icon number '%d') on current block", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon);
 		}
-	} else if (block == 0xfffe) {
-		_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3ff].drawObjects, _vm->_currentBlock, itm, _itemPos[(_vm->_currentDirection << 2) + _vm->rollDice(1, 2, -1)]);
+	} else if (block == 0xFFFE) {
+		_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[_vm->_currentBlock & 0x3FF].drawObjects, _vm->_currentBlock, itm, _itemPos[(_vm->_currentDirection << 2) + _vm->rollDice(1, 2, -1)]);
 		debugC(5, kDebugLevelScript, "         - create item '%d' (value '%d', flags '0x%X', icon number '%d') on current block", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon);
 	} else {
-		_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3ff].drawObjects, block, itm, itmPos);
+		_vm->setItemPosition((Item *)&_vm->_levelBlockProperties[block & 0x3FF].drawObjects, block, itm, itmPos);
 		debugC(5, kDebugLevelScript, "         - create item '%d' (value '%d', flags '0x%X', icon number '%d') on block '0x%.04X', position '%d'", itm, _vm->_items[itm].value, _vm->_items[itm].flags, _vm->_items[itm].icon, block, itmPos);
 	}
 
@@ -1530,7 +1530,7 @@ int EoBInfProcessor::oeob_dialogue(int8 *data) {
 		break;
 
 	case -40:
-		_dlgResult = _vm->runDialogue(READ_LE_UINT16(pos), READ_LE_UINT16(pos + 6) == 0xffff ? 2 : 3, getString(READ_LE_UINT16(pos + 2)), getString(READ_LE_UINT16(pos + 4)), getString(READ_LE_UINT16(pos + 6)));
+		_dlgResult = _vm->runDialogue(READ_LE_UINT16(pos), READ_LE_UINT16(pos + 6) == 0xFFFF ? 2 : 3, getString(READ_LE_UINT16(pos + 2)), getString(READ_LE_UINT16(pos + 4)), getString(READ_LE_UINT16(pos + 6)));
 		pos += 8;
 		break;
 
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index fca83ae..5bf8f6e 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -253,7 +253,7 @@ int KyraEngine_HoF::o2_displayWsaSequentialFrames(EMCState *script) {
 	uint16 currentFrame = stackPos(3);
 	uint16 lastFrame = stackPos(4);
 	uint16 index = stackPos(5);
-	uint16 copyParam = stackPos(6) | 0xc000;
+	uint16 copyParam = stackPos(6) | 0xC000;
 
 	_screen->hideMouse();
 
@@ -278,7 +278,7 @@ int KyraEngine_HoF::o2_displayWsaSequence(EMCState *script) {
 	const int frameDelay = stackPos(2) * _tickLength;
 	const int index = stackPos(3);
 	const bool doUpdate = (stackPos(4) != 0);
-	const uint16 copyParam = stackPos(5) | 0xc000;
+	const uint16 copyParam = stackPos(5) | 0xC000;
 
 	_screen->hideMouse();
 
@@ -319,8 +319,8 @@ int KyraEngine_HoF::o2_drawShape(EMCState *script) {
 	uint8 *shp = getShapePtr(stackPos(0) + 64);
 	int x = stackPos(1);
 	int y = stackPos(2);
-	uint8 dsFlag = stackPos(3) & 0xff;
-	uint8 modeFlag = stackPos(4) & 0xff;
+	uint8 dsFlag = stackPos(3) & 0xFF;
+	uint8 modeFlag = stackPos(4) & 0xFF;
 
 	if (modeFlag) {
 		_screen->drawShape(2, shp, x, y, 2, dsFlag ? 1 : 0);
@@ -918,7 +918,7 @@ int KyraEngine_HoF::o2_useItemOnMainChar(EMCState *script) {
 	tmpScript.regs[0] = _mainCharacter.sceneId;
 
 	int oldVocH = _vocHigh;
-	_vocHigh = 0x5a;
+	_vocHigh = 0x5A;
 
 	while (_emc->isValid(&tmpScript))
 		_emc->run(&tmpScript);
@@ -955,7 +955,7 @@ int KyraEngine_HoF::o2_pressColorKey(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_pressColorKey(%p) (%d)", (const void *)script, stackPos(0));
 	for (int i = 6; i; i--)
 		_inputColorCode[i] = _inputColorCode[i - 1];
-	_inputColorCode[0] = stackPos(0) & 0xff;
+	_inputColorCode[0] = stackPos(0) & 0xFF;
 	for (int i = 0; i < 7; i++) {
 		if (_presetColorCode[i] != _inputColorCode[6 - i])
 			return _dbgPass;
@@ -1023,8 +1023,8 @@ int KyraEngine_HoF::o2_getColorCodeValue(EMCState *script) {
 
 int KyraEngine_HoF::o2_setColorCodeValue(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_setColorCodeValue(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
-	_presetColorCode[stackPos(0)] = stackPos(1) & 0xff;
-	return stackPos(1) & 0xff;
+	_presetColorCode[stackPos(0)] = stackPos(1) & 0xFF;
+	return stackPos(1) & 0xFF;
 }
 
 int KyraEngine_HoF::o2_countItemInstances(EMCState *script) {
@@ -1495,7 +1495,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	OpcodeUnImpl();
 	OpcodeUnImpl();
 	Opcode(o2_setCharacterAnimFrame);
-	// 0x0c
+	// 0x0C
 	Opcode(o2_setCharacterFacingOverwrite);
 	Opcode(o2_trySceneChange);
 	Opcode(o2_moveCharacter);
@@ -1515,7 +1515,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o2_wsaOpen);
 	Opcode(o2_displayWsaSequentialFrames);
 	Opcode(o2_displayWsaSequence);
-	// 0x1c
+	// 0x1C
 	Opcode(o2_addItemToInventory);
 	Opcode(o2_drawShape);
 	Opcode(o2_addItemToCurScene);
@@ -1536,7 +1536,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o1_setGameFlag);
 	Opcode(o1_setHandItem);
 	Opcode(o1_removeHandItem);
-	// 0x2c
+	// 0x2C
 	Opcode(o1_getMouseState);
 	Opcode(o1_hideMouse);
 	Opcode(o2_addSpecialExit);
@@ -1556,7 +1556,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o2_setTimerDelay);
 	Opcode(o2_setScaleTableItem);
 	Opcode(o2_setDrawLayerTableItem);
-	// 0x3c
+	// 0x3C
 	Opcode(o2_setCharPalEntry);
 	Opcode(o2_loadZShapes);
 	Opcode(o2_drawSceneShape);
@@ -1576,7 +1576,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o2_restoreInventoryGfx);
 	Opcode(o2_setSceneAnimPos2);
 	Opcode(o2_update);
-	// 0x4c
+	// 0x4C
 	OpcodeUnImpl();
 	Opcode(o2_fadeScenePal);
 	Opcode(o2_dummy);
@@ -1596,7 +1596,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o1_playSoundEffect);
 	Opcode(o2_setSceneAnimPos);
 	Opcode(o1_blockInWalkableRegion);
-	// 0x5c
+	// 0x5C
 	Opcode(o1_blockOutWalkableRegion);
 	OpcodeUnImpl();
 	Opcode(o2_setCauldronState);
@@ -1616,7 +1616,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	OpcodeUnImpl();
 	Opcode(o2_playFireflyScore);
 	Opcode(o2_waitForConfirmationClick);
-	// 0x6c
+	// 0x6C
 	Opcode(o2_encodeShape);
 	Opcode(o2_defineRoomEntrance);
 	Opcode(o2_runAnimationScript);
@@ -1636,7 +1636,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o2_defineScene);
 	Opcode(o2_addCauldronStateTableEntry);
 	Opcode(o2_setCountDown);
-	// 0x7c
+	// 0x7C
 	Opcode(o2_getCountDown);
 	Opcode(o2_dummy);
 	Opcode(o2_dummy);
@@ -1656,7 +1656,7 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o2_removeItemFromScene);
 	Opcode(o2_initObject);
 	Opcode(o2_npcChat);
-	// 0x8c
+	// 0x8C
 	Opcode(o2_deinitObject);
 	Opcode(o2_playTimSequence);
 	Opcode(o2_makeBookOrCauldronAppear);
@@ -1676,27 +1676,27 @@ void KyraEngine_HoF::setupOpcodeTable() {
 	Opcode(o2_customChatFinish);
 	Opcode(o2_setupSceneAnimation);
 	Opcode(o2_stopSceneAnimation);
-	// 0x9c
+	// 0x9C
 	Opcode(o2_disableTimer);
 	Opcode(o2_enableTimer);
 	Opcode(o2_setTimerCountdown);
 	Opcode(o2_processPaletteIndex);
-	// 0xa0
+	// 0xA0
 	Opcode(o2_updateTwoSceneAnims);
 	Opcode(o2_getRainbowRoomData);
 	Opcode(o2_drawSceneShapeEx);
 	Opcode(o2_midiSoundFadeout);
-	// 0xa4
+	// 0xA4
 	Opcode(o2_getSfxDriver);
 	Opcode(o2_getVocSupport);
 	Opcode(o2_getMusicDriver);
 	Opcode(o2_setVocHigh);
-	// 0xa8
+	// 0xA8
 	Opcode(o2_getVocHigh);
 	Opcode(o2_zanthiaChat);
 	Opcode(o2_isVoiceEnabled);
 	Opcode(o2_isVoicePlaying);
-	// 0xac
+	// 0xAC
 	Opcode(o2_stopVoicePlaying);
 	Opcode(o2_getGameLanguage);
 	Opcode(o2_demoFinale);
diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp
index db9e01c..22d5e9f 100644
--- a/engines/kyra/script_lok.cpp
+++ b/engines/kyra/script_lok.cpp
@@ -1774,7 +1774,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_blockInWalkableRegion);
 	Opcode(o1_blockOutWalkableRegion);
 	Opcode(o1_walkPlayerToPoint);
-	// 0x0c
+	// 0x0C
 	Opcode(o1_dropItemInScene);
 	Opcode(o1_drawAnimShapeIntoScene);
 	Opcode(o1_setHandItem);
@@ -1794,7 +1794,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_phaseInSameScene);
 	Opcode(o1_setScenePhasingFlag);
 	Opcode(o1_resetScenePhasingFlag);
-	// 0x1c
+	// 0x1C
 	Opcode(o1_queryScenePhasingFlag);
 	Opcode(o1_sceneToDirection);
 	Opcode(o1_setBirthstoneGem);
@@ -1814,7 +1814,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_openWSAFile);
 	Opcode(o1_closeWSAFile);
 	Opcode(o1_runWSAFromBeginningToEnd);
-	// 0x2c
+	// 0x2C
 	Opcode(o1_displayWSAFrame);
 	Opcode(o1_enterNewScene);
 	Opcode(o1_setSpecialEnterXAndY);
@@ -1834,7 +1834,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_getCharacterY);
 	Opcode(o1_setCharacterFacing);
 	Opcode(o1_copyWSARegion);
-	// 0x3c
+	// 0x3C
 	Opcode(o1_printText);
 	Opcode(o1_getRand);
 	Opcode(o1_loadSoundFile);
@@ -1854,7 +1854,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_placeCharacterInOtherScene);
 	Opcode(o1_getKey);
 	Opcode(o1_specificItemInInventory);
-	// 0x4c
+	// 0x4C
 	Opcode(o1_popMobileNPCIntoScene);
 	Opcode(o1_mobileCharacterInScene);
 	Opcode(o1_hideMobileCharacter);
@@ -1874,7 +1874,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_setCharacterMovementDelay);
 	Opcode(o1_getCharacterFacing);
 	Opcode(o1_bkgdScrollSceneAndMasksRight);
-	// 0x5c
+	// 0x5C
 	Opcode(o1_dispelMagicAnimation);
 	Opcode(o1_findBrightestFireberry);
 	Opcode(o1_setFireberryGlowPalette);
@@ -1894,7 +1894,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_addItemToInventory);
 	Opcode(o1_intPrint);
 	Opcode(o1_shakeScreen);
-	// 0x6c
+	// 0x6C
 	Opcode(o1_createAmuletJewel);
 	Opcode(o1_setSceneAnimCurrXY);
 	Opcode(o1_poisonBrandonAndRemaps);
@@ -1914,7 +1914,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_setMousePos);
 	Opcode(o1_getMouseState);
 	Opcode(o1_setEntranceMouseCursorTrack);
-	// 0x7c
+	// 0x7C
 	Opcode(o1_itemAppearsOnGround);
 	Opcode(o1_setNoDrawShapesFlag);
 	Opcode(o1_fadeEntirePalette);
@@ -1934,7 +1934,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_getScaleDepthTableValue);
 	Opcode(o1_setScaleDepthTableValue);
 	Opcode(o1_message);
-	// 0x8c
+	// 0x8C
 	Opcode(o1_checkClickOnNPC);
 	Opcode(o1_getFoyerItem);
 	Opcode(o1_setFoyerItem);
@@ -1954,7 +1954,7 @@ void KyraEngine_LoK::setupOpcodeTable() {
 	Opcode(o1_fillRect);
 	Opcode(o1_vocUnload);
 	Opcode(o1_vocLoad);
-	// 0x9c
+	// 0x9C
 	Opcode(o1_dummy);
 }
 #undef Opcode
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 9c0fe21..e9fc1c7 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -126,7 +126,7 @@ int LoLEngine::olol_moveParty(EMCState *script) {
 		mode = (mode - 6 - _currentDirection) & 3;
 
 	Button b;
-	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
+	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xFE;
 	b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
 
 	switch (mode) {
@@ -268,7 +268,7 @@ int LoLEngine::olol_makeItem(EMCState *script) {
 
 int LoLEngine::olol_placeMoveLevelItem(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_placeMoveLevelItem(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5));
-	placeMoveLevelItem(stackPos(0), stackPos(1), stackPos(2), stackPos(3) & 0xff, stackPos(4) & 0xff, stackPos(5));
+	placeMoveLevelItem(stackPos(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, stackPos(4) & 0xFF, stackPos(5));
 	return 1;
 }
 
@@ -321,7 +321,7 @@ int LoLEngine::olol_getItemPara(EMCState *script) {
 	case 14:
 		return p->unkB;
 	case 15:
-		return i->shpCurFrame_flg & 0x1fff;
+		return i->shpCurFrame_flg & 0x1FFF;
 	case 16:
 		return p->flags;
 	case 17:
@@ -397,7 +397,7 @@ int LoLEngine::olol_setCharacterStat(EMCState *script) {
 		break;
 
 	case 1:
-		c->raceClassSex = e & 0x0f;
+		c->raceClassSex = e & 0x0F;
 		break;
 
 	case 5:
@@ -478,19 +478,19 @@ int LoLEngine::olol_loadDoorShapes(EMCState *script) {
 		_wllWallFlags[i + 3] |= 7;
 		int t = i % 5;
 		if (t == 4)
-			_wllWallFlags[i + 3] &= 0xf8;
+			_wllWallFlags[i + 3] &= 0xF8;
 		if (t == 3)
-			_wllWallFlags[i + 3] &= 0xfd;
+			_wllWallFlags[i + 3] &= 0xFD;
 	}
 
 	if (stackPos(3)) {
 		for (int i = 3; i < 13; i++)
-			_wllWallFlags[i] &= 0xfd;
+			_wllWallFlags[i] &= 0xFD;
 	}
 
 	if (stackPos(4)) {
 		for (int i = 13; i < 23; i++)
-			_wllWallFlags[i] &= 0xfd;
+			_wllWallFlags[i] &= 0xFD;
 	}
 
 	return 1;
@@ -683,7 +683,7 @@ int LoLEngine::olol_setGlobalVar(EMCState *script) {
 		break;
 
 	case 2:
-		_currentLevel = b & 0xff;
+		_currentLevel = b & 0xFF;
 		break;
 
 	case 3:
@@ -691,7 +691,7 @@ int LoLEngine::olol_setGlobalVar(EMCState *script) {
 		break;
 
 	case 4:
-		_brightness = b & 0xff;
+		_brightness = b & 0xFF;
 		break;
 
 	case 5:
@@ -717,20 +717,20 @@ int LoLEngine::olol_setGlobalVar(EMCState *script) {
 		break;
 
 	case 9:
-		_lampOilStatus = b & 0xff;
+		_lampOilStatus = b & 0xFF;
 		break;
 
 	case 10:
-		_sceneDefaultUpdate = b & 0xff;
+		_sceneDefaultUpdate = b & 0xFF;
 		gui_toggleButtonDisplayMode(0, 0);
 		break;
 
 	case 11:
-		_compassBroken = a & 0xff;
+		_compassBroken = a & 0xFF;
 		break;
 
 	case 12:
-		_drainMagic = a & 0xff;
+		_drainMagic = a & 0xFF;
 		break;
 
 	default:
@@ -763,9 +763,9 @@ int LoLEngine::olol_checkEquippedItemScriptFlags(EMCState *script) {
 int LoLEngine::olol_setDoorState(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setDoorState(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
 	if (stackPos(1))
-		_levelBlockProperties[stackPos(0)].flags = (_levelBlockProperties[stackPos(0)].flags & 0xef) | 0x20;
+		_levelBlockProperties[stackPos(0)].flags = (_levelBlockProperties[stackPos(0)].flags & 0xEF) | 0x20;
 	else
-		_levelBlockProperties[stackPos(0)].flags &= 0xdf;
+		_levelBlockProperties[stackPos(0)].flags &= 0xDF;
 	return 1;
 }
 
@@ -784,7 +784,7 @@ int LoLEngine::olol_assignLevelDecorationShape(EMCState *script) {
 
 int LoLEngine::olol_resetBlockShapeAssignment(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_resetBlockShapeAssignment(%p) (%d)", (const void *)script, stackPos(0));
-	uint8 v = stackPos(0) & 0xff;
+	uint8 v = stackPos(0) & 0xFF;
 	memset(_wllShapeMap + 3, v, 5);
 	memset(_wllShapeMap + 13, v, 5);
 	return 1;
@@ -842,7 +842,7 @@ int LoLEngine::olol_initMonster(EMCState *script) {
 		l->destDirection = l->direction;
 
 		for (int ii = 0; ii < 4; ii++)
-			l->equipmentShapes[ii] = stackPos(7 + ii) & 0xff;
+			l->equipmentShapes[ii] = stackPos(7 + ii) & 0xFF;
 
 		checkSceneUpdateNeed(l->block);
 		return i;
@@ -927,7 +927,7 @@ int LoLEngine::olol_loadMonsterProperties(EMCState *script) {
 	       stackPos(35), stackPos(36), stackPos(37), stackPos(38), stackPos(39), stackPos(40), stackPos(41));
 
 	LoLMonsterProperty *l = &_monsterProperties[stackPos(0)];
-	l->shapeIndex = stackPos(1) & 0xff;
+	l->shapeIndex = stackPos(1) & 0xFF;
 
 	int shpWidthMax = 0;
 
@@ -1079,7 +1079,7 @@ int LoLEngine::olol_addRemoveCharacter(EMCState *script) {
 			if (!(_characters[i].flags & 1) || _characters[i].id != id)
 				continue;
 
-			_characters[i].flags &= 0xfffe;
+			_characters[i].flags &= 0xFFFE;
 			calcCharPortraitXpos();
 
 			if (_selectedCharacter == i)
@@ -1192,7 +1192,7 @@ int LoLEngine::olol_changeMonsterStat(EMCState *script) {
 	if (stackPos(0) == -1)
 		return 1;
 
-	LoLMonster *m = &_monsters[stackPos(0) & 0x7fff];
+	LoLMonster *m = &_monsters[stackPos(0) & 0x7FFF];
 
 	int16 d = stackPos(2);
 	uint16 x = 0;
@@ -1208,7 +1208,7 @@ int LoLEngine::olol_changeMonsterStat(EMCState *script) {
 		break;
 
 	case 2:
-		calcCoordinates(x, y, d, m->x & 0xff, m->y & 0xff);
+		calcCoordinates(x, y, d, m->x & 0xFF, m->y & 0xFF);
 		if (!walkMonsterCheckDest(x, y, m, 7))
 			placeMonster(m, x, y);
 		break;
@@ -1233,7 +1233,7 @@ int LoLEngine::olol_getMonsterStat(EMCState *script) {
 	if (stackPos(0) == -1)
 		return 0;
 
-	LoLMonster *m = &_monsters[stackPos(0) & 0x7fff];
+	LoLMonster *m = &_monsters[stackPos(0) & 0x7FFF];
 	int d = stackPos(1);
 
 	switch (d) {
@@ -1318,8 +1318,8 @@ int LoLEngine::olol_drawExitButton(EMCState *script) {
 	int w = _screen->getTextWidth(str);
 
 	if (_flags.use16ColorMode) {
-		gui_drawBox(x - offs - w, y - 9, w + offs, 9, 0xee, 0xcc, 0x11);
-		_screen->printText(str, x - (offs >> 1) - w, y - 7, 0xbb, 0);
+		gui_drawBox(x - offs - w, y - 9, w + offs, 9, 0xEE, 0xCC, 0x11);
+		_screen->printText(str, x - (offs >> 1) - w, y - 7, 0xBB, 0);
 	} else {
 		gui_drawBox(x - offs - w, y - 9, w + offs, 9, 136, 251, 252);
 		_screen->printText(str, x - (offs >> 1) - w, y - 7, 144, 0);
@@ -1497,7 +1497,7 @@ int LoLEngine::olol_distanceAttack(EMCState *script) {
 	uint16 y = 0;
 	calcCoordinates(x, y, stackPos(2), fX, fY);
 
-	if (launchObject(stackPos(0), stackPos(1), x, y, stackPos(5), stackPos(6) << 1, stackPos(7), stackPos(8), 0x3f))
+	if (launchObject(stackPos(0), stackPos(1), x, y, stackPos(5), stackPos(6) << 1, stackPos(7), stackPos(8), 0x3F))
 		return 1;
 
 	deleteItem(stackPos(1));
@@ -1532,7 +1532,7 @@ int LoLEngine::olol_moveBlockObjects(EMCState *script) {
 	// WORKAROUND for script bug
 	// Items would vanish when thrown towards the stairs
 	// in white tower level 3.
-	if (_currentLevel == 21 && level == 21 && destBlock == 0x3e0) {
+	if (_currentLevel == 21 && level == 21 && destBlock == 0x3E0) {
 		level = 20;
 		destBlock = 0x0247;
 	}
@@ -1544,7 +1544,7 @@ int LoLEngine::olol_moveBlockObjects(EMCState *script) {
 			if (!includeMonsters)
 				continue;
 
-			l &= 0x7fff;
+			l &= 0x7FFF;
 
 			LoLMonster *m = &_monsters[l];
 
@@ -1558,7 +1558,7 @@ int LoLEngine::olol_moveBlockObjects(EMCState *script) {
 			if (!(_itemsInPlay[l].shpCurFrame_flg & 0x4000) || !includeItems)
 				continue;
 
-			placeMoveLevelItem(l, level, destBlock, _itemsInPlay[l].x & 0xff, _itemsInPlay[l].y & 0xff, _itemsInPlay[l].flyingHeight);
+			placeMoveLevelItem(l, level, destBlock, _itemsInPlay[l].x & 0xFF, _itemsInPlay[l].y & 0xFF, _itemsInPlay[l].flyingHeight);
 			res = 1;
 
 			if (!runScript || level != _currentLevel)
@@ -1617,7 +1617,7 @@ int LoLEngine::olol_dummy1(EMCState *script) {
 
 int LoLEngine::olol_suspendMonster(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_suspendMonster(%p) (%d)", (const void *)script, stackPos(0));
-	LoLMonster *m = &_monsters[stackPos(0) & 0x7fff];
+	LoLMonster *m = &_monsters[stackPos(0) & 0x7FFF];
 	setMonsterMode(m, 14);
 	checkSceneUpdateNeed(m->block);
 	placeMonster(m, 0, 0);
@@ -1732,11 +1732,11 @@ int LoLEngine::olol_getItemOnPos(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_getItemOnPos(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3));
 	int pX = stackPos(1);
 	if (pX != -1)
-		pX &= 0xff;
+		pX &= 0xFF;
 
 	int pY = stackPos(2);
 	if (pY != -1)
-		pY &= 0xff;
+		pY &= 0xFF;
 
 	int o = (stackPos(3) || _emcLastItem == -1) ? stackPos(0) : _emcLastItem;
 
@@ -1744,19 +1744,19 @@ int LoLEngine::olol_getItemOnPos(EMCState *script) {
 
 	while (_emcLastItem) {
 		if (_emcLastItem & 0x8000) {
-			o = _emcLastItem & 0x7fff;
+			o = _emcLastItem & 0x7FFF;
 			_emcLastItem = _levelBlockProperties[o].assignedObjects;
 			continue;
 		}
 
-		if (pX != -1 && (_itemsInPlay[_emcLastItem].x & 0xff) != pX) {
-			o = _emcLastItem & 0x7fff;
+		if (pX != -1 && (_itemsInPlay[_emcLastItem].x & 0xFF) != pX) {
+			o = _emcLastItem & 0x7FFF;
 			_emcLastItem = _levelBlockProperties[o].assignedObjects;
 			continue;
 		}
 
-		if (pY != -1 && (_itemsInPlay[_emcLastItem].y & 0xff) != pY) {
-			o = _emcLastItem & 0x7fff;
+		if (pY != -1 && (_itemsInPlay[_emcLastItem].y & 0xFF) != pY) {
+			o = _emcLastItem & 0x7FFF;
 			_emcLastItem = _levelBlockProperties[o].assignedObjects;
 			continue;
 		}
@@ -1835,7 +1835,7 @@ int LoLEngine::olol_assignCustomSfx(EMCState *script) {
 		return 0;
 
 	uint16 t = READ_LE_UINT16(&_ingameSoundIndex[i << 1]);
-	if (t == 0xffff)
+	if (t == 0xFFFF)
 		return 0;
 
 	strcpy(_ingameSoundList[t], c);
@@ -1848,7 +1848,7 @@ int LoLEngine::olol_findAssignedMonster(EMCState *script) {
 	uint16 o = stackPos(1) == -1 ? _levelBlockProperties[stackPos(0)].assignedObjects : findObject(stackPos(1))->nextAssignedObject;
 	while (o) {
 		if (o & 0x8000)
-			return o & 0x7fff;
+			return o & 0x7FFF;
 		o = findObject(o)->nextAssignedObject;
 	}
 	return -1;
@@ -1861,8 +1861,8 @@ int LoLEngine::olol_checkBlockForMonster(EMCState *script) {
 
 	uint16 o = _levelBlockProperties[block].assignedObjects;
 	while (o & 0x8000) {
-		if (id == 0xffff || id == o)
-			return o & 0x7fff;
+		if (id == 0xFFFF || id == o)
+			return o & 0x7FFF;
 		o = findObject(o)->nextAssignedObject;
 	}
 	return -1;
@@ -2040,7 +2040,7 @@ int LoLEngine::olol_changeItemTypeOrFlag(EMCState *script) {
 	if (stackPos(1) == 4)
 		i->itemPropertyIndex = val;
 	else if (stackPos(1) == 15)
-		i->shpCurFrame_flg = (i->shpCurFrame_flg & 0xe000) | (val & 0x1fff);
+		i->shpCurFrame_flg = (i->shpCurFrame_flg & 0xE000) | (val & 0x1FFF);
 	else
 		val = -1;
 
@@ -2129,7 +2129,7 @@ int LoLEngine::olol_paletteFlash(EMCState *script) {
 		uint8 *d = p2.getData();
 
 		for (int i = 0; i < 16; i++)
-			d[i * 3] = 0x3f;
+			d[i * 3] = 0x3F;
 
 		_screen->setScreenPalette(p2);
 		_screen->updateScreen();
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index 22d0bc4..f656b16 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -1144,7 +1144,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_dummy);
 	Opcode(o3_dummy);
 	Opcode(o3_getCharacterFrameFromFacing);
-	// 0x0c
+	// 0x0C
 	Opcode(o2_setCharacterFacingOverwrite);
 	Opcode(o2_trySceneChange);
 	Opcode(o2_moveCharacter);
@@ -1164,7 +1164,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_showAlbum);
 	Opcode(o3_setInventorySlot);
 	Opcode(o3_getInventorySlot);
-	// 0x1c
+	// 0x1C
 	Opcode(o3_addItemToInventory);
 	OpcodeUnImpl();
 	Opcode(o3_addItemToCurScene);
@@ -1184,7 +1184,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o1_setGameFlag);
 	Opcode(o1_setHandItem);
 	Opcode(o1_removeHandItem);
-	// 0x2c
+	// 0x2C
 	Opcode(o1_getMouseState);
 	Opcode(o1_hideMouse);
 	Opcode(o2_addSpecialExit);
@@ -1204,7 +1204,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_makeSecondChanceSave);
 	Opcode(o3_setSceneFilename);
 	OpcodeUnImpl();
-	// 0x3c
+	// 0x3C
 	Opcode(o3_removeItemsFromScene);
 	Opcode(o3_disguiseMalcolm);
 	Opcode(o3_drawSceneShape);
@@ -1224,7 +1224,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_dummy);
 	Opcode(o3_setSceneAnimPosAndFrame);
 	Opcode(o2_update);
-	// 0x4c
+	// 0x4C
 	Opcode(o3_removeItemInstances);
 	Opcode(o3_dummy);
 	Opcode(o3_disableInventory);
@@ -1244,7 +1244,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_playSoundEffect);
 	Opcode(o3_getScore);
 	Opcode(o3_daggerWarning);
-	// 0x5c
+	// 0x5C
 	Opcode(o3_blockOutWalkableRegion);
 	Opcode(o3_dummy);
 	Opcode(o3_showSceneStringsMessage);
@@ -1264,7 +1264,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_dummy);
 	Opcode(o3_dummy);
 	Opcode(o2_waitForConfirmationClick);
-	// 0x6c
+	// 0x6C
 	Opcode(o3_dummy);
 	Opcode(o2_defineRoomEntrance);
 	Opcode(o2_runAnimationScript);
@@ -1284,7 +1284,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o2_defineScene);
 	Opcode(o3_setConversationState);
 	OpcodeUnImpl();
-	// 0x7c
+	// 0x7C
 	OpcodeUnImpl();
 	Opcode(o3_getConversationState);
 	Opcode(o3_dummy);
@@ -1304,7 +1304,7 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_dummy);
 	Opcode(o3_dialogStartScript);
 	Opcode(o3_dummy);
-	// 0x8c
+	// 0x8C
 	Opcode(o3_dialogEndScript);
 	Opcode(o3_dummy);
 	Opcode(o3_dummy);
@@ -1324,27 +1324,27 @@ void KyraEngine_MR::setupOpcodeTable() {
 	Opcode(o3_customChatFinish);
 	Opcode(o3_setupSceneAnimObject);
 	Opcode(o3_removeSceneAnimObject);
-	// 0x9c
+	// 0x9C
 	Opcode(o2_disableTimer);
 	Opcode(o2_enableTimer);
 	Opcode(o2_setTimerCountdown);
 	OpcodeUnImpl();
-	// 0xa0
+	// 0xA0
 	Opcode(o3_dummy);
 	Opcode(o3_dummy);
 	Opcode(o3_dummy);
 	Opcode(o3_dummy);
-	// 0xa4
+	// 0xA4
 	OpcodeUnImpl();
 	OpcodeUnImpl();
 	OpcodeUnImpl();
 	Opcode(o2_setVocHigh);
-	// 0xa8
+	// 0xA8
 	Opcode(o2_getVocHigh);
 	OpcodeUnImpl();
 	OpcodeUnImpl();
 	OpcodeUnImpl();
-	// 0xac
+	// 0xAC
 	OpcodeUnImpl();
 	Opcode(o3_dummy);
 	OpcodeUnImpl();
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index c358091..82ec3dc 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -393,14 +393,14 @@ void TIMInterpreter::displayText(uint16 textId, int16 flags, uint8 color) {
 	int y = 0;
 
 	if (_vm->gameFlags().use16ColorMode) {
-		if (color == 0xda)
-			color = 0xa1;
-		else if (color == 0xf2)
-			color = 0xe1;
+		if (color == 0xDA)
+			color = 0xA1;
+		else if (color == 0xF2)
+			color = 0xE1;
 		else if (flags < 0)
-			color = 0xe1;
+			color = 0xE1;
 		else
-			color = 0xc1;
+			color = 0xC1;
 	}
 
 	while (str[0]) {
@@ -1083,7 +1083,7 @@ int TIMInterpreter_LoL::cmd_dialogueBox(const uint16 *param) {
 	int cnt = 0;
 
 	for (int i = 1; i < 4; i++) {
-		if (param[i] != 0xffff) {
+		if (param[i] != 0xFFFF) {
 			tmpStr[i-1] = getTableString(param[i]);
 			cnt++;
 		} else {
diff --git a/engines/kyra/sequences_darkmoon.cpp b/engines/kyra/sequences_darkmoon.cpp
index d4f5c84..d2e6e85 100644
--- a/engines/kyra/sequences_darkmoon.cpp
+++ b/engines/kyra/sequences_darkmoon.cpp
@@ -867,7 +867,7 @@ void DarkMoonEngine::seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *da
 			int16 nextY = i ? items[i].y + items[i].size + (items[i].size >> 2) : dm->h;
 
 			const char *posOld = pos;
-			pos = strchr(pos, 0x0d);
+			pos = strchr(pos, 0x0D);
 			if (!pos)
 				pos = strchr(posOld, 0x00);
 
@@ -893,7 +893,7 @@ void DarkMoonEngine::seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *da
 				items[i + 1].dataType = 0;
 
 				int l = pos - posOld;
-				if (items[i + 1].crlf != 0x0d)
+				if (items[i + 1].crlf != 0x0D)
 					l++;
 
 				delete[] items[i + 1].str;
@@ -1071,7 +1071,7 @@ void DarkmoonSequenceHelper::animCommand(int index, int del) {
 
 	uint32 end = 0;
 
-	for (const DarkMoonAnimCommand *s = _config->animData[index]; s->command != 0xff && !_vm->skipFlag() && !_vm->shouldQuit(); s++) {
+	for (const DarkMoonAnimCommand *s = _config->animData[index]; s->command != 0xFF && !_vm->skipFlag() && !_vm->shouldQuit(); s++) {
 		int palIndex = _config->mode == kFinale ? (s->pal + 1) : s->pal;
 		int x = s->x1;
 		int y = s->y1;
@@ -1187,7 +1187,7 @@ void DarkmoonSequenceHelper::animCommand(int index, int del) {
 
 		case 6:
 			// play sound effect
-			if (s->obj != 0xff)
+			if (s->obj != 0xFF)
 				_vm->snd_playSoundEffect(s->obj);
 			break;
 
diff --git a/engines/kyra/sequences_eob.cpp b/engines/kyra/sequences_eob.cpp
index d28da4d..0fec386 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -1061,7 +1061,7 @@ void EoBEngine::seq_playFinale() {
 	gui_drawBox(0, 0, 176, 175, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
 	_txt->printDialogueText(51, _moreStrings[0]);
 
-	if (!checkScriptFlags(0x1ffe)) {
+	if (!checkScriptFlags(0x1FFE)) {
 		_screen->fadeToBlack();
 		return;
 	}
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 207d0ce..231337e 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -444,8 +444,8 @@ SeqPlayer_HOF::SeqPlayer_HOF(KyraEngine_v1 *vm, Screen_v2 *screen, OSystem *syst
 	} else {
 		const MainMenu::StaticData data = {
 			{ _sequenceStrings[97], _sequenceStrings[96], _sequenceStrings[95], _sequenceStrings[98], 0 },
-			{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0xd7, 0xd6 },
-			{ 0xd8, 0xda, 0xd9, 0xd8 },
+			{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0xD7, 0xD6 },
+			{ 0xD8, 0xDA, 0xD9, 0xD8 },
 			(_vm->gameFlags().lang == Common::JA_JPN) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT, 240
 		};
 
@@ -1137,7 +1137,7 @@ void SeqPlayer_HOF::startNestedAnimation(int animSlot, int sequenceID) {
 	_animSlots[animSlot].y = s.y;
 	_animSlots[animSlot].fadeInTransitionType = s.fadeInTransitionType;
 	_animSlots[animSlot].fadeOutTransitionType = s.fadeOutTransitionType;
-	_animSlots[animSlot].lastFrame = 0xffff;
+	_animSlots[animSlot].lastFrame = 0xFFFF;
 
 	doNestedFrameTransition(s.fadeInTransitionType, animSlot);
 
@@ -1258,7 +1258,7 @@ bool SeqPlayer_HOF::updateNestedAnimation(int animSlot) {
 	bool res = false;
 
 	if (currentFrame >= _animSlots[animSlot].endFrame) {
-		int sw = ((_animSlots[animSlot].flags & 0x1e) - 2);
+		int sw = ((_animSlots[animSlot].flags & 0x1E) - 2);
 		switch (sw) {
 		case 0:
 			res = true;
@@ -1488,7 +1488,7 @@ void SeqPlayer_HOF::playHoFTalkieCredits() {
 	_screen->fadeFromBlack();
 
 	_screen->_charWidth = -2;
-	uint8 *dataPtr = new uint8[0xafd];
+	uint8 *dataPtr = new uint8[0xAFD];
 	memcpy(dataPtr, talkieCredits, talkieCreditsSize);
 	_vm->staticres()->unloadId(k2SeqplayCredits);
 
@@ -1804,9 +1804,9 @@ int SeqPlayer_HOF::cbHOF_overview(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 		_vm->sound()->playTrack(4);
 		frameEnd = _system->getMillis() + 60 * _vm->tickLength();
 
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
 		_screen->setTextColorMap(_textColorMap);
 
 		delayUntil(frameEnd);
@@ -1889,9 +1889,9 @@ int SeqPlayer_HOF::cbHOF_library(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 
 		assert(_screenHoF);
 		_screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
 
 		_screen->setTextColorMap(_textColorMap);
 		break;
@@ -1959,9 +1959,9 @@ int SeqPlayer_HOF::cbHOF_hand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 
 		assert(_screenHoF);
 		_screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
 
 		_screen->setTextColorMap(_textColorMap);
 		break;
@@ -2032,9 +2032,9 @@ int SeqPlayer_HOF::cbHOF_point(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 	case 0:
 		_vm->sound()->playTrack(7);
 
-		_textColor[1] = 0xf7;
+		_textColor[1] = 0xF7;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
 		_screen->setTextColorMap(_textColorMap);
 		assert(_screenHoF);
 		_screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
@@ -2063,9 +2063,9 @@ int SeqPlayer_HOF::cbHOF_zanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 	case 0:
 		_vm->sound()->playTrack(8);
 
-		_textColor[1] = 0xfd;
+		_textColor[1] = 0xFD;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
 		_screen->setTextColorMap(_textColorMap);
 		break;
 
@@ -2229,9 +2229,9 @@ int SeqPlayer_HOF::cbHOF_funters(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 	case 0:
 		_vm->sound()->playTrack(3);
 
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColor[0] = _textColorMap[1] = 0xff;
+		_textColor[0] = _textColorMap[1] = 0xFF;
 		_screen->setTextColorMap(_textColorMap);
 
 		frameEnd = _system->getMillis() + 480 * _vm->tickLength();
@@ -2322,7 +2322,7 @@ int SeqPlayer_HOF::cbHOF_ferb(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 		break;
 
 	case 0:
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
 		_textColor[0] = _textColorMap[1] = 255;
 		_screen->setTextColorMap(_textColorMap);
@@ -2404,9 +2404,9 @@ int SeqPlayer_HOF::cbHOF_fish(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 		break;
 
 	case 0:
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColor[0] = _textColorMap[1] = 0xff;
+		_textColor[0] = _textColorMap[1] = 0xFF;
 		_screen->setTextColorMap(_textColorMap);
 		break;
 
@@ -2494,9 +2494,9 @@ int SeqPlayer_HOF::cbHOF_fheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 		break;
 
 	case 0:
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColor[0] = _textColorMap[1] = 0xff;
+		_textColor[0] = _textColorMap[1] = 0xFF;
 		_screen->setTextColorMap(_textColorMap);
 		break;
 
@@ -2570,9 +2570,9 @@ int SeqPlayer_HOF::cbHOF_farmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 		break;
 
 	case 0:
-		_textColor[1] = 1 + (_screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 254) & 0xff);
+		_textColor[1] = 1 + (_screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 254) & 0xFF);
 		memset(_textColorMap, _textColor[1], 16);
-		_textColorMap[1] = _textColor[0] = 1 + (_screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xff);
+		_textColorMap[1] = _textColor[0] = 1 + (_screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xFF);
 		_screen->setTextColorMap(_textColorMap);
 		playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 30 : 26);
 		break;
@@ -2643,10 +2643,10 @@ int SeqPlayer_HOF::cbHOF_fuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 
 	case 0:
 		for (int i = 0; i < 0x300; i++)
-			_screen->getPalette(0)[i] &= 0x3f;
+			_screen->getPalette(0)[i] &= 0x3F;
 		_textColor[1] = 0xCf;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColor[0] = _textColorMap[1] = 0xfe;
+		_textColor[0] = _textColorMap[1] = 0xFE;
 
 		_screen->setTextColorMap(_textColorMap);
 		break;
@@ -2732,9 +2732,9 @@ int SeqPlayer_HOF::cbHOF_firates(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 		break;
 
 	case 0:
-		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+		_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 		memset(_textColorMap, _textColor[1], 16);
-		_textColor[0] = _textColorMap[1] = 0xff;
+		_textColor[0] = _textColorMap[1] = 0xFF;
 		_screen->setTextColorMap(_textColorMap);
 		break;
 
@@ -2819,9 +2819,9 @@ int SeqPlayer_HOF::cbHOF_frash(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
 	case 0:
 		if (_callbackCurrentFrame == 1) {
 			_vm->sound()->playTrack(4);
-			_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
+			_textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
 			memset(_textColorMap, _textColor[1], 16);
-			_textColor[0] = _textColorMap[1] = 0xff;
+			_textColor[0] = _textColorMap[1] = 0xFF;
 			_screen->setTextColorMap(_textColorMap);
 		}
 		_animDuration = 10;
@@ -3054,7 +3054,7 @@ int SeqPlayer_HOF::cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm)
 			startNestedAnimation(1, kNestedSequenceHoFDemoDig);
 		}
 
-		if (_scrollProgressCounter >= 0x18f && !_callbackCurrentFrame)
+		if (_scrollProgressCounter >= 0x18F && !_callbackCurrentFrame)
 			return 0;
 
 		if (!_callbackCurrentFrame) {
@@ -3067,15 +3067,15 @@ int SeqPlayer_HOF::cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm)
 
 		updateDemoAdText(24, 144);
 		_callbackCurrentFrame++;
-		if (_callbackCurrentFrame < 0x256 || _callbackCurrentFrame > 0x31c) {
-			if (_callbackCurrentFrame < 0x174 || _callbackCurrentFrame > 0x1d7) {
-				if (_callbackCurrentFrame < 0x84 || _callbackCurrentFrame > 0xe7) {
+		if (_callbackCurrentFrame < 0x256 || _callbackCurrentFrame > 0x31C) {
+			if (_callbackCurrentFrame < 0x174 || _callbackCurrentFrame > 0x1D7) {
+				if (_callbackCurrentFrame < 0x84 || _callbackCurrentFrame > 0xE7) {
 					_scrollProgressCounter++;
 				}
 			}
 		}
 
-		if (_callbackCurrentFrame > 0x31e) {
+		if (_callbackCurrentFrame > 0x31E) {
 			closeNestedAnimation(0);
 			closeNestedAnimation(1);
 			setCountDown(0);
@@ -3152,8 +3152,8 @@ int SeqPlayer_HOF::cbLOLDEMO_scene1(WSAMovie_v2 *wsaObj, int x, int y, int frm)
 
 		for (int i = 3; i < 768; i++) {
 			tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
-			if (tmpPal[i] > 0x3f)
-				tmpPal[i] = 0x3f;
+			if (tmpPal[i] > 0x3F)
+				tmpPal[i] = 0x3F;
 		}
 
 		playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
@@ -3293,8 +3293,8 @@ int SeqPlayer_HOF::cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm)
 
 			for (int i = 3; i < 0x300; i++) {
 				tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
-				if (tmpPal[i] > 0x3f)
-					tmpPal[i] = 0x3f;
+				if (tmpPal[i] > 0x3F)
+					tmpPal[i] = 0x3F;
 			}
 
 			playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
@@ -3325,7 +3325,7 @@ int SeqPlayer_HOF::cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm)
 
 #undef CASE_ALT
 
-const uint8 SeqPlayer_HOF::_textColorPresets[] = { 0x01, 0x01, 0x00, 0x3f, 0x3f, 0x3f };
+const uint8 SeqPlayer_HOF::_textColorPresets[] = { 0x01, 0x01, 0x00, 0x3F, 0x3F, 0x3F };
 
 void KyraEngine_HoF::seq_showStarcraftLogo() {
 	WSAMovie_v2 *ci = new WSAMovie_v2(this);
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index e63d0a7..994bd2b 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -1207,7 +1207,7 @@ struct CreditsLine {
 
 void KyraEngine_LoK::seq_playCredits() {
 	static const uint8 colorMap[] = { 0, 0, 0xC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-	static const char stringTerms[] = { 0x5, 0xd, 0x0};
+	static const char stringTerms[] = { 0x5, 0xD, 0x0};
 
 	typedef Common::List<CreditsLine> CreditsLineList;
 	CreditsLineList lines;
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 8300536..3ff25d9 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -716,7 +716,7 @@ void LoLEngine::showStarcraftLogo() {
 	_screen->fadeFromBlack();
 	int inputFlag = 0;
 	for (int i = 0; i < endframe; i++) {
-		inputFlag = checkInput(0) & 0xff;
+		inputFlag = checkInput(0) & 0xFF;
 		if (shouldQuit() || inputFlag)
 			break;
 		ci->displayFrame(i, 2, 32, 80, 0, 0, 0);
@@ -728,7 +728,7 @@ void LoLEngine::showStarcraftLogo() {
 	if (!(shouldQuit() || inputFlag)) {
 		_sound->voicePlay("star2", &_speechHandle);
 		while (_sound->voiceIsPlaying(&_speechHandle) && !(shouldQuit() || inputFlag)) {
-			inputFlag = checkInput(0) & 0xff;
+			inputFlag = checkInput(0) & 0xFF;
 			delay(_tickLength);
 		}
 	}
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 9119fb4..2f5a0b6 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -165,7 +165,7 @@ public:
 	 *
 	 * @param track sound effect id
 	 */
-	virtual void playSoundEffect(uint8 track, uint8 volume = 0xff) = 0;
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF) = 0;
 
 	/**
 	 * Stop playback of all sfx tracks.
@@ -319,7 +319,7 @@ public:
 	virtual void haltTrack();
 	virtual bool isPlaying() const;
 
-	virtual void playSoundEffect(uint8 track, uint8 volume = 0xff);
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
 	virtual void stopAllSoundEffects();
 
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 958cfcb..1d66570 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -683,14 +683,14 @@ void AdLibDriver::adjustSfxData(uint8 *ptr, int volume) {
 	_sfxVelocity = ptr[3];
 
 	// Adjust the values.
-	if (volume != 0xff) {
+	if (volume != 0xFF) {
 		if (_version >= 3) {
 			int newVal = ((((ptr[3]) + 63) * volume) >> 8) & 0xFF;
 			ptr[3] = -newVal + 63;
 			ptr[1] = ((ptr[1] * volume) >> 8) & 0xFF;
 		} else {
-			int newVal = ((_sfxVelocity << 2) ^ 0xff) * volume;
-			ptr[3] = (newVal >> 10) ^ 0x3f;
+			int newVal = ((_sfxVelocity << 2) ^ 0xFF) * volume;
+			ptr[3] = (newVal >> 10) ^ 0x3F;
 			ptr[1] = newVal >> 11;
 		}
 	}
@@ -2375,7 +2375,7 @@ void SoundAdLibPC::playTrack(uint8 track) {
 			_driver->setSyncJumpMask(0x000F);
 		else
 			_driver->setSyncJumpMask(0);
-		play(track, 0xff);
+		play(track, 0xFF);
 	}
 }
 
@@ -2409,7 +2409,7 @@ void SoundAdLibPC::play(uint8 track, uint8 volume) {
 }
 
 void SoundAdLibPC::beginFadeOut() {
-	play(_version > 2 ? 1 : 15, 0xff);
+	play(_version > 2 ? 1 : 15, 0xFF);
 }
 
 int SoundAdLibPC::checkTrigger() {
diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h
index f78d812..f848649 100644
--- a/engines/kyra/sound_adlib.h
+++ b/engines/kyra/sound_adlib.h
@@ -79,7 +79,7 @@ public:
 	virtual void haltTrack();
 	virtual bool isPlaying() const;
 
-	virtual void playSoundEffect(uint8 track, uint8 volume = 0xff);
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
 	virtual void beginFadeOut();
 
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index 6ff1c3d..518805c 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -271,8 +271,8 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
 
 			while (outSize > 0) {
 				input = _inBuffer[i++] << 2;
-				code = (input >> 8) & 0xff;
-				count = (input & 0xff) >> 2;
+				code = (input >> 8) & 0xFF;
+				count = (input & 0xFF) >> 2;
 
 				switch (code) {
 				case 2:
@@ -294,7 +294,7 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
 					for (; count >= 0; count--) {
 						code = _inBuffer[i++];
 
-						curSample += WSTable4Bit[code & 0x0f];
+						curSample += WSTable4Bit[code & 0x0F];
 						curSample = clip8BitSample(curSample);
 						_outBuffer[j++] = curSample;
 
diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 1325424..37233a7 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -73,7 +73,7 @@ public:
 	void haltTrack();
 	bool isPlaying() const;
 
-	void playSoundEffect(uint8 track, uint8 volume = 0xff);
+	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 	void stopAllSoundEffects();
 
 	void beginFadeOut();
@@ -129,7 +129,7 @@ public:
 	void playTrack(uint8 track);
 	void haltTrack();
 
-	void playSoundEffect(uint8 track, uint8 volume = 0xff);
+	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 	void stopAllSoundEffects();
 
 	void beginFadeOut();
@@ -185,7 +185,7 @@ public:
 	void beginFadeOut();
 
 	int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) { return -1; }
-	void playSoundEffect(uint8 track, uint8 volume = 0xff);
+	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
 	void updateVolumeSettings();
 
@@ -221,7 +221,7 @@ public:
 	void beginFadeOut();
 
 	int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume = 255, uint8 priority = 255, bool isSfx = true);
-	void playSoundEffect(uint8 track, uint8 volume = 0xff);
+	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
 	void updateVolumeSettings();
 
@@ -338,7 +338,7 @@ public:
 	void beginFadeOut();
 
 	int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) { return -1; }
-	void playSoundEffect(uint8 track, uint8 volume = 0xff);
+	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
 protected:
 	Audio::MaxTrax *_driver;
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 3c2c931..02ea3f4 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -60,7 +60,7 @@ bool LoLEngine::snd_playCharacterSpeech(int id, int8 speaker, int) {
 	Common::String pattern2 = Common::String::format("%02d", id & 0x4000 ? 0 : _curTlkFile);
 
 	if (id & 0x4000) {
-		pattern1 = Common::String::format("%03X", id & 0x3fff);
+		pattern1 = Common::String::format("%03X", id & 0x3FFF);
 	} else if (id < 1000) {
 		pattern1 = Common::String::format("%03d", id);
 	} else {
@@ -164,7 +164,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
 	if (track == -1 || track >= _ingameSoundListSize)
 		return;
 
-	volume &= 0xff;
+	volume &= 0xFF;
 	int16 prIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
 	uint16 priority = (prIndex > 0) ? (prIndex * volume) >> 8 : -prIndex;
 
@@ -214,8 +214,8 @@ bool LoLEngine::snd_processEnvironmentalSoundEffect(int soundId, int block) {
 		uint16 cbl = _currentBlock;
 
 		for (int i = 3; i > 0; i--) {
-			int dir = calcMonsterDirection(cbl & 0x1f, cbl >> 5, block & 0x1f, block >> 5);
-			cbl = (cbl + blockShiftTable[dir]) & 0x3ff;
+			int dir = calcMonsterDirection(cbl & 0x1F, cbl >> 5, block & 0x1F, block >> 5);
+			cbl = (cbl + blockShiftTable[dir]) & 0x3FF;
 			if (cbl != block) {
 				if (testWallFlag(cbl, 0, 1))
 					_environmentSfxVol >>= 1;
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index ee2ea6b..aff3e0f 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -174,8 +174,8 @@ void SoundTowns::playSoundEffect(uint8 track, uint8) {
 		}
 	}
 
-	uint8 *fileBody = _sfxFileData + 0x01b8;
-	int32 offset = (int32)READ_LE_UINT32(_sfxFileData + (track - 0x0b) * 4);
+	uint8 *fileBody = _sfxFileData + 0x01B8;
+	int32 offset = (int32)READ_LE_UINT32(_sfxFileData + (track - 0x0B) * 4);
 	if (offset == -1)
 		return;
 
@@ -214,10 +214,10 @@ void SoundTowns::playSoundEffect(uint8 track, uint8) {
 			sfx_WdTable_Number = READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset);
 
 			sfx_BtTable_Offset += (int16)READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset + 2);
-			*tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xff)];
+			*tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xFF)];
 
 			sfx_BtTable_Offset += (int16)READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset + 4);
-			*tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xff)];
+			*tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xFF)];
 		}
 	}
 
@@ -293,7 +293,7 @@ void SoundTowns::beginFadeOut() {
 			for (int ii = 0; ii < 6; ii++)
 				_driver->chanVolume(ii, fadeVolCur[ii]);
 			for (int ii = 0x40; ii < 0x46; ii++)
-				_driver->chanVolume(ii, fadeVolCur[ii - 0x3a]);
+				_driver->chanVolume(ii, fadeVolCur[ii - 0x3A]);
 
 			for (int ii = 0; ii < 6; ii++) {
 				fadeVolCur[ii] -= fadeVolStep[ii];
@@ -694,7 +694,7 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle,
 			cmd = ~cmd;
 		} else {
 			cmd |= 0x80;
-			if (cmd == 0xff)
+			if (cmd == 0xFF)
 				cmd--;
 		}
 		if (cmd < 0x80)
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 5c679f5..962efe6 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -58,7 +58,7 @@ void EoBCoreEngine::releaseMonsterShapes(int first, int num) {
 
 const uint8 *EoBCoreEngine::loadMonsterProperties(const uint8 *data) {
 	uint8 cmd = *data++;
-	while (cmd != 0xff) {
+	while (cmd != 0xFF) {
 		EoBMonsterProperty *d = &_monsterProps[cmd];
 		d->armorClass = (int8)*data++;
 		d->hitChance = (int8)*data++;
@@ -90,7 +90,7 @@ const uint8 *EoBCoreEngine::loadMonsterProperties(const uint8 *data) {
 		d->sound2 = (int8)*data++;
 		d->numRemoteAttacks = *data++;
 
-		if (*data++ != 0xff) {
+		if (*data++ != 0xFF) {
 			d->remoteWeaponChangeMode = *data++;
 			d->numRemoteWeapons = *data++;
 
@@ -113,7 +113,7 @@ const uint8 *EoBCoreEngine::loadMonsterProperties(const uint8 *data) {
 }
 
 const uint8 *EoBCoreEngine::loadActiveMonsterData(const uint8 *data, int level) {
-	for (uint8 p = *data++; p != 0xff; p = *data++) {
+	for (uint8 p = *data++; p != 0xFF; p = *data++) {
 		uint8 v = *data++;
 		_timer->setCountdown(0x20 + (p << 1), v);
 		_timer->setCountdown(0x21 + (p << 1), v);
@@ -132,7 +132,7 @@ const uint8 *EoBCoreEngine::loadActiveMonsterData(const uint8 *data, int level)
 	memset(_monsters, 0, 30 * sizeof(EoBMonsterInPlay));
 
 	for (int i = 0; i < 30; i++, data += 14) {
-		if (*data == 0xff)
+		if (*data == 0xFF)
 			continue;
 
 		initMonster(data[0], data[1], READ_LE_UINT16(&data[2]), data[4], (int8)data[5], data[6], data[7], data[8], data[9], READ_LE_UINT16(&data[10]), READ_LE_UINT16(&data[12]));
@@ -174,7 +174,7 @@ void EoBCoreEngine::initMonster(int index, int unit, uint16 block, int pos, int
 }
 
 void EoBCoreEngine::placeMonster(EoBMonsterInPlay *m, uint16 block, int dir) {
-	if (block != 0xffff) {
+	if (block != 0xFFFF) {
 		checkSceneUpdateNeed(m->block);
 		if (_levelBlockProperties[m->block].flags & 7) {
 			_levelBlockProperties[m->block].flags--;
@@ -201,11 +201,11 @@ void EoBCoreEngine::killMonster(EoBMonsterInPlay *m, bool giveExperience) {
 
 	if (m->randItem) {
 		if (rollDice(1, 10, 0) == 1)
-			setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3ff].drawObjects, m->block, duplicateItem(m->randItem), pos);
+			setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3FF].drawObjects, m->block, duplicateItem(m->randItem), pos);
 	}
 
 	if (m->fixedItem)
-		setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3ff].drawObjects, m->block, duplicateItem(m->fixedItem), pos);
+		setItemPosition((Item *)&_levelBlockProperties[m->block & 0x3FF].drawObjects, m->block, duplicateItem(m->fixedItem), pos);
 
 	if (giveExperience)
 		increasePartyExperience(_monsterProps[m->type].experience);
@@ -357,7 +357,7 @@ void EoBCoreEngine::flashMonsterShape(EoBMonsterInPlay *m) {
 	disableSysTimer(2);
 	_flashShapeTimer = 0;
 	drawScene(1);
-	m->flags &= 0xfd;
+	m->flags &= 0xFD;
 	_flashShapeTimer  = _system->getMillis() + _tickLength;
 	enableSysTimer(2);
 
@@ -536,7 +536,7 @@ void EoBCoreEngine::drawMonsters(int index) {
 		int h = shp[1];
 
 		x = x - (w >> 1) + (d->idleAnimState >> 4);
-		y = y - h + (d->idleAnimState & 0x0f);
+		y = y - h + (d->idleAnimState & 0x0F);
 
 		drawMonsterShape(shp, x, y, f >= 0 ? 0 : 1, d->flags, palIndex);
 
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index f4bae11..9b602d9 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -66,7 +66,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy
 			of[2] = _screen->makeShapeCopy(p, s + 2);
 		}
 	}
-	_monsterAnimType[monsterIndex] = animType & 0xff;
+	_monsterAnimType[monsterIndex] = animType & 0xFF;
 
 	uint8 *palShape = _screen->makeShapeCopy(p, 16);
 
@@ -90,7 +90,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy
 		uint16 sz = MIN(_screen->getShapeSize(_monsterShapes[pos]) - 10, 256);
 		memset(tmpPal2, 0, 256);
 		memcpy(tmpPal2, _monsterShapes[pos] + 10, sz);
-		memset(tmpPal3, 0xff, 256 * sizeof(uint16));
+		memset(tmpPal3, 0xFF, 256 * sizeof(uint16));
 		uint8 numCol = *tmpPal2;
 
 		for (int ii = 0; ii < numCol; ii++) {
@@ -104,7 +104,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy
 			memset(tmpPal2, 0, 256);
 			memcpy(tmpPal2, _monsterShapes[pos] + 10, sz);
 			for (int iii = 0; iii < numCol; iii++) {
-				if (tmpPal3[iii] == 0xffff)
+				if (tmpPal3[iii] == 0xFFFF)
 					continue;
 				if (p[tmpPal3[iii] * 320 + ii + 1])
 					tmpPal2[1 + iii] = p[tmpPal3[iii] * 320 + ii + 1];
@@ -159,7 +159,7 @@ int LoLEngine::deleteMonstersFromBlock(int block) {
 			continue;
 		}
 
-		LoLMonster *m = &_monsters[i & 0x7fff];
+		LoLMonster *m = &_monsters[i & 0x7FFF];
 
 		cnt++;
 		setMonsterMode(m, 14);
@@ -215,8 +215,8 @@ bool LoLEngine::updateMonsterAdjustBlocks(LoLMonster *monster) {
 	if (monster->properties->flags & 8)
 		return true;
 
-	uint16 x1 = (monster->x & 0xff00) | 0x80;
-	uint16 y1 = (monster->y & 0xff00) | 0x80;
+	uint16 x1 = (monster->x & 0xFF00) | 0x80;
+	uint16 y1 = (monster->y & 0xFF00) | 0x80;
 	int x2 = _partyPosX;
 	int y2 = _partyPosY;
 
@@ -242,7 +242,7 @@ bool LoLEngine::updateMonsterAdjustBlocks(LoLMonster *monster) {
 		return false;
 
 	for (int i = 0; i < 18; i++)
-		_visibleBlocks[i] = &_levelBlockProperties[(monster->block + _dscBlockIndex[dir + i]) & 0x3ff];
+		_visibleBlocks[i] = &_levelBlockProperties[(monster->block + _dscBlockIndex[dir + i]) & 0x3FF];
 
 	int16 fx1 = 0;
 	int16 fx2 = 0;
@@ -277,8 +277,8 @@ void LoLEngine::placeMonster(LoLMonster *monster, uint16 x, uint16 y) {
 	_levelBlockProperties[monster->block].direction = 5;
 	checkSceneUpdateNeed(monster->block);
 
-	// WORKAROUND: Some monsters in the white tower have sound id's of 0xff. This is definitely a bug, since the
-	// last valid track number is 249 and there is no specific handling for 0xff. Nonetheless this wouldn't
+	// WORKAROUND: Some monsters in the white tower have sound id's of 0xFF. This is definitely a bug, since the
+	// last valid track number is 249 and there is no specific handling for 0xFF. Nonetheless this wouldn't
 	// cause problems in the original code, because it just so happens that the invalid memory address points
 	// to an entry in _ingameGMSoundIndex which just so happens to have a value of -1
 	if (monster->properties->sounds[0] == 0 || monster->properties->sounds[0] == 255 || cont == false)
@@ -364,7 +364,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
 		return 4;
 
 	if (x & 0x80) {
-		if (((x & 0xff) + objectWidth) & 0xff00) {
+		if (((x & 0xFF) + objectWidth) & 0xFF00) {
 			xOffs = 1;
 			_objectLastDirection = 2;
 			x2 = x + objectWidth;
@@ -380,7 +380,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
 			flag = 1;
 		}
 	} else {
-		if (((x & 0xff) - objectWidth) & 0xff00) {
+		if (((x & 0xFF) - objectWidth) & 0xFF00) {
 			xOffs = -1;
 			_objectLastDirection = 6;
 			x2 = x - objectWidth;
@@ -398,7 +398,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
 	}
 
 	if (y & 0x80) {
-		if (((y & 0xff) + objectWidth) & 0xff00) {
+		if (((y & 0xFF) + objectWidth) & 0xFF00) {
 			yOffs = 1;
 			_objectLastDirection = 4;
 			y2 = y + objectWidth;
@@ -415,7 +415,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
 			flag = 0;
 		}
 	} else {
-		if (((y & 0xff) - objectWidth) & 0xff00) {
+		if (((y & 0xFF) - objectWidth) & 0xFF00) {
 			yOffs = -1;
 			_objectLastDirection = 0;
 			y2 = y - objectWidth;
@@ -449,7 +449,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object
 
 int LoLEngine::testBlockPassability(int block, int x, int y, int objectWidth, int testFlag, int wallFlag) {
 	if (block == _currentBlock)
-		testFlag &= 0xfffe;
+		testFlag &= 0xFFFE;
 
 	if (testFlag & 1) {
 		_monsterCurBlock = block;
@@ -463,7 +463,7 @@ int LoLEngine::testBlockPassability(int block, int x, int y, int objectWidth, in
 
 	uint16 obj = _levelBlockProperties[block].assignedObjects;
 	while (obj & 0x8000) {
-		LoLMonster *monster = &_monsters[obj & 0x7fff];
+		LoLMonster *monster = &_monsters[obj & 0x7FFF];
 
 		if (monster->mode < 13) {
 			int r = checkDrawObjectSpace(x, y, monster->x, monster->y);
@@ -485,7 +485,7 @@ int LoLEngine::calcMonsterSkillLevel(int id, int a) {
 	if (!(id & 0x8000))
 		r = (r * _monsterModifiers[3 + _monsterDifficulty]) >> 8;
 
-	id &= 0x7fff;
+	id &= 0x7FFF;
 
 	if (_characters[id].skillLevels[1] <= 3)
 		return r;
@@ -530,7 +530,7 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
 	s = l->drawObjects;
 	while (s) {
 		if (s & 0x8000) {
-			s &= 0x7fff;
+			s &= 0x7FFF;
 			if (blockArrayIndex < 15)
 				drawMonster(s);
 			s = _monsters[s].nextDrawObject;
@@ -607,7 +607,7 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
 void LoLEngine::drawMonster(uint16 id) {
 	LoLMonster *m = &_monsters[id];
 	int16 flg = _monsterDirFlags[(_currentDirection << 2) + m->facing];
-	int curFrm = getMonsterCurFrame(m, flg & 0xffef);
+	int curFrm = getMonsterCurFrame(m, flg & 0xFFEF);
 	uint8 *shp = 0;
 
 	if (curFrm == -1) {
@@ -622,7 +622,7 @@ void LoLEngine::drawMonster(uint16 id) {
 		if (m->properties->flags & 0x800)
 			flg |= 0x20;
 
-		uint8 *monsterPalette = d ? _monsterPalettes[(m->properties->shapeIndex << 4) + (curFrm & 0x0f)] + (shp[10] * (d - 1)) : 0;
+		uint8 *monsterPalette = d ? _monsterPalettes[(m->properties->shapeIndex << 4) + (curFrm & 0x0F)] + (shp[10] * (d - 1)) : 0;
 		uint8 *brightnessOverlay = drawItemOrMonster(shp, monsterPalette, m->x + _monsterShiftOffs[m->shiftStep << 1], m->y + _monsterShiftOffs[(m->shiftStep << 1) + 1], 0, 0, flg | 1, -1, flip);
 
 		for (int i = 0; i < 4; i++) {
@@ -644,16 +644,16 @@ void LoLEngine::drawMonster(uint16 id) {
 	int dW = _screen->getShapeScaledWidth(shp, _dmScaleW) >> 1;
 	int dH = _screen->getShapeScaledHeight(shp, _dmScaleH) >> 1;
 
-	int bloodAmount = (m->mode == 13) ? (m->fightCurTick << 1) : (m->properties->hitPoints / (m->damageReceived & 0x7fff));
+	int bloodAmount = (m->mode == 13) ? (m->fightCurTick << 1) : (m->properties->hitPoints / (m->damageReceived & 0x7FFF));
 
 	shp = _gameShapes[6];
 
-	int bloodType = m->properties->flags & 0xc000;
+	int bloodType = m->properties->flags & 0xC000;
 	if (bloodType == 0x4000)
-		bloodType = _flags.use16ColorMode ? 0xbb : 63;
+		bloodType = _flags.use16ColorMode ? 0xBB : 63;
 	else if (bloodType == 0x8000)
 		bloodType = _flags.use16ColorMode ? 0x55 : 15;
-	else if (bloodType == 0xc000)
+	else if (bloodType == 0xC000)
 		bloodType = _flags.use16ColorMode ? 0x33 : 74;
 	else
 		bloodType = 0;
@@ -796,7 +796,7 @@ void LoLEngine::redrawSceneItem() {
 		int t = (i << 7) + 1;
 		while (s) {
 			if (s & 0x8000) {
-				s = _monsters[s & 0x7fff].nextDrawObject;
+				s = _monsters[s & 0x7FFF].nextDrawObject;
 			} else {
 				LoLItem *item = &_itemsInPlay[s];
 
@@ -934,7 +934,7 @@ uint8 *LoLEngine::drawItemOrMonster(uint8 *shape, uint8 *monsterPalette, int x,
 	uint8 tmpOvl[16];
 
 	if (flags & 0x80) {
-		flags &= 0xff7f;
+		flags &= 0xFF7F;
 		ovl2 = monsterPalette;
 		monsterPalette = 0;
 	} else {
@@ -969,7 +969,7 @@ uint8 *LoLEngine::drawItemOrMonster(uint8 *shape, uint8 *monsterPalette, int x,
 
 	if (_flags.use16ColorMode) {
 		if (_currentLevel != 22)
-			flg &= 0xdfff;
+			flg &= 0xDFFF;
 
 	} else {
 		if (_currentLevel == 22) {
@@ -1059,7 +1059,7 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
 
 	if ((monster->mode != 11) && (monster->mode != 14)) {
 		if (!(_rnd.getRandomNumber(255) & 3)) {
-			monster->shiftStep = (monster->shiftStep + 1) & 0x0f;
+			monster->shiftStep = (monster->shiftStep + 1) & 0x0F;
 			checkSceneUpdateNeed(monster->block);
 		}
 	}
@@ -1137,7 +1137,7 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
 			chasePartyWithCloseAttacks(monster);
 		} else {
 			setMonsterMode(monster, 7);
-			monster->flags &= 0xfff7;
+			monster->flags &= 0xFFF7;
 		}
 		break;
 
@@ -1164,13 +1164,13 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
 
 	if (monster->damageReceived) {
 		if (monster->damageReceived & 0x8000)
-			monster->damageReceived &= 0x7fff;
+			monster->damageReceived &= 0x7FFF;
 		else
 			monster->damageReceived = 0;
 		checkSceneUpdateNeed(monster->block);
 	}
 
-	monster->flags &= 0xffef;
+	monster->flags &= 0xFFEF;
 }
 
 void LoLEngine::moveMonster(LoLMonster *monster) {
@@ -1239,13 +1239,13 @@ bool LoLEngine::chasePartyWithDistanceAttacks(LoLMonster *monster) {
 
 	int flyingObject = monster->properties->distWeapons[s];
 
-	if (flyingObject & 0xc000) {
+	if (flyingObject & 0xC000) {
 		if (getBlockDistance(monster->block, _currentBlock) > 1) {
 			int type = flyingObject & 0x4000 ? 0 : 1;
-			flyingObject = makeItem(flyingObject & 0x3fff, 0, 0);
+			flyingObject = makeItem(flyingObject & 0x3FFF, 0, 0);
 
 			if (flyingObject) {
-				if (!launchObject(type, flyingObject, monster->x, monster->y, 12, dir << 1, -1, monster->id | 0x8000, 0x3f))
+				if (!launchObject(type, flyingObject, monster->x, monster->y, 12, dir << 1, -1, monster->id | 0x8000, 0x3F))
 					deleteItem(flyingObject);
 			}
 		}
@@ -1274,7 +1274,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(LoLMonster *monster) {
 				if (getBlockDistance(monster->block, _monsters[i].block) < 7)
 					setMonsterMode(monster, 7);
 			}
-			_txt->printMessage(2, "%s", getLangString(0x401a));
+			_txt->printMessage(2, "%s", getLangString(0x401A));
 
 		} else if (flyingObject == 4) {
 			launchMagicViper();
@@ -1294,7 +1294,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(LoLMonster *monster) {
 
 void LoLEngine::chasePartyWithCloseAttacks(LoLMonster *monster) {
 	if (!(monster->flags & 8)) {
-		int dir = calcMonsterDirection(monster->x & 0xff00, monster->y & 0xff00, _partyPosX & 0xff00, _partyPosY & 0xff00);
+		int dir = calcMonsterDirection(monster->x & 0xFF00, monster->y & 0xFF00, _partyPosX & 0xFF00, _partyPosY & 0xFF00);
 		int x1 = _partyPosX;
 		int y1 = _partyPosY;
 
@@ -1396,11 +1396,11 @@ int LoLEngine::checkForPossibleDistanceAttack(uint16 monsterBlock, int direction
 	if (mdist > distance)
 		return 5;
 
-	int dir = calcMonsterDirection(monsterBlock & 0x1f, monsterBlock >> 5, curBlock & 0x1f, curBlock >> 5);
+	int dir = calcMonsterDirection(monsterBlock & 0x1F, monsterBlock >> 5, curBlock & 0x1F, curBlock >> 5);
 	if ((dir & 1) || (dir != (direction << 1)))
 		return 5;
 
-	if (((monsterBlock & 0x1f) != (curBlock & 0x1f)) && ((monsterBlock & 0xffe0) != (curBlock & 0xffe0)))
+	if (((monsterBlock & 0x1F) != (curBlock & 0x1F)) && ((monsterBlock & 0xFFE0) != (curBlock & 0xFFE0)))
 		return 5;
 
 	if (distance < 0)
@@ -1438,8 +1438,8 @@ void LoLEngine::getNextStepCoords(int16 srcX, int16 srcY, int &newX, int &newY,
 	static const int8 stepAdjustX[] = { 0, 32, 32, 32, 0, -32, -32, -32 };
 	static const int8 stepAdjustY[] = { -32, -32, 0, 32, 32, 32, 0, -32 };
 
-	newX = (srcX + stepAdjustX[direction]) & 0x1fff;
-	newY = (srcY + stepAdjustY[direction]) & 0x1fff;
+	newX = (srcX + stepAdjustX[direction]) & 0x1FFF;
+	newY = (srcY + stepAdjustY[direction]) & 0x1FFF;
 }
 
 void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
@@ -1447,7 +1447,7 @@ void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
 	uint16 mx = monster->x;
 	uint16 my = monster->y;
 	uint16 *pos = (mdir & 1) ? &my : &mx;
-	bool centered = (*pos & 0x7f) == 0;
+	bool centered = (*pos & 0x7F) == 0;
 
 	bool posFlag = true;
 	if (monster->properties->maxWidth <= 63) {
@@ -1458,7 +1458,7 @@ void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
 				r = true;
 			} else {
 				uint16 id = _levelBlockProperties[monster->block].assignedObjects;
-				id = (id & 0x8000) ? (id & 0x7fff) : 0xffff;
+				id = (id & 0x8000) ? (id & 0x7FFF) : 0xFFFF;
 
 				if (id != monster->id) {
 					r = true;
@@ -1466,8 +1466,8 @@ void LoLEngine::alignMonsterToParty(LoLMonster *monster) {
 					for (int i = 0; i < 3; i++) {
 						mdir = (mdir + 1) & 3;
 						id = _levelBlockProperties[calcNewBlockPosition(monster->block, mdir)].assignedObjects;
-						id = (id & 0x8000) ? (id & 0x7fff) : 0xffff;
-						if (id != 0xffff) {
+						id = (id & 0x8000) ? (id & 0x7FFF) : 0xFFFF;
+						if (id != 0xFFFF) {
 							r = true;
 							break;
 						}
diff --git a/engines/kyra/sprites_rpg.cpp b/engines/kyra/sprites_rpg.cpp
index 0c4fcb0..9c08bc8 100644
--- a/engines/kyra/sprites_rpg.cpp
+++ b/engines/kyra/sprites_rpg.cpp
@@ -27,9 +27,9 @@
 namespace Kyra {
 
 int KyraRpgEngine::getBlockDistance(uint16 block1, uint16 block2) {
-	int b1x = block1 & 0x1f;
+	int b1x = block1 & 0x1F;
 	int b1y = block1 >> 5;
-	int b2x = block2 & 0x1f;
+	int b2x = block2 & 0x1F;
 	int b2y = block2 >> 5;
 
 	uint8 dy = ABS(b2y - b1y);
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index dc4f498..38481d9 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -1109,13 +1109,13 @@ const uint8 KyraEngine_LoK::_itemPosY[] = {
 };
 
 void GUI_LoK::initStaticResource() {
-	GUI_V1_BUTTON(_scrollUpButton, 0x12, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0f, 0);
-	GUI_V1_BUTTON(_scrollDownButton, 0x13, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0f, 0);
+	GUI_V1_BUTTON(_scrollUpButton, 0x12, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0F, 0);
+	GUI_V1_BUTTON(_scrollDownButton, 0x13, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0F, 0);
 
-	GUI_V1_BUTTON(_menuButtonData[0], 0x0c, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
-	GUI_V1_BUTTON(_menuButtonData[1], 0x0d, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
-	GUI_V1_BUTTON(_menuButtonData[2], 0x0e, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
-	GUI_V1_BUTTON(_menuButtonData[3], 0x0f, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+	GUI_V1_BUTTON(_menuButtonData[0], 0x0C, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+	GUI_V1_BUTTON(_menuButtonData[1], 0x0D, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+	GUI_V1_BUTTON(_menuButtonData[2], 0x0E, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
+	GUI_V1_BUTTON(_menuButtonData[3], 0x0F, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
 	GUI_V1_BUTTON(_menuButtonData[4], 0x10, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
 	GUI_V1_BUTTON(_menuButtonData[5], 0x11, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0);
 
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index 79f018c..872ab40 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -1118,10 +1118,10 @@ void EoBEngine::initSpells() {
 		{ 0x0000, 0x000000, 0x00 }, // dummy
 		{ 0x0033, 0x000001, 0x00 }, // armor
 		{ 0x0100, 0x000000, 0x21 }, // burning hands
-		{ 0x004c, 0x000002, 0x00 }, // detect magic
+		{ 0x004C, 0x000002, 0x00 }, // detect magic
 		{ 0x0100, 0x000000, 0x01 }, // magic missile
 		{ 0x0000, 0x000000, 0x00 }, // dummy
-		{ 0x008b, 0x000008, 0x00 }, // shield
+		{ 0x008B, 0x000008, 0x00 }, // shield
 		{ 0x0488, 0x000000, 0x03 }, // shocking grasp
 		{ 0x0021, 0x000040, 0x00 }, // invisibility
 		{ 0x0000, 0x000000, 0x00 }, // dummy
@@ -1141,10 +1141,10 @@ void EoBEngine::initSpells() {
 		{ 0x0000, 0x000000, 0x00 }, // CLOUD KILL
 		{ 0x0100, 0x000000, 0x41 }, // cone of cold
 		{ 0x0100, 0x000000, 0x00 }, // hold monster
-		{ 0x005c, 0x000400, 0x00 }, // bless
+		{ 0x005C, 0x000400, 0x00 }, // bless
 		{ 0x0020, 0x000000, 0x00 }, // cure light wounds
 		{ 0x0100, 0x000000, 0x01 }, // cause light wounds
-		{ 0x004c, 0x000002, 0x00 }, // detect magic
+		{ 0x004C, 0x000002, 0x00 }, // detect magic
 		{ 0x0029, 0x000800, 0x00 }, // prot from evil
 		{ 0x0039, 0x000000, 0x00 }, // aid
 		{ 0x2408, 0x000000, 0x21 }, // flame blade
@@ -1153,7 +1153,7 @@ void EoBEngine::initSpells() {
 		{ 0x0040, 0x000000, 0x00 }, // create food
 		{ 0x1000, 0x000000, 0x00 }, // dispel magic
 		{ 0x0099, 0x004000, 0x00 }, // magical vestment
-		{ 0x004c, 0x008000, 0x00 }, // prayer
+		{ 0x004C, 0x008000, 0x00 }, // prayer
 		{ 0x0040, 0x000000, 0x00 }, // remove paralysis
 		{ 0x0020, 0x000000, 0x00 }, // cure serious
 		{ 0x0100, 0x000000, 0x01 }, // cause serious
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index f974240..6b30645 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -458,11 +458,11 @@ void LoLEngine::initStaticResource() {
 }
 
 void GUI_LoL::initStaticData() {
-	GUI_V2_BUTTON(_scrollUpButton, 20, 96, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0);
-	GUI_V2_BUTTON(_scrollDownButton, 21, 98, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0);
+	GUI_V2_BUTTON(_scrollUpButton, 20, 96, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0);
+	GUI_V2_BUTTON(_scrollDownButton, 21, 98, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0);
 
 	for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i)
-		GUI_V2_BUTTON(_menuButtons[i], i, 0, 0, 0, 0, 0, 0x4487, 0, 0, 0, 0, 0, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0);
+		GUI_V2_BUTTON(_menuButtons[i], i, 0, 0, 0, 0, 0, 0x4487, 0, 0, 0, 0, 0, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0);
 
 	if (_vm->gameFlags().isTalkie)
 		GUI_LOL_MENU(_mainMenu, 9, 0x4000, 0, 7, -1, -1, -1, -1);
@@ -487,61 +487,61 @@ void GUI_LoL::initStaticData() {
 	for (int i = 0; i < _mainMenu.numberOfItems; ++i)
 		_mainMenu.item[i].callback = mainMenuFunctor;
 
-	GUI_LOL_MENU(_loadMenu, 10, 0x400e, 1, 5, 128, 20, 128, 118);
-	GUI_LOL_MENU_ITEM(_loadMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_loadMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_loadMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_loadMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0);
+	GUI_LOL_MENU(_loadMenu, 10, 0x400E, 1, 5, 128, 20, 128, 118);
+	GUI_LOL_MENU_ITEM(_loadMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_loadMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_loadMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_loadMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
 	GUI_LOL_MENU_ITEM(_loadMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
 	Button::Callback loadMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedLoadMenu);
 	for (int i = 0; i < 5; ++i)
 		_loadMenu.item[i].callback = loadMenuFunctor;
 
-	GUI_LOL_MENU(_saveMenu, 10, 0x400d, 1, 5, 128, 20, 128, 118);
-	GUI_LOL_MENU_ITEM(_saveMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_saveMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_saveMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_saveMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0);
+	GUI_LOL_MENU(_saveMenu, 10, 0x400D, 1, 5, 128, 20, 128, 118);
+	GUI_LOL_MENU_ITEM(_saveMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_saveMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_saveMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_saveMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
 	GUI_LOL_MENU_ITEM(_saveMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
 	Button::Callback saveMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedSaveMenu);
 	for (int i = 0; i < 5; ++i)
 		_saveMenu.item[i].callback = saveMenuFunctor;
 
-	GUI_LOL_MENU(_deleteMenu, 10, 0x400f, 1, 5, 128, 20, 128, 118);
-	GUI_LOL_MENU_ITEM(_deleteMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_deleteMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_deleteMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0);
-	GUI_LOL_MENU_ITEM(_deleteMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0);
+	GUI_LOL_MENU(_deleteMenu, 10, 0x400F, 1, 5, 128, 20, 128, 118);
+	GUI_LOL_MENU_ITEM(_deleteMenu.item[0], 0xFFFE, 8, 39, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_deleteMenu.item[1], 0xFFFD, 8, 56, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_deleteMenu.item[2], 0xFFFC, 8, 73, 256, 15, 0, 0);
+	GUI_LOL_MENU_ITEM(_deleteMenu.item[3], 0xFFFB, 8, 90, 256, 15, 0, 0);
 	GUI_LOL_MENU_ITEM(_deleteMenu.item[4], 0x4011, 168, 118, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
 	Button::Callback deleteMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeleteMenu);
 	for (int i = 0; i < 5; ++i)
 		_deleteMenu.item[i].callback = deleteMenuFunctor;
 
-	GUI_LOL_MENU(_gameOptions, 17, 0x400c, 0, 6, -1, -1, -1, -1);
+	GUI_LOL_MENU(_gameOptions, 17, 0x400C, 0, 6, -1, -1, -1, -1);
 	if (_vm->gameFlags().isTalkie) {
-		GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xfff7, 120, 22, 80, 15, 0x406e, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xfff6, 120, 39, 80, 15, 0x406c, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xfff5, 120, 56, 80, 15, 0x406d, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xfff4, 120, 73, 80, 15, 0x42d5, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xfff3, 120, 90, 80, 15, 0x42d2, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xFFF7, 120, 22, 80, 15, 0x406E, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xFFF6, 120, 39, 80, 15, 0x406C, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xFFF5, 120, 56, 80, 15, 0x406D, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xFFF4, 120, 73, 80, 15, 0x42D5, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xFFF3, 120, 90, 80, 15, 0x42D2, 0);
 		GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
 	} else {
-		GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xfff9, 120, 22, 80, 15, 0x406a, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xfff8, 120, 39, 80, 15, 0x406b, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xfff7, 120, 56, 80, 15, 0x406e, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xfff6, 120, 73, 80, 15, 0x406c, 0);
-		GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xfff5, 120, 90, 80, 15, 0x406d, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xFFF9, 120, 22, 80, 15, 0x406A, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xFFF8, 120, 39, 80, 15, 0x406B, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xFFF7, 120, 56, 80, 15, 0x406E, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xFFF6, 120, 73, 80, 15, 0x406C, 0);
+		GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xFFF5, 120, 90, 80, 15, 0x406D, 0);
 		GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
 	}
 	Button::Callback optionsMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedOptionsMenu);
 	for (int i = 0; i < _gameOptions.numberOfItems; ++i)
 		_gameOptions.item[i].callback = optionsMenuFunctor;
 
-	GUI_LOL_MENU(_audioOptions, 18, 0x42d9, 2, 1, -1, -1, -1, -1);
+	GUI_LOL_MENU(_audioOptions, 18, 0x42D9, 2, 1, -1, -1, -1, -1);
 	GUI_LOL_MENU_ITEM(_audioOptions.item[0], 0x4072, 152, 76, 96, 15, 0, _vm->_keyMap[Common::KEYCODE_ESCAPE]);
-	GUI_LOL_MENU_ITEM(_audioOptions.item[1], 3, 128, 22, 114, 14, 0x42db, 0);
-	GUI_LOL_MENU_ITEM(_audioOptions.item[2], 4, 128, 39, 114, 14, 0x42da, 0);
-	GUI_LOL_MENU_ITEM(_audioOptions.item[3], 5, 128, 56, 114, 14, 0x42dc, 0);
+	GUI_LOL_MENU_ITEM(_audioOptions.item[1], 3, 128, 22, 114, 14, 0x42DB, 0);
+	GUI_LOL_MENU_ITEM(_audioOptions.item[2], 4, 128, 39, 114, 14, 0x42DA, 0);
+	GUI_LOL_MENU_ITEM(_audioOptions.item[3], 5, 128, 56, 114, 14, 0x42DC, 0);
 	Button::Callback audioMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedAudioMenu);
 	for (int i = 0; i < 4; ++i)
 		_audioOptions.item[i].callback = audioMenuFunctor;
diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp
index 06067d6..7fa823d 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -464,9 +464,9 @@ void KyraEngine_HoF::processDialogue(int dlgOffset, int vocH, int csEntry) {
 		nextTimSequence = READ_LE_UINT16(&_ingameTalkObjIndex[cmd]);
 
 		if (nextTimSequence == 10) {
-			if (queryGameFlag(0x3e))
+			if (queryGameFlag(0x3E))
 				nextTimSequence = 14;
-			if (queryGameFlag(0x3f))
+			if (queryGameFlag(0x3F))
 				nextTimSequence = 15;
 			if (queryGameFlag(0x40))
 				nextTimSequence = 16;
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index ee42d6d..eee3ea9 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -85,7 +85,7 @@ void TextDisplayer_LoL::setupField(bool mode) {
 			_screen->copyBlockToPage(3, 0, 0, 320, 200, _vm->_pageBuffer1);
 			_screen->setCurPage(cp);
 
-			_vm->_updateFlags &= 0xfffd;
+			_vm->_updateFlags &= 0xFFFD;
 		}
 	} else {
 		if (!mode)
@@ -176,8 +176,8 @@ void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script,
 }
 
 void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
-	static const uint8 textColors256[] = { 0xfe, 0xa2, 0x84, 0x97, 0x9F };
-	static const uint8 textColors16[] = { 0x33, 0xaa, 0x88, 0x55, 0x99 };
+	static const uint8 textColors256[] = { 0xFE, 0xA2, 0x84, 0x97, 0x9F };
+	static const uint8 textColors16[] = { 0x33, 0xAA, 0x88, 0x55, 0x99 };
 	static const uint8 soundEffect[] = { 0x0B, 0x00, 0x2B, 0x1B, 0x00 };
 
 	const uint8 *textColors = _vm->gameFlags().use16ColorMode ? textColors16 : textColors256;
@@ -187,7 +187,7 @@ void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
 	else
 		_vm->stopPortraitSpeechAnim();
 
-	uint16 col = textColors[type & 0x7fff];
+	uint16 col = textColors[type & 0x7FFF];
 
 	int od = _screen->curDimIndex();
 
@@ -222,7 +222,7 @@ void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
 			_vm->sound()->playSoundEffect(soundEffect[type]);
 	}
 
-	_vm->_textColorFlag = type & 0x7fff;
+	_vm->_textColorFlag = type & 0x7FFF;
 	_vm->_fadeText = false;
 }
 
diff --git a/engines/kyra/text_rpg.cpp b/engines/kyra/text_rpg.cpp
index 52c14c7..07f4fe0 100644
--- a/engines/kyra/text_rpg.cpp
+++ b/engines/kyra/text_rpg.cpp
@@ -182,7 +182,7 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
 		case 8:
 			printLine(_currentLine);
 			dv = _textDimData[sdx].column / (_screen->getFontWidth() + _screen->_charWidth);
-			dv = ((dv + 8) & 0xfff8) - 1;
+			dv = ((dv + 8) & 0xFFF8) - 1;
 			if (dv >= charsPerLine)
 				dv = 0;
 			_textDimData[sdx].column = (_screen->getFontWidth() + _screen->_charWidth) * dv;
@@ -266,7 +266,7 @@ void TextDisplayer_rpg::readNextPara() {
 	// versions depend on this code we'll have to look at this again.
 #if 0
 	if ((_vm->game() != GI_LOL) && (d & 0x80)) {
-		d &= 0x7f;
+		d &= 0x7F;
 		c = d & 7;
 		d = (d & 0x78) >> 3;
 		uint8 l = d;
@@ -394,14 +394,14 @@ void TextDisplayer_rpg::printLine(char *str) {
 		case 0x55:
 			col = 0x81;
 			break;
-		case 0xaa:
+		case 0xAA:
 			col = 0x21;
 			break;
 		case 0x99:
-			col = 0xa1;
+			col = 0xA1;
 			break;
 		case 0x33:
-			col = 0xe1;
+			col = 0xE1;
 			break;
 		case 0x18:
 			col = 0x61;
@@ -561,8 +561,8 @@ void TextDisplayer_rpg::textPageBreak() {
 	}
 
 	if (vm()->gameFlags().use16ColorMode) {
-		vm()->gui_drawBox(x + 8, (y & ~7) - 1, 66, 10, 0xee, 0xcc, -1);
-		_screen->printText(_pageBreakString, (x + 37 - (strlen(_pageBreakString) << 1) + 4) & ~3, (y + 2) & ~7, 0xc1, 0);
+		vm()->gui_drawBox(x + 8, (y & ~7) - 1, 66, 10, 0xEE, 0xCC, -1);
+		_screen->printText(_pageBreakString, (x + 37 - (strlen(_pageBreakString) << 1) + 4) & ~3, (y + 2) & ~7, 0xC1, 0);
 	} else {
 		vm()->gui_drawBox(x, y, w, vm()->guiSettings()->buttons.height, vm()->guiSettings()->colors.frame1, vm()->guiSettings()->colors.frame2, vm()->guiSettings()->colors.fill);
 		_screen->printText(_pageBreakString, x + (w >> 1) - (vm()->screen()->getTextWidth(_pageBreakString) >> 1), y + 2, vm()->_dialogueButtonLabelColor1, 0);
diff --git a/engines/kyra/timer_eob.cpp b/engines/kyra/timer_eob.cpp
index 766fe45..effda22 100644
--- a/engines/kyra/timer_eob.cpp
+++ b/engines/kyra/timer_eob.cpp
@@ -57,7 +57,7 @@ void EoBCoreEngine::setupTimers() {
 
 void EoBCoreEngine::setCharEventTimer(int charIndex, uint32 countdown, int evnt, int updateExistingTimer) {
 	uint32 ntime = _system->getMillis() + countdown * _tickLength;
-	uint8 timerId = 0x30 | (charIndex & 0x0f);
+	uint8 timerId = 0x30 | (charIndex & 0x0F);
 	EoBCharacter *c = &_characters[charIndex];
 
 	if (!_timer->isEnabled(timerId)) {
@@ -118,7 +118,7 @@ void EoBCoreEngine::setupCharacterTimers() {
 		if (!testCharacter(i, 1))
 			continue;
 
-		uint32 nextTimer = 0xffffffff;
+		uint32 nextTimer = 0xFFFFFFFF;
 
 		for (int ii = 0; ii < 10; ii++) {
 			if (c->timers[ii] && c->timers[ii] < nextTimer)
@@ -126,7 +126,7 @@ void EoBCoreEngine::setupCharacterTimers() {
 		}
 		uint32 ctime = _system->getMillis();
 
-		if (nextTimer == 0xffffffff)
+		if (nextTimer == 0xFFFFFFFF)
 			_timer->disable(0x30 | i);
 		else {
 			enableTimer(0x30 | i);
@@ -219,11 +219,11 @@ void EoBCoreEngine::timerProcessFlyingObjects(int timerNum) {
 }
 
 void EoBCoreEngine::timerProcessMonsters(int timerNum) {
-	updateMonsters(timerNum & 0x0f);
+	updateMonsters(timerNum & 0x0F);
 }
 
 void EoBCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
-	int charIndex = timerNum & 0x0f;
+	int charIndex = timerNum & 0x0F;
 	EoBCharacter *c = &_characters[charIndex];
 	uint32 ctime =  _system->getMillis();
 
@@ -309,13 +309,13 @@ void EoBCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
 		_screen->setFont(of);
 	}
 
-	uint32 nextTimer = 0xffffffff;
+	uint32 nextTimer = 0xFFFFFFFF;
 	for (int i = 0; i < 10; i++) {
 		if (c->timers[i] && c->timers[i] < nextTimer)
 			nextTimer = c->timers[i];
 	}
 
-	if (nextTimer == 0xffffffff)
+	if (nextTimer == 0xFFFFFFFF)
 		_timer->disable(timerNum);
 	else
 		_timer->setCountdown(timerNum, (nextTimer - ctime) / _tickLength);
diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp
index a3df8db..9d0cc0d 100644
--- a/engines/kyra/timer_lol.cpp
+++ b/engines/kyra/timer_lol.cpp
@@ -49,7 +49,7 @@ void LoLEngine::setupTimers() {
 }
 
 void LoLEngine::timerProcessMonsters(int timerNum) {
-	for (int i = timerNum & 0x0f; i < 30; i += 2)
+	for (int i = timerNum & 0x0F; i < 30; i += 2)
 		updateMonster(&_monsters[i]);
 }
 
@@ -77,7 +77,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
 					if (_characters[i].characterUpdateDelay[ii] > eventsLeft)
 						eventsLeft = _characters[i].characterUpdateDelay[ii];
 				} else {
-					_characters[i].flags &= 0xfffb;
+					_characters[i].flags &= 0xFFFB;
 				}
 
 				gui_drawCharPortraitWithStats(i);
@@ -89,7 +89,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
 				break;
 
 			case 2:
-				_characters[i].flags &= 0xffbf;
+				_characters[i].flags &= 0xFFBF;
 				gui_drawCharPortraitWithStats(i);
 				break;
 
@@ -104,7 +104,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
 				break;
 
 			case 4:
-				_characters[i].flags &= 0xfeff;
+				_characters[i].flags &= 0xFEFF;
 				_txt->printMessage(0, getLangString(0x4027), _characters[i].name);
 				gui_drawCharPortraitWithStats(i);
 				break;
@@ -114,7 +114,7 @@ void LoLEngine::timerSpecialCharacterUpdate(int timerNum) {
 				break;
 
 			case 6:
-				_characters[i].flags &= 0xefff;
+				_characters[i].flags &= 0xEFFF;
 				gui_drawCharPortraitWithStats(i);
 				break;
 
@@ -146,7 +146,7 @@ void LoLEngine::timerProcessFlyingObjects(int timerNum) {
 }
 
 void LoLEngine::timerRunSceneAnimScript(int timerNum) {
-	runLevelScript(0x401 + (timerNum & 0x0f), -1);
+	runLevelScript(0x401 + (timerNum & 0x0F), -1);
 }
 
 void LoLEngine::timerRegeneratePoints(int timerNum) {
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index 471e83c..081d94a 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -126,8 +126,8 @@ void VQAMovie::decodeSND1(byte *inbuf, uint32 insize, byte *outbuf, uint32 outsi
 
 	while (outsize > 0) {
 		input = *inbuf++ << 2;
-		code = (input >> 8) & 0xff;
-		count = (input & 0xff) >> 2;
+		code = (input >> 8) & 0xFF;
+		count = (input & 0xFF) >> 2;
 
 		switch (code) {
 		case 2:
@@ -149,7 +149,7 @@ void VQAMovie::decodeSND1(byte *inbuf, uint32 insize, byte *outbuf, uint32 outsi
 			for (; count >= 0; count--) {
 				code = *inbuf++;
 
-				curSample += WSTable4Bit[code & 0x0f];
+				curSample += WSTable4Bit[code & 0x0F];
 				curSample = CLIP<int16>(curSample, 0, 255);
 				*outbuf++ = curSample;
 
@@ -264,7 +264,7 @@ bool VQAMovie::open(const char *filename) {
 			_frameInfo = new uint32[_header.numFrames];
 			_frame = new byte[_header.width * _header.height];
 
-			_codeBookSize = 0xf00 * _header.blockW * _header.blockH;
+			_codeBookSize = 0xF00 * _header.blockW * _header.blockH;
 			_codeBook = new byte[_codeBookSize];
 			_partialCodeBook = new byte[_codeBookSize];
 			memset(_codeBook, 0, _codeBookSize);


Commit: 85204751530095d932ddb0489c204706009431e5
    https://github.com/scummvm/scummvm/commit/85204751530095d932ddb0489c204706009431e5
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-01-08T21:09:22-08:00

Commit Message:
KYRA: Mark overloaded methods of Sound subclasses as virtual.

Changed paths:
    engines/kyra/sound_intern.h



diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 37233a7..44f46f3 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -54,31 +54,31 @@ class MidiOutput;
 class SoundMidiPC : public Sound {
 public:
 	SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *driver, kType type);
-	~SoundMidiPC();
+	virtual ~SoundMidiPC();
 
-	kType getMusicType() const { return _type; }
+	virtual kType getMusicType() const { return _type; }
 
-	bool init();
+	virtual bool init();
 
-	void updateVolumeSettings();
+	virtual void updateVolumeSettings();
 
-	void initAudioResourceInfo(int set, void *info);
-	void selectAudioResourceSet(int set);
-	bool hasSoundFile(uint file) const;
-	void loadSoundFile(uint file);
-	void loadSoundFile(Common::String file);
-	void loadSfxFile(Common::String file);
+	virtual void initAudioResourceInfo(int set, void *info);
+	virtual void selectAudioResourceSet(int set);
+	virtual bool hasSoundFile(uint file) const;
+	virtual void loadSoundFile(uint file);
+	virtual void loadSoundFile(Common::String file);
+	virtual void loadSfxFile(Common::String file);
 
-	void playTrack(uint8 track);
-	void haltTrack();
-	bool isPlaying() const;
+	virtual void playTrack(uint8 track);
+	virtual void haltTrack();
+	virtual bool isPlaying() const;
 
-	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
-	void stopAllSoundEffects();
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
+	virtual void stopAllSoundEffects();
 
-	void beginFadeOut();
+	virtual void beginFadeOut();
 
-	void pause(bool paused);
+	virtual void pause(bool paused);
 private:
 	static void onTimer(void *data);
 
@@ -113,28 +113,28 @@ private:
 class SoundTowns : public Sound {
 public:
 	SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer);
-	~SoundTowns();
+	virtual ~SoundTowns();
 
-	kType getMusicType() const { return kTowns; }
+	virtual kType getMusicType() const { return kTowns; }
 
-	bool init();
-	void process();
+	virtual bool init();
+	virtual void process();
 
-	void initAudioResourceInfo(int set, void *info);
-	void selectAudioResourceSet(int set);
-	bool hasSoundFile(uint file) const;
-	void loadSoundFile(uint file);
-	void loadSoundFile(Common::String) {}
+	virtual void initAudioResourceInfo(int set, void *info);
+	virtual void selectAudioResourceSet(int set);
+	virtual bool hasSoundFile(uint file) const;
+	virtual void loadSoundFile(uint file);
+	virtual void loadSoundFile(Common::String) {}
 
-	void playTrack(uint8 track);
-	void haltTrack();
+	virtual void playTrack(uint8 track);
+	virtual void haltTrack();
 
-	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
-	void stopAllSoundEffects();
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
+	virtual void stopAllSoundEffects();
 
-	void beginFadeOut();
+	virtual void beginFadeOut();
 
-	void updateVolumeSettings();
+	virtual void updateVolumeSettings();
 
 private:
 	bool loadInstruments();
@@ -167,27 +167,27 @@ private:
 class SoundPC98 : public Sound {
 public:
 	SoundPC98(KyraEngine_v1 *vm, Audio::Mixer *mixer);
-	~SoundPC98();
+	virtual ~SoundPC98();
 
 	virtual kType getMusicType() const { return kPC98; }
 
-	bool init();
+	virtual bool init();
 
-	void process() {}
-	void initAudioResourceInfo(int set, void *info);
-	void selectAudioResourceSet(int set);
-	bool hasSoundFile(uint file) const;
-	void loadSoundFile(uint file);
-	void loadSoundFile(Common::String file);
+	virtual void process() {}
+	virtual void initAudioResourceInfo(int set, void *info);
+	virtual void selectAudioResourceSet(int set);
+	virtual bool hasSoundFile(uint file) const;
+	virtual void loadSoundFile(uint file);
+	virtual void loadSoundFile(Common::String file);
 
-	void playTrack(uint8 track);
-	void haltTrack();
-	void beginFadeOut();
+	virtual void playTrack(uint8 track);
+	virtual void haltTrack();
+	virtual void beginFadeOut();
 
-	int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) { return -1; }
-	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
+	virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) { return -1; }
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
-	void updateVolumeSettings();
+	virtual void updateVolumeSettings();
 
 private:
 	int _lastTrack;
@@ -203,27 +203,27 @@ private:
 class SoundTownsPC98_v2 : public Sound {
 public:
 	SoundTownsPC98_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer);
-	~SoundTownsPC98_v2();
+	virtual ~SoundTownsPC98_v2();
 
-	kType getMusicType() const { return _vm->gameFlags().platform == Common::kPlatformFMTowns ? kTowns : kPC98; }
+	virtual kType getMusicType() const { return _vm->gameFlags().platform == Common::kPlatformFMTowns ? kTowns : kPC98; }
 
-	bool init();
-	void process();
+	virtual bool init();
+	virtual void process();
 
-	void initAudioResourceInfo(int set, void *info);
-	void selectAudioResourceSet(int set);
-	bool hasSoundFile(uint file) const;
-	void loadSoundFile(uint file) {}
-	void loadSoundFile(Common::String file);
+	virtual void initAudioResourceInfo(int set, void *info);
+	virtual void selectAudioResourceSet(int set);
+	virtual bool hasSoundFile(uint file) const;
+	virtual void loadSoundFile(uint file) {}
+	virtual void loadSoundFile(Common::String file);
 
-	void playTrack(uint8 track);
-	void haltTrack();
-	void beginFadeOut();
+	virtual void playTrack(uint8 track);
+	virtual void haltTrack();
+	virtual void beginFadeOut();
 
-	int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume = 255, uint8 priority = 255, bool isSfx = true);
-	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
+	virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume = 255, uint8 priority = 255, bool isSfx = true);
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
-	void updateVolumeSettings();
+	virtual void updateVolumeSettings();
 
 private:
 	Audio::AudioStream *_currentSFX;
@@ -319,26 +319,26 @@ struct AmigaSfxTable {
 class SoundAmiga : public Sound {
 public:
 	SoundAmiga(KyraEngine_v1 *vm, Audio::Mixer *mixer);
-	~SoundAmiga();
+	virtual ~SoundAmiga();
 
 	virtual kType getMusicType() const { return kAmiga; } //FIXME
 
-	bool init();
+	virtual bool init();
 
-	void process() {}
+	virtual void process() {}
 
-	void initAudioResourceInfo(int set, void *info);
-	void selectAudioResourceSet(int set);
-	bool hasSoundFile(uint file) const;
-	void loadSoundFile(uint file);
-	void loadSoundFile(Common::String) {}
+	virtual void initAudioResourceInfo(int set, void *info);
+	virtual void selectAudioResourceSet(int set);
+	virtual bool hasSoundFile(uint file) const;
+	virtual void loadSoundFile(uint file);
+	virtual void loadSoundFile(Common::String) {}
 
-	void playTrack(uint8 track);
-	void haltTrack();
-	void beginFadeOut();
+	virtual void playTrack(uint8 track);
+	virtual void haltTrack();
+	virtual void beginFadeOut();
 
-	int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) { return -1; }
-	void playSoundEffect(uint8 track, uint8 volume = 0xFF);
+	virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) { return -1; }
+	virtual void playSoundEffect(uint8 track, uint8 volume = 0xFF);
 
 protected:
 	Audio::MaxTrax *_driver;


Commit: bee175ae5088f42a9eca61c3c1755de2dbfb8c3c
    https://github.com/scummvm/scummvm/commit/bee175ae5088f42a9eca61c3c1755de2dbfb8c3c
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-01-08T21:10:22-08:00

Commit Message:
KYRA: Get rid of some unnecessary overwrites.

Changed paths:
    engines/kyra/sound_intern.h



diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 44f46f3..4bf43d7 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -173,7 +173,6 @@ public:
 
 	virtual bool init();
 
-	virtual void process() {}
 	virtual void initAudioResourceInfo(int set, void *info);
 	virtual void selectAudioResourceSet(int set);
 	virtual bool hasSoundFile(uint file) const;
@@ -325,8 +324,6 @@ public:
 
 	virtual bool init();
 
-	virtual void process() {}
-
 	virtual void initAudioResourceInfo(int set, void *info);
 	virtual void selectAudioResourceSet(int set);
 	virtual bool hasSoundFile(uint file) const;






More information about the Scummvm-git-logs mailing list