Index: trunk/src/engine/default_resource_manager.cc
===================================================================
--- trunk/src/engine/default_resource_manager.cc	(revision 528)
+++ trunk/src/engine/default_resource_manager.cc	(revision 529)
@@ -37,5 +37,5 @@
 	m_lua->register_enum( "RND_STEP_3",     static_cast<int>( random_dist::STEP_3 ) );
 	m_lua->register_enum( "RND_STEP_4",     static_cast<int>( random_dist::STEP_4 ) );
-	m_lua->register_enum( "RND_LINEAR",     static_cast<int>( random_dist::LINEAR ) );
+	m_lua->register_enum( "RND_MLINEAR",    static_cast<int>( random_dist::MLINEAR ) );
 	m_lua->register_enum( "RND_MGAUSSIAN",  static_cast<int>( random_dist::MGAUSSIAN ) );
 	m_lua->register_enum( "RND_MRGAUSSIAN", static_cast<int>( random_dist::MRGAUSSIAN ) );
Index: trunk/src/engine/model_manager.cc
===================================================================
--- trunk/src/engine/model_manager.cc	(revision 528)
+++ trunk/src/engine/model_manager.cc	(revision 529)
@@ -135,5 +135,5 @@
 	node->choice    = model_node_choice( table.get_unsigned( "choice", false ) );
 	node->chance    = table.get_float( "chance", 1.0f );
-	node->weight    = table.get_unsigned( "weight", 1 );
+	node->weight    = static_cast< uint16 >( table.get_unsigned( "weight", 1 ) );
 	node->mesh      = cmesh;
 	node->attach_id = attach_id;
Index: trunk/src/engine/particle_engine.cc
===================================================================
--- trunk/src/engine/particle_engine.cc	(revision 528)
+++ trunk/src/engine/particle_engine.cc	(revision 529)
@@ -454,11 +454,4 @@
 	uint32 ecount = info->data->emitter_count;
 	if ( ecount == 0 ) return;
-
-	bool local = model.is_identity();
-// 	if ( !local ) 
-// 	{
-// 		source = vec3( m_model_matrix[3] );
-// 		orient = mat3( m_model_matrix );
-// 	}
 
 	for ( uint32 i = 0; i < ecount; ++i )
Index: trunk/src/engine/resource_system.cc
===================================================================
--- trunk/src/engine/resource_system.cc	(revision 528)
+++ trunk/src/engine/resource_system.cc	(revision 529)
@@ -44,5 +44,5 @@
 		lua::table_guard sub_table( table, i + 1 );
 		string64 id = sub_table.get_string64( "id" );
-		NV_ASSERT( m_id_hash.find( id ) == m_id_hash.end(), "HASH COLLISION - ", id, " - ", m_id_hash[id] );
+		NV_ASSERT( m_id_hash.find( id ) == m_id_hash.end(), "HASH COLLISION" );
 		m_id_hash[id] = id;
 	}
Index: trunk/src/gfx/gfx_terminal.cc
===================================================================
--- trunk/src/gfx/gfx_terminal.cc	(revision 528)
+++ trunk/src/gfx/gfx_terminal.cc	(revision 529)
@@ -112,5 +112,5 @@
 };
 
-gfx_terminal::gfx_terminal( context* ctx, texture t, dimension tsize, dimension psize )
+gfx_terminal::gfx_terminal( context* ctx, texture t, dimension tsize, dimension /*psize*/ )
 	: terminal( tsize ), m_context( ctx )
 {
@@ -178,10 +178,10 @@
 }
 
-bool gfx_terminal::poll( io_event & kevent )
+bool gfx_terminal::poll( io_event & /*kevent*/ )
 {
 	return false;
 }
 
-void gfx_terminal::set_cursor( position p )
+void gfx_terminal::set_cursor( position /*p*/ )
 {
 }
Index: trunk/src/image/png_writer.cc
===================================================================
--- trunk/src/image/png_writer.cc	(revision 528)
+++ trunk/src/image/png_writer.cc	(revision 529)
@@ -47,9 +47,9 @@
 
 // initialize a callback-based context
-static void stbi__start_write_callbacks( stbi__write_context *s, stbi_write_func *c, void *context )
-{
-	s->func = c;
-	s->context = context;
-}
+// static void stbi__start_write_callbacks( stbi__write_context *s, stbi_write_func *c, void *context )
+// {
+// 	s->func = c;
+// 	s->context = context;
+// }
 
 typedef unsigned int stbiw_uint32;
@@ -65,4 +65,5 @@
 #define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
 
+/*
 static void stbiw__writefv( stbi__write_context *s, const char *fmt, va_list v )
 {
@@ -139,5 +140,5 @@
 			break;
 		}
-		/* FALLTHROUGH */
+		// FALLTHROUGH 
 	case 3:
 		stbiw__write3( s, d[1 - rgb_dir], d[1], d[1 + rgb_dir] );
@@ -188,5 +189,5 @@
 	}
 }
-
+*/
 
 static unsigned int stbiw__crc32( unsigned char *buffer, int len )
@@ -253,5 +254,5 @@
 }
 
-unsigned char * stbi_zlib_compress( unsigned char *data, int data_len, int *out_len, int quality )
+unsigned char * stbi_zlib_compress( unsigned char *data, int data_len, int *out_len, int /*quality*/ )
 {
 	unsigned long expected = nv::miniz_bound( data_len );
Index: trunk/src/lua/lua_area.cc
===================================================================
--- trunk/src/lua/lua_area.cc	(revision 528)
+++ trunk/src/lua/lua_area.cc	(revision 529)
@@ -285,5 +285,5 @@
 {
 	nv::rectangle* a = to_parea( L, 1 );
-	push_coord( L, a->ul - a->lr + nv::ivec2(1,1) );
+	push_coord( L, a->lr - a->ul + nv::ivec2(1,1) );
 	return 1;
 }
Index: trunk/src/lua/lua_math.cc
===================================================================
--- trunk/src/lua/lua_math.cc	(revision 528)
+++ trunk/src/lua/lua_math.cc	(revision 529)
@@ -138,4 +138,11 @@
 
 template< typename T >
+int nlua_vec_sign( lua_State* L )
+{
+	push_vec<T>( L, nv::math::sign( to_vec<T>( L, 1 ) ) );
+	return 1;
+}
+
+template< typename T >
 int nlua_vec_call( lua_State* L )
 {
@@ -324,4 +331,5 @@
 	static const struct luaL_Reg nlua_vec_f [] = {
 		{ "clone",          nlua_vec_clone<T> },
+		{ "sign",           nlua_vec_sign<T> },
 		{ "get",            nlua_vec_get<T> },
 		{ "tostring",       nlua_vec_tostring<T> },
Index: trunk/src/sdl/sdl_window_manager.cc
===================================================================
--- trunk/src/sdl/sdl_window_manager.cc	(revision 528)
+++ trunk/src/sdl/sdl_window_manager.cc	(revision 529)
@@ -42,5 +42,7 @@
 		char buffer[128];
 		sprintf( buffer, "%p", primal_window );
-		NV_ASSERT( SDL_SetHint( "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT", buffer ) == SDL_TRUE );
+		SDL_bool result = SDL_SetHint( "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT", buffer );
+		NV_UNUSED( result );
+		NV_ASSERT( result == SDL_TRUE, "SetHint failed!" );
 	}
 	primal_window = SDL_CreateWindowFrom( sys_w_handle );
