Index: trunk/src/lua/lua_map_tile.cc
===================================================================
--- trunk/src/lua/lua_map_tile.cc	(revision 319)
+++ trunk/src/lua/lua_map_tile.cc	(revision 323)
@@ -27,20 +27,20 @@
 
 
-bool nlua_is_map_tile( lua_State* L, int index )
-{
-	return luaL_testudata( L, index, NLUA_MAP_TILE_METATABLE ) != 0;
-}
-
-map_tile nlua_to_map_tile( lua_State* L, int index )
-{
-	return *(map_tile*)luaL_checkudata( L, index, NLUA_MAP_TILE_METATABLE );
-}
-
-map_tile* nlua_to_pmap_tile( lua_State* L, int index )
+// static bool nlua_is_map_tile( lua_State* L, int index )
+// {
+// 	return luaL_testudata( L, index, NLUA_MAP_TILE_METATABLE ) != 0;
+// }
+// 
+// static map_tile nlua_to_map_tile( lua_State* L, int index )
+// {
+// 	return *(map_tile*)luaL_checkudata( L, index, NLUA_MAP_TILE_METATABLE );
+// }
+
+static map_tile* nlua_to_pmap_tile( lua_State* L, int index )
 {
 	return (map_tile*)luaL_checkudata( L, index, NLUA_MAP_TILE_METATABLE );
 }
 
-void nlua_push_map_tile( lua_State* L, const map_tile& tile )
+static void nlua_push_map_tile( lua_State* L, const map_tile& tile )
 {
 	map_tile* result = (map_tile*)lua_newuserdata( L, sizeof(map_tile) );
@@ -79,5 +79,5 @@
 			if ( lua_isstring( L, -2 ) && lua_objlen( L, -2 ) == 1 )
 			{
-				translation[ lua_tostring( L, -2 )[0] ] = nv::uint8( map_area->string_to_id( lua_tostring( L, -1 ) ) );
+				translation[ (nv::uint8)( lua_tostring( L, -2 )[0] ) ] = nv::uint8( map_area->string_to_id( lua_tostring( L, -1 ) ) );
 			}
 			// removes 'value'; keeps 'key' for next iteration */
@@ -86,8 +86,8 @@
 	}
 
-	for ( int line = 0; line < tile.size_x; line++ )
-		for ( int row = 0; row < tile.size_y; row++ )
-		{
-			nv::char8 gylph = code[ row * ( tile.size_x + 1 ) + line ];
+	for ( nv::uint16 line = 0; line < tile.size_x; line++ )
+		for ( nv::uint16 row = 0; row < tile.size_y; row++ )
+		{
+			nv::char8 gylph = (nv::char8)code[ row * ( tile.size_x + 1 ) + line ];
 			// TODO: check for errors
 			tile.data[ row * tile.size_x + line ] = translation[ gylph ];
@@ -203,7 +203,7 @@
 	switch ( nv::random::get().urand( 4 ) )
 	{
-	case 1 : nlua_map_tile_flip_x( L );
-	case 2 : nlua_map_tile_flip_y( L );
-	case 3 : nlua_map_tile_flip_xy( L );
+	case 1 : nlua_map_tile_flip_x( L ); break;
+	case 2 : nlua_map_tile_flip_y( L ); break;
+	case 3 : nlua_map_tile_flip_xy( L ); break;
 	default:
 		break;
Index: trunk/src/lua/lua_nova.cc
===================================================================
--- trunk/src/lua/lua_nova.cc	(revision 319)
+++ trunk/src/lua/lua_nova.cc	(revision 323)
@@ -9,6 +9,6 @@
 #include "nv/lua/lua_raw.hh"
 
-const char* NV_STATE      = "NV_STATE";
-const char* NV_BLUEPRINTS = "NV_BLUEPRINTS";
+static const char* NV_STATE      = "NV_STATE";
+static const char* NV_BLUEPRINTS = "NV_BLUEPRINTS";
 
 // static nv::lua::state* nova_get_state( lua_State * L )
@@ -73,4 +73,5 @@
 			return true;
 		}
+		break;
 	case LUA_TSTRING :
 		if ( lua_type( L, ivalue ) != LUA_TTABLE )
@@ -86,4 +87,5 @@
 		lua_concat( L, 3 );
 		lua_call( L, 3, 0 );
+		break;
 	case LUA_TNUMBER :
 		if (lua_tointeger( L, itype ) != lua_type( L, ivalue ) && lua_tointeger( L, itype ) > 0)
@@ -91,5 +93,6 @@
 			luaL_error( L, "lua.nova - \"%s.%s\" - type mismatch, %s expected, %s found!", lua_tolstring( L, iid, 0 ), lua_tolstring( L, ifield, 0 ), lua_typename( L, lua_tointeger( L, itype ) ), lua_typename( L, lua_type( L, ivalue ) ) );
 		}
-
+		break;
+	default : return false;
 	}
 	return false;
@@ -784,5 +787,5 @@
 
 
-int luaopen_nova( lua_State * L )
+static int luaopen_nova( lua_State * L )
 {
 	lua_createtable( L, 0, 0 );
