Skip to content
Snippets Groups Projects
Commit 81665e79 authored by Shon Ferguson's avatar Shon Ferguson
Browse files

Fixed the array bug by reversing the template arguments and re-doing the...

Fixed the array bug by reversing the template arguments and re-doing the declarations in the Python script.
parent 78867004
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ public: ...@@ -51,7 +51,7 @@ public:
//! Data is allocated into a vector portion and the data section. //! Data is allocated into a vector portion and the data section.
//! The vector simply points to appropriate places in the data section. //! The vector simply points to appropriate places in the data section.
//! @param T Type of Vector //! @param T Type of Vector
template<typename T, size_t len_> template<size_t len_, typename T>
class array class array
{ {
typedef typename T * RawData; typedef typename T * RawData;
......
...@@ -58,7 +58,7 @@ struct NIFLIB_API SkinPartition { ...@@ -58,7 +58,7 @@ struct NIFLIB_API SkinPartition {
/*! /*!
* The vertex weights. * The vertex weights.
*/ */
vector<vector<float > > vertexWeights; vector< vector<float > > vertexWeights;
/*! /*!
* The strip lengths. * The strip lengths.
*/ */
...@@ -70,7 +70,7 @@ struct NIFLIB_API SkinPartition { ...@@ -70,7 +70,7 @@ struct NIFLIB_API SkinPartition {
/*! /*!
* The strips. * The strips.
*/ */
vector<vector<ushort > > strips; vector< vector<ushort > > strips;
/*! /*!
* The triangles. * The triangles.
*/ */
...@@ -82,7 +82,7 @@ struct NIFLIB_API SkinPartition { ...@@ -82,7 +82,7 @@ struct NIFLIB_API SkinPartition {
/*! /*!
* Bone indices, they index into 'Bones'. * Bone indices, they index into 'Bones'.
*/ */
vector<vector<byte > > boneIndices; vector< vector<byte > > boneIndices;
}; };
} }
......
...@@ -854,7 +854,7 @@ bool hasVertexColors; \ ...@@ -854,7 +854,7 @@ bool hasVertexColors; \
vector<Color4 > vertexColors; \ vector<Color4 > vertexColors; \
mutable ushort numUvSets; \ mutable ushort numUvSets; \
bool hasUv; \ bool hasUv; \
vector<vector<TexCoord > > uvSets; \ vector< vector<TexCoord > > uvSets; \
ushort unknownShort2; \ ushort unknownShort2; \
Ref<NiObject > unknownLink; \ Ref<NiObject > unknownLink; \
...@@ -1049,7 +1049,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -1049,7 +1049,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define BHK_CONVEX_VERTICES_SHAPE_MEMBERS \ #define BHK_CONVEX_VERTICES_SHAPE_MEMBERS \
array<float,7> unknownFloats1; \ array<7,float> unknownFloats1; \
mutable uint num1; \ mutable uint num1; \
vector<Float4 > unknownVectors1; \ vector<Float4 > unknownVectors1; \
mutable uint num2; \ mutable uint num2; \
...@@ -1078,7 +1078,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -1078,7 +1078,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define BHK_HINGE_CONSTRAINT_MEMBERS \ #define BHK_HINGE_CONSTRAINT_MEMBERS \
array<array<float,5>,4> unknownFloats; \ array< 5, array<4,float> > unknownFloats; \
#define BHK_HINGE_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ #define BHK_HINGE_CONSTRAINT_INCLUDE "AbhkConstraint.h" \
...@@ -1129,7 +1129,7 @@ return InternalGetRefs(); \ ...@@ -1129,7 +1129,7 @@ return InternalGetRefs(); \
mutable uint numSubShapes; \ mutable uint numSubShapes; \
vector<Ref<bhkShape > > subShapes; \ vector<Ref<bhkShape > > subShapes; \
HavokMaterial material; \ HavokMaterial material; \
array<float,6> unknownFloats; \ array<6,float> unknownFloats; \
mutable uint numUnknownInts; \ mutable uint numUnknownInts; \
vector<uint > unknownInts; \ vector<uint > unknownInts; \
...@@ -1191,7 +1191,7 @@ return InternalGetRefs(); \ ...@@ -1191,7 +1191,7 @@ return InternalGetRefs(); \
#define BHK_MOPP_BV_TREE_SHAPE_MEMBERS \ #define BHK_MOPP_BV_TREE_SHAPE_MEMBERS \
Ref<bhkShape > shape; \ Ref<bhkShape > shape; \
HavokMaterial material; \ HavokMaterial material; \
array<byte,8> unknownBytes1; \ array<8,byte> unknownBytes1; \
float unknownFloat; \ float unknownFloat; \
mutable uint numUnknownBytes2; \ mutable uint numUnknownBytes2; \
vector<byte > unknownBytes2; \ vector<byte > unknownBytes2; \
...@@ -1252,7 +1252,7 @@ return InternalGetRefs(); \ ...@@ -1252,7 +1252,7 @@ return InternalGetRefs(); \
#define BHK_NI_TRI_STRIPS_SHAPE_MEMBERS \ #define BHK_NI_TRI_STRIPS_SHAPE_MEMBERS \
float unknownFloat1; \ float unknownFloat1; \
uint unknownInt1; \ uint unknownInt1; \
array<uint,4> unknownInts1; \ array<4,uint> unknownInts1; \
uint unknownInt2; \ uint unknownInt2; \
Vector3 scale; \ Vector3 scale; \
uint unknownInt3; \ uint unknownInt3; \
...@@ -1285,10 +1285,10 @@ return InternalGetRefs(); \ ...@@ -1285,10 +1285,10 @@ return InternalGetRefs(); \
#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_MEMBERS \ #define BHK_PACKED_NI_TRI_STRIPS_SHAPE_MEMBERS \
mutable ushort numSubparts; \ mutable ushort numSubparts; \
vector< array<uint,3> > subparts; \ vector< array<3,uint> > subparts; \
array<float,9> unknownFloats; \ array<9,float> unknownFloats; \
float scale; \ float scale; \
array<float,3> unknownFloats2; \ array<3,float> unknownFloats2; \
Ref<hkPackedNiTriStripsData > data; \ Ref<hkPackedNiTriStripsData > data; \
#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_INCLUDE "AbhkShapeCollection.h" \ #define BHK_PACKED_NI_TRI_STRIPS_SHAPE_INCLUDE "AbhkShapeCollection.h" \
...@@ -1314,8 +1314,8 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -1314,8 +1314,8 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define BHK_PRISMATIC_CONSTRAINT_MEMBERS \ #define BHK_PRISMATIC_CONSTRAINT_MEMBERS \
array<Float4,8> unknownVectors; \ array<8,Float4> unknownVectors; \
array<float,3> unknownFloats2; \ array<3,float> unknownFloats2; \
#define BHK_PRISMATIC_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ #define BHK_PRISMATIC_CONSTRAINT_INCLUDE "AbhkConstraint.h" \
...@@ -1362,11 +1362,11 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -1362,11 +1362,11 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define BHK_RIGID_BODY_MEMBERS \ #define BHK_RIGID_BODY_MEMBERS \
array<float,5> unknown5Floats; \ array<5,float> unknown5Floats; \
array<ushort,4> unknown4Shorts; \ array<4,ushort> unknown4Shorts; \
OblivionLayer layerCopy; \ OblivionLayer layerCopy; \
byte colFilterCopy; \ byte colFilterCopy; \
array<ushort,7> unknown7Shorts; \ array<7,ushort> unknown7Shorts; \
Vector3 translation; \ Vector3 translation; \
float unknownFloat00; \ float unknownFloat00; \
QuaternionXYZW rotation; \ QuaternionXYZW rotation; \
...@@ -1374,7 +1374,7 @@ Vector3 linearVelocity; \ ...@@ -1374,7 +1374,7 @@ Vector3 linearVelocity; \
float unknownFloat01; \ float unknownFloat01; \
Vector3 angularVelocity; \ Vector3 angularVelocity; \
float unknownFloat02; \ float unknownFloat02; \
array<float,12> transform; \ array<12,float> transform; \
Vector3 center; \ Vector3 center; \
float unknownFloat03; \ float unknownFloat03; \
float mass; \ float mass; \
...@@ -1441,8 +1441,8 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -1441,8 +1441,8 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define BHK_SIMPLE_SHAPE_PHANTOM_MEMBERS \ #define BHK_SIMPLE_SHAPE_PHANTOM_MEMBERS \
array<float,7> unkownFloats; \ array<7,float> unkownFloats; \
array<array<float,3>,5> unknownFloats2; \ array< 3, array<5,float> > unknownFloats2; \
float unknownFloat; \ float unknownFloat; \
#define BHK_SIMPLE_SHAPE_PHANTOM_INCLUDE "bhkEntity.h" \ #define BHK_SIMPLE_SHAPE_PHANTOM_INCLUDE "bhkEntity.h" \
...@@ -1516,7 +1516,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -1516,7 +1516,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define BHK_STIFF_SPRING_CONSTRAINT_MEMBERS \ #define BHK_STIFF_SPRING_CONSTRAINT_MEMBERS \
array<array<float,2>,4> unknownFloats; \ array< 2, array<4,float> > unknownFloats; \
float unknownFloat; \ float unknownFloat; \
#define BHK_STIFF_SPRING_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ #define BHK_STIFF_SPRING_CONSTRAINT_INCLUDE "AbhkConstraint.h" \
...@@ -2147,7 +2147,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -2147,7 +2147,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_MEMBERS \ #define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_MEMBERS \
array<float,4> unknownFloats; \ array<4,float> unknownFloats; \
#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_INCLUDE "NiBSplineInterpolator.h" \ #define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_INCLUDE "NiBSplineInterpolator.h" \
...@@ -2171,7 +2171,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -2171,7 +2171,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_MEMBERS \ #define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_MEMBERS \
array<float,6> unknownFloats; \ array<6,float> unknownFloats; \
#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_INCLUDE "NiBSplineInterpolator.h" \ #define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_INCLUDE "NiBSplineInterpolator.h" \
...@@ -2304,8 +2304,8 @@ byte unknown3; \ ...@@ -2304,8 +2304,8 @@ byte unknown3; \
uint collisionType; \ uint collisionType; \
uint unknown5; \ uint unknown5; \
Vector3 unknown7; \ Vector3 unknown7; \
array<float,8> unknown6; \ array<8,float> unknown6; \
array<float,15> unknown8; \ array<15,float> unknown8; \
#define NI_COLLISION_DATA_INCLUDE "NiObject.h" \ #define NI_COLLISION_DATA_INCLUDE "NiObject.h" \
...@@ -2871,7 +2871,7 @@ mutable uint numRotationKeys; \ ...@@ -2871,7 +2871,7 @@ mutable uint numRotationKeys; \
KeyType rotationType; \ KeyType rotationType; \
vector<Key<Quaternion > > quaternionKeys; \ vector<Key<Quaternion > > quaternionKeys; \
float unknownFloat; \ float unknownFloat; \
array<KeyGroup<float >,3> xyzRotations; \ array<3,KeyGroup<float >> xyzRotations; \
KeyGroup<Vector3 > translations; \ KeyGroup<Vector3 > translations; \
KeyGroup<float > scales; \ KeyGroup<float > scales; \
...@@ -3067,9 +3067,9 @@ return InternalGetRefs(); \ ...@@ -3067,9 +3067,9 @@ return InternalGetRefs(); \
#define NI_MESH_P_SYS_DATA_MEMBERS \ #define NI_MESH_P_SYS_DATA_MEMBERS \
byte unknownByte11; \ byte unknownByte11; \
vector< array<float,4> > unknownFloats3; \ vector< array<4,float> > unknownFloats3; \
vector< array<float,10> > unknownFloats4; \ vector< array<10,float> > unknownFloats4; \
vector< array<float,12> > unknownFloats5; \ vector< array<12,float> > unknownFloats5; \
uint unknownInt1; \ uint unknownInt1; \
Ref<NiPSysModifier > modifier; \ Ref<NiPSysModifier > modifier; \
byte unknownByte2; \ byte unknownByte2; \
...@@ -3211,7 +3211,7 @@ return InternalGetRefs(); \ ...@@ -3211,7 +3211,7 @@ return InternalGetRefs(); \
#define FX_WIDGET_MEMBERS \ #define FX_WIDGET_MEMBERS \
byte unknown1; \ byte unknown1; \
array<byte,292> unknown292Bytes; \ array<292,byte> unknown292Bytes; \
#define FX_WIDGET_INCLUDE "NiNode.h" \ #define FX_WIDGET_INCLUDE "NiNode.h" \
...@@ -3358,7 +3358,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -3358,7 +3358,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define NI_L_O_D_NODE_MEMBERS \ #define NI_L_O_D_NODE_MEMBERS \
array<byte,4> unknown4Bytes; \ array<4,byte> unknown4Bytes; \
Vector3 lodCenter; \ Vector3 lodCenter; \
mutable uint numLodLevels; \ mutable uint numLodLevels; \
vector<LODRange > lodLevels; \ vector<LODRange > lodLevels; \
...@@ -3390,7 +3390,7 @@ return InternalGetRefs(); \ ...@@ -3390,7 +3390,7 @@ return InternalGetRefs(); \
#define NI_PALETTE_MEMBERS \ #define NI_PALETTE_MEMBERS \
byte unknownByte; \ byte unknownByte; \
uint numEntries_; \ uint numEntries_; \
array<array<byte,256>,4> palette; \ array< 256, array<4,byte> > palette; \
#define NI_PALETTE_INCLUDE "NiObject.h" \ #define NI_PALETTE_INCLUDE "NiObject.h" \
...@@ -3878,9 +3878,9 @@ uint greenMask; \ ...@@ -3878,9 +3878,9 @@ uint greenMask; \
uint blueMask; \ uint blueMask; \
uint alphaMask; \ uint alphaMask; \
uint bitsPerPixel; \ uint bitsPerPixel; \
array<byte,8> unknown8Bytes; \ array<8,byte> unknown8Bytes; \
uint unknownInt; \ uint unknownInt; \
array<byte,54> unknown54Bytes; \ array<54,byte> unknown54Bytes; \
Ref<NiPalette > palette; \ Ref<NiPalette > palette; \
mutable uint numMipmaps; \ mutable uint numMipmaps; \
uint bytesPerPixel; \ uint bytesPerPixel; \
...@@ -4057,9 +4057,9 @@ return InternalGetRefs(); \ ...@@ -4057,9 +4057,9 @@ return InternalGetRefs(); \
#define NI_P_SYS_BOMB_MODIFIER_MEMBERS \ #define NI_P_SYS_BOMB_MODIFIER_MEMBERS \
NiNode * unknownLink; \ NiNode * unknownLink; \
array<uint,2> unknownInts1; \ array<2,uint> unknownInts1; \
array<float,3> unknownFloats; \ array<3,float> unknownFloats; \
array<uint,2> unknownInts2; \ array<2,uint> unknownInts2; \
#define NI_P_SYS_BOMB_MODIFIER_INCLUDE "NiPSysModifier.h" \ #define NI_P_SYS_BOMB_MODIFIER_INCLUDE "NiPSysModifier.h" \
...@@ -4212,13 +4212,13 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -4212,13 +4212,13 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define NI_P_SYS_DATA_MEMBERS \ #define NI_P_SYS_DATA_MEMBERS \
vector< array<float,10> > unknownFloats4; \ vector< array<10,float> > unknownFloats4; \
bool unknownBool1; \ bool unknownBool1; \
vector< array<byte,32> > unknownBytes; \ vector< array<32,byte> > unknownBytes; \
vector< array<byte,28> > unknownBytesAlt; \ vector< array<28,byte> > unknownBytesAlt; \
byte unknownByte3; \ byte unknownByte3; \
bool unknownBool2; \ bool unknownBool2; \
vector< array<byte,4> > unknownBytes2; \ vector< array<4,byte> > unknownBytes2; \
uint unknownInt1; \ uint unknownInt1; \
#define NI_P_SYS_DATA_INCLUDE "APSysData.h" \ #define NI_P_SYS_DATA_INCLUDE "APSysData.h" \
...@@ -5466,7 +5466,7 @@ return InternalGetRefs(); \ ...@@ -5466,7 +5466,7 @@ return InternalGetRefs(); \
Vector3 translation; \ Vector3 translation; \
Quaternion rotation; \ Quaternion rotation; \
float scale; \ float scale; \
array<byte,3> unknownBytes; \ array<3,byte> unknownBytes; \
Ref<NiTransformData > data; \ Ref<NiTransformData > data; \
#define NI_TRANSFORM_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ #define NI_TRANSFORM_INTERPOLATOR_INCLUDE "NiInterpolator.h" \
...@@ -5572,7 +5572,7 @@ ushort numTriangles; \ ...@@ -5572,7 +5572,7 @@ ushort numTriangles; \
mutable ushort numStrips; \ mutable ushort numStrips; \
mutable vector<ushort > stripLengths; \ mutable vector<ushort > stripLengths; \
bool hasPoints; \ bool hasPoints; \
vector<vector<ushort > > points; \ vector< vector<ushort > > points; \
#define NI_TRI_STRIPS_DATA_INCLUDE "NiTriBasedGeomData.h" \ #define NI_TRI_STRIPS_DATA_INCLUDE "NiTriBasedGeomData.h" \
...@@ -5620,10 +5620,10 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -5620,10 +5620,10 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define NI_CLOD_DATA_MEMBERS \ #define NI_CLOD_DATA_MEMBERS \
array<ushort,5> unknown5Shorts; \ array<5,ushort> unknown5Shorts; \
float unknownFloat; \ float unknownFloat; \
uint unknownInt; \ uint unknownInt; \
array<ushort,44> unknownClodShorts; \ array<44,ushort> unknownClodShorts; \
#define NI_CLOD_DATA_INCLUDE "NiTriBasedGeomData.h" \ #define NI_CLOD_DATA_INCLUDE "NiTriBasedGeomData.h" \
...@@ -5674,7 +5674,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \ ...@@ -5674,7 +5674,7 @@ InternalFixLinks( objects, link_stack, version, user_version ); \
return InternalGetRefs(); \ return InternalGetRefs(); \
#define NI_U_V_DATA_MEMBERS \ #define NI_U_V_DATA_MEMBERS \
array<KeyGroup<float >,4> uvGroups; \ array<4,KeyGroup<float >> uvGroups; \
#define NI_U_V_DATA_INCLUDE "NiObject.h" \ #define NI_U_V_DATA_INCLUDE "NiObject.h" \
......
...@@ -72,8 +72,8 @@ public: ...@@ -72,8 +72,8 @@ public:
/*! /*!
* Seems to be some kind of transformation matrix, scale or translation? * Seems to be some kind of transformation matrix, scale or translation?
*/ */
array<float,12> GetTransform() const; array<12,float> GetTransform() const;
void SetTransform( const array<float,12>& value ); void SetTransform( const array<12,float>& value );
/*! /*!
* The object's center. * The object's center.
......
...@@ -77,11 +77,11 @@ void bhkRigidBody::SetAngularVelocity( const Vector3 & value ) { ...@@ -77,11 +77,11 @@ void bhkRigidBody::SetAngularVelocity( const Vector3 & value ) {
angularVelocity = value; angularVelocity = value;
} }
array<float,12> bhkRigidBody::GetTransform() const { array<12,float> bhkRigidBody::GetTransform() const {
return transform; return transform;
} }
void bhkRigidBody::SetTransform( const array<float,12>& value ) { void bhkRigidBody::SetTransform( const array<12,float>& value ) {
transform = value; transform = value;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment