1ef9f1dcf208d93a0cb9878058ac4eb5cf28a873
8 static void ent_route_call( world_instance
*world
, ent_call
*call
){
9 u32 index
= mdl_entity_id_id( call
->id
);
10 ent_route
*route
= mdl_arritm( &world
->ent_route
, index
);
12 if( call
->function
== 0 ){ /* view() */
13 if( localplayer
.subsystem
== k_player_subsystem_walk
){
14 world_entity_focus( call
->id
);
19 if( (global_ent_route
.helper_weekly
=
20 gui_new_helper( input_button_list
[k_srbind_mleft
], &text
)))
21 vg_strcat( &text
, "weekly" );
23 if( (global_ent_route
.helper_alltime
=
24 gui_new_helper( input_button_list
[k_srbind_mright
], &text
)))
25 vg_strcat( &text
, "all time" );
27 if( gui_new_helper( input_button_list
[k_srbind_mback
], &text
) )
28 vg_strcat( &text
, "exit" );
32 /* TODO: Comrpession */
34 vg_error( "Unhandled function id: %u\n", call
->function
);
38 /* TODO: these should recieve the world instance */
39 static void ent_route_preupdate( ent_route
*route
, int active
){
42 world_instance
*world
= world_current_instance();
45 if( __builtin_expect( world
->meta
.info
.version
>= 103, 1 ) )
46 cam_id
= route
->id_camera
;
48 world_entity_focus_camera( world
, cam_id
);
50 if( button_down( k_srbind_mleft
) ){
51 world_sfd
.view_weekly
= 1;
52 world_sfd_compile_active_scores();
55 if( button_down( k_srbind_mright
) ){
56 world_sfd
.view_weekly
= 0;
57 world_sfd_compile_active_scores();
60 if( button_down( k_srbind_mback
) ){
61 world_entity_unfocus();
67 #endif /* ENT_ROUTE_C */