X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=host.h;h=986b3224fb460f9cc37cb1f34bcbc7fe83fbf707;hb=95ed24831ca8dcbf6ae8f886733c35ce2ad83272;hp=4521f72b7983a50c57b60b436520613e91222f2e;hpb=54c8d13c76444ca7e9d3f65229b5638cc67c3db5;p=xonotic%2Fdarkplaces.git diff --git a/host.h b/host.h index 4521f72b..986b3224 100644 --- a/host.h +++ b/host.h @@ -5,6 +5,16 @@ #include "qtypes.h" #include "qdefs.h" #include "cmd.h" +#include "cvar.h" + +extern cvar_t developer; +extern cvar_t developer_entityparsing; +extern cvar_t developer_extra; +extern cvar_t developer_insane; +extern cvar_t developer_loadfile; +extern cvar_t developer_loading; +extern cvar_t host_isclient; +extern cvar_t sessionid; struct cmd_state_s; @@ -13,17 +23,19 @@ typedef enum host_state_e host_shutdown, host_init, host_loading, - host_active + host_active, + host_failing, ///< crashing + host_failed ///< crashed or aborted, SDL dialog open } host_state_t; typedef struct host_static_s { jmp_buf abortframe; int state; - int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f) + unsigned int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f) double realtime; // the accumulated mainloop time since application started (with filtering), without any slowmo or clamping double dirtytime; // the main loop wall time for this frame, equal to Sys_DirtyTime() at the start of this host frame - double sleeptime; // time spent sleeping overall + double sleeptime; // time spent sleeping after the last frame qbool restless; // don't sleep qbool paused; // global paused state, pauses both client and server cmd_buf_t *cbuf; @@ -31,7 +43,7 @@ typedef struct host_static_s struct { void (*ConnectLocal)(void); - void (*Disconnect)(void); + void (*Disconnect)(qbool, const char *, ... ); void (*ToggleMenu)(void); qbool (*CL_Intermission)(void); // Quake compatibility void (*CL_SendCvar)(struct cmd_state_s *); @@ -43,7 +55,6 @@ typedef struct host_static_s extern host_static_t host; void Host_Main(void); -void Host_Shutdown(void); void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN; void Host_LockSession(void); void Host_UnlockSession(void);