#include "vg/vg_steam_ugc.h"
#include "vg/vg_msg.h"
+#include "vg/vg_tex.h"
+#include "vg/vg_image.h"
+#include "vg/vg_loader.h"
#include "ent_skateshop.h"
#include "world.h"
#include "player.h"
#include "save.h"
#include "network.h"
+struct global_skateshop global_skateshop =
+{
+ .render={.reg_id=0xffffffff,.world_reg=0xffffffff}
+};
+
/*
* Checks string equality but does a hash check first
*/
}
/* TODO: migrate to addon.c */
-static void skateshop_autostart_loading(void){
+void skateshop_autostart_loading(void)
+{
if( !vg_loader_availible() ) return;
SDL_AtomicLock( &addon_system.sl_cache_using_resources );
/*
* VG event init
*/
-static void skateshop_init(void){
+void skateshop_init(void)
+{
vg_async_call( skateshop_init_async, NULL, 0 );
}
* VG event preupdate
*/
void temp_update_playermodel(void);
-static void ent_skateshop_preupdate( ent_skateshop *shop, int active ){
+void ent_skateshop_preupdate( ent_skateshop *shop, int active )
+{
if( !active ) return;
/* input filter */
}
}
-static void skateshop_world_preupdate( world_instance *world ){
+void skateshop_world_preupdate( world_instance *world )
+{
for( u32 i=0; i<mdl_arrcount(&world->ent_skateshop); i++ ){
ent_skateshop *shop = mdl_arritm( &world->ent_skateshop, i );
/*
* World: render event
*/
-static void skateshop_render( ent_skateshop *shop ){
+void skateshop_render( ent_skateshop *shop )
+{
if( shop->type == k_skateshop_type_boardshop )
skateshop_render_boardshop( shop );
else if( shop->type == k_skateshop_type_charshop )
vg_fatal_error( "Unknown store (%u)\n", shop->type );
}
-static void skateshop_render_nonfocused( world_instance *world, camera *cam ){
+void skateshop_render_nonfocused( world_instance *world, vg_camera *cam )
+{
for( u32 j=0; j<mdl_arrcount( &world->ent_skateshop ); j ++ ){
ent_skateshop *shop = mdl_arritm(&world->ent_skateshop, j );
/*
* Entity logic: entrance event
*/
-static void ent_skateshop_call( world_instance *world, ent_call *call ){
+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" );