small compression
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_skateshop.h
index e7acd43255d456db1d2bb291431eafcba768ff58..386602170fd091a26dace1038273afda66f960aa 100644 (file)
@@ -2,77 +2,46 @@
 #define ENT_SKATESHOP_H
 
 #include "world.h"
+#include "world_load.h"
 #include "player.h"
+#include "vg/vg_steam_remote_storage.h"
+#include "workshop.h"
+#include "addon.h"
 
-#define MAX_LOCAL_BOARDS 64
-#define BILL_TIN_BOARDS  1
-#define MAX_DYNAMIC_BOARDS 9
+#define SKATESHOP_VIEW_SLOT_MAX    5
 
 struct{
    v3f look_target;
-   ent_skateshop *ptr_ent;
 
-   int active;
-   float factive;
+#if 0
+   ent_skateshop *ptr_ent;    /* TODO */
+   float factive;             /* TODO */
+   camera cam;
+#endif
 
-   enum skateshop_loc{
-      k_skateshop_loc_page__viewing,
-
-      k_skateshop_loc_select_use,
-      k_skateshop_loc_select_cancel,
-      k_skateshop_loc_select_upload,
-      k_skateshop_loc_page__selected,
-
-      k_skateshop_loc_page__upload,
-   }
-   interface_loc;
-
-   struct dynamic_board
-   {
-      enum dynamic_board_state{
-         k_dynamic_board_state_none,
-         k_dynamic_board_state_loaded,
-         k_dynamic_board_state_loading,
-      }
-      state;
-
-      u32 ref_count;
-
-      struct player_board board;
-
-      u32 registry_id;
-
-      double last_use_time;
-   }
-   *dynamic_boards;
-
-   struct shop_view_slot
-   {
-      struct dynamic_board *db;
+   struct shop_view_slot{
+      u16 cache_id;
       float view_blend;
    }
-   shop_view_slots[6];
-
-   struct board_registry
-   {
-      int workshop;
-      u64 uid;
-
-      struct dynamic_board *dynamic;
+   shop_view_slots[ SKATESHOP_VIEW_SLOT_MAX ];
 
-      char filename[64];   /* if workshop, string version of uid. */
-      u32 filename_hash;
+   u32 selected_world_id,
+       selected_board_id,
+       selected_player_id,
+       pointcloud_world_id;
 
-      int ghost;
-   } 
-   *registry;
-   u32 registry_count;
+   struct {
+      const char *item_title, *item_desc;
+      u32 reg_id;
 
-   int loading;
-   float interaction_cooldown;
-
-   u32 selected_registry_id;
+      const char *world_title, *world_loc;
+      u32 world_reg;
+   }
+   render;
 }
-static global_skateshop;
+static global_skateshop={.render={.reg_id=0xffffffff,.world_reg=0xffffffff}};
+
+static void ent_skateshop_preupdate( ent_skateshop *shop, int active );
+static void skateshop_render( ent_skateshop *shop );
 
 #endif /* ENT_SKATESHOP_H */