#ifndef ROUTES_H
#define ROUTES_H
+#include <time.h>
#include "world.h"
#include "world_gate.h"
VG_STATIC void world_routes_ui_newseg( u32 route )
{
struct route_ui_bar *pui = &world.ui_bars[route];
-
- pui->last_notch = 0.0;
glBindVertexArray( pui->vao );
if( pui->segment_count )
world.routes[route].latest_pass = world.time;
}
+VG_STATIC void world_routes_clear(void)
+{
+ for( u32 i=0; i<world.route_count; i++ )
+ {
+ struct route *route = &world.routes[i];
+ route->active = 0;
+ }
+ world.current_run_version += 4;
+ world.last_use = 0.0;
+}
+
/*
* When going through a gate this is called for bookkeeping purposes
*/
pui->vertex_head = k_route_ui_max_verts - 200;
pui->segment_start = 0;
pui->segment_count = 0;
- pui->last_notch = 0.0;
pui->fade_start = 0;
pui->fade_count = 0;
pui->fade_timer_start = 0.0;
}
}
-VG_STATIC void bind_terrain_textures(void);
-VG_STATIC void render_world_routes( m4x4f projection, v3f camera )
+VG_STATIC void bind_terrain_noise(void);
+VG_STATIC void render_world_routes( camera *cam )
{
m4x3f identity_matrix;
m4x3_identity( identity_matrix );
shader_route_use();
shader_route_uTexGarbage(0);
shader_link_standard_ub( _shader_route.id, 2 );
- bind_terrain_textures();
+ 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] );
+ shader_route_uBoard0( TEMP_BOARD_0 );
+ shader_route_uBoard1( TEMP_BOARD_1 );
mesh_bind( &world.mesh_route_lines );