projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reduced shader bind code dupe & adjust skate uprighter strenght
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_routes.c
diff --git
a/world_routes.c
b/world_routes.c
index 53ccb90e0bb7236d35db4bda4fc6bf895745df32..4998cc115efa779b0d89ae4ce657326525ebec52 100644
(file)
--- a/
world_routes.c
+++ b/
world_routes.c
@@
-27,14
+27,14
@@
void world_routes_local_set_record( world_instance *world, ent_route *route,
{
vg_success( " NEW LAP TIME: %f\n", lap_time );
{
vg_success( " NEW LAP TIME: %f\n", lap_time );
- if( route->official_track_id != 0xffffffff ){
+ if( route->
anon.
official_track_id != 0xffffffff ){
double time_centiseconds = lap_time * 100.0;
if( time_centiseconds > (float)0xfffe ) /* skill issue */
return;
double time_centiseconds = lap_time * 100.0;
if( time_centiseconds > (float)0xfffe ) /* skill issue */
return;
- struct track_info *ti = &track_infos[ route->official_track_id ];
+ struct track_info *ti = &track_infos[ route->
anon.
official_track_id ];
highscore_record *record = &ti->record;
highscore_record *record = &ti->record;
- record->trackid = route->official_track_id;
+ record->trackid = route->
anon.
official_track_id;
record->datetime = time(NULL);
record->playerid = 0;
record->points = 0;
record->datetime = time(NULL);
record->playerid = 0;
record->points = 0;
@@
-889,13
+889,13
@@
static void world_gen_routes_ent_init( world_instance *world ){
for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
ent_route *route = mdl_arritm(&world->ent_route,i);
for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
ent_route *route = mdl_arritm(&world->ent_route,i);
- mdl_transform_m4x3( &route->transform, route->board_transform );
+ mdl_transform_m4x3( &route->
anon.
transform, route->board_transform );
- route->official_track_id = 0xffffffff;
+ route->
anon.
official_track_id = 0xffffffff;
for( u32 j=0; j<vg_list_size(track_infos); j ++ ){
if( !strcmp(track_infos[j].name,
mdl_pstr(&world->meta,route->pstr_name))){
for( u32 j=0; j<vg_list_size(track_infos); j ++ ){
if( !strcmp(track_infos[j].name,
mdl_pstr(&world->meta,route->pstr_name))){
- route->official_track_id = j;
+ route->
anon.
official_track_id = j;
}
}
}
}
@@
-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} );