aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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