예제 #1
0
CString MsdFile::GetParam(unsigned val, unsigned par) const
{
	if(val >= GetNumValues()) return "";
	if(par >= GetNumParams(val)) return "";

	return values[val].params[par];
}
예제 #2
0
std::string MsdFile::GetParam(unsigned val, unsigned par) const
{
	if( val >= GetNumValues() || par >= GetNumParams(val) )
		return std::string();

	return values[val].params[par];
}
void CMackieControlMaster::ShiftParamNumOffset(int iAmount)
{
	int iParamNumOffset = m_cState.GetParamNumOffset() + iAmount;

	int iNumParams = GetNumParams(m_cState.GetMixerStrip(), m_cState.GetSelectedStripNum(),
									m_cState.GetPluginNumOffset(), m_cState.GetAssignment());

	if (MCS_ASSIGNMENT_EQ_FREQ_GAIN == m_cState.GetAssignment() ||
		MCS_ASSIGNMENT_CHANNEL_STRIP == m_cState.GetAssignmentMode())
	{
		int iLastFader = m_cState.GetLastFaderNumber();

		if (iParamNumOffset + iLastFader >= iNumParams)
			iParamNumOffset = iNumParams - iLastFader - 1;
	}
	else	// MCS_ASSIGNMENT_MUTLI_CHANNEL
	{
		if (iParamNumOffset >= iNumParams)
			iParamNumOffset = iNumParams - 1;
	}

	if (iParamNumOffset < 0)
		iParamNumOffset = 0;

	m_cState.SetParamNumOffset(iParamNumOffset);
}
예제 #4
0
void CMethodInfo::GetParamString(TSTR& str)
{
	str = _T("");
	int numParams = GetNumParams();
	CParamInfo  *pParamInfo = 0;

	if (m_invkind == INVOKE_FUNC)
	{
		for( int iParam = 0; iParam < numParams; iParam++ )
		{
			pParamInfo = m_apParamInfo[iParam];
			str += ((pParamInfo->m_flags & PARAMFLAG_FOUT) ? TSTR(_T(" &")) : TSTR(_T(" "))) +  
						pParamInfo->GetName() + _T(":") + pParamInfo->m_strType;
		}
	}
	else
	{
		TSTR buf(_T(" "));
		if (numParams > ((m_invkind == INVOKE_PROPERTYGET) ? 0 : 1))
		{
			pParamInfo = m_apParamInfo[0];
			buf.printf(_T("[%s:%s] "), pParamInfo->GetName(), pParamInfo->m_strType);
		}		
		str.printf(_T("%s: %s"), buf, 
			m_strReturn.isNull() ? m_apParamInfo[0]->m_strType : m_strReturn);
		
		if (m_dispid == DISPID_VALUE)	str += _T(", default");
		if (m_isHidden)
			str += _T(", hidden");		
	}
}
예제 #5
0
//-----------------------------------------------------------------------------
// Finds a particular parameter	(works because the lowest parameters match the shader)
//-----------------------------------------------------------------------------
int CBaseShader::FindParamIndex( const char *pName ) const
{
	int numParams = GetNumParams();
	for( int i = 0; i < numParams; i++ )
	{
		if( Q_strnicmp( GetParamName( i ), pName, 64 ) == 0 )
		{
			return i;
		}
	}
	return -1;
}