aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-05-21 17:28:03 +0000
committerTorbjörn Andersson2006-05-21 17:28:03 +0000
commitb2d8f804cd40df6d3e3e50d7640bd8f1433be9ba (patch)
tree3bf2cac67000ea9866bacd0e1688d22aba933ba3
parent344cc2f475c22df613b097fe9fb969cf373e32ca (diff)
downloadscummvm-rg350-b2d8f804cd40df6d3e3e50d7640bd8f1433be9ba.tar.gz
scummvm-rg350-b2d8f804cd40df6d3e3e50d7640bd8f1433be9ba.tar.bz2
scummvm-rg350-b2d8f804cd40df6d3e3e50d7640bd8f1433be9ba.zip
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. svn-id: r22560
-rw-r--r--engines/kyra/kyra.h2
-rw-r--r--engines/kyra/kyra3.cpp10
-rw-r--r--engines/kyra/vqa.cpp4
3 files changed, 10 insertions, 6 deletions
diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h
index c3de128354..b1effd56ee 100644
--- a/engines/kyra/kyra.h
+++ b/engines/kyra/kyra.h
@@ -1028,7 +1028,7 @@ public:
int go();
- void playVQA(const char *filename);
+ void playVQA(const char *name);
private:
int init();
diff --git a/engines/kyra/kyra3.cpp b/engines/kyra/kyra3.cpp
index 024f244782..3ad2c1f46f 100644
--- a/engines/kyra/kyra3.cpp
+++ b/engines/kyra/kyra3.cpp
@@ -146,8 +146,8 @@ int KyraEngine_v3::go() {
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 @@ void KyraEngine_v3::playVQA(const char *filename) {
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();
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index a794368391..07a8354301 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -312,8 +312,8 @@ void VQAMovie::open(const char *filename, int dummy1, uint8 *dummy2) {
}
}
- 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