X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_skateshop.c;h=87e7509304a48719fa15471e98f8ae26c4c98fb1;hb=a7d144c7905105909cc4434e0ab43008bbb8f89f;hp=957c250f20f89159c27e957127448fe58c5354c2;hpb=730f202673d6ceb2a5199cf244d5c0bddc064fcf;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_skateshop.c b/ent_skateshop.c index 957c250..87e7509 100644 --- a/ent_skateshop.c +++ b/ent_skateshop.c @@ -261,7 +261,7 @@ static void ent_skateshop_preupdate( ent_skateshop *shop, int active ){ addon_cache_unwatch( k_addon_type_board, localplayer.board_view_slot ); addon_cache_watch( k_addon_type_board, cache_id ); localplayer.board_view_slot = cache_id; - network_send_item( k_addon_type_board ); + network_send_item( k_netmsg_playeritem_board ); world_entity_unfocus(); skaterift_autosave(1); @@ -307,7 +307,7 @@ static void ent_skateshop_preupdate( ent_skateshop *shop, int active ){ } if( button_down( k_srbind_maccept ) ){ - network_send_item( k_addon_type_player ); + network_send_item( k_netmsg_playeritem_player ); world_entity_unfocus(); } } @@ -390,7 +390,7 @@ static void ent_skateshop_preupdate( ent_skateshop *shop, int active ){ if( button_down( k_srbind_mback ) ){ if( shop->type == k_skateshop_type_charshop ) - network_send_item( k_addon_type_player ); + network_send_item( k_netmsg_playeritem_player ); world_entity_unfocus(); return; @@ -469,7 +469,7 @@ fade_out:; float scale = 0.2f, thickness = 0.03f; - font3d_bind( &gui.font, &skaterift.cam ); + font3d_bind( &gui.font, k_font_shader_default, 0, world, &skaterift.cam ); shader_model_font_uColour( (v4f){1.0f,1.0f,1.0f,1.0f} ); /* Selection counter @@ -490,12 +490,10 @@ fade_out:; i+=highscore_intl( buf+i, addon_count(k_addon_type_board), 3 ); buf[i++] = '\0'; - font3d_simple_draw( &gui.font, 0, k_font_shader_default, - buf, &skaterift.cam, mmdl ); + font3d_simple_draw( 0, buf, &skaterift.cam, mmdl ); } else{ - font3d_simple_draw( &gui.font, 0, k_font_shader_default, - "Nothing installed", &skaterift.cam, mmdl ); + font3d_simple_draw( 0, "Nothing installed", &skaterift.cam, mmdl ); } u16 cache_id = skateshop_selected_cache_id(); @@ -535,28 +533,24 @@ fade_out:; * ----------------------------------------------------------------- */ m3x3_zero( mlocal ); m3x3_setdiagonalv3( mlocal, (v3f){ scale, scale, thickness } ); - mlocal[3][0] = -font3d_string_width( &gui.font, 0, - global_skateshop.render.item_title ); + mlocal[3][0] = -font3d_string_width( 0, global_skateshop.render.item_title ); mlocal[3][0] *= scale*0.5f; mlocal[3][1] = 0.1f; mlocal[3][2] = 0.0f; m4x3_mul( mtext, mlocal, mmdl ); - font3d_simple_draw( &gui.font, 0, k_font_shader_default, - global_skateshop.render.item_title, + font3d_simple_draw( 0, global_skateshop.render.item_title, &skaterift.cam, mmdl ); /* Author name * ----------------------------------------------------------------- */ scale *= 0.4f; m3x3_setdiagonalv3( mlocal, (v3f){ scale, scale, thickness } ); - mlocal[3][0] = -font3d_string_width( &gui.font, 0, - global_skateshop.render.item_desc ); + mlocal[3][0] = -font3d_string_width( 0, global_skateshop.render.item_desc ); mlocal[3][0] *= scale*0.5f; mlocal[3][1] = 0.0f; mlocal[3][2] = 0.0f; m4x3_mul( mtext, mlocal, mmdl ); - font3d_simple_draw( &gui.font, 0, k_font_shader_default, - global_skateshop.render.item_desc, + font3d_simple_draw( 0, global_skateshop.render.item_desc, &skaterift.cam, mmdl ); SDL_AtomicUnlock( &addon_system.sl_cache_using_resources ); @@ -631,27 +625,25 @@ static void skateshop_render_worldshop( ent_skateshop *shop ){ m4x3f mtext,mlocal,mtextmdl; mdl_transform_m4x3( &mark_info->transform, mtext ); - font3d_bind( &gui.font, &skaterift.cam ); + 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( &gui.font, 0, buftext ); + 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( &gui.font, 0, k_font_shader_default, - buftext, &skaterift.cam, mtextmdl ); + font3d_simple_draw( 0, buftext, &skaterift.cam, mtextmdl ); m3x3_setdiagonalv3( mlocal, (v3f){ scale1, scale1, thickness } ); - mlocal[3][0] = -font3d_string_width( &gui.font, 0, bufsubtext ); + 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( &gui.font, 0, k_font_shader_default, - bufsubtext, &skaterift.cam, mtextmdl ); + font3d_simple_draw( 0, bufsubtext, &skaterift.cam, mtextmdl ); /* pointcloud */ m4x3f mmdl;