예제 #1
0
파일: Main.cpp 프로젝트: Andos/Easing
_inline float GetFloatParamEx(LPRDATA rdPtr)
{
	long val = CNC_GetFloatParameter(rdPtr);
	return *(float*)&val;
}
예제 #2
0
// Get float parameter for actions/conditions
_inline float GetFloatParam(LPRDATA rdPtr)
{
	long tmpf = CNC_GetFloatParameter(rdPtr);
	float param = *(float*)&tmpf;
	return param;
}
예제 #3
0
// 
// ============================================================================

CONDITION(
	/* ID */			0,
	/* Name */			"%o: Ext. Alt. Value %1 of %0 %2",
	/* Flags */			EVFLAGS_ALWAYS,
	/* Params */			(3,PARAM_OBJECT,"Object",PARAM_STRING,"Extended Alt. Value Name",PARAM_COMPARISON,"To Compare Against")
) {
	// Hack around obscure crash by getting the param data myself instead of trusting Param(TYPE_OBJECT)
	//short p1 = ((eventParam*)Param(TYPE_OBJECT))->evp.evpW.evpW0;
	short p1 = rdPtr->rHo.hoCurrentParam->evp.evpW.evpW0; Param(TYPE_OBJECT);

	char* p2 = (char*)Param(TYPE_STRING);
	ParamComp* p3 = GetComparisonParameter(rdPtr);
	double p4 = Long2Float(CNC_GetFloatParameter(rdPtr));

	LPRH rhPtr = rdPtr->rHo.hoAdRunHeader;      //get a pointer to the mmf runtime header
	LPOBL ObjectList = rhPtr->rhObjectList;     //get a pointer to the mmf object list
	LPOIL OiList = rhPtr->rhOiList;             //get a pointer to the mmf object info list
	LPQOI QualToOiList = rhPtr->rhQualToOiList; //get a pointer to the mmf qualifier to Oi list

	bool bSelected = false;

	if ( p1 & 0x8000 ) // dealing with a qualifier...
	{
		// For qualifiers evpW0( & 0x7FFF ) is the offset in the qualToOi array
		// And evpW1( & 0x7FFF ) is the qualifier number.
		LPQOI CurrentQualToOiStart = PtrAddBytes(QualToOiList, p1 & 0x7FFF);
		LPQOI CurrentQualToOi = CurrentQualToOiStart;