summaryrefslogtreecommitdiff
path: root/source/cl_local.h
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-07-03 16:01:48 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-07-03 16:01:48 +0000
commit7a914ef872a436adcdb36d21ceddba6bb24eb993 (patch)
treedafc86024742e7bbced8ef897754beff5160f1ae /source/cl_local.h
parent1acd69e9a128e4f3abf06b5ae97c968c87663864 (diff)
Yet another huge commit.
Implemented new error reporting framework based on errno and custom error codes. Converted filesystem code, image and model managers, BSP loader to use the new framework and report errors more accurately. Replaced fileHandle_t with qhandle_t. Removed INVALID_LENGTH definition. Killed USE_LOADBUF code. Defined FS_FileExists(Ex) macro, implemented FS_EasyOpenFile and FS_WriteFile helper functions. When testing for free screenshot slots, open the file with O_EXCL flag to avoid race conditions (works only on glibc yet). Don't allow quake paths with high bits set. Don't tolerate any fatal errors encountered when searching for files and pass errors back to the caller. FS_Seek() now fails on files from packs instead of returning an invalid position. Fixed ‘mvdskip’ command not working properly. Avoid inefficient usage of MakeColor macro in image loading functions. Prevent memory leak in JPEG and PNG image functions after calling longjmp() by marking some local variables volatile. Added support for loading monochrome JPEG images. Fixed signed integer overflow in GetWavinfo(). Fixed missing return statement in BSP_LoadSurfEdges() causing out of range edge indices to be left uncaught. Fixed possible access to uninitialized memory in BSP_LoadLeafs() for maps with no leafs. Properly NUL terminate the buffer in SCR_ScoreDump_f(), also check for being in a level. Always free latched_string when cvar is set back to current value. Fixed a crash in ‘mvdplay’ command possible when demo file is invalid.
Diffstat (limited to 'source/cl_local.h')
-rw-r--r--source/cl_local.h50
1 files changed, 23 insertions, 27 deletions
diff --git a/source/cl_local.h b/source/cl_local.h
index 8ba2f9f..78fe9bb 100644
--- a/source/cl_local.h
+++ b/source/cl_local.h
@@ -257,7 +257,6 @@ typedef struct client_static_s {
qboolean ref_initialized;
unsigned disable_screen;
- qboolean _unused1;
int userinfo_modified;
cvar_t *userinfo_updates[MAX_PACKET_USERINFOS];
@@ -286,49 +285,46 @@ typedef struct client_static_s {
// connection information
netadr_t serverAddress;
- char servername[MAX_OSPATH]; // name of server from original connect
- unsigned connect_time; // for connection retransmits
+ char servername[MAX_OSPATH]; // name of server from original connect
+ unsigned connect_time; // for connection retransmits
int connect_count;
-#if USE_AC_CLIENT
- char messageString[MAX_STRING_CHARS];
-#endif
qboolean passive;
#if USE_ZLIB
z_stream z;
#endif
- int quakePort; // a 16 bit value that allows quake servers
+ int quakePort; // a 16 bit value that allows quake servers
// to work around address translating routers
netchan_t *netchan;
- int serverProtocol; // in case we are doing some kind of version hack
+ int serverProtocol; // in case we are doing some kind of version hack
int protocolVersion; // minor version
- int challenge; // from the server to use for connecting
+ int challenge; // from the server to use for connecting
+
+#if USE_ICMP
+ qboolean errorReceived; // got an ICMP error from server
+#endif
struct {
- fileHandle_t file; // file transfer from server
- char temp[MAX_QPATH+4]; // account 4 bytes for .tmp suffix
- char name[MAX_QPATH];
- int percent;
+ qhandle_t file; // file transfer from server
+ char temp[MAX_QPATH+4]; // account 4 bytes for .tmp suffix
+ char name[MAX_QPATH];
+ int percent;
} download;
// demo recording info must be here, so it isn't cleared on level change
struct {
- fileHandle_t playback;
- fileHandle_t recording;
- unsigned time_start;
- unsigned time_frames;
- int file_size;
- int file_offset;
- int file_percent;
- sizebuf_t buffer;
- qboolean paused;
+ qhandle_t playback;
+ qhandle_t recording;
+ unsigned time_start;
+ unsigned time_frames;
+ int file_size;
+ int file_offset;
+ int file_percent;
+ sizebuf_t buffer;
+ qboolean paused;
} demo;
-
-#if USE_ICMP
- qboolean errorReceived; // got an ICMP error from server
-#endif
} client_static_t;
extern client_static_t cls;
@@ -750,7 +746,7 @@ void CL_AddNetgraph (void);
void Key_Init( void );
void Key_Event( unsigned key, qboolean down, unsigned time );
void Key_CharEvent( int key );
-void Key_WriteBindings( fileHandle_t f );
+void Key_WriteBindings( qhandle_t f );
//