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

svn-id: r51187
This commit is contained in:
Johannes Schickel 2010-07-23 00:39:23 +00:00
parent cef77cdae2
commit 6da04bc13b
4 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -73,6 +73,7 @@ private:
bool _configStudio;
bool _configSkip;
bool _configHelium;
int _configVQAQuality;
void registerDefaultSettings();
void writeSettings();

View File

@ -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];

View File

@ -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);