From 6da04bc13bdd76ae0230d9eeb3e00eb11b55b20a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 23 Jul 2010 00:39:23 +0000 Subject: KYRA: Implement support for selecting the VQA quality via "video_quality". svn-id: r51187 --- engines/kyra/kyra_mr.cpp | 7 ++++--- engines/kyra/kyra_mr.h | 1 + engines/kyra/vqa.cpp | 4 ++-- engines/kyra/vqa.h | 3 --- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index cf90c73dbd..61bc3708c3 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -369,9 +369,7 @@ void KyraEngine_MR::playVQA(const char *name) { 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, size); + snprintf(filename, sizeof(filename), "%s%d.VQA", name, _configVQAQuality); if (vqa.open(filename)) { for (int i = 0; i < 4; ++i) { @@ -1460,6 +1458,8 @@ void KyraEngine_MR::registerDefaultSettings() { 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 @@ void KyraEngine_MR::readSettings() { _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 diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 773b0a1699..36b937f2a8 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -73,6 +73,7 @@ private: bool _configStudio; bool _configSkip; bool _configHelium; + int _configVQAQuality; void registerDefaultSettings(); void writeSettings(); diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index 8a598591bb..d0e54f996b 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -260,8 +260,8 @@ bool VQAMovie::open(const char *filename) { _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]; diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h index c1448a4865..129d526e98 100644 --- a/engines/kyra/vqa.h +++ b/engines/kyra/vqa.h @@ -56,9 +56,6 @@ public: // 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); -- cgit v1.2.3