aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse_digi
diff options
context:
space:
mode:
authorPaweł Kołodziejski2004-01-18 16:59:54 +0000
committerPaweł Kołodziejski2004-01-18 16:59:54 +0000
commitb3c00e71ba51898a79825ae629a728ca7d355206 (patch)
tree92c90f9fe8c963984460d443a5b880ae533610aa /scumm/imuse_digi
parentf7a92ad02d94a76bc27ca8541b61a11bd28e6a89 (diff)
downloadscummvm-rg350-b3c00e71ba51898a79825ae629a728ca7d355206.tar.gz
scummvm-rg350-b3c00e71ba51898a79825ae629a728ca7d355206.tar.bz2
scummvm-rg350-b3c00e71ba51898a79825ae629a728ca7d355206.zip
removed markers
svn-id: r12490
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r--scumm/imuse_digi/dimuse_sndmgr.cpp21
-rw-r--r--scumm/imuse_digi/dimuse_sndmgr.h26
2 files changed, 10 insertions, 37 deletions
diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp
index 5b492bf636..6ea582b5c5 100644
--- a/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -75,15 +75,7 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, int slot) {
_sounds[slot].channels = READ_BE_UINT32(ptr); ptr += 4;
break;
case MKID_BE('TEXT'):
- size = READ_BE_UINT32(ptr); ptr += 4;
- if (_sounds[slot].numMarkers >= MAX_IMUSE_MARKERS) {
- warning("ImuseDigiSndMgr::prepareSound(%s) Not enough space for Marker", _sounds[slot].name);
- ptr += size;
- break;
- }
- strcpy(_sounds[slot].marker[_sounds[slot].numMarkers].name, (char *)ptr + 4);
- _sounds[slot].numMarkers++;
- ptr += size;
+ size = READ_BE_UINT32(ptr); ptr += size + 4;
break;
case MKID_BE('REGN'):
size = READ_BE_UINT32(ptr); ptr += 4;
@@ -328,11 +320,6 @@ int ImuseDigiSndMgr::getNumJumps(soundStruct *soundHandle) {
return soundHandle->numJumps;
}
-int ImuseDigiSndMgr::getNumMarkers(soundStruct *soundHandle) {
- assert(soundHandle && checkForProperHandle(soundHandle));
- return soundHandle->numMarkers;
-}
-
int ImuseDigiSndMgr::getRegionOffset(soundStruct *soundHandle, int region) {
assert(soundHandle && checkForProperHandle(soundHandle));
assert(region >= 0 && region < soundHandle->numRegions);
@@ -388,12 +375,6 @@ int ImuseDigiSndMgr::getJumpFade(soundStruct *soundHandle, int number) {
return soundHandle->jump[number].fadeDelay;
}
-char *ImuseDigiSndMgr::getMarker(soundStruct *soundHandle, int number) {
- assert(soundHandle && checkForProperHandle(soundHandle));
- assert(number >= 0 && number < soundHandle->numMarkers);
- return (char *)(soundHandle->marker[number].name);
-}
-
int32 ImuseDigiSndMgr::getDataFromRegion(soundStruct *soundHandle, int region, byte **buf, int32 offset, int32 size) {
assert(soundHandle && checkForProperHandle(soundHandle));
assert(buf && offset >= 0 && size >= 0);
diff --git a/scumm/imuse_digi/dimuse_sndmgr.h b/scumm/imuse_digi/dimuse_sndmgr.h
index 146d3c93db..481b8747dd 100644
--- a/scumm/imuse_digi/dimuse_sndmgr.h
+++ b/scumm/imuse_digi/dimuse_sndmgr.h
@@ -55,12 +55,8 @@ private:
struct _jump {
int32 offset; // jump offset position
int32 dest; // jump to dest position
- int hookId; // id of hook
- int fadeDelay; // fade delay in ms
- };
-
- struct _marker {
- char name[256]; // name of marker
+ byte hookId; // id of hook
+ int16 fadeDelay; // fade delay in ms
};
struct _sync {
@@ -71,13 +67,12 @@ private:
public:
struct soundStruct {
- int freq; // frequency
- int channels; // stereo or mono
- int bits; // 8, 12, 16
- int numJumps; // number of Jumps
- int numRegions; // number of Regions
- int numMarkers; // number of Markers
- int numSyncs; // number of Syncs
+ int16 freq; // frequency
+ byte channels; // stereo or mono
+ byte bits; // 8, 12, 16
+ int8 numJumps; // number of Jumps
+ int8 numRegions; // number of Regions
+ int8 numSyncs; // number of Syncs
int32 offsetStop; // end offset in source data
bool endFlag;
bool inUse;
@@ -85,11 +80,10 @@ public:
int32 offsetData;
byte *resPtr;
char name[15];
- int soundId;
+ int16 soundId;
bool freeResPtr;
BundleMgr *_bundle;
_region region[MAX_IMUSE_REGIONS];
- _marker marker[MAX_IMUSE_MARKERS];
_jump jump[MAX_IMUSE_JUMPS];
_sync sync[MAX_IMUSE_SYNCS];
};
@@ -123,13 +117,11 @@ public:
bool isEndOfRegion(soundStruct *soundHandle, int region);
int getNumRegions(soundStruct *soundHandle);
int getNumJumps(soundStruct *soundHandle);
- int getNumMarkers(soundStruct *soundHandle);
int getRegionOffset(soundStruct *soundHandle, int region);
int getJumpIdByRegionAndHookId(soundStruct *soundHandle, int region, int hookId);
int getRegionIdByJumpId(soundStruct *soundHandle, int jumpId);
int getJumpHookId(soundStruct *soundHandle, int number);
int getJumpFade(soundStruct *soundHandle, int number);
- char *getMarker(soundStruct *soundHandle, int number);
void getSyncSizeAndPtrById(soundStruct *soundHandle, int number, int32 &sync_size, byte **sync_ptr);
int32 getDataFromRegion(soundStruct *soundHandle, int region, byte **buf, int32 offset, int32 size);