From: <sv...@op...> - 2024-12-01 11:54:48
|
Author: sagamusix Date: Sun Dec 1 12:54:35 2024 New Revision: 22392 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22392 Log: Merged revision(s) 22218 from trunk/OpenMPT: [Fix] MOD: In PT mode, retriggered notes should keep using the 9xx offset. [Fix] MED: OctaMED also uses the previous offset for retriggered notes (like MOD), but doesn't have the ProTracker offset adding bug (so more like S3M). Fixes Kris Hadalot.med (https://www.un4seen.com/forum/?topic=15448.msg144130#msg144130). ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/soundlib/Load_med.cpp branches/OpenMPT-1.30/soundlib/Snd_fx.cpp Modified: branches/OpenMPT-1.30/soundlib/Load_med.cpp ============================================================================== --- branches/OpenMPT-1.30/soundlib/Load_med.cpp Sun Dec 1 12:49:58 2024 (r22391) +++ branches/OpenMPT-1.30/soundlib/Load_med.cpp Sun Dec 1 12:54:35 2024 (r22392) @@ -1195,6 +1195,7 @@ m_SongFlags.set(SONG_FASTVOLSLIDES, !(songHeader.flags & MMDSong::FLAG_STSLIDE)); m_playBehaviour.set(kST3PortaSampleChange); m_playBehaviour.set(kFT2PortaNoNote); + m_playBehaviour.set(kST3OffsetWithoutInstrument); if(expData.songNameOffset && file.Seek(expData.songNameOffset)) { Modified: branches/OpenMPT-1.30/soundlib/Snd_fx.cpp ============================================================================== --- branches/OpenMPT-1.30/soundlib/Snd_fx.cpp Sun Dec 1 12:49:58 2024 (r22391) +++ branches/OpenMPT-1.30/soundlib/Snd_fx.cpp Sun Dec 1 12:54:35 2024 (r22392) @@ -1883,7 +1883,7 @@ chn.nLoopEnd = pSmp->nLength; chn.nLoopStart = 0; chn.position.Set(0); - if((m_SongFlags[SONG_PT_MODE] || m_playBehaviour[kST3OffsetWithoutInstrument]) && !chn.rowCommand.instr) + if((m_SongFlags[SONG_PT_MODE] || m_playBehaviour[kST3OffsetWithoutInstrument] || GetType() == MOD_TYPE_MED) && !chn.rowCommand.instr) { chn.position.SetInt(std::min(chn.prevNoteOffset, chn.nLength - SmpLength(1))); } else @@ -5297,7 +5297,7 @@ { // ST3 compatibility: Instrument-less note recalls previous note's offset // Test case: OxxMemory.s3m - if(m_playBehaviour[kST3OffsetWithoutInstrument]) + if(m_playBehaviour[kST3OffsetWithoutInstrument] || GetType() == MOD_TYPE_MED) chn.prevNoteOffset = 0; chn.prevNoteOffset += param; @@ -5568,7 +5568,10 @@ const bool fading = chn.dwFlags[CHN_NOTEFADE]; const auto oldPrevNoteOffset = chn.prevNoteOffset; - chn.prevNoteOffset = 0; // Retriggered notes should not use previous offset (test case: OxxMemoryWithRetrig.s3m) + // Retriggered notes should not use previous offset in S3M + // Test cases: OxxMemoryWithRetrig.s3m, PTOffsetRetrigger.mod + if(GetType() == MOD_TYPE_S3M) + chn.prevNoteOffset = 0; // IT compatibility: Really weird combination of envelopes and retrigger (see Storlek's q.it testcase) // Test cases: retrig.it, RetrigSlide.s3m const bool itS3Mstyle = m_playBehaviour[kITRetrigger] || (GetType() == MOD_TYPE_S3M && chn.nLength && !oplRealRetrig); |