aboutsummaryrefslogtreecommitdiff
path: root/sound/mods/tfmx.h
diff options
context:
space:
mode:
authorNorbert Lange2009-06-19 14:30:09 +0000
committerNorbert Lange2009-06-19 14:30:09 +0000
commitc7697fb200a10f2c6406239b32d66cc7163c3d59 (patch)
tree011ce214b4ca548aaade6740f9621de9ddf567b6 /sound/mods/tfmx.h
parentc3596c184b032744d0a6d0d72879dcde854ec93e (diff)
downloadscummvm-rg350-c7697fb200a10f2c6406239b32d66cc7163c3d59.tar.gz
scummvm-rg350-c7697fb200a10f2c6406239b32d66cc7163c3d59.tar.bz2
scummvm-rg350-c7697fb200a10f2c6406239b32d66cc7163c3d59.zip
added support for SFX by using a seperate Player for them.
svn-id: r41676
Diffstat (limited to 'sound/mods/tfmx.h')
-rw-r--r--sound/mods/tfmx.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/mods/tfmx.h b/sound/mods/tfmx.h
index bcb25fbf8b..9761cef494 100644
--- a/sound/mods/tfmx.h
+++ b/sound/mods/tfmx.h
@@ -47,6 +47,7 @@ public:
void interrupt();
void doSong(int songPos);
+ void doSfx(int sfxIndex);
void doMacro(int macro, int note);
bool load(Common::SeekableReadStream &musicData, Common::SeekableReadStream &sampleData);
int getTicks() {return _playerCtx.tickCount;}
@@ -60,6 +61,7 @@ public:
struct Resource {
uint32 _trackstepOffset; //!< Offset in mdat
+ uint32 _sfxTableOffset;
byte *_mdatData; //!< Currently the whole mdat-File
byte *_sampleData; //!< Currently the whole sample-File
@@ -72,6 +74,13 @@ public:
uint32 headerUnknown;
char textField[6 * 40];
+ const byte *getSfxPtr(uint8 index = 0) {
+ byte *sfxPtr = (byte *)(_mdatData + _sfxTableOffset + index * 8);
+
+ boundaryCheck(_mdatData, _mdatLen, sfxPtr, 8);
+ return sfxPtr;
+ }
+
const uint16 *getTrackPtr(uint16 trackstep = 0) {
uint16 *trackData = (uint16 *)(_mdatData + _trackstepOffset + 16 * trackstep);
@@ -128,6 +137,10 @@ public:
uint8 macroLoopCount;
bool macroRun;
+ uint32 customMacro;
+ uint8 customMacroIndex;
+ uint8 customMacroPrio;
+
bool sfxLocked;
int16 sfxLockTime;
bool keyUp;