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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jul 23 02:39:23 CEST 2010


Revision: 51187
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51187&view=rev
Author:   lordhoto
Date:     2010-07-23 00:39:23 +0000 (Fri, 23 Jul 2010)

Log Message:
-----------
KYRA: Implement support for selecting the VQA quality via "video_quality".

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_mr.cpp
    scummvm/trunk/engines/kyra/kyra_mr.h
    scummvm/trunk/engines/kyra/vqa.cpp
    scummvm/trunk/engines/kyra/vqa.h

Modified: scummvm/trunk/engines/kyra/kyra_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_mr.cpp	2010-07-23 00:38:52 UTC (rev 51186)
+++ scummvm/trunk/engines/kyra/kyra_mr.cpp	2010-07-23 00:39:23 UTC (rev 51187)
@@ -369,10 +369,8 @@
 	VQAMovie vqa(this, _system);
 
 	char filename[20];
-	int size = 0;		// TODO: Movie size is 0, 1 or 2.
+	snprintf(filename, sizeof(filename), "%s%d.VQA", name, _configVQAQuality);
 
-	snprintf(filename, sizeof(filename), "%s%d.VQA", name, size);
-
 	if (vqa.open(filename)) {
 		for (int i = 0; i < 4; ++i) {
 			if (i != _musicSoundChannel)
@@ -1460,6 +1458,8 @@
 	ConfMan.registerDefault("studio_audience", true);
 	ConfMan.registerDefault("skip_support", true);
 	ConfMan.registerDefault("helium_mode", false);
+	// 0 - best, 1 - mid, 2 - low
+	ConfMan.registerDefault("video_quality", 0);
 }
 
 void KyraEngine_MR::writeSettings() {
@@ -1495,6 +1495,7 @@
 	_configStudio = ConfMan.getBool("studio_audience");
 	_configSkip = ConfMan.getBool("skip_support");
 	_configHelium = ConfMan.getBool("helium_mode");
+	_configVQAQuality = CLIP(ConfMan.getInt("video_quality"), 0, 2);
 }
 
 } // End of namespace Kyra

Modified: scummvm/trunk/engines/kyra/kyra_mr.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_mr.h	2010-07-23 00:38:52 UTC (rev 51186)
+++ scummvm/trunk/engines/kyra/kyra_mr.h	2010-07-23 00:39:23 UTC (rev 51187)
@@ -73,6 +73,7 @@
 	bool _configStudio;
 	bool _configSkip;
 	bool _configHelium;
+	int _configVQAQuality;
 
 	void registerDefaultSettings();
 	void writeSettings();

Modified: scummvm/trunk/engines/kyra/vqa.cpp
===================================================================
--- scummvm/trunk/engines/kyra/vqa.cpp	2010-07-23 00:38:52 UTC (rev 51186)
+++ scummvm/trunk/engines/kyra/vqa.cpp	2010-07-23 00:39:23 UTC (rev 51187)
@@ -260,8 +260,8 @@
 					_header.bits = 8;
 			}
 
-			setX((Screen::SCREEN_W - _header.width) / 2);
-			setY((Screen::SCREEN_H - _header.height) / 2);
+			_x = (Screen::SCREEN_W - _header.width) / 2;
+			_y = (Screen::SCREEN_H - _header.height) / 2;
 
 			_frameInfo = new uint32[_header.numFrames];
 			_frame = new byte[_header.width * _header.height];

Modified: scummvm/trunk/engines/kyra/vqa.h
===================================================================
--- scummvm/trunk/engines/kyra/vqa.h	2010-07-23 00:38:52 UTC (rev 51186)
+++ scummvm/trunk/engines/kyra/vqa.h	2010-07-23 00:39:23 UTC (rev 51187)
@@ -56,9 +56,6 @@
 	// It's unlikely that we ever want to change the movie position from
 	// its default.
 
-	void setX(int x) { _x = x; }
-	void setY(int y) { _y = y; }
-
 	void setDrawPage(int page) { _drawPage = page; }
 
 	bool open(const char *filename);


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