[Scummvm-cvs-logs] SF.net SVN: scummvm: [22831] scummvm/trunk/engines/simon
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Fri Jun 2 13:33:19 CEST 2006
Revision: 22831
Author: kirben
Date: 2006-06-02 04:33:11 -0700 (Fri, 02 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22831&view=rev
Log Message:
-----------
Add support for separate compressed sound files for cutscenes in FF
Modified Paths:
--------------
scummvm/trunk/engines/simon/animation.cpp
scummvm/trunk/engines/simon/animation.h
Modified: scummvm/trunk/engines/simon/animation.cpp
===================================================================
--- scummvm/trunk/engines/simon/animation.cpp 2006-06-02 10:54:53 UTC (rev 22830)
+++ scummvm/trunk/engines/simon/animation.cpp 2006-06-02 11:33:11 UTC (rev 22831)
@@ -63,6 +63,8 @@
_frameTicks = 0;
_frameSkipped = 0;
+ memset(baseName, 0, sizeof(baseName));
+
_sequenceNum = 0;
_ticks = 0;
}
@@ -76,12 +78,15 @@
int32 frameRate;
uint i;
+ int baseLen = strlen(filename) - 4;
+ memset(baseName, 0, sizeof(baseName));
+ memcpy(baseName, filename, baseLen);
+
// Change file extension to dxa
strcpy(filename2, filename);
- int len = strlen(filename2) - 3;
- filename2[len++] = 'd';
- filename2[len++] = 'x';
- filename2[len++] = 'a';
+ filename2[baseLen + 1] = 'd';
+ filename2[baseLen + 2] = 'x';
+ filename2[baseLen + 3] = 'a';
if (_fd.open(filename2) == false) {
warning("Failed to load video file %s", filename2);
@@ -234,6 +239,12 @@
_mixer->stopHandle(_bgSound);
_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream);
free(buffer);
+ } else {
+ _bgSoundStream = Audio::AudioStream::openStreamFile(baseName);
+ if (_bgSoundStream != NULL) {
+ _mixer->stopHandle(_bgSound);
+ _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream);
+ }
}
}
Modified: scummvm/trunk/engines/simon/animation.h
===================================================================
--- scummvm/trunk/engines/simon/animation.h 2006-06-02 10:54:53 UTC (rev 22830)
+++ scummvm/trunk/engines/simon/animation.h 2006-06-02 11:33:11 UTC (rev 22831)
@@ -58,6 +58,7 @@
uint32 _frameTicks;
uint32 _ticks;
+ char baseName[40];
static const char *_sequenceList[90];
uint8 _sequenceNum;
public:
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