X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=world_routes.h;h=7d4ef7c7778b8fd53cf17622595d9371aea05dd8;hb=f7db507815e2822d971031c30f25e02b45e9c914;hp=5a7c07b36df0b154c921a3970fd050eaafb19d63;hpb=23a1be081ab9e378cba49a23b8ed4d4082b580c1;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_routes.h b/world_routes.h index 5a7c07b..7d4ef7c 100644 --- a/world_routes.h +++ b/world_routes.h @@ -5,6 +5,7 @@ #ifndef ROUTES_H #define ROUTES_H +#include #include "world.h" #include "world_gate.h" @@ -530,6 +531,17 @@ VG_STATIC void world_routes_verify_run( u32 route ) world.routes[route].latest_pass = world.time; } +VG_STATIC void world_routes_clear(void) +{ + for( u32 i=0; iactive = 0; + } + world.current_run_version += 4; + world.last_use = 0.0; +} + /* * When going through a gate this is called for bookkeeping purposes */ @@ -1120,7 +1132,7 @@ VG_STATIC void world_routes_update(void) } VG_STATIC void bind_terrain_noise(void); -VG_STATIC void render_world_routes( m4x4f projection, v3f camera ) +VG_STATIC void render_world_routes( camera *cam ) { m4x3f identity_matrix; m4x3_identity( identity_matrix ); @@ -1130,9 +1142,10 @@ VG_STATIC void render_world_routes( m4x4f projection, v3f camera ) shader_link_standard_ub( _shader_route.id, 2 ); bind_terrain_noise(); - shader_route_uPv( projection ); + shader_route_uPv( cam->mtx.pv ); + shader_route_uPvmPrev( cam->mtx_prev.pv ); shader_route_uMdl( identity_matrix ); - shader_route_uCamera( camera ); + shader_route_uCamera( cam->transform[3] ); mesh_bind( &world.mesh_route_lines );