+ font3d_simple_draw( 0, global_skateshop.render.item_desc,
+ &skaterift.cam, mmdl );
+
+ SDL_AtomicUnlock( &addon_system.sl_cache_using_resources );
+}
+
+static void skateshop_render_charshop( ent_skateshop *shop ){
+}
+
+static void skateshop_render_worldshop( ent_skateshop *shop ){
+ world_instance *world = world_current_instance();
+
+ ent_marker *mark_display = mdl_arritm( &world->ent_marker,
+ mdl_entity_id_id(shop->worlds.id_display)),
+ *mark_info = mdl_arritm( &world->ent_marker,
+ mdl_entity_id_id(shop->boards.id_info));
+
+ if( global_skateshop.render.world_reg != global_skateshop.selected_world_id){
+ global_skateshop.render.world_title = "missing: workshop.title";
+
+ addon_reg *reg = get_addon_from_index( k_addon_type_world,
+ global_skateshop.selected_world_id, ADDON_REG_HIDDEN );
+
+ if( !reg )
+ goto none;
+
+ if( reg->alias.workshop_id )
+ {
+ vg_msg msg;
+ vg_msg_init( &msg, reg->metadata, reg->metadata_len );
+
+ global_skateshop.render.world_loc = vg_msg_getkvstr(&msg,"location");
+ global_skateshop.render.world_reg = global_skateshop.selected_world_id;
+
+ if( vg_msg_seekframe( &msg, "workshop" ) )
+ {
+ global_skateshop.render.world_title = vg_msg_getkvstr(&msg,"title");
+ vg_msg_skip_frame( &msg );
+ }
+ else {
+ vg_warn( "No workshop body\n" );
+ }
+ }
+ else {
+ global_skateshop.render.world_title = reg->alias.foldername;
+ }
+ }
+
+none:;
+
+ /* Text */
+ char buftext[128], bufsubtext[128];
+ vg_str info, subtext;
+ vg_strnull( &info, buftext, 128 );
+ vg_strnull( &subtext, bufsubtext, 128 );
+
+ u32 valid_count = addon_count(k_addon_type_world,ADDON_REG_HIDDEN);
+ if( valid_count )
+ {
+ vg_strcati32( &info, global_skateshop.selected_world_id+1 );
+ vg_strcatch( &info, '/' );
+ vg_strcati32( &info, valid_count );
+ vg_strcatch( &info, ' ' );
+ vg_strcat( &info, global_skateshop.render.world_title );
+
+ if( !vg_loader_availible() )
+ {
+ vg_strcat( &subtext, "Loading..." );
+ }
+ else
+ {
+ addon_reg *reg = get_addon_from_index( k_addon_type_world,
+ global_skateshop.selected_world_id, ADDON_REG_HIDDEN );
+
+ if( reg->alias.workshop_id )
+ vg_strcat( &subtext, "(Workshop) " );
+
+ vg_strcat( &subtext, global_skateshop.render.world_loc );
+ }
+ }
+ else
+ {
+ vg_strcat( &info, "No workshop worlds installed" );
+ }
+
+ m4x3f mtext,mlocal,mtextmdl;
+ mdl_transform_m4x3( &mark_info->transform, mtext );
+
+ font3d_bind( &gui.font, k_font_shader_default, 0, NULL, &skaterift.cam );
+ 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( 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( 0, buftext, &skaterift.cam, mtextmdl );
+
+ m3x3_setdiagonalv3( mlocal, (v3f){ scale1, scale1, thickness } );
+ mlocal[3][0] = -font3d_string_width( 0, bufsubtext );
+ mlocal[3][0] *= scale1*0.5f;
+ mlocal[3][1] = -scale1*0.3f;
+ m4x3_mul( mtext, mlocal, mtextmdl );
+ font3d_simple_draw( 0, bufsubtext, &skaterift.cam, mtextmdl );