aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mohawk/sound.cpp1
-rw-r--r--engines/mohawk/sound.h11
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index e7386d0017..31d7c37e79 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -404,6 +404,7 @@ Audio::AudioStream *Sound::makeMohawkWaveStream(Common::SeekableReadStream *stre
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();
diff --git a/engines/mohawk/sound.h b/engines/mohawk/sound.h
index 7914dd40fc..96cb555942 100644
--- a/engines/mohawk/sound.h
+++ b/engines/mohawk/sound.h
@@ -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 @@ struct ADPCMStatus { // Holds ADPCM status data, but is irrelevant for us.
} *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 {