+ m4x3f mtext,mlocal,mtextmdl;
+ mdl_transform_m4x3( &mark_info->transform, mtext );
+
+ font3d_bind( &gui.font, &main_camera );
+ shader_model_font_uColour( (v4f){1.0f,1.0f,1.0f,1.0f} );
+
+ float scale = 0.2f, thickness = 0.015f, scale1 = 0.08f;
+ m3x3_zero( mlocal );
+ m3x3_setdiagonalv3( mlocal, (v3f){ scale, scale, thickness } );
+ mlocal[3][0] = -font3d_string_width( &gui.font, 0, buftext );
+ mlocal[3][0] *= scale*0.5f;
+ mlocal[3][1] = 0.1f;
+ mlocal[3][2] = 0.0f;
+ m4x3_mul( mtext, mlocal, mtextmdl );
+ font3d_simple_draw( &gui.font, 0, buftext, &main_camera, mtextmdl );
+
+ m3x3_setdiagonalv3( mlocal, (v3f){ scale1, scale1, thickness } );
+ mlocal[3][0] = -font3d_string_width( &gui.font, 0, bufsubtext );
+ mlocal[3][0] *= scale1*0.5f;
+ mlocal[3][1] = -scale1*0.3f;
+ m4x3_mul( mtext, mlocal, mtextmdl );
+ font3d_simple_draw( &gui.font, 0, bufsubtext, &main_camera, mtextmdl );
+
+ /* pointcloud */
+ m4x3f mmdl;
+ mdl_transform_m4x3( &mark_display->transform, mmdl );
+ m4x3_rotate_y( mmdl, vg.time * 0.2 );
+
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ONE, GL_ONE);
+ glDisable(GL_DEPTH_TEST);
+ pointcloud_render( world, &main_camera, mmdl );
+ glDisable(GL_BLEND);
+ glEnable(GL_DEPTH_TEST);
+}
+
+/*
+ * World: render event
+ */
+VG_STATIC void skateshop_render(void)
+{
+ if( !global_skateshop.active ) return;
+
+ ent_skateshop *shop = global_skateshop.ptr_ent;
+
+ if( shop->type == k_skateshop_type_boardshop ){
+ skateshop_render_boardshop();
+ }
+ else if( shop->type == k_skateshop_type_charshop ){
+ skateshop_render_charshop();
+ }
+ else if( shop->type == k_skateshop_type_worldshop ){
+ skateshop_render_worldshop();
+ }
+ else{
+ vg_fatal_error( "Unknown store (%u)\n", shop->type );
+ }
+}
+
+/*
+ * Entity logic: entrance event
+ */
+VG_STATIC void ent_skateshop_call( world_instance *world, ent_call *call )
+{
+ u32 index = mdl_entity_id_id( call->id );
+ ent_skateshop *shop = mdl_arritm( &world->ent_skateshop, index );
+ vg_info( "skateshop_call\n" );
+
+ if( menu.active ) return;
+ if( skaterift.async_op != k_async_op_none ) return;
+
+ if( call->function == k_ent_function_trigger ){
+ if( localplayer.subsystem != k_player_subsystem_walk ){
+ return;
+ }
+
+ vg_info( "Entering skateshop\n" );
+
+ localplayer.immobile = 1;
+ menu.disable_open = 1;
+ global_skateshop.active = 1;
+
+ v3_zero( localplayer.rb.v );
+ v3_zero( localplayer.rb.w );
+ localplayer._walk.move_speed = 0.0f;
+ global_skateshop.ptr_ent = shop;
+
+ if( shop->type == k_skateshop_type_boardshop ){
+ skateshop_update_viewpage();
+ skateshop_op_board_scan();
+ }
+ else if( shop->type == k_skateshop_type_worldshop ){
+ pointcloud_animate( k_pointcloud_anim_opening );
+ skateshop_op_world_scan();
+ }
+ }
+}
+
+/*
+ * Entity logic: exit event
+ */
+VG_STATIC void global_skateshop_exit(void)
+{
+ vg_info( "exit skateshop\n" );
+ localplayer.immobile = 0;
+ global_skateshop.active = 0;
+ menu.disable_open = 0;
+ srinput.ignore_input_frames = 2;