Index: trunk/src/gfx/image.cc
===================================================================
--- trunk/src/gfx/image.cc	(revision 320)
+++ trunk/src/gfx/image.cc	(revision 323)
@@ -89,18 +89,20 @@
 	fill( r, 255 );
 
-	sint32 bpos       = (r.pos.y*m_size.x + r.pos.x ) * static_cast<sint32>( m_depth );
-	sint32 bline      = m_size.x*static_cast<sint32>( m_depth );
+	uint32 bpos       = static_cast< uint32 >( r.pos.y*m_size.x + r.pos.x ) * m_depth;
+	uint32 bline      = static_cast< uint32 >( m_size.x ) * m_depth;
 
+	uint32 rsizex     = static_cast< uint32 >( r.size.x );
+	uint32 rsizey     = static_cast< uint32 >( r.size.y );
 	const uint8* data = idata->get_data();
-	sint32 depth      = idata->get_depth();
-	sint32 dstride    = r.size.x * static_cast<sint32>( depth );
+	size_t depth      = idata->get_depth();
+	uint32 dstride    = rsizex * depth;
 
-	for( int y = 0; y < r.size.y; ++y )
+	for( uint32 y = 0; y < rsizey; ++y )
 	{
-		sint32 pos = bpos + bline * y;
-		for( int x = 0; x < r.size.x; ++x )
+		uint32 pos = bpos + bline * y;
+		for( uint32 x = 0; x < rsizex; ++x )
 		{
-			sint32 xy = pos + x * m_depth;
-			for( int e = 0; e < depth; ++e )
+			uint32 xy = pos + x * m_depth;
+			for( size_t e = 0; e < depth; ++e )
 			{
 				m_data[ xy + e ] = data[ y*dstride + x * depth + e ];
Index: trunk/src/gfx/mesh_creator.cc
===================================================================
--- trunk/src/gfx/mesh_creator.cc	(revision 320)
+++ trunk/src/gfx/mesh_creator.cc	(revision 323)
@@ -128,5 +128,5 @@
 		const vertex_descriptor& desc   = channel->desc;
 		uint8* raw_data = channel->data;
-		int vtx_size = desc.size;
+		uint32 vtx_size = desc.size;
 		int p_offset = -1;
 		int n_offset = -1;
@@ -135,7 +135,7 @@
 			switch ( desc.slots[i].vslot )
 			{
-				case slot::POSITION : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) p_offset = desc.slots[i].offset; break;
-				case slot::NORMAL   : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) n_offset = desc.slots[i].offset; break;
-				case slot::TANGENT  : if ( desc.slots[i].etype == FLOAT_VECTOR_4 ) t_offset = desc.slots[i].offset; break;
+				case slot::POSITION : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) p_offset = (int)desc.slots[i].offset; break;
+				case slot::NORMAL   : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) n_offset = (int)desc.slots[i].offset; break;
+				case slot::TANGENT  : if ( desc.slots[i].etype == FLOAT_VECTOR_4 ) t_offset = (int)desc.slots[i].offset; break;
 				default             : break;
 			}
@@ -173,5 +173,5 @@
 	size_t n_offset = 0;
 	if ( ch_n == -1 ) return;
-	mesh_raw_channel* channel = m_data->m_channels[ch_n];
+	mesh_raw_channel* channel = m_data->m_channels[ (unsigned) ch_n ];
 	for ( uint32 i = 0; i < channel->desc.count; ++i )
 		if ( channel->desc.slots[i].vslot == slot::NORMAL )
@@ -211,5 +211,5 @@
 				if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) 
 				{
-					p_offset  = desc.slots[i].offset; 
+					p_offset  = (int)desc.slots[i].offset; 
 					p_channel = channel;
 				}
@@ -217,5 +217,5 @@
 			case slot::NORMAL   : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) 
 				{
-					n_offset  = desc.slots[i].offset; 
+					n_offset  = (int)desc.slots[i].offset; 
 					n_channel = m_data->m_channels[ c ];
 					n_channel_index = c;
@@ -224,5 +224,5 @@
 			case slot::TEXCOORD : if ( desc.slots[i].etype == FLOAT_VECTOR_2 ) 
 				{
-					t_offset  = desc.slots[i].offset; 
+					t_offset  = (int)desc.slots[i].offset; 
 					t_channel = channel;
 				}
@@ -420,8 +420,8 @@
 	int och_ti = other->get_channel_index( slot::TEXCOORD );
 	if ( ch_pi == -1 || ch_ti == -1 ) return;
-	size_t size   = m_data->m_channels[ ch_ti ]->count;
-	size_t osize  =  other->m_channels[ och_ti ]->count;
-	size_t count  = m_data->m_channels[ ch_pi ]->count;
-	size_t ocount =  other->m_channels[ och_pi ]->count;
+	size_t size   = m_data->m_channels[ (unsigned)ch_ti ]->count;
+	size_t osize  =  other->m_channels[ (unsigned)och_ti ]->count;
+	size_t count  = m_data->m_channels[ (unsigned)ch_pi ]->count;
+	size_t ocount =  other->m_channels[ (unsigned)och_pi ]->count;
 	if ( count % size != 0 || ocount % osize != 0 ) return;
 	if ( count / size != ocount / osize ) return;
Index: trunk/src/gfx/skeletal_mesh.cc
===================================================================
--- trunk/src/gfx/skeletal_mesh.cc	(revision 320)
+++ trunk/src/gfx/skeletal_mesh.cc	(revision 323)
@@ -53,6 +53,6 @@
 				for ( size_t j = 0; j < 4; ++j )
 				{
-					int   index  = vert.boneindex[j];
-					float weight = vert.boneweight[j];
+					unsigned index = (unsigned)vert.boneindex[j];
+					float weight   = vert.boneweight[j];
 					const quat& orient      = m_transform[index].get_orientation();
 					const transform& offset = m_pos_offset[index];
@@ -152,5 +152,5 @@
 		if ( bi != bone_names.end() )
 		{
-			bone_id = bi->second;
+			bone_id = (sint16)bi->second;
 		}
 		m_bone_ids[n] = bone_id;
