From b57e85134ef25a3c8fea50824dbf852d3358cc12 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 4 Feb 2022 14:43:57 -0500 Subject: [PATCH] prepare for end of song effect --- papers/doc/3-pattern/effects.md | 1 + src/engine/engine.cpp | 2 ++ src/engine/playback.cpp | 2 ++ 3 files changed, 5 insertions(+) diff --git a/papers/doc/3-pattern/effects.md b/papers/doc/3-pattern/effects.md index 42704225a..e940a4aa7 100644 --- a/papers/doc/3-pattern/effects.md +++ b/papers/doc/3-pattern/effects.md @@ -46,5 +46,6 @@ however, effects are continuous, which means you only need to type it once and t - `EFxx`: add or subtract global pitch. - this effect is rather weird. use with caution. - `80` is center. +- `FFxx`: end of song/stop playback. additionally each system has its own effects. more details in another section of the manual. diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 12c823112..e3bdc2473 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -1446,6 +1446,8 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan) { return "EExx: Send external command"; case 0xef: return "EFxx: Set global tuning"; + case 0xff: + return "FFxx: Stop song"; default: if (chan>=0 && changetEffectName(effect); diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index ffc1e4e0d..58c6f8f05 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -683,6 +683,8 @@ void DivEngine::processRow(int i, bool afterDelay) { case 0xef: // global pitch globalPitch+=(signed char)(effectVal-0x80); break; + case 0xff: // stop song TODO + break; } }