projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update helpers/location to 'frosted' ui
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_sfd.c
diff --git
a/world_sfd.c
b/world_sfd.c
index fbe07d36d1230319c3e0671d6c2df9a6d4619b53..6473d63b3404b24f3699a789d9d9ffcd171afbf7 100644
(file)
--- a/
world_sfd.c
+++ b/
world_sfd.c
@@
-9,6
+9,8
@@
#include "network_common.h"
#include "world_routes.h"
#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' )
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;
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);
for( u32 i=0; i<13; i++ )
sfd_clear(i);
@@
-144,7
+148,7
@@
static void world_sfd_compile_scores( struct leaderboard_cache *board,
vg_strnull( &str, buf, 100 );
u32 centiseconds;
vg_strnull( &str, buf, 100 );
u32 centiseconds;
- vg_msg_getkvintg( &body, "time", k_vg_msg_i32, ¢iseconds );
+ vg_msg_getkvintg( &body, "time", k_vg_msg_i32, ¢iseconds
, NULL
);
i32 seconds = centiseconds / 100,
minutes = seconds / 60;
i32 seconds = centiseconds / 100,
minutes = seconds / 60;
@@
-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;
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 );
}
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;
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);
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 );
}
mdl_draw_submesh( &world_sfd.sm_base );
}
-static void world_sfd_init(void){
+void world_sfd_init(void)
+{
vg_info( "world_sfd_init\n" );
vg_info( "world_sfd_init\n" );
- shader_scene_scoretext_register();
vg_linear_clear( vg_mem.scratch );
mdl_context mscoreboard;
vg_linear_clear( vg_mem.scratch );
mdl_context mscoreboard;