Skip to content

Commit

Permalink
Merged revision(s) 21776-21777 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Mod] Update tooltip: Make message less ambiguous.
........
[Fix] When importing instruments or converting to IT, restrict fadeout precision to multiples of 32.
[Fix] Find MPT Hacks: Detect IT instruments with fadeout values that are not multiples of 32.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@21778 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Sep 30, 2024
1 parent 7429d4a commit 7e5264f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions mptrack/MPTHacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,13 @@ bool CModDoc::HasMPTHacks(const bool autofix)
instr->VolEnv.nReleaseNode = instr->PanEnv.nReleaseNode = instr->PitchEnv.nReleaseNode = ENV_RELEASE_NODE_UNSET;
}
}
if((m_SndFile.GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (instr->nFadeOut % 32u) != 0)
{
foundHere = foundHacks = true;
if(autofix)
instr->nFadeOut = ((instr->nFadeOut + 16) / 32) * 32;
}

// Incompatible envelope shape
foundEnvelopes |= FindIncompatibleEnvelopes(instr->VolEnv, autofix);
foundEnvelopes |= FindIncompatibleEnvelopes(instr->PanEnv, autofix);
Expand Down
2 changes: 1 addition & 1 deletion mptrack/UpdateToolTip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bool UpdateToolTip::ShowUpdate(CWnd &parent, const CString &newVersion, const CS

m_infoURL = infoURL;

CString message = MPT_CFORMAT("OpenMPT {} has been released.\n<a>Click here to see what's new.</a>")(newVersion);
CString message = MPT_CFORMAT("OpenMPT {} has been released.\nClick on this message to install the update,\nor <a>click here to see what's new.</a>")(newVersion);
TOOLINFO ti{};
ti.cbSize = TTTOOLINFO_V1_SIZE;
ti.uFlags = TTF_TRACK | TTF_PARSELINKS;
Expand Down
2 changes: 1 addition & 1 deletion soundlib/Load_it.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ bool CSoundFile::ReadIT(FileReader &file, ModLoadingFlags loadFlags)
m.command = CMD_DUMMY;
// Fix handling of commands V81-VFF in ITs made with old Schism Tracker versions
// (fixed in https://github.com/schismtracker/schismtracker/commit/ab5517d4730d4c717f7ebffb401445679bd30888 - one of the last versions to identify as v0.50)
if(m.command == CMD_GLOBALVOLUME && m.param > 0x80 && fileHeader.cwtv >= 0x1000 && fileHeader.cwtv <= 0x1050)
else if(m.command == CMD_GLOBALVOLUME && m.param > 0x80 && fileHeader.cwtv >= 0x1000 && fileHeader.cwtv <= 0x1050)
m.param = 0x80;

// In some IT-compatible trackers, it is possible to input a parameter without a command.
Expand Down
3 changes: 2 additions & 1 deletion soundlib/ModInstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,11 @@ void ModInstrument::Convert(MODTYPE fromType, MODTYPE toType)
}
}

// Limit fadeout length for IT
// Limit fadeout length and precision for IT
if(toType & MOD_TYPE_IT)
{
LimitMax(nFadeOut, 8192u);
nFadeOut = ((nFadeOut + 16) / 32) * 32;
}

// MPT-specific features - remove instrument tunings, Pitch/Tempo Lock, cutoff / resonance swing and filter mode for other formats
Expand Down

0 comments on commit 7e5264f

Please sign in to comment.