POWER
[carveJwlIkooP6JGAAIwe30JlM.git] / world.h
diff --git a/world.h b/world.h
index 8b650a5e0c169d336cd0b2a872fe640408c7d29d..e5c039a495113f8ae528ed8b7e4890d1e3ad7064 100644 (file)
--- a/world.h
+++ b/world.h
@@ -46,6 +46,19 @@ enum logic_type
    k_logic_type_achievement   = 3
 };
 
+enum geo_type
+{
+   k_geo_type_solid = 0,
+   k_geo_type_nonsolid = 1,
+   k_geo_type_water = 2
+};
+
+enum material_flag
+{
+   k_material_flag_skate_surface = 0x1,
+   k_material_flag_collision = 0x2
+};
+
 VG_STATIC struct gworld
 {
    /*
@@ -135,6 +148,22 @@ VG_STATIC struct gworld
     */
    mdl_context *meta;
 
+   /*
+    * Materials / textures 
+    */
+
+   GLuint *textures;
+   u32 texture_count;
+
+   struct world_material
+   {
+      mdl_material info;
+      mdl_submesh sm_geo,
+                  sm_no_collide;
+   }
+   * materials;
+   u32 material_count;
+
    /*
     * Named safe places to respawn
     */
@@ -289,19 +318,14 @@ VG_STATIC struct gworld
            *geo_bh;
 
    /* graphics */
+   glmesh mesh_route_lines;
+
    glmesh mesh_geo, 
           mesh_no_collide,
-          mesh_route_lines,
           mesh_water;
 
+   mdl_submesh sm_foliage_main;
    rigidbody rb_geo;
-
-   /* TODO Maybe make this less hardcoded...
-    *      im on it, boss*/
-   mdl_submesh sm_geo_std_oob,   sm_geo_std, sm_geo_vb,
-               sm_foliage_main,  sm_foliage_alphatest,
-               sm_graffiti, sm_subworld, sm_terrain;
-
 }
 world;
 
@@ -627,20 +651,26 @@ VG_STATIC int ray_world( v3f pos, v3f dir, ray_hit *hit )
 
 VG_STATIC int ray_hit_is_terrain( ray_hit *hit )
 {
+   return 0;
+#if 0
    u32 valid_start = 0,
        valid_end   = world.sm_terrain.vertex_count;
 
    return (hit->tri[0] >= valid_start) &&
           (hit->tri[0]  < valid_end);
+#endif
 }
 
 VG_STATIC int ray_hit_is_ramp( ray_hit *hit )
 {
+   return 1;
+#if 0
    u32 valid_start = world.sm_geo_std.vertex_start,
        valid_end   = world.sm_geo_vb.vertex_start;
 
    return (hit->tri[0] >= valid_start) &&
           (hit->tri[0]  < valid_end);
+#endif
 }
 
 #endif /* WORLD_H */