//
// Asura_Chunk_ResourceFile_PC_SmoothSkin.h
//
// Created by RJF - 08 August 2006
//
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_CHUNK_RESOURCEFILE_PC_SMOOTHSKIN_H__
#define __ASURA_CHUNK_RESOURCEFILE_PC_SMOOTHSKIN_H__

#include "ChunkSystem/Asura_Chunk_ResourceFile.h"
#include "Core/Asura_Handle.h"

#if !defined(ASURA_PC_USE_SHADER_MODEL_3_SMOOTH_SKIN_RENDERER) || !ASURA_PC_USE_SHADER_MODEL_3_SMOOTH_SKIN_RENDERER
#error The SM3 smooth skin renderer is not enabled in the project config; please ensure that its files are removed and not referenced.
#endif

class Asura_Chunk_Stream;
class Asura_Direct3D_SmoothSkin;

// Version Log
// 0  : RJF 8Aug06 Initial implementation
// 1  : DMR 30Nov06 Added Element IDs to strips
// 2  : RAR 20/06/2007 Added second material response per polygon
// 3  : AS  04/01/2008 Added dual layer support
// 4  : AS  02/04/2008 Added support for bone maps

static const int iASURA_CHUNK_PC_SMOOTHSKIN_VERSION = 4;

static const u_int uASURA_CHUNK_PC_SMOOTHSKIN_FLAG_TRILIST = 0x00000001;//otherwise data is strips. RAR 05/01/2007
static const u_int uASURA_CHUNK_PC_SMOOTHSKIN_FLAG_MATERIALRESPONSE = 0x00000002;


class Asura_Chunk_ResourceFile_PC_SmoothSkin : public Asura_Chunk_ResourceFile
{
public:

	// M E T H O D S /////////////////////////////////////////////////////

	bool Process( Asura_Handle hFile );

	Asura_Direct3D_SmoothSkin* ProcessFromChunkStream( Asura_Chunk_Stream& xStream, 
		bool bWarnIfMeshExists, 
		bool bConvertMaterialIDs  ) const;
};

#endif//__ASURA_CHUNK_RESOURCEFILE_PC_SMOOTHSKIN_H__