loader stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / workshop.h
1 #ifndef WORKSHOP_H
2 #define WORKSHOP_H
3
4 #define VG_GAME
5 #include "vg/vg.h"
6 #include "vg/vg_steam_remote_storage.h"
7 #include "skaterift.h"
8 #include "pointcloud.h"
9
10 struct workshop_file_info{
11 u64 author;
12 char author_name[32];
13 char title[64];
14 };
15
16 struct world_file_info{
17 char title[64]; /* extracted from ent_worldinfo */
18 char location[64];
19
20 u32 pointcloud_count;
21 pointcloud_vert pointcloud[];
22 };
23
24 struct async_workshop_filepath_info{
25 PublishedFileId_t id;
26 char *buf;
27 u32 len;
28 };
29
30 struct async_workshop_installed_files_info{
31 PublishedFileId_t *buffer;
32 u32 *len; /* inout */
33 };
34
35 struct async_workshop_metadata_info{
36 struct workshop_file_info *info;
37 const char *path;
38 };
39
40 VG_STATIC void workshop_file_info_clear( struct workshop_file_info *info )
41 {
42 info->author = 0ul;
43 info->author_name[0] = '\0';
44 info->title[0] = '\0';
45 }
46
47 VG_STATIC void async_workshop_get_filepath( void *data, u32 len );
48 VG_STATIC void async_workshop_get_installed_files( void *data, u32 len );
49 VG_STATIC void workshop_load_metadata( const char *path,
50 struct workshop_file_info *info );
51
52 #endif /* WORKSHOP_H */