#include "traffic.h" /*TODO: -> world_traffic.h */
#include "world_routes.h"
+#include "world_sfd.h"
#include "shaders/terrain.h"
#include "shaders/sky.h"
u32 spawn_count;
struct subworld_routes routes;
+ struct subworld_sfd sfd;
/* ...
struct subworld_spawns system_spawns;
world;
static struct subworld_routes *subworld_routes(void) { return &world.routes; }
+static struct subworld_sfd *subworld_sfd(void) { return &world.sfd; }
vg_tex2d tex_terrain_colours = { .path = "textures/gradients.qoi",
shader_alphatest_register();
world_routes_register();
+ world_sfd_register();
}
static void world_free(void)
{
/* TODO.. */
+
+ world_sfd_free();
}
static void render_world_depth( m4x4f projection, m4x3f camera );
world.dome_lower = *mdl_node_submesh( msky, nlower, 0 );
world.dome_upper = *mdl_node_submesh( msky, nupper, 0 );
free(msky);
+
+
+ /* Other systems */
+ world_sfd_init();
}
static void world_update(void)
{
world_routes_debug();
+ sfd_update( &world.sfd.tester );
#if 0
rb_solver_reset();
render_world_vb( projection, camera[3] );
render_world_alphatest( projection, camera[3] );
render_terrain( projection, camera[3] );
+
+ m4x3f identity_matrix;
+ m4x3_identity( identity_matrix );
+ identity_matrix[3][1] = 125.0f;
+
+ v4f t;
+ q_axis_angle( t, (v3f){0.0f,1.0f,0.0f}, 2.3f );
+ q_m3x3( t, identity_matrix );
+
+ sfd_render( &world.sfd.tester, projection, camera[3], identity_matrix );
}
static void render_world_depth( m4x4f projection, m4x3f camera )