Index: trunk/src/formats/assimp_loader.cc
===================================================================
--- trunk/src/formats/assimp_loader.cc	(revision 319)
+++ trunk/src/formats/assimp_loader.cc	(revision 323)
@@ -14,5 +14,5 @@
 using namespace nv;
 
-const int MAX_BONES = 64;
+const unsigned MAX_BONES = 64;
 
 struct assimp_plain_vtx 
@@ -90,5 +90,5 @@
 	m_mesh_count = 0;
 	NV_LOG( nv::LOG_NOTICE, "AssImp loading file..." );
-	int size = (int)source.size();
+	size_t size = source.size();
 	char* data  = new char[ size ];
 	source.read( data, size, 1 );
@@ -159,5 +159,5 @@
 					if ( v.boneweight[i] <= 0.0f ) 
 					{
-						v.boneindex[i] = m;
+						v.boneindex[i]  = (int)m;
 						v.boneweight[i] = bone->mWeights[w].mWeight;
 						found = true;
@@ -289,5 +289,5 @@
 	for ( unsigned int m = 0; m < m_mesh_count; ++m )
 	{
-		sint16 translate[MAX_BONES];
+		uint16 translate[MAX_BONES];
 		std::vector< mesh_node_data > bones;
 		const aiMesh*  mesh  = scene->mMeshes[ m ];
@@ -304,5 +304,5 @@
 				{
 					NV_ASSERT( final_bones.size() < MAX_BONES, "Too many bones to merge!" );
-					sint16 index = (sint16)final_bones.size();
+					uint16 index = (uint16)final_bones.size();
 					final_bones.push_back( bone );
 					names[ bone.name ] = index;
@@ -311,5 +311,5 @@
 				else
 				{
-					translate[b] = (sint16)iname->second;
+					translate[b] = iname->second;
 				}
 			}
@@ -326,5 +326,5 @@
 						if ( vertex.boneweight[i] > 0.0f ) 
 						{
-							vertex.boneindex[i] = translate[vertex.boneindex[i]];
+							vertex.boneindex[i] = (int)translate[vertex.boneindex[i]];
 						}
 					}
Index: trunk/src/formats/md3_loader.cc
===================================================================
--- trunk/src/formats/md3_loader.cc	(revision 319)
+++ trunk/src/formats/md3_loader.cc	(revision 323)
@@ -234,5 +234,5 @@
 
 md3_loader::md3_loader( bool merge_all )
-	: m_md3( nullptr ), m_merge_all( merge_all )
+	: m_merge_all( merge_all ), m_md3( nullptr )
 {
 	if ( !s_normal_ready )
@@ -286,5 +286,5 @@
 {
 	md3_t* md3 = (md3_t*)m_md3;
-	key_raw_channel* result = key_raw_channel::create<md3_key>( md3->header.num_frames );
+	key_raw_channel* result = key_raw_channel::create<md3_key>( (uint32)md3->header.num_frames );
 	// TODO: is this brain damaged in efficiency (loop nest order) or what?
 	for ( sint32 f = 0; f < md3->header.num_frames; ++f )
@@ -322,5 +322,5 @@
 {
 	mesh_data* data = new mesh_data;
-	release_mesh_frame( data, -1, index );
+	release_mesh_frame( data, -1, (sint32)index );
 	return data;
 }
@@ -329,22 +329,22 @@
 {
 	md3_t* md3 = (md3_t*)m_md3;
-	sint32 num_surfaces  = md3->header.num_surfaces;
-	sint32 num_verts     = 0;
-	sint32 current_frame = ( frame == -1 ? 0 : frame );
-	sint32 frame_count   = ( frame == -1 ? md3->header.num_frames : 1 );
-	sint32 current_surf  = ( surface == -1 ? 0 : surface );
-	sint32 surf_count    = ( surface == -1 ? md3->header.num_surfaces : 1 );
-	sint32 index_count   = 0;
+	uint32 num_surfaces  = (uint32)md3->header.num_surfaces;
+	uint32 num_verts     = 0;
+	uint32 current_frame = ( frame == -1 ? 0 : (uint32)frame );
+	uint32 frame_count   = ( frame == -1 ? (uint32)md3->header.num_frames : 1 );
+	uint32 current_surf  = ( surface == -1 ? 0 : (uint32)surface );
+	uint32 surf_count    = ( surface == -1 ? (uint32)md3->header.num_surfaces : 1 );
+	uint32 index_count   = 0;
 
 	if ( surface >= 0 )
 	{
-		index_count = md3->surfaces[surface].header.num_triangles * 3;
-		num_verts   = md3->surfaces[surface].header.num_verts;
+		index_count = (uint32)md3->surfaces[(uint32)surface].header.num_triangles * 3;
+		num_verts   = (uint32)md3->surfaces[(uint32)surface].header.num_verts;
 	}
 	else
-		for ( sint32 i = 0; i < num_surfaces; ++i )
-		{
-			index_count += md3->surfaces[i].header.num_triangles * 3;
-			num_verts   += md3->surfaces[i].header.num_verts;
+		for ( uint32 i = 0; i < num_surfaces; ++i )
+		{
+			index_count += (uint32)md3->surfaces[i].header.num_triangles * 3;
+			num_verts   += (uint32)md3->surfaces[i].header.num_verts;
 		}
 
@@ -362,21 +362,21 @@
 	while ( surf_count > 0 )
 	{
-		const md3_surface_t& surface = md3->surfaces[ current_surf ];
-		const uint32         vcount  = static_cast< uint32 >( surface.header.num_verts );
-		const uint32         tcount  = static_cast< uint32 >( surface.header.num_triangles );
+		const md3_surface_t& sface  = md3->surfaces[ current_surf ];
+		const uint32         vcount = static_cast< uint32 >( sface.header.num_verts );
+		const uint32         tcount = static_cast< uint32 >( sface.header.num_triangles );
 
 		for (uint32 j = 0; j < vcount; ++j )
 		{
-			vtx_t[index++].texcoord = md3_texcoord( surface.st[j] );
+			vtx_t[index++].texcoord = md3_texcoord( sface.st[j] );
 		}
 
 		for (size_t j = 0; j < tcount; ++j )
 		{
-			const md3_triangle_t& t = surface.triangles[j];
+			const md3_triangle_t& t = sface.triangles[j];
 			icp[iindex++] = static_cast< uint16 >( index_base + t.indexes[0] );
 			icp[iindex++] = static_cast< uint16 >( index_base + t.indexes[1] );
 			icp[iindex++] = static_cast< uint16 >( index_base + t.indexes[2] );
 		}
-		index_base += surface.header.num_verts;
+		index_base += sface.header.num_verts;
 		++current_surf;
 		--surf_count;
@@ -386,16 +386,16 @@
 	while ( frame_count > 0 )
 	{
-		current_surf  = ( surface == -1 ? 0 : surface );
-		surf_count    = ( surface == -1 ? md3->header.num_surfaces : 1 );
+		current_surf  = ( surface == -1 ? 0 : (uint32)surface );
+		surf_count    = ( surface == -1 ? (uint32)md3->header.num_surfaces : 1 );
 
 		while ( surf_count > 0 )
 		{
-			md3_surface_t& surface = md3->surfaces[current_surf];
-			sint32         vcount  = surface.header.num_verts;
-			sint32         offset  = vcount * current_frame;
-			sint32         limit   = vcount + offset;
-			for (sint32 j = offset; j < limit; ++j )
+			md3_surface_t& sface  = md3->surfaces[current_surf];
+			uint32         vcount = (uint32)sface.header.num_verts;
+			uint32         offset = vcount * current_frame;
+			uint32         limit  = vcount + offset;
+			for (uint32 j = offset; j < limit; ++j )
 			{
-				md3_vertex_t& v = surface.vertices[j];
+				md3_vertex_t& v = sface.vertices[j];
 				vtx_pn[index].position = vec3( v.x * MD3_XYZ_SCALE, v.z * MD3_XYZ_SCALE, v.y * MD3_XYZ_SCALE );
 				vtx_pn[index].normal   = s_normal_cache[ v.normal ];
@@ -418,5 +418,5 @@
 {
 	md3_t* md3 = (md3_t*)m_md3;
-	uint32 node_count = md3->header.num_tags;
+	uint32 node_count = (uint32)md3->header.num_tags;
 	if ( node_count == 0 ) return nullptr;;
 	mesh_node_data* nodes = new mesh_node_data[ node_count ];
@@ -451,9 +451,9 @@
 	else
 	{
-		count = md3->header.num_surfaces;
+		count = (uint32)md3->header.num_surfaces;
 		data = new mesh_data[ count ];
 		for ( uint32 i = 0; i < count; ++i )
 		{
-			release_mesh_frame( &data[i], -1, i );
+			release_mesh_frame( &data[i], -1, (sint32)i );
 			data[i].set_name( (char*)md3->surfaces[i].header.name );
 		}
Index: trunk/src/formats/md5_loader.cc
===================================================================
--- trunk/src/formats/md5_loader.cc	(revision 319)
+++ trunk/src/formats/md5_loader.cc	(revision 323)
@@ -135,7 +135,7 @@
 			mesh_data* mesh = new mesh_data("md5_mesh");
 
-			int num_verts   = 0;
-			int num_tris    = 0;
-			int num_weights = 0;
+			uint32 num_verts   = 0;
+			uint32 num_tris    = 0;
+			uint32 num_weights = 0;
 
 			discard( sstream, "{" );
@@ -170,5 +170,5 @@
 					next_line( sstream );
 					std::string line;
-					for ( int i = 0; i < num_verts; ++i )
+					for ( uint32 i = 0; i < num_verts; ++i )
 					{
 						size_t weight_count;
@@ -194,5 +194,5 @@
 					next_line( sstream );
 					std::string line;
-					for ( int i = 0; i < num_tris; ++i )
+					for ( uint32 i = 0; i < num_tris; ++i )
 					{
 						size_t ti0;
@@ -214,5 +214,5 @@
 					next_line( sstream );
 					std::string line;
-					for ( int i = 0; i < num_weights; ++i )
+					for ( uint32 i = 0; i < num_weights; ++i )
 					{
 						md5_weight weight;
@@ -368,5 +368,5 @@
 			if ( j < weight_count )
 			{
-				vdata.boneindex[j]  = weights[start_weight + j].joint_id;
+				vdata.boneindex[j]  = (int)weights[start_weight + j].joint_id;
 				vdata.boneweight[j] = weights[start_weight + j].bias;
 			}
Index: trunk/src/formats/nmd_loader.cc
===================================================================
--- trunk/src/formats/nmd_loader.cc	(revision 319)
+++ trunk/src/formats/nmd_loader.cc	(revision 323)
@@ -242,5 +242,5 @@
 
 		nmd_node_header nheader;
-		nheader.parent_id = (uint16)node->parent_id;
+		nheader.parent_id = node->parent_id;
 		nheader.transform = node->transform;
 		stream_out.write( &nheader, sizeof( nheader ), 1 );
