diff options
author | Norbert Lange | 2009-06-19 20:17:53 +0000 |
---|---|---|
committer | Norbert Lange | 2009-06-19 20:17:53 +0000 |
commit | 4865863f6cff6c141edaf4f6cb6ce4ef2687d12a (patch) | |
tree | e15add1bf2871b2499598ac84f043bff22541917 /sound/mods | |
parent | c7697fb200a10f2c6406239b32d66cc7163c3d59 (diff) | |
download | scummvm-rg350-4865863f6cff6c141edaf4f6cb6ce4ef2687d12a.tar.gz scummvm-rg350-4865863f6cff6c141edaf4f6cb6ce4ef2687d12a.tar.bz2 scummvm-rg350-4865863f6cff6c141edaf4f6cb6ce4ef2687d12a.zip |
Enabled signals and made ScummVM use them (they specify when a song should be stopped)
Cleanups in player_v4a.
svn-id: r41685
Diffstat (limited to 'sound/mods')
-rw-r--r-- | sound/mods/tfmx.cpp | 7 | ||||
-rw-r--r-- | sound/mods/tfmx.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp index be9f9ebf73..8a9fc0d962 100644 --- a/sound/mods/tfmx.cpp +++ b/sound/mods/tfmx.cpp @@ -439,7 +439,8 @@ FORCEINLINE bool Tfmx::macroStep(ChannelContext &channel) { return channel.deferWait; case 0x20: // Signal. Parameters: signalnumber/value - warnMacroUnimplemented(macroPtr, 0); + if (macroPtr[1] < ARRAYSIZE(_playerCtx.signal)) + _playerCtx.signal[macroPtr[1]] = READ_BE_UINT16(¯oPtr[2]); return true; case 0x21: // Play macro. Parameters: macro/chan/detune @@ -622,8 +623,8 @@ FORCEINLINE bool Tfmx::patternStep(PatternContext &pattern) { return true; case 13: // Cue - warnPatternUnimplemented(patternPtr, 1); - debug("Cue/Signal %02X %04X", patternPtr[1], READ_BE_UINT16(&patternPtr[2])); + if (patternPtr[1] < ARRAYSIZE(_playerCtx.signal)) + _playerCtx.signal[patternPtr[1]] = READ_BE_UINT16(&patternPtr[2]); return true; case 15: // NOP diff --git a/sound/mods/tfmx.h b/sound/mods/tfmx.h index 9761cef494..e33c4e8037 100644 --- a/sound/mods/tfmx.h +++ b/sound/mods/tfmx.h @@ -51,6 +51,8 @@ public: void doMacro(int macro, int note); bool load(Common::SeekableReadStream &musicData, Common::SeekableReadStream &sampleData); int getTicks() {return _playerCtx.tickCount;} + int getSongIndex() {return _playerCtx.song;} + uint16 getSignal(int index) {return _playerCtx.signal[index];} // Note: everythings public so the debug-Routines work. // private: @@ -217,6 +219,8 @@ public: int tickCount; + uint16 signal[4]; + bool stopWithLastPattern; //!< hack to automatically stop the whole player if no Pattern is running } _playerCtx; |