[Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.43,1.44 d_sound.cpp,1.122,1.123 menu.cpp,1.28,1.29 palette.cpp,1.33,1.34 render.cpp,1.65,1.66

Max Horn fingolfin at users.sourceforge.net
Tue Sep 28 13:26:45 CEST 2004


Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3612/sword2/driver

Modified Files:
	animation.cpp d_sound.cpp menu.cpp palette.cpp render.cpp 
Log Message:
Rename remaining OSystem methods to match our coding guidelines

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- animation.cpp	17 Aug 2004 13:52:18 -0000	1.43
+++ animation.cpp	28 Sep 2004 20:19:36 -0000	1.44
@@ -254,7 +254,7 @@
 			_vm->_sound->playFx(0, musicOut, 0, 0, RDSE_FXLEADOUT);
 
 		OSystem::Event event;
-		while (_sys->poll_event(&event)) {
+		while (_sys->pollEvent(event)) {
 			switch (event.event_code) {
 #ifndef BACKEND_8BIT
 			case OSystem::EVENT_SCREEN_CHANGED:
@@ -277,7 +277,7 @@
 
 	if (!skipCutscene) {
 		// Sleep for one frame so that the last frame is displayed.
-		_sys->delay_msecs(1000 / 12);
+		_sys->delayMillis(1000 / 12);
 	}
 
 	// Most movies fade to black on their own, but not all of them. Since
@@ -307,7 +307,7 @@
 
 	while (handle.isActive()) {
 		_vm->_graphics->updateDisplay(false);
-		_sys->delay_msecs(100);
+		_sys->delayMillis(100);
 	}
 
 	// Clear the screen again
@@ -436,7 +436,7 @@
 			// frame rate the original movies had, or even if it
 			// was constant, but this seems to work reasonably.
 
-			_sys->delay_msecs(90);
+			_sys->delayMillis(90);
 		}
 
 		// Wait for the voice to stop playing. This is to make sure
@@ -446,7 +446,7 @@
 
 		while (handle.isActive()) {
 			_vm->_graphics->updateDisplay(false);
-			_sys->delay_msecs(100);
+			_sys->delayMillis(100);
 		}
 
 		closeTextObject(text[textCounter]);

Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- d_sound.cpp	4 Sep 2004 23:05:34 -0000	1.122
+++ d_sound.cpp	28 Sep 2004 20:19:36 -0000	1.123
@@ -663,7 +663,7 @@
 
 	while (_fx[i]._handle.isActive()) {
 		_vm->_graphics->updateDisplay();
-		_vm->_system->delay_msecs(30);
+		_vm->_system->delayMillis(30);
 	}
 }
 

Index: menu.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/menu.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- menu.cpp	6 Jun 2004 15:40:31 -0000	1.28
+++ menu.cpp	28 Sep 2004 20:19:37 -0000	1.29
@@ -55,10 +55,10 @@
 	static int32 lastTime = 0;
 
 	if (lastTime == 0) {
-		lastTime = _vm->_system->get_msecs();
+		lastTime = _vm->_system->getMillis();
 		frameCount = 1;
 	} else {
-		int32 delta = _vm->_system->get_msecs() - lastTime;
+		int32 delta = _vm->_system->getMillis() - lastTime;
 
 		if (delta > 250) {
 			lastTime += delta;

Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/palette.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- palette.cpp	25 Sep 2004 23:26:46 -0000	1.33
+++ palette.cpp	28 Sep 2004 20:19:37 -0000	1.34
@@ -92,7 +92,7 @@
 
 	_fadeTotalTime = (int32) (time * 1000);
 	_fadeStatus = RDFADE_UP;
-	_fadeStartTime = _vm->_system->get_msecs();
+	_fadeStartTime = _vm->_system->getMillis();
 
 	return RD_OK;
 }
@@ -108,7 +108,7 @@
 
 	_fadeTotalTime = (int32) (time * 1000);
 	_fadeStatus = RDFADE_DOWN;
-	_fadeStartTime = _vm->_system->get_msecs();
+	_fadeStartTime = _vm->_system->getMillis();
 
 	return RD_OK;
 }
@@ -126,7 +126,7 @@
 void Graphics::waitForFade(void) {
 	while (getFadeStatus() != RDFADE_NONE && getFadeStatus() != RDFADE_BLACK) {
 		updateDisplay();
-		_vm->_system->delay_msecs(20);
+		_vm->_system->delayMillis(20);
 	}
 }
 
@@ -144,7 +144,7 @@
 
 	// I don't know if this is necessary, but let's limit how often the
 	// palette is updated, just to be safe.
-	currentTime = _vm->_system->get_msecs();
+	currentTime = _vm->_system->getMillis();
 	if (currentTime - previousTime <= 25)
 		return;
 

Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/render.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- render.cpp	26 Jul 2004 16:41:57 -0000	1.65
+++ render.cpp	28 Sep 2004 20:19:37 -0000	1.66
@@ -419,7 +419,7 @@
  */
 
 void Graphics::initialiseRenderCycle(void) {
-	_initialTime = _vm->_system->get_msecs();
+	_initialTime = _vm->_system->getMillis();
 	_totalTime = _initialTime + MILLISECSPERCYCLE;
 }
 
@@ -432,7 +432,7 @@
 	_scrollXOld = _scrollX;
 	_scrollYOld = _scrollY;
 
-	_startTime = _vm->_system->get_msecs();
+	_startTime = _vm->_system->getMillis();
 
 	if (_startTime + _renderAverageTime >= _totalTime)	{
 		_scrollX = _scrollXTarget;
@@ -461,7 +461,7 @@
 	static int32 renderCountIndex = 0;
 	int32 time;
 
-	time = _vm->_system->get_msecs();
+	time = _vm->_system->getMillis();
 	renderTimeLog[renderCountIndex] = time - _startTime;
 	_startTime = time;
 	_renderAverageTime = (renderTimeLog[0] + renderTimeLog[1] + renderTimeLog[2] + renderTimeLog[3]) >> 2;
@@ -487,7 +487,7 @@
 		// If we have already reached the scroll target sleep for the
 		// rest of the render cycle.
 		_vm->sleepUntil(_totalTime);
-		_initialTime = _vm->_system->get_msecs();
+		_initialTime = _vm->_system->getMillis();
 		_totalTime += MILLISECSPERCYCLE;
 		return true;
 	}
@@ -512,7 +512,7 @@
 	// Give the other threads some breathing space. This apparently helps
 	// against bug #875683, though I was never able to reproduce it for
 	// myself.
-	_vm->_system->delay_msecs(10);
+	_vm->_system->delayMillis(10);
 #endif
 
 	return false;





More information about the Scummvm-git-logs mailing list