[Scummvm-cvs-logs] SF.net SVN: scummvm:[41119] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Jun 2 02:07:11 CEST 2009


Revision: 41119
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41119&view=rev
Author:   lordhoto
Date:     2009-06-02 00:07:11 +0000 (Tue, 02 Jun 2009)

Log Message:
-----------
Remove "_smoothScrollTimer" from LoLEngine, it was only used as local variable anyway.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_lol.cpp
    scummvm/trunk/engines/kyra/lol.cpp
    scummvm/trunk/engines/kyra/lol.h
    scummvm/trunk/engines/kyra/scene_lol.cpp

Modified: scummvm/trunk/engines/kyra/gui_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lol.cpp	2009-06-01 23:53:30 UTC (rev 41118)
+++ scummvm/trunk/engines/kyra/gui_lol.cpp	2009-06-02 00:07:11 UTC (rev 41119)
@@ -1375,12 +1375,12 @@
 		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();

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-06-01 23:53:30 UTC (rev 41118)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-06-02 00:07:11 UTC (rev 41119)
@@ -1278,7 +1278,7 @@
 
 			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 @@
 				step = -step;
 			}
 
-			delayUntil(_smoothScrollTimer);
+			delayUntil(delayTimer);
 		}
 	}
 
@@ -1964,7 +1964,7 @@
 	}
 
 	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 @@
 		}
 
 		if (i < d - 1)
-			delayUntil(_smoothScrollTimer);
+			delayUntil(delayTimer);
 	}
 
 	mov->close();
@@ -2068,7 +2068,7 @@
 	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 @@
 			_screen->updateScreen();
 		}
 
-		delayUntil(_smoothScrollTimer);
+		delayUntil(delayTimer);
 	}
 
 	for (charNum = ch; charNum < n; charNum++) {
@@ -2541,12 +2541,12 @@
 	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 @@
 		_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 @@
 			_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 @@
 	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 @@
 		_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 @@
 	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 @@
 			_screen->updateScreen();
 		}
 
-		int del = _smoothScrollTimer - _system->getMillis();
+		int del = delayTimer - _system->getMillis();
 		do {
 
 			int step = del > _tickLength ? _tickLength : del;
@@ -3564,7 +3564,7 @@
 	_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 @@
 			_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;

Modified: scummvm/trunk/engines/kyra/lol.h
===================================================================
--- scummvm/trunk/engines/kyra/lol.h	2009-06-01 23:53:30 UTC (rev 41118)
+++ scummvm/trunk/engines/kyra/lol.h	2009-06-02 00:07:11 UTC (rev 41119)
@@ -1026,7 +1026,6 @@
 	OpenDoorState _openDoorState[3];
 	int _blockDoor;
 
-	uint32 _smoothScrollTimer;
 	int _smoothScrollModeNormal;
 
 	const uint8 *_scrollXTop;

Modified: scummvm/trunk/engines/kyra/scene_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_lol.cpp	2009-06-01 23:53:30 UTC (rev 41118)
+++ scummvm/trunk/engines/kyra/scene_lol.cpp	2009-06-02 00:07:11 UTC (rev 41119)
@@ -966,25 +966,25 @@
 	_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 @@
 	}
 
 	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 @@
 		_screen->restoreSceneWindow(2, 0);
 		_screen->updateScreen();
 		fadeText();
-		delayUntil(_smoothScrollTimer);
+		delayUntil(delayTimer);
 		if (!_smoothScrollModeNormal)
 			i++;
 	}
@@ -1051,7 +1051,7 @@
 	_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 @@
 		_screen->restoreSceneWindow(2, 0);
 		_screen->updateScreen();
 		fadeText();
-		delayUntil(_smoothScrollTimer);
+		delayUntil(delayTimer);
 		if (!_smoothScrollModeNormal)
 			i++;
 	}
@@ -1086,13 +1086,13 @@
 	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 @@
 
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 		_screen->copyRegion(x1, y1, x2, y2, w, h, 6, 0, Screen::CR_NO_P_CHECK);
 		_screen->updateScreen();
 
-		delayUntil(_smoothScrollTimer);
+		delayUntil(delayTimer);
 	}
 
 	if (restore) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list