10 extern cvar_t developer;
11 extern cvar_t developer_entityparsing;
12 extern cvar_t developer_extra;
13 extern cvar_t developer_insane;
14 extern cvar_t developer_loadfile;
15 extern cvar_t developer_loading;
16 extern cvar_t host_isclient;
17 extern cvar_t sessionid;
21 typedef enum host_state_e
26 // states >= host_shutdown cause graceful shutdown, see Sys_HandleCrash() comments
28 host_failing, ///< crashing
29 host_failed ///< crashed or aborted, SDL dialog open
32 typedef struct host_static_s
36 unsigned int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f)
37 double realtime; // the accumulated mainloop time since application started (with filtering), without any slowmo or clamping
38 double dirtytime; // the main loop wall time for this frame, equal to Sys_DirtyTime() at the start of this host frame
39 double sleeptime; // time spent sleeping after the last frame
40 qbool restless; // don't sleep
41 qbool paused; // global paused state, pauses both client and server
46 void (*ConnectLocal)(void);
47 void (*Disconnect)(qbool, const char *, ... );
48 void (*ToggleMenu)(void);
49 qbool (*CL_Intermission)(void); // Quake compatibility
50 void (*CL_SendCvar)(struct cmd_state_s *);
51 void (*SV_SendCvar)(struct cmd_state_s *);
52 void (*SV_Shutdown)(void);
56 extern host_static_t host;
59 void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN;
60 void Host_LockSession(void);
61 void Host_UnlockSession(void);
62 void Host_AbortCurrentFrame(void) DP_FUNC_NORETURN;
63 void Host_SaveConfig(const char *file);