1 #ifndef ENT_SKATESHOP_H
2 #define ENT_SKATESHOP_H
5 #include "world_load.h"
7 #include "vg/vg_steam_remote_storage.h"
10 #define SKATESHOP_REGISTRY_MAX 64
11 #define SKATESHOP_BOARD_CACHE_MAX 10
12 #define SKATESHOP_WORLDS_MAX 32
13 #define SKATESHOP_VIEW_SLOT_MAX 6
14 #define SKATESHOP_REGISTRYID_NONE 0xffffffff
18 ent_skateshop
*ptr_ent
;
24 enum cache_board_state
{
25 k_cache_board_state_none
,
26 k_cache_board_state_loaded
,
27 k_cache_board_state_load_request
31 struct player_board board
;
38 SDL_SpinLock sl_cache_access
;
40 struct shop_view_slot
{
41 struct cache_board
*cache_ptr
;
44 shop_view_slots
[ SKATESHOP_VIEW_SLOT_MAX
];
46 struct registry_board
{
47 PublishedFileId_t workshop_id
;
49 /* only for steam workshop files */
50 //struct workshop_file_info workshop;
51 struct cache_board
*cache_ptr
;
53 char foldername
[64]; /* if workshop, string version of its published ID. */
56 enum registry_board_state
{
57 k_registry_board_state_none
,
58 k_registry_board_state_indexed
,
59 k_registry_board_state_indexed_absent
/*was found but is now missing*/
64 u32 t1_registry_count
,
67 u32 selected_registry_id
;
70 struct registry_world
{
71 PublishedFileId_t workshop_id
;
72 enum registry_board_state state
;
75 enum world_load_type type
;
83 u32 t1_world_registry_count
,
88 static global_skateshop
;
90 VG_STATIC
void global_skateshop_exit(void);
91 VG_STATIC
void watch_cache_board( struct cache_board
*ptr
);
92 VG_STATIC
void unwatch_cache_board( struct cache_board
*ptr
);
94 #endif /* ENT_SKATESHOP_H */