X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world.h;h=c99cfdc1807ca6a752c5121ce0ff71156f3f1657;hb=e5dfbef890431a69291a9f0a9ca4a88ea8d0705a;hp=41191b8462d98bf3aa1bb5d42814bb35524dde25;hpb=d6171f1c56789b2ca79efa3313fbbf74a13bda7a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world.h b/world.h index 41191b8..c99cfdc 100644 --- a/world.h +++ b/world.h @@ -19,6 +19,7 @@ typedef struct world_instance world_instance; #include "bvh.h" #include "model.h" #include "entity.h" +#include "font.h" #include "shaders/scene_standard.h" #include "shaders/scene_standard_alphatest.h" @@ -54,16 +55,14 @@ enum geo_type static const float k_light_cube_size = 8.0f; -struct world_instance -{ +struct world_instance { /* Fixed items * ------------------------------------------------------- */ char world_name[ 64 ]; - struct - { + struct{ boxf depthbounds; int depth_computed; @@ -74,8 +73,7 @@ struct world_instance water; /* STD140 */ - struct ub_world_lighting - { + struct ub_world_lighting{ v4f g_cube_min, g_cube_inv_range; @@ -138,8 +136,7 @@ struct world_instance GLuint *textures; u32 texture_count; - struct world_surface - { + struct world_surface{ mdl_material info; mdl_submesh sm_geo, sm_no_collide; @@ -182,11 +179,10 @@ struct world_instance mesh_no_collide, mesh_water; - rigidbody rb_geo; /* todo.. ... */ + rb_object rb_geo; }; -VG_STATIC struct world_global -{ +VG_STATIC struct world_global{ /* * Allocated as system memory * -------------------------------------------------------------------------- @@ -205,15 +201,13 @@ VG_STATIC struct world_global double time, rewind_from, rewind_to, last_use; /* water rendering */ - struct - { + struct{ struct framebuffer fbreflect, fbdepth; } water; /* split flap display */ - struct - { + struct{ glmesh mesh_base, mesh_display; mdl_submesh sm_base; u32 active_route_board; @@ -231,6 +225,26 @@ VG_STATIC struct world_global world_instance worlds[4]; u32 world_count; u32 active_world; + + /* text particles */ + font3d font; + + struct timer_text{ + char text[8]; + m4x3f transform; + ent_gate *gate; + ent_route *route; + } + timer_texts[4]; + u32 timer_text_count; + + struct text_particle{ + rigidbody *rb; + ent_glyph *glyph; + } + text_particles[6*4]; + u32 text_particle_count; + } world_global; @@ -502,8 +516,9 @@ VG_STATIC void world_update( world_instance *world, v3f pos ) world_global.sky_target_rate, vg.time_delta * 5.0 ); + world_routes_update_timer_texts( world ); world_routes_update( world ); - world_routes_debug( world ); + //world_routes_debug( world ); /* ---- SFD ------------ */