From c7697fb200a10f2c6406239b32d66cc7163c3d59 Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Fri, 19 Jun 2009 14:30:09 +0000 Subject: added support for SFX by using a seperate Player for them. svn-id: r41676 --- sound/mods/tfmx.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sound/mods/tfmx.h') 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; -- cgit v1.2.3