[Scummvm-cvs-logs] SF.net SVN: scummvm:[55335] scummvm/trunk/engines/mohawk
fuzzie at users.sourceforge.net
fuzzie at users.sourceforge.net
Wed Jan 19 23:41:13 CET 2011
Revision: 55335
http://scummvm.svn.sourceforge.net/scummvm/?rev=55335&view=rev
Author: fuzzie
Date: 2011-01-19 22:41:12 +0000 (Wed, 19 Jan 2011)
Log Message:
-----------
MOHAWK: Don't use a fixed-size array for cue lists.
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/sound.cpp
scummvm/trunk/engines/mohawk/sound.h
Modified: scummvm/trunk/engines/mohawk/sound.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/sound.cpp 2011-01-19 20:53:28 UTC (rev 55334)
+++ scummvm/trunk/engines/mohawk/sound.cpp 2011-01-19 22:41:12 UTC (rev 55335)
@@ -404,6 +404,7 @@
else
debug(2, "Cue# chunk found with %d point(s)!", cueList->pointCount);
+ cueList->points.resize(cueList->pointCount);
for (uint16 i = 0; i < cueList->pointCount; i++) {
cueList->points[i].sampleFrame = stream->readUint32BE();
Modified: scummvm/trunk/engines/mohawk/sound.h
===================================================================
--- scummvm/trunk/engines/mohawk/sound.h 2011-01-19 20:53:28 UTC (rev 55334)
+++ scummvm/trunk/engines/mohawk/sound.h 2011-01-19 22:41:12 UTC (rev 55335)
@@ -41,7 +41,6 @@
namespace Mohawk {
#define MAX_CHANNELS 2 // Can there be more than 2?
-#define CUE_MAX 256
struct SLSTRecord {
uint16 index;
@@ -85,13 +84,15 @@
} *statusItems;
};
+struct CueListPoint {
+ uint32 sampleFrame;
+ Common::String name;
+};
+
struct CueList {
uint32 size;
uint16 pointCount;
- struct {
- uint32 sampleFrame;
- Common::String name;
- } points[CUE_MAX];
+ Common::Array<CueListPoint> points;
};
enum {
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