[Scummvm-cvs-logs] SF.net SVN: scummvm:[35819] scummvm/trunk/graphics/video/video_player.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Jan 11 05:41:22 CET 2009


Revision: 35819
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35819&view=rev
Author:   thebluegr
Date:     2009-01-11 04:41:22 +0000 (Sun, 11 Jan 2009)

Log Message:
-----------
Stop recalculating the x and y coordinates for every frame in playVideo()

Modified Paths:
--------------
    scummvm/trunk/graphics/video/video_player.cpp

Modified: scummvm/trunk/graphics/video/video_player.cpp
===================================================================
--- scummvm/trunk/graphics/video/video_player.cpp	2009-01-11 04:23:57 UTC (rev 35818)
+++ scummvm/trunk/graphics/video/video_player.cpp	2009-01-11 04:41:22 UTC (rev 35819)
@@ -188,6 +188,9 @@
 
 	g_system->clearScreen();
 
+	int frameX = (g_system->getWidth() - _decoder->getWidth()) / 2;
+	int frameY = (g_system->getHeight() - _decoder->getHeight()) / 2;
+
 	while (_decoder->getCurFrame() < _decoder->getFrameCount() && !_skipVideo) {
 		processVideoEvents(stopEvents);
 
@@ -195,10 +198,7 @@
 		_decoder->decodeNextFrame();
 
 		Graphics::Surface *screen = g_system->lockScreen();
-		_decoder->copyFrameToBuffer((byte *)screen->pixels,
-							(g_system->getWidth() - _decoder->getWidth()) / 2,
-							(g_system->getHeight() - _decoder->getHeight()) / 2,
-							g_system->getWidth());
+		_decoder->copyFrameToBuffer((byte *)screen->pixels, frameX, frameY, g_system->getWidth());
 		performPostProcessing((byte *)screen->pixels);
 		g_system->unlockScreen();
 


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