Changed: #825 Remove all warning when compiling Ryzom on Linux
This commit is contained in:
parent
e417730df3
commit
f873521f1d
97 changed files with 374 additions and 374 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -175,7 +175,7 @@ void CVectorPacker::flush(CBitMemStream &bits)
|
|||
bits.serial(isRLE, 1);
|
||||
bits.serial(_LastTag, 2);
|
||||
nlassert(_LastDeltas.size() <= 255);
|
||||
uint8 length = _LastDeltas.size();
|
||||
uint8 length = (uint8)_LastDeltas.size();
|
||||
//nlwarning("begin RLE, length = %d, tag = %d", (int) length, (int) repeatTag);
|
||||
bits.serial(length);
|
||||
for(uint k = 0; k < _LastDeltas.size(); ++k)
|
||||
|
@ -223,7 +223,7 @@ void CVectorPacker::serialPackedVector16(std::vector<uint16> &v,NLMISC::IStream
|
|||
CBitMemStream bits(true);
|
||||
std::vector<uint8> datas;
|
||||
f.serialCont(datas);
|
||||
bits.fill(&datas[0], datas.size());
|
||||
bits.fill(&datas[0], (uint32)datas.size());
|
||||
uint32 numValues = 0;
|
||||
bits.serial(numValues);
|
||||
v.resize(numValues);
|
||||
|
@ -312,7 +312,7 @@ void CVectorPacker::serialPackedVector16(std::vector<uint16> &v,NLMISC::IStream
|
|||
_Repeated[AbsOrRLE] = 0;
|
||||
//
|
||||
CBitMemStream bits(false);
|
||||
uint32 numValues = v.size();
|
||||
uint32 numValues = (uint32)v.size();
|
||||
bits.serial(numValues);
|
||||
_LastTag = std::numeric_limits<uint32>::max();
|
||||
_LastDeltas.clear();
|
||||
|
@ -723,7 +723,7 @@ void CPackedZone32::build(std::vector<const CTessFace*> &leaves,
|
|||
{
|
||||
if (!triListGrid(x, y).empty())
|
||||
{
|
||||
Grid(x, y) = TriLists.size();
|
||||
Grid(x, y) = (uint32)TriLists.size();
|
||||
std::copy(triListGrid(x, y).begin(), triListGrid(x, y).end(), std::back_inserter(TriLists));
|
||||
TriLists.push_back(UndefIndex); // mark the end of the list
|
||||
}
|
||||
|
@ -902,7 +902,7 @@ void CPackedZone32::addTri(const CTriangle &tri, TVertexGrid &vertexGrid, TTriLi
|
|||
{
|
||||
if (x < 0) continue;
|
||||
if (x >= (sint) triListGrid.getWidth()) break;
|
||||
triListGrid(x, gridY).push_back(Tris.size() - 1);
|
||||
triListGrid(x, gridY).push_back((uint32)Tris.size() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -940,8 +940,8 @@ uint32 CPackedZone32::allocVertex(const CVector &src, TVertexGrid &vertexGrid)
|
|||
|
||||
// create a new vertex
|
||||
Verts.push_back(pv);
|
||||
vertList.push_front(Verts.size() - 1);
|
||||
return Verts.size() - 1;
|
||||
vertList.push_front((uint32)Verts.size() - 1);
|
||||
return (uint32)Verts.size() - 1;
|
||||
}
|
||||
|
||||
// ***************************************************************************************
|
||||
|
@ -1013,7 +1013,7 @@ void CPackedZone32::render(CVertexBuffer &vb, IDriver &drv, CMaterial &material,
|
|||
}
|
||||
}
|
||||
vba.unlock();
|
||||
uint numRemainingTris = batchSize - ((endDest - dest) / 3);
|
||||
uint numRemainingTris = batchSize - (uint)((endDest - dest) / 3);
|
||||
if (numRemainingTris)
|
||||
{
|
||||
drv.setPolygonMode(IDriver::Filled);
|
||||
|
@ -1236,7 +1236,7 @@ void CPackedZone16::render(CVertexBuffer &vb, IDriver &drv, CMaterial &material,
|
|||
}
|
||||
}
|
||||
vba.unlock();
|
||||
uint numRemainingTris = batchSize - ((endDest - dest) / 3);
|
||||
uint numRemainingTris = batchSize - (uint)((endDest - dest) / 3);
|
||||
if (numRemainingTris)
|
||||
{
|
||||
drv.setPolygonMode(IDriver::Filled);
|
||||
|
|
|
@ -603,10 +603,10 @@ void CParticleSystem::step(TPass pass, TAnimationTime ellapsedTime, CParticleSys
|
|||
// nodes sorted by degree
|
||||
InsideSimLoop = true;
|
||||
// make enough room for spawns
|
||||
uint numProcess = _ProcessVect.size();
|
||||
uint numProcess = (uint)_ProcessVect.size();
|
||||
if (numProcess > _Spawns.size())
|
||||
{
|
||||
uint oldSize = _Spawns.size();
|
||||
uint oldSize = (uint)_Spawns.size();
|
||||
_Spawns.resize(numProcess);
|
||||
for(uint k = oldSize; k < numProcess; ++k)
|
||||
{
|
||||
|
@ -1044,7 +1044,7 @@ bool CParticleSystem::attach(CParticleSystemProcess *ptr)
|
|||
//nlassert(ptr->getOwner() == NULL);
|
||||
_ProcessVect.push_back(ptr);
|
||||
ptr->setOwner(this);
|
||||
ptr->setIndex(_ProcessVect.size() - 1);
|
||||
ptr->setIndex((uint32)_ProcessVect.size() - 1);
|
||||
//notifyMaxNumFacesChanged();
|
||||
if (getBypassMaxNumIntegrationSteps())
|
||||
{
|
||||
|
@ -1299,7 +1299,7 @@ void CParticleSystem::unregisterLocatedBindableExternID(CPSLocatedBindable *lb)
|
|||
uint CParticleSystem::getNumLocatedBindableByExternID(uint32 id) const
|
||||
{
|
||||
NL_PS_FUNC_MAIN(CParticleSystem_getNumLocatedBindableByExternID)
|
||||
return _LBMap.count(id);
|
||||
return (uint)_LBMap.count(id);
|
||||
}
|
||||
|
||||
///=======================================================================================
|
||||
|
@ -1502,7 +1502,7 @@ uint CParticleSystem::getIndexOf(const CParticleSystemProcess &process) const
|
|||
uint CParticleSystem::getNumID() const
|
||||
{
|
||||
NL_PS_FUNC_MAIN(CParticleSystem_getNumID)
|
||||
return _LBMap.size();
|
||||
return (uint)_LBMap.size();
|
||||
}
|
||||
|
||||
///=======================================================================================
|
||||
|
|
|
@ -125,7 +125,7 @@ void CParticleSystemShape::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
{
|
||||
std::vector<uint8> buf;
|
||||
f.serialCont(buf);
|
||||
_ParticleSystemProto.fill(&buf[0], buf.size());
|
||||
_ParticleSystemProto.fill(&buf[0], (uint32)buf.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ void CPatch::generateTileVegetable(CVegetableInstanceGroup *vegetIg, uint distT
|
|||
const CTileVegetableDesc &tileVegetDesc= getLandscape()->getTileVegetableDesc(tileId);
|
||||
const std::vector<CVegetable> &vegetableList= tileVegetDesc.getVegetableList(distType);
|
||||
uint distAddSeed= tileVegetDesc.getVegetableSeed(distType);
|
||||
uint numVegetable= vegetableList.size();
|
||||
uint numVegetable= (uint)vegetableList.size();
|
||||
|
||||
// If no vegetables at all, skip.
|
||||
if(numVegetable==0)
|
||||
|
@ -221,7 +221,7 @@ void CPatch::generateTileVegetable(CVegetableInstanceGroup *vegetIg, uint distT
|
|||
|
||||
// reseve instance space for this vegetable.
|
||||
// instanceUVArray[i].size() is the number of instances to create.
|
||||
veget.reserveIgAddInstances(vegetIgReserve, (CVegetable::TVegetableWater)vegetWaterState, instanceUVArray[i].size());
|
||||
veget.reserveIgAddInstances(vegetIgReserve, (CVegetable::TVegetableWater)vegetWaterState, (uint)instanceUVArray[i].size());
|
||||
}
|
||||
// actual reseve memory of the ig.
|
||||
getLandscape()->_VegetableManager->reserveIgCompile(vegetIg, vegetIgReserve);
|
||||
|
|
|
@ -130,7 +130,7 @@ void CPointLightNamedArray::build(const std::vector<CPointLightNamed> &pointLi
|
|||
void CPointLightNamedArray::setPointLightFactor(const CScene &scene)
|
||||
{
|
||||
// Search in the map.
|
||||
const uint count = _PointLightGroupMap.size ();
|
||||
const uint count = (uint)_PointLightGroupMap.size ();
|
||||
uint i;
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ void CPointLightNamedArray::serial(NLMISC::IStream &f)
|
|||
void CPointLightNamedArray::initAnimatedLightIndex (const CScene &scene)
|
||||
{
|
||||
// Search in the map.
|
||||
const uint count = _PointLightGroupMap.size ();
|
||||
const uint count = (uint)_PointLightGroupMap.size ();
|
||||
uint i;
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ bool CPortal::clipPyramid (CVector &observer, std::vector<CPlane> &pyramid)
|
|||
// Clip portal with pyramid
|
||||
CPolygon p;
|
||||
p.Vertices = _Poly;
|
||||
p.clip( &pyramid[1], pyramid.size()-1 );
|
||||
p.clip( &pyramid[1], (uint)pyramid.size()-1 );
|
||||
|
||||
// Construct pyramid with clipped portal
|
||||
if( p.Vertices.size() > 2 )
|
||||
|
@ -292,7 +292,7 @@ bool CPortal::clipRay(const NLMISC::CVector &startWorld, const NLMISC::CVector &
|
|||
|
||||
// Do convex test on each border
|
||||
sint sign= 0;
|
||||
uint polySize= _Poly.size();
|
||||
uint polySize= (uint)_Poly.size();
|
||||
for(uint i=0;i<polySize;i++)
|
||||
{
|
||||
const CVector v0= _Poly[i] - refVert;
|
||||
|
|
|
@ -114,7 +114,7 @@ void CPSValueBlendSampleFuncRGBA::setColorType(CVertexBuffer::TVertexColorType c
|
|||
void CPSValueGradientFuncRGBA::setColorType(CVertexBuffer::TVertexColorType colorType)
|
||||
{
|
||||
if (colorType == _ColorType) return;
|
||||
convertVBColor(&_Tab.front(), _Tab.size(), CVertexBuffer::TBGRA);
|
||||
convertVBColor(&_Tab.front(), (uint)_Tab.size(), CVertexBuffer::TBGRA);
|
||||
_ColorType = colorType;
|
||||
}
|
||||
|
||||
|
|
|
@ -570,7 +570,7 @@ void CPSEmitter::processRegularEmissionWithNoLOD(uint firstInstanceIndex)
|
|||
{
|
||||
*phaseIt -= ::floorf(*phaseIt / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
processEmit(k, nbToGenerate);
|
||||
}
|
||||
|
@ -591,7 +591,7 @@ void CPSEmitter::processRegularEmissionWithNoLOD(uint firstInstanceIndex)
|
|||
{
|
||||
*phaseIt -= ::floorf((*phaseIt - _EmitDelay) / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
processEmit(k, nbToGenerate);
|
||||
}
|
||||
|
@ -618,7 +618,7 @@ void CPSEmitter::processRegularEmissionWithNoLOD(uint firstInstanceIndex)
|
|||
{
|
||||
*phaseIt -= ::floorf(*phaseIt / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
processEmit(k, nbToGenerate);
|
||||
++*numEmitIt;
|
||||
|
@ -643,7 +643,7 @@ void CPSEmitter::processRegularEmissionWithNoLOD(uint firstInstanceIndex)
|
|||
{
|
||||
*phaseIt -= ::floorf((*phaseIt - _EmitDelay) / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
processEmit(k, nbToGenerate);
|
||||
++*numEmitIt;
|
||||
|
@ -744,7 +744,7 @@ void CPSEmitter::processRegularEmission(uint firstInstanceIndex, float emitLOD)
|
|||
{
|
||||
*phaseIt -= ::floorf(*phaseIt / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -788,7 +788,7 @@ void CPSEmitter::processRegularEmission(uint firstInstanceIndex, float emitLOD)
|
|||
{
|
||||
*phaseIt -= ::floorf((*phaseIt - _EmitDelay) / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -820,7 +820,7 @@ void CPSEmitter::processRegularEmission(uint firstInstanceIndex, float emitLOD)
|
|||
{
|
||||
*phaseIt -= ::floorf(*phaseIt / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -874,7 +874,7 @@ void CPSEmitter::processRegularEmission(uint firstInstanceIndex, float emitLOD)
|
|||
{
|
||||
*phaseIt -= ::floorf((*phaseIt - _EmitDelay) / *currEmitPeriod) * *currEmitPeriod;
|
||||
}
|
||||
const uint32 k = phaseIt - (_Phase.begin());
|
||||
const uint32 k = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, k) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -1112,7 +1112,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
uint numEmissions = (uint) ::floorf(*phaseIt / *currEmitPeriod);
|
||||
*phaseIt -= *currEmitPeriod * numEmissions;
|
||||
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -1149,7 +1149,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - (_Phase.begin());
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -1201,7 +1201,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
float deltaT = std::max(*phaseIt - _EmitDelay, 0.f);
|
||||
//nlassert(deltaT >= 0.f);
|
||||
/// process each emission at the right pos at the right date
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -1235,7 +1235,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - (_Phase.begin());
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -1275,7 +1275,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
*phaseIt -= *currEmitPeriod * numEmissions;
|
||||
float deltaT = std::max(*phaseIt, 0.f);
|
||||
//nlassert(deltaT >= 0.f);
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
if (*numEmitIt > _MaxEmissionCount) // make sure we don't go over the emission limit
|
||||
{
|
||||
numEmissions -= *numEmitIt - _MaxEmissionCount;
|
||||
|
@ -1314,7 +1314,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - _Phase.begin();
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -1375,7 +1375,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
*phaseIt -= *currEmitPeriod * numEmissions;
|
||||
float deltaT = std::max(*phaseIt - _EmitDelay, 0.f);
|
||||
//nlassert(deltaT >= 0.f);
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
if (*numEmitIt > _MaxEmissionCount) // make sure we don't go over the emission limit
|
||||
{
|
||||
numEmissions -= *numEmitIt - _MaxEmissionCount;
|
||||
|
@ -1413,7 +1413,7 @@ void CPSEmitter::processRegularEmissionConsistent(uint firstInstanceIndex, float
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - (_Phase.begin());
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
if (nbToGenerate)
|
||||
{
|
||||
|
@ -1535,7 +1535,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
*phaseIt -= *currEmitPeriod * numEmissions;
|
||||
float deltaT = std::max(0.f, *phaseIt);
|
||||
//nlassert(deltaT >= 0.f);
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
|
||||
/// compute the position of the emitter for the needed dates
|
||||
numEmissions = GenEmitterPositions(_Owner,
|
||||
|
@ -1563,7 +1563,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - (_Phase.begin());
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
processEmit(emitterIndex, nbToGenerate);
|
||||
}
|
||||
|
@ -1592,7 +1592,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
float deltaT = std::max(*phaseIt - _EmitDelay, 0.f);
|
||||
//nlassert(deltaT >= 0.f);
|
||||
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
/// compute the position of the emitter for the needed date
|
||||
numEmissions = GenEmitterPositions(_Owner,
|
||||
_EmittedType,
|
||||
|
@ -1618,7 +1618,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - (_Phase.begin());
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
processEmit(emitterIndex, nbToGenerate);
|
||||
}
|
||||
|
@ -1653,7 +1653,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
*phaseIt -= *currEmitPeriod * numEmissions;
|
||||
float deltaT = std::max(*phaseIt, 0.f);
|
||||
//nlassert(deltaT >= 0.f);
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
if (*numEmitIt > _MaxEmissionCount) // make sure we don't go over the emission limit
|
||||
{
|
||||
numEmissions -= *numEmitIt - _MaxEmissionCount;
|
||||
|
@ -1684,7 +1684,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - _Phase.begin();
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
processEmit(emitterIndex, nbToGenerate);
|
||||
++*numEmitIt;
|
||||
|
@ -1717,7 +1717,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
*phaseIt -= *currEmitPeriod * numEmissions;
|
||||
float deltaT = std::max(*phaseIt - _EmitDelay, 0.f);
|
||||
//nlassert(deltaT >= 0.f);
|
||||
uint emitterIndex = phaseIt - _Phase.begin();
|
||||
uint emitterIndex = (uint)(phaseIt - _Phase.begin());
|
||||
if (*numEmitIt > _MaxEmissionCount) // make sure we don't go over the emission limit
|
||||
{
|
||||
numEmissions -= *numEmitIt - _MaxEmissionCount;
|
||||
|
@ -1748,7 +1748,7 @@ void CPSEmitter::processRegularEmissionConsistentWithNoLOD(uint firstInstanceInd
|
|||
}
|
||||
else
|
||||
{
|
||||
const uint32 emitterIndex = phaseIt - (_Phase.begin());
|
||||
const uint32 emitterIndex = (uint32)(phaseIt - _Phase.begin());
|
||||
nbToGenerate = _GenNbScheme ? _GenNbScheme->get(_Owner, emitterIndex) : _GenNb;
|
||||
processEmit(emitterIndex, nbToGenerate);
|
||||
++*numEmitIt;
|
||||
|
|
|
@ -310,7 +310,7 @@ void CPSFace::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint32 nbConfigurations = _PrecompBasis.size();
|
||||
uint32 nbConfigurations = (uint32)_PrecompBasis.size();
|
||||
f.serial(nbConfigurations);
|
||||
if (nbConfigurations)
|
||||
{
|
||||
|
@ -364,7 +364,7 @@ void CPSFace::hintRotateTheSame(uint32 nbConfiguration
|
|||
void CPSFace::fillIndexesInPrecompBasis(void)
|
||||
{
|
||||
NL_PS_FUNC(CPSFace_fillIndexesInPrecompBasis)
|
||||
const uint32 nbConf = _PrecompBasis.size();
|
||||
const uint32 nbConf = (uint32)_PrecompBasis.size();
|
||||
if (_Owner)
|
||||
{
|
||||
_IndexInPrecompBasis.resize( _Owner->getMaxSize() );
|
||||
|
@ -381,7 +381,7 @@ void CPSFace::newElement(const CPSEmitterInfo &info)
|
|||
NL_PS_FUNC(CPSFace_newElement)
|
||||
CPSQuad::newElement(info);
|
||||
newPlaneBasisElement(info);
|
||||
const uint32 nbConf = _PrecompBasis.size();
|
||||
const uint32 nbConf = (uint32)_PrecompBasis.size();
|
||||
if (nbConf) // do we use precomputed basis ?
|
||||
{
|
||||
_IndexInPrecompBasis[_Owner->getNewElementIndex()] = rand() % nbConf;
|
||||
|
|
|
@ -113,7 +113,7 @@ float CPSFloatCurveFunctor::getValue(float date) const
|
|||
else // hermite interpolation
|
||||
{
|
||||
float width = it->Date - precIt->Date;
|
||||
uint index = precIt - _CtrlPoints.begin();
|
||||
uint index = (uint)(precIt - _CtrlPoints.begin());
|
||||
float t1 = getSlope(index) * width, t2 = getSlope(index + 1) * width;
|
||||
const float lambda2 = NLMISC::sqr(lambda);
|
||||
const float lambda3 = lambda2 * lambda;
|
||||
|
|
|
@ -1853,7 +1853,7 @@ void CPSLocated::updateCollisions()
|
|||
#ifdef NL_DEBUG
|
||||
nlassert(CParticleSystem::_ParticleToRemove.size() <= _Size);
|
||||
#endif
|
||||
CParticleSystem::_ParticleRemoveListIndex[currCollision->Index] = CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
CParticleSystem::_ParticleRemoveListIndex[currCollision->Index] = (sint)CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
|
||||
}
|
||||
currCollision = currCollision->Next;
|
||||
|
@ -1899,7 +1899,7 @@ void CPSLocated::updateCollisions()
|
|||
#ifdef NL_DEBUG
|
||||
nlassert(CParticleSystem::_ParticleToRemove.size() <= _Size);
|
||||
#endif
|
||||
CParticleSystem::_ParticleRemoveListIndex[currCollision->Index] = CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
CParticleSystem::_ParticleRemoveListIndex[currCollision->Index] = (sint)CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
}
|
||||
}
|
||||
currCollision = currCollision->Next;
|
||||
|
@ -2012,7 +2012,7 @@ void CPSLocated::updateLife()
|
|||
#ifdef NL_DEBUG
|
||||
nlassert(CParticleSystem::_ParticleToRemove.size() <= _Size);
|
||||
#endif
|
||||
CParticleSystem::_ParticleRemoveListIndex[k] = CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
CParticleSystem::_ParticleRemoveListIndex[k] = (sint)CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
}
|
||||
++itTime;
|
||||
++itTimeInc;
|
||||
|
@ -2040,7 +2040,7 @@ void CPSLocated::updateLife()
|
|||
#ifdef NL_DEBUG
|
||||
nlassert(CParticleSystem::_ParticleToRemove.size() <= _Size);
|
||||
#endif
|
||||
CParticleSystem::_ParticleRemoveListIndex[k] = CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
CParticleSystem::_ParticleRemoveListIndex[k] = (sint)CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
}
|
||||
++ itTime;
|
||||
}
|
||||
|
@ -2068,7 +2068,7 @@ void CPSLocated::updateLife()
|
|||
#ifdef NL_DEBUG
|
||||
nlassert(CParticleSystem::_ParticleToRemove.size() <= _Size);
|
||||
#endif
|
||||
CParticleSystem::_ParticleRemoveListIndex[k] = CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
CParticleSystem::_ParticleRemoveListIndex[k] = (sint)CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2396,7 +2396,7 @@ void CPSLocated::addNewlySpawnedParticles()
|
|||
{
|
||||
sint32 insertionIndex = newElement(*it, false, CParticleSystem::EllapsedTime);
|
||||
#ifdef NL_DEBUG
|
||||
nlassert(insertionIndex != -1)
|
||||
nlassert(insertionIndex != -1);
|
||||
#endif
|
||||
if (_Time[insertionIndex] >= 1.f)
|
||||
{
|
||||
|
@ -2407,7 +2407,7 @@ void CPSLocated::addNewlySpawnedParticles()
|
|||
#ifdef NL_DEBUG
|
||||
nlassert(CParticleSystem::_ParticleToRemove.size() <= _Size);
|
||||
#endif
|
||||
CParticleSystem::_ParticleRemoveListIndex[insertionIndex] = CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
CParticleSystem::_ParticleRemoveListIndex[insertionIndex] = (sint)CParticleSystem::_ParticleToRemove.size() - 1;
|
||||
}
|
||||
}
|
||||
//CParticleSystem::InsideSimLoop = true;
|
||||
|
|
|
@ -723,7 +723,7 @@ public:
|
|||
|
||||
do
|
||||
{
|
||||
const uint numShapes = m._Meshes.size();
|
||||
const uint numShapes = (uint)m._Meshes.size();
|
||||
const uint8 *m0, *m1;
|
||||
float lambda;
|
||||
float opLambda;
|
||||
|
@ -1105,7 +1105,7 @@ uint CPSConstraintMesh::getNumShapes() const
|
|||
{
|
||||
const_cast<CPSConstraintMesh *>(this)->update();
|
||||
}
|
||||
return _MeshShapeFileName.size();
|
||||
return (uint)_MeshShapeFileName.size();
|
||||
}
|
||||
|
||||
//====================================================================================
|
||||
|
@ -1434,7 +1434,7 @@ void CPSConstraintMesh::fillIndexesInPrecompBasis(void)
|
|||
{
|
||||
NL_PS_FUNC(CPSConstraintMesh_fillIndexesInPrecompBasis)
|
||||
// TODO : avoid code duplication with CPSFace ...
|
||||
const uint32 nbConf = _PrecompBasis.size();
|
||||
const uint32 nbConf = (uint32)_PrecompBasis.size();
|
||||
if (_Owner)
|
||||
{
|
||||
_IndexInPrecompBasis.resize( _Owner->getMaxSize() );
|
||||
|
@ -1475,7 +1475,7 @@ void CPSConstraintMesh::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint32 nbConfigurations = _PrecompBasis.size();
|
||||
uint32 nbConfigurations = (uint32)_PrecompBasis.size();
|
||||
f.serial(nbConfigurations);
|
||||
if (nbConfigurations)
|
||||
{
|
||||
|
@ -1977,7 +1977,7 @@ void CPSConstraintMesh::newElement(const CPSEmitterInfo &info)
|
|||
newSizeElement(info);
|
||||
newPlaneBasisElement(info);
|
||||
// TODO : avoid code cuplication with CPSFace ...
|
||||
const uint32 nbConf = _PrecompBasis.size();
|
||||
const uint32 nbConf = (uint32)_PrecompBasis.size();
|
||||
if (nbConf) // do we use precomputed basis ?
|
||||
{
|
||||
_IndexInPrecompBasis[_Owner->getNewElementIndex()] = rand() % nbConf;
|
||||
|
|
|
@ -288,11 +288,11 @@ inline uint CPSRibbon::getNumVerticesInSlice() const
|
|||
NL_PS_FUNC(CPSRibbon_getNumVerticesInSlice)
|
||||
if (_BraceMode)
|
||||
{
|
||||
return _Shape.size();
|
||||
return (uint)_Shape.size();
|
||||
}
|
||||
else
|
||||
{
|
||||
return _Shape.size() + (_Tex == NULL ? 0 : 1);
|
||||
return (uint)_Shape.size() + (_Tex == NULL ? 0 : 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -724,7 +724,7 @@ void CPSRibbon::displayRibbons(uint32 nbRibbons, uint32 srcStep)
|
|||
// Compute ribbons //
|
||||
/////////////////////
|
||||
const uint numVerticesInSlice = getNumVerticesInSlice();
|
||||
const uint numVerticesInShape = _Shape.size();
|
||||
const uint numVerticesInShape = (uint)_Shape.size();
|
||||
//
|
||||
static std::vector<float> sizes;
|
||||
static std::vector<NLMISC::CVector> ribbonPos; // this is where the position of each ribbon slice center i stored
|
||||
|
@ -943,7 +943,7 @@ CPSRibbon::CVBnPB &CPSRibbon::getVBnPB()
|
|||
];
|
||||
|
||||
const uint numVerticesInSlice = getNumVerticesInSlice(); /// 1 vertex added for textured ribbon (to avoid texture stretching)
|
||||
const uint numVerticesInShape = _Shape.size();
|
||||
const uint numVerticesInShape = (uint)_Shape.size();
|
||||
|
||||
|
||||
// The number of slice is encoded in the upper word of the vb index
|
||||
|
@ -974,11 +974,11 @@ CPSRibbon::CVBnPB &CPSRibbon::getVBnPB()
|
|||
// set the primitive block size
|
||||
if (_BraceMode)
|
||||
{
|
||||
pb.setNumIndexes(6 * _UsedNbSegs * numRibbonInVB * (_Shape.size() / 2));
|
||||
pb.setNumIndexes(6 * _UsedNbSegs * numRibbonInVB * (uint32)(_Shape.size() / 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
pb.setNumIndexes(6 * _UsedNbSegs * numRibbonInVB * _Shape.size());
|
||||
pb.setNumIndexes(6 * _UsedNbSegs * numRibbonInVB * (uint32)_Shape.size());
|
||||
}
|
||||
//
|
||||
CIndexBufferReadWrite ibaWrite;
|
||||
|
|
|
@ -235,7 +235,7 @@ void CPSZonePlane::computeCollisions(CPSLocated &target, uint firstInstanceIndex
|
|||
ci.Dist = startEnd.norm();
|
||||
// we translate the particle from an epsilon so that it won't get hooked to the plane
|
||||
ci.NewPos = *itPosBefore + startEnd + PSCollideEpsilon * p.getNormal();
|
||||
const CVector &speed = target.getSpeed()[itPosBefore - posBefore];
|
||||
const CVector &speed = target.getSpeed()[(uint32)(itPosBefore - posBefore)];
|
||||
ci.NewSpeed = _BounceFactor * (speed - 2.0f * (speed * p.getNormal()) * p.getNormal());
|
||||
ci.CollisionZone = this;
|
||||
CPSLocated::_Collisions[itPosBefore - posBefore].update(ci);
|
||||
|
@ -346,7 +346,7 @@ void CPSZoneSphere::computeCollisions(CPSLocated &target, uint firstInstanceInde
|
|||
ci.Dist = startEnd.norm();
|
||||
// we translate the particle from an epsilon so that it won't get hooked to the sphere
|
||||
ci.NewPos = pos + startEnd + PSCollideEpsilon * normal;
|
||||
const CVector &speed = target.getSpeed()[itPosBefore - posBefore];
|
||||
const CVector &speed = target.getSpeed()[(uint32)(itPosBefore - posBefore)];
|
||||
ci.NewSpeed = _BounceFactor * (speed - 2.0f * (speed * normal) * normal);
|
||||
ci.CollisionZone = this;
|
||||
CPSLocated::_Collisions[itPosBefore - posBefore].update(ci);
|
||||
|
@ -503,7 +503,7 @@ void CPSZoneDisc::computeCollisions(CPSLocated &target, uint firstInstanceIndex,
|
|||
hitRadius2 = (ci.NewPos - center) * (ci.NewPos - center);
|
||||
if (hitRadius2 < radiusIt->R2) // check collision against disc
|
||||
{
|
||||
const CVector &speed = target.getSpeed()[itPosBefore - posBefore];
|
||||
const CVector &speed = target.getSpeed()[(uint32)(itPosBefore - posBefore)];
|
||||
ci.NewSpeed = _BounceFactor * (speed - 2.0f * (speed * p.getNormal()) * p.getNormal());
|
||||
ci.CollisionZone = this;
|
||||
CPSLocated::_Collisions[itPosBefore - posBefore].update(ci);
|
||||
|
@ -953,7 +953,7 @@ void CPSZoneCylinder::computeCollisions(CPSLocated &target, uint firstInstanceIn
|
|||
|
||||
if (alphaCyl < 0.f) alphaCyl = 1.f;
|
||||
}
|
||||
const CVector &speed = target.getSpeed()[itPosBefore - posBefore];
|
||||
const CVector &speed = target.getSpeed()[(uint32)(itPosBefore - posBefore)];
|
||||
// now, choose the minimum positive dist
|
||||
if (alphaTop < alphaBottom && alphaTop < alphaCyl)
|
||||
{
|
||||
|
@ -1175,7 +1175,7 @@ void CPSZoneRectangle::computeCollisions(CPSLocated &target, uint firstInstanceI
|
|||
if ( fabs( (ci.NewPos - center) * X ) < *widthIt && fabs( (ci.NewPos - center) * Y ) < *heightIt) // check collision against rectangle
|
||||
{
|
||||
ci.NewPos += PSCollideEpsilon * p.getNormal();
|
||||
const CVector &speed = target.getSpeed()[itPosBefore - posBefore];
|
||||
const CVector &speed = target.getSpeed()[(uint32)(itPosBefore - posBefore)];
|
||||
ci.NewSpeed = _BounceFactor * (speed - 2.0f * (speed * p.getNormal()) * p.getNormal());
|
||||
ci.CollisionZone = this;
|
||||
CPSLocated::_Collisions[itPosBefore - posBefore].update(ci);
|
||||
|
|
|
@ -58,7 +58,7 @@ void CQuadEffect::makeRasters(const TPoint2DVect &poly
|
|||
dest.clear();
|
||||
const float epsilon = 10E-5f;
|
||||
|
||||
sint size = poly.size();
|
||||
sint size = (sint)poly.size();
|
||||
uint aelSize = 0; // size of active edge list
|
||||
|
||||
sint k; // loop counter
|
||||
|
|
|
@ -41,7 +41,7 @@ template<class TIndex>
|
|||
static bool getRayIntersectionT(std::vector<NLMISC::CVector> &vertices, const std::vector<TIndex> &tris,
|
||||
float &dist2D, float &distZ, bool computeDist2D)
|
||||
{
|
||||
uint numTris= tris.size()/3;
|
||||
uint numTris= (uint)tris.size()/3;
|
||||
if(!numTris)
|
||||
return false;
|
||||
|
||||
|
@ -243,7 +243,7 @@ bool CRayMesh::fastIntersect(const NLMISC::CMatrix &worldMatrix, const NLMISC::
|
|||
|
||||
|
||||
// *** Make all points in ray space
|
||||
uint numVerts= Vertices.size();
|
||||
uint numVerts= (uint)Vertices.size();
|
||||
const CVector *src= &Vertices[0];
|
||||
// enlarge temp buffer
|
||||
static std::vector<CVector> meshInRaySpace;
|
||||
|
|
|
@ -840,7 +840,7 @@ void CScene::animate( TGlobalAnimationTime atTime )
|
|||
//----------------
|
||||
|
||||
// First list all current AnimatedLightmaps (for faster vector iteration per ig)
|
||||
const uint count = _AnimatedLightPtr.size ();
|
||||
const uint count = (uint)_AnimatedLightPtr.size ();
|
||||
uint i;
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
|
@ -1163,11 +1163,11 @@ CTransform *CScene::createModel(const CClassId &idModel)
|
|||
m->initModel();
|
||||
|
||||
// Ensure all the Traversals has enough space for visible list.
|
||||
ClipTrav.reserveVisibleList(_Models.size());
|
||||
AnimDetailTrav.reserveVisibleList(_Models.size());
|
||||
LoadBalancingTrav.reserveVisibleList(_Models.size());
|
||||
LightTrav.reserveLightedList(_Models.size());
|
||||
RenderTrav.reserveRenderList(_Models.size());
|
||||
ClipTrav.reserveVisibleList((uint)_Models.size());
|
||||
AnimDetailTrav.reserveVisibleList((uint)_Models.size());
|
||||
LoadBalancingTrav.reserveVisibleList((uint)_Models.size());
|
||||
LightTrav.reserveLightedList((uint)_Models.size());
|
||||
RenderTrav.reserveRenderList((uint)_Models.size());
|
||||
|
||||
return m;
|
||||
}
|
||||
|
@ -1309,9 +1309,9 @@ void CScene::setAutomaticAnimationSet(CAnimationSet *as)
|
|||
cm->setAnimationSet( _AutomaticAnimationSet );
|
||||
|
||||
// Add an automatic animation
|
||||
_AnimatedLight.push_back ( CAnimatedLightmap (_LightGroupColor.size ()) );
|
||||
_AnimatedLight.push_back ( CAnimatedLightmap ((uint)_LightGroupColor.size ()) );
|
||||
_AnimatedLightPtr.push_back ( &_AnimatedLight.back () );
|
||||
_AnimatedLightNameToIndex.insert ( std::map<std::string, uint>::value_type (lightName, _AnimatedLightPtr.size ()-1 ) );
|
||||
_AnimatedLightNameToIndex.insert ( std::map<std::string, uint>::value_type (lightName, (uint32)_AnimatedLightPtr.size ()-1 ) );
|
||||
CAnimatedLightmap &animLM = _AnimatedLight.back ();
|
||||
animLM.setName( *itSel );
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ void CInstanceGroup::CInstance::serial (NLMISC::IStream& f)
|
|||
|
||||
uint CInstanceGroup::getNumInstance () const
|
||||
{
|
||||
return _InstancesInfos.size();
|
||||
return (uint)_InstancesInfos.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -483,11 +483,11 @@ void CInstanceGroup::serial (NLMISC::IStream& f)
|
|||
uint32 i, j;
|
||||
for (i = 0; i < _ClusterInfos.size(); ++i)
|
||||
{
|
||||
uint32 nNbPortals = _ClusterInfos[i]._Portals.size();
|
||||
uint32 nNbPortals = (uint32)_ClusterInfos[i]._Portals.size();
|
||||
f.serial (nNbPortals);
|
||||
for (j = 0; j < nNbPortals; ++j)
|
||||
{
|
||||
sint32 nPortalNb = (_ClusterInfos[i]._Portals[j] - &_Portals[0]);
|
||||
sint32 nPortalNb = (sint32)(_ClusterInfos[i]._Portals[j] - &_Portals[0]);
|
||||
f.serial (nPortalNb);
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ bool CInstanceGroup::addToScene (CScene& scene, IDriver *driver, uint selectedTe
|
|||
_Instances.resize (_InstancesInfos.size(), NULL);
|
||||
|
||||
if (_IGAddBeginCallback)
|
||||
_IGAddBeginCallback->startAddingIG(_InstancesInfos.size());
|
||||
_IGAddBeginCallback->startAddingIG((uint)_InstancesInfos.size());
|
||||
|
||||
// Creation and positionning of the new instance
|
||||
|
||||
|
@ -740,7 +740,7 @@ bool CInstanceGroup::addToSceneWhenAllShapesLoaded (CScene& scene, IDriver *driv
|
|||
if (_Portals[i]._Clusters[j])
|
||||
{
|
||||
sint32 nClusterNb;
|
||||
nClusterNb = (_Portals[i]._Clusters[j] - &_ClusterInfos[0]);
|
||||
nClusterNb = (sint32)(_Portals[i]._Clusters[j] - &_ClusterInfos[0]);
|
||||
_Portals[i]._Clusters[j] = _ClusterInstances[nClusterNb];
|
||||
}
|
||||
}
|
||||
|
@ -828,7 +828,7 @@ bool CInstanceGroup::addToSceneAsync (CScene& scene, IDriver *driver, uint selec
|
|||
_Instances.resize (_InstancesInfos.size(), NULL);
|
||||
|
||||
if (_IGAddBeginCallback)
|
||||
_IGAddBeginCallback->startAddingIG(_InstancesInfos.size());
|
||||
_IGAddBeginCallback->startAddingIG((uint)_InstancesInfos.size());
|
||||
|
||||
// Creation and positionning of the new instance
|
||||
|
||||
|
@ -1374,14 +1374,14 @@ void CInstanceGroup::displayDebugClusters(IDriver *drv, class CTextContext *tx
|
|||
// count the number of vertices / triangles / lines to add
|
||||
if(poly.Vertices.size()>=3)
|
||||
{
|
||||
numTotalVertices+= poly.Vertices.size();
|
||||
numTotalVertices+= (uint)poly.Vertices.size();
|
||||
}
|
||||
}
|
||||
|
||||
// **** count the number of portals vertices
|
||||
for(j=0;j<cluster->_Portals.size();j++)
|
||||
{
|
||||
numTotalVertices+= cluster->_Portals[j]->_Poly.size();
|
||||
numTotalVertices+= (uint)cluster->_Portals[j]->_Poly.size();
|
||||
}
|
||||
|
||||
// **** Draw those cluster polygons, and portals
|
||||
|
@ -1436,7 +1436,7 @@ void CInstanceGroup::displayDebugClusters(IDriver *drv, class CTextContext *tx
|
|||
}
|
||||
}
|
||||
|
||||
iVert+= poly.Vertices.size();
|
||||
iVert+= (uint)poly.Vertices.size();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1489,7 +1489,7 @@ void CInstanceGroup::displayDebugClusters(IDriver *drv, class CTextContext *tx
|
|||
}
|
||||
}
|
||||
|
||||
iVert+= portalVerts.size();
|
||||
iVert+= (uint)portalVerts.size();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -308,7 +308,7 @@ void CShadowMapManager::renderGenerate(CScene *scene)
|
|||
// Allow Writing on alpha only. => don't write on RGB objects!
|
||||
driverForShadowGeneration->setColorMask(false, false, false, true);
|
||||
|
||||
uint numSC= _GenerateShadowCasters.size();
|
||||
uint numSC= (uint)_GenerateShadowCasters.size();
|
||||
uint baseSC= 0;
|
||||
while(numSC>0)
|
||||
{
|
||||
|
|
|
@ -59,9 +59,9 @@ uint CShadowPolyReceiver::addTriangle(const NLMISC::CTriangle &tri)
|
|||
if(_FreeTriangles.empty())
|
||||
{
|
||||
_Triangles.push_back(TTriangleGrid::CIterator());
|
||||
id= _Triangles.size()-1;
|
||||
id= (uint)_Triangles.size()-1;
|
||||
// enlarge render size.
|
||||
_RenderTriangles.setNumIndexes(_Triangles.size() * 3);
|
||||
_RenderTriangles.setNumIndexes((uint32)_Triangles.size() * 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -140,10 +140,10 @@ uint CShadowPolyReceiver::allocateVertex(const CVector &v)
|
|||
{
|
||||
// Add the vertex, and init refCount to 0.
|
||||
_Vertices.push_back(v);
|
||||
id= _Vertices.size()-1;
|
||||
id= (uint)_Vertices.size()-1;
|
||||
|
||||
// Resize the VBuffer at max possible
|
||||
_VB.setNumVertices(_Vertices.size());
|
||||
_VB.setNumVertices((uint32)_Vertices.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -223,8 +223,8 @@ inline void CShadowPolyReceiver::renderSelection(IDriver *drv, CMaterial &shadow
|
|||
uint currentTriIdx= 0;
|
||||
{
|
||||
// Volatile: must resize before lock
|
||||
_VB.setNumVertices(_Vertices.size());
|
||||
_RenderTriangles.setNumIndexes(_Triangles.size() * 3);
|
||||
_VB.setNumVertices((uint32)_Vertices.size());
|
||||
_RenderTriangles.setNumIndexes((uint32)_Triangles.size() * 3);
|
||||
|
||||
// lock volatile, to avoid cpu stall
|
||||
CVertexBufferReadWrite vba;
|
||||
|
@ -401,7 +401,7 @@ void CShadowPolyReceiver::computeClippedTrisWithPolyClip(const CShadowMap *shado
|
|||
}
|
||||
}
|
||||
|
||||
uint numVisibleTris = visibleTris.size();
|
||||
uint numVisibleTris = (uint)visibleTris.size();
|
||||
// compute normals if needed
|
||||
if (colorUpfacingVertices)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ void CShadowSkin::applySkin(CVector *dst, std::vector<CMatrix3x4> &boneMat3x4)
|
|||
{
|
||||
if(Vertices.empty())
|
||||
return;
|
||||
uint numVerts= Vertices.size();
|
||||
uint numVerts= (uint)Vertices.size();
|
||||
CShadowVertex *src= &Vertices[0];
|
||||
|
||||
// Then do the skin
|
||||
|
|
|
@ -712,7 +712,7 @@ sint CShapeBank::getShapeCacheFreeSpace(const std::string &shapeCacheName) const
|
|||
TShapeCacheMap::const_iterator scmIt = ShapeCacheNameToShapeCache.find( shapeCacheName );
|
||||
if( scmIt != ShapeCacheNameToShapeCache.end() )
|
||||
{
|
||||
return scmIt->second.MaxSize - scmIt->second.Elements.size();
|
||||
return scmIt->second.MaxSize - (sint)scmIt->second.Elements.size();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -807,7 +807,7 @@ void CSkeletonModel::traverseAnimDetail()
|
|||
|
||||
// must test / update the hierarchy of Bones.
|
||||
// Since they are orderd in depth-first order, we are sure that parent are computed before sons.
|
||||
uint numBoneToCompute= _BoneToCompute.size();
|
||||
uint numBoneToCompute= (uint)_BoneToCompute.size();
|
||||
CSkeletonModel::CBoneCompute *pBoneCompute= numBoneToCompute? &_BoneToCompute[0] : NULL;
|
||||
// traverse only bones which need to be computed
|
||||
for(;numBoneToCompute>0;numBoneToCompute--, pBoneCompute++)
|
||||
|
@ -951,7 +951,7 @@ void CSkeletonModel::computeLodTexture()
|
|||
// Ok, compute influence of this instance on the Lod.
|
||||
|
||||
// ---- Build all bmps of the instance with help of the asyncTextureManager
|
||||
uint numMats= mbi->Materials.size();
|
||||
uint numMats= (uint)mbi->Materials.size();
|
||||
// 256 materials possibles for the lod Manager
|
||||
numMats= min(numMats, 256U);
|
||||
// for endTexturecompute
|
||||
|
|
|
@ -238,7 +238,7 @@ void CSkeletonShape::getAABBox(NLMISC::CAABBox &bbox) const
|
|||
uint CSkeletonShape::getLodForDistance(float dist) const
|
||||
{
|
||||
uint start=0;
|
||||
uint end= _Lods.size();
|
||||
uint end= (uint)_Lods.size();
|
||||
// find lower_bound by dichotomy
|
||||
while(end-1>start)
|
||||
{
|
||||
|
|
|
@ -155,7 +155,7 @@ void CSkeletonSpawnScript::parseCache(CScene *scene, CSkeletonModel *skeleton)
|
|||
// Delay the model creation at end of CScene::render()
|
||||
CSSSModelRequest req;
|
||||
req.Skel= skeleton;
|
||||
req.InstanceId= _Instances.size()-1;
|
||||
req.InstanceId= (uint)_Instances.size()-1;
|
||||
req.Shape= words[2];
|
||||
// World Spawned Objects are sticked to the root bone (for CLod hiding behavior)
|
||||
req.BoneId= 0;
|
||||
|
@ -211,7 +211,7 @@ void CSkeletonSpawnScript::parseCache(CScene *scene, CSkeletonModel *skeleton)
|
|||
// Delay the model creation at end of CScene::render()
|
||||
CSSSModelRequest req;
|
||||
req.Skel= skeleton;
|
||||
req.InstanceId= _Instances.size()-1;
|
||||
req.InstanceId= (uint)_Instances.size()-1;
|
||||
req.Shape= words[2];
|
||||
req.BoneId= boneId;
|
||||
req.SSSWO= false;
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace NL3D
|
|||
|
||||
uint CSkeletonWeight::getNumNode () const
|
||||
{
|
||||
return _Elements.size();
|
||||
return (uint)_Elements.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -73,7 +73,7 @@ uint32 CTextContext::textPush (const char *format, ...)
|
|||
_CacheStrings.push_back (csTmp);
|
||||
if (_CacheFreePlaces.size() == 0)
|
||||
_CacheFreePlaces.resize (1);
|
||||
_CacheFreePlaces[0] = _CacheStrings.size()-1;
|
||||
_CacheFreePlaces[0] = (uint32)_CacheStrings.size()-1;
|
||||
_CacheNbFreePlaces = 1;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ uint32 CTextContext::textPush (const ucstring &str)
|
|||
_CacheStrings.push_back (csTmp);
|
||||
if (_CacheFreePlaces.size() == 0)
|
||||
_CacheFreePlaces.resize (1);
|
||||
_CacheFreePlaces[0] = _CacheStrings.size()-1;
|
||||
_CacheFreePlaces[0] = (uint32)_CacheStrings.size()-1;
|
||||
_CacheNbFreePlaces = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -350,7 +350,7 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k)
|
|||
Accel.insert (map<uint32, SLetterInfo*>::value_type(k.getVal(),Front[cat]));
|
||||
|
||||
// Invalidate the zone
|
||||
sint index = (Front[cat] - &Letters[cat][0]);// / sizeof (SLetterInfo);
|
||||
sint index = (sint)(Front[cat] - &Letters[cat][0]);// / sizeof (SLetterInfo);
|
||||
sint sizex = TextureSizeX / Categories[cat];
|
||||
sint x = index % sizex;
|
||||
sint y = index / sizex;
|
||||
|
|
|
@ -55,7 +55,7 @@ CTextureNear::CTextureNear(sint size)
|
|||
// ***************************************************************************
|
||||
sint CTextureNear::getNbAvailableTiles()
|
||||
{
|
||||
return _FreeTiles.size();
|
||||
return (sint)_FreeTiles.size();
|
||||
}
|
||||
// ***************************************************************************
|
||||
uint CTextureNear::getTileAndFillRect(CRGBA map[NL_TILE_LIGHTMAP_SIZE*NL_TILE_LIGHTMAP_SIZE])
|
||||
|
|
|
@ -162,7 +162,7 @@ void CTileBank::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// ***************************************************************************
|
||||
sint CTileBank::addLand (const std::string& name)
|
||||
{
|
||||
sint last=_LandVector.size();
|
||||
sint last=(sint)_LandVector.size();
|
||||
_LandVector.push_back(CTileLand());
|
||||
_LandVector[last].setName (name);
|
||||
return last;
|
||||
|
@ -179,7 +179,7 @@ void CTileBank::removeLand (sint landIndex)
|
|||
// ***************************************************************************
|
||||
sint CTileBank::addTileSet (const std::string& name)
|
||||
{
|
||||
sint last=_TileSetVector.size();
|
||||
sint last=(sint)_TileSetVector.size();
|
||||
_TileSetVector.push_back(CTileSet());
|
||||
_TileSetVector[last].setName (name);
|
||||
for (int i=0; i<CTileSet::count; i++)
|
||||
|
@ -233,7 +233,7 @@ sint CTileBank::createTile ()
|
|||
_TileVector[_TileVector.size()-1].setFileName (CTile::diffuse, "");
|
||||
_TileVector[_TileVector.size()-1].setFileName (CTile::additive, "");
|
||||
_TileVector[_TileVector.size()-1].setFileName (CTile::alpha, "");
|
||||
return _TileVector.size()-1;
|
||||
return (sint)_TileVector.size()-1;
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CTileBank::freeTile (int tileIndex)
|
||||
|
@ -273,7 +273,7 @@ sint CTileBank::getNumBitmap (CTile::TBitmap bitmap) const
|
|||
}
|
||||
}
|
||||
}
|
||||
return setString.size();
|
||||
return (sint)setString.size();
|
||||
}
|
||||
// ***************************************************************************
|
||||
void CTileBank::computeXRef ()
|
||||
|
@ -630,7 +630,7 @@ void CTileBank::setDisplacementMap (uint noiseMap, const char *newName)
|
|||
// ***************************************************************************
|
||||
uint CTileBank::getDisplacementMapCount () const
|
||||
{
|
||||
return _DisplacementMap.size();
|
||||
return (uint)_DisplacementMap.size();
|
||||
}
|
||||
|
||||
|
||||
|
@ -991,7 +991,7 @@ void CTileSet::addTile128 (int& indexInTileSet, CTileBank& bank)
|
|||
sint index=bank.createTile ();
|
||||
|
||||
// Index of the new tile
|
||||
indexInTileSet=_Tile128.size();
|
||||
indexInTileSet=(int)_Tile128.size();
|
||||
|
||||
// Add to the end of the list
|
||||
_Tile128.push_back (index);
|
||||
|
@ -1050,7 +1050,7 @@ void CTileSet::addTile256 (int& indexInTileSet, CTileBank& bank)
|
|||
sint index=bank.createTile ();
|
||||
|
||||
// Index of the new tile
|
||||
indexInTileSet=_Tile256.size();
|
||||
indexInTileSet=(int)_Tile256.size();
|
||||
|
||||
// Add to the end of the list
|
||||
_Tile256.push_back (index);
|
||||
|
@ -1778,7 +1778,7 @@ void CTileBorder::rotate()
|
|||
|
||||
// Top inverted becomes left
|
||||
uint i, size;
|
||||
size=_Borders[top].size();
|
||||
size=(uint)_Borders[top].size();
|
||||
_Borders[left].resize (size);
|
||||
|
||||
// copy inverted
|
||||
|
@ -1789,7 +1789,7 @@ void CTileBorder::rotate()
|
|||
_Borders[top]=_Borders[right];
|
||||
|
||||
// bottom inverted becomes right
|
||||
size=_Borders[bottom].size();
|
||||
size=(uint)_Borders[bottom].size();
|
||||
_Borders[right].resize (size);
|
||||
|
||||
// copy inverted
|
||||
|
|
|
@ -68,7 +68,7 @@ void CTileVegetableDesc::build(const std::vector<CVegetable> &vegetables)
|
|||
{
|
||||
_VegetableSeed[i]= sumVeget;
|
||||
// add number of vegetable for next seed.
|
||||
sumVeget+= _VegetableList[i].size();
|
||||
sumVeget+= (uint)_VegetableList[i].size();
|
||||
}
|
||||
|
||||
// compile some data
|
||||
|
|
|
@ -100,7 +100,7 @@ void CTrackSampledCommon::buildCommon(const std::vector<uint16> &timeList, float
|
|||
uint i;
|
||||
|
||||
// reset.
|
||||
uint numKeys= timeList.size();
|
||||
uint numKeys= (uint)timeList.size();
|
||||
_TimeBlocks.clear();
|
||||
|
||||
// Special case of 0 or 1 key.
|
||||
|
@ -158,7 +158,7 @@ void CTrackSampledCommon::buildCommon(const std::vector<uint16> &timeList, float
|
|||
}
|
||||
|
||||
// Build the timeBlocks.
|
||||
_TimeBlocks.resize(timeBlockKeyId.size());
|
||||
_TimeBlocks.resize((uint32)timeBlockKeyId.size());
|
||||
for(i=0; i<timeBlockKeyId.size(); i++)
|
||||
{
|
||||
CTimeBlock &timeBlock= _TimeBlocks[i];
|
||||
|
@ -346,7 +346,7 @@ void CTrackSampledCommon::applySampleDivisorCommon(uint sampleDivisor, std::vect
|
|||
CTimeBlock &timeBlock= _TimeBlocks[i];
|
||||
|
||||
// keep track of the start new key for this block
|
||||
blockKeepStart[i]= keepKeys.size();
|
||||
blockKeepStart[i]= (uint32)keepKeys.size();
|
||||
|
||||
for(j=0;j<timeBlock.Times.size();j++)
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ void CTrackSampledCommon::applySampleDivisorCommon(uint sampleDivisor, std::vect
|
|||
}
|
||||
|
||||
// keep track of the end (not included) new key for this block
|
||||
blockKeepEnd[i]= keepKeys.size();
|
||||
blockKeepEnd[i]= (uint32)keepKeys.size();
|
||||
}
|
||||
|
||||
// **** rebuild the TimeBlocks
|
||||
|
|
|
@ -149,7 +149,7 @@ void CTrackSampledQuat::build(const std::vector<uint16> &timeList, const std::ve
|
|||
uint i;
|
||||
|
||||
// reset.
|
||||
uint numKeys= keyList.size();
|
||||
uint numKeys= (uint)keyList.size();
|
||||
_Keys.clear();
|
||||
_TimeBlocks.clear();
|
||||
|
||||
|
@ -230,7 +230,7 @@ void CTrackSampledQuat::applySampleDivisor(uint sampleDivisor)
|
|||
|
||||
// **** rebuild the keys
|
||||
NLMISC::CObjectVector<CQuatPack, false> newKeys;
|
||||
newKeys.resize(keepKeys.size());
|
||||
newKeys.resize((uint32)keepKeys.size());
|
||||
for(uint i=0;i<newKeys.size();i++)
|
||||
{
|
||||
newKeys[i]= _Keys[keepKeys[i]];
|
||||
|
|
|
@ -68,7 +68,7 @@ void CTrackSampledVector::build(const std::vector<uint16> &timeList, const std::
|
|||
uint i;
|
||||
|
||||
// reset.
|
||||
uint numKeys= keyList.size();
|
||||
uint numKeys= (uint)keyList.size();
|
||||
_Keys.clear();
|
||||
_TimeBlocks.clear();
|
||||
|
||||
|
@ -134,7 +134,7 @@ void CTrackSampledVector::applySampleDivisor(uint sampleDivisor)
|
|||
|
||||
// **** rebuild the keys
|
||||
NLMISC::CObjectVector<CVector, false> newKeys;
|
||||
newKeys.resize(keepKeys.size());
|
||||
newKeys.resize((uint32)keepKeys.size());
|
||||
for(uint i=0;i<newKeys.size();i++)
|
||||
{
|
||||
newKeys[i]= _Keys[keepKeys[i]];
|
||||
|
|
|
@ -1339,7 +1339,7 @@ bool CTransform::clipHasParent(CTransform *parent)
|
|||
void CTransform::clipDelFromParent(CTransform *parent)
|
||||
{
|
||||
// search O(n) for all Parents
|
||||
uint numParents= _ClipParents.size();
|
||||
uint numParents= (uint)_ClipParents.size();
|
||||
for(uint i=0;i<numParents;i++)
|
||||
{
|
||||
if(_ClipParents[i]->Parent==parent)
|
||||
|
|
|
@ -244,7 +244,7 @@ uint UInstance::getNumMaterials() const
|
|||
{
|
||||
CMeshBaseInstance *mi= dynamic_cast<CMeshBaseInstance*>(_Object);
|
||||
if(mi)
|
||||
return mi->Materials.size();
|
||||
return (uint)mi->Materials.size();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ uint USkeleton::getNumBones() const
|
|||
{
|
||||
NL3D_HAUTO_UI_SKELETON;
|
||||
CSkeletonModel *object = getObjectPtr();
|
||||
return object->Bones.size();
|
||||
return (uint)object->Bones.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -891,7 +891,7 @@ void CVegetableManager::reserveIgAddInstances(CVegetableInstanceGroupReserve &
|
|||
|
||||
// Reserve space in the rdrPass.
|
||||
vegetRdrPass.NVertices+= numInstances * shape->VB.getNumVertices();
|
||||
vegetRdrPass.NTriangles+= numInstances * shape->TriangleIndices.size()/3;
|
||||
vegetRdrPass.NTriangles+= numInstances * (uint)shape->TriangleIndices.size()/3;
|
||||
// if the instances are lighted, reserve space for lighting updates
|
||||
if(instanceLighted)
|
||||
vegetRdrPass.NLightedInstances+= numInstances;
|
||||
|
@ -1206,8 +1206,8 @@ void CVegetableManager::addInstance(CVegetableInstanceGroup *ig,
|
|||
|
||||
// Vertex/triangle Info.
|
||||
uint numNewVertices= shape->VB.getNumVertices();
|
||||
uint numNewTris= shape->TriangleIndices.size()/3;
|
||||
uint numNewIndices= shape->TriangleIndices.size();
|
||||
uint numNewTris= (uint)shape->TriangleIndices.size()/3;
|
||||
uint numNewIndices= (uint)shape->TriangleIndices.size();
|
||||
|
||||
// src info.
|
||||
uint srcNormalOff= (instanceLighted? shape->VB.getNormalOff() : 0);
|
||||
|
@ -2519,7 +2519,7 @@ uint CVegetableManager::updateInstanceLighting(CVegetableInstanceGroup *ig, uin
|
|||
CMatrix &normalMat= vegetLI.NormalMat;
|
||||
// array of vertex id to update
|
||||
uint32 *ptrVid= vegetRdrPass.Vertices.getPtr() + vegetLI.StartIdInRdrPass;
|
||||
uint numVertices= shape->InstanceVertices.size();
|
||||
uint numVertices= (uint)shape->InstanceVertices.size();
|
||||
|
||||
// Copy Dynamic Lightmap UV in Alpha part (save memory for an extra cost of 1 VP instruction)
|
||||
primaryRGBA.A= vegetLI.DlmUV.U;
|
||||
|
|
|
@ -170,7 +170,7 @@ void CVegetableVBAllocator::unlockBuffer()
|
|||
uint CVegetableVBAllocator::getNumUserVerticesAllocated() const
|
||||
{
|
||||
// get the number of vertices which are allocated by allocateVertex().
|
||||
return _NumVerticesAllocated - _VertexFreeMemory.size();
|
||||
return _NumVerticesAllocated - (uint)_VertexFreeMemory.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -463,7 +463,7 @@ void CVertexBuffer::initEx ()
|
|||
|
||||
// Compute new capacity
|
||||
if (_VertexSize)
|
||||
_Capacity = _NonResidentVertices.size()/_VertexSize;
|
||||
_Capacity = (uint32)_NonResidentVertices.size()/_VertexSize;
|
||||
else
|
||||
_Capacity = 0;
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ CTrianglePatch *CVisualCollisionEntity::getPatchTriangleUnderUs(const CVector &
|
|||
CPatchQuadBlock &qb= *_PatchQuadBlocks[qbId];
|
||||
|
||||
// Build the 2 triangles of this tile Id.
|
||||
sint idStart= testTriangles.size();
|
||||
sint idStart= (sint)testTriangles.size();
|
||||
testTriangles.resize(idStart+2);
|
||||
qb.buildTileTriangles((uint8)ptr->QuadId, &testTriangles[idStart]);
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ bool CVisualCollisionMesh::build(const std::vector<CVector> &vertices, const
|
|||
localBBox.extend(vertices[i]);
|
||||
|
||||
// Build the Static Grid
|
||||
uint numTris= triangles.size()/3;
|
||||
uint numTris= (uint)triangles.size()/3;
|
||||
_QuadGrid.create(16, numTris, localBBox);
|
||||
// Add all triangles
|
||||
for(i=0;i<numTris;i++)
|
||||
|
|
|
@ -1245,12 +1245,12 @@ uint CWaterModel::getNumWantedVertices()
|
|||
projPoly.computeOuterBorders(border, minYBorder);
|
||||
// border - inside -> gives grid cells that must be clipped to fit the shape boundaries
|
||||
// Make sure that rasters array for inside has the same size that raster array for borders (by inserting NULL rasters)
|
||||
sint height = border.size();
|
||||
sint height = (sint)border.size();
|
||||
if (_Inside.empty())
|
||||
{
|
||||
_MinYInside = minYBorder;
|
||||
}
|
||||
sint bottomGap = border.size() - _Inside.size();
|
||||
sint bottomGap = (sint)(border.size() - _Inside.size());
|
||||
_Inside.resize(height);
|
||||
nlassert(minYBorder == _MinYInside);
|
||||
|
||||
|
@ -1285,7 +1285,7 @@ uint CWaterModel::getNumWantedVertices()
|
|||
|
||||
const CVector2f *prevVert = &projPoly.Vertices.back();
|
||||
const CVector2f *currVert = &projPoly.Vertices.front();
|
||||
uint numVerts = projPoly.Vertices.size();
|
||||
uint numVerts = (uint)projPoly.Vertices.size();
|
||||
bool ccw = projPoly.isCCWOriented();
|
||||
clipPlanes.resize(numVerts);
|
||||
for(uint k = 0; k < numVerts; ++k)
|
||||
|
@ -1324,11 +1324,11 @@ uint CWaterModel::getNumWantedVertices()
|
|||
if (!clipPoly.Vertices.empty())
|
||||
{
|
||||
// backup result (will be unprojected later)
|
||||
_ClippedTriNumVerts.push_back(clipPoly.Vertices.size());
|
||||
uint prevSize = _ClippedTris.size();
|
||||
_ClippedTriNumVerts.push_back((uint)clipPoly.Vertices.size());
|
||||
uint prevSize = (uint)_ClippedTris.size();
|
||||
_ClippedTris.resize(_ClippedTris.size() + clipPoly.Vertices.size());
|
||||
std::copy(clipPoly.Vertices.begin(), clipPoly.Vertices.end(), _ClippedTris.begin() + prevSize); // append to packed list
|
||||
totalNumVertices += (clipPoly.Vertices.size() - 2) * 3;
|
||||
totalNumVertices += ((uint)clipPoly.Vertices.size() - 2) * 3;
|
||||
}
|
||||
}
|
||||
// middle block, are not clipped, but count the number of wanted vertices
|
||||
|
@ -1348,11 +1348,11 @@ uint CWaterModel::getNumWantedVertices()
|
|||
if (!clipPoly.Vertices.empty())
|
||||
{
|
||||
// backup result (will be unprojected later)
|
||||
_ClippedTriNumVerts.push_back(clipPoly.Vertices.size());
|
||||
uint prevSize = _ClippedTris.size();
|
||||
_ClippedTriNumVerts.push_back((uint)clipPoly.Vertices.size());
|
||||
uint prevSize = (uint)_ClippedTris.size();
|
||||
_ClippedTris.resize(_ClippedTris.size() + clipPoly.Vertices.size());
|
||||
std::copy(clipPoly.Vertices.begin(), clipPoly.Vertices.end(), _ClippedTris.begin() + prevSize); // append to packed list
|
||||
totalNumVertices += (clipPoly.Vertices.size() - 2) * 3;
|
||||
totalNumVertices += ((uint)clipPoly.Vertices.size() - 2) * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1512,7 +1512,7 @@ uint CWaterModel::fillVBSoft(void *datas, uint startTri)
|
|||
}
|
||||
}
|
||||
nlassert((dest - (uint8 * ) datas) % (3 * WATER_VERTEX_SOFT_SIZE) == 0);
|
||||
uint endTri = (dest - (uint8 * ) datas) / (3 * WATER_VERTEX_SOFT_SIZE);
|
||||
uint endTri = (uint)(dest - (uint8 * ) datas) / (3 * WATER_VERTEX_SOFT_SIZE);
|
||||
_NumTris = endTri - _StartTri;
|
||||
return endTri;
|
||||
}
|
||||
|
@ -1600,7 +1600,7 @@ uint CWaterModel::fillVBHard(void *datas, uint startTri)
|
|||
}
|
||||
}
|
||||
nlassert((dest - (uint8 * ) datas) % (3 * WATER_VERTEX_HARD_SIZE) == 0);
|
||||
uint endTri = (dest - (uint8 * ) datas) / (3 * WATER_VERTEX_HARD_SIZE);
|
||||
uint endTri = (uint)(dest - (uint8 * ) datas) / (3 * WATER_VERTEX_HARD_SIZE);
|
||||
_NumTris = endTri - _StartTri;
|
||||
return endTri;
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ bool CWaterPoolManager::isWaterShapeObserver(const CWaterShape *shape) const
|
|||
|
||||
uint CWaterPoolManager::getNumPools() const
|
||||
{
|
||||
return _PoolMap.size();
|
||||
return (uint)_PoolMap.size();
|
||||
}
|
||||
|
||||
//===============================================================================================
|
||||
|
@ -219,7 +219,7 @@ void CWaterPoolManager::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
TPoolMap::iterator it;
|
||||
if (!f.isReading())
|
||||
{
|
||||
size = _PoolMap.size();
|
||||
size = (uint32)_PoolMap.size();
|
||||
it = _PoolMap.begin();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -230,8 +230,8 @@ void CZone::build(const CZoneInfo &zoneInfo, uint32 numVertices)
|
|||
NumVertices= max((uint32)NumVertices, numVertices);
|
||||
|
||||
// Init the Clip Arrays
|
||||
_PatchRenderClipped.resize(Patchs.size());
|
||||
_PatchOldRenderClipped.resize(Patchs.size());
|
||||
_PatchRenderClipped.resize((uint)Patchs.size());
|
||||
_PatchOldRenderClipped.resize((uint)Patchs.size());
|
||||
_PatchRenderClipped.setAll();
|
||||
_PatchOldRenderClipped.setAll();
|
||||
|
||||
|
@ -373,8 +373,8 @@ void CZone::build(const CZone &zone)
|
|||
PatchConnects= zone.PatchConnects;
|
||||
|
||||
// Init the Clip Arrays
|
||||
_PatchRenderClipped.resize(Patchs.size());
|
||||
_PatchOldRenderClipped.resize(Patchs.size());
|
||||
_PatchRenderClipped.resize((uint)Patchs.size());
|
||||
_PatchOldRenderClipped.resize((uint)Patchs.size());
|
||||
_PatchRenderClipped.setAll();
|
||||
_PatchOldRenderClipped.setAll();
|
||||
|
||||
|
@ -488,8 +488,8 @@ void CZone::serial(NLMISC::IStream &f)
|
|||
// If read, must create and init Patch Clipped state to true (clipped even if not compiled)
|
||||
if(f.isReading())
|
||||
{
|
||||
_PatchRenderClipped.resize(Patchs.size());
|
||||
_PatchOldRenderClipped.resize(Patchs.size());
|
||||
_PatchRenderClipped.resize((uint)Patchs.size());
|
||||
_PatchOldRenderClipped.resize((uint)Patchs.size());
|
||||
_PatchRenderClipped.setAll();
|
||||
_PatchOldRenderClipped.setAll();
|
||||
}
|
||||
|
@ -999,7 +999,7 @@ void CZone::clip(const std::vector<CPlane> &pyramid)
|
|||
// get BitSet as Raw Array of uint32
|
||||
uint32 *oldRenderClip= const_cast<uint32*>(&_PatchOldRenderClipped.getVector()[0]);
|
||||
const uint32 *newRenderClip= &_PatchRenderClipped.getVector()[0];
|
||||
uint numPatchs= Patchs.size();
|
||||
uint numPatchs= (uint)Patchs.size();
|
||||
// Then, we must test by patch.
|
||||
for(uint i=0;i<numPatchs;oldRenderClip++, newRenderClip++)
|
||||
{
|
||||
|
@ -1815,7 +1815,7 @@ void CPatchInfo::transform256Case (const CTileBank &bank, uint8 &case256, uint t
|
|||
|
||||
bool CPatchInfo::transform (std::vector<CPatchInfo> &patchInfo, NL3D::CZoneSymmetrisation &zoneSymmetry, const NL3D::CTileBank &bank, bool symmetry, uint rotate, float snapCell, float weldThreshold, const NLMISC::CMatrix &toOriginalSpace)
|
||||
{
|
||||
uint patchCount = patchInfo.size ();
|
||||
uint patchCount = (uint)patchInfo.size ();
|
||||
uint i;
|
||||
|
||||
// --- Export tile info Symmetry of the bind info.
|
||||
|
|
|
@ -970,7 +970,7 @@ void CZoneLighter::light (CLandscape &landscape, CZone& output, uint zoneToLight
|
|||
CVector center = zoneBB.getCenter ();
|
||||
|
||||
// *** Compute planes
|
||||
const uint size=obstacles.size();
|
||||
const uint size=(uint)obstacles.size();
|
||||
uint triangleId;
|
||||
for (triangleId=0; triangleId<size; triangleId++)
|
||||
{
|
||||
|
@ -1013,7 +1013,7 @@ void CZoneLighter::light (CLandscape &landscape, CZone& output, uint zoneToLight
|
|||
_ProcessExited = 0;
|
||||
|
||||
// Number of triangle to render per thread
|
||||
uint numTriangle = (obstacles.size () / _ProcessCount) + 1;
|
||||
uint numTriangle = ((uint)obstacles.size () / _ProcessCount) + 1;
|
||||
|
||||
// First triangle for the thread
|
||||
uint firstTriangle = 0;
|
||||
|
@ -1026,7 +1026,7 @@ void CZoneLighter::light (CLandscape &landscape, CZone& output, uint zoneToLight
|
|||
// Get list of triangles to render
|
||||
uint lastTriangle=firstTriangle+numTriangle;
|
||||
if (lastTriangle>obstacles.size ())
|
||||
lastTriangle=obstacles.size ();
|
||||
lastTriangle=(uint)obstacles.size ();
|
||||
|
||||
// Create a thread
|
||||
CRenderZBuffer *runnable = new CRenderZBuffer (process, this, &description, firstTriangle, lastTriangle - firstTriangle, &obstacles);
|
||||
|
@ -1132,7 +1132,7 @@ void CZoneLighter::light (CLandscape &landscape, CZone& output, uint zoneToLight
|
|||
pZone->retrieve (_PatchInfo, _BorderVertices);
|
||||
|
||||
// Number of patch
|
||||
uint patchCount=_PatchInfo.size();
|
||||
uint patchCount=(uint)_PatchInfo.size();
|
||||
|
||||
// Bit array to know if the lumel is shadowed
|
||||
if (description.Shadow)
|
||||
|
@ -1150,7 +1150,7 @@ void CZoneLighter::light (CLandscape &landscape, CZone& output, uint zoneToLight
|
|||
}
|
||||
|
||||
// Number of patch
|
||||
uint patchCount=_PatchInfo.size();
|
||||
uint patchCount=(uint)_PatchInfo.size();
|
||||
|
||||
// Reset patch count
|
||||
{
|
||||
|
@ -1294,7 +1294,7 @@ void CZoneLighter::processCalc (uint process, const CLightDesc& description)
|
|||
std::vector<CLumelDescriptor> &lumels=_Lumels[patch];
|
||||
|
||||
// Lumel count
|
||||
uint lumelCount=lumels.size();
|
||||
uint lumelCount=(uint)lumels.size();
|
||||
CPatchInfo &patchInfo=_PatchInfo[patch];
|
||||
nlassert (patchInfo.Lumels.size()==lumelCount);
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ void CZoneLighter::processCalc (uint process, const CLightDesc& description)
|
|||
std::vector<CLumelDescriptor> &lumels=_Lumels[patch];
|
||||
|
||||
// Lumel count
|
||||
uint lumelCount=lumels.size();
|
||||
uint lumelCount=(uint)lumels.size();
|
||||
CPatchInfo &patchInfo=_PatchInfo[patch];
|
||||
nlassert (patchInfo.Lumels.size()==lumelCount);
|
||||
|
||||
|
@ -1613,7 +1613,7 @@ void CZoneLighter::addTriangles (CLandscape &landscape, vector<uint> &listZone,
|
|||
landscape.getTessellationLeaves(leaves);
|
||||
|
||||
// Number of leaves
|
||||
uint leavesCount=leaves.size();
|
||||
uint leavesCount=(uint)leaves.size();
|
||||
|
||||
// Reserve the array
|
||||
triangleArray.reserve (triangleArray.size()+leavesCount);
|
||||
|
@ -1997,7 +1997,7 @@ void CZoneLighter::buildZoneInformation (CLandscape &landscape, const vector<uin
|
|||
vector<vector<uint> > visited;
|
||||
|
||||
// Zone count
|
||||
uint zoneCount=listZone.size();
|
||||
uint zoneCount=(uint)listZone.size();
|
||||
|
||||
// Resize arries
|
||||
_Locator.resize (zoneCount);
|
||||
|
@ -2164,7 +2164,7 @@ void CZoneLighter::buildZoneInformation (CLandscape &landscape, const vector<uin
|
|||
uint zoneNumber=_ZoneId[_ZoneToLight];
|
||||
|
||||
// Scan each leaves
|
||||
uint leavesCount=leaves.size();
|
||||
uint leavesCount=(uint)leaves.size();
|
||||
uint leave;
|
||||
for (leave=0; leave<leavesCount; leave++)
|
||||
{
|
||||
|
@ -2425,7 +2425,7 @@ void CZoneLighter::buildZoneInformation (CLandscape &landscape, const vector<uin
|
|||
landscape.getTessellationLeaves(leaves);
|
||||
|
||||
// Scan each leaves
|
||||
leavesCount=leaves.size();
|
||||
leavesCount=(uint)leaves.size();
|
||||
for (leave=0; leave<leavesCount; leave++)
|
||||
{
|
||||
// Progress bar
|
||||
|
@ -2707,7 +2707,7 @@ void CZoneLighter::computeTileFlagsOnly (CLandscape &landscape, CZone& output, u
|
|||
|
||||
|
||||
// Zone count
|
||||
uint zoneCount=listZone.size();
|
||||
uint zoneCount=(uint)listZone.size();
|
||||
|
||||
// For each zone
|
||||
for (uint zone=0; zone<zoneCount; zone++)
|
||||
|
@ -2851,7 +2851,7 @@ void CZoneLighter::lightShapes(uint zoneID, const CLightDesc& description)
|
|||
/// compute light for the lightable shapes in the given zone
|
||||
if (_LightableShapes.size() == 0) return;
|
||||
|
||||
uint numShapePerThread = 1 + (_LightableShapes.size() / _ProcessCount);
|
||||
uint numShapePerThread = 1 + ((uint)_LightableShapes.size() / _ProcessCount);
|
||||
uint currShapeIndex = 0;
|
||||
uint process = 0;
|
||||
_ProcessExited = 0;
|
||||
|
@ -3133,7 +3133,7 @@ void CZoneLighter::makeQuadGridFromWaterShapes(NLMISC::CAABBox zoneBBox)
|
|||
_WaterShapeQuadGrid.create(numCells, dim / numCells);
|
||||
|
||||
|
||||
uint count = 0, totalCount = _WaterShapes.size();
|
||||
uint count = 0, totalCount = (uint)_WaterShapes.size();
|
||||
|
||||
/// now, insert all water shapes
|
||||
for (TShapeVect::iterator it = _WaterShapes.begin(); it != _WaterShapes.end(); ++it, ++count)
|
||||
|
@ -3280,7 +3280,7 @@ void CZoneLighter::compilePointLightRT(uint gridSize, float gridCellSize, std:
|
|||
// ===========
|
||||
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
|
||||
|
@ -3624,7 +3624,7 @@ void CZoneLighter::computeTileFlagsForPositionTowardWater(const CLightDesc &ligh
|
|||
// First, build the bbox for all tiles //
|
||||
///////////////////////////////////////////
|
||||
|
||||
uint triCount = 0, totalTriCount = tessFaces.size();
|
||||
uint triCount = 0, totalTriCount = (uint)tessFaces.size();
|
||||
|
||||
nlinfo("Dealing with %d tessFaces", tessFaces.size());
|
||||
for (std::vector<const CTessFace*>::iterator it = tessFaces.begin(); it != tessFaces.end(); ++it, ++triCount)
|
||||
|
@ -3673,7 +3673,7 @@ void CZoneLighter::computeTileFlagsForPositionTowardWater(const CLightDesc &ligh
|
|||
NLMISC::CPolygon2D tilePoly;
|
||||
tilePoly.Vertices.resize(4);
|
||||
|
||||
uint tileCount = 0, totalTileCount = tiles.size();
|
||||
uint tileCount = 0, totalTileCount = (uint)tiles.size();
|
||||
|
||||
for (TTileOfPatchMap::iterator tileIt = tiles.begin(); tileIt != tiles.end(); ++tileIt, ++tileCount)
|
||||
{
|
||||
|
|
|
@ -320,7 +320,7 @@ const std::string &CForm::getParentFilename (uint parent) const
|
|||
|
||||
uint CForm::getParentCount () const
|
||||
{
|
||||
return ParentList.size ();
|
||||
return (uint)ParentList.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -390,7 +390,7 @@ void CFormDfn::getParentDfn (std::vector<const CFormDfn*> &array, uint32 round)
|
|||
|
||||
uint CFormDfn::getNumParent () const
|
||||
{
|
||||
return Parents.size ();
|
||||
return (uint)Parents.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -411,7 +411,7 @@ const string& CFormDfn::getParentFilename (uint parent) const
|
|||
|
||||
uint CFormDfn::getNumEntry () const
|
||||
{
|
||||
return Entries.size();
|
||||
return (uint)Entries.size();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -586,11 +586,11 @@ CFormDfn *CFormDfn::getSubDfn (uint index, uint &dfnIndex)
|
|||
// For each parent
|
||||
uint dfn;
|
||||
dfnIndex = index;
|
||||
uint parentSize = parentDfn.size();
|
||||
uint parentSize = (uint)parentDfn.size();
|
||||
for (dfn=0; dfn<parentSize; dfn++)
|
||||
{
|
||||
// Good element ?
|
||||
uint size = parentDfn[dfn]->Entries.size ();
|
||||
uint size = (uint)parentDfn[dfn]->Entries.size ();
|
||||
if (dfnIndex<size)
|
||||
return parentDfn[dfn];
|
||||
dfnIndex -= size;
|
||||
|
@ -613,11 +613,11 @@ const CFormDfn *CFormDfn::getSubDfn (uint index, uint &dfnIndex) const
|
|||
// For each parent
|
||||
uint dfn;
|
||||
dfnIndex = index;
|
||||
uint parentSize = parentDfn.size();
|
||||
uint parentSize = (uint)parentDfn.size();
|
||||
for (dfn=0; dfn<parentSize; dfn++)
|
||||
{
|
||||
// Good element ?
|
||||
uint size = parentDfn[dfn]->Entries.size ();
|
||||
uint size = (uint)parentDfn[dfn]->Entries.size ();
|
||||
if (dfnIndex<size)
|
||||
return parentDfn[dfn];
|
||||
dfnIndex -= size;
|
||||
|
@ -724,7 +724,7 @@ bool CFormDfn::getEntryDfn (uint entry, UFormDfn **dfn)
|
|||
|
||||
bool CFormDfn::getEntryByName (const std::string &name, CFormDfn::CEntry **entry)
|
||||
{
|
||||
int entryIndex=Entries.size ()-1;
|
||||
int entryIndex=(int)Entries.size ()-1;
|
||||
while (entryIndex>=0)
|
||||
{
|
||||
CEntry *entryPtr=&Entries[entryIndex];
|
||||
|
@ -783,7 +783,7 @@ bool CFormDfn::getEntryType (uint entry, UType **type)
|
|||
|
||||
uint CFormDfn::getNumParents () const
|
||||
{
|
||||
return Parents.size ();
|
||||
return (uint)Parents.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -1153,7 +1153,7 @@ bool CFormElm::getInternalNodeByName (CForm *form, const char *name, const CForm
|
|||
|
||||
// The array pointer
|
||||
CFormElmArray *array = safe_cast<CFormElmArray*>(*node);
|
||||
uint oldSize = array->Elements.size ();
|
||||
uint oldSize = (uint)array->Elements.size ();
|
||||
array->Elements.resize (arrayIndex+1);
|
||||
|
||||
// Insert empty element
|
||||
|
@ -1358,7 +1358,7 @@ exit:;
|
|||
// Get the path name
|
||||
string formName;
|
||||
backupFirstElm->getFormName (formName);
|
||||
uint formNameSize = formName.size ();
|
||||
uint formNameSize = (uint)formName.size ();
|
||||
if ((formNameSize > 0) && (formName[formNameSize-1] != '.') && (formName[formNameSize-1] != '['))
|
||||
formName += ".";
|
||||
formName += name;
|
||||
|
@ -1712,7 +1712,7 @@ bool CFormElmStruct::isStruct () const
|
|||
|
||||
bool CFormElmStruct::getStructSize (uint &size) const
|
||||
{
|
||||
size = Elements.size();
|
||||
size = (uint)Elements.size();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2275,7 +2275,7 @@ bool CFormElmArray::isArray () const
|
|||
|
||||
bool CFormElmArray::getArraySize (uint &size) const
|
||||
{
|
||||
size = Elements.size ();
|
||||
size = (uint)Elements.size ();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ public:
|
|||
|
||||
// While the filename as a number
|
||||
sint i;
|
||||
for (i=filename.size ()-1; i>=0; i--)
|
||||
for (i=(sint)filename.size ()-1; i>=0; i--)
|
||||
{
|
||||
if ((filename[i]<'0') || (filename[i]>'9'))
|
||||
break;
|
||||
|
@ -575,7 +575,7 @@ bool CType::getValue (string &result, const CForm *form, const CFormElmAtom *nod
|
|||
{
|
||||
// Evaluate predefinition
|
||||
uint i;
|
||||
uint predefCount = Definitions.size ();
|
||||
uint predefCount = (uint)Definitions.size ();
|
||||
for (i=0; i<predefCount; i++)
|
||||
{
|
||||
// Ref on the value
|
||||
|
@ -596,7 +596,7 @@ bool CType::getValue (string &result, const CForm *form, const CFormElmAtom *nod
|
|||
{
|
||||
// Evaluate predefinition
|
||||
uint i;
|
||||
uint predefCount = Definitions.size ();
|
||||
uint predefCount = (uint)Definitions.size ();
|
||||
for (i=0; i<predefCount; i++)
|
||||
{
|
||||
// Ref on the value
|
||||
|
@ -647,7 +647,7 @@ bool CType::getValue (string &result, const CForm *form, const CFormElmAtom *nod
|
|||
{
|
||||
// Build a nice error output in warning
|
||||
char msg[512];
|
||||
buildError (msg, result.size ());
|
||||
buildError (msg, (uint)result.size ());
|
||||
warning (false, formName, form->getFilename ().c_str (), "getValue", "Missing closing quote\n%s\n%s", result.c_str (), msg);
|
||||
return false;
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ bool CType::getValue (string &result, const CForm *form, const CFormElmAtom *nod
|
|||
{
|
||||
// Build a nice error output in warning
|
||||
char msg[512];
|
||||
buildError (msg, result.size ());
|
||||
buildError (msg, (uint)result.size ());
|
||||
warning (false, formName, form->getFilename ().c_str (), "getValue", "Missing double quote\n%s\n%s", result.c_str (), msg);
|
||||
return false;
|
||||
}
|
||||
|
@ -757,7 +757,7 @@ bool CType::getValue (string &result, const CForm *form, const CFormElmAtom *nod
|
|||
{
|
||||
// Evaluate predefinition
|
||||
uint i;
|
||||
uint predefCount = Definitions.size ();
|
||||
uint predefCount = (uint)Definitions.size ();
|
||||
for (i=0; i<predefCount; i++)
|
||||
{
|
||||
// Ref on the value
|
||||
|
@ -877,7 +877,7 @@ const string &CType::getIncrement () const
|
|||
|
||||
uint CType::getNumDefinition () const
|
||||
{
|
||||
return Definitions.size ();
|
||||
return (uint)Definitions.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -53,7 +53,7 @@ void CLigoError::pushVertexError (TError code, uint id, uint edge)
|
|||
|
||||
uint CLigoError::numVertexError () const
|
||||
{
|
||||
return _VertexError.size ();
|
||||
return (uint)_VertexError.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -535,7 +535,7 @@ void CPrimPoint::write (xmlNodePtr xmlNode, const char *filename) const
|
|||
|
||||
uint CPrimPath::getNumVector () const
|
||||
{
|
||||
return VPoints.size ();
|
||||
return (uint)VPoints.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -608,7 +608,7 @@ void CPrimPath::write (xmlNodePtr xmlNode, const char *filename) const
|
|||
|
||||
uint CPrimZone::getNumVector () const
|
||||
{
|
||||
return VPoints.size ();
|
||||
return (uint)VPoints.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -916,7 +916,7 @@ float CPrimZone::getSegmentDist(const NLMISC::CVector v, const NLMISC::CVector &
|
|||
NLMISC::CVector CPrimZone::getBarycentre() const
|
||||
{
|
||||
CVector sum( CVector::Null );
|
||||
uint n = VPoints.size();
|
||||
uint n = (uint)VPoints.size();
|
||||
if ( n != 0 )
|
||||
{
|
||||
for ( uint i=0; i!=n; ++i )
|
||||
|
@ -1049,7 +1049,7 @@ void IPrimitive::serial (NLMISC::IStream &f)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint32 size = _Properties.size();
|
||||
uint32 size = (uint32)_Properties.size();
|
||||
f.serial(size);
|
||||
std::map<std::string, IProperty*>::iterator first(_Properties.begin()), last(_Properties.end());
|
||||
for (; first != last; ++first)
|
||||
|
@ -1100,7 +1100,7 @@ void IPrimitive::serial (NLMISC::IStream &f)
|
|||
void IPrimitive::updateChildId (uint index)
|
||||
{
|
||||
uint i;
|
||||
uint count = _Children.size ();
|
||||
uint count = (uint)_Children.size ();
|
||||
for (i=index; i<count; i++)
|
||||
_Children[i]->_ChildId = i;
|
||||
}
|
||||
|
@ -1598,7 +1598,7 @@ bool IPrimitive::insertChild (IPrimitive *primitive, uint index)
|
|||
{
|
||||
// At the end ?
|
||||
if (index == AtTheEnd)
|
||||
index = _Children.size ();
|
||||
index = (uint)_Children.size ();
|
||||
|
||||
// Index valid ?
|
||||
if (index>_Children.size ())
|
||||
|
@ -1854,7 +1854,7 @@ void IPrimitive::initDefaultValues (CLigoConfig &config)
|
|||
if (primitiveClass)
|
||||
{
|
||||
// For each properties
|
||||
uint count = primitiveClass->Parameters.size ();
|
||||
uint count = (uint)primitiveClass->Parameters.size ();
|
||||
uint i;
|
||||
for (i=0; i<count; i++)
|
||||
{
|
||||
|
@ -2018,7 +2018,7 @@ bool IPrimitive::getChildId (uint &childId, const IPrimitive *child) const
|
|||
|
||||
uint IPrimitive::getNumProperty () const
|
||||
{
|
||||
return _Properties.size ();
|
||||
return (uint)_Properties.size ();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
|
|
@ -93,14 +93,14 @@ bool CPrimitiveConfigurations::belong (const IPrimitive &primitive) const
|
|||
{
|
||||
// For each match group
|
||||
uint group;
|
||||
const uint numGroup = MatchPairs.size();
|
||||
const uint numGroup = (uint)MatchPairs.size();
|
||||
for (group=0; group<numGroup; group++)
|
||||
{
|
||||
const CMatchGroup &matchGroup = MatchPairs[group];
|
||||
|
||||
// For each rules
|
||||
uint rules;
|
||||
const uint numRules = matchGroup.Pairs.size();
|
||||
const uint numRules = (uint)matchGroup.Pairs.size();
|
||||
for (rules=0; rules<numRules; rules++)
|
||||
{
|
||||
const std::pair<std::string, std::string> &pairs = matchGroup.Pairs[rules];
|
||||
|
|
|
@ -53,7 +53,7 @@ bool CZoneEdge::build (const std::vector<NLMISC::CVector> &theEdge, const std::v
|
|||
}
|
||||
|
||||
// Check last position
|
||||
uint lastIndex = theEdge.size()-1;
|
||||
uint lastIndex = (uint)theEdge.size()-1;
|
||||
toCheck = CVector (theEdge[lastIndex].x, theEdge[lastIndex].y, 0);
|
||||
if (((toCheck-CVector (config.CellSize, 0, 0)).norm())>config.Snap)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
void invert (const CLigoConfig &config);
|
||||
|
||||
/// Return the vertex count
|
||||
uint getNumVertex () const { return _TheEdge.size(); }
|
||||
uint getNumVertex () const { return (uint)_TheEdge.size(); }
|
||||
|
||||
/// Return the vertex
|
||||
const NLMISC::CVector& getVertex (uint id) const { return _TheEdge[id]; }
|
||||
|
|
|
@ -104,7 +104,7 @@ bool CZoneTemplate::build (const std::vector<NLMISC::CVector> &vertices, const s
|
|||
vector<uint> boundaryFlags;
|
||||
|
||||
// Vertices count
|
||||
uint vertexCount = vertices.size();
|
||||
uint vertexCount = (uint)vertices.size();
|
||||
|
||||
// Resize the array
|
||||
boundaryFlags.resize (vertexCount, 0);
|
||||
|
@ -131,7 +131,7 @@ bool CZoneTemplate::build (const std::vector<NLMISC::CVector> &vertices, const s
|
|||
multimap<uint, uint> edgePairReverse;
|
||||
|
||||
// Index count
|
||||
uint edgeCount = indexes.size();
|
||||
uint edgeCount = (uint)indexes.size();
|
||||
|
||||
// For each vertices
|
||||
uint edge;
|
||||
|
|
|
@ -504,7 +504,7 @@ bool testNameWithFilter( sint8 filter, string motif, string varName )
|
|||
// *xxx
|
||||
case 1 :
|
||||
{
|
||||
sint beginIndex = varName.size() - motif.size() - 1;
|
||||
sint beginIndex = (sint)(varName.size() - motif.size() - 1);
|
||||
string endOfVarName = varName.substr(beginIndex,motif.size());
|
||||
if( endOfVarName == motif )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue