aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-02 00:07:11 +0000
committerJohannes Schickel2009-06-02 00:07:11 +0000
commitfae4192b37847e8a1f7e43b74fb679119f46c548 (patch)
tree57551b7c46320aad2842afcd97caca9bf4997742 /engines/kyra
parent762f63084955e63b40e2c248a05668fd8f805017 (diff)
downloadscummvm-rg350-fae4192b37847e8a1f7e43b74fb679119f46c548.tar.gz
scummvm-rg350-fae4192b37847e8a1f7e43b74fb679119f46c548.tar.bz2
scummvm-rg350-fae4192b37847e8a1f7e43b74fb679119f46c548.zip
Remove "_smoothScrollTimer" from LoLEngine, it was only used as local variable anyway.
svn-id: r41119
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/gui_lol.cpp4
-rw-r--r--engines/kyra/lol.cpp34
-rw-r--r--engines/kyra/lol.h1
-rw-r--r--engines/kyra/scene_lol.cpp60
4 files changed, 49 insertions, 50 deletions
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index f2b6c74d49..7a7de65e43 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -1375,12 +1375,12 @@ int LoLEngine::clickedInventorySlot(Button *button) {
KyraEngine_v1::snd_playSoundEffect(99);
for (int i = 0; i < 25; i++) {
- _smoothScrollTimer = _system->getMillis() + 7 * _tickLength;
+ uint32 delayTimer = _system->getMillis() + 7 * _tickLength;
_screen->copyRegion(button->x, button->y - 3, 0, 0, 25, 27, 2, 2);
wsa->displayFrame(i, 2, 0, 0, 0x4000);
_screen->copyRegion(0, 0, button->x, button->y - 3, 25, 27, 2, 0);
_screen->updateScreen();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
_screen->showMouse();
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 600252c164..3dfd2b2ceb 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1278,7 +1278,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
i += step;
- _smoothScrollTimer = _system->getMillis() + _tickLength;
+ uint32 delayTimer = _system->getMillis() + _tickLength;
gui_drawLiveMagicBar(barData[type][0] + _activeCharsXpos[charNum], 175, i, 0, pointsMax, 5, 32, barData[type][1], 1, barData[type][3]);
_screen->printText(getLangString(barData[type][4]), barData[type][0] + _activeCharsXpos[charNum], 144, barData[type][2], 0);
@@ -1289,7 +1289,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
step = -step;
}
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
}
@@ -1964,7 +1964,7 @@ void LoLEngine::processMagicSpark(int charNum, int spellLevel) {
}
for (int i = 0, d = ((spellLevel << 1) + 12); i < d; i++) {
- _smoothScrollTimer = _system->getMillis() + 4 * _tickLength;
+ uint32 delayTimer = _system->getMillis() + 4 * _tickLength;
_screen->copyPage(12, 2);
for (int ii = 0; ii <= spellLevel; ii++) {
@@ -1980,7 +1980,7 @@ void LoLEngine::processMagicSpark(int charNum, int spellLevel) {
}
if (i < d - 1)
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
mov->close();
@@ -2068,7 +2068,7 @@ void LoLEngine::processMagicHeal(int charNum, int spellLevel) {
snd_playSoundEffect(68, -1);
for (int i = 0; i < 16; i++) {
- _smoothScrollTimer = _system->getMillis() + 4 * _tickLength;
+ uint32 delayTimer = _system->getMillis() + 4 * _tickLength;
for (charNum = ch; charNum < n; charNum++) {
if (!(_characters[charNum].flags & 1))
@@ -2091,7 +2091,7 @@ void LoLEngine::processMagicHeal(int charNum, int spellLevel) {
_screen->updateScreen();
}
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
for (charNum = ch; charNum < n; charNum++) {
@@ -2541,12 +2541,12 @@ void LoLEngine::processMagicFog() {
snd_playSoundEffect(145, -1);
for (int curFrame = 0; curFrame < numFrames; curFrame++) {
- _smoothScrollTimer = _system->getMillis() + 3 * _tickLength;
+ uint32 delayTimer = _system->getMillis() + 3 * _tickLength;
_screen->copyPage(12, 2);
mov->displayFrame(curFrame % numFrames, 2, 112, 0, 0x5000, _trueLightTable1, _trueLightTable2);
_screen->copyRegion(112, 0, 112, 0, 176, 120, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
mov->close();
@@ -2700,7 +2700,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
_screen->copyPage(3, 10);
for (int i = 0; i < 9; i++) {
int h = (slot + 1) * 9 + i + 1;
- _smoothScrollTimer = _system->getMillis() + _tickLength;
+ uint32 delayTimer = _system->getMillis() + _tickLength;
_screen->copyPage(10, 3);
_screen->copyRegion(216, 0, 8, 0, 96, 120, 3, 3, Screen::CR_NO_P_CHECK);
_screen->copyRegion(112, 0, 12, 0, 87, 15, 2, 2, Screen::CR_NO_P_CHECK);
@@ -2723,7 +2723,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
_screen->copyRegion(8, 0, 8, 0, 96, 120, 3, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
}
@@ -2749,7 +2749,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
playSpellAnimation(mov, 26, 52, 5, _activeCharsXpos[charNum], 148, 0, 0, 0, 0, true);
for (int i = 16; i > 0; i--) {
- _smoothScrollTimer = _system->getMillis() + _tickLength;
+ uint32 delayTimer = _system->getMillis() + _tickLength;
_screen->copyPage(12, 2);
int wsaX = vX + (((((cX - vX) << 8) / 16) * i) >> 8) - 16;
@@ -2760,7 +2760,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
_screen->copyRegion(wsaX, wsaY, wsaX, wsaY, mov->width() + 48, mov->height() + 48, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
mov->close();
@@ -2817,7 +2817,7 @@ void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFra
bool fin = false;
while (!fin) {
- _smoothScrollTimer = _system->getMillis() + _tickLength * frameDelay;
+ uint32 delayTimer = _system->getMillis() + _tickLength * frameDelay;
if (mov || callback)
_screen->copyPage(12, 2);
@@ -2833,7 +2833,7 @@ void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFra
_screen->updateScreen();
}
- int del = _smoothScrollTimer - _system->getMillis();
+ int del = delayTimer - _system->getMillis();
do {
int step = del > _tickLength ? _tickLength : del;
@@ -3564,7 +3564,7 @@ void LoLEngine::displayAutomap() {
_screen->copyPage(2, 0);
_screen->updateScreen();
_screen->fadePalette(_screen->getPalette(3), 10);
- _smoothScrollTimer = _system->getMillis() + 8 * _tickLength;
+ uint32 delayTimer = _system->getMillis() + 8 * _tickLength;
while (!exitAutomap && !shouldQuit()) {
if (_mapUpdateNeeded) {
@@ -3574,9 +3574,9 @@ void LoLEngine::displayAutomap() {
_mapUpdateNeeded = false;
}
- if (_system->getMillis() >= _smoothScrollTimer) {
+ if (_system->getMillis() >= delayTimer) {
redrawMapCursor();
- _smoothScrollTimer = _system->getMillis() + 8 * _tickLength;
+ delayTimer = _system->getMillis() + 8 * _tickLength;
}
int f = checkInput(0) & 0xff;
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index ca5510c1f8..99faea01f6 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -1026,7 +1026,6 @@ private:
OpenDoorState _openDoorState[3];
int _blockDoor;
- uint32 _smoothScrollTimer;
int _smoothScrollModeNormal;
const uint8 *_scrollXTop;
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index e19d0650e4..1b7e305218 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -966,25 +966,25 @@ void LoLEngine::movePartySmoothScrollBlocked(int speed) {
_screen->backupSceneWindow(_sceneDrawPage2 == 2 ? 2 : 6, 6);
for (int i = 0; i < 2; i++) {
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollZoomStepTop(6, 2, _scrollXTop[i], _scrollYTop[i]);
_screen->smoothScrollZoomStepBottom(6, 2, _scrollXBottom[i], _scrollYBottom[i]);
_screen->restoreSceneWindow(2, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
if (!_smoothScrollModeNormal)
i++;
}
for (int i = 2; i; i--) {
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollZoomStepTop(6, 2, _scrollXTop[i], _scrollYTop[i]);
_screen->smoothScrollZoomStepBottom(6, 2, _scrollXBottom[i], _scrollYBottom[i]);
_screen->restoreSceneWindow(2, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
if (!_smoothScrollModeNormal)
i++;
}
@@ -1016,7 +1016,7 @@ void LoLEngine::movePartySmoothScrollUp(int speed) {
}
for (int i = 0; i < 5; i++) {
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollZoomStepTop(6, 2, _scrollXTop[i], _scrollYTop[i]);
_screen->smoothScrollZoomStepBottom(6, 2, _scrollXBottom[i], _scrollYBottom[i]);
@@ -1026,7 +1026,7 @@ void LoLEngine::movePartySmoothScrollUp(int speed) {
_screen->restoreSceneWindow(2, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
if (!_smoothScrollModeNormal)
i++;
}
@@ -1051,7 +1051,7 @@ void LoLEngine::movePartySmoothScrollDown(int speed) {
_screen->backupSceneWindow(2, 6);
for (int i = 4; i >= 0; i--) {
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollZoomStepTop(6, 2, _scrollXTop[i], _scrollYTop[i]);
_screen->smoothScrollZoomStepBottom(6, 2, _scrollXBottom[i], _scrollYBottom[i]);
@@ -1061,7 +1061,7 @@ void LoLEngine::movePartySmoothScrollDown(int speed) {
_screen->restoreSceneWindow(2, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
if (!_smoothScrollModeNormal)
i++;
}
@@ -1086,13 +1086,13 @@ void LoLEngine::movePartySmoothScrollLeft(int speed) {
gui_drawScene(_sceneDrawPage1);
for (int i = 88, d = 88; i > 22; i -= 22, d += 22) {
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollHorizontalStep(_sceneDrawPage2, 66, d, i);
_screen->copyRegion(112 + i, 0, 112, 0, d, 120, _sceneDrawPage1, _sceneDrawPage2, Screen::CR_NO_P_CHECK);
_screen->copyRegion(112, 0, 112, 0, 176, 120, _sceneDrawPage2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
}
if (_sceneDefaultUpdate != 2) {
@@ -1111,28 +1111,28 @@ void LoLEngine::movePartySmoothScrollRight(int speed) {
gui_drawScene(_sceneDrawPage1);
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->copyRegion(112, 0, 222, 0, 66, 120, _sceneDrawPage1, _sceneDrawPage2, Screen::CR_NO_P_CHECK);
_screen->copyRegion(112, 0, 112, 0, 176, 120, _sceneDrawPage2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollHorizontalStep(_sceneDrawPage2, 22, 0, 66);
_screen->copyRegion(112, 0, 200, 0, 88, 120, _sceneDrawPage1, _sceneDrawPage2, Screen::CR_NO_P_CHECK);
_screen->copyRegion(112, 0, 112, 0, 176, 120, _sceneDrawPage2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollHorizontalStep(_sceneDrawPage2, 44, 0, 22);
_screen->copyRegion(112, 0, 178, 0, 110, 120, _sceneDrawPage1, _sceneDrawPage2, Screen::CR_NO_P_CHECK);
_screen->copyRegion(112, 0, 112, 0, 176, 120, _sceneDrawPage2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
if (_sceneDefaultUpdate != 2) {
_screen->copyRegion(112, 0, 112, 0, 176, 120, _sceneDrawPage1, 0, Screen::CR_NO_P_CHECK);
@@ -1152,32 +1152,32 @@ void LoLEngine::movePartySmoothScrollTurnLeft(int speed) {
gui_drawScene(_sceneDrawPage1);
int dp = _sceneDrawPage2 == 2 ? _sceneDrawPage2 : _sceneDrawPage1;
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollTurnStep1(_sceneDrawPage1, _sceneDrawPage2, dp);
if (d)
_screen->copyGuiShapeToSurface(14, dp);
_screen->restoreSceneWindow(dp, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollTurnStep2(_sceneDrawPage1, _sceneDrawPage2, dp);
if (d)
_screen->copyGuiShapeToSurface(14, dp);
_screen->restoreSceneWindow(dp, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollTurnStep3(_sceneDrawPage1, _sceneDrawPage2, dp);
if (d)
_screen->copyGuiShapeToSurface(14, dp);
_screen->restoreSceneWindow(dp, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
if (_sceneDefaultUpdate != 2) {
drawSpecialGuiShape(_sceneDrawPage1);
@@ -1196,32 +1196,32 @@ void LoLEngine::movePartySmoothScrollTurnRight(int speed) {
gui_drawScene(_sceneDrawPage1);
int dp = _sceneDrawPage2 == 2 ? _sceneDrawPage2 : _sceneDrawPage1;
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ uint32 delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollTurnStep3(_sceneDrawPage2, _sceneDrawPage1, dp);
if (d)
_screen->copyGuiShapeToSurface(14, dp);
_screen->restoreSceneWindow(dp, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollTurnStep2(_sceneDrawPage2, _sceneDrawPage1, dp);
if (d)
_screen->copyGuiShapeToSurface(14, dp);
_screen->restoreSceneWindow(dp, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
- _smoothScrollTimer = _system->getMillis() + speed * _tickLength;
+ delayTimer = _system->getMillis() + speed * _tickLength;
_screen->smoothScrollTurnStep1(_sceneDrawPage2, _sceneDrawPage1, dp);
if (d)
_screen->copyGuiShapeToSurface(14, dp);
_screen->restoreSceneWindow(dp, 0);
_screen->updateScreen();
fadeText();
- delayUntil(_smoothScrollTimer);
+ delayUntil(delayTimer);
if (_sceneDefaultUpdate != 2) {
drawSpecialGuiShape(_sceneDrawPage1);
@@ -1259,7 +1259,7 @@ void LoLEngine::shakeScene(int duration, int width, int height, int restore) {
uint32 endTime = _system->getMillis() + duration * _tickLength;
while (endTime > _system->getMillis()) {
- _smoothScrollTimer = _system->getMillis() + 2 * _tickLength;
+ uint32 delayTimer = _system->getMillis() + 2 * _tickLength;
int s1 = width ? (getRandomNumberSpecial() % (width << 1)) - width : 0;
int s2 = height ? (getRandomNumberSpecial() % (height << 1)) - height : 0;
@@ -1288,7 +1288,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);
+ delayUntil(delayTimer);
}
if (restore) {