X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_routes.h;h=91456aa0afdbde6bb4f42937aceaab8399a06a79;hb=6e9b9e12e1f9da0419cd4d89707c7d599512d3b8;hp=2454a593c0574aae14c79ffdd68489182a23a5a8;hpb=919d1227839218c57430fe9cab8f74d594c7bd14;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_routes.h b/world_routes.h index 2454a59..91456aa 100644 --- a/world_routes.h +++ b/world_routes.h @@ -564,7 +564,8 @@ VG_STATIC void world_bind_light_index( world_instance *world, GLuint shader, GLuint location, int slot ); -VG_STATIC void render_world_routes( world_instance *world, camera *cam ) +VG_STATIC void render_world_routes( world_instance *world, camera *cam, + int layer_depth ) { m4x3f identity_matrix; m4x3_identity( identity_matrix ); @@ -611,6 +612,8 @@ VG_STATIC void render_world_routes( world_instance *world, camera *cam ) mesh_bind( &world_global.mesh_gate ); /* skip writing into the motion vectors for this */ + /* TODO: draw future gate if the one we're looking through is to be passed, + * instead of current gate */ glDrawBuffers( 1, (GLenum[]){ GL_COLOR_ATTACHMENT0 } ); for( u32 i=0; ient_route); i++ ){ @@ -624,8 +627,9 @@ VG_STATIC void render_world_routes( world_instance *world, camera *cam ) shader_model_gate_uColour( colour ); - u32 next = route->checkpoints_start + - (route->active_checkpoint+1) % route->checkpoints_count; + u32 next = route->active_checkpoint+1+layer_depth; + next = next % route->checkpoints_count; + next += route->checkpoints_start; ent_checkpoint *cp = mdl_arritm( &world->ent_checkpoint, next ); ent_gate *gate = mdl_arritm( &world->ent_gate, cp->gate_index );