Index: GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshSaver.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshSaver.h	(revision 1083)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshSaver.h	(revision 1136)
@@ -112,5 +112,5 @@
 			
 			//	Saves a Mesh into a file.
-			int	save(Mesh	*geoMesh,	const	char	*fileNameMesh);
+			size_t	save(Mesh	*geoMesh,	const	char	*fileNameMesh);
 
 			// temporal members used to tweak the lodtree leaf submesh
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp	(revision 1090)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp	(revision 1136)
@@ -439,10 +439,10 @@
 void LodStripsLibrary::LoadStripMesh(const LodStripsLibraryData *lodstripsdata, Mesh *geomesh)
 {
-	FILE															*fp;
+	//FILE															*fp;
 	SmallIntVector										strip_aux;
-	LODRegisterType										lod_register;
+	//LODRegisterType										lod_register;
 	std::vector			<LODRegisterType>	list_pos;
 	std::vector			<unsigned int>		p_changes;
-	int																value;
+	//int																value;
 	int																v			=	0;
 	int																t			=	-1;
@@ -450,5 +450,5 @@
 	int																next	=	0;
 	int																c			=	-1;
-	char															buff[80];
+	//char															buff[80];
 	Index															*index;
 	Index															*indexBegin;
@@ -578,5 +578,5 @@
 
 	mStripsSubmesh = new int [geomesh->mSubMeshCount];
-	for (int submesh = 0; submesh < geomesh->mSubMeshCount; submesh++)
+	for (size_t	submesh = 0; submesh < geomesh->mSubMeshCount; submesh++)
 	{	
 		mStripsSubmesh[submesh]=0;
@@ -612,21 +612,27 @@
 	dataRetrievalInterface->Begin();
 
-	int counter = 0;
-	int target_submesh = 0;
-	int strip_count = 0;
-
-	for (unsigned	int i=0; i<mTotalStrips; i++, strip_count++)
+	int			counter					=	0;
+	int			target_submesh	=	0;
+	size_t	strip_count			=	0;
+
+	for (unsigned	int	i	=	0;	i < mTotalStrips;	i++,	strip_count++)
 	{
 		if (strip_count >= mGeoMesh->mSubMesh[target_submesh].mStripCount)
 		{
 			indices_x_submesh[target_submesh] = counter;
+
 			if (target_submesh==0)
+			{
 				offsets_x_submesh[target_submesh] = 0;
+			}
 			else
+			{
 				offsets_x_submesh[target_submesh] = indices_x_submesh[target_submesh-1] + offsets_x_submesh[target_submesh-1];
-
-			counter = 0;
-			mStripsSubmesh[target_submesh] = strip_count;
-			strip_count = 0;
+			}
+
+			counter													=	0;
+			mStripsSubmesh[target_submesh]	=	(int)strip_count;
+			strip_count											=	0;
+
 			target_submesh++;
 		}
@@ -665,5 +671,5 @@
 
 		counter = 0;
-		mStripsSubmesh[target_submesh] = strip_count;
+		mStripsSubmesh[target_submesh] = (int)strip_count;
 		strip_count = 0;
 		target_submesh++;
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoTreeSimpSequence.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoTreeSimpSequence.cpp	(revision 1090)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoTreeSimpSequence.cpp	(revision 1136)
@@ -60,19 +60,22 @@
 void TreeSimplificationSequence::Save(Serializer &s)
 {
-	// Almacena la secuencia de simplificación en un fichero
-/*	char simp[256];
-
-	// Nombre del mesh
-	sprintf(simp,"%s\n",meshName);
-	s.WriteData(simp,sizeof(char),strlen(simp));
-*/
+	// Stores simplification sequence.
 	unsigned short chunkid = 0xdcba;
 	s.WriteData(&chunkid,sizeof(unsigned short),1);
-	unsigned long size = mSteps.size()*8*sizeof(int) + CHUNK_OVERHEAD_SIZE;
+
+	unsigned long size	=	(unsigned long)
+												(
+													mSteps.size()*8*sizeof(int)
+													+
+													CHUNK_OVERHEAD_SIZE
+												);
+
 	s.WriteData(&size,sizeof(unsigned long),1);
 
-	int tam = mSteps.size();
+	int tam = (int)mSteps.size();
+
 	s.WriteData(&tam,sizeof(int),1);
-	for(unsigned int i=0; i<tam; i++)
+
+	for(int i=0; i<tam; i++)
 	{
 		Geometry::TreeSimplificationSequence::Step paso = mSteps.operator [](i);
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp	(revision 1090)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp	(revision 1136)
@@ -17,13 +17,14 @@
 
 	// select the first triangle-list submesh as leaves submesh
-	mLeavesSubMesh = -1;
-	for (int i=0; i<treeGeoMesh->mSubMeshCount; i++)
+	mLeavesSubMesh	=	-1;
+
+	for (size_t	i	=	0;	i < treeGeoMesh->mSubMeshCount;	i++)
 	{
 		if (treeGeoMesh->mSubMesh[i].mType==GEO_TRIANGLE_LIST)
 		{
-			mLeavesSubMesh=i;
+			mLeavesSubMesh	=	(uint32)i;
 			break;
 		}
-	}	
+	}
 
 	// Cargar la copa del árbol
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshLoader.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshLoader.cpp	(revision 1098)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshLoader.cpp	(revision 1136)
@@ -49,9 +49,9 @@
 	unsigned	short		source;
 	GeometryElement		aux;
-	int								i;
+	size_t						i;
 	bool							found;
 	VertexElementType	vType;
 
-	i						=	0;
+	i			=	0;
 	found	=	false;
 
@@ -162,7 +162,7 @@
 	unsigned	short	vertexSize;
 	unsigned	short	headerID;
-	int							i;
-	float						aux;
-	int							k;
+	size_t					i;
+	//float						aux;
+	size_t					k;
 	bool						found;
 	float						x,y,z;
@@ -170,6 +170,6 @@
 	VertexBuffer		*vertex_buffer;
 
-	i						=	0;
-	k						=	0;
+	i			=	0;
+	k			=	0;
 	found	=	false;
 	
@@ -228,5 +228,5 @@
 		{
 			//	For each element in this source.
-			for(int j	=	0;	j < list[i].list.size();	j++)
+			for(size_t j	=	0;	j < list[i].list.size();	j++)
 			{
 				//	Positions.
@@ -466,5 +466,5 @@
 		unsigned int aux;
 
-		for (int i = 0; i < numIndices; i++)
+		for (size_t	i = 0; i < numIndices; i++)
 		{
 			fread(&aux,sizeof(unsigned int),1,f);
@@ -472,5 +472,5 @@
 			if (option == GEOMESH_BUILD)
 			{
-					geoSubMesh->mIndex[i]	=	aux;
+				geoSubMesh->mIndex[i]	=	aux;
 			}
 		}
@@ -480,5 +480,5 @@
 		unsigned short aux;
 
-		for (int i = 0; i < numIndices; i++)
+		for (size_t	i = 0; i < numIndices; i++)
 		{
 			fread(&aux,sizeof(unsigned short),1,f);
@@ -866,8 +866,7 @@
 	bool		head_found;
 	bool		tail_found;
-	int			strip_count;
-	int			tailIndex;
-	size_t	tail;
-
+	size_t	strip_count;
+	size_t	tailIndex;
+	//size_t	tail;
 
 	head_found							=	false;
@@ -877,5 +876,5 @@
 	//	Foreachone of the indices.
 	//	Obtains the number of triangle strips.
-	for (int i = 0; i < (geoSubMesh->mIndexCount - 1); i++)
+	for (size_t	i = 0; i < (geoSubMesh->mIndexCount - 1); i++)
 	{
 		if (geoSubMesh->mIndex[i] == geoSubMesh->mIndex[i+1])
@@ -906,13 +905,12 @@
 	}
 
-	geoSubMesh->mStrip		=	(Index**) malloc(	sizeof(Index*)
-			*
-			geoSubMesh->mStripCount);
+	geoSubMesh->mStrip	=	(Index**) malloc(	sizeof(Index*)
+												*
+												geoSubMesh->mStripCount);
 
 	//	Number of strips. Initially there is one triangle strip.
 	strip_count	=	1;
-
-	head_found						=	false;
-	tail_found						=	false;
+	head_found	=	false;
+	tail_found	=	false;
 
 	//	Initialize the fist triangle strip.
@@ -921,5 +919,5 @@
 	//	Foreachone of the indices.
 	//	Assigns the beginning of the triangle strips.
-	for(int i = 0;i < (geoSubMesh->mIndexCount - 1); i++)
+	for(size_t	i = 0;i < (geoSubMesh->mIndexCount - 1); i++)
 	{
 		if(geoSubMesh->mIndex[i] == geoSubMesh->mIndex[i+1])
@@ -991,8 +989,8 @@
 	
 	//	For each one of the strips.
-	for (int strip = 0; strip < geoSubMesh->mStripCount; strip++)
+	for (size_t	strip = 0; strip < geoSubMesh->mStripCount; strip++)
 	{
 		//	Stars of strip without degenerate triangles.
-		new_strip_starts[strip]	=	current_index;
+		new_strip_starts[strip]	=	(Index)current_index;
 		
 		//	First index of the strip.
@@ -1055,5 +1053,5 @@
 
 	//	Update start of the strip.
-	for (int	strip	=	0; strip < geoSubMesh->mStripCount; strip++)
+	for (size_t	strip	=	0; strip < geoSubMesh->mStripCount; strip++)
 	{
 		geoSubMesh->mStrip[strip]	=	&geoSubMesh->mIndex[new_strip_starts[strip]];
@@ -1074,5 +1072,4 @@
 	unsigned	short	chunkID;
 	char		version[255];
-	char		kk;
 	FILE		*pFile;
 	SubMesh		*geosubmesh;
@@ -1196,5 +1193,5 @@
 		if (!mError)
 		{
-			for (int submesh = 0;	submesh < geoMesh->mSubMeshCount; submesh++)
+			for (size_t	submesh = 0;	submesh < geoMesh->mSubMeshCount; submesh++)
 			{
 				//	Gets the actual submesh.
@@ -1238,5 +1235,4 @@
 void	GeoMeshLoader::normalizeModel(Mesh	*geoMesh)
 {
-	unsigned	int	i;
 	float					maxx, minx, maxy, miny, maxz, minz;
 	float					cx, cy, cz, w, h, d, max;
@@ -1253,5 +1249,5 @@
 	
 	//	For each submesh.
-	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
+	for (size_t	submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
 	{
 		//	Gets the actual submesh.
@@ -1259,5 +1255,5 @@
 
 		//	For each index of the strip.
-		for (int i = 0; i < vertex_buffer->mVertexCount; i++)
+		for (size_t	i = 0; i < vertex_buffer->mVertexCount; i++)
 		{
 			if (maxx < vertex_buffer->mPosition[i].x)
@@ -1305,7 +1301,7 @@
 
 	//	Calculate center of the model.
-	cx = (maxx + minx) / 2.0;
-	cy = (maxy + miny) / 2.0;
-	cz = (maxz + minz) / 2.0;
+	cx = (maxx + minx) / 2.0f;
+	cy = (maxy + miny) / 2.0f;
+	cz = (maxz + minz) / 2.0f;
 
 
@@ -1326,32 +1322,42 @@
 	
 	//	Calculate unitizing scale factor.
-	scale = 1.0 / max;
+	scale = 1.0f / max;
 
 	geoMesh->mMeshBounds.scaleFactor		=	scale;
 
 
-	bool *sharedmesh;
-	sharedmesh= new bool[geoMesh->mSubMeshCount];
-	bool firstsharedmesh= true;
-	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
+	bool	*sharedmesh;
+
+	sharedmesh	=	new bool[geoMesh->mSubMeshCount];
+
+	bool	firstsharedmesh	=	true;
+
+	for (size_t	submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
 	{
 		if (geoMesh->mSubMesh[submesh].mSharedVertexBuffer)
-			sharedmesh[submesh]= true;
+		{
+			sharedmesh[submesh]	=	true;
+		}
 		else
-			sharedmesh[submesh]= false;
+		{
+			sharedmesh[submesh]	=	false;
+		}
 	}
 
 	//	Translate around center then scale.
 	//	For each submesh.
-	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
-	{
-
+	for (size_t	submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
+	{
 		//	If is a shared vertex Buffer.
 		if (geoMesh->mSubMesh[submesh].mSharedVertexBuffer)
 		{
 			if (!firstsharedmesh)
+			{
 				continue;
+			}
 			else
-				firstsharedmesh= false;
+			{
+				firstsharedmesh	=	false;
+			}
 		}
 
@@ -1360,5 +1366,5 @@
 
 		//	For each index of the strip.
-		for (int i = 0; i < vertex_buffer->mVertexCount; i++)
+		for (size_t	i	=	0;	i < vertex_buffer->mVertexCount;	i++)
 		{
 			vertex_buffer->mPosition[i].x -= cx;
@@ -1369,5 +1375,4 @@
 			vertex_buffer->mPosition[i].z *= scale;
 		}
-
 	}
 
@@ -1388,6 +1393,6 @@
 GeoMeshLoader::GeoMeshLoader()
 {
-	geoMesh			=	NULL;
-	mFileSize		=	0;
+	geoMesh				=	NULL;
+	mFileSize			=	0;
 	lodstripsdata	=	NULL;
 	treesimpseq		=	NULL;
@@ -1400,9 +1405,17 @@
 {
 	if (geoMesh)
+	{
 		delete	geoMesh;
+	}
+
 	if (lodstripsdata)
+	{
 		delete lodstripsdata;
+	}
+
 	if (treesimpseq)
+	{
 		delete treesimpseq;
+	}
 }
 
@@ -1410,5 +1423,7 @@
 //	Read bones of the submesh.
 //---------------------------------------------------------------------------
-void GeoMeshLoader::readSubMeshBoneAssignment(FILE* f, SubMesh* geoSubMesh,int option)
+void GeoMeshLoader::readSubMeshBoneAssignment(FILE* f,
+																							SubMesh* geoSubMesh,
+																							int option)
 {
 	if (option == GEOMESH_BUILD)
@@ -1442,5 +1457,4 @@
 		// float weight
 		fread(&(assign.weight),sizeof(float),1,f);
-
 
 		geoMesh->mBones.push_back(assign);
@@ -1493,12 +1507,19 @@
 {
 public:
-	VertexArranger(Geometry::Mesh *m){
-		mesh=m;
-		current_submesh=0;
-		current_tris=new int[m->mSubMeshCount];
-		for (int i=0; i<m->mSubMeshCount; i++)
-			current_tris[i] = 0;
-	}
-	~VertexArranger(void){
+
+	VertexArranger(Geometry::Mesh *m)
+	{
+		mesh						=	m;
+		current_submesh	=	0;
+		current_tris		=	new int[m->mSubMeshCount];
+
+		for (size_t	i	=	0;	i < m->mSubMeshCount;	i++)
+		{
+			current_tris[i]	=	0;
+		}
+	}
+
+	~VertexArranger(void)
+	{
 		delete[] current_tris;
 	}
@@ -1517,5 +1538,5 @@
 		if (res==vertex_map.end())
 		{
-			int val = vertex_map.size();
+			int val = (int)vertex_map.size();
 			vertex_map[vertex1] = val;
 			submesh->mIndex[j*3+0] = val;
@@ -1527,5 +1548,5 @@
 		if (res==vertex_map.end())
 		{
-			int val = vertex_map.size();
+			int val = (int)vertex_map.size();
 			vertex_map[vertex2] = val;
 			submesh->mIndex[j*3+1] = val;
@@ -1537,17 +1558,25 @@
 		if (res==vertex_map.end())
 		{
-			int val = vertex_map.size();
+			int val = (int)vertex_map.size();
 			vertex_map[vertex3] = val;
 			submesh->mIndex[j*3+2] = val;
 		}
 		else
+		{
 			submesh->mIndex[j*3+2] = res->second;
+		}
 
 		current_tris[current_submesh] ++;
 	}
 
-	int GetVertexCount(void) const { return vertex_map.size(); }
-
-	void SetCurrentSubMesh(int i){ current_submesh = i; }
+	int GetVertexCount(void) const
+	{
+		return (int)vertex_map.size();
+	}
+
+	void SetCurrentSubMesh(int i)
+	{
+		current_submesh = i;
+	}
 	
 	class vertex_arranger_node
@@ -1605,8 +1634,10 @@
 			vertex_list[it->second] = it->first;
 
-		for (int i=0; i<mesh->mSubMeshCount; i++)
+		for (	size_t	i	=	0;	i < mesh->mSubMeshCount;	i++)
+		{
 			mesh->mSubMesh[i].mVertexBuffer = mesh->mVertexBuffer;
+		}
 		
-		for (int j=0; j<mesh->mVertexBuffer->mVertexCount; j++)
+		for (size_t	j	=	0;	j < mesh->mVertexBuffer->mVertexCount;	j++)
 		{		
 			int vi = vertex_list[j].v;
@@ -1615,15 +1646,42 @@
 
 			Geometry::Vector3 auxpos(vertices[vi]);
-			if (auxpos.x < mesh->mMeshBounds.minX) mesh->mMeshBounds.minX = auxpos.x;
-			if (auxpos.y < mesh->mMeshBounds.minY) mesh->mMeshBounds.minY = auxpos.y;
-			if (auxpos.z < mesh->mMeshBounds.minZ) mesh->mMeshBounds.minZ = auxpos.z;
-			if (auxpos.x > mesh->mMeshBounds.maxX) mesh->mMeshBounds.maxX = auxpos.x;
-			if (auxpos.y > mesh->mMeshBounds.maxY) mesh->mMeshBounds.maxY = auxpos.y;
-			if (auxpos.z > mesh->mMeshBounds.maxZ) mesh->mMeshBounds.maxZ = auxpos.z;
-
-			mesh->mVertexBuffer->mPosition[j] = auxpos;
-			mesh->mVertexBuffer->mNormal[j] = normals[ni];
-			if (texcoords.empty()==false)
-				mesh->mVertexBuffer->mTexCoords[j] = texcoords[ti];		
+
+			if (auxpos.x < mesh->mMeshBounds.minX)
+			{
+				mesh->mMeshBounds.minX = auxpos.x;
+			}
+
+			if (auxpos.y < mesh->mMeshBounds.minY)
+			{
+				mesh->mMeshBounds.minY = auxpos.y;
+			}
+
+			if (auxpos.z < mesh->mMeshBounds.minZ)
+			{
+				mesh->mMeshBounds.minZ = auxpos.z;
+			}
+
+			if (auxpos.x > mesh->mMeshBounds.maxX)
+			{
+				mesh->mMeshBounds.maxX = auxpos.x;
+			}
+
+			if (auxpos.y > mesh->mMeshBounds.maxY)
+			{
+				mesh->mMeshBounds.maxY = auxpos.y;
+			}
+
+			if (auxpos.z > mesh->mMeshBounds.maxZ)
+			{
+				mesh->mMeshBounds.maxZ = auxpos.z;
+			}
+
+			mesh->mVertexBuffer->mPosition[j]	=	auxpos;
+			mesh->mVertexBuffer->mNormal[j]		=	normals[ni];
+
+			if (texcoords.empty() == false)
+			{
+				mesh->mVertexBuffer->mTexCoords[j] = texcoords[ti];
+			}
 		}
 
@@ -1632,8 +1690,8 @@
 
 //private:
-	std::map<vertex_arranger_node,int> vertex_map;
-	Geometry::Mesh *mesh;
-	int current_submesh;
-	int *current_tris;
+	std::map<vertex_arranger_node,int>	vertex_map;
+	Geometry::Mesh											*mesh;
+	int																	current_submesh;
+	int																	*current_tris;
 };
 
@@ -1734,5 +1792,5 @@
 	{
 		// calculate face normals
-		for (int i=0, inormal=0; i<mesh->mSubMeshCount; i++)
+		for (size_t i=0, inormal=0; i<mesh->mSubMeshCount; i++)
 		{
 			Geometry::SubMesh *submesh = mesh->mSubMesh+i;
@@ -1742,7 +1800,9 @@
 			{
 				face_t & auxface = *it;
-				auxface.n1 = inormal;
-				auxface.n2 = inormal;
-				auxface.n3 = inormal;
+
+				auxface.n1 = (int)inormal;
+				auxface.n2 = (int)inormal;
+				auxface.n3 = (int)inormal;
+
 				Geometry::Vector3 v1,v2,v3,v31,v21,nor;
 				v1 = vertices[auxface.v1];
@@ -1763,5 +1823,5 @@
 		 
 	mesh->mSubMesh=new Geometry::SubMesh[mesh->mSubMeshCount];
-	for (int i=0; i<mesh->mSubMeshCount; i++)
+	for (size_t	i	=	0;	i < mesh->mSubMeshCount;	i++)
 	{
 		Geometry::SubMesh *submesh = mesh->mSubMesh+i;
@@ -1773,5 +1833,5 @@
 		submesh->mIndex=new Geometry::Index[submesh->mIndexCount];
 
-		vertex_arranger.SetCurrentSubMesh(i);
+		vertex_arranger.SetCurrentSubMesh((int)i);
 		
 		for (std::vector<face_t>::const_iterator it=vecfaces.begin(); it!=vecfaces.end(); it++,j++)
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp	(revision 1090)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp	(revision 1136)
@@ -612,13 +612,13 @@
 void LodStripsConstructor::Save(std::string filename)
 {
-	unsigned int	i, j;
-	int						k	=	0;
-	char					simp[256];
-
-	int vertexCount = this->cVerts.size();
-	int changesCount = this->cCambios.size();
-	int dataCount = this->cDatos.size();
-	int cambiosCount = this->TOTALCAMBIOS;
-	int size =	changesCount*sizeof(LODData) + 
+	//size_t	i, j;
+	int			k	=	0;
+	char		simp[256];
+
+	int vertexCount		=	(int)this->cVerts.size();
+	int changesCount	=	(int)this->cCambios.size();
+	int dataCount			=	(int)this->cDatos.size();
+	int cambiosCount	=	this->TOTALCAMBIOS;
+	int size					=	changesCount*sizeof(LODData) + 
 				(vertexCount + dataCount + cambiosCount + 4)*sizeof(int) +
 				CHUNK_OVERHEAD_SIZE;
@@ -631,5 +631,5 @@
 
 	fwrite(&vertexCount, sizeof(int), 1, f);
-	for(i = 0; i < this->cVerts.size(); i++)
+	for(size_t	i = 0; i < this->cVerts.size(); i++)
 	{
 		int auxv = cVerts[i].Next;
@@ -648,5 +648,5 @@
 	this->TOTALINDICES	=	0;
 	
-	for(i = 0; i < this->cStrips.size(); i++)
+	for(size_t	i = 0; i < this->cStrips.size(); i++)
 	{
 		this->TOTALINDICES += int(this->cStrips[i].size());
@@ -656,5 +656,5 @@
 	//	Changes
 	fwrite(&changesCount, sizeof(int), 1, f);
-	for(i = 0; i < this->cCambios.size(); i++)
+	for(size_t	i = 0; i < this->cCambios.size(); i++)
 	{
 		LODData change= cCambios[i];
@@ -682,5 +682,6 @@
 
 	fwrite(&dataCount, sizeof(int), 1, f);
-	for(i = 0; i < this->cDatos.size(); i++)
+
+	for(size_t	i = 0; i < this->cDatos.size(); i++)
 	{
 		int data= cDatos[i];
@@ -698,10 +699,10 @@
 	}
 */
-
 
 	//	lines starting with a p.
 	//	Chages made in a LOD.
 	fwrite(&cambiosCount, sizeof(int), 1, f);
-	for(i = 0; i < this->TOTALCAMBIOS; i++)
+
+	for(size_t	i = 0; i < this->TOTALCAMBIOS; i++)
 	{
 		int cambio= pCambios[i];
@@ -710,5 +711,4 @@
 
 	fclose(f);
-
 
 /*
@@ -1247,5 +1247,5 @@
 {
 	int num_no	=	0;
-	int i=0,j=0;
+	//int i=0,j=0;
 
 	if(this->mGeoMesh->mSubMesh[0].mSharedVertexBuffer == true)
@@ -1272,7 +1272,7 @@
 		this->mGeoMesh->mVertexBuffer->mVertexInfo		=	this->meshoriginal->mSubMesh[0].mVertexBuffer->mVertexInfo;
 
-		for(i = 0; i < this->mGeoMesh->mSubMeshCount; i++)
-		{
-			this->mGeoMesh->mSubMesh[i].mVertexBuffer				=	this->mGeoMesh->mVertexBuffer;
+		for(size_t	i = 0; i < this->mGeoMesh->mSubMeshCount; i++)
+		{
+			this->mGeoMesh->mSubMesh[i].mVertexBuffer	=	this->mGeoMesh->mVertexBuffer;
 			this->mGeoMesh->mSubMesh[i].mSharedVertexBuffer	=	true;
 		}
@@ -1280,5 +1280,5 @@
 		int	indice	=	0;
 
-		for (j = 0; j < this->cVerts.size(); j++)
+		for (size_t	j	=	0;	j < this->cVerts.size();	j++)
 		{
 			//Copiamos las coordeandas de posicion 
@@ -1335,6 +1335,7 @@
 		this->mGeoMesh->mSubMesh[0].mSharedVertexBuffer=false;
 
-		int indice=0;
-		for (j=0; j<this->cVerts.size(); j++)
+		int	indice	=	0;
+
+		for (size_t	j	=	0;	j < this->cVerts.size();	j++)
 		{
 			//Copiamos las coordeandas de posicion 
@@ -1362,8 +1363,7 @@
 	}
 	
-
-
 	int indice_acum = 0;
-	for(i=0;i<this->mGeoMesh->mSubMeshCount;i++)
+
+	for(size_t	i = 0;	i < this->mGeoMesh->mSubMeshCount;	i++)
 	{
 		Geometry::SubMesh & subMesh = meshoriginal->mSubMesh[i];
@@ -1435,4 +1435,3 @@
 		}
 	}
-
 }
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshSaver.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshSaver.cpp	(revision 1083)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshSaver.cpp	(revision 1136)
@@ -40,8 +40,9 @@
 //	Saves a Mesh into a file.
 //---------------------------------------------------------------------------
-int	GeoMeshSaver::save(Mesh	*geoMesh,	const	char	*fileNameMesh)
-{
-	int			size;
+size_t	GeoMeshSaver::save(Mesh	*geoMesh,	const	char	*fileNameMesh)
+{
+	size_t	size;
 	String	name(fileNameMesh);
+	SubMesh	*geosubmesh;
 
 	mGeoMesh	=	new Mesh();
@@ -64,37 +65,65 @@
 	unnormalizeModel(mGeoMesh);
 
-	if (leavesSubMesh>-1 && leavesVB)
-	{
-		Vector3 bmax(geoMesh->mMeshBounds.maxX,geoMesh->mMeshBounds.maxY,geoMesh->mMeshBounds.maxZ);
-		Vector3 bmin(geoMesh->mMeshBounds.minX,geoMesh->mMeshBounds.minY,geoMesh->mMeshBounds.minZ);
-		Vector3 center = (bmax+bmin)*0.5f;
-		float scale = geoMesh->mMeshBounds.scaleFactor;
-		
-		mGeoMesh->mSubMesh[leavesSubMesh].mSharedVertexBuffer=false;
-		mGeoMesh->mSubMesh[leavesSubMesh].mStripCount=0;
-		mGeoMesh->mSubMesh[leavesSubMesh].mIndexCount=numindices;
-		int icount = mGeoMesh->mSubMesh[leavesSubMesh].mIndexCount;
-		mGeoMesh->mSubMesh[leavesSubMesh].mIndex=new Index[icount];
-		for (int i=0; i<icount; i++)
-			mGeoMesh->mSubMesh[leavesSubMesh].mIndex[i]=indices[i];
-
-		mGeoMesh->mSubMesh[leavesSubMesh].mType=GEO_TRIANGLE_LIST;
-		mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer=new VertexBuffer();
-		mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mVertexInfo=VERTEX_POSITION;
-		mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mVertexCount=leavesVB->mVertexCount;;
-		int vcount = mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mVertexCount;
-		mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mPosition=new Vector3[vcount];
-		mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mNormal=new Vector3[vcount];
-		mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mTexCoords=new Vector2[vcount];
-		for (int i=0; i<vcount; i++)
+	if ((leavesSubMesh > -1) && leavesVB)
+	{
+		//	Gets the leaves submesh.
+		geosubmesh	=	&mGeoMesh->mSubMesh[leavesSubMesh];
+		
+		Vector3 bmax(	geoMesh->mMeshBounds.maxX,
+									geoMesh->mMeshBounds.maxY,
+									geoMesh->mMeshBounds.maxZ);
+		
+		Vector3	bmin(	geoMesh->mMeshBounds.minX,
+									geoMesh->mMeshBounds.minY,
+									geoMesh->mMeshBounds.minZ);
+		
+		Vector3 center = (bmax + bmin) * 0.5f;
+		
+		float	scale	=	geoMesh->mMeshBounds.scaleFactor;
+		
+		geosubmesh->mSharedVertexBuffer	=	false;
+		geosubmesh->mStripCount					=	0;
+		geosubmesh->mIndexCount					=	numindices;
+		
+		size_t	icount	=	geosubmesh->mIndexCount;
+		
+		geosubmesh->mIndex	=	new Index[icount];
+		
+		for (size_t	i	=	0;	i < icount;	i++)
 		{
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mPosition[i].x = leavesVB->mPosition[i].x / scale + center.x;
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mPosition[i].y = leavesVB->mPosition[i].y / scale + center.y;
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mPosition[i].z = leavesVB->mPosition[i].z / scale + center.z;
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mNormal[i].x = leavesVB->mNormal[i].x;
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mNormal[i].y = leavesVB->mNormal[i].y;
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mNormal[i].z = leavesVB->mNormal[i].z;
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mTexCoords[i].x = leavesVB->mTexCoords[i].x;
-			mGeoMesh->mSubMesh[leavesSubMesh].mVertexBuffer->mTexCoords[i].y = leavesVB->mTexCoords[i].y;
+			geosubmesh->mIndex[i]	=	indices[i];
+		}
+
+		geosubmesh->mType					=	GEO_TRIANGLE_LIST;
+		geosubmesh->mVertexBuffer	=	new VertexBuffer();
+		geosubmesh->mVertexBuffer->mVertexInfo
+																										=	VERTEX_POSITION;
+		
+		geosubmesh->mVertexBuffer->mVertexCount
+																										=	leavesVB->mVertexCount;
+		
+		size_t	vcount;
+			
+		vcount = geosubmesh->mVertexBuffer->mVertexCount;
+		
+		geosubmesh->mVertexBuffer->mPosition
+																										=	new Vector3[vcount];
+		
+		geosubmesh->mVertexBuffer->mNormal
+																										=	new Vector3[vcount];
+		
+		geosubmesh->mVertexBuffer->mTexCoords
+																										=	new Vector2[vcount];
+		
+		for (size_t	i	=	0;	i < vcount;	i++)
+		{
+			geosubmesh->mVertexBuffer->mPosition[i].x = leavesVB->mPosition[i].x / scale + center.x;
+			geosubmesh->mVertexBuffer->mPosition[i].y = leavesVB->mPosition[i].y / scale + center.y;
+			geosubmesh->mVertexBuffer->mPosition[i].z = leavesVB->mPosition[i].z / scale + center.z;
+			geosubmesh->mVertexBuffer->mNormal[i].x = leavesVB->mNormal[i].x;
+			geosubmesh->mVertexBuffer->mNormal[i].y = leavesVB->mNormal[i].y;
+			geosubmesh->mVertexBuffer->mNormal[i].z = leavesVB->mNormal[i].z;
+			geosubmesh->mVertexBuffer->mTexCoords[i].x = leavesVB->mTexCoords[i].x;
+			geosubmesh->mVertexBuffer->mTexCoords[i].y = leavesVB->mTexCoords[i].y;
 		}
 	}
@@ -126,5 +155,5 @@
 {
 	// Header
-	writeChunkHeader(M_MESH, calcMeshSize(geoMesh));
+	writeChunkHeader(M_MESH, (unsigned long)calcMeshSize(geoMesh));
 
 	//	Debug.
@@ -142,5 +171,5 @@
 
 	//	Write submeshes.
-	for (int i = 0;	i < geoMesh->mSubMeshCount;	i++)
+	for (size_t i = 0;	i < geoMesh->mSubMeshCount;	i++)
 	{
 		writeSubMesh(&geoMesh->mSubMesh[i]);
@@ -157,5 +186,5 @@
 		{
 
-			for (int i = 0; i< geoMesh->mBones.size(); i++)
+			for (size_t i = 0; i< geoMesh->mBones.size(); i++)
 			{
 				writeMeshBoneAssignment(geoMesh->mBones[i]);
@@ -201,11 +230,11 @@
 {
 	bool						idx32bit;
-	unsigned	long	indexCount;
-	Index						*index;
-	Index						*indexBegin;
-	Index						*indexEnd;
+	size_t					indexCount;
+	//Index						*index;
+	//Index						*indexBegin;
+	//Index						*indexEnd;
 
 	// Header.
-	writeChunkHeader(M_SUBMESH, calcSubMeshSize(geoSubMesh));
+	writeChunkHeader(M_SUBMESH, (unsigned long)calcSubMeshSize(geoSubMesh));
 
 	//	Debug.
@@ -233,5 +262,5 @@
 	
 	//	Write index count.
-	writeInts(indexCount, 1);
+	writeInts((unsigned long)indexCount, 1);
 
 	// bool indexes32Bit
@@ -291,5 +320,5 @@
 	*/
 		//	Write the index array.
-		for (int i = 0; i < geoSubMesh->mIndexCount; i++)
+		for (size_t i = 0; i < geoSubMesh->mIndexCount; i++)
 		{
 			writeInts(geoSubMesh->mIndex[i], 1);
@@ -309,5 +338,5 @@
 	if (!geoSubMesh->mBones.empty())
 	{
-		for (int i = 0; i < geoSubMesh->mBones.size(); i++)
+		for (size_t i = 0; i < geoSubMesh->mBones.size(); i++)
 		{
 			writeSubMeshBoneAssignment(geoSubMesh->mBones[i]);
@@ -355,5 +384,5 @@
 	
 	//	Calculate the size in bytes of the geometry chunk.
-	size	=	calcGeometrySize(vertexBuffer);
+	size	=	(unsigned long)calcGeometrySize(vertexBuffer);
 		
 	//	Header.
@@ -366,5 +395,5 @@
 				<<	endl;
 
-	writeInts(vertexBuffer->mVertexCount,1);
+	writeInts((unsigned long)vertexBuffer->mVertexCount,1);
 
 	//	Vertex declaration.
@@ -561,5 +590,5 @@
 					(sizeof(float)	*	7);
 
-	writeChunkHeader(M_MESH_BOUNDS,	size);
+	writeChunkHeader(M_MESH_BOUNDS,	(unsigned long)size);
 
 	//	Debug.
@@ -687,7 +716,7 @@
 
 	//	Debug.
-	cout	<<	"Length Skeleton Link: "
-				<<	strlen(geoMesh->mSkeletonName)
-				<<	endl;
+	//cout	<<	"Length Skeleton Link: "
+	//			<<	strlen(geoMesh->mSkeletonName)
+	//			<<	endl;
 
 	return	size;
@@ -749,5 +778,6 @@
 void GeoMeshSaver::writeSkeletonLink(const String& skelName)
 {	
-	writeChunkHeader(M_MESH_SKELETON_LINK, calcSkeletonLinkSize(mGeoMesh));
+	writeChunkHeader(	M_MESH_SKELETON_LINK, 
+										(unsigned long)calcSkeletonLinkSize(mGeoMesh));
 
 	//	Debug.
@@ -755,5 +785,5 @@
 				<<	endl;
 
-    writeString(skelName);
+	writeString(skelName);
 }
 
@@ -762,5 +792,5 @@
 	size_t size = CHUNK_OVERHEAD_SIZE + sizeof(unsigned int) + sizeof(unsigned short)+ sizeof(float);
 
-	writeChunkHeader(M_MESH_BONE_ASSIGNMENT, size);
+	writeChunkHeader(M_MESH_BONE_ASSIGNMENT, (unsigned long)size);
 
 	// unsigned int vertexIndex;
@@ -776,5 +806,5 @@
 	size_t size = CHUNK_OVERHEAD_SIZE + sizeof(unsigned int) + sizeof(unsigned short)+ sizeof(float);
 
-	writeChunkHeader(M_SUBMESH_BONE_ASSIGNMENT, size);
+	writeChunkHeader(M_SUBMESH_BONE_ASSIGNMENT, (unsigned long)size);
 
 	// unsigned int vertexIndex;
@@ -811,14 +841,14 @@
 	
 	//	Calculate center of the model.
-	cx = (maxx + minx) / 2.0;
-	cy = (maxy + miny) / 2.0;
-	cz = (maxz + minz) / 2.0;
+	cx = (maxx + minx) / 2.0f;
+	cy = (maxy + miny) / 2.0f;
+	cz = (maxz + minz) / 2.0f;
 
 	//	Translate around center then scale.
 	//	For each submesh.
 
-	bool sharedScaled=false;
-
-	for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
+	bool sharedScaled	=	false;
+
+	for (size_t submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++)
 	{
 		//	Gets the actual submesh.
@@ -826,8 +856,10 @@
 
 		if (geoMesh->mSubMesh[submesh].mSharedVertexBuffer && sharedScaled)
+		{
 			continue;
+		}
 			
 		//	For each index of the strip.
-		for (int i = 0; i < vertex_buffer->mVertexCount; i++)
+		for (size_t i = 0; i < vertex_buffer->mVertexCount; i++)
 		{
 			vertex_buffer->mPosition[i].x /= scale;
@@ -841,6 +873,7 @@
 		//	If is a shared vertex Buffer.
 		if (geoMesh->mSubMesh[submesh].mSharedVertexBuffer)
-			sharedScaled=true;
-	}
-}
-
+		{
+			sharedScaled	=	true;
+		}
+	}
+}
