Skip to content

Commit

Permalink
[Fix] IT: Tone Portamento + Volume Slide (Lxx) always executes the "p…
Browse files Browse the repository at this point in the history
…ortamento down" branch when no tone portamento has been set up before. Test cases: LxxWith0Portamento-Linear.it, LxxWith0Portamento-Amiga.it

[Mod] OpenMPT: Version is now 1.32.00.37

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22552 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Dec 14, 2024
1 parent ad823b5 commit 303f5ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/versionNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 32
#define VER_MINOR 00
#define VER_MINORMINOR 36
#define VER_MINORMINOR 37
10 changes: 9 additions & 1 deletion soundlib/Snd_fx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4587,7 +4587,15 @@ int32 CSoundFile::TonePortamento(PlayState &playState, CHANNELINDEX nChn, uint16
if(chn.nPeriod && chn.nPortamentoDest && doPorta)
{
const int32 actualDelta = PeriodsAreFrequencies() ? delta : -delta;
if(chn.nPeriod < chn.nPortamentoDest || chn.portaTargetReached)
// IT compatibility: Command Lxx, with no tone portamento set up before, will always execute the "portamento down" branch.
// Test cases: LxxWith0Portamento-Linear.it, LxxWith0Portamento-Amiga.it
if(m_playBehaviour[kITDoublePortamentoSlides] && !delta && chn.rowCommand.command == CMD_TONEPORTAVOL)
{
if(chn.nPeriod > 1 && m_SongFlags[SONG_LINEARSLIDES])
chn.nPeriod--;
if(chn.nPeriod < chn.nPortamentoDest)
chn.nPeriod = chn.nPortamentoDest;
} else if(chn.nPeriod < chn.nPortamentoDest || chn.portaTargetReached)
{
DoFreqSlide(chn, chn.nPeriod, actualDelta, true);
if(chn.nPeriod > chn.nPortamentoDest)
Expand Down

0 comments on commit 303f5ee

Please sign in to comment.