[Scummvm-cvs-logs] SF.net SVN: scummvm: [22569] scummvm/trunk/engines/kyra
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Mon May 22 00:28:06 CEST 2006
Revision: 22569
Author: eriktorbjorn
Date: 2006-05-22 00:27:20 -0700 (Mon, 22 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22569&view=rev
Log Message:
-----------
Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra3.cpp
scummvm/trunk/engines/kyra/vqa.cpp
scummvm/trunk/engines/kyra/vqa.h
Modified: scummvm/trunk/engines/kyra/kyra3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra3.cpp 2006-05-21 21:18:23 UTC (rev 22568)
+++ scummvm/trunk/engines/kyra/kyra3.cpp 2006-05-22 07:27:20 UTC (rev 22569)
@@ -151,28 +151,27 @@
debugC(9, kDebugLevelMain, "KyraEngine::playVQA('%s')", name);
VQAMovie vqa(this, _system);
- uint8 pal[768];
- memcpy(pal, _screen->_currentPalette, sizeof(pal));
- 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);
- if (vqa.opened()) {
+ if (vqa.open(filename)) {
+ uint8 pal[768];
+ memcpy(pal, _screen->_currentPalette, sizeof(pal));
+ if (_screen->_curPage == 0)
+ _screen->copyCurPageBlock(0, 0, 320, 200, _screen->getPagePtr(3));
+
_screen->hideMouse();
vqa.setDrawPage(0);
vqa.play();
vqa.close();
_screen->showMouse();
- }
- if (_screen->_curPage == 0)
- _screen->copyBlockToPage(0, 0, 0, 320, 200, _screen->getPagePtr(3));
- _screen->setScreenPalette(pal);
+ if (_screen->_curPage == 0)
+ _screen->copyBlockToPage(0, 0, 0, 320, 200, _screen->getPagePtr(3));
+ _screen->setScreenPalette(pal);
+ }
}
void KyraEngine_v3::playMenuAudioFile() {
Modified: scummvm/trunk/engines/kyra/vqa.cpp
===================================================================
--- scummvm/trunk/engines/kyra/vqa.cpp 2006-05-21 21:18:23 UTC (rev 22568)
+++ scummvm/trunk/engines/kyra/vqa.cpp 2006-05-22 07:27:20 UTC (rev 22569)
@@ -248,16 +248,16 @@
}
}
-void VQAMovie::open(const char *filename) {
+bool VQAMovie::open(const char *filename) {
debugC(9, kDebugLevelMovie, "VQAMovie::open('%s')", filename);
close();
if (!_file.open(filename))
- return;
+ return false;
if (_file.readUint32BE() != MKID_BE('FORM')) {
warning("VQAMovie::open: Cannot find `FORM' tag");
- return;
+ return false;
}
// For now, we ignore the size of the FORM chunk.
@@ -265,7 +265,7 @@
if (_file.readUint32BE() != MKID_BE('WVQA')) {
warning("WQAMovie::open: Cannot find `WVQA' tag");
- return;
+ return false;
}
bool foundHeader = false;
@@ -351,12 +351,12 @@
case MKID_BE('FINF'): // Frame info
if (!foundHeader) {
warning("VQAMovie::open: Found `FINF' before `VQHD'");
- return;
+ return false;
}
if (size != 4 * (uint32)_header.numFrames) {
warning("VQAMovie::open: Expected size %d for `FINF' chunk, but got %d", 4 * _header.numFrames, size);
- return;
+ return false;
}
foundFrameInfo = true;
@@ -409,6 +409,7 @@
initBuffers();
_opened = true;
+ return true;
}
void VQAMovie::close() {
Modified: scummvm/trunk/engines/kyra/vqa.h
===================================================================
--- scummvm/trunk/engines/kyra/vqa.h 2006-05-21 21:18:23 UTC (rev 22568)
+++ scummvm/trunk/engines/kyra/vqa.h 2006-05-22 07:27:20 UTC (rev 22569)
@@ -45,7 +45,7 @@
void setDrawPage(int page) { _drawPage = page; }
- void open(const char *filename);
+ bool open(const char *filename);
void close();
void play();
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