#ifndef CMATERIALLOADER_H #define CMATERIALLOADER_H #include "../CMaterialSet.h" #include "../EFormatVersion.h" #include #include #include class CMaterialLoader { // Material data CMaterialSet *mpSet; CInputStream *mpFile; EGame mVersion; std::vector> mTextures; bool mHasOPAC; bool mHas0x400; CColor mCorruptionColors[4]; u8 mCorruptionInts[5]; u32 mCorruptionFlags; std::vector mPassOffsets; CMaterialLoader(); ~CMaterialLoader(); // Load Functions void ReadPrimeMatSet(); CMaterial* ReadPrimeMaterial(); void ReadCorruptionMatSet(); CMaterial* ReadCorruptionMaterial(); void CreateCorruptionPasses(CMaterial *pMat); CMaterial* LoadAssimpMaterial(const aiMaterial *pAiMat); // Static public: static CMaterialSet* LoadMaterialSet(CInputStream& Mat, EGame Version); static CMaterialSet* ImportAssimpMaterials(const aiScene *pScene, EGame targetVersion); }; #endif // CMATERIALLOADER_H