assorted crap
[carveJwlIkooP6JGAAIwe30JlM.git] / model.h
diff --git a/model.h b/model.h
index ca7c0b1d5f73d95c1a913fd5857fa552b9eb368e..9bdc2bca58b32c8563cb14dbe6a6be77fd867e9e 100644 (file)
--- a/model.h
+++ b/model.h
@@ -64,7 +64,8 @@ enum material_flag
 {
    k_material_flag_skate_surface    = 0x1,
    k_material_flag_collision        = 0x2,
-   k_material_flag_grow_grass       = 0x4
+   k_material_flag_grow_grass       = 0x4,
+   k_material_flag_grind_surface    = 0x8
 };
 
 #pragma pack(push,1)
@@ -674,5 +675,13 @@ VG_STATIC void mdl_link_materials( mdl_context *root, mdl_context *child )
    }
 }
 
+VG_STATIC void mdl_invert_uv_coordinates( mdl_context *mdl )
+{
+   for( int i=0; i<mdl->info.vertex_count; i++ )
+   {
+      mdl_vert *vert = &mdl->vertex_buffer[i];
+      vert->uv[1] = 1.0f-vert->uv[1];
+   }
+}
 
 #endif