#include "common.h"
#include "vg/vg_steam_ugc.h"
#include "workshop_types.h"
-#define ADDON_MOUNTED_MAX 128
+#include "addon_cache.h"
+
+#include "world.h"
+#include "player.h"
+
#define ADDON_FOLDERNAME_MAX 64
+/* total count that we have knowledge of */
+#define ADDON_MOUNTED_MAX 128
+
+/* in memory and loaded stuffs */
+#define CACHE_BOARD_MAX 10
+#define CACHE_PLAYER_MAX 10
+
typedef struct addon_reg addon_reg;
struct {
struct addon_reg{
/* deffered: updates in main thread */
u32 registry_type_counts[k_workshop_file_type_max];
+
+ /* caches */
+ struct cache_board{
+ enum cache_board_state{
+ k_cache_board_state_none,
+ k_cache_board_state_loaded,
+ k_cache_board_state_load_request
+ }
+ state;
+ struct player_board board;
+ u32 reg_index;
+ addon_reg *reg_ptr;
+
+ addon_cache_node cachenode;
+ }
+ *boards;
+ addon_cache board_cache;
+
+ SDL_SpinLock sl_cache;
}
static addon_system;