merge
This commit is contained in:
commit
600c21a69c
244 changed files with 770 additions and 763 deletions
|
@ -103,7 +103,7 @@ public:
|
|||
*/
|
||||
uint getNumAnimation () const
|
||||
{
|
||||
return _Animation.size();
|
||||
return (uint)_Animation.size();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,7 +138,7 @@ public:
|
|||
*/
|
||||
uint getNumSkeletonWeight () const
|
||||
{
|
||||
return _SkeletonWeight.size();
|
||||
return (uint)_SkeletonWeight.size();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
void link (CPortal* portal);
|
||||
void unlink (CPortal* portal);
|
||||
|
||||
uint32 getNbPortals() {return _Portals.size();}
|
||||
uint32 getNbPortals() {return (uint32)_Portals.size();}
|
||||
CPortal* getPortal(uint32 pos) {return _Portals[pos];}
|
||||
|
||||
/// Serial
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
uint size() const
|
||||
{
|
||||
return _indexedColors.size();
|
||||
return (uint)_indexedColors.size();
|
||||
}
|
||||
|
||||
uint getIndex(uint i) const
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
/// Get the head on the array of elements. NULL if none
|
||||
void **begin() { if(_Elements.empty()) return NULL; else return &_Elements[0];}
|
||||
/// get the number of elements
|
||||
uint size() const {return _Elements.size();}
|
||||
uint size() const {return (uint)_Elements.size();}
|
||||
bool empty() const {return _Elements.empty();}
|
||||
|
||||
/// clear the list
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
void addMask(const NLMISC::CBitmap &bmp, uint threshold= 15);
|
||||
|
||||
/// get num of masks
|
||||
uint getNumMasks() const {return _Masks.size();}
|
||||
uint getNumMasks() const {return (uint)_Masks.size();}
|
||||
|
||||
/** build a texture with a HLS Color Delta
|
||||
* \param colDelta array of delta to apply to the bitmap (must be of numMasks entries)
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
bool buildTexture(sint textId, NLMISC::CBitmap &out) const;
|
||||
|
||||
/// Texture name access
|
||||
uint getNumTextures() const {return _Instances.size();}
|
||||
uint getNumTextures() const {return (uint)_Instances.size();}
|
||||
const char *getTextureName(uint i) const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -178,7 +178,7 @@ public:
|
|||
uint getNumTriangles() const {return _NumTriangles;}
|
||||
|
||||
/// get the number of bones
|
||||
uint getNumBones() const {return _Bones.size();}
|
||||
uint getNumBones() const {return (uint)_Bones.size();}
|
||||
|
||||
/// get a bone id, according to its name. -1 if not found
|
||||
sint getBoneIdByName(const std::string &name) const;
|
||||
|
|
|
@ -392,12 +392,12 @@ public:
|
|||
const CVertexBuffer &getVertexBuffer() const { return _VBuffer ; }
|
||||
|
||||
/// get the number of matrix block
|
||||
uint getNbMatrixBlock() const { return _MatrixBlocks.size() ; }
|
||||
uint getNbMatrixBlock() const { return (uint)_MatrixBlocks.size() ; }
|
||||
|
||||
/** get the number of rendering pass for a given matrix block
|
||||
* \param matrixBlockIndex the index of the matrix block the rendering passes belong to
|
||||
*/
|
||||
uint getNbRdrPass(uint matrixBlockIndex) const { return _MatrixBlocks[matrixBlockIndex].RdrPass.size() ; }
|
||||
uint getNbRdrPass(uint matrixBlockIndex) const { return (uint)_MatrixBlocks[matrixBlockIndex].RdrPass.size() ; }
|
||||
|
||||
/** get the primitive block associated with a rendering pass of a matrix block
|
||||
* \param matrixBlockIndex the index of the matrix block the renderin pass belong to
|
||||
|
@ -418,7 +418,7 @@ public:
|
|||
}
|
||||
|
||||
/// get the number of BlendShapes
|
||||
uint getNbBlendShapes() const { if(_MeshMorpher) return _MeshMorpher->BlendShapes.size(); return 0; }
|
||||
uint getNbBlendShapes() const { if(_MeshMorpher) return (uint)_MeshMorpher->BlendShapes.size(); return 0; }
|
||||
|
||||
/** Tool function to retrieve vector geometry only of the mesh.
|
||||
* return false if the vbuffer cannot be read (resident)
|
||||
|
|
|
@ -185,7 +185,7 @@ public:
|
|||
/// Get the number of materials in the mesh
|
||||
uint getNbMaterial() const
|
||||
{
|
||||
return _Materials.size();
|
||||
return (uint)_Materials.size();
|
||||
}
|
||||
|
||||
/// Get a material
|
||||
|
|
|
@ -175,13 +175,13 @@ public:
|
|||
|
||||
/** get the number of LOD.
|
||||
*/
|
||||
uint getNbLod() const { return _Lods.size() ; }
|
||||
uint getNbLod() const { return (uint)_Lods.size() ; }
|
||||
|
||||
|
||||
/** get the number of rendering pass of a LOD.
|
||||
* \param lodId the id of the LOD.
|
||||
*/
|
||||
uint getNbRdrPass(uint lodId) const { return _Lods[lodId].RdrPass.size() ; }
|
||||
uint getNbRdrPass(uint lodId) const { return (uint)_Lods[lodId].RdrPass.size() ; }
|
||||
|
||||
|
||||
/** get the primitive block associated with a rendering pass of a LOD.
|
||||
|
@ -211,7 +211,7 @@ public:
|
|||
}
|
||||
|
||||
/// get the number of BlendShapes
|
||||
uint getNbBlendShapes() const { return _MeshMorpher.BlendShapes.size(); }
|
||||
uint getNbBlendShapes() const { return (uint)_MeshMorpher.BlendShapes.size(); }
|
||||
|
||||
/** Build a geometry copy for the given Lod. The VBuffer/IndexBuffer must not be resident. false if bad lodId
|
||||
* The process ensure there is no hole in the resulting vertices array. Hence VB num Verts != vertices.size().
|
||||
|
|
|
@ -152,13 +152,13 @@ public:
|
|||
|
||||
/** get the number of LOD.
|
||||
*/
|
||||
uint getNbLod() const { return _Lods.size() ; }
|
||||
uint getNbLod() const { return (uint)_Lods.size() ; }
|
||||
|
||||
|
||||
/** get the number of rendering pass of a LOD.
|
||||
* \param lodId the id of the LOD.
|
||||
*/
|
||||
uint getNbRdrPass(uint lodId) const { return _Lods[lodId].RdrPass.size() ; }
|
||||
uint getNbRdrPass(uint lodId) const { return (uint)_Lods[lodId].RdrPass.size() ; }
|
||||
|
||||
|
||||
/** get the primitive block associated with a rendering pass of a LOD.
|
||||
|
@ -294,7 +294,7 @@ private:
|
|||
// Get num triangle
|
||||
uint getNumTriangle () const
|
||||
{
|
||||
return PBlock.size()/3;
|
||||
return (uint)PBlock.size()/3;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -476,7 +476,7 @@ public:
|
|||
// Acces it
|
||||
uint getNumVertices() const
|
||||
{
|
||||
return _PackedBuffer.size();
|
||||
return (uint)_PackedBuffer.size();
|
||||
}
|
||||
|
||||
// Decompact position
|
||||
|
|
|
@ -142,7 +142,7 @@ public:
|
|||
/// Get slot mesh count.
|
||||
uint getNumSlotMesh () const
|
||||
{
|
||||
return _MeshVector.size();
|
||||
return (uint)_MeshVector.size();
|
||||
}
|
||||
|
||||
/// Get a slot mesh.
|
||||
|
|
|
@ -263,7 +263,7 @@ public:
|
|||
void remove(CParticleSystemProcess *process);
|
||||
|
||||
/// get the number of process that are attached to the system
|
||||
uint32 getNbProcess(void) const { return _ProcessVect.size(); }
|
||||
uint32 getNbProcess(void) const { return (uint32)_ProcessVect.size(); }
|
||||
|
||||
/**
|
||||
* Get a pointer to the nth process.
|
||||
|
|
|
@ -131,7 +131,7 @@ public:
|
|||
bool isShared() const { return _Sharing; }
|
||||
|
||||
// Get the number of cached textures
|
||||
uint getNumCachedTextures() const { return _CachedTex.size(); }
|
||||
uint getNumCachedTextures() const { return (uint)_CachedTex.size(); }
|
||||
|
||||
// Get a cached texture
|
||||
ITexture *getCachedTexture(uint index) const { return _CachedTex[index]; }
|
||||
|
|
|
@ -294,7 +294,7 @@ public:
|
|||
void resize(uint32 nbInstances);
|
||||
|
||||
/// return the number of instance in the container
|
||||
uint32 getSize(void) const { return _Tab.size(); }
|
||||
uint32 getSize(void) const { return (uint32)_Tab.size(); }
|
||||
|
||||
/// return the max number of instance in the container
|
||||
uint32 getMaxSize(void) const { return _MaxSize; }
|
||||
|
@ -411,7 +411,7 @@ sint32 CPSAttrib<T>::insert(const T &t)
|
|||
return -1;
|
||||
}
|
||||
_Tab.push_back(t);
|
||||
return _Tab.size() - 1;
|
||||
return (sint32)_Tab.size() - 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -455,7 +455,7 @@ void CPSAttrib<T>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint32 size = _Tab.size();
|
||||
uint32 size = (uint32)_Tab.size();
|
||||
f.serial(size);
|
||||
f.serial(_MaxSize);
|
||||
f.serial(size);
|
||||
|
@ -537,7 +537,7 @@ void CPSAttrib<T>::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint32 size = _Tab.size(), capacity = _Tab.capacity();
|
||||
uint32 size = (uint32)_Tab.size(), capacity = (uint32)_Tab.capacity();
|
||||
if (ver == 3)
|
||||
{
|
||||
f.serial(size, capacity);
|
||||
|
|
|
@ -466,7 +466,7 @@ void CPSValueGradientFunc<T>::setValues(const T *valueTab, uint32 numValues, uin
|
|||
computeGradient(valueTab, numValues, nbStages, _Tab, _MinValue, _MaxValue);
|
||||
//
|
||||
_NbStages = nbStages;
|
||||
_NbValues = _Tab.size() - 1;
|
||||
_NbValues = (uint32)_Tab.size() - 1;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
{
|
||||
min = _MinAngularVelocity;
|
||||
max = _MaxAngularVelocity;
|
||||
return _PrecompBasis.size();
|
||||
return (uint32)_PrecompBasis.size();
|
||||
}
|
||||
|
||||
/// from CPSParticle : return true if there are lightable faces in the object
|
||||
|
|
|
@ -121,7 +121,7 @@ class CPSFloatCurveFunctor
|
|||
void addControlPoint(const CCtrlPoint &ctrlPoint);
|
||||
|
||||
/// retrieve the number of control points
|
||||
uint getNumCtrlPoints(void) const { return _CtrlPoints.size(); }
|
||||
uint getNumCtrlPoints(void) const { return (uint)_CtrlPoints.size(); }
|
||||
|
||||
/** get a control point.
|
||||
* \return a <date, value> std::pair
|
||||
|
|
|
@ -151,7 +151,7 @@ public:
|
|||
/**
|
||||
* count the number of bound objects
|
||||
*/
|
||||
uint32 getNbBoundObjects(void) const { NL_PS_FUNC(getNbBoundObjects); return _LocatedBoundCont.size(); }
|
||||
uint32 getNbBoundObjects(void) const { NL_PS_FUNC(getNbBoundObjects); return (uint32)_LocatedBoundCont.size(); }
|
||||
|
||||
/**
|
||||
* get a pointer to a bound object (const version)
|
||||
|
@ -989,7 +989,7 @@ public:
|
|||
*/
|
||||
virtual void releaseAllRef();
|
||||
/// return the number of targets
|
||||
uint32 getNbTargets(void) const { return _Targets.size(); }
|
||||
uint32 getNbTargets(void) const { return (uint32)_Targets.size(); }
|
||||
/// Return a ptr on a target. Invalid range -> nlassert
|
||||
CPSLocated *getTarget(uint32 index)
|
||||
{
|
||||
|
|
|
@ -266,7 +266,7 @@ public:
|
|||
{
|
||||
min = _MinAngularVelocity;
|
||||
max = _MaxAngularVelocity;
|
||||
return _PrecompBasis.size();
|
||||
return (uint32)_PrecompBasis.size();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ public:
|
|||
// See if shape is in brace mode (rather then in closed loop mode)
|
||||
bool getBraceMode() const { return _BraceMode; }
|
||||
/// get the number of vertice in the shape used for ribbons
|
||||
uint32 getNbVerticesInShape(void) const { return _Shape.size(); }
|
||||
uint32 getNbVerticesInShape(void) const { return (uint32)_Shape.size(); }
|
||||
|
||||
/** Get a copy of the shape used for ribbon
|
||||
* \param dest a table of cvector that has the right size, it will be filled with vertices
|
||||
|
|
|
@ -802,7 +802,7 @@ template<class T> void CQuadGrid<T>::buildSelectionShape(TSelectionShape &dest,
|
|||
{
|
||||
dest.clear();
|
||||
sint minY;
|
||||
uint numVerts = poly.Vertices.size();
|
||||
uint numVerts = (uint)poly.Vertices.size();
|
||||
_ScaledPoly.Vertices.resize(numVerts);
|
||||
nlassert(_EltSize != 0.f);
|
||||
float invScale = 1.f / _EltSize;
|
||||
|
@ -814,7 +814,7 @@ template<class T> void CQuadGrid<T>::buildSelectionShape(TSelectionShape &dest,
|
|||
_ScaledPoly.computeOuterBorders(_PolyBorders, minY);
|
||||
if (_PolyBorders.empty()) return;
|
||||
initSelectStamps();
|
||||
sint numSegs = _PolyBorders.size();
|
||||
sint numSegs = (sint)_PolyBorders.size();
|
||||
for (sint y = 0; y < numSegs; ++y)
|
||||
{
|
||||
sint currIndex = ((minY + y) & (_Size - 1)) << _SizePower;
|
||||
|
|
|
@ -419,7 +419,7 @@ public:
|
|||
/// get the number of light group.
|
||||
uint getNumLightGroup () const
|
||||
{
|
||||
return _LightGroupColor.size ();
|
||||
return (uint)_LightGroupColor.size ();
|
||||
}
|
||||
/// get the color of a lightmap group.
|
||||
NLMISC::CRGBA getLightmapGroupColor(uint lightGroup) const
|
||||
|
|
|
@ -341,7 +341,7 @@ public:
|
|||
const std::vector<CPointLightNamed> &getPointLightList() const {return _PointLightArray.getPointLights();}
|
||||
|
||||
/// Get the number of point lights
|
||||
uint getNumPointLights() const { return _PointLightArray.getPointLights().size(); }
|
||||
uint getNumPointLights() const { return (uint)_PointLightArray.getPointLights().size(); }
|
||||
|
||||
/// Get a mutable ref on a point light named
|
||||
CPointLightNamed &getPointLightNamed(uint index)
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
*/
|
||||
void setNumCorners(uint numCorners);
|
||||
// get the number of corners
|
||||
uint32 getNumCorners() const { return _Corners.size(); }
|
||||
uint32 getNumCorners() const { return (uint32)_Corners.size(); }
|
||||
// Set a corner
|
||||
void setCorner(uint corner, const NLMISC::CVector &value);
|
||||
// Get a corner
|
||||
|
|
|
@ -199,7 +199,7 @@ public:
|
|||
bool forceComputeBone(uint boneId);
|
||||
|
||||
/// return the number of bones currently animated/computed (because of bindSkin()/stickObject() / Lod system).
|
||||
uint getNumBoneComputed() const {return _BoneToCompute.size();}
|
||||
uint getNumBoneComputed() const {return (uint)_BoneToCompute.size();}
|
||||
|
||||
/** change the Lod Bone interpolation distance (in meters). If 0, interpolation is disabled.
|
||||
* The smaller this value is, the more Lod skeleton system will "pop". Default is 0.5 meters.
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
|
||||
/// get lod information.
|
||||
const CLod &getLod(uint lod) const {return _Lods[lod];}
|
||||
uint getNumLods() const {return _Lods.size();}
|
||||
uint getNumLods() const {return (uint)_Lods.size();}
|
||||
|
||||
// ***************************
|
||||
private:
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
*/
|
||||
void setFileName(uint index, const char *);
|
||||
//
|
||||
uint getNumFileName() const { return _FileNames.size(); }
|
||||
uint getNumFileName() const { return (uint)_FileNames.size(); }
|
||||
/**
|
||||
* get the name of the file containing the texture for the given index
|
||||
* \return name of the file
|
||||
|
|
|
@ -331,7 +331,7 @@ public:
|
|||
}
|
||||
sint getNumTile256 () const
|
||||
{
|
||||
return _Tile256.size();
|
||||
return (sint)_Tile256.size();
|
||||
}
|
||||
sint32 getTile128 (sint index) const
|
||||
{
|
||||
|
@ -494,40 +494,40 @@ public:
|
|||
// Get
|
||||
sint getLandCount () const
|
||||
{
|
||||
return _LandVector.size();
|
||||
};
|
||||
return (sint)_LandVector.size();
|
||||
}
|
||||
const CTileLand* getLand (int landIndex) const
|
||||
{
|
||||
return &_LandVector[landIndex];
|
||||
};
|
||||
}
|
||||
CTileLand* getLand (int landIndex)
|
||||
{
|
||||
return &_LandVector[landIndex];
|
||||
};
|
||||
}
|
||||
sint getTileSetCount () const
|
||||
{
|
||||
return _TileSetVector.size();
|
||||
};
|
||||
return (sint)_TileSetVector.size();
|
||||
}
|
||||
const CTileSet* getTileSet (int tileIndex) const
|
||||
{
|
||||
return &_TileSetVector[tileIndex];
|
||||
};
|
||||
}
|
||||
CTileSet* getTileSet (int tileIndex)
|
||||
{
|
||||
return &_TileSetVector[tileIndex];
|
||||
};
|
||||
}
|
||||
sint getTileCount () const
|
||||
{
|
||||
return _TileVector.size();
|
||||
};
|
||||
return (sint)_TileVector.size();
|
||||
}
|
||||
const CTile* getTile (int tileIndex) const
|
||||
{
|
||||
return &_TileVector[tileIndex];
|
||||
};
|
||||
}
|
||||
CTile* getTile (int tileIndex)
|
||||
{
|
||||
return &_TileVector[tileIndex];
|
||||
};
|
||||
}
|
||||
sint addLand (const std::string& name);
|
||||
void removeLand (sint landIndex);
|
||||
sint addTileSet (const std::string& name);
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
/// Return the pixel array size. Should be 0 for empty, 64 for a 128x128 tile and 256 for a 256x256 tile.
|
||||
uint getSize (TFarType type, TFarOrder order) const
|
||||
{
|
||||
return _Pixels[type][order].size();
|
||||
return (uint)_Pixels[type][order].size();
|
||||
}
|
||||
|
||||
/// Set the pixel array of a far Tile
|
||||
|
|
|
@ -155,7 +155,7 @@ protected:
|
|||
ITrackKeyFramer<CKeyBezierQuat>::compile();
|
||||
|
||||
// makeclosest quaternions, Tangents Precompute.
|
||||
sint nKeys= _MapKey.size();
|
||||
sint nKeys= (sint)_MapKey.size();
|
||||
if(nKeys<=1)
|
||||
return;
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ protected:
|
|||
|
||||
|
||||
// Tangents Precompute.
|
||||
sint nKeys= this->_MapKey.size();
|
||||
sint nKeys= (sint)this->_MapKey.size();
|
||||
if(nKeys<=1)
|
||||
return;
|
||||
|
||||
|
@ -458,7 +458,7 @@ public:
|
|||
}
|
||||
|
||||
// Tangents Precompute.
|
||||
sint nKeys= _MapKey.size();
|
||||
sint nKeys= (sint)_MapKey.size();
|
||||
if(nKeys<=1)
|
||||
return;
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ public:
|
|||
// unlink from all parent clip
|
||||
void clipUnlinkFromAll();
|
||||
// get Parents links. NB: indices are no more valid after a clipDelChild()
|
||||
uint clipGetNumParents() const {return _ClipParents.size();}
|
||||
uint clipGetNumParents() const {return (uint)_ClipParents.size();}
|
||||
CTransform *clipGetParent(uint index) const;
|
||||
// get Sons links. NB: indices are no more valid after a clipDelChild()
|
||||
uint clipGetNumChildren() const {return _ClipSons.size();}
|
||||
|
|
|
@ -490,7 +490,7 @@ public:
|
|||
float getPatchScale() const {return PatchScale;}
|
||||
bool compiled() const {return Compiled;}
|
||||
uint16 getZoneId() const {return ZoneId;}
|
||||
sint getNumPatchs() const {return Patchs.size();}
|
||||
sint getNumPatchs() const {return (sint)Patchs.size();}
|
||||
// Return the Bounding Box of the zone.
|
||||
const CAABBoxExt &getZoneBB() const {return ZoneBB;}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ public:
|
|||
void addWaterShape(CWaterShape *shape, const NLMISC::CMatrix &MT);
|
||||
|
||||
/// get the number of water shapes added
|
||||
uint getNumWaterShape() const {return _WaterShapes.size();}
|
||||
uint getNumWaterShape() const {return (uint)_WaterShapes.size();}
|
||||
|
||||
/// check whether a shape is lightable.
|
||||
static bool isLightableShape(IShape &shape);
|
||||
|
|
|
@ -363,8 +363,8 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
{
|
||||
uint dicIndex;
|
||||
// add a new dictionnary entry
|
||||
dicIndex = dictionnary.size();
|
||||
dictionnaryIndex.insert(std::make_pair(filename, dictionnary.size()));
|
||||
dicIndex = (uint)dictionnary.size();
|
||||
dictionnaryIndex.insert(std::make_pair(filename, (uint)dictionnary.size()));
|
||||
dictionnary.push_back(filename);
|
||||
|
||||
// add the dependecy index
|
||||
|
@ -430,7 +430,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ofile.serialCont(dictionnary);
|
||||
|
||||
// write the dependencies data
|
||||
uint32 depSize = dependencies.size();
|
||||
uint32 depSize = (uint32)dependencies.size();
|
||||
ofile.serial(depSize);
|
||||
std::map<NLMISC::CSheetId, std::vector<uint32> >::iterator first(dependencies.begin()), last(dependencies.end());
|
||||
for (; first != last; ++first)
|
||||
|
@ -448,7 +448,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ofile.seek(endBlockSize, NLMISC::IStream::begin);
|
||||
|
||||
// write the sheet data
|
||||
uint32 nbEntries = sheetIds.size();
|
||||
uint32 nbEntries = (uint32)sheetIds.size();
|
||||
uint32 ver = T::getVersion ();
|
||||
ofile.serial (nbEntries);
|
||||
ofile.serial (ver);
|
||||
|
@ -1086,8 +1086,8 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
if (dictionnaryIndex.find(filename) == dictionnaryIndex.end())
|
||||
{
|
||||
// add a new dictionnary entry
|
||||
dicIndex = dictionnary.size();
|
||||
dictionnaryIndex.insert(std::make_pair(filename, dictionnary.size()));
|
||||
dicIndex = (uint)dictionnary.size();
|
||||
dictionnaryIndex.insert(std::make_pair(filename, (uint)dictionnary.size()));
|
||||
dictionnary.push_back(filename);
|
||||
}
|
||||
else
|
||||
|
@ -1157,7 +1157,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ofile.serialCont(dictionnary);
|
||||
|
||||
// write the dependencies data
|
||||
uint32 depSize = dependencies.size();
|
||||
uint32 depSize = (uint32)dependencies.size();
|
||||
ofile.serial(depSize);
|
||||
std::map<std::string, std::vector<uint32> >::iterator first(dependencies.begin()), last(dependencies.end());
|
||||
for (; first != last; ++first)
|
||||
|
@ -1175,7 +1175,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ofile.seek(endBlockSize, NLMISC::IStream::begin);
|
||||
|
||||
// write the sheet data
|
||||
uint32 nbEntries = sheetNames.size();
|
||||
uint32 nbEntries = (uint32)sheetNames.size();
|
||||
uint32 ver = T::getVersion ();
|
||||
ofile.serial (nbEntries);
|
||||
ofile.serial (ver);
|
||||
|
|
|
@ -211,7 +211,7 @@ public:
|
|||
/** Get the children primitive count */
|
||||
uint getNumChildren () const
|
||||
{
|
||||
return _Children.size ();
|
||||
return (uint)_Children.size ();
|
||||
}
|
||||
|
||||
/** Get a child primitive */
|
||||
|
|
|
@ -127,7 +127,7 @@ uint searchLowerBound(const T *array, uint arraySize, const T &key)
|
|||
template<class T>
|
||||
uint searchLowerBound(const std::vector<T> &array, const T &key)
|
||||
{
|
||||
uint size= array.size();
|
||||
uint size= (uint)array.size();
|
||||
if(size==0)
|
||||
return 0;
|
||||
else
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
{
|
||||
_BlockSize= other._BlockSize;
|
||||
// if other block is rebinded, don't copy its rebinded size.
|
||||
_EltSize= std::max(sizeof(T), sizeof(void*));
|
||||
_EltSize= (uint)std::max(sizeof(T), sizeof(void*));
|
||||
// No elts allocated
|
||||
_NextFreeElt= NULL;
|
||||
_NAllocatedElts= 0;
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
~CBufFIFO ();
|
||||
|
||||
/// Push 'buffer' in the head of the FIFO
|
||||
void push (const std::vector<uint8> &buffer) { push (&buffer[0], buffer.size()); }
|
||||
void push (const std::vector<uint8> &buffer) { push (&buffer[0], (uint32)buffer.size()); }
|
||||
|
||||
void push (const NLMISC::CMemStream &buffer) { push (buffer.buffer(), buffer.length()); }
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ void nlSleep( uint32 ms );
|
|||
#endif
|
||||
|
||||
/// Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id)
|
||||
uint getThreadId();
|
||||
size_t getThreadId();
|
||||
|
||||
/// Returns a readable string from a vector of bytes. unprintable char are replaced by '?'
|
||||
std::string stringFromVector( const std::vector<uint8>& v, bool limited = true );
|
||||
|
|
|
@ -374,19 +374,19 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
// Linux set of asserts is reduced due to that there is no message box displayer
|
||||
|
||||
#define nlassert(exp) \
|
||||
{ \
|
||||
do { \
|
||||
if (!(exp)) { \
|
||||
NLMISC::createDebug (); \
|
||||
NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \
|
||||
NLMISC::INelContext::getInstance().getAssertLog()->displayNL ("\"%s\" ", #exp); \
|
||||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlassertonce(exp) nlassert(exp)
|
||||
|
||||
#define nlassertex(exp, str) \
|
||||
{ \
|
||||
do { \
|
||||
if (!(exp)) { \
|
||||
NLMISC::createDebug (); \
|
||||
NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \
|
||||
|
@ -394,7 +394,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
NLMISC::INelContext::getInstance().getAssertLog()->displayRawNL str; \
|
||||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlverify(exp) nlassert(exp)
|
||||
#define nlverifyonce(exp) nlassert(exp)
|
||||
|
@ -403,7 +403,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
# else // NL_OS_UNIX
|
||||
|
||||
#define nlassert(exp) \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
bool _expResult_ = (exp) ? true : false; \
|
||||
if (!ignoreNextTime && !_expResult_) { \
|
||||
|
@ -411,20 +411,20 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlassertonce(exp) \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
if (!ignoreNextTime && !(exp)) { \
|
||||
ignoreNextTime = true; \
|
||||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \
|
||||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlassertex(exp, str) \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
bool _expResult_ = (exp) ? true : false; \
|
||||
if (!ignoreNextTime && !_expResult_) { \
|
||||
|
@ -434,10 +434,10 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlverify(exp) \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
bool _expResult_ = (exp) ? true : false; \
|
||||
if (!_expResult_ && !ignoreNextTime) { \
|
||||
|
@ -445,10 +445,10 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlverifyonce(exp) \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
bool _expResult_ = (exp) ? true : false; \
|
||||
if (!_expResult_ && !ignoreNextTime) { \
|
||||
|
@ -456,10 +456,10 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \
|
||||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlverifyex(exp, str) \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
bool _expResult_ = (exp) ? true : false; \
|
||||
if (!_expResult_ && !ignoreNextTime) { \
|
||||
|
@ -469,7 +469,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
# endif // NL_OS_UNIX
|
||||
|
||||
|
@ -478,28 +478,28 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
#define nlunreferenced(identifier) (identifier)
|
||||
|
||||
#define nlstop \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
if (!ignoreNextTime) { \
|
||||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL)) \
|
||||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
ASSERT_THROW_EXCEPTION_CODE(false) \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define nlstoponce \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
if (!ignoreNextTime) { \
|
||||
ignoreNextTime = true; \
|
||||
if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL)) \
|
||||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
|
||||
#define nlstopex(str) \
|
||||
{ \
|
||||
do { \
|
||||
static bool ignoreNextTime = false; \
|
||||
if (!ignoreNextTime) { \
|
||||
NLMISC::_assertex_stop_0(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, NULL); \
|
||||
|
@ -507,7 +507,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
|
|||
if(NLMISC::_assertex_stop_1(ignoreNextTime)) \
|
||||
NLMISC_BREAKPOINT; \
|
||||
} \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
|
||||
struct EFatalError : public Exception
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace STRING_MANAGER
|
|||
|
||||
uint size() const
|
||||
{
|
||||
return Data.size();
|
||||
return (uint)Data.size();
|
||||
}
|
||||
|
||||
void insertColumn(uint colIndex)
|
||||
|
@ -230,7 +230,7 @@ namespace STRING_MANAGER
|
|||
// Return the first column for which the title does not begin with '*'
|
||||
if ( columnTitle[0] != '*' )
|
||||
{
|
||||
colIndex = (it - Data[0].begin());
|
||||
colIndex = (uint)(it - Data[0].begin());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ namespace STRING_MANAGER
|
|||
if (it == Data[0].end())
|
||||
return false;
|
||||
|
||||
colIndex = it - Data[0].begin();
|
||||
colIndex = (uint)(it - Data[0].begin());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ namespace STRING_MANAGER
|
|||
// resize the rows
|
||||
void resize(uint numRows)
|
||||
{
|
||||
uint oldSize= Data.size();
|
||||
uint oldSize= (uint)Data.size();
|
||||
Data.resize(numRows);
|
||||
// alloc good Column count for new lines
|
||||
for(uint i= oldSize;i<Data.size();i++)
|
||||
|
@ -278,7 +278,7 @@ namespace STRING_MANAGER
|
|||
{
|
||||
if (first->operator[](colIndex) == colValue)
|
||||
{
|
||||
rowIndex = first - Data.begin();
|
||||
rowIndex = (uint)(first - Data.begin());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -497,7 +497,7 @@ namespace STRING_MANAGER
|
|||
else
|
||||
{
|
||||
// nlassert(it != context.Reference.begin()+refCount);
|
||||
uint index = find_if(context.Reference.begin(), context.Reference.end(), TestItem(getIdentifier(context.Addition, addCount))) - context.Reference.begin();
|
||||
uint index = (uint)(find_if(context.Reference.begin(), context.Reference.end(), TestItem(getIdentifier(context.Addition, addCount))) - context.Reference.begin());
|
||||
|
||||
// callback->onSwap(it - context.Reference.begin(), refCount, context);
|
||||
callback->onSwap(index, refCount, context);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
/// test whether e is in the emitter list
|
||||
bool isEmitter(IEventEmitter *e) const;
|
||||
// Get the number of registered emitters
|
||||
uint getNumEmitters() const { return _Emitters.size(); }
|
||||
uint getNumEmitters() const { return (uint)_Emitters.size(); }
|
||||
// Get an emitter
|
||||
IEventEmitter *getEmitter(uint index);
|
||||
const IEventEmitter *getEmitter(uint index) const;
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
// Set number of entries in the historic. Oldest entries are removed
|
||||
inline void setMaxSize(uint maxSize);
|
||||
// Get current size of historic
|
||||
uint getSize() const { return _Historic.size(); }
|
||||
uint getSize() const { return (uint)_Historic.size(); }
|
||||
// Access to an element in history, 0 being the oldest, size - 1 being the lastest added element
|
||||
const T &operator[](uint index) const { return _Historic[index]; /* let STL do out of range check */ }
|
||||
// Clear historic
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
/// remove a device from this server (but does not delete it).
|
||||
void removeDevice(IInputDevice *device);
|
||||
// returns the number of registered devices
|
||||
uint getNumDevices() const { return _Devices.size(); }
|
||||
uint getNumDevices() const { return (uint)_Devices.size(); }
|
||||
// return a device
|
||||
IInputDevice *getDevice(uint index) { return _Devices[index]; }
|
||||
/// Test whether the given device is handled by this server.
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
time_t Date;
|
||||
TLogType LogType;
|
||||
std::string ProcessName;
|
||||
uint ThreadId;
|
||||
size_t ThreadId;
|
||||
const char *FileName;
|
||||
sint Line;
|
||||
const char *FuncName;
|
||||
|
|
|
@ -570,7 +570,7 @@ protected:
|
|||
#define writenumber(src,format,digits) \
|
||||
char number_as_cstring [digits+1]; \
|
||||
sprintf( number_as_cstring, format, src ); \
|
||||
serialSeparatedBufferOut( (uint8*)number_as_cstring, strlen(number_as_cstring) );
|
||||
serialSeparatedBufferOut( (uint8*)number_as_cstring, (uint)strlen(number_as_cstring) );
|
||||
|
||||
/*
|
||||
* atoihex
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
/// Constructor. Init with a triangle.
|
||||
CPolygon(const CVector &a, const CVector &b, const CVector &c);
|
||||
|
||||
sint getNumVertices() const {return Vertices.size();}
|
||||
sint getNumVertices() const {return (sint)Vertices.size();}
|
||||
|
||||
// build a triangle fan from this polygon, appending resulting tris to 'dest'
|
||||
void toTriFan(std::vector<NLMISC::CTriangle> &dest) const;
|
||||
|
|
|
@ -1057,7 +1057,7 @@ private:
|
|||
}
|
||||
else
|
||||
{
|
||||
len= cont.size();
|
||||
len= (sint32)cont.size();
|
||||
serial(len);
|
||||
}
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ protected:
|
|||
}
|
||||
else
|
||||
{
|
||||
len= cont.size();
|
||||
len = (sint32)cont.size();
|
||||
serial(len);
|
||||
|
||||
// Close the node header
|
||||
|
@ -1238,7 +1238,7 @@ private:
|
|||
}
|
||||
else
|
||||
{
|
||||
len= cont.size();
|
||||
len= (sint32)cont.size();
|
||||
serial(len);
|
||||
}
|
||||
|
||||
|
@ -1393,7 +1393,7 @@ private:
|
|||
}
|
||||
else
|
||||
{
|
||||
len= cont.size();
|
||||
len= (sint32)cont.size();
|
||||
serial(len);
|
||||
}
|
||||
|
||||
|
@ -1587,7 +1587,7 @@ private:
|
|||
}
|
||||
else
|
||||
{
|
||||
len= cont.size();
|
||||
len= (sint32)cont.size();
|
||||
serial(len);
|
||||
__iterator it= cont.begin();
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
const std::string &toString(const TDestType &value) const;
|
||||
|
||||
// nb of pairs in the map
|
||||
inline uint16 getNbPairs() const { return _String2DestType.size(); }
|
||||
inline uint16 getNbPairs() const { return (uint16)_String2DestType.size(); }
|
||||
|
||||
// Check a value against the list a value, return true if the value exist in the container
|
||||
bool isValid(const DestType &value) const;
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
nlassert (!str.empty());
|
||||
|
||||
// add at the end
|
||||
addString (str, _StringArray.size ());
|
||||
addString (str, (TStringId)_StringArray.size ());
|
||||
}
|
||||
|
||||
/** Returns the id associated to string str. If the id is not found, the string will be added in
|
||||
|
@ -138,7 +138,7 @@ public:
|
|||
/// Returns the size of the _StringArray
|
||||
TStringId size () const
|
||||
{
|
||||
return _StringArray.size ();
|
||||
return (TStringId)_StringArray.size ();
|
||||
}
|
||||
|
||||
/// Returns all string in the _NeedToAskStringArray
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
_CurFrame++;
|
||||
// _CurFrame%=_LastFrames.size();
|
||||
if (_CurFrame >= _LastFrames.size())
|
||||
_CurFrame -= _LastFrames.size();
|
||||
_CurFrame -= (uint)_LastFrames.size();
|
||||
|
||||
// update the number of frames added.
|
||||
_NumFrame++;
|
||||
|
|
|
@ -420,7 +420,7 @@ public:
|
|||
uint nb;
|
||||
{
|
||||
NLMISC::CSynchronized<CConnections>::CAccessor connectionssync( &_Connections );
|
||||
nb = connectionssync.value().size();
|
||||
nb = (uint)connectionssync.value().size();
|
||||
}
|
||||
return nb;
|
||||
}
|
||||
|
|
|
@ -237,9 +237,9 @@ public:
|
|||
/// Return the names of the sounds (call this method after loadSounds())
|
||||
virtual void getSoundNames( std::vector<NLMISC::TStringId> &names ) const;
|
||||
/// Return the number of mixing tracks (voices)
|
||||
virtual uint getPolyphony() const { return _Tracks.size(); }
|
||||
virtual uint getPolyphony() const { return (uint)_Tracks.size(); }
|
||||
/// Return the number of sources instance.
|
||||
virtual uint getSourcesInstanceCount() const { return _Sources.size(); }
|
||||
virtual uint getSourcesInstanceCount() const { return (uint)_Sources.size(); }
|
||||
/// Return the number of playing sources (slow)
|
||||
virtual uint getPlayingSourcesCount() const;
|
||||
/// Return the number of available tracks
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
/** Return the number of markers in this track
|
||||
*/
|
||||
virtual uint32 countMarkers() { return _Markers.size(); }
|
||||
virtual uint32 countMarkers() { return (uint32)_Markers.size(); }
|
||||
|
||||
/** Return a marker of this track given its index */
|
||||
virtual CSoundAnimMarker* getMarker(uint32 i) { return _Markers[i]; }
|
||||
|
|
|
@ -189,7 +189,7 @@ TAnimationTime CAnimation::getBeginTime () const
|
|||
if (_BeginTimeTouched)
|
||||
{
|
||||
// Track count
|
||||
uint trackCount=_TrackVector.size();
|
||||
uint trackCount=(uint)_TrackVector.size();
|
||||
|
||||
// Track count empty ?
|
||||
if (trackCount==0)
|
||||
|
@ -220,7 +220,7 @@ TAnimationTime CAnimation::getEndTime () const
|
|||
if (_EndTimeTouched)
|
||||
{
|
||||
// Track count
|
||||
uint trackCount=_TrackVector.size();
|
||||
uint trackCount=(uint)_TrackVector.size();
|
||||
|
||||
// Track count empty ?
|
||||
if (trackCount==0)
|
||||
|
@ -254,7 +254,7 @@ bool CAnimation::allTrackLoop() const
|
|||
if(_AnimLoopTouched)
|
||||
{
|
||||
// Track count
|
||||
uint trackCount=_TrackVector.size();
|
||||
uint trackCount=(uint)_TrackVector.size();
|
||||
|
||||
// Default is true
|
||||
_AnimLoop= true;
|
||||
|
@ -393,7 +393,7 @@ void CAnimation::applyTrackQuatHeaderCompression()
|
|||
_TrackSamplePack= new CTrackSamplePack;
|
||||
|
||||
// just copy the built track headers
|
||||
_TrackSamplePack->TrackHeaders.resize(sampleCounter.TrackHeaders.size());
|
||||
_TrackSamplePack->TrackHeaders.resize((uint32)sampleCounter.TrackHeaders.size());
|
||||
for(i=0;i<_TrackSamplePack->TrackHeaders.size();i++)
|
||||
{
|
||||
_TrackSamplePack->TrackHeaders[i]= sampleCounter.TrackHeaders[i];
|
||||
|
|
|
@ -319,7 +319,7 @@ void CAnimationOptimizer::sampleQuatTrack(const ITrack *trackIn, float beginTim
|
|||
// ***************************************************************************
|
||||
bool CAnimationOptimizer::testConstantQuatTrack()
|
||||
{
|
||||
uint numSamples= _QuatKeyList.size();
|
||||
uint numSamples= (uint)_QuatKeyList.size();
|
||||
nlassert(numSamples>0);
|
||||
|
||||
// Get the first sample as the reference quaternion, and test others from this one.
|
||||
|
@ -339,7 +339,7 @@ bool CAnimationOptimizer::testConstantQuatTrack()
|
|||
// ***************************************************************************
|
||||
void CAnimationOptimizer::optimizeQuatTrack()
|
||||
{
|
||||
uint numSamples= _QuatKeyList.size();
|
||||
uint numSamples= (uint)_QuatKeyList.size();
|
||||
nlassert(numSamples>0);
|
||||
|
||||
// <=2 key? => no opt possible..
|
||||
|
@ -477,7 +477,7 @@ void CAnimationOptimizer::sampleVectorTrack(const ITrack *trackIn, float beginT
|
|||
// ***************************************************************************
|
||||
bool CAnimationOptimizer::testConstantVectorTrack()
|
||||
{
|
||||
uint numSamples= _VectorKeyList.size();
|
||||
uint numSamples= (uint)_VectorKeyList.size();
|
||||
nlassert(numSamples>0);
|
||||
|
||||
// Get the first sample as the reference Vectorer, and test others from this one.
|
||||
|
@ -497,7 +497,7 @@ bool CAnimationOptimizer::testConstantVectorTrack()
|
|||
// ***************************************************************************
|
||||
void CAnimationOptimizer::optimizeVectorTrack()
|
||||
{
|
||||
uint numSamples= _VectorKeyList.size();
|
||||
uint numSamples= (uint)_VectorKeyList.size();
|
||||
nlassert(numSamples>0);
|
||||
|
||||
// <=2 key? => no opt possible..
|
||||
|
|
|
@ -54,7 +54,7 @@ CAnimationSet::~CAnimationSet ()
|
|||
// ***************************************************************************
|
||||
uint CAnimationSet::getNumChannelId () const
|
||||
{
|
||||
return _ChannelIdByName.size ();
|
||||
return (uint)_ChannelIdByName.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -76,10 +76,10 @@ uint CAnimationSet::addAnimation (const char* name, CAnimation* animation)
|
|||
_AnimationName.push_back (name);
|
||||
|
||||
// Add an entry name / animation
|
||||
_AnimationIdByName.insert (std::map <std::string, uint32>::value_type (name, _Animation.size()-1));
|
||||
_AnimationIdByName.insert (std::map <std::string, uint32>::value_type (name, (uint32)_Animation.size()-1));
|
||||
|
||||
// Return animation id
|
||||
return _Animation.size()-1;
|
||||
return (uint)_Animation.size()-1;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -90,10 +90,10 @@ uint CAnimationSet::addSkeletonWeight (const char* name, CSkeletonWeight* skelet
|
|||
_SkeletonWeightName.push_back (name);
|
||||
|
||||
// Add an entry name / animation
|
||||
_SkeletonWeightIdByName.insert (std::map <std::string, uint32>::value_type (name, _SkeletonWeight.size()-1));
|
||||
_SkeletonWeightIdByName.insert (std::map <std::string, uint32>::value_type (name, (uint32)_SkeletonWeight.size()-1));
|
||||
|
||||
// Return animation id
|
||||
return _SkeletonWeight.size()-1;
|
||||
return (uint)_SkeletonWeight.size()-1;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -157,7 +157,7 @@ uint CAsyncTextureManager::addTextureRef(const string &textNameNotLwr, CMeshBa
|
|||
if(it==_TextureEntryMap.end())
|
||||
{
|
||||
// search a free id.
|
||||
uint i= _TextureEntries.size();
|
||||
uint i= (uint)_TextureEntries.size();
|
||||
if(!_FreeTextureIds.empty())
|
||||
{
|
||||
i= _FreeTextureIds.back();
|
||||
|
@ -301,7 +301,7 @@ void CAsyncTextureManager::releaseTexture(uint id, CMeshBaseInstance *instance
|
|||
|
||||
// find an instance in this texture an remove it.
|
||||
CTextureEntry *text= _TextureEntries[id];
|
||||
uint instSize= text->Instances.size();
|
||||
uint instSize= (uint)text->Instances.size();
|
||||
for(uint i=0;i<instSize;i++)
|
||||
{
|
||||
if(text->Instances[i]== instance)
|
||||
|
@ -701,7 +701,7 @@ void CAsyncTextureManager::updateTextureLodSystem(IDriver *pDriver)
|
|||
uint pivot= 0;
|
||||
uint currentWantedSize= currentBaseSize;
|
||||
uint currentLoadedSize= currentBaseSize;
|
||||
for(i=lodArray.size()-1;i>=0;i--)
|
||||
for(i=(sint)lodArray.size()-1;i>=0;i--)
|
||||
{
|
||||
uint lodSize= lodArray[i].Lod->ExtraSize;
|
||||
currentWantedSize+= lodSize;
|
||||
|
@ -731,7 +731,7 @@ void CAsyncTextureManager::updateTextureLodSystem(IDriver *pDriver)
|
|||
{
|
||||
unload= false;
|
||||
// search from end of the list to pivot (included), the first LOD (ie the most important) to load.
|
||||
for(i=lodArray.size()-1;i>=(sint)pivot;i--)
|
||||
for(i=(sint)lodArray.size()-1;i>=(sint)pivot;i--)
|
||||
{
|
||||
if(!lodArray[i].Lod->UpLoaded)
|
||||
{
|
||||
|
|
|
@ -187,7 +187,7 @@ void CChannelMixer::eval (bool detail, uint64 evalDetailDate)
|
|||
uint numChans;
|
||||
if(detail)
|
||||
{
|
||||
numChans= _DetailListToEval.size();
|
||||
numChans= (uint)_DetailListToEval.size();
|
||||
if(numChans)
|
||||
channelArrayPtr= &_DetailListToEval[0];
|
||||
else
|
||||
|
@ -195,7 +195,7 @@ void CChannelMixer::eval (bool detail, uint64 evalDetailDate)
|
|||
}
|
||||
else
|
||||
{
|
||||
numChans= _GlobalListToEval.size();
|
||||
numChans= (uint)_GlobalListToEval.size();
|
||||
if(numChans)
|
||||
channelArrayPtr= &_GlobalListToEval[0];
|
||||
else
|
||||
|
|
|
@ -35,7 +35,7 @@ bool CCoarseMeshBuild::build (const std::vector<CCoarseMeshDesc>& coarseMeshes,
|
|||
return false;
|
||||
|
||||
// 2. remap coordinates
|
||||
remapCoordinates (coarseMeshes, desc, bitmaps.size ());
|
||||
remapCoordinates (coarseMeshes, desc, (uint)bitmaps.size ());
|
||||
|
||||
// 3. ok
|
||||
return true;
|
||||
|
|
|
@ -134,7 +134,7 @@ void CDeform2d::doDeform(const TPoint2DVect &surf, IDriver *drv, IPerturbUV *uvp
|
|||
/** setup the whole vertex buffer
|
||||
* we don't share vertices here, as we work with unaligned quads
|
||||
*/
|
||||
vb.setNumVertices(dest.size() << 2);
|
||||
vb.setNumVertices((uint32)dest.size() << 2);
|
||||
mat.setTexture(0, _Tex);
|
||||
{
|
||||
CVertexBufferReadWrite vba;
|
||||
|
@ -173,7 +173,7 @@ void CDeform2d::doDeform(const TPoint2DVect &surf, IDriver *drv, IPerturbUV *uvp
|
|||
}
|
||||
|
||||
drv->activeVertexBuffer(vb);
|
||||
drv->renderRawQuads(mat, 0, dest.size());
|
||||
drv->renderRawQuads(mat, 0, (uint32)dest.size());
|
||||
}
|
||||
|
||||
} // NL3D
|
||||
|
|
|
@ -3187,7 +3187,7 @@ IOcclusionQuery::TOcclusionType COcclusionQueryD3D::getOcclusionType()
|
|||
H_AUTO_D3D(COcclusionQueryD3D_getOcclusionType);
|
||||
nlassert(Driver);
|
||||
nlassert(Query);
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||
if (OcclusionType == NotAvailable)
|
||||
{
|
||||
DWORD numPix;
|
||||
|
@ -3207,7 +3207,7 @@ uint COcclusionQueryD3D::getVisibleCount()
|
|||
H_AUTO_D3D(COcclusionQueryD3D_getVisibleCount);
|
||||
nlassert(Driver);
|
||||
nlassert(Query);
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||
if (getOcclusionType() == NotAvailable) return 0;
|
||||
return VisibleCount;
|
||||
}
|
||||
|
|
|
@ -1401,7 +1401,7 @@ bool CDriverD3D::needsConstants (uint &numConstant, uint &firstConstant, uint &s
|
|||
alphaPipe[0].clear();
|
||||
}
|
||||
add(rgbPipe[0], alphaPipe[0]);
|
||||
numConstant = rgbPipe[0].size();
|
||||
numConstant = (uint)rgbPipe[0].size();
|
||||
if (numConstant)
|
||||
{
|
||||
firstConstant = *(rgbPipe[0].begin());
|
||||
|
@ -1919,7 +1919,7 @@ IDirect3DPixelShader9 *CDriverD3D::buildPixelShader (const CNormalShaderDesc &no
|
|||
// Assemble and create the shader
|
||||
LPD3DXBUFFER pShader;
|
||||
LPD3DXBUFFER pErrorMsgs;
|
||||
if (D3DXAssembleShader (shaderText.c_str(), shaderText.size(), NULL, NULL, 0, &pShader, &pErrorMsgs) == D3D_OK)
|
||||
if (D3DXAssembleShader (shaderText.c_str(), (UINT)shaderText.size(), NULL, NULL, 0, &pShader, &pErrorMsgs) == D3D_OK)
|
||||
{
|
||||
IDirect3DPixelShader9 *shader;
|
||||
if (_DeviceInterface->CreatePixelShader((DWORD*)pShader->GetBufferPointer(), &shader) == D3D_OK)
|
||||
|
|
|
@ -167,7 +167,7 @@ HRESULT CDriverD3D::SetTexture (DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture)
|
|||
H_AUTO_D3D(CDriverD3D_SetTexture )
|
||||
// Look for the current texture
|
||||
uint i;
|
||||
const uint count = _CurrentShaderTextures.size();
|
||||
const uint count = (uint)_CurrentShaderTextures.size();
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
const CTextureRef &ref = _CurrentShaderTextures[i];
|
||||
|
@ -355,7 +355,7 @@ bool CDriverD3D::activeShader(CShader *shd)
|
|||
|
||||
// Assemble the shader
|
||||
LPD3DXBUFFER pErrorMsgs;
|
||||
if (D3DXCreateEffect(_DeviceInterface, shd->getText(), strlen(shd->getText())+1, NULL, NULL, 0, NULL, &(shaderInfo->Effect), &pErrorMsgs)
|
||||
if (D3DXCreateEffect(_DeviceInterface, shd->getText(), (UINT)strlen(shd->getText())+1, NULL, NULL, 0, NULL, &(shaderInfo->Effect), &pErrorMsgs)
|
||||
== D3D_OK)
|
||||
{
|
||||
// Get the texture handle
|
||||
|
@ -3713,7 +3713,7 @@ HRESULT STDMETHODCALLTYPE CFXPassRecorder::SetTexture(DWORD Stage, LPDIRECT3DBAS
|
|||
nlassert(Target);
|
||||
// Look for the current texture
|
||||
uint i;
|
||||
const uint count = Driver->getCurrentShaderTextures().size();
|
||||
const uint count = (uint)Driver->getCurrentShaderTextures().size();
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
const CDriverD3D::CTextureRef &ref = Driver->getCurrentShaderTextures()[i];
|
||||
|
|
|
@ -334,7 +334,7 @@ bool CDriverD3D::activeVertexProgram (CVertexProgram *program)
|
|||
|
||||
LPD3DXBUFFER pShader;
|
||||
LPD3DXBUFFER pErrorMsgs;
|
||||
if (D3DXAssembleShader (dest.c_str(), dest.size(), NULL, NULL, 0, &pShader, &pErrorMsgs) == D3D_OK)
|
||||
if (D3DXAssembleShader (dest.c_str(), (UINT)dest.size(), NULL, NULL, 0, &pShader, &pErrorMsgs) == D3D_OK)
|
||||
{
|
||||
if (_DeviceInterface->CreateVertexShader((DWORD*)pShader->GetBufferPointer(), &(getVertexProgramD3D(*program)->Shader)) != D3D_OK)
|
||||
return false;
|
||||
|
|
|
@ -4231,7 +4231,7 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType()
|
|||
H_AUTO_OGL(COcclusionQueryGL_getOcclusionType)
|
||||
nlassert(Driver);
|
||||
nlassert(ID);
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||
if (OcclusionType == NotAvailable)
|
||||
{
|
||||
GLuint result;
|
||||
|
@ -4254,7 +4254,7 @@ uint COcclusionQueryGL::getVisibleCount()
|
|||
H_AUTO_OGL(COcclusionQueryGL_getVisibleCount)
|
||||
nlassert(Driver);
|
||||
nlassert(ID);
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this) // can't query result between a begin/end pair!
|
||||
nlassert(Driver->_CurrentOcclusionQuery != this); // can't query result between a begin/end pair!
|
||||
if (getOcclusionType() == NotAvailable) return 0;
|
||||
return VisibleCount;
|
||||
}
|
||||
|
|
|
@ -923,7 +923,7 @@ void CDriverGLStates::enableVertexAttribArrayForEXTVertexShader(uint glIndex, bo
|
|||
nglDisableVariantClientStateEXT(variants[CDriverGL::EVSPaletteSkinVariant]);
|
||||
break;
|
||||
case 7: // empty
|
||||
nlstop
|
||||
nlstop;
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
|
|
|
@ -1413,7 +1413,7 @@ void CDriverGL::setupGlArraysForEXTVertexShader(CVertexBufferInfo &vb)
|
|||
}
|
||||
break;
|
||||
case CVertexBuffer::Empty: // empty
|
||||
nlstop
|
||||
nlstop;
|
||||
break;
|
||||
case CVertexBuffer::TexCoord0:
|
||||
case CVertexBuffer::TexCoord1:
|
||||
|
@ -1483,7 +1483,7 @@ void CDriverGL::setupGlArraysForEXTVertexShader(CVertexBufferInfo &vb)
|
|||
}
|
||||
break;
|
||||
case CVertexBuffer::Empty: // empty
|
||||
nlstop
|
||||
nlstop;
|
||||
break;
|
||||
case CVertexBuffer::TexCoord0:
|
||||
case CVertexBuffer::TexCoord1:
|
||||
|
|
|
@ -120,7 +120,7 @@ bool CDriverGL::activeNVVertexProgram (CVertexProgram *program)
|
|||
program->_DrvInfo=drvInfo;
|
||||
|
||||
// Compile the program
|
||||
nglLoadProgramNV (GL_VERTEX_PROGRAM_NV, drvInfo->ID, program->getProgram().length(), (const GLubyte*)program->getProgram().c_str());
|
||||
nglLoadProgramNV (GL_VERTEX_PROGRAM_NV, drvInfo->ID, (GLsizei)program->getProgram().length(), (const GLubyte*)program->getProgram().c_str());
|
||||
|
||||
// Get loading error code
|
||||
GLint errorOff;
|
||||
|
@ -130,7 +130,7 @@ bool CDriverGL::activeNVVertexProgram (CVertexProgram *program)
|
|||
if (errorOff>=0)
|
||||
{
|
||||
// String length
|
||||
uint length = program->getProgram ().length();
|
||||
uint length = (uint)program->getProgram ().length();
|
||||
const char* sString= program->getProgram ().c_str();
|
||||
|
||||
// Line count and char count
|
||||
|
@ -1392,7 +1392,7 @@ bool CDriverGL::setupARBVertexProgram (const CVPParser::TProgram &inParsedProgra
|
|||
//
|
||||
nglBindProgramARB( GL_VERTEX_PROGRAM_ARB, id);
|
||||
glGetError();
|
||||
nglProgramStringARB( GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, code.size(), code.c_str() );
|
||||
nglProgramStringARB( GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)code.size(), code.c_str() );
|
||||
GLenum err = glGetError();
|
||||
if (err != GL_NO_ERROR)
|
||||
{
|
||||
|
@ -1400,7 +1400,7 @@ bool CDriverGL::setupARBVertexProgram (const CVPParser::TProgram &inParsedProgra
|
|||
{
|
||||
GLint position;
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &position);
|
||||
nlassert(position != -1) // there was an error..
|
||||
nlassert(position != -1); // there was an error..
|
||||
nlassert(position < (GLint) code.size());
|
||||
uint line = 0;
|
||||
const char *lineStart = code.c_str();
|
||||
|
|
|
@ -861,7 +861,7 @@ void CDriverUser::drawQuads(const std::vector<NLMISC::CQuadColorUV> &q, UMater
|
|||
H_AUTO2;
|
||||
|
||||
const CQuadColorUV *qptr = &(q[0]);
|
||||
drawQuads(qptr , q.size(), mat);
|
||||
drawQuads(qptr , (uint32)q.size(), mat);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -870,7 +870,7 @@ void CDriverUser::drawQuads(const std::vector<NLMISC::CQuadColorUV2> &q, UMate
|
|||
H_AUTO2;
|
||||
|
||||
const CQuadColorUV2 *qptr = &(q[0]);
|
||||
drawQuads(qptr , q.size(), mat);
|
||||
drawQuads(qptr , (uint32)q.size(), mat);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -490,7 +490,7 @@ void CDRU::drawTrianglesUnlit(const std::vector<NLMISC::CTriangleUV> &trilist,
|
|||
if(trilist.size()==0)
|
||||
return;
|
||||
|
||||
CDRU::drawTrianglesUnlit( &(*trilist.begin()), trilist.size(), mat, driver);
|
||||
CDRU::drawTrianglesUnlit( &(*trilist.begin()), (uint)trilist.size(), mat, driver);
|
||||
}
|
||||
|
||||
|
||||
|
@ -529,7 +529,7 @@ void CDRU::drawLinesUnlit(const std::vector<NLMISC::CLine> &linelist, CMateria
|
|||
{
|
||||
if(linelist.size()==0)
|
||||
return;
|
||||
CDRU::drawLinesUnlit( &(*linelist.begin()), linelist.size(), mat, driver);
|
||||
CDRU::drawLinesUnlit( &(*linelist.begin()), (sint)linelist.size(), mat, driver);
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CDRU::drawLine(const CVector &a, const CVector &b, CRGBA color, IDriver& driver)
|
||||
|
|
|
@ -71,7 +71,7 @@ void CFastPtrListBase::insert(void *element, CFastPtrListNode *node)
|
|||
_Elements.push_back(element);
|
||||
_Nodes.push_back(node);
|
||||
node->_Owner= this;
|
||||
node->_IndexInOwner= _Nodes.size()-1;
|
||||
node->_IndexInOwner= (uint32)_Nodes.size()-1;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -83,7 +83,7 @@ void CFastPtrListBase::erase(CFastPtrListNode *node)
|
|||
|
||||
// Take the indexes,
|
||||
uint nodeIndex= node->_IndexInOwner;
|
||||
uint lastIndex= _Nodes.size()-1;
|
||||
uint lastIndex= (uint)_Nodes.size()-1;
|
||||
|
||||
// swap the last element and the erased one.
|
||||
swap(_Elements[nodeIndex], _Elements[lastIndex]);
|
||||
|
|
|
@ -100,7 +100,7 @@ void CFontManager::computeString (const ucstring &s,
|
|||
}
|
||||
|
||||
// Setting vertices format
|
||||
output.Vertices.setNumVertices (4 * s.size());
|
||||
output.Vertices.setNumVertices (4 * (uint32)s.size());
|
||||
|
||||
// 1 character <-> 1 quad
|
||||
sint32 penx = 0, dx;
|
||||
|
|
|
@ -47,7 +47,7 @@ void CHLSTextureBank::reset()
|
|||
uint32 CHLSTextureBank::addColorTexture(const CHLSColorTexture &tex)
|
||||
{
|
||||
_ColorTextures.push_back(tex);
|
||||
return _ColorTextures.size()-1;
|
||||
return (uint32)_ColorTextures.size()-1;
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CHLSTextureBank::addTextureInstance(const std::string &name, uint32 colorTextureId, const vector<CHLSColorDelta> &cols)
|
||||
|
@ -62,14 +62,14 @@ void CHLSTextureBank::addTextureInstance(const std::string &name, uint32 color
|
|||
// new instance
|
||||
CTextureInstance textInst;
|
||||
textInst._ColorTextureId= colorTextureId;
|
||||
textInst._DataIndex= _TextureInstanceData.size();
|
||||
textInst._DataIndex= (uint32)_TextureInstanceData.size();
|
||||
// leave ptrs undefined
|
||||
textInst._DataPtr= NULL;
|
||||
textInst._ColorTexturePtr= NULL;
|
||||
|
||||
// allocate/fill data
|
||||
uint32 nameSize= (nameLwr.size()+1);
|
||||
uint32 colSize= cols.size()*sizeof(CHLSColorDelta);
|
||||
uint32 nameSize= (uint32)(nameLwr.size()+1);
|
||||
uint32 colSize= (uint32)cols.size()*sizeof(CHLSColorDelta);
|
||||
_TextureInstanceData.resize(_TextureInstanceData.size() + nameSize + colSize);
|
||||
// copy name
|
||||
memcpy(&_TextureInstanceData[textInst._DataIndex], nameLwr.c_str(), nameSize);
|
||||
|
@ -176,7 +176,7 @@ bool CHLSTextureBank::CTextureInstance::sameName(const char *str)
|
|||
void CHLSTextureBank::CTextureInstance::buildColorVersion(NLMISC::CBitmap &out)
|
||||
{
|
||||
// get ptr to color deltas.
|
||||
uint nameSize= strlen((const char*)_DataPtr)+1;
|
||||
uint nameSize= (uint)strlen((const char*)_DataPtr)+1;
|
||||
CHLSColorDelta *colDeltas= (CHLSColorDelta*)(_DataPtr + nameSize);
|
||||
|
||||
// build the texture.
|
||||
|
|
|
@ -51,7 +51,7 @@ void CIGSurfaceLightBuild::buildSunDebugMesh(CMesh::CMeshBuild &meshBuild,
|
|||
// Resize vector.
|
||||
uint wVert= surface.Width;
|
||||
uint hVert= surface.Height;
|
||||
uint vId0= meshBuild.Vertices.size();
|
||||
uint vId0= (uint)meshBuild.Vertices.size();
|
||||
// Allocate vertices / colors
|
||||
meshBuild.Vertices.resize(vId0 + wVert*hVert);
|
||||
vector<CRGBA> colors;
|
||||
|
@ -98,7 +98,7 @@ void CIGSurfaceLightBuild::buildPLDebugMesh(CMesh::CMeshBuild &meshBuild, CMes
|
|||
meshBuild.VertexFlags= CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag;
|
||||
|
||||
// Get the number of lights in Ig.
|
||||
uint numLight= igOut.getPointLightList().size();
|
||||
uint numLight= (uint)igOut.getPointLightList().size();
|
||||
numLight= raiseToNextPowerOf2(numLight);
|
||||
uint idMultiplier= 256/ numLight;
|
||||
|
||||
|
@ -132,7 +132,7 @@ void CIGSurfaceLightBuild::buildPLDebugMesh(CMesh::CMeshBuild &meshBuild, CMes
|
|||
// Resize vector.
|
||||
uint wVert= surface.Width;
|
||||
uint hVert= surface.Height;
|
||||
uint vId0= meshBuild.Vertices.size();
|
||||
uint vId0= (uint)meshBuild.Vertices.size();
|
||||
// Allocate vertices / colors
|
||||
meshBuild.Vertices.resize(vId0 + wVert*hVert);
|
||||
vector<CRGBA> colors;
|
||||
|
|
|
@ -83,7 +83,7 @@ void CInstanceLighter::addTriangles (CLandscape &landscape, std::vector<uint> &l
|
|||
landscape.getTessellationLeaves(leaves);
|
||||
|
||||
// Number of leaves
|
||||
uint leavesCount=leaves.size();
|
||||
uint leavesCount=(uint)leaves.size();
|
||||
|
||||
// Reserve the array
|
||||
triangleArray.reserve (triangleArray.size()+leavesCount);
|
||||
|
@ -332,7 +332,7 @@ void CInstanceLighter::light (const CInstanceGroup &igIn, CInstanceGroup &igOut,
|
|||
// For all retrievers Infos in _IGSurfaceLightBuild
|
||||
while(itSrc!=_IGSurfaceLightBuild->RetrieverGridMap.end())
|
||||
{
|
||||
uint numSurfaces= itSrc->second.Grids.size();
|
||||
uint numSurfaces= (uint)itSrc->second.Grids.size();
|
||||
// If !empty retriever.
|
||||
if(numSurfaces>0)
|
||||
{
|
||||
|
@ -355,7 +355,7 @@ void CInstanceLighter::light (const CInstanceGroup &igIn, CInstanceGroup &igOut,
|
|||
surfDst.Origin= surfSrc.Origin;
|
||||
surfDst.Width= surfSrc.Width;
|
||||
surfDst.Height= surfSrc.Height;
|
||||
surfDst.Cells.resize(surfSrc.Cells.size());
|
||||
surfDst.Cells.resize((uint32)surfSrc.Cells.size());
|
||||
surfDst.Cells.fill(defaultCellCorner);
|
||||
// The grid must be valid an not empty
|
||||
nlassert( surfDst.Cells.size() == surfDst.Width*surfDst.Height );
|
||||
|
@ -1050,7 +1050,7 @@ void CInstanceLighter::compilePointLightRT(uint gridSize, float gridCellSize,
|
|||
// ===========
|
||||
CQuadGrid<CTriangle*> obstacleGrid;
|
||||
obstacleGrid.create(gridSize, gridCellSize);
|
||||
uint size= obstacles.size();
|
||||
uint size= (uint)obstacles.size();
|
||||
for(i=0; i<size; i++)
|
||||
{
|
||||
// bbox of triangle
|
||||
|
|
|
@ -2260,7 +2260,7 @@ CPatchRdrPass* CLandscape::getFarRenderPass(CPatch* pPatch, uint farIndex, float
|
|||
// If no one found, must allocate a new render pass.
|
||||
if(bestRdrPass==-1)
|
||||
{
|
||||
bestRdrPass= _TextureFars.size();
|
||||
bestRdrPass= (sint)_TextureFars.size();
|
||||
|
||||
// add a new render pass
|
||||
CPatchRdrPass *pass=new CPatchRdrPass;
|
||||
|
@ -3809,7 +3809,7 @@ void CLandscape::initAnimatedLightIndex(const CScene &scene)
|
|||
void CLandscape::releaseAllTiles()
|
||||
{
|
||||
nlassert(Zones.empty());
|
||||
releaseTiles (0, TileInfos.size());
|
||||
releaseTiles (0, (uint32)TileInfos.size());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ TLandscapeIndexType *CLandscapeFaceVectorManager::createFaceVector(uint numTri)
|
|||
// Allocate a block of max tris. +1 is for the NumTris entry at index 0.
|
||||
uint numTriMax= 1<<blockId;
|
||||
// allocate max of (sizeof(uint32*), (numTriMax*3+1)*sizeof(uint32));
|
||||
uint sizeInByteToAllocate= max(sizeof(TLandscapeIndexType*), (numTriMax*3 + 1)*sizeof(TLandscapeIndexType));
|
||||
uint sizeInByteToAllocate= (uint)max(sizeof(TLandscapeIndexType*), (numTriMax*3 + 1)*sizeof(TLandscapeIndexType));
|
||||
_Blocks[blockId]= new TLandscapeIndexType[(sizeInByteToAllocate + (sizeof(TLandscapeIndexType) - 1)) /sizeof(TLandscapeIndexType)];
|
||||
// Init it as a free faceVector, with no Next.
|
||||
*(TLandscapeIndexType**)_Blocks[blockId]= NULL;
|
||||
|
|
|
@ -61,7 +61,7 @@ void CLightInfluenceInterpolator::interpolate(std::vector<CPointLightInfluence>
|
|||
{
|
||||
// append a PointLightInfluence
|
||||
pointLightList.push_back(CPointLightInfluence());
|
||||
sint id= pointLightList.size()-1;
|
||||
sint id= (sint)pointLightList.size()-1;
|
||||
// setup the PointLightInfluence
|
||||
corner.Lights[0]->_IdInInfluenceList= id;
|
||||
pointLightList[id].PointLight= corner.Lights[0];
|
||||
|
@ -82,7 +82,7 @@ void CLightInfluenceInterpolator::interpolate(std::vector<CPointLightInfluence>
|
|||
{
|
||||
// append a PointLightInfluence
|
||||
pointLightList.push_back(CPointLightInfluence());
|
||||
sint id= pointLightList.size()-1;
|
||||
sint id= (sint)pointLightList.size()-1;
|
||||
// setup the PointLightInfluence
|
||||
corner.Lights[1]->_IdInInfluenceList= id;
|
||||
pointLightList[id].PointLight= corner.Lights[1];
|
||||
|
|
|
@ -189,7 +189,7 @@ void CLodCharacterBuilder::addAnim(const char *animName, CAnimation *animation
|
|||
// ***************************************************************************
|
||||
void CLodCharacterBuilder::applySkin(CSkeletonModel *skeleton, CVector *dstVertices)
|
||||
{
|
||||
uint numVerts= _LodBuild->Vertices.size();
|
||||
uint numVerts= (uint)_LodBuild->Vertices.size();
|
||||
|
||||
// for all vertices.
|
||||
for(uint i=0; i<numVerts; i++)
|
||||
|
|
|
@ -139,7 +139,7 @@ uint32 CLodCharacterManager::createShapeBank()
|
|||
|
||||
// no free entrey, resize array.
|
||||
_ShapeBankArray.push_back(new CLodCharacterShapeBank);
|
||||
return _ShapeBankArray.size()-1;
|
||||
return (uint32)_ShapeBankArray.size()-1;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -347,7 +347,7 @@ CLodCharacterShape::CLodCharacterShape()
|
|||
// ***************************************************************************
|
||||
void CLodCharacterShape::buildMesh(const std::string &name, const CLodCharacterShapeBuild &lodBuild)
|
||||
{
|
||||
uint numVertices= lodBuild.Vertices.size();
|
||||
uint numVertices= (uint)lodBuild.Vertices.size();
|
||||
const vector<uint32> &triangleIndices= lodBuild.TriangleIndices;
|
||||
const vector<CMesh::CSkinWeight> &skinWeights= lodBuild.SkinWeights;
|
||||
const vector<CUV> &uvs= lodBuild.UVs;
|
||||
|
@ -372,7 +372,7 @@ void CLodCharacterShape::buildMesh(const std::string &name, const CLodCharacte
|
|||
// Copy data.
|
||||
_Name= name;
|
||||
_NumVertices= numVertices;
|
||||
_NumTriangles= triangleIndices.size()/3;
|
||||
_NumTriangles= (uint32)triangleIndices.size()/3;
|
||||
#ifdef NL_LOD_CHARACTER_INDEX16
|
||||
_TriangleIndices.resize(triangleIndices.size());
|
||||
for(uint k = 0; k < triangleIndices.size(); ++k)
|
||||
|
@ -492,7 +492,7 @@ bool CLodCharacterShape::addAnim(const CAnimBuild &animBuild)
|
|||
|
||||
// Add the anim to the array, and add an entry to the map
|
||||
_Anims.push_back(dstAnim);
|
||||
_AnimMap.insert(make_pair(dstAnim.Name, _Anims.size()-1));
|
||||
_AnimMap.insert(make_pair(dstAnim.Name, (uint32)_Anims.size()-1));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ uint32 CLodCharacterShapeBank::addShape()
|
|||
// Alloc a new shape
|
||||
_ShapeArray.resize(_ShapeArray.size()+1);
|
||||
|
||||
return _ShapeArray.size()-1;
|
||||
return (uint32)_ShapeArray.size()-1;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -105,7 +105,7 @@ bool CLodCharacterShapeBank::compile()
|
|||
// ***************************************************************************
|
||||
uint CLodCharacterShapeBank::getNumShapes() const
|
||||
{
|
||||
return _ShapeArray.size();
|
||||
return (uint)_ShapeArray.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -226,7 +226,7 @@ void CMaterial::serial(NLMISC::IStream &f)
|
|||
}
|
||||
else
|
||||
{
|
||||
n = _LightMaps.size();
|
||||
n = (uint32)_LightMaps.size();
|
||||
f.serial(n);
|
||||
}
|
||||
for (uint32 i = 0; i < n; ++i)
|
||||
|
|
|
@ -290,7 +290,7 @@ void CMeshGeom::build (CMesh::CMeshBuild &m, uint numMaxMaterial)
|
|||
TCornerSet corners;
|
||||
const CFaceTmp *pFace= &(*tmpFaces.begin());
|
||||
uint32 nFaceMB = 0;
|
||||
sint N= tmpFaces.size();
|
||||
sint N= (sint)tmpFaces.size();
|
||||
sint currentVBIndex=0;
|
||||
|
||||
m.VertLink.clear ();
|
||||
|
@ -336,7 +336,7 @@ void CMeshGeom::build (CMesh::CMeshBuild &m, uint numMaxMaterial)
|
|||
/// 4. Then, for all faces, build the RdrPass PBlock.
|
||||
//===================================================
|
||||
pFace= &(*tmpFaces.begin());
|
||||
N= tmpFaces.size();
|
||||
N= (sint)tmpFaces.size();
|
||||
for(;N>0;N--, pFace++)
|
||||
{
|
||||
sint mbId= pFace->MatrixBlockId;
|
||||
|
@ -1302,7 +1302,7 @@ void CMeshGeom::buildSkin(CMesh::CMeshBuild &m, std::vector<CFaceTmp> &tmpFaces)
|
|||
}
|
||||
|
||||
// to Which matrixblock this face is inserted.
|
||||
face.MatrixBlockId= _MatrixBlocks.size()-1;
|
||||
face.MatrixBlockId= (sint)_MatrixBlocks.size()-1;
|
||||
|
||||
// remove the face from remain face list.
|
||||
itFace= remainingFaces.erase(itFace);
|
||||
|
@ -1450,13 +1450,13 @@ float CMeshGeom::getNumTriangles (float distance)
|
|||
uint32 triCount=0;
|
||||
|
||||
// For each matrix block
|
||||
uint mbCount=_MatrixBlocks.size();
|
||||
uint mbCount=(uint)_MatrixBlocks.size();
|
||||
for (uint mb=0; mb<mbCount; mb++)
|
||||
{
|
||||
CMatrixBlock &block=_MatrixBlocks[mb];
|
||||
|
||||
// Count of primitive block
|
||||
uint pCount=block.RdrPass.size();
|
||||
uint pCount=(uint)block.RdrPass.size();
|
||||
for (uint pb=0; pb<pCount; pb++)
|
||||
{
|
||||
// Ref on the primitive block
|
||||
|
@ -1797,7 +1797,7 @@ void CMeshGeom::applySkin(CSkeletonModel *skeleton)
|
|||
skinType= SkinWithTgSpace;
|
||||
|
||||
// Get VB src/dst info/ptrs.
|
||||
uint numVertices= _OriginalSkinVertices.size();
|
||||
uint numVertices= (uint)_OriginalSkinVertices.size();
|
||||
uint dstStride= _VBuffer.getVertexSize();
|
||||
// Get dst TgSpace.
|
||||
uint tgSpaceStage = 0;
|
||||
|
@ -2208,12 +2208,12 @@ bool CMeshGeom::sortPerMaterial() const
|
|||
// ***************************************************************************
|
||||
uint CMeshGeom::getNumRdrPassesForMesh() const
|
||||
{
|
||||
return _MatrixBlocks[0].RdrPass.size();
|
||||
return (uint)_MatrixBlocks[0].RdrPass.size();
|
||||
}
|
||||
// ***************************************************************************
|
||||
uint CMeshGeom::getNumRdrPassesForInstance(CMeshBaseInstance *inst) const
|
||||
{
|
||||
return _MatrixBlocks[0].RdrPass.size();
|
||||
return (uint)_MatrixBlocks[0].RdrPass.size();
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CMeshGeom::beginMesh(CMeshGeomRenderContext &rdrCtx)
|
||||
|
@ -2502,7 +2502,7 @@ void CMesh::build (CMeshBase::CMeshBaseBuild &mbase, CMeshBuild &m)
|
|||
CMeshBase::buildMeshBase (mbase);
|
||||
|
||||
// build the geometry.
|
||||
_MeshGeom->build (m, mbase.Materials.size());
|
||||
_MeshGeom->build (m, (uint)mbase.Materials.size());
|
||||
|
||||
// compile some stuff
|
||||
compileRunTime();
|
||||
|
|
|
@ -396,7 +396,7 @@ void CMeshBase::applyMaterialUsageOptim(const std::vector<bool> &materialUsed, s
|
|||
}
|
||||
|
||||
// apply the remap to LightMaps infos
|
||||
const uint count = _LightInfos.size ();
|
||||
const uint count = (uint)_LightInfos.size ();
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
CLightMapInfoList &mapInfoList = _LightInfos[i];
|
||||
|
@ -425,7 +425,7 @@ void CMeshBase::applyMaterialUsageOptim(const std::vector<bool> &materialUsed, s
|
|||
void CMeshBase::flushTextures(IDriver &driver, uint selectedTexture)
|
||||
{
|
||||
// Mat count
|
||||
uint matCount=_Materials.size();
|
||||
uint matCount=(uint)_Materials.size();
|
||||
|
||||
// Flush each material textures
|
||||
for (uint mat=0; mat<matCount; mat++)
|
||||
|
@ -443,7 +443,7 @@ void CMeshBase::computeIsLightable()
|
|||
_IsLightable= false;
|
||||
|
||||
// Mat count
|
||||
uint matCount=_Materials.size();
|
||||
uint matCount=(uint)_Materials.size();
|
||||
|
||||
// for each material
|
||||
for (uint mat=0; mat<matCount; mat++)
|
||||
|
|
|
@ -117,7 +117,7 @@ ITrack* CMeshBaseInstance::getDefaultTrack (uint valueId)
|
|||
uint32 CMeshBaseInstance::getNbLightMap()
|
||||
{
|
||||
CMeshBase* pMesh=(CMeshBase*)(IShape*)Shape;
|
||||
return pMesh->_LightInfos.size();
|
||||
return (uint32)pMesh->_LightInfos.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -132,7 +132,7 @@ void CMeshBaseInstance::getLightMapName( uint32 nLightMapNb, std::string &LightM
|
|||
// ***************************************************************************
|
||||
uint32 CMeshBaseInstance::getNbBlendShape()
|
||||
{
|
||||
return _AnimatedMorphFactor.size();
|
||||
return (uint32)_AnimatedMorphFactor.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -228,8 +228,8 @@ void CMeshBaseInstance::traverseAnimDetail()
|
|||
// Lightmap automatic animation
|
||||
|
||||
// Animated lightmap must have the same size than shape info lightmap.
|
||||
const uint count0 = _AnimatedLightmap.size();
|
||||
const uint count1 = mb->_LightInfos.size ();
|
||||
const uint count0 = (uint)_AnimatedLightmap.size();
|
||||
const uint count1 = (uint)mb->_LightInfos.size ();
|
||||
nlassert (count0 == count1);
|
||||
if (count0 == count1)
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ void CMeshBaseInstance::initAnimatedLightIndex (const CScene &scene)
|
|||
|
||||
// For each lightmap in the shape
|
||||
CMeshBase *pMB = static_cast<CMeshBase*> (static_cast<IShape*> (Shape));
|
||||
const uint count = pMB->_LightInfos.size ();
|
||||
const uint count = (uint)pMB->_LightInfos.size ();
|
||||
uint i;
|
||||
|
||||
// Resize the index array
|
||||
|
@ -339,7 +339,7 @@ void CMeshBaseInstance::initAnimatedLightIndex (const CScene &scene)
|
|||
// ***************************************************************************
|
||||
uint CMeshBaseInstance::getNumMaterial () const
|
||||
{
|
||||
return Materials.size ();
|
||||
return (uint)Materials.size ();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ void CMeshBlockManager::addInstance(IMeshGeom *meshGeom, CMeshBaseInstance *in
|
|||
|
||||
// link to the head of the list.
|
||||
instInfo.NextInstance= meshGeom->_RootInstanceId;
|
||||
meshGeom->_RootInstanceId= hb->RdrInstances.size();
|
||||
meshGeom->_RootInstanceId= (sint32)hb->RdrInstances.size();
|
||||
|
||||
// add this instance
|
||||
hb->RdrInstances.push_back(instInfo);
|
||||
|
@ -311,7 +311,7 @@ void CMeshBlockManager::allocateMeshVBHeap(IMeshGeom *mesh)
|
|||
// else, must add to the array
|
||||
else
|
||||
{
|
||||
meshId= vbHeapBlock->AllocatedMeshGeoms.size();
|
||||
meshId= (uint)vbHeapBlock->AllocatedMeshGeoms.size();
|
||||
vbHeapBlock->AllocatedMeshGeoms.push_back(mesh);
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ bool CMeshBlockManager::addVBHeap(IDriver *drv, uint vertexFormat, uint maxVer
|
|||
|
||||
// add an entry to the array, and the map.
|
||||
_VBHeapBlocks.push_back(hb);
|
||||
_VBHeapMap[vertexFormat]= _VBHeapBlocks.size()-1;
|
||||
_VBHeapMap[vertexFormat]= (uint)_VBHeapBlocks.size()-1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -405,7 +405,7 @@ void CMeshMorpher::updateRawSkin (CVertexBuffer *vbOri,
|
|||
if (rFactor != 0.0f)
|
||||
{
|
||||
rFactor*= 0.01f;
|
||||
uint32 numVertices= rBS.VertRefs.size();
|
||||
uint32 numVertices= (uint32)rBS.VertRefs.size();
|
||||
// don't know why, but cases happen where deltaNorm not empty while deltaPos is
|
||||
bool hasPos= rBS.deltaPos.size()>0;
|
||||
bool hasNorm= rBS.deltaNorm.size()>0;
|
||||
|
|
|
@ -107,7 +107,7 @@ void CMeshMRMGeom::CLod::buildSkinVertexBlocks()
|
|||
uint i;
|
||||
for(i=0;i<NL3D_MESH_SKINNING_MAX_MATRIX;i++)
|
||||
{
|
||||
uint nInf= InfluencedVertices[i].size();
|
||||
uint nInf= (uint)InfluencedVertices[i].size();
|
||||
if( nInf==0 )
|
||||
continue;
|
||||
uint32 *infPtr= &(InfluencedVertices[i][0]);
|
||||
|
@ -299,7 +299,7 @@ void CMeshMRMGeom::build(CMesh::CMeshBuild &m, std::vector<CMesh::CMeshBuild*>
|
|||
// LodOffset is filled in serial() when stream is input.
|
||||
}
|
||||
// After build, all lods are present in memory.
|
||||
_NbLodLoaded= _Lods.size();
|
||||
_NbLodLoaded= (uint)_Lods.size();
|
||||
|
||||
|
||||
// For load balancing.
|
||||
|
@ -549,7 +549,7 @@ void CMeshMRMGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms
|
|||
|
||||
|
||||
// For all geomorphs.
|
||||
uint nGeoms= geoms.size();
|
||||
uint nGeoms= (uint)geoms.size();
|
||||
CMRMWedgeGeom *ptrGeom= &(geoms[0]);
|
||||
uint8 *destPtr= vertexDestPtr;
|
||||
/* NB: optimisation: lot of "if" in this Loop, but because of BTB, they always cost nothing (prediction is good).
|
||||
|
@ -751,7 +751,7 @@ void CMeshMRMGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms
|
|||
// For all stages after 4.
|
||||
for(i=4;i<CVertexBuffer::MaxStage;i++)
|
||||
{
|
||||
uint nGeoms= geoms.size();
|
||||
uint nGeoms= (uint)geoms.size();
|
||||
CMRMWedgeGeom *ptrGeom= &(geoms[0]);
|
||||
uint8 *destPtr= vertexDestPtr;
|
||||
|
||||
|
@ -793,7 +793,7 @@ void CMeshMRMGeom::applyGeomorphPosNormalUV0(std::vector<CMRMWedgeGeom> &geoms,
|
|||
|
||||
|
||||
// For all geomorphs.
|
||||
uint nGeoms= geoms.size();
|
||||
uint nGeoms= (uint)geoms.size();
|
||||
CMRMWedgeGeom *ptrGeom= &(geoms[0]);
|
||||
uint8 *destPtr= vertexDestPtr;
|
||||
for(; nGeoms>0; nGeoms--, ptrGeom++, destPtr+= vertexSize )
|
||||
|
@ -1355,7 +1355,7 @@ sint CMeshMRMGeom::renderSkinGroupGeom(CMeshMRMInstance *mi, float alphaMRM, uin
|
|||
applyRawSkinWithNormal (lod, *(mi->_RawSkinCache), skeleton, vbDest, alphaLod);
|
||||
|
||||
// Vertices are packed in RawSkin mode (ie no holes due to MRM!)
|
||||
return mi->_RawSkinCache->Geomorphs.size() +
|
||||
return (sint)mi->_RawSkinCache->Geomorphs.size() +
|
||||
mi->_RawSkinCache->TotalSoftVertices +
|
||||
mi->_RawSkinCache->TotalHardVertices;
|
||||
}
|
||||
|
@ -1519,7 +1519,7 @@ void CMeshMRMGeom::updateShiftedTriangleCache(CMeshMRMInstance *mi, sint curLodI
|
|||
}
|
||||
|
||||
// Build RdrPass
|
||||
mi->_ShiftedTriangleCache->RdrPass.resize(pbList.size());
|
||||
mi->_ShiftedTriangleCache->RdrPass.resize((uint32)pbList.size());
|
||||
|
||||
// First pass, count number of triangles, and fill header info
|
||||
uint totalTri= 0;
|
||||
|
@ -1764,7 +1764,7 @@ void CMeshMRMGeom::load(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
|
||||
// Now, all lods are loaded.
|
||||
_NbLodLoaded= _Lods.size();
|
||||
_NbLodLoaded= (uint)_Lods.size();
|
||||
|
||||
// If version doen't have boneNames, must build BoneId now.
|
||||
if(verHeader <= 2)
|
||||
|
@ -1951,7 +1951,7 @@ void CMeshMRMGeom::loadFirstLod(NLMISC::IStream &f)
|
|||
*/
|
||||
uint numLodToLoad;
|
||||
if(verHeader<4)
|
||||
numLodToLoad= _LodInfos.size();
|
||||
numLodToLoad= (uint)_LodInfos.size();
|
||||
else
|
||||
numLodToLoad= 1;
|
||||
|
||||
|
@ -2152,7 +2152,7 @@ void CMeshMRMGeom::restoreOriginalSkinPart(CLod &lod)
|
|||
//===========================
|
||||
for(uint i=0;i<NL3D_MESH_SKINNING_MAX_MATRIX;i++)
|
||||
{
|
||||
uint nInf= lod.InfluencedVertices[i].size();
|
||||
uint nInf= (uint)lod.InfluencedVertices[i].size();
|
||||
if( nInf==0 )
|
||||
continue;
|
||||
uint32 *infPtr= &(lod.InfluencedVertices[i][0]);
|
||||
|
@ -2588,7 +2588,7 @@ bool CMeshMRMGeom::buildGeometryForLod(uint lodId, std::vector<CVector> &vertice
|
|||
|
||||
// **** count number of vertices really used (skip geomorphs)
|
||||
uint numUsedVertices=0;
|
||||
for(i=geomorphs.size();i<vertexRemap.size();i++)
|
||||
for(i=(uint)geomorphs.size();i<vertexRemap.size();i++)
|
||||
{
|
||||
if(vertexRemap[i]>=0)
|
||||
numUsedVertices++;
|
||||
|
@ -2607,13 +2607,13 @@ bool CMeshMRMGeom::buildGeometryForLod(uint lodId, std::vector<CVector> &vertice
|
|||
_VBufferFinal.lock(vba);
|
||||
|
||||
// get the start vert, beginning at end of geomorphs
|
||||
const uint8 *pSrcVert= (const uint8*)vba.getVertexCoordPointer(geomorphs.size());
|
||||
const uint8 *pSrcVert= (const uint8*)vba.getVertexCoordPointer((uint)geomorphs.size());
|
||||
uint32 vertSize= _VBufferFinal.getVertexSize();
|
||||
CVector *pDstVert= &vertices[0];
|
||||
uint dstIndex= 0;
|
||||
|
||||
// Then run all input vertices (skip geomorphs)
|
||||
for(i=geomorphs.size();i<vertexRemap.size();i++)
|
||||
for(i=(uint)geomorphs.size();i<vertexRemap.size();i++)
|
||||
{
|
||||
// if the vertex is used
|
||||
if(vertexRemap[i]>=0)
|
||||
|
@ -2710,7 +2710,7 @@ uint CMeshMRMGeom::getNumRdrPassesForMesh() const
|
|||
// ***************************************************************************
|
||||
uint CMeshMRMGeom::getNumRdrPassesForInstance(CMeshBaseInstance *inst) const
|
||||
{
|
||||
return _Lods[_MBRCurrentLodId].RdrPass.size();
|
||||
return (uint)_Lods[_MBRCurrentLodId].RdrPass.size();
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CMeshMRMGeom::beginMesh(CMeshGeomRenderContext &rdrCtx)
|
||||
|
@ -2884,7 +2884,7 @@ void CMeshMRM::build (CMeshBase::CMeshBaseBuild &mBase, CMesh::CMeshBuild &m,
|
|||
CMeshBase::buildMeshBase (mBase);
|
||||
|
||||
// Then build the geom.
|
||||
_MeshMRMGeom.build (m, listBS, mBase.Materials.size(), params);
|
||||
_MeshMRMGeom.build (m, listBS, (uint)mBase.Materials.size(), params);
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CMeshMRM::build (CMeshBase::CMeshBaseBuild &m, const CMeshMRMGeom &mgeom)
|
||||
|
@ -3196,10 +3196,10 @@ void CMeshMRMGeom::updateRawSkinNormal(bool enabled, CMeshMRMInstance *mi, sint
|
|||
|
||||
|
||||
// Resize the dest array.
|
||||
skinLod.Vertices1.resize(lod.InfluencedVertices[0].size());
|
||||
skinLod.Vertices2.resize(lod.InfluencedVertices[1].size());
|
||||
skinLod.Vertices3.resize(lod.InfluencedVertices[2].size());
|
||||
skinLod.Vertices4.resize(lod.InfluencedVertices[3].size());
|
||||
skinLod.Vertices1.resize((uint32)lod.InfluencedVertices[0].size());
|
||||
skinLod.Vertices2.resize((uint32)lod.InfluencedVertices[1].size());
|
||||
skinLod.Vertices3.resize((uint32)lod.InfluencedVertices[2].size());
|
||||
skinLod.Vertices4.resize((uint32)lod.InfluencedVertices[3].size());
|
||||
|
||||
// Remap for BlendShape. Lasts 2 bits tells what RawSkin Array to seek (1 to 4),
|
||||
// low Bits indicate the number in them. 0xFFFFFFFF is a special value indicating "NotUsed in this lod"
|
||||
|
@ -3308,7 +3308,7 @@ void CMeshMRMGeom::updateRawSkinNormal(bool enabled, CMeshMRMInstance *mi, sint
|
|||
|
||||
// Remap Geomorphs.
|
||||
//========
|
||||
uint numGeoms= lod.Geomorphs.size();
|
||||
uint numGeoms= (uint)lod.Geomorphs.size();
|
||||
skinLod.Geomorphs.resize( numGeoms );
|
||||
for(i=0;i<numGeoms;i++)
|
||||
{
|
||||
|
@ -3369,7 +3369,7 @@ void CMeshMRMGeom::updateRawSkinNormal(bool enabled, CMeshMRMInstance *mi, sint
|
|||
//========
|
||||
if(_MeshMorpher.BlendShapes.size()>0)
|
||||
{
|
||||
skinLod.VertexRemap.resize(vertexFinalRemap.size());
|
||||
skinLod.VertexRemap.resize((uint32)vertexFinalRemap.size());
|
||||
|
||||
for(i=0;i<vertexFinalRemap.size();i++)
|
||||
{
|
||||
|
@ -3424,13 +3424,13 @@ void CMeshMRMGeom::setShadowMesh(const std::vector<CShadowVertex> &shadowVerti
|
|||
// ***************************************************************************
|
||||
uint CMeshMRMGeom::getNumShadowSkinVertices() const
|
||||
{
|
||||
return _ShadowSkin.Vertices.size();
|
||||
return (uint)_ShadowSkin.Vertices.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
sint CMeshMRMGeom::renderShadowSkinGeom(CMeshMRMInstance *mi, uint remainingVertices, uint8 *vbDest)
|
||||
{
|
||||
uint numVerts= _ShadowSkin.Vertices.size();
|
||||
uint numVerts= (uint)_ShadowSkin.Vertices.size();
|
||||
|
||||
// if no verts, no draw
|
||||
if(numVerts==0)
|
||||
|
@ -3496,7 +3496,7 @@ void CMeshMRMGeom::renderShadowSkinPrimitives(CMeshMRMInstance *mi, CMaterial
|
|||
if(shiftedTris.getNumIndexes()<_ShadowSkin.Triangles.size())
|
||||
{
|
||||
shiftedTris.setFormat(NL_MESH_MRM_INDEX_FORMAT);
|
||||
shiftedTris.setNumIndexes(_ShadowSkin.Triangles.size());
|
||||
shiftedTris.setNumIndexes((uint32)_ShadowSkin.Triangles.size());
|
||||
}
|
||||
shiftedTris.setPreferredMemory(CIndexBuffer::RAMVolatile, false);
|
||||
{
|
||||
|
@ -3504,7 +3504,7 @@ void CMeshMRMGeom::renderShadowSkinPrimitives(CMeshMRMInstance *mi, CMaterial
|
|||
shiftedTris.lock(iba);
|
||||
const uint32 *src= &_ShadowSkin.Triangles[0];
|
||||
TMeshMRMIndexType *dst= (TMeshMRMIndexType *) iba.getPtr();
|
||||
for(uint n= _ShadowSkin.Triangles.size();n>0;n--, src++, dst++)
|
||||
for(uint n= (uint)_ShadowSkin.Triangles.size();n>0;n--, src++, dst++)
|
||||
{
|
||||
*dst= (TMeshMRMIndexType)(*src + baseVertex);
|
||||
}
|
||||
|
@ -3513,7 +3513,7 @@ void CMeshMRMGeom::renderShadowSkinPrimitives(CMeshMRMInstance *mi, CMaterial
|
|||
// Render Triangles with cache
|
||||
//===========
|
||||
|
||||
uint numTris= _ShadowSkin.Triangles.size()/3;
|
||||
uint numTris= (uint)_ShadowSkin.Triangles.size()/3;
|
||||
|
||||
// Render with the Materials of the MeshInstance.
|
||||
drv->activeIndexBuffer(shiftedTris);
|
||||
|
|
|
@ -204,7 +204,7 @@ void CMeshMRMGeom::applySkin(CLod &lod, const CSkeletonModel *skeleton)
|
|||
nlassert(NL3D_MESH_SKINNING_MAX_MATRIX==4);
|
||||
for(uint i=0;i<NL3D_MESH_SKINNING_MAX_MATRIX;i++)
|
||||
{
|
||||
uint nInf= lod.InfluencedVertices[i].size();
|
||||
uint nInf= (uint)lod.InfluencedVertices[i].size();
|
||||
if( nInf==0 )
|
||||
continue;
|
||||
uint32 *infPtr= &(lod.InfluencedVertices[i][0]);
|
||||
|
|
|
@ -390,7 +390,7 @@ void CMeshMRMGeom::applySkinWithNormal(CLod &lod, const CSkeletonModel *skeleton
|
|||
nlassert(NL3D_MESH_SKINNING_MAX_MATRIX==4);
|
||||
for(uint i=0;i<NL3D_MESH_SKINNING_MAX_MATRIX;i++)
|
||||
{
|
||||
uint nInf= lod.InfluencedVertices[i].size();
|
||||
uint nInf= (uint)lod.InfluencedVertices[i].size();
|
||||
if( nInf==0 )
|
||||
continue;
|
||||
uint32 *infPtr= &(lod.InfluencedVertices[i][0]);
|
||||
|
@ -462,7 +462,7 @@ void CMeshMRMGeom::applySkinWithTangentSpace(CLod &lod, const CSkeletonModel *sk
|
|||
nlassert(NL3D_MESH_SKINNING_MAX_MATRIX==4);
|
||||
for(uint i=0;i<NL3D_MESH_SKINNING_MAX_MATRIX;i++)
|
||||
{
|
||||
uint nInf= lod.InfluencedVertices[i].size();
|
||||
uint nInf= (uint)lod.InfluencedVertices[i].size();
|
||||
if( nInf==0 )
|
||||
continue;
|
||||
uint32 *infPtr= &(lod.InfluencedVertices[i][0]);
|
||||
|
|
|
@ -445,7 +445,7 @@ void CMeshMRMSkinnedGeom::applyGeomorphPosNormalUV0(std::vector<CMRMWedgeGeom>
|
|||
|
||||
|
||||
// For all geomorphs.
|
||||
uint nGeoms= geoms.size();
|
||||
uint nGeoms= (uint)geoms.size();
|
||||
CMRMWedgeGeom *ptrGeom= &(geoms[0]);
|
||||
uint8 *destPtr= vertexDestPtr;
|
||||
for(; nGeoms>0; nGeoms--, ptrGeom++, destPtr+= vertexSize )
|
||||
|
@ -472,7 +472,7 @@ void CMeshMRMSkinnedGeom::applyGeomorphPosNormalUV0(std::vector<CMRMWedgeGeom>
|
|||
void CMeshMRMSkinnedGeom::applyGeomorphPosNormalUV0Int(std::vector<CMRMWedgeGeom> &geoms, uint8 *vertexPtr, uint8 *vertexDestPtr, sint32 vertexSize, sint a, sint a1)
|
||||
{
|
||||
// For all geomorphs.
|
||||
uint nGeoms= geoms.size();
|
||||
uint nGeoms= (uint)geoms.size();
|
||||
CMRMWedgeGeom *ptrGeom= &(geoms[0]);
|
||||
uint8 *destPtr= vertexDestPtr;
|
||||
for(; nGeoms>0; nGeoms--, ptrGeom++, destPtr+= vertexSize )
|
||||
|
@ -567,7 +567,7 @@ inline sint CMeshMRMSkinnedGeom::chooseLod(float alphaMRM, float &alphaLod)
|
|||
/// Ensure numLod is correct
|
||||
if(numLod>=(sint)_Lods.size())
|
||||
{
|
||||
numLod= _Lods.size()-1;
|
||||
numLod= (sint)_Lods.size()-1;
|
||||
alphaLod= 1;
|
||||
}
|
||||
|
||||
|
@ -799,7 +799,7 @@ sint CMeshMRMSkinnedGeom::renderSkinGroupGeom(CMeshMRMSkinnedInstance *mi, float
|
|||
applyRawSkinWithNormal (lod, *(mi->_RawSkinCache), skeleton, vbDest, alphaLod);
|
||||
|
||||
// Vertices are packed in RawSkin mode (ie no holes due to MRM!)
|
||||
return mi->_RawSkinCache->Geomorphs.size() +
|
||||
return (sint)mi->_RawSkinCache->Geomorphs.size() +
|
||||
mi->_RawSkinCache->TotalSoftVertices +
|
||||
mi->_RawSkinCache->TotalHardVertices;
|
||||
}
|
||||
|
@ -951,7 +951,7 @@ void CMeshMRMSkinnedGeom::updateShiftedTriangleCache(CMeshMRMSkinnedInstance *mi
|
|||
}
|
||||
|
||||
// Build RdrPass
|
||||
mi->_ShiftedTriangleCache->RdrPass.resize(pbList.size());
|
||||
mi->_ShiftedTriangleCache->RdrPass.resize((uint32)pbList.size());
|
||||
|
||||
// First pass, count number of triangles, and fill header info
|
||||
uint totalTri= 0;
|
||||
|
@ -1463,7 +1463,7 @@ void CMeshMRMSkinned::build (CMeshBase::CMeshBaseBuild &mBase, CMesh::CMeshBui
|
|||
CMeshBase::buildMeshBase (mBase);
|
||||
|
||||
// Then build the geom.
|
||||
_MeshMRMGeom.build (m, mBase.Materials.size(), params);
|
||||
_MeshMRMGeom.build (m, (uint)mBase.Materials.size(), params);
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CMeshMRMSkinned::build (CMeshBase::CMeshBaseBuild &m, const CMeshMRMSkinnedGeom &mgeom)
|
||||
|
@ -1736,10 +1736,10 @@ void CMeshMRMSkinnedGeom::updateRawSkinNormal(bool enabled, CMeshMRMSkinnedInst
|
|||
|
||||
|
||||
// Resize the dest array.
|
||||
skinLod.Vertices1.resize(lod.InfluencedVertices[0].size());
|
||||
skinLod.Vertices2.resize(lod.InfluencedVertices[1].size());
|
||||
skinLod.Vertices3.resize(lod.InfluencedVertices[2].size());
|
||||
skinLod.Vertices4.resize(lod.InfluencedVertices[3].size());
|
||||
skinLod.Vertices1.resize((uint32)lod.InfluencedVertices[0].size());
|
||||
skinLod.Vertices2.resize((uint32)lod.InfluencedVertices[1].size());
|
||||
skinLod.Vertices3.resize((uint32)lod.InfluencedVertices[2].size());
|
||||
skinLod.Vertices4.resize((uint32)lod.InfluencedVertices[3].size());
|
||||
|
||||
// Vertex buffer pointers
|
||||
const CPackedVertexBuffer::CPackedVertex *vertices = _VBufferFinal.getPackedVertices();
|
||||
|
@ -1846,7 +1846,7 @@ void CMeshMRMSkinnedGeom::updateRawSkinNormal(bool enabled, CMeshMRMSkinnedInst
|
|||
|
||||
// Remap Geomorphs.
|
||||
//========
|
||||
uint numGeoms= lod.Geomorphs.size();
|
||||
uint numGeoms= (uint)lod.Geomorphs.size();
|
||||
skinLod.Geomorphs.resize( numGeoms );
|
||||
for(i=0;i<numGeoms;i++)
|
||||
{
|
||||
|
@ -1882,7 +1882,7 @@ void CMeshMRMSkinnedGeom::updateRawSkinNormal(bool enabled, CMeshMRMSkinnedInst
|
|||
#else
|
||||
nlassert(ibaWrite.getFormat() == CIndexBuffer::Indices16);
|
||||
uint16 *dstTriPtr= (uint16 *) ibaWrite.getPtr();
|
||||
uint32 numIndices= lod.RdrPass[i].PBlock.size();
|
||||
uint32 numIndices= (uint32)lod.RdrPass[i].PBlock.size();
|
||||
for(uint j=0;j<numIndices;j++, srcTriPtr++, dstTriPtr++)
|
||||
{
|
||||
uint vid= (uint)*srcTriPtr;
|
||||
|
@ -1920,13 +1920,13 @@ void CMeshMRMSkinnedGeom::setShadowMesh(const std::vector<CShadowVertex> &shad
|
|||
// ***************************************************************************
|
||||
uint CMeshMRMSkinnedGeom::getNumShadowSkinVertices() const
|
||||
{
|
||||
return _ShadowSkin.Vertices.size();
|
||||
return (uint)_ShadowSkin.Vertices.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
sint CMeshMRMSkinnedGeom::renderShadowSkinGeom(CMeshMRMSkinnedInstance *mi, uint remainingVertices, uint8 *vbDest)
|
||||
{
|
||||
uint numVerts= _ShadowSkin.Vertices.size();
|
||||
uint numVerts= (uint)_ShadowSkin.Vertices.size();
|
||||
|
||||
// if no verts, no draw
|
||||
if(numVerts==0)
|
||||
|
@ -1991,14 +1991,14 @@ void CMeshMRMSkinnedGeom::renderShadowSkinPrimitives(CMeshMRMSkinnedInstance *
|
|||
//if(shiftedTris.getNumIndexes()<_ShadowSkin.Triangles.size())
|
||||
//{
|
||||
shiftedTris.setFormat(NL_SKINNED_MESH_MRM_INDEX_FORMAT);
|
||||
shiftedTris.setNumIndexes(_ShadowSkin.Triangles.size());
|
||||
shiftedTris.setNumIndexes((uint32)_ShadowSkin.Triangles.size());
|
||||
//}
|
||||
{
|
||||
CIndexBufferReadWrite iba;
|
||||
shiftedTris.lock(iba);
|
||||
const uint32 *src= &_ShadowSkin.Triangles[0];
|
||||
TSkinnedMeshMRMIndexType *dst= (TSkinnedMeshMRMIndexType*) iba.getPtr();
|
||||
for(uint n= _ShadowSkin.Triangles.size();n>0;n--, src++, dst++)
|
||||
for(uint n= (uint)_ShadowSkin.Triangles.size();n>0;n--, src++, dst++)
|
||||
{
|
||||
*dst= (TSkinnedMeshMRMIndexType)(*src + baseVertex);
|
||||
}
|
||||
|
@ -2007,7 +2007,7 @@ void CMeshMRMSkinnedGeom::renderShadowSkinPrimitives(CMeshMRMSkinnedInstance *
|
|||
// Render Triangles with cache
|
||||
//===========
|
||||
|
||||
uint numTris= _ShadowSkin.Triangles.size()/3;
|
||||
uint numTris= (uint)_ShadowSkin.Triangles.size()/3;
|
||||
|
||||
// Render with the Materials of the MeshInstance.
|
||||
drv->activeIndexBuffer(shiftedTris);
|
||||
|
|
|
@ -115,7 +115,7 @@ void CMeshMultiLod::build(CMeshMultiLodBuild &mbuild)
|
|||
}
|
||||
|
||||
// Sort the slot by the distance...
|
||||
for (int i=mbuild.LodMeshes.size()-1; i>0; i--)
|
||||
for (int i=(uint)mbuild.LodMeshes.size()-1; i>0; i--)
|
||||
for (int j=0; j<i; j++)
|
||||
{
|
||||
// Bad sort ?
|
||||
|
@ -204,7 +204,7 @@ CTransformShape *CMeshMultiLod::createInstance(CScene &scene)
|
|||
bool CMeshMultiLod::clip(const std::vector<CPlane> &pyramid, const CMatrix &worldMatrix)
|
||||
{
|
||||
// Look for the biggest mesh
|
||||
uint meshCount=_MeshVector.size();
|
||||
uint meshCount=(uint)_MeshVector.size();
|
||||
for (uint i=0; i<meshCount; i++)
|
||||
{
|
||||
// Ref on slot
|
||||
|
@ -315,7 +315,7 @@ void CMeshMultiLod::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
float CMeshMultiLod::getNumTrianglesWithCoarsestDist(float distance, float coarsestMeshDist) const
|
||||
{
|
||||
// Look in the table for good distances..
|
||||
uint meshCount=_MeshVector.size();
|
||||
uint meshCount=(uint)_MeshVector.size();
|
||||
|
||||
// At least on mesh
|
||||
if (meshCount>0)
|
||||
|
@ -378,7 +378,7 @@ float CMeshMultiLod::getNumTrianglesWithCoarsestDist(float distance, float coars
|
|||
void CMeshMultiLod::getAABBox(NLMISC::CAABBox &bbox) const
|
||||
{
|
||||
// Get count
|
||||
uint count=_MeshVector.size();
|
||||
uint count=(uint)_MeshVector.size();
|
||||
for (uint slot=0; slot<count; slot++)
|
||||
{
|
||||
// Shape ?
|
||||
|
|
|
@ -97,7 +97,7 @@ void CMeshMultiLodInstance::traverseLoadBalancing()
|
|||
float polygonCount= getNumTrianglesAfterLoadBalancing ();
|
||||
|
||||
// Look for the good slot
|
||||
uint meshCount=shape->_MeshVector.size();
|
||||
uint meshCount=(uint)shape->_MeshVector.size();
|
||||
Lod0=0;
|
||||
if (meshCount>1)
|
||||
{
|
||||
|
|
|
@ -137,7 +137,7 @@ float CMRMBuilder::getDeltaFaceNormals(sint numvertex)
|
|||
CMRMVertex &vert= TmpVertices[numvertex];
|
||||
float delta=0;
|
||||
CVector refNormal;
|
||||
sint nfaces=vert.SharedFaces.size();
|
||||
sint nfaces=(sint)vert.SharedFaces.size();
|
||||
for(sint i=0;i<nfaces;i++)
|
||||
{
|
||||
CVector normal;
|
||||
|
@ -815,7 +815,7 @@ sint CMRMBuilder::collapseEdge(const CMRMEdge &edge)
|
|||
Vertex2.SharedFaces.end());
|
||||
|
||||
|
||||
return deletedFaces.size();
|
||||
return (sint)deletedFaces.size();
|
||||
}
|
||||
|
||||
|
||||
|
@ -937,7 +937,7 @@ void CMRMBuilder::collapseEdges(sint nWantedFaces)
|
|||
{
|
||||
ItEdgeMap EdgeIt;
|
||||
|
||||
sint nCurrentFaces=TmpFaces.size();
|
||||
sint nCurrentFaces=(sint)TmpFaces.size();
|
||||
sint bug0=0,bug2=0,bug3=0;
|
||||
|
||||
while(nCurrentFaces>nWantedFaces)
|
||||
|
@ -1278,7 +1278,7 @@ void CMRMBuilder::makeFromMesh(const CMRMMesh &baseMesh, CMRMMeshGeom &lodMesh,
|
|||
void CMRMBuilder::buildAllLods(const CMRMMesh &baseMesh, std::vector<CMRMMeshGeom> &lodMeshs,
|
||||
uint nWantedLods, uint divisor)
|
||||
{
|
||||
sint nFaces= baseMesh.Faces.size();
|
||||
sint nFaces= (sint)baseMesh.Faces.size();
|
||||
sint nBaseFaces;
|
||||
sint i;
|
||||
CMRMMesh srcMesh = baseMesh;
|
||||
|
@ -1328,7 +1328,7 @@ void CMRMBuilder::buildFinalMRM(std::vector<CMRMMeshGeom> &lodMeshs, CMRMMeshFin
|
|||
{
|
||||
sint i,j;
|
||||
sint lodId, attId;
|
||||
sint nLods= lodMeshs.size();
|
||||
sint nLods= (sint)lodMeshs.size();
|
||||
|
||||
// Init.
|
||||
// ===============
|
||||
|
@ -1401,7 +1401,7 @@ void CMRMBuilder::buildFinalMRM(std::vector<CMRMMeshGeom> &lodMeshs, CMRMMeshFin
|
|||
}
|
||||
|
||||
// Here, the number of wedge indicate the max number of wedge this LOD needs.
|
||||
finalMRM.Lods[lodId].NWedges= finalMRM.Wedges.size();
|
||||
finalMRM.Lods[lodId].NWedges= (sint)finalMRM.Wedges.size();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1647,7 +1647,7 @@ sint CMRMBuilder::findInsertAttributeInBaseMesh(CMRMMesh &baseMesh, sint attId
|
|||
// if attribute not found in the map, then insert a new one.
|
||||
if(it==_AttributeMap[attId].end())
|
||||
{
|
||||
sint idx= baseMesh.Attributes[attId].size();
|
||||
sint idx= (sint)baseMesh.Attributes[attId].size();
|
||||
// insert into the array.
|
||||
baseMesh.Attributes[attId].push_back(att);
|
||||
// insert into the map.
|
||||
|
@ -1779,7 +1779,7 @@ uint32 CMRMBuilder::buildMrmBaseMesh(const CMesh::CMeshBuild &mbuild, CMRMMesh
|
|||
if(_HasMeshInterfaces)
|
||||
baseMesh.InterfaceLinks= mbuild.InterfaceLinks;
|
||||
// Resize faces.
|
||||
nFaces= mbuild.Faces.size();
|
||||
nFaces= (sint)mbuild.Faces.size();
|
||||
baseMesh.Faces.resize(nFaces);
|
||||
for(i=0; i<nFaces; i++)
|
||||
{
|
||||
|
@ -1985,7 +1985,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMGeo
|
|||
// Setup the VertexBuffer.
|
||||
// ========================
|
||||
// resize the VB.
|
||||
mbuild.VBuffer.setNumVertices(finalMRM.Wedges.size());
|
||||
mbuild.VBuffer.setNumVertices((uint32)finalMRM.Wedges.size());
|
||||
// Setup SkinWeights.
|
||||
if(_Skinned)
|
||||
mbuild.SkinWeights.resize(finalMRM.Wedges.size());
|
||||
|
@ -2098,7 +2098,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMGeo
|
|||
else
|
||||
{
|
||||
// map material to rdrPass.
|
||||
sint idRdrPass= destLod.RdrPass.size();
|
||||
sint idRdrPass= (sint)destLod.RdrPass.size();
|
||||
rdrPassIndex[j]= idRdrPass;
|
||||
// create a rdrPass.
|
||||
destLod.RdrPass.push_back(CMeshMRMGeom::CRdrPass());
|
||||
|
@ -2217,7 +2217,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMGeo
|
|||
map<uint, uint>::iterator it= matrixInfMap.find(matId);
|
||||
if( it==matrixInfMap.end() )
|
||||
{
|
||||
uint matInfId= destLod.MatrixInfluences.size();
|
||||
uint matInfId= (uint)destLod.MatrixInfluences.size();
|
||||
matrixInfMap.insert( make_pair(matId, matInfId) );
|
||||
// create the new MatrixInfluence.
|
||||
destLod.MatrixInfluences.push_back(matId);
|
||||
|
@ -2244,7 +2244,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMGeo
|
|||
for (k = 0; k < (sint)mbuild.BlendShapes.size(); ++k)
|
||||
{
|
||||
CBlendShape &rBS = mbuild.BlendShapes[k];
|
||||
sint32 nNbVertVB = finalMRM.Wedges.size();
|
||||
sint32 nNbVertVB = (sint32)finalMRM.Wedges.size();
|
||||
bool bIsDeltaPos = false;
|
||||
rBS.deltaPos.resize (nNbVertVB, CVector(0.0f,0.0f,0.0f));
|
||||
bool bIsDeltaNorm = false;
|
||||
|
@ -2489,7 +2489,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMSki
|
|||
// Setup the VertexBuffer.
|
||||
// ========================
|
||||
// resize the VB.
|
||||
mbuild.VBuffer.setNumVertices(finalMRM.Wedges.size());
|
||||
mbuild.VBuffer.setNumVertices((uint32)finalMRM.Wedges.size());
|
||||
|
||||
CVertexBufferReadWrite vba;
|
||||
mbuild.VBuffer.lock (vba);
|
||||
|
@ -2603,7 +2603,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMSki
|
|||
else
|
||||
{
|
||||
// map material to rdrPass.
|
||||
sint idRdrPass= destLod.RdrPass.size();
|
||||
sint idRdrPass= (sint)destLod.RdrPass.size();
|
||||
rdrPassIndex[j]= idRdrPass;
|
||||
// create a rdrPass.
|
||||
destLod.RdrPass.push_back(CMeshMRMSkinnedGeom::CRdrPass());
|
||||
|
@ -2719,7 +2719,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMSki
|
|||
map<uint, uint>::iterator it= matrixInfMap.find(matId);
|
||||
if( it==matrixInfMap.end() )
|
||||
{
|
||||
uint matInfId= destLod.MatrixInfluences.size();
|
||||
uint matInfId= (uint)destLod.MatrixInfluences.size();
|
||||
matrixInfMap.insert( make_pair(matId, matInfId) );
|
||||
// create the new MatrixInfluence.
|
||||
destLod.MatrixInfluences.push_back(matId);
|
||||
|
@ -2746,7 +2746,7 @@ void CMRMBuilder::buildMeshBuildMrm(const CMRMMeshFinal &finalMRM, CMeshMRMSki
|
|||
for (k = 0; k < (sint)mbuild.BlendShapes.size(); ++k)
|
||||
{
|
||||
CBlendShape &rBS = mbuild.BlendShapes[k];
|
||||
sint32 nNbVertVB = finalMRM.Wedges.size();
|
||||
sint32 nNbVertVB = (sint32)finalMRM.Wedges.size();
|
||||
bool bIsDeltaPos = false;
|
||||
rBS.deltaPos.resize (nNbVertVB, CVector(0.0f,0.0f,0.0f));
|
||||
bool bIsDeltaNorm = false;
|
||||
|
|
|
@ -50,7 +50,7 @@ sint CMRMSewingMesh::mustCollapseEdge(uint lod, const CMRMEdge &edge, uint &vert
|
|||
sint CMRMSewingMesh::getNumCollapseEdge(uint lod) const
|
||||
{
|
||||
nlassert(lod<_Lods.size());
|
||||
return _Lods[lod].EdgeToCollapse.size();
|
||||
return (sint)_Lods[lod].EdgeToCollapse.size();
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ void CMRMSewingMesh::build(const CMesh::CInterface &meshInt, uint nWantedLods, u
|
|||
|
||||
// build edge list
|
||||
std::vector<CMRMEdge> edgeList;
|
||||
uint nMaxEdges= meshInt.Vertices.size();
|
||||
uint nMaxEdges= (uint)meshInt.Vertices.size();
|
||||
edgeList.resize(nMaxEdges);
|
||||
for(uint i=0;i<nMaxEdges;i++)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ void CMRMSewingMesh::build(const CMesh::CInterface &meshInt, uint nWantedLods, u
|
|||
uint bestEdgeId= 0;
|
||||
for(uint j=0;j<edgeList.size();j++)
|
||||
{
|
||||
uint precEdgeId= (j + edgeList.size() -1) % edgeList.size();
|
||||
uint precEdgeId= (uint)((j + edgeList.size() -1) % edgeList.size());
|
||||
CVector edgeDelta= (meshInt.Vertices[edgeList[j].v1].Pos - meshInt.Vertices[edgeList[j].v0].Pos);
|
||||
|
||||
// compute dist between 2 verts
|
||||
|
@ -127,7 +127,7 @@ void CMRMSewingMesh::build(const CMesh::CInterface &meshInt, uint nWantedLods, u
|
|||
// mark as remove it
|
||||
_Lods[lod].EdgeToCollapse.push_back(edgeList[bestEdgeId]);
|
||||
// changes vert ids of the prec edge. eg: edge(12) is deleted=> 01 12 23... becomes 02 23 (NB: 1 is collapsed to 2)
|
||||
uint precEdgeId= (bestEdgeId+edgeList.size()-1)%edgeList.size();
|
||||
uint precEdgeId= (uint)((bestEdgeId+edgeList.size()-1)%edgeList.size());
|
||||
edgeList[precEdgeId].v1= edgeList[bestEdgeId].v1;
|
||||
// and erase the edge from the current list
|
||||
edgeList.erase( edgeList.begin()+bestEdgeId );
|
||||
|
|
|
@ -48,7 +48,7 @@ sint CMRMMeshFinal::findInsertWedge(const CWedge &w)
|
|||
// if not found, must add it.
|
||||
if(it==_WedgeMap.end())
|
||||
{
|
||||
ret= Wedges.size();
|
||||
ret= (sint)Wedges.size();
|
||||
// insert into the map, with good id.
|
||||
_WedgeMap.insert(make_pair(w, ret));
|
||||
// add it to the array.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue