//////////////////////////////////////////////////////////////////////////////
//
// Asura_PlatformTextureManagement.cpp
//
// Copyright (c) 2003 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

// I N C L U D E S ///////////////////////////////////////////////////////////

#include "Core/Asura.h"

// Engine independent.
#include "Core/Asura_TextureManagement.h"
#include "FileAccess/Asura_FileAccess.h"
#include "Core/Asura_TiledTextureManagement.h"

// C L A S S   I M P L E M E N T A T I O N S /////////////////////////////////

//
// Asura_Texture_Management.
//

void Asura_Texture_Management::Platform_LoadTexture(const Asura_String&, int ) { }
void Asura_Texture_Management::Platform_DestroyTexture( int ) { }
void Asura_Texture_Management::Platform_Initialise( void ) { }
void Asura_Texture_Management::Platform_Reset( void ) { }
void Asura_Texture_Management::Platform_Shutdown( void ) { }
void Asura_Texture_Management::ReloadTexture( int ) { }
void Asura_Texture_Management::Platform_LoadTextureFromResource( Asura_Handle iFileHandle, int iFileSize, int , u_int) 
{ 
#ifdef ASURA_SUPPORT_FILE_CHECKSUMS
	// dedicated servers need to read the data so the checksum matches that on
	// the client machines. Checksums could be precalculated to get around this.
	char* pcBuffer = new char[iFileSize];
	Asura_FileAccess::ReadData(iFileHandle, pcBuffer, iFileSize);
	delete[] pcBuffer;
#else
	Asura_FileAccess::SkipData( iFileHandle, iFileSize ); 
#endif
}

#if defined (ASURA_USE_TEXTURE_STREAMING)
#include "Core/Asura_Texture_Streaming.h"

void Asura_Texture_Streaming_System::Platform_Initialise() { }
void Asura_Texture_Streaming_System::Platform_Shutdown() { }

bool Asura_Texture_Streaming_System::Platform_StartStreaming( void )
{
	return false;
}

void Asura_Texture_Streaming_System::Platform_StreamTexture( Asura_Streaming_Texture& xTexture ) { }
void Asura_Texture_Streaming_System::Platform_EndStreaming( void ) { }
void Asura_Texture_Streaming_System::Platform_UnloadTexture( u_int uTextureID ) { }

#endif //defined (ASURA_USE_TEXTURE_STREAMING)
