1 /* 2 Relay -- a tool to record and play Quake2 demos 3 Copyright (C) 2000 Conor Davis 4 5 This program is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License 7 as published by the Free Software Foundation; either version 2 8 of the License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19 Conor Davis 20 cedavis@planetquake.com 21 */ 22 23 #ifndef __SHARED_H 24 #define __SHARED_H 25 26 #include <stddef.h> 27 28 #include "volatile.h" 29 30 #ifdef WIN32 31 #pragma warning(disable: 4305) // const double to float truncation 32 #pragma warning(disable: 4244) // double to float conversion 33 #endif 34 35 //#define BIG_ENDIAN 36 37 #define MAX_MSGLEN 1400 38 #define MAX_SVSLEN 65535 39 40 #define ISBITSET(array, index) (!!((array)[(index)>>3] & (1 << ((index) & 7)))) 41 #define SETBIT(array, index, value) ((value) ? ((array)[(index)>>3] |= 1 << ((index) & 7)) : ((array)[(index)>>3] &= ~(1 << ((index) & 7)))) 42 43 #define STRINGIZE(x) #x 44 #define STRINGIZE_VALUE(x) STRINGIZE(x) 45 46 // client viewing options 47 #define RC_LOCKPOS 0x01 // lock client's position to player 48 #define RC_LOCKVIEW 0x02 // lock client's view to/toward player 49 #define RC_CHASEVIEW 0x04 // w/ lockview, keep view relative to player's 50 #define RC_TRUNCDIST 0x08 // shorten lockview dist when blocked by walls 51 #define RC_STATUSBAR 0x10 // enable statusbar 52 #define RC_LAYOUT 0x20 // enable layouts 53 #define RC_INVENTORY 0x40 // enable inventory updates 54 #define RC_TINT 0x80 // enable screen blending 55 56 extern void Com_Printf(char *fmt, ...); 57 extern void Sys_Error(char *fmt, ...); 58 59 #endif // __SHARED_H 60 61