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
);
18 /* TODO: Comrpession */
20 vg_error( "Unhandled function id: %u\n", call
->function
);
24 /* TODO: these should recieve the world instance */
25 static void ent_route_preupdate( ent_route
*route
, int active
){
28 world_instance
*world
= world_current_instance();
31 if( __builtin_expect( world
->meta
.info
.version
>= 103, 1 ) )
32 cam_id
= route
->id_camera
;
34 world_entity_focus_camera( world
, cam_id
);
36 gui_helper_action( button_display_string( k_srbind_mleft
), "weekly" );
37 gui_helper_action( button_display_string( k_srbind_mright
), "all time" );
38 gui_helper_action( button_display_string( k_srbind_mback
), "exit" );
40 if( button_down( k_srbind_mleft
) ){
41 world_sfd
.view_weekly
= 1;
42 world_sfd_compile_active_scores();
45 if( button_down( k_srbind_mright
) ){
46 world_sfd
.view_weekly
= 0;
47 world_sfd_compile_active_scores();
50 if( button_down( k_srbind_mback
) ){
51 world_entity_unfocus();
56 #endif /* ENT_ROUTE_C */