#include "BlitzPointer.h"

// No Parameters
CALLFUNCTION_DECL_BEGIN(0)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
	CALLFUNCTION_IMPL_SAFEGUARD()
	CALLFUNCTION_IMPL_CALL()
	CALLFUNCTION_IMPL_RESULT()
	CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction0=_BlitzPointer_CallFunction0@4")

// One Parameter
CALLFUNCTION_DECL_BEGIN(1)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
	CALLFUNCTION_IMPL_SAFEGUARD()
	CALLFUNCTION_IMPL_PREPARE(1)
	CALLFUNCTION_IMPL_PARAMETER(0, p1)
	CALLFUNCTION_IMPL_CALL()
	CALLFUNCTION_IMPL_RESULT()
	CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction1=_BlitzPointer_CallFunction1@8")

// Two Parameters
CALLFUNCTION_DECL_BEGIN(2)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
	CALLFUNCTION_IMPL_SAFEGUARD()
	CALLFUNCTION_IMPL_PREPARE(2)
	CALLFUNCTION_IMPL_PARAMETER(1, p2)
	CALLFUNCTION_IMPL_PARAMETER(0, p1)
	CALLFUNCTION_IMPL_CALL()
	CALLFUNCTION_IMPL_RESULT()
	CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction2=_BlitzPointer_CallFunction2@12")

// Three Parameters
CALLFUNCTION_DECL_BEGIN(3)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p3)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
	CALLFUNCTION_IMPL_SAFEGUARD()
	CALLFUNCTION_IMPL_PREPARE(3)
	CALLFUNCTION_IMPL_PARAMETER(2, p3)
	CALLFUNCTION_IMPL_PARAMETER(1, p2)
	CALLFUNCTION_IMPL_PARAMETER(0, p1)
	CALLFUNCTION_IMPL_CALL()
	CALLFUNCTION_IMPL_RESULT()
	CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction3=_BlitzPointer_CallFunction3@16")

// Four Parameters
CALLFUNCTION_DECL_BEGIN(4)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p1)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p2)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p3)
	CALLFUNCTION_DECL_PARAMETER(int32_t, p4)
CALLFUNCTION_DECL_END() CALLFUNCTION_IMPL_BEGIN()
	CALLFUNCTION_IMPL_SAFEGUARD()
	CALLFUNCTION_IMPL_PREPARE(4)
	CALLFUNCTION_IMPL_PARAMETER(3, p4)
	CALLFUNCTION_IMPL_PARAMETER(2, p3)
	CALLFUNCTION_IMPL_PARAMETER(1, p2)
	CALLFUNCTION_IMPL_PARAMETER(0, p1)
	CALLFUNCTION_IMPL_CALL()
	CALLFUNCTION_IMPL_RESULT()
	CALLFUNCTION_IMPL_RETURN()
CALLFUNCTION_IMPL_END()
#pragma comment(linker, "/EXPORT:BlitzPointer_CallFunction4=_BlitzPointer_CallFunction4@20")
