+#ifndef ENT_ROUTE_C
+#define ENT_ROUTE_C
+
+#include "ent_route.h"
+#include "input.h"
+#include "gui.h"
+
+static void ent_route_call( world_instance *world, ent_call *call ){
+ u32 index = mdl_entity_id_id( call->id );
+ ent_route *route = mdl_arritm( &world->ent_route, index );
+
+ if( call->function == 0 ){ /* view() */
+ if( localplayer.subsystem == k_player_subsystem_walk ){
+ world_entity_focus( call->id );
+ }
+ }
+ else {
+ /* TODO: Comrpession */
+ vg_print_backtrace();
+ vg_error( "Unhandled function id: %u\n", call->function );
+ }
+}
+
+/* TODO: these should recieve the world instance */
+static void ent_route_preupdate( ent_route *route, int active ){
+ if( !active ) return;
+
+ world_instance *world = world_current_instance();
+ u32 cam_id = 0;
+
+ if( __builtin_expect( world->meta.info.version >= 103, 1 ) )
+ cam_id = route->id_camera;
+
+ world_entity_focus_camera( world, cam_id );
+
+ gui_helper_action( button_display_string( k_srbind_mleft ), "weekly" );
+ gui_helper_action( button_display_string( k_srbind_mright ), "all time" );
+
+ gui_helper_action( button_display_string( k_srbind_mback ), "exit" );
+
+ if( button_down( k_srbind_mback ) ){
+ world_entity_unfocus();
+ return;
+ }
+}
+
+#endif /* ENT_ROUTE_C */