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

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun May 21 10:29:02 CEST 2006


Revision: 22560
Author:   eriktorbjorn
Date:     2006-05-21 10:28:03 -0700 (Sun, 21 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22560&view=rev

Log Message:
-----------
Some minor VQA player fixes:

* The playVQA() function now takes the name of the cutscene, rather than the
  filename. This is so that playVQA("FOO") will be able to play FOO0.VQA,
  FOO1.VQA or FOO2.VQA, depending on which movie size is selected.

* The VQA player centers movies by default, so don't set the position to 0,0.

* Ask the backend for screen dimensions (for centering the movie) rather than
  hard-coding them.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra.h
    scummvm/trunk/engines/kyra/kyra3.cpp
    scummvm/trunk/engines/kyra/vqa.cpp
Modified: scummvm/trunk/engines/kyra/kyra.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra.h	2006-05-21 16:06:29 UTC (rev 22559)
+++ scummvm/trunk/engines/kyra/kyra.h	2006-05-21 17:28:03 UTC (rev 22560)
@@ -1028,7 +1028,7 @@
 	
 	int go();
 
-	void playVQA(const char *filename);
+	void playVQA(const char *name);
 private:
 	int init();
 

Modified: scummvm/trunk/engines/kyra/kyra3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra3.cpp	2006-05-21 16:06:29 UTC (rev 22559)
+++ scummvm/trunk/engines/kyra/kyra3.cpp	2006-05-21 17:28:03 UTC (rev 22560)
@@ -146,8 +146,8 @@
 	return 0;
 }
 
-void KyraEngine_v3::playVQA(const char *filename) {
-	debugC(9, kDebugLevelMain, "KyraEngine::playVQA('%s')", filename);
+void KyraEngine_v3::playVQA(const char *name) {
+	debugC(9, kDebugLevelMain, "KyraEngine::playVQA('%s')", name);
 	VQAMovie vqa(this, _system);
 
 	uint8 pal[768];
@@ -155,9 +155,13 @@
 	if (_screen->_curPage == 0)
 		_screen->copyCurPageBlock(0, 0, 320, 200, _screen->getPagePtr(3));
 
+	char filename[20];
+	int size = 0;		// TODO: Movie size is 0, 1 or 2.
+
+	snprintf(filename, sizeof(filename), "%s%d.VQA", name, size);
+
 	vqa.open(filename, 0, NULL);
 	if (vqa.opened()) {
-		vqa.setX(0); vqa.setY(0);
 		vqa.setDrawPage(0);
 		vqa.play();
 		vqa.close();

Modified: scummvm/trunk/engines/kyra/vqa.cpp
===================================================================
--- scummvm/trunk/engines/kyra/vqa.cpp	2006-05-21 16:06:29 UTC (rev 22559)
+++ scummvm/trunk/engines/kyra/vqa.cpp	2006-05-21 17:28:03 UTC (rev 22560)
@@ -312,8 +312,8 @@
 				}
 			}
 
-			setX((320 - _header.width) / 2);
-			setY((200 - _header.height) / 2);
+			setX((_system->getWidth() - _header.width) / 2);
+			setY((_system->getHeight() - _header.height) / 2);
 
 			// HACK: I've only seen 8-bit mono audio in Kyra 3
 


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