exult_types.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2000-2001  The Exult Team
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00019 #ifndef EXULT_TYPES_H
00020 #define EXULT_TYPES_H
00021 
00022 #ifdef BEOS
00023 // BeOS headers already define these types
00024 #include <be/support/SupportDefs.h>
00025 typedef int8 sint8;
00026 typedef int16 sint16;
00027 typedef int32 sint32;
00028 
00029 #else
00030 
00031 #ifndef EX_TYPE_INT8
00032 #  define EX_TYPE_INT8 char /* guaranteed by ISO */
00033 #endif
00034 
00035 #ifndef EX_TYPE_INT16
00036 #  if (SIZEOF_SHORT == 2)
00037 #    define EX_TYPE_INT16 short
00038 #  elif (SIZEOF_INT == 2)
00039 #    define EX_TYPE_INT16 int
00040 #  else
00041 #    error "Please make sure a 16 bit type is provided by exult_types.h"
00042 #  endif
00043 #endif /* !EX_TYPE_INT16 */
00044 
00045 
00046 #ifndef EX_TYPE_INT32
00047 #  if (SIZEOF_INT == 4)
00048 #    define EX_TYPE_INT32 int
00049 #  elif (SIZEOF_LONG == 4)
00050 #    define EX_TYPE_INT32 long
00051 #  elif (SIZEOF_LONG_LONG == 4)
00052 #    define EX_TYPE_INT32 long long
00053 #  else
00054 #    error "Please make sure a 32 bit type is provided by exult_types.h"
00055 #  endif
00056 #endif /* !EX_TYPE_INT32 */
00057 
00058 
00059 typedef unsigned EX_TYPE_INT8 uint8;
00060 typedef unsigned EX_TYPE_INT16  uint16;
00061 typedef unsigned EX_TYPE_INT32  uint32;
00062 
00063 typedef signed EX_TYPE_INT8   sint8;
00064 typedef signed EX_TYPE_INT16  sint16;
00065 typedef signed EX_TYPE_INT32  sint32;
00066 
00067 
00068 #endif //BeOS
00069 
00070 #endif
00071 

Generated on Mon Jul 9 14:42:45 2007 for ExultEngine by  doxygen 1.5.1