From 24b42274fbc8d68ca45570b31f29582479f45572 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 21 Sep 2018 20:13:35 +0200 Subject: [PATCH] Update MDCFileData.h Fix build by remove not supported initializer for array. --- code/MDCFileData.h | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/code/MDCFileData.h b/code/MDCFileData.h index 8e9bdfe6c..c599a930a 100644 --- a/code/MDCFileData.h +++ b/code/MDCFileData.h @@ -61,7 +61,6 @@ http://themdcfile.planetwolfenstein.gamespy.com/MDC_File_Format.pdf namespace Assimp { namespace MDC { - // to make it easier for us, we test the magic word against both "endianesses" #define AI_MDC_MAGIC_NUMBER_BE AI_MAKE_MAGIC("CPDI") #define AI_MDC_MAGIC_NUMBER_LE AI_MAKE_MAGIC("IDPC") @@ -79,8 +78,7 @@ namespace MDC { // --------------------------------------------------------------------------- /** \brief Data structure for a MDC file's main header */ -struct Header -{ +struct Header { uint32_t ulIdent ; uint32_t ulVersion ; char ucName [ AI_MDC_MAXQPATH ] ; @@ -100,8 +98,7 @@ struct Header // --------------------------------------------------------------------------- /** \brief Data structure for a MDC file's surface header */ -struct Surface -{ +struct Surface { uint32_t ulIdent ; char ucName [ AI_MDC_MAXQPATH ] ; uint32_t ulFlags ; @@ -120,7 +117,6 @@ struct Surface uint32_t ulOffsetEnd; Surface() AI_NO_EXCEPT : ulIdent() - , ucName{ 0 } , ulFlags() , ulNumCompFrames() , ulNumBaseFrames() @@ -142,8 +138,7 @@ struct Surface // --------------------------------------------------------------------------- /** \brief Data structure for a MDC frame */ -struct Frame -{ +struct Frame { //! bounding box minimum coords aiVector3D bboxMin ; @@ -163,24 +158,21 @@ struct Frame // --------------------------------------------------------------------------- /** \brief Data structure for a MDC triangle */ -struct Triangle -{ +struct Triangle { uint32_t aiIndices[3]; } PACK_STRUCT; // --------------------------------------------------------------------------- /** \brief Data structure for a MDC texture coordinate */ -struct TexturCoord -{ +struct TexturCoord { float u,v; } PACK_STRUCT; // --------------------------------------------------------------------------- /** \brief Data structure for a MDC base vertex */ -struct BaseVertex -{ +struct BaseVertex { int16_t x,y,z; uint16_t normal; } PACK_STRUCT; @@ -188,25 +180,20 @@ struct BaseVertex // --------------------------------------------------------------------------- /** \brief Data structure for a MDC compressed vertex */ -struct CompressedVertex -{ +struct CompressedVertex { uint8_t xd,yd,zd,nd; } PACK_STRUCT; - // --------------------------------------------------------------------------- /** \brief Data structure for a MDC shader */ -struct Shader -{ +struct Shader { char ucName [ AI_MDC_MAXQPATH ] ; uint32_t ulPath; - } PACK_STRUCT; #include - // --------------------------------------------------------------------------- /** Build a floating point vertex from the compressed data in MDC files */ @@ -215,6 +202,7 @@ void BuildVertex(const Frame& frame, const CompressedVertex& cvert, aiVector3D& vXYZOut, aiVector3D& vNorOut); -}} +} +} #endif // !! AI_MDCFILEHELPER_H_INC