📄 unobjbas.h
字号:
DECLARE_FUNCTION(execAddEqual_RotatorRotator)
DECLARE_FUNCTION(execSubtract_RotatorRotator)
DECLARE_FUNCTION(execAdd_RotatorRotator)
DECLARE_FUNCTION(execDivideEqual_RotatorFloat)
DECLARE_FUNCTION(execMultiplyEqual_RotatorFloat)
DECLARE_FUNCTION(execDivide_RotatorFloat)
DECLARE_FUNCTION(execMultiply_FloatRotator)
DECLARE_FUNCTION(execMultiply_RotatorFloat)
DECLARE_FUNCTION(execNotEqual_RotatorRotator)
DECLARE_FUNCTION(execEqualEqual_RotatorRotator)
DECLARE_FUNCTION(execMirrorVectorByNormal)
DECLARE_FUNCTION(execVRand)
DECLARE_FUNCTION(execInvert)
DECLARE_FUNCTION(execNormal)
DECLARE_FUNCTION(execVSize)
DECLARE_FUNCTION(execSubtractEqual_VectorVector)
DECLARE_FUNCTION(execAddEqual_VectorVector)
DECLARE_FUNCTION(execDivideEqual_VectorFloat)
DECLARE_FUNCTION(execMultiplyEqual_VectorVector)
DECLARE_FUNCTION(execMultiplyEqual_VectorFloat)
DECLARE_FUNCTION(execCross_VectorVector)
DECLARE_FUNCTION(execDot_VectorVector)
DECLARE_FUNCTION(execNotEqual_VectorVector)
DECLARE_FUNCTION(execEqualEqual_VectorVector)
DECLARE_FUNCTION(execGreaterGreater_VectorRotator)
DECLARE_FUNCTION(execLessLess_VectorRotator)
DECLARE_FUNCTION(execSubtract_VectorVector)
DECLARE_FUNCTION(execAdd_VectorVector)
DECLARE_FUNCTION(execDivide_VectorFloat)
DECLARE_FUNCTION(execMultiply_VectorVector)
DECLARE_FUNCTION(execMultiply_FloatVector)
DECLARE_FUNCTION(execMultiply_VectorFloat)
DECLARE_FUNCTION(execSubtract_PreVector)
DECLARE_FUNCTION(execOrthoRotation);
DECLARE_FUNCTION(execNormalize);
DECLARE_FUNCTION(execObjectToBool)
DECLARE_FUNCTION(execObjectToString)
DECLARE_FUNCTION(execNameToBool)
DECLARE_FUNCTION(execNameToString)
DECLARE_FUNCTION(execStringToByte)
DECLARE_FUNCTION(execStringToInt)
DECLARE_FUNCTION(execStringToBool)
DECLARE_FUNCTION(execStringToFloat)
DECLARE_FUNCTION(execNot_PreBool)
DECLARE_FUNCTION(execEqualEqual_BoolBool)
DECLARE_FUNCTION(execNotEqual_BoolBool)
DECLARE_FUNCTION(execAndAnd_BoolBool)
DECLARE_FUNCTION(execXorXor_BoolBool)
DECLARE_FUNCTION(execOrOr_BoolBool)
DECLARE_FUNCTION(execMultiplyEqual_ByteByte)
DECLARE_FUNCTION(execDivideEqual_ByteByte)
DECLARE_FUNCTION(execAddEqual_ByteByte)
DECLARE_FUNCTION(execSubtractEqual_ByteByte)
DECLARE_FUNCTION(execAddAdd_PreByte)
DECLARE_FUNCTION(execSubtractSubtract_PreByte)
DECLARE_FUNCTION(execAddAdd_Byte)
DECLARE_FUNCTION(execSubtractSubtract_Byte)
DECLARE_FUNCTION(execComplement_PreInt)
DECLARE_FUNCTION(execSubtract_PreInt)
DECLARE_FUNCTION(execMultiply_IntInt)
DECLARE_FUNCTION(execDivide_IntInt)
DECLARE_FUNCTION(execAdd_IntInt)
DECLARE_FUNCTION(execSubtract_IntInt)
DECLARE_FUNCTION(execLessLess_IntInt)
DECLARE_FUNCTION(execGreaterGreater_IntInt)
DECLARE_FUNCTION(execGreaterGreaterGreater_IntInt)
DECLARE_FUNCTION(execLess_IntInt)
DECLARE_FUNCTION(execGreater_IntInt)
DECLARE_FUNCTION(execLessEqual_IntInt)
DECLARE_FUNCTION(execGreaterEqual_IntInt)
DECLARE_FUNCTION(execEqualEqual_IntInt)
DECLARE_FUNCTION(execNotEqual_IntInt)
DECLARE_FUNCTION(execAnd_IntInt)
DECLARE_FUNCTION(execXor_IntInt)
DECLARE_FUNCTION(execOr_IntInt)
DECLARE_FUNCTION(execMultiplyEqual_IntFloat)
DECLARE_FUNCTION(execDivideEqual_IntFloat)
DECLARE_FUNCTION(execAddEqual_IntInt)
DECLARE_FUNCTION(execSubtractEqual_IntInt)
DECLARE_FUNCTION(execAddAdd_PreInt)
DECLARE_FUNCTION(execSubtractSubtract_PreInt)
DECLARE_FUNCTION(execAddAdd_Int)
DECLARE_FUNCTION(execSubtractSubtract_Int)
DECLARE_FUNCTION(execRand)
DECLARE_FUNCTION(execMin)
DECLARE_FUNCTION(execMax)
DECLARE_FUNCTION(execClamp)
DECLARE_FUNCTION(execSubtract_PreFloat)
DECLARE_FUNCTION(execMultiplyMultiply_FloatFloat)
DECLARE_FUNCTION(execMultiply_FloatFloat)
DECLARE_FUNCTION(execDivide_FloatFloat)
DECLARE_FUNCTION(execPercent_FloatFloat)
DECLARE_FUNCTION(execAdd_FloatFloat)
DECLARE_FUNCTION(execSubtract_FloatFloat)
DECLARE_FUNCTION(execLess_FloatFloat)
DECLARE_FUNCTION(execGreater_FloatFloat)
DECLARE_FUNCTION(execLessEqual_FloatFloat)
DECLARE_FUNCTION(execGreaterEqual_FloatFloat)
DECLARE_FUNCTION(execEqualEqual_FloatFloat)
DECLARE_FUNCTION(execNotEqual_FloatFloat)
DECLARE_FUNCTION(execComplementEqual_FloatFloat)
DECLARE_FUNCTION(execMultiplyEqual_FloatFloat)
DECLARE_FUNCTION(execDivideEqual_FloatFloat)
DECLARE_FUNCTION(execAddEqual_FloatFloat)
DECLARE_FUNCTION(execSubtractEqual_FloatFloat)
DECLARE_FUNCTION(execAbs)
DECLARE_FUNCTION(execSin)
DECLARE_FUNCTION(execCos)
DECLARE_FUNCTION(execTan)
DECLARE_FUNCTION(execAtan)
DECLARE_FUNCTION(execExp)
DECLARE_FUNCTION(execLoge)
DECLARE_FUNCTION(execSqrt)
DECLARE_FUNCTION(execSquare)
DECLARE_FUNCTION(execFRand)
DECLARE_FUNCTION(execFMin)
DECLARE_FUNCTION(execFMax)
DECLARE_FUNCTION(execFClamp)
DECLARE_FUNCTION(execLerp)
DECLARE_FUNCTION(execSmerp)
DECLARE_FUNCTION(execConcat_StringString)
DECLARE_FUNCTION(execAt_StringString)
DECLARE_FUNCTION(execLess_StringString)
DECLARE_FUNCTION(execGreater_StringString)
DECLARE_FUNCTION(execLessEqual_StringString)
DECLARE_FUNCTION(execGreaterEqual_StringString)
DECLARE_FUNCTION(execEqualEqual_StringString)
DECLARE_FUNCTION(execNotEqual_StringString)
DECLARE_FUNCTION(execComplementEqual_StringString)
DECLARE_FUNCTION(execLen)
DECLARE_FUNCTION(execInStr)
DECLARE_FUNCTION(execMid)
DECLARE_FUNCTION(execLeft)
DECLARE_FUNCTION(execRight)
DECLARE_FUNCTION(execCaps)
DECLARE_FUNCTION(execChr)
DECLARE_FUNCTION(execAsc)
DECLARE_FUNCTION(execEqualEqual_ObjectObject)
DECLARE_FUNCTION(execNotEqual_ObjectObject)
DECLARE_FUNCTION(execEqualEqual_NameName)
DECLARE_FUNCTION(execNotEqual_NameName)
DECLARE_FUNCTION(execLog)
DECLARE_FUNCTION(execWarn)
DECLARE_FUNCTION(execNew)
DECLARE_FUNCTION(execClassIsChildOf)
DECLARE_FUNCTION(execClassContext)
DECLARE_FUNCTION(execGoto)
DECLARE_FUNCTION(execGotoState)
DECLARE_FUNCTION(execIsA)
DECLARE_FUNCTION(execEnable)
DECLARE_FUNCTION(execDisable)
DECLARE_FUNCTION(execIterator)
DECLARE_FUNCTION(execLocalize)
DECLARE_FUNCTION(execNativeParm)
DECLARE_FUNCTION(execGetPropertyText)
DECLARE_FUNCTION(execSetPropertyText)
DECLARE_FUNCTION(execSaveConfig)
DECLARE_FUNCTION(execStaticSaveConfig)
DECLARE_FUNCTION(execResetConfig)
DECLARE_FUNCTION(execGetEnum)
DECLARE_FUNCTION(execDynamicLoadObject)
DECLARE_FUNCTION(execIsInState)
DECLARE_FUNCTION(execGetStateName)
DECLARE_FUNCTION(execHighNative0)
DECLARE_FUNCTION(execHighNative1)
DECLARE_FUNCTION(execHighNative2)
DECLARE_FUNCTION(execHighNative3)
DECLARE_FUNCTION(execHighNative4)
DECLARE_FUNCTION(execHighNative5)
DECLARE_FUNCTION(execHighNative6)
DECLARE_FUNCTION(execHighNative7)
DECLARE_FUNCTION(execHighNative8)
DECLARE_FUNCTION(execHighNative9)
DECLARE_FUNCTION(execHighNative10)
DECLARE_FUNCTION(execHighNative11)
DECLARE_FUNCTION(execHighNative12)
DECLARE_FUNCTION(execHighNative13)
DECLARE_FUNCTION(execHighNative14)
DECLARE_FUNCTION(execHighNative15)
// UnrealScript calling stubs.
void eventBeginState()
{
ProcessEvent(FindFunctionChecked(NAME_BeginState),NULL);
}
void eventEndState()
{
ProcessEvent(FindFunctionChecked(NAME_EndState),NULL);
}
};
/*----------------------------------------------------------------------------
Core templates.
----------------------------------------------------------------------------*/
// Hash function.
inline DWORD GetTypeHash( const UObject* A )
{
return A ? A->GetIndex() : 0;
}
// Parse an object name in the input stream.
template< class T > UBOOL ParseObject( const TCHAR* Stream, const TCHAR* Match, T*& Obj, UObject* Outer )
{
return ParseObject( Stream, Match, T::StaticClass(), *(UObject **)&Obj, Outer );
}
// Find an optional object.
template< class T > T* FindObject( UObject* Outer, const TCHAR* Name, UBOOL ExactClass=0 )
{
return (T*)UObject::StaticFindObject( T::StaticClass(), Outer, Name, ExactClass );
}
// Find an object, no failure allowed.
template< class T > T* FindObjectChecked( UObject* Outer, const TCHAR* Name, UBOOL ExactClass=0 )
{
return (T*)UObject::StaticFindObjectChecked( T::StaticClass(), Outer, Name, ExactClass );
}
// Dynamically cast an object type-safely.
template< class T > T* Cast( UObject* Src )
{
return Src && Src->IsA(T::StaticClass()) ? (T*)Src : NULL;
}
template< class T, class U > T* CastChecked( U* Src )
{
if( !Src || !Src->IsA(T::StaticClass()) )
appErrorf( TEXT("Cast of %s to %s failed"), Src ? Src->GetFullName() : TEXT("NULL"), T::StaticClass()->GetName() );
return (T*)Src;
}
// Construct an object of a particular class.
template< class T > T* ConstructObject( UClass* Class, UObject* Outer=(UObject*)-1, FName Name=NAME_None, DWORD SetFlags=0 )
{
check(Class->IsChildOf(T::StaticClass()));
if( Outer==(UObject*)-1 )
Outer = UObject::GetTransientPackage();
return (T*)UObject::StaticConstructObject( Class, Outer, Name, SetFlags );
}
// Load an object.
template< class T > T* LoadObject( UObject* Outer, const TCHAR* Name, const TCHAR* Filename, DWORD LoadFlags, FPackageMap* Sandbox )
{
return (T*)UObject::StaticLoadObject( T::StaticClass(), Outer, Name, Filename, LoadFlags, Sandbox );
}
// Load a class object.
template< class T > UClass* LoadClass( UObject* Outer, const TCHAR* Name, const TCHAR* Filename, DWORD LoadFlags, FPackageMap* Sandbox )
{
return UObject::StaticLoadClass( T::StaticClass(), Outer, Name, Filename, LoadFlags, Sandbox );
}
// Get default object of a class.
template< class T > T* GetDefault()
{
return (T*)&T::StaticClass()->Defaults(0);
}
/*----------------------------------------------------------------------------
Object iterators.
----------------------------------------------------------------------------*/
//
// Class for iterating through all objects.
//
class FObjectIterator
{
public:
FObjectIterator( UClass* InClass=UObject::StaticClass() )
: Class( InClass ), Index( -1 )
{
check(Class);
++*this;
}
void operator++()
{
while( ++Index<UObject::GObjObjects.Num() && (!UObject::GObjObjects(Index) || !UObject::GObjObjects(Index)->IsA(Class)) );
}
UObject* operator*()
{
return UObject::GObjObjects(Index);
}
UObject* operator->()
{
return UObject::GObjObjects(Index);
}
operator UBOOL()
{
return Index<UObject::GObjObjects.Num();
}
protected:
UClass* Class;
INT Index;
};
//
// Class for iterating through all objects which inherit from a
// specified base class.
//
template< class T > class TObjectIterator : public FObjectIterator
{
public:
TObjectIterator()
: FObjectIterator( T::StaticClass() )
{}
T* operator* ()
{
return (T*)FObjectIterator::operator*();
}
T* operator-> ()
{
return (T*)FObjectIterator::operator->();
}
};
/*----------------------------------------------------------------------------
The End.
----------------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -