//
// Asura_Platform_Physics_Solver.cpp
//
// Created by KJFL - 11 July 2008
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//

#include "Core/Asura.h"

// This file's header.
#include "Physics/Asura_Physics_Solver.h"

#ifndef ASURA_PHYSICS_USE_OLD_SOLVER

static u_char*	g_pucSolverMem = 0;

static const u_int uSOLVER_BUFFER_SIZE = 128 * 1024;
static const u_int uNUMBER_OF_BUFFERS = 1;


void Asura_Physics_Solver::Platform_Initialise( void )
{
	g_pucSolverMem = (u_char*)Asura_AllocateAlign( uSOLVER_BUFFER_SIZE * uNUMBER_OF_BUFFERS, ASURA_ALIGN_16_BYTE );

}
	
void Asura_Physics_Solver::Platform_Shutdown( void )
{
	if ( g_pucSolverMem )
	{
		Asura_DeallocateAlign( g_pucSolverMem );
		g_pucSolverMem = 0;
	}
}

void Asura_Physics_Solver::Platform_Begin( void )
{

}

void Asura_Physics_Solver::Platform_End( void )
{

}

u_char* Asura_Physics_Solver::Platform_GetSolverBuffer( void )
{
	return g_pucSolverMem;
}

u_int Asura_Physics_Solver::Platform_GetSolverBufferSize( void )
{
	return uSOLVER_BUFFER_SIZE;
}


bool Asura_Physics_Solver::Platform_SolveAllContacts( Asura_Physics_Solver_Data* pxTask )
{
	return false;
}

#endif