diff options
Diffstat (limited to 'sound/mods/tfmx.h')
-rw-r--r-- | sound/mods/tfmx.h | 13 |
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; |