projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nametag rendering
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_routes.c
diff --git
a/world_routes.c
b/world_routes.c
index 53ccb90e0bb7236d35db4bda4fc6bf895745df32..beb4c2c8f7c8e15f99c730794f407430dafd933d 100644
(file)
--- a/
world_routes.c
+++ b/
world_routes.c
@@
-1023,8
+1023,7
@@
static void world_bind_light_index( world_instance *world,
GLuint shader, GLuint location,
int slot );
GLuint shader, GLuint location,
int slot );
-static void world_routes_update_timer_texts( world_instance *world )
-{
+static void world_routes_update_timer_texts( world_instance *world ){
world_render.timer_text_count = 0;
for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
world_render.timer_text_count = 0;
for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
@@
-1096,8
+1095,9
@@
static void world_routes_update_timer_texts( world_instance *world )
highscore_intr( text->text+2, route->checkpoints_count+1, 1, ' ' );
text->text[3] = '\0';
}
highscore_intr( text->text+2, route->checkpoints_count+1, 1, ' ' );
text->text[3] = '\0';
}
-
- float align_r = font3d_string_width( &gui.font, 0, text->text );
+
+ gui_font3d.font = &gui.font;
+ float align_r = font3d_string_width( 0, text->text );
align_r *= size;
v3f positions[] = {
align_r *= size;
v3f positions[] = {
@@
-1237,7
+1237,7
@@
static void render_world_routes( world_instance *world, camera *cam,
/* timers
* ---------------------------------------------------- */
if( layer_depth == 0 ){
/* timers
* ---------------------------------------------------- */
if( layer_depth == 0 ){
- font3d_bind( &gui.font, cam );
+ font3d_bind( &gui.font,
k_font_shader_default, 0, world,
cam );
for( u32 i=0; i<world_render.timer_text_count; i++ ){
struct timer_text *text = &world_render.timer_texts[i];
for( u32 i=0; i<world_render.timer_text_count; i++ ){
struct timer_text *text = &world_render.timer_texts[i];
@@
-1248,8
+1248,7
@@
static void render_world_routes( world_instance *world, camera *cam,
colour[3] = 1.0f-text->route->factive;
shader_model_font_uColour( colour );
colour[3] = 1.0f-text->route->factive;
shader_model_font_uColour( colour );
- font3d_simple_draw( &gui.font, 0, k_font_shader_default,
- text->text, cam, text->transform );
+ font3d_simple_draw( 0, text->text, cam, text->transform );
}
shader_model_font_uOffset( (v4f){0.0f,0.0f,0.0f,1.0f} );
}
shader_model_font_uOffset( (v4f){0.0f,0.0f,0.0f,1.0f} );