1 /* $Id: types.h,v 5.0 2001/04/07 20:00:59 dik Exp $ 2 * 3 * XPilot, a multiplayer gravity war game. Copyright (C) 1991-2001 by 4 * 5 * Bj�rn Stabell <bjoern@xpilot.org> 6 * Ken Ronny Schouten <ken@xpilot.org> 7 * Bert Gijsbers <bert@xpilot.org> 8 * Dick Balaska <dick@xpilot.org> 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, write to the Free Software 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 */ 24 25 #ifndef TYPES_H 26 #define TYPES_H 27 28 typedef unsigned char u_byte; 29 30 /* 31 * On some systems an enum is smaller than an int. 32 * On others bool is already a builtin type. 33 * Using preprocessor macros to circumvent both situations. 34 */ 35 #define false 0 36 #define true 1 37 38 #ifndef _XPMONNT_ 39 #define bool int 40 #endif 41 42 /* 43 * Windows does all its FPU work in doubles. Using floats gives warnings 44 * and causes everything to be promoted to doubles anyway... 45 */ 46 #ifndef _WINDOWS 47 typedef float DFLOAT; 48 #else 49 typedef double DFLOAT; 50 #endif 51 52 typedef struct { DFLOAT x, y; } vector; 53 typedef vector position; 54 typedef struct { int x, y; } ivec; 55 typedef ivec ipos; 56 57 #ifdef _WINDOWS 58 # define strncasecmp(__s, __t, __l) strnicmp(__s, __t, __l) 59 # define strcasecmp(__s, __t) stricmp(__s, __t) 60 #endif 61 62 #endif 63