X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_sfd.c;h=ef4fc3bc7726fe4f29a21efb17601856912c05ad;hb=5f6a4f9df6c8accc89f1920bfe9ace3cbac4c4b6;hp=fbe07d36d1230319c3e0671d6c2df9a6d4619b53;hpb=a109f126d8adab622e38fbcc2d4281e75255246a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_sfd.c b/world_sfd.c index fbe07d3..ef4fc3b 100644 --- a/world_sfd.c +++ b/world_sfd.c @@ -9,6 +9,8 @@ #include "network_common.h" #include "world_routes.h" +struct world_sfd world_sfd; + static f32 sfd_encode_glyph( char c ){ int value = 0; if( c >= 'a' && c <= 'z' ) @@ -50,7 +52,8 @@ static void sfd_clear( u32 row ){ } } -static void sfd_encode( v2i co, const char *str, enum world_sfd_align align ){ +void sfd_encode( v2i co, const char *str, enum world_sfd_align align ) +{ i32 row_h = world_sfd.h -1 -co[1]; i32 offset_x = 0; @@ -76,8 +79,9 @@ static void sfd_encode( v2i co, const char *str, enum world_sfd_align align ){ } } -static void world_sfd_compile_scores( struct leaderboard_cache *board, - const char *title ){ +void world_sfd_compile_scores( struct leaderboard_cache *board, + const char *title ) +{ for( u32 i=0; i<13; i++ ) sfd_clear(i); @@ -169,7 +173,8 @@ static void world_sfd_compile_scores( struct leaderboard_cache *board, } } -static void world_sfd_compile_active_scores(void){ +void world_sfd_compile_active_scores(void) +{ world_instance *world = world_current_instance(); struct leaderboard_cache *board = NULL; @@ -185,7 +190,8 @@ static void world_sfd_compile_active_scores(void){ world_sfd_compile_scores( board, name ); } -static void world_sfd_update( world_instance *world, v3f pos ){ +void world_sfd_update( world_instance *world, v3f pos ) +{ if( mdl_arrcount( &world->ent_route ) ){ u32 closest = 0; float min_dist = INFINITY; @@ -246,8 +252,9 @@ static void world_sfd_update( world_instance *world, v3f pos ){ } } -static void bind_terrain_noise(void); -static void sfd_render( world_instance *world, camera *cam, m4x3f transform ){ +void bind_terrain_noise(void); +void sfd_render( world_instance *world, vg_camera *cam, m4x3f transform ) +{ mesh_bind( &world_sfd.mesh_display ); shader_scene_scoretext_use(); shader_scene_scoretext_uTexMain(1); @@ -293,9 +300,9 @@ static void sfd_render( world_instance *world, camera *cam, m4x3f transform ){ mdl_draw_submesh( &world_sfd.sm_base ); } -static void world_sfd_init(void){ +void world_sfd_init(void) +{ vg_info( "world_sfd_init\n" ); - shader_scene_scoretext_register(); vg_linear_clear( vg_mem.scratch ); mdl_context mscoreboard;