X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_skateshop.c;h=842d814db98cd115fb2f895c8d2dc4a000b42796;hb=1a7f4a35e88698bdb45c90f646f1645589d5511c;hp=8a03ff1e6ab46b7772ff1905ecedbdaf9675b419;hpb=7ccbfdd0b7717b5a906a4d4309324782d1fe73e8;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_skateshop.c b/ent_skateshop.c index 8a03ff1..842d814 100644 --- a/ent_skateshop.c +++ b/ent_skateshop.c @@ -10,7 +10,6 @@ #include "player.h" #include "gui.h" #include "menu.h" -#include "pointcloud.h" #include "highscores.h" #include "steam.h" #include "addon.h" @@ -122,63 +121,6 @@ static u16 skateshop_selected_cache_id(void){ else return 0; } -static void pointcloud_async_end(void *_, u32 __) -{ - pointcloud_animate( k_pointcloud_anim_opening ); -} - -static void pointcloud_clear_async(void *_, u32 __) -{ - pointcloud.count = 0; - pointcloud_animate( k_pointcloud_anim_opening ); -} - -static void skateshop_world_preview_loader_thread( void *_data ) -{ - addon_reg *reg = _data; - - char path_buf[4096]; - vg_str path; - vg_strnull( &path, path_buf, 4096 ); - addon_get_content_folder( reg, &path ); - vg_strcat( &path, "/preview.bin" ); - - vg_linear_clear(vg_mem.scratch); - u32 size; - - void *data = vg_file_read( vg_mem.scratch, path_buf, &size ); - if( data ){ - if( size < sizeof(pointcloud_buffer) ){ - vg_async_call( pointcloud_clear_async, NULL, 0 ); - return; - } - - vg_async_item *call = vg_async_alloc(size); - pointcloud_buffer *pcbuf = call->payload; - memcpy( pcbuf, data, size ); - - u32 point_count = (size-sizeof(pointcloud_buffer)) / - sizeof(struct pointcloud_vert); - pcbuf->max = point_count; - pcbuf->count = point_count; - pcbuf->op = k_pointcloud_op_clear; - - vg_async_dispatch( call, async_pointcloud_sub ); - vg_async_call( pointcloud_async_end, NULL, 0 ); - } - else{ - vg_async_call( pointcloud_clear_async, NULL, 0 ); - } -} - -static void skateshop_world_preview_loader_thread_and_end( void *_data ){ - skateshop_world_preview_loader_thread( _data ); -} - -static void skateshop_load_world_preview( addon_reg *reg ){ - vg_loader_start( skateshop_world_preview_loader_thread_and_end, reg ); -} - /* * VG event preupdate */ @@ -337,6 +279,7 @@ static void ent_skateshop_preupdate( ent_skateshop *shop, int active ){ } } +#if 0 if( change && pointcloud_idle() ){ pointcloud_animate( k_pointcloud_anim_hiding ); } @@ -374,6 +317,7 @@ static void ent_skateshop_preupdate( ent_skateshop *shop, int active ){ } } } +#endif } else{ vg_fatal_error( "Unknown store (%u)\n", shop->type ); @@ -633,6 +577,7 @@ static void skateshop_render_worldshop( ent_skateshop *shop ){ m4x3_mul( mtext, mlocal, mtextmdl ); font3d_simple_draw( 0, bufsubtext, &skaterift.cam, mtextmdl ); +#if 0 /* pointcloud */ m4x3f mmdl; mdl_transform_m4x3( &mark_display->transform, mmdl ); @@ -644,6 +589,7 @@ static void skateshop_render_worldshop( ent_skateshop *shop ){ pointcloud_render( world, &skaterift.cam, mmdl ); glDisable(GL_BLEND); glEnable(GL_DEPTH_TEST); +#endif } /* @@ -706,7 +652,6 @@ static void ent_skateshop_call( world_instance *world, ent_call *call ){ } else if( shop->type == k_skateshop_type_worldshop ){ ent_skateshop_helpers_pickable( "open rift" ); - pointcloud_animate( k_pointcloud_anim_opening ); skateshop_op_world_scan(); } }