#include "ScaleformCallbacks.h"
#include <typeinfo>

UInt32 g_GFxFunctionHandler_count = 0;

GFxFunctionHandler::GFxFunctionHandler()
{
	g_GFxFunctionHandler_count++;
}

GFxFunctionHandler::~GFxFunctionHandler()
{
	g_GFxFunctionHandler_count--;
}

FunctionHandlerCache g_functionHandlerCache;

RelocAddr<FxDelegateHandler::Callback> PlaySoundCallback(0x008D8D30);

FxResponseArgsList::FxResponseArgsList()
{
	CALL_MEMBER_FN(this, ctor)();
}
FxResponseArgsList::~FxResponseArgsList()
{
	Clear();
}

void FxResponseArgsList::Clear()
{
	if (args.values) {
		for (UInt32 i = 0; i < args.size; i++)
			args.values[i].CleanManaged();
		ScaleformHeap_Free(args.values);
		args.values = NULL;
		args.size = 0;
	}
}
