aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/gui_lol.cpp38
-rw-r--r--engines/kyra/items_lol.cpp10
-rw-r--r--engines/kyra/lol.cpp54
-rw-r--r--engines/kyra/lol.h6
-rw-r--r--engines/kyra/saveload_lol.cpp16
-rw-r--r--engines/kyra/scene_lol.cpp6
-rw-r--r--engines/kyra/screen.cpp10
-rw-r--r--engines/kyra/screen_lol.cpp30
-rw-r--r--engines/kyra/script_lol.cpp28
-rw-r--r--engines/kyra/script_tim.cpp30
-rw-r--r--engines/kyra/script_tim.h12
-rw-r--r--engines/kyra/sequences_hof.cpp2
-rw-r--r--engines/kyra/sequences_lol.cpp6
-rw-r--r--engines/kyra/sound.cpp4
-rw-r--r--engines/kyra/sound_towns.cpp4
-rw-r--r--engines/kyra/sprites_lol.cpp48
-rw-r--r--engines/kyra/text_lol.cpp44
-rw-r--r--engines/kyra/text_lol.h8
-rw-r--r--engines/kyra/timer.cpp6
-rw-r--r--engines/kyra/wsamovie.cpp2
20 files changed, 182 insertions, 182 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 24a8b9fcc4..0500411b98 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -1180,7 +1180,7 @@ int LoLEngine::clickedPortraitEtcRight(Button *button) {
if (flg & 1) {
if (!(_characters[c].flags & 8) || (flg & 0x20)) {
runItemScript(c, _itemInHand, 0x400, 0, 0);
- runLevelScriptCustom(_currentBlock, 0x400, c, _itemInHand, 0, 0);
+ runLevelScriptCustom(_currentBlock, 0x400, c, _itemInHand, 0, 0);
} else {
_txt->printMessage(2, getLangString(0x402c), _characters[c].name);
}
@@ -1466,7 +1466,7 @@ int LoLEngine::clickedScroll(Button *button) {
int LoLEngine::clickedSpellTargetCharacter(Button *button) {
int t = button->arg;
_txt->printMessage(0, "%s.\r", _characters[t].name);
-
+
if ((_spellProperties[_activeSpell.spell].flags & 0xff) == 1) {
_activeSpell.target = t;
castHealOnSingleCharacter(&_activeSpell);
@@ -1525,7 +1525,7 @@ int LoLEngine::clickedOptions(Button *button) {
int LoLEngine::clickedRestParty(Button *button) {
gui_toggleButtonDisplayMode(77, 1);
-
+
Button b;
memset(&b, 0, sizeof(Button));
b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
@@ -1539,7 +1539,7 @@ int LoLEngine::clickedRestParty(Button *button) {
int tHa = -1;
int needPoisoningFlags = 0;
int needHealingFlags = 0;
- int needMagicGainFlags = 0;
+ int needMagicGainFlags = 0;
for (int i = 0; i < 4; i++) {
LoLCharacter *c = &_characters[i];
@@ -1553,7 +1553,7 @@ int LoLEngine::clickedRestParty(Button *button) {
tMp = c->magicPointsMax;
if (c->flags & 0x80) {
- needPoisoningFlags |= (1 << i);
+ needPoisoningFlags |= (1 << i);
if (c->hitPointsCur > tHa)
tHa = c->hitPointsCur;
} else {
@@ -1572,7 +1572,7 @@ int LoLEngine::clickedRestParty(Button *button) {
if (needHealingFlags || needMagicGainFlags) {
_screen->fillRect(112, 0, 288, 120, 1);
gui_drawAllCharPortraitsWithStats();
-
+
_txt->printMessage(0x8000, getLangString(0x4057));
gui_toggleButtonDisplayMode(77, 0);
@@ -1626,11 +1626,11 @@ int LoLEngine::clickedRestParty(Button *button) {
} else if (f) {
gui_triggerEvent(f);
break;
- }
-
- if (!_partyAwake) {
+ }
+
+ if (!_partyAwake) {
if (_system->getMillis() > delay3) {
- for (int i = 0; i < 4; i++) {
+ for (int i = 0; i < 4; i++) {
if (!(needPoisoningFlags & (1 << i)))
continue;
inflictDamage(i, 1, 0x8000, 1, 0x80);
@@ -1639,42 +1639,42 @@ int LoLEngine::clickedRestParty(Button *button) {
}
delay3 = _system->getMillis() + a * _tickLength;
}
-
+
if (_system->getMillis() > delay1) {
- for (int i = 0; i < 4; i++) {
+ for (int i = 0; i < 4; i++) {
if (!(needHealingFlags & (1 << i)))
continue;
increaseCharacterHitpoints(i, 1, false);
gui_drawCharPortraitWithStats(i);
if (_characters[i].hitPointsCur == _characters[i].hitPointsMax)
needHealingFlags &= ~(1 << i);
- }
+ }
delay1 = _system->getMillis() + h * _tickLength;
}
if (_system->getMillis() > delay2) {
- for (int i = 0; i < 4; i++) {
+ for (int i = 0; i < 4; i++) {
if (!(needMagicGainFlags & (1 << i)))
continue;
- _characters[i].magicPointsCur++;
+ _characters[i].magicPointsCur++;
gui_drawCharPortraitWithStats(i);
if (_characters[i].magicPointsCur == _characters[i].magicPointsMax)
needMagicGainFlags &= ~(1 << i);
- }
+ }
delay2 = _system->getMillis() + m * _tickLength;
}
_screen->updateScreen();
}
-
+
} while (!_partyAwake && (needHealingFlags || needMagicGainFlags));
-
+
for (int i = 0; i < 4; i++) {
int frm = 0;
int upd = 0;
bool setframe = true;
if (_characters[i].flags & 0x1000) {
- _characters[i].flags &= 0xefff;
+ _characters[i].flags &= 0xefff;
if (_partyAwake) {
if (_characters[i].damageSuffered) {
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index 2e625b5a93..b32988683b 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -324,10 +324,10 @@ void LoLEngine::setItemPosition(int item, uint16 x, uint16 y, int flyingHeight,
else
_itemsInPlay[item].shpCurFrame_flg &= 0xbfff;
-
+
assignItemToBlock(&_levelBlockProperties[block].assignedObjects, item);
reassignDrawObjects(_currentDirection, item, &_levelBlockProperties[block], false);
-
+
if (b)
runLevelScriptCustom(block, 0x80, -1, item, 0, 0);
@@ -383,7 +383,7 @@ bool LoLEngine::launchObject(int objectType, int item, int startX, int startY, i
t->attackerId = attackerId;
t->flags = 7;
t->wallFlags = 2;
- t->c = c;
+ t->c = c;
if (attackerId != -1) {
if (attackerId & 0x8000) {
@@ -456,13 +456,13 @@ void LoLEngine::objectFlightProcessHits(FlyingObject *t, int x, int y, int objec
} else if (objectOnNextBlock == 2) {
if (_itemProperties[_itemsInPlay[t->item].itemPropertyIndex].flags & 0x4000) {
int o = _levelBlockProperties[_itemsInPlay[t->item].block].assignedObjects;
-
+
while (o & 0x8000) {
ItemInPlay *i = findObject(o);
o = i->nextAssignedObject;
runItemScript(t->attackerId, t->item, 0x8000, o, 0);
}
-
+
return;
} else {
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index b7c0fca889..724a9316bb 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -642,7 +642,7 @@ int LoLEngine::checkInput(Button *buttonList, bool mainLoop) {
if (!inputFlag) {
// This fixes a bug with some interactive sequences (like the inn where you mee Timothy).
// In the original code Mouse position variables are only updated when mouse button
- // or keyboard events get triggered.
+ // or keyboard events get triggered.
// TODO/FIXME: Check whether this is the correct way to do it in KYRA, too. In this case a
// fix could be added to KyraEngine_v1::checkInput() and the virtual stuff would not be
@@ -973,7 +973,7 @@ void LoLEngine::decodeSjis(const char *src, char *dst) {
*dst++ = *src++;
}
cmd = *src++;
-
+
} else {
s[0] = *src++;
Util::decodeString1(s, d);
@@ -1259,7 +1259,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
} else {
c->hitPointsCur = newVal;
if (c->hitPointsCur < 1)
- c->flags |= 8;
+ c->flags |= 8;
}
if (_updateFlags & 2)
@@ -1268,7 +1268,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
Screen::FontId cf = _screen->setFont(Screen::FID_6_FNT);
int cp = _screen->setCurPage(0);
- int s = 8192 / pointsMax;
+ int s = 8192 / pointsMax;
pointsMax = (s * pointsMax) >> 8;
pointsCur = (s * pointsCur) >> 8;
newVal = (s * newVal) >> 8;
@@ -1279,7 +1279,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
if (newVal != pointsCur) {
step = (newVal >= pointsCur) ? 2 : -2;
-
+
for (int i = pointsCur; i != newVal || newVal != newValScl;) {
if (ABS(i - newVal) < ABS(step))
step >>= 1;
@@ -1295,7 +1295,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
if (i == newVal) {
newVal = newValScl;
step = -step;
- }
+ }
delayUntil(_smoothScrollTimer);
}
@@ -1559,7 +1559,7 @@ void LoLEngine::fadeText() {
void LoLEngine::transformRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage) {
uint16 *p1 = (uint16*) _tempBuffer5120;
uint16 *p2 = (uint16*) (_tempBuffer5120 + 640);
-
+
for (int i = 0; i < w; i++)
p1[i] = i;
@@ -2126,7 +2126,7 @@ int LoLEngine::castSpell(int charNum, int spellType, int spellLevel) {
_txt->printMessage(2, getLangString(0x4257));
return 0;
}
-
+
if (charNum < 0) {
_activeSpell.charNum = (charNum * -1) - 1;
if (_spellProcs[spellType]->isValid())
@@ -2145,7 +2145,7 @@ int LoLEngine::castSpell(int charNum, int spellType, int spellLevel) {
if (_spellProcs[spellType]->isValid())
(*_spellProcs[spellType])(&_activeSpell);
}
-
+
return 1;
}
@@ -2247,7 +2247,7 @@ void LoLEngine::processMagicSpark(int charNum, int spellLevel) {
uint16 wFrames[6];
const uint16 width = mov->width();
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;
@@ -2261,7 +2261,7 @@ void LoLEngine::processMagicSpark(int charNum, int spellLevel) {
for (int ii = 0; ii <= spellLevel; ii++) {
if (wFrames[ii] >= i || wFrames[ii] + 13 <= i)
continue;
-
+
if ((i - wFrames[ii]) == 1)
snd_playSoundEffect(162, -1);
@@ -2405,9 +2405,9 @@ void LoLEngine::processMagicHeal(int charNum, int spellLevel) {
void LoLEngine::processMagicIce(int charNum, int spellLevel) {
int cp = _screen->setCurPage(2);
-
+
disableSysTimer(2);
-
+
gui_drawScene(0);
_screen->copyPage(0, 12);
@@ -2428,7 +2428,7 @@ void LoLEngine::processMagicIce(int charNum, int spellLevel) {
////////// TODO
generateBrightnessPalette(_screen->_currentPalette, _screen->getPalette(1), _brightness, _lampEffect);
-
+
////////// TODO
_screen->setCurPage(cp);
@@ -2456,7 +2456,7 @@ void LoLEngine::processMagicFog() {
error("Fog: Unable to load fog.wsa");
snd_playSoundEffect(145, -1);
-
+
for (int curFrame = 0; curFrame < numFrames; curFrame++) {
_smoothScrollTimer = _system->getMillis() + 3 * _tickLength;
_screen->copyPage(12, 2);
@@ -2465,7 +2465,7 @@ void LoLEngine::processMagicFog() {
_screen->updateScreen();
delayUntil(_smoothScrollTimer);
}
-
+
mov->close();
delete mov;
@@ -2486,7 +2486,7 @@ void LoLEngine::processMagicSwarm(int charNum, int damage) {
int cp = _screen->setCurPage(2);
_screen->copyPage(0, 12);
snd_playSoundEffect(74, -1);
-
+
uint16 destIds[6];
uint8 destModes[6];
int8 destTicks[6];
@@ -2501,7 +2501,7 @@ void LoLEngine::processMagicSwarm(int charNum, int damage) {
o &= 0x7fff;
if (_monsters[o].mode != 13) {
destIds[t++] = o;
-
+
if (!(_monsters[o].flags & 0x2000)) {
_envSfxUseQueue = true;
inflictMagicalDamage(o | 0x8000, charNum, damage, 0, 0);
@@ -2562,7 +2562,7 @@ void LoLEngine::addSpellToScroll(int spell, int charNum) {
assigned = true;
slot = i;
}
-
+
if (_availableSpells[i] == spell) {
_txt->printMessage(2, getLangString(0x42d0));
return;
@@ -2617,7 +2617,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
_screen->copyPage(0, 12);
int vX = _updateSpellBookCoords[slot << 1] + 32;
int vY = _updateSpellBookCoords[(slot << 1) + 1] + 5;
-
+
char wsaFile[13];
snprintf(wsaFile, 13, "write%0d%c.wsa", spell, (_lang == 1) ? 'f' : (_lang == 0 ? 'e' : 'g'));
snd_playSoundEffect(_updateSpellBookAnimData[(spell << 2) + 3], -1);
@@ -2681,7 +2681,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFrame, int frameDelay, int x, int y, SpellProcCallback callback, uint8 *pal1, uint8 *pal2, int fadeDelay, bool restoreScreen) {
int w = 0;
int h = 0;
-
+
if (mov) {
w = mov->width();
h = mov->height();
@@ -2720,7 +2720,7 @@ void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFra
int del = _smoothScrollTimer - _system->getMillis();
do {
-
+
int step = del > _tickLength ? _tickLength : del;
if (!pal1 || !pal2) {
@@ -2877,7 +2877,7 @@ int LoLEngine::inflictDamage(uint16 target, int damage, uint16 attacker, int ski
snd_queueEnvironmentalSoundEffect(m->properties->sounds[2], m->block);
checkSceneUpdateNeed(m->block);
-
+
if (m->hitPoints <= 0) {
m->hitPoints = 0;
if (!(attacker & 0x8000))
@@ -2985,7 +2985,7 @@ int LoLEngine::calcInflictableDamagePerItem(int16 attacker, int16 target, uint16
return 0;
if (!(attacker & 0x8000)) {
- dmg = (dmg * _characters[attacker].totalMightModifier) >> 8;
+ dmg = (dmg * _characters[attacker].totalMightModifier) >> 8;
if (!dmg)
return 0;
}
@@ -3134,7 +3134,7 @@ void LoLEngine::applyMonsterDefenseSkill(MonsterInPlay *monster, int16 attacker,
case 4:
if (!(deathFlag & 0x80))
- return;
+ return;
monster->hitPoints += damage;
if (monster->hitPoints > monster->properties->hitPoints)
monster->hitPoints = monster->properties->hitPoints;
@@ -3173,7 +3173,7 @@ int LoLEngine::paralyzePoisonCharacter(int charNum, int typeFlag, int immunityFl
return 0;
int r = 0;
-
+
if (typeFlag == 0x40) {
_characters[charNum].flags |= 0x40;
setCharacterUpdateEvent(charNum, 3, 3600, 1);
@@ -3189,7 +3189,7 @@ int LoLEngine::paralyzePoisonCharacter(int charNum, int typeFlag, int immunityFl
} else if (typeFlag == 0x1000) {
_characters[charNum].flags |= 0x1000;
- setCharacterUpdateEvent(charNum, 7, 120, 1);
+ setCharacterUpdateEvent(charNum, 7, 120, 1);
r = 1;
}
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 14f9a59e58..79c7ead338 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -339,7 +339,7 @@ private:
int getCharSelection();
int selectionCharAccept();
-
+
void showStarcraftLogo();
int _charSelection;
@@ -615,7 +615,7 @@ private:
int olol_getGlobalVar(EMCState *script);
int olol_setGlobalVar(EMCState *script);
int olol_triggerDoorSwitch(EMCState *script);
- int olol_checkEquippedItemScriptFlags(EMCState *script);
+ int olol_checkEquippedItemScriptFlags(EMCState *script);
int olol_setDoorState(EMCState *script);
int olol_updateBlockAnimations(EMCState *script);
int olol_mapShapeToBlock(EMCState *script);
@@ -701,7 +701,7 @@ private:
int olol_prepareSpecialScene(EMCState *script);
int olol_restoreAfterSpecialScene(EMCState *script);
int olol_assignCustomSfx(EMCState *script);
- int olol_checkBlockForMonster(EMCState *script);
+ int olol_checkBlockForMonster(EMCState *script);
int olol_transformRegion(EMCState *script);
int olol_calcCoordinatesAddDirectionOffset(EMCState *script);
int olol_resetPortraitsAndDisableSysTimer(EMCState *script);
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index 217432ba09..11e18d0f31 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -53,7 +53,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
_screen->updateScreen();
Common::SeekableSubReadStreamEndian in(saveFile, saveFile->pos(), saveFile->size(), !header.originalSave, true);
-
+
for (int i = 0; i < 4; i++) {
LoLCharacter *c = &_characters[i];
c->flags = in.readUint16BE();
@@ -148,7 +148,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
t->destDirection = in.readByte();
t->hitOffsX = in.readSByte();
t->hitOffsY = in.readSByte();
- t->currentSubFrame = in.readByte();
+ t->currentSubFrame = in.readByte();
}
for (int i = 0; i < 1024; i++) {
@@ -228,7 +228,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
m->flags = in.readByte();
m->wallFlags = in.readByte();
}
- l->monsterDifficulty = in.readByte();
+ l->monsterDifficulty = in.readByte();
}
calcCharPortraitXpos();
@@ -345,7 +345,7 @@ Common::Error LoLEngine::saveGameState(int slot, const char *saveName, const Gra
out->writeUint16BE(t->y);
out->writeSByte(t->level);
out->writeUint16BE(t->itemPropertyIndex);
- out->writeUint16BE(t->shpCurFrame_flg);
+ out->writeUint16BE(t->shpCurFrame_flg);
out->writeByte(t->destDirection);
out->writeSByte(t->hitOffsX);
out->writeSByte(t->hitOffsY);
@@ -363,7 +363,7 @@ Common::Error LoLEngine::saveGameState(int slot, const char *saveName, const Gra
out->write(l->flags, 1024);
for (int ii = 0; ii < 30; ii++) {
- MonsterInPlay *m = &l->monsters[ii];
+ MonsterInPlay *m = &l->monsters[ii];
out->writeUint16BE(m->nextAssignedObject);
out->writeUint16BE(m->nextDrawObject);
out->writeByte(m->flyingHeight);
@@ -372,7 +372,7 @@ Common::Error LoLEngine::saveGameState(int slot, const char *saveName, const Gra
out->writeUint16BE(m->y);
out->writeSByte(m->shiftStep);
out->writeUint16BE(m->destX);
- out->writeUint16BE(m->destY);
+ out->writeUint16BE(m->destY);
out->writeByte(m->destDirection);
out->writeSByte(m->hitOffsX);
out->writeSByte(m->hitOffsY);
@@ -403,13 +403,13 @@ Common::Error LoLEngine::saveGameState(int slot, const char *saveName, const Gra
out->writeUint16BE(m->x);
out->writeUint16BE(m->y);
out->writeByte(m->flyingHeight);
- out->writeByte(m->direction);
+ out->writeByte(m->direction);
out->writeByte(m->distance);
out->writeSByte(m->field_D);
out->writeByte(m->c);
out->writeByte(m->flags);
out->writeByte(m->wallFlags);
- }
+ }
out->writeByte(l->monsterDifficulty);
}
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 79da4a994d..dcdecb15e8 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -1243,7 +1243,7 @@ void LoLEngine::pitDropScroll(int numSteps) {
del = _tickLength - (_system->getMillis() - ctime);
if (del > 0)
delay(del, false, true);
- }
+ }
_screen->copyRegionSpecial(2, 320, 200, 112, 0, 0, 320, 200, 112, 0, 176, 120, 0);
_screen->updateScreen();
@@ -1257,7 +1257,7 @@ void LoLEngine::pitDropScroll(int numSteps) {
void LoLEngine::shakeScene(int duration, int width, int height, int restore) {
_screen->copyRegion(112, 0, 112, 0, 176, 120, 0, 6, Screen::CR_NO_P_CHECK);
uint32 endTime = _system->getMillis() + duration * _tickLength;
-
+
while (endTime > _system->getMillis()) {
_smoothScrollTimer = _system->getMillis() + 2 * _tickLength;
@@ -1287,7 +1287,7 @@ void LoLEngine::shakeScene(int duration, int width, int height, int restore) {
_screen->copyRegion(x1, y1, x2, y2, w, h, 6, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
-
+
delayUntil(_smoothScrollTimer);
}
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index aec1da0460..410c186a86 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -73,7 +73,7 @@ bool Screen::init() {
_useOverlays = false;
_useSJIS = false;
_use16ColorMode = _vm->gameFlags().use16ColorMode;
-
+
_sjisTempPage = _sjisFontData = 0;
if (_vm->gameFlags().useHiResOverlay) {
@@ -419,12 +419,12 @@ void Screen::getFadeParams(const uint8 *palette, int delay, int &delayInc, int &
int Screen::fadePalStep(const uint8 *palette, int diff) {
const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : (_use16ColorMode ? 16 : 256)) * 3;
-
+
uint8 fadePal[768];
memcpy(fadePal, _screenPalette, colors);
bool needRefresh = false;
-
+
for (int i = 0; i < colors; ++i) {
int c1 = palette[i];
int c2 = fadePal[i];
@@ -1227,7 +1227,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
&Screen::drawShapePlotType37, // used by LoL (monsters)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
&Screen::drawShapePlotType48, // used by LoL (slime spots on the floor)
- 0, 0, 0,
+ 0, 0, 0,
&Screen::drawShapePlotType52, // used by LoL (projectiles)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0
@@ -1823,7 +1823,7 @@ void Screen::drawShapePlotType33(uint8 *dst, uint8 cmd) {
void Screen::drawShapePlotType37(uint8 *dst, uint8 cmd) {
cmd = _dsTable2[cmd];
-
+
if (cmd == 255) {
cmd = _dsTable5[*dst];
} else {
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index d8f7a8abef..edc95fd36a 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -41,7 +41,7 @@ Screen_LoL::Screen_LoL(LoLEngine *vm, OSystem *system) : Screen_v2(vm, system),
for (int i = 0; i < 8; i++)
_levelOverlays[i] = new uint8[256];
-
+
_fadeFlag = 2;
_curDimIndex = 0;
@@ -207,7 +207,7 @@ uint8 *Screen_LoL::generateLevelOverlay(const uint8 *srcPal, uint8 *ovl, int opC
if (c <= m) {
m = c;
l = x;
- }
+ }
}
x++;
} while (--ii);
@@ -215,7 +215,7 @@ uint8 *Screen_LoL::generateLevelOverlay(const uint8 *srcPal, uint8 *ovl, int opC
*d++ = l & 0xff;
}
- return ovl;
+ return ovl;
}
void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
@@ -227,7 +227,7 @@ void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
if (x <= 0)
return;
w = x;
- x = 0;
+ x = 0;
}
int tmp = x + w;
@@ -242,7 +242,7 @@ void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
if (y <= 0)
return;
h = y;
- y = 0;
+ y = 0;
}
tmp = y + h;
@@ -256,7 +256,7 @@ void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
w >>= 1;
int w2 = w;
-
+
while (h--) {
if (w) {
while (w--) {
@@ -281,7 +281,7 @@ void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
void Screen_LoL::fadeClearSceneWindow(int delay) {
if (_fadeFlag == 1)
return;
-
+
uint8 *tpal = new uint8[768];
memcpy(tpal, _currentPalette, 768);
@@ -423,7 +423,7 @@ void Screen_LoL::smoothScrollHorizontalStep(int pageNum, int srcX, int dstX, int
for (int i = 0; i < w; i++)
*s++ = *d++;
-
+
s += pitchS;
d += pitchD;
}
@@ -527,7 +527,7 @@ void Screen_LoL::smoothScrollTurnStep3(int srcPage1Num, int srcPage2Num, int dst
void Screen_LoL::copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, int page2, int w2, int h2, int x2, int y2, int w3, int h3, int mode, ...) {
if (!w3 || !h3)
return;
-
+
uint8 *table1 = 0;
uint8 *table2 = 0;
@@ -552,7 +552,7 @@ void Screen_LoL::copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, in
int ibh_1 = _internBlockHeight;
int dx_1 = _internDimDstX;
int dy_1 = _internDimDstY;
-
+
_internDimX = _internDimY = 0;
_internDimW = w2;
_internDimH = h2;
@@ -560,7 +560,7 @@ void Screen_LoL::copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, in
calcBoundariesIntern(x2, y2, ibw_1, ibh_1);
if (_internBlockWidth == -1)
return;
-
+
int iu5_2 = _internDimU5;
int iu6_2 = _internDimU6;
int ibw_2 = _internBlockWidth;
@@ -583,7 +583,7 @@ void Screen_LoL::copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, in
s++;
d++;
}
-
+
for (int ii = (i & 1) ^ 1; ii < ibw_2; ii += 2 ) {
*d = *s;
d += 2;
@@ -598,7 +598,7 @@ void Screen_LoL::copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, in
cmd = table2[(offs << 8) | *d];
*d++ = cmd;
}
-
+
} else if (mode == 3) {
s = s - iu5_2 + ibw_1;
s = s - iu5_2 - 1;
@@ -753,7 +753,7 @@ void Screen_LoL::fadeToPalette1(int delay) {
}
void Screen_LoL::loadSpecialColors(uint8 *destPalette) {
- memcpy(destPalette + 0x240, _screenPalette + 0x240, 12);
+ memcpy(destPalette + 0x240, _screenPalette + 0x240, 12);
}
void Screen_LoL::copyColor(int dstColorIndex, int srcColorIndex) {
@@ -817,7 +817,7 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT
bool Screen_LoL::fadePalSpecial(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime) {
uint8 tpal[768];
- uint8 *p1 = _palettes[1];
+ uint8 *p1 = _palettes[1];
bool res = false;
for (int i = 0; i < 768; i++) {
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 8bb2c16dcd..b17d17685d 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -136,12 +136,12 @@ int LoLEngine::olol_moveParty(EMCState *script) {
int mode = stackPos(0);
if (mode > 5 && mode < 10)
mode = (mode - 6 - _currentDirection) & 3;
-
+
Button b;
memset(&b, 0, sizeof(Button));
b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
-
+
switch (mode) {
case 0:
clickedUpArrow(&b);
@@ -1058,7 +1058,7 @@ int LoLEngine::olol_createHandItem(EMCState *script) {
int LoLEngine::olol_playAttackSound(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_playAttackSound(%p) (%d)", (const void *)script, stackPos(0));
-
+
static const uint8 sounds[] = { 12, 62, 63 };
int d = stackPos(0);
@@ -1369,7 +1369,7 @@ int LoLEngine::olol_countAllMonsters(EMCState *script){
for (int i = 0; i < 30; i++) {
if (_monsters[i].hitPoints > 0 && _monsters[i].mode != 13)
- res++;
+ res++;
}
return res;
@@ -1398,7 +1398,7 @@ int LoLEngine::olol_calcInflictableDamage(EMCState *script) {
int LoLEngine::olol_getInflictedDamage(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_getInflictedDamage(%p) (%d)", (const void *)script, stackPos(0));
- int mx = stackPos(0);
+ int mx = stackPos(0);
return mx ? _rnd.getRandomNumberRng(2, mx) : 0;
}
@@ -1439,13 +1439,13 @@ int LoLEngine::olol_calcInflictableDamagePerItem(EMCState *script) {
int LoLEngine::olol_distanceAttack(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_distanceAttack(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8));
-
+
uint16 fX = stackPos(3);
uint16 fY = stackPos(4);
if (!(stackPos(8) & 0x8000))
fX = fY = 0x80;
-
+
uint16 x = 0;
uint16 y = 0;
calcCoordinates(x, y, stackPos(2), fX, fY);
@@ -1580,7 +1580,7 @@ int LoLEngine::olol_triggerEventOnMouseButtonClick(EMCState *script) {
removeInputTop();
if (f == 0 || (f & 0x800))
return 0;
-
+
int evt = stackPos(0);
if (evt) {
gui_triggerEvent(evt);
@@ -1588,7 +1588,7 @@ int LoLEngine::olol_triggerEventOnMouseButtonClick(EMCState *script) {
} else {
removeInputTop();
}
-
+
return 1;
}
@@ -1616,7 +1616,7 @@ int LoLEngine::olol_countSpecificMonsters(EMCState *script) {
for (int i = 0; i < 30; i++) {
if (((1 << _monsters[i].type) & types) && _monsters[i].mode < 14)
- res++;
+ res++;
}
return res;
@@ -1704,7 +1704,7 @@ int LoLEngine::olol_getItemOnPos(EMCState *script) {
return _emcLastItem;
}
-
+
return 0;
}
@@ -1786,7 +1786,7 @@ int LoLEngine::olol_checkBlockForMonster(EMCState *script) {
uint16 o = _levelBlockProperties[block].assignedObjects;
while (o & 0x8000) {
if (id == 0xffff || id == o)
- return o & 0x7fff;
+ return o & 0x7fff;
o = findObject(o)->nextAssignedObject;
}
return -1;
@@ -1830,7 +1830,7 @@ int LoLEngine::olol_getNextActiveCharacter(EMCState *script) {
_scriptCharacterCycle = 0;
else
_scriptCharacterCycle++;
-
+
while (_scriptCharacterCycle < 4) {
if (_characters[_scriptCharacterCycle].flags & 1)
return _scriptCharacterCycle;
@@ -1850,7 +1850,7 @@ int LoLEngine::olol_drawCharPortrait(EMCState *script) {
if (charNum == -1)
gui_drawAllCharPortraitsWithStats();
else
- gui_drawCharPortraitWithStats(charNum);
+ gui_drawCharPortraitWithStats(charNum);
return 1;
}
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 5c94da4ba8..95276f58dd 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -83,7 +83,7 @@ TIMInterpreter::TIMInterpreter(KyraEngine_v1 *engine, Screen_v2 *screen_v2, OSys
COMMAND(cmd_return(1)),
COMMAND(cmd_return(1)),
COMMAND(cmd_return(n1))
- };
+ };
#undef cmd_return
#undef COMMAND_UNIMPL
#undef COMMAND
@@ -113,7 +113,7 @@ TIMInterpreter::~TIMInterpreter() {
delete[] _animations[i].parts;
}
- delete[] _animations;
+ delete[] _animations;
}
TIM *TIMInterpreter::load(const char *filename, const Common::Array<const TIMOpcode *> *opcodes) {
@@ -126,7 +126,7 @@ TIM *TIMInterpreter::load(const char *filename, const Common::Array<const TIMOpc
IFFParser iff(*stream);
Common::IFFChunk *chunk = 0;
-
+
TIM *tim = new TIM;
assert(tim);
memset(tim, 0, sizeof(TIM));
@@ -217,7 +217,7 @@ int TIMInterpreter::exec(TIM *tim, bool loop) {
update();
checkSpeechProgress();
- bool running = true;
+ bool running = true;
int cnt = 0;
while (cur.ip && cur.nextTime <= _system->getMillis() && running) {
if (cnt++ > 0) {
@@ -460,7 +460,7 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char
screen()->checkedPageUpdate(8, 4);
screen()->updateScreen();
}
-
+
if (wsaFlags & 4) {
snprintf(file, 32, "%s.CPS", filename);
@@ -840,7 +840,7 @@ TIMInterpreter_LoL::TIMInterpreter_LoL(LoLEngine *engine, Screen_v2 *screen_v2,
_animations[i].parts = new AnimPart[TIM::kAnimParts];
memset(_animations[i].parts, 0, TIM::kAnimParts * sizeof(AnimPart));
}
-
+
_drawPage2 = 0;
memset(_dialogueButtonString, 0, 3 * sizeof(const char*));
@@ -948,8 +948,8 @@ void TIMInterpreter_LoL::drawDialogueBox(int numStr, const char *s1, const char
if (numStr == 1) {
_dialogueButtonXoffs = 0;
- _dialogueButtonPosX = d->sx + d->w - 77;
- } else {
+ _dialogueButtonPosX = d->sx + d->w - 77;
+ } else {
_dialogueButtonXoffs = d->w / numStr;
_dialogueButtonPosX = d->sx + (_dialogueButtonXoffs >> 1) - 37;
}
@@ -1049,7 +1049,7 @@ void TIMInterpreter_LoL::updateBackgroundAnimation(int animIndex) {
void TIMInterpreter_LoL::playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay) {
Animation *anim = &_animations[animIndex];
-
+
int step = (lastFrame >= firstFrame) ? 1 : -1;
for (int i = firstFrame; i != (lastFrame + step) ; i += step) {
uint32 next = _system->getMillis() + delay * _vm->_tickLength;
@@ -1098,10 +1098,10 @@ uint16 TIMInterpreter_LoL::processDialogue() {
if (_dialogueNumButtons == 0) {
int e = _vm->checkInput(0, false) & 0xFF;
_vm->removeInputTop();
-
+
if (e) {
_vm->gui_notifyButtonListChanged();
-
+
if (e == 43 || e == 61) {
_vm->snd_stopSpeech(true);
//_dlgTimer = 0;
@@ -1146,7 +1146,7 @@ uint16 TIMInterpreter_LoL::processDialogue() {
case 200:
case 202:
x = _dialogueButtonPosX;
-
+
for (int i = 0; i < _dialogueNumButtons; i++) {
if (_vm->posWithinRect(_vm->_mouseX, _vm->_mouseY, x, _dialogueButtonPosY, x + 74, _dialogueButtonPosY + 9)) {
_dialogueHighlightedButton = i;
@@ -1165,7 +1165,7 @@ uint16 TIMInterpreter_LoL::processDialogue() {
if (df != _dialogueHighlightedButton)
drawDialogueButtons();
-
+
if (res == 0)
return 0;
@@ -1213,7 +1213,7 @@ void TIMInterpreter_LoL::checkSpeechProgress() {
}
}
}
-
+
char *TIMInterpreter_LoL::getTableString(int id) {
return _vm->getLangString(id);
}
@@ -1283,7 +1283,7 @@ int TIMInterpreter_LoL::cmd_processDialogue(const uint16 *param) {
_animations[5].wsa = 0;
if (_currentTim->procParam)
- advanceToOpcode(21);
+ advanceToOpcode(21);
return res;
}
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index e2275908c2..c198915e83 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -140,7 +140,7 @@ public:
virtual uint16 processDialogue() { return 1; }
virtual void setupBackgroundAnimationPart(int animIndex, int part, int firstFrame, int lastFrame, int cycles, int nextPart, int partDelay, int f, int sfxIndex, int sfxFrame) {}
- virtual void startBackgroundAnimation(int animIndex, int part) {}
+ virtual void startBackgroundAnimation(int animIndex, int part) {}
virtual void stopBackgroundAnimation(int animIndex) {}
virtual void updateBackgroundAnimation(int animIndex) {}
virtual void playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay) {}
@@ -155,7 +155,7 @@ public:
protected:
virtual KyraEngine_v1 *vm();
virtual Screen_v2 *screen();
-
+
KyraEngine_v1 *_vm;
Screen_v2 *_screen;
OSystem *_system;
@@ -228,7 +228,7 @@ public:
Animation *initAnimStruct(int index, const char *filename, int x, int y, int frameDelay, int, uint16 wsaCopyParams);
int freeAnimStruct(int index);
-
+
void drawDialogueBox(int numStr, const char *s1, const char *s2, const char *s3);
uint16 processDialogue();
void resetDialogueState(TIM *tim);
@@ -237,15 +237,15 @@ public:
void startBackgroundAnimation(int animIndex, int part);
void stopBackgroundAnimation(int animIndex);
void updateBackgroundAnimation(int animIndex);
- void playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay);
-
+ void playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay);
+
private:
KyraEngine_v1 *vm();
Screen_v2 *screen();
void update();
void checkSpeechProgress();
-
+
char *getTableString(int id);
void advanceToOpcode(int opcode);
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index fd69a440dc..a17579ee7c 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -2478,7 +2478,7 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i
curframe = firstframe;
_seqWsaChatFrameTimeout = _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
- if (wsa)
+ if (wsa)
wsa->displayFrame(curframe % wsa->frames(), 2, wsaXpos, wsaYpos, 0);
_screen->copyPage(2, 12);
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 846bc26def..5df84958b4 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -170,7 +170,7 @@ void LoLEngine::setupPrologueData(bool load) {
memset(_screen->getPalette(1), 0, 768);
_sound->setSoundList(&_soundData[kMusicIntro]);
-
+
// We have three sound.dat files, one for the intro, one for the
// end sequence and one for ingame, each contained in a different
// PAK file. Therefore a new call to loadSoundFile() is required
@@ -182,7 +182,7 @@ void LoLEngine::setupPrologueData(bool load) {
_sound->loadSoundFile("LOREINTR");
} else {
delete _chargenWSA; _chargenWSA = 0;
-
+
uint8 *pal = _screen->getPalette(0);
memset(pal, 0, 768);
_screen->setScreenPalette(pal);
@@ -667,7 +667,7 @@ void LoLEngine::showStarcraftLogo() {
_sound->voicePlay("star2");
while(_sound->voiceIsPlaying("star2") && !(shouldQuit() || inputFlag)) {
inputFlag = checkInput(0) & 0xff;
- delay(_tickLength);
+ delay(_tickLength);
}
}
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 1cf2d04840..5b32b69e19 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -149,10 +149,10 @@ uint32 Sound::voicePlayFromList(Common::List<const char*> fileList) {
out->queueBuffer(vocBuffer, size);
totalPlayTime += size;
}
-
+
totalPlayTime = (totalPlayTime * 1000) / 22050;
out->finish();
-
+
_soundChannels[h].file = *fileList.begin();
_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_soundChannels[h].channelHandle, out);
return totalPlayTime;
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 5834a72c63..f96e37b94f 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -2720,7 +2720,7 @@ void TownsPC98_OpnSquareSineSource::nextTick(int32 *buffer, uint32 bufferSize) {
finOut += _tlTable[_channels[ii].out ? (_channels[ii].vol & 0x0f) : 0];
}
- finOut /= 3;
+ finOut /= 3;
buffer[i << 1] += finOut;
buffer[(i << 1) + 1] += finOut;
}
@@ -4140,7 +4140,7 @@ SoundTownsPC98_v2::~SoundTownsPC98_v2() {
bool SoundTownsPC98_v2::init() {
_driver = new TownsPC98_OpnDriver(_mixer, _vm->gameFlags().platform == Common::kPlatformPC98 ?
TownsPC98_OpnDriver::OD_TYPE86 : TownsPC98_OpnDriver::OD_TOWNS);
-
+
if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
_vm->checkCD();
// FIXME: While checking for 'track1.XXX(X)' looks like
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index dfe2323e32..7b66907733 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -80,7 +80,7 @@ void LoLEngine::loadMonsterShapes(const char *file, int monsterIndex, int animTy
uint8 *tmpPal2 = new uint8[256];
uint16 *tmpPal3 = new uint16[256];
memset (tmpPal1, 0, 64);
- memset (tmpPal2, 0, 256);
+ memset (tmpPal2, 0, 256);
for (int i = 0; i < 64; i++) {
tmpPal1[i] = *p;
@@ -342,7 +342,7 @@ void LoLEngine::removeAssignedObjectFromBlock(LevelBlockProperty *l, int id) {
i->nextAssignedObject = 0;
return;
}
-
+
i = findObject(*blockItemIndex);
blockItemIndex = &i->nextAssignedObject;
}
@@ -356,7 +356,7 @@ void LoLEngine::removeDrawObjectFromBlock(LevelBlockProperty *l, int id) {
if (*blockItemIndex == id) {
i = findObject(id);
*blockItemIndex = i->nextDrawObject;
- i->nextDrawObject = 0;
+ i->nextDrawObject = 0;
return;
}
@@ -605,10 +605,10 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
}
if (shp)
- fy += (shp[2] >> 2);
+ fy += (shp[2] >> 2);
} else {
- shp = (_itemProperties[i->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[i->itemPropertyIndex].shpIndex] :
+ shp = (_itemProperties[i->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[i->itemPropertyIndex].shpIndex] :
_itemShapes[_gameShapeMap[_itemProperties[i->itemPropertyIndex].shpIndex << 1]];
}
@@ -625,7 +625,7 @@ void LoLEngine::drawMonster(uint16 id) {
int curFrm = getMonsterCurFrame(m, flg & 0xffef);
uint8 *shp = 0;
- if (curFrm == -1) {
+ if (curFrm == -1) {
shp = _monsterShapes[m->properties->shapeIndex << 4];
calcDrawingLayerParameters(m->x + _monsterShiftOffs[m->shiftStep << 1], m->y + _monsterShiftOffs[(m->shiftStep << 1) + 1], _shpDmX, _shpDmY, _dmScaleW, _dmScaleH, shp, 0);
} else {
@@ -741,7 +741,7 @@ int LoLEngine::getMonsterCurFrame(MonsterInPlay *m, uint16 dirFlags) {
default:
return tmp;
}
-
+
break;
case 2:
///////
@@ -801,7 +801,7 @@ void LoLEngine::redrawSceneItem() {
setLevelShapesDim(tile, x1, x2, 13);
uint16 s = _visibleBlocks[tile]->drawObjects;
- int t = (i << 7) + 1;
+ int t = (i << 7) + 1;
while (s) {
if (s & 0x8000) {
s = _monsters[s & 0x7fff].nextDrawObject;
@@ -815,7 +815,7 @@ void LoLEngine::redrawSceneItem() {
if (item->flyingHeight > 1)
fy -= ((item->flyingHeight - 1) * 6);
- uint8 *shp = (_itemProperties[item->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[item->itemPropertyIndex].shpIndex] :
+ uint8 *shp = (_itemProperties[item->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[item->itemPropertyIndex].shpIndex] :
_itemShapes[_gameShapeMap[_itemProperties[item->itemPropertyIndex].shpIndex << 1]];
drawItemOrMonster(shp, 0, item->x, item->y, fx, fy, 0, t, 0);
@@ -1052,7 +1052,7 @@ void LoLEngine::updateMonster(MonsterInPlay *monster) {
f &= 6;
}
}
-
+
if ((f & 1) && (monster->flags & 0x10))
setMonsterMode(monster, 7);
@@ -1081,7 +1081,7 @@ void LoLEngine::updateMonster(MonsterInPlay *monster) {
moveMonster(monster);
break;
- case 3:
+ case 3:
if (updateMonsterAdjustBlocks(monster))
setMonsterMode(monster, 7);
for (int i = 0; i < 4; i++) {
@@ -1233,7 +1233,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(MonsterInPlay *monster) {
} else {
s = monster->curDistWeapon++;
if (monster->curDistWeapon == monster->properties->numDistWeapons)
- monster->curDistWeapon = 0;
+ monster->curDistWeapon = 0;
}
int flyingObject = monster->properties->distWeapons[s];
@@ -1273,7 +1273,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(MonsterInPlay *monster) {
if (getMonsterDistance(monster->block, _monsters[i].block) < 7)
setMonsterMode(monster, 7);
}
- _txt->printMessage(2, getLangString(0x401a));
+ _txt->printMessage(2, getLangString(0x401a));
} else if (flyingObject == 4) {
launchMagicViper();
@@ -1296,7 +1296,7 @@ void LoLEngine::chasePartyWithCloseAttacks(MonsterInPlay *monster) {
int dir = calcMonsterDirection(monster->x & 0xff00, monster->y & 0xff00, _partyPosX & 0xff00, _partyPosY & 0xff00);
int x1 = _partyPosX;
int y1 = _partyPosY;
-
+
calcSpriteRelPosition(monster->x, monster->y, x1, y1, dir >> 1);
int t = (x1 < 0) ? -x1 : x1;
@@ -1313,7 +1313,7 @@ void LoLEngine::chasePartyWithCloseAttacks(MonsterInPlay *monster) {
inflictDamage(dst, dmg, m, 0, 0);
applyMonsterAttackSkill(monster, dst, dmg);
}
-
+
setMonsterMode(monster, 8);
checkSceneUpdateNeed(monster->block);
@@ -1321,7 +1321,7 @@ void LoLEngine::chasePartyWithCloseAttacks(MonsterInPlay *monster) {
setMonsterDirection(monster, dir);
checkSceneUpdateNeed(monster->block);
}
- return;
+ return;
}
}
@@ -1460,12 +1460,12 @@ void LoLEngine::rearrangeAttackingMonster(MonsterInPlay *monster) {
uint16 my = monster->y;
uint16 *c = (t & 1) ? &my : &mx;
bool centered = (*c & 0x7f) ? false : true;
-
+
bool posFlag = true;
if (monster->properties->maxWidth <= 63) {
if (centered) {
bool r = false;
-
+
if (monster->nextAssignedObject & 0x8000) {
r = true;
} else {
@@ -1474,7 +1474,7 @@ void LoLEngine::rearrangeAttackingMonster(MonsterInPlay *monster) {
if (id != monster->id) {
r = true;
- } else {
+ } else {
for (int i = 0; i < 3; i++) {
t = (t + 1) & 3;
id = _levelBlockProperties[calcNewBlockPosition(monster->block, t)].assignedObjects;
@@ -1494,7 +1494,7 @@ void LoLEngine::rearrangeAttackingMonster(MonsterInPlay *monster) {
if (centered && posFlag)
return;
-
+
if (posFlag) {
if (*c & 0x80)
*c -= 32;
@@ -1506,10 +1506,10 @@ void LoLEngine::rearrangeAttackingMonster(MonsterInPlay *monster) {
else
*c -= 32;
}
-
+
if (walkMonsterCheckDest(mx, my, monster, 4))
return;
-
+
int fx = _partyPosX;
int fy = _partyPosY;
calcSpriteRelPosition(mx, my, fx, fy, monster->direction >> 1);
@@ -1524,11 +1524,11 @@ void LoLEngine::rearrangeAttackingMonster(MonsterInPlay *monster) {
void LoLEngine::moveStrayingMonster(MonsterInPlay *monster) {
int x = 0;
int y = 0;
-
+
if (monster->fightCurTick) {
uint8 d = (monster->direction - monster->fightCurTick) & 6;
uint8 id = monster->id;
-
+
for (int i = 0; i < 7; i++) {
getNextStepCoords(monster->x, monster->y, x, y, d);
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index 1afe84961a..38b6078298 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -35,7 +35,7 @@ namespace Kyra {
TextDisplayer_LoL::TextDisplayer_LoL(LoLEngine *vm, Screen_LoL *screen) : _vm(vm), _screen(screen),
_scriptParameter(0), _animWidth(0), _animColor1(0), _animColor2(0), _animFlag(true), _lineCount(0),
_printFlag(false), _lineWidth(0), _numCharsTotal(0), _numCharsLeft(0), _numCharsPrinted(0) {
-
+
memset(_stringParameters, 0, 15 * sizeof(char*));
_buffer = new char[600];
memset(_buffer, 0, 600);
@@ -160,8 +160,8 @@ void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script,
int oldDim = 0;
if (dim == 3) {
- if (_vm->_updateFlags & 2) {
- oldDim = clearDim(4);
+ if (_vm->_updateFlags & 2) {
+ oldDim = clearDim(4);
_textDimData[4].color1 = 254;
_textDimData[4].color2 = _screen->_curDim->unkA;
} else {
@@ -175,7 +175,7 @@ void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script,
}
} else {
oldDim = _screen->curDimIndex();
- _screen->setScreenDim(dim);
+ _screen->setScreenDim(dim);
_textDimData[dim].color1 = 254;
_textDimData[dim].color2 = _screen->_curDim->unkA;
}
@@ -222,7 +222,7 @@ void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
vsnprintf((char*) _buffer, 240, str, args);
va_end(args);
-
+
displayText(_buffer);
_screen->setScreenDim(od);
@@ -311,7 +311,7 @@ void TextDisplayer_LoL::preprocessString(char *str, EMCState *script, const uint
case 'n':
strcpy(dst, _vm->_characters[script ? script->stack[script->sp + paramIndex] : paramList[paramIndex]].name);
- dst += strlen(dst);
+ dst += strlen(dst);
break;
case 's':
@@ -328,7 +328,7 @@ void TextDisplayer_LoL::preprocessString(char *str, EMCState *script, const uint
break;
case '\0':
- default:
+ default:
continue;
}
}
@@ -337,20 +337,20 @@ void TextDisplayer_LoL::preprocessString(char *str, EMCState *script, const uint
void TextDisplayer_LoL::displayText(char *str, ...) {
_printFlag = false;
-
+
_lineWidth = 0;
_numCharsLeft = 0;
_numCharsPrinted = 0;
_tempString1 = str;
_tempString2 = 0;
-
+
_currentLine[0] = 0;
memset(_ctrl, 0, 3);
char c = parseCommand();
-
+
va_list args;
va_start(args, str);
@@ -369,7 +369,7 @@ void TextDisplayer_LoL::displayText(char *str, ...) {
} else {
break;
}
-
+
_ctrl[0] = _ctrl[2];
_ctrl[2] = _ctrl[1] = 0;
c = parseCommand();
@@ -434,9 +434,9 @@ void TextDisplayer_LoL::displayText(char *str, ...) {
if ((_textDimData[sdx].column + _lineWidth) > (sd->w << 3))
printLine(_currentLine);
-
+
break;
- }
+ }
c = parseCommand();
}
@@ -490,21 +490,21 @@ void TextDisplayer_LoL::printLine(char *str) {
int fh = (_screen->getFontHeight() + _screen->_charOffset);
int lines = (sd->h - _screen->_charOffset) / fh;
-
+
while (_textDimData[sdx].line >= lines) {
if (lines <= _lineCount && _animFlag) {
_lineCount = 0;
textPageBreak();
_numCharsPrinted = 0;
}
-
+
int h1 = ((sd->h / fh) - 1) * fh;
int h2 = sd->h - fh;
if (h2)
_screen->copyRegion(sd->sx << 3, sd->sy + fh, sd->sx << 3, sd->sy, sd->w << 3, h2, _screen->_curPage, _screen->_curPage, Screen::CR_NO_P_CHECK);
- _screen->fillRect(sd->sx << 3, sd->sy + h1, (sd->sx + sd->w - 1) << 3, sd->sy + sd->h - 1, _textDimData[sdx].color2);
+ _screen->fillRect(sd->sx << 3, sd->sy + h1, (sd->sx + sd->w - 1) << 3, sd->sy + sd->h - 1, _textDimData[sdx].color2);
if (_textDimData[sdx].line)
_textDimData[sdx].line--;
}
@@ -529,10 +529,10 @@ void TextDisplayer_LoL::printLine(char *str) {
//cut off line after last space
c = str[n1];
lw -= _screen->getCharWidth(c);
-
+
if (!n2 && lw <= w)
n2 = n1;
-
+
if (n2 && c == ' ') {
s = n1;
_printFlag = false;
@@ -554,11 +554,11 @@ void TextDisplayer_LoL::printLine(char *str) {
c = str[s];
str[s] = 0;
-
+
_screen->printText(str, x1, y, _textDimData[sdx].color1, _textDimData[sdx].color2);
_textDimData[sdx].column += lw;
_numCharsPrinted += strlen(str);
-
+
str[s] = c;
if (c == ' ')
@@ -618,7 +618,7 @@ void TextDisplayer_LoL::textPageBreak() {
} else {
x += 6;
y = dim->sy + dim->h - 2;
- }
+ }
} else {
y = dim->sy + dim->h - 10;
}
@@ -638,7 +638,7 @@ void TextDisplayer_LoL::textPageBreak() {
while (!inputFlag) {
_vm->update();
-
+
if (_vm->_speechFlag) {
if (((_vm->_system->getMillis() > speechPartTime) || (_vm->snd_characterSpeaking() != 2)) && speechPartTime) {
loop = false;
diff --git a/engines/kyra/text_lol.h b/engines/kyra/text_lol.h
index 157e5a5852..fc707843aa 100644
--- a/engines/kyra/text_lol.h
+++ b/engines/kyra/text_lol.h
@@ -42,7 +42,7 @@ public:
void setAnimParameters(const char *str, int x, uint8 col1, uint8 col2);
void setAnimFlag(bool flag) { _animFlag = flag; }
-
+
void setupField(bool mode);
void expandField();
@@ -51,7 +51,7 @@ public:
void printDialogueText(int dim, char *str, EMCState *script, const uint16 *paramList, int16 paramIndex);
void printMessage(uint16 type, const char *str, ...);
-
+
int16 _scriptParameter;
private:
@@ -60,7 +60,7 @@ private:
void readNextPara();
void printLine(char *str);
void preprocessString(char *str, EMCState *script, const uint16 *paramList, int16 paramIndex);
- void textPageBreak();
+ void textPageBreak();
void clearCurDim();
@@ -79,7 +79,7 @@ private:
uint32 _numCharsTotal;
uint32 _numCharsLeft;
uint32 _numCharsPrinted;
-
+
const char *_animString;
int16 _animWidth;
uint8 _animColor1;
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index d97ed73379..18e25a3e08 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -200,12 +200,12 @@ uint32 TimerManager::getNextRun(uint8 id) const {
void TimerManager::pauseSingleTimer(uint8 id, bool p) {
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
-
+
if (timer == _timers.end()) {
warning("TimerManager::pauseSingleTimer: No timer %d", id);
return;
}
-
+
if (p) {
timer->pauseStartTime = _system->getMillis();
timer->enabled |= 2;
@@ -216,7 +216,7 @@ void TimerManager::pauseSingleTimer(uint8 id, bool p) {
timer->nextRun += elapsedTime;
resetNextRun();
timer->pauseStartTime = 0;
- }
+ }
}
bool TimerManager::isEnabled(uint8 id) const {
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp
index e5fa3753b2..995213afd7 100644
--- a/engines/kyra/wsamovie.cpp
+++ b/engines/kyra/wsamovie.cpp
@@ -381,7 +381,7 @@ int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) {
if (palBuf)
_vm->screen()->loadPalette(wsaData + 8 + ((_numFrames << 2) & 0xFFFF), palBuf, 0x30);
}
-
+
_flags |= WF_XOR;
}