bad char
[vg.git] / vg_steam.h
1 #pragma once
2 #include "vg_steam_api.h"
3
4 typedef struct vg_steam_async_call vg_steam_async_call;
5 typedef struct vg_steam_callback_handler vg_steam_callback_handler;
6
7 struct vg_steam
8 {
9 struct vg_steam_async_call{
10 SteamAPICall_t id;
11 void *userdata;
12 void (*p_handler)( void *result, void *userdata );
13 }
14 calls[4];
15 u32 call_count;
16
17 struct vg_steam_callback_handler{
18 u32 callback_id;
19 void (*p_handler)( CallbackMsg_t *msg );
20 }
21 callback_handlers[32];
22 u32 callback_handler_count;
23 }
24 extern vg_steam;
25
26 void steamworks_process_api_call( HSteamPipe pipe, CallbackMsg_t *callback );
27 void steamworks_event_loop( HSteamPipe pipe );
28 vg_steam_async_call *vg_alloc_async_steam_api_call(void);
29 void steam_register_callback( u32 id, void (*p_handler)( CallbackMsg_t *msg ) );
30
31 /*
32 * This is required to run the server outside of steamcmd environment.
33 * It can be any appid but idealy the one that is actually your game
34 */
35 void steamworks_ensure_txt( const char *appid_str );