|
@@ -89,16 +89,12 @@ public:
|
|
MDLImporter();
|
|
MDLImporter();
|
|
~MDLImporter();
|
|
~MDLImporter();
|
|
|
|
|
|
-
|
|
|
|
-public:
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Returns whether the class can handle the format of the given file.
|
|
/** Returns whether the class can handle the format of the given file.
|
|
* See BaseImporter::CanRead() for details. */
|
|
* See BaseImporter::CanRead() for details. */
|
|
bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
|
|
bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
|
|
bool checkSig) const;
|
|
bool checkSig) const;
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Called prior to ReadFile().
|
|
/** Called prior to ReadFile().
|
|
* The function is a request to the importer to update its configuration
|
|
* The function is a request to the importer to update its configuration
|
|
@@ -107,8 +103,6 @@ public:
|
|
void SetupProperties(const Importer* pImp);
|
|
void SetupProperties(const Importer* pImp);
|
|
|
|
|
|
protected:
|
|
protected:
|
|
-
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Return importer meta information.
|
|
/** Return importer meta information.
|
|
* See #BaseImporter::GetInfo for the details
|
|
* See #BaseImporter::GetInfo for the details
|
|
@@ -122,8 +116,6 @@ protected:
|
|
void InternReadFile( const std::string& pFile, aiScene* pScene,
|
|
void InternReadFile( const std::string& pFile, aiScene* pScene,
|
|
IOSystem* pIOHandler);
|
|
IOSystem* pIOHandler);
|
|
|
|
|
|
-protected:
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Import a quake 1 MDL file (IDPO)
|
|
/** Import a quake 1 MDL file (IDPO)
|
|
*/
|
|
*/
|
|
@@ -154,7 +146,6 @@ protected:
|
|
void SizeCheck(const void* szPos);
|
|
void SizeCheck(const void* szPos);
|
|
void SizeCheck(const void* szPos, const char* szFile, unsigned int iLine);
|
|
void SizeCheck(const void* szPos, const char* szFile, unsigned int iLine);
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Validate the header data structure of a game studio MDL7 file
|
|
/** Validate the header data structure of a game studio MDL7 file
|
|
* \param pcHeader Input header to be validated
|
|
* \param pcHeader Input header to be validated
|
|
@@ -167,7 +158,6 @@ protected:
|
|
*/
|
|
*/
|
|
void ValidateHeader_Quake1(const MDL::Header* pcHeader);
|
|
void ValidateHeader_Quake1(const MDL::Header* pcHeader);
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Try to load a palette from the current directory (colormap.lmp)
|
|
/** Try to load a palette from the current directory (colormap.lmp)
|
|
* If it is not found the default palette of Quake1 is returned
|
|
* If it is not found the default palette of Quake1 is returned
|
|
@@ -179,9 +169,8 @@ protected:
|
|
*/
|
|
*/
|
|
void FreePalette(const unsigned char* pszColorMap);
|
|
void FreePalette(const unsigned char* pszColorMap);
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
- /** Load a paletized texture from the file and convert it to 32bpp
|
|
|
|
|
|
+ /** Load a palletized texture from the file and convert it to 32bpp
|
|
*/
|
|
*/
|
|
void CreateTextureARGB8_3DGS_MDL3(const unsigned char* szData);
|
|
void CreateTextureARGB8_3DGS_MDL3(const unsigned char* szData);
|
|
|
|
|
|
@@ -195,7 +184,6 @@ protected:
|
|
unsigned int iType,
|
|
unsigned int iType,
|
|
unsigned int* piSkip);
|
|
unsigned int* piSkip);
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Used to load textures from MDL5
|
|
/** Used to load textures from MDL5
|
|
* \param szData Input data
|
|
* \param szData Input data
|
|
@@ -206,7 +194,6 @@ protected:
|
|
unsigned int iType,
|
|
unsigned int iType,
|
|
unsigned int* piSkip);
|
|
unsigned int* piSkip);
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Checks whether a texture can be replaced with a single color
|
|
/** Checks whether a texture can be replaced with a single color
|
|
* This is useful for all file formats before MDL7 (all those
|
|
* This is useful for all file formats before MDL7 (all those
|
|
@@ -218,14 +205,12 @@ protected:
|
|
*/
|
|
*/
|
|
aiColor4D ReplaceTextureWithColor(const aiTexture* pcTexture);
|
|
aiColor4D ReplaceTextureWithColor(const aiTexture* pcTexture);
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Converts the absolute texture coordinates in MDL5 files to
|
|
/** Converts the absolute texture coordinates in MDL5 files to
|
|
* relative in a range between 0 and 1
|
|
* relative in a range between 0 and 1
|
|
*/
|
|
*/
|
|
void CalculateUVCoordinates_MDL5();
|
|
void CalculateUVCoordinates_MDL5();
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Read an UV coordinate from the file. If the file format is not
|
|
/** Read an UV coordinate from the file. If the file format is not
|
|
* MDL5, the function calculates relative texture coordinates
|
|
* MDL5, the function calculates relative texture coordinates
|
|
@@ -245,7 +230,6 @@ protected:
|
|
*/
|
|
*/
|
|
void SetupMaterialProperties_3DGS_MDL5_Quake1( );
|
|
void SetupMaterialProperties_3DGS_MDL5_Quake1( );
|
|
|
|
|
|
-
|
|
|
|
// -------------------------------------------------------------------
|
|
// -------------------------------------------------------------------
|
|
/** Parse a skin lump in a MDL7/HMP7 file with all of its features
|
|
/** Parse a skin lump in a MDL7/HMP7 file with all of its features
|
|
* variant 1: Current cursor position is the beginning of the skin header
|
|
* variant 1: Current cursor position is the beginning of the skin header
|