|
cstypes.h00001 /* 00002 Copyright (C) 1998 by Jorrit Tyberghein 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library 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 GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __CS_CSTYPES_H__ 00020 #define __CS_CSTYPES_H__ 00021 00022 #ifndef __CS_CSSYSDEFS_H__ 00023 #error "cssysdef.h must be included in EVERY source file!" 00024 #endif 00025 00026 #include "platform.h" 00027 #include <float.h> 00028 00029 //----------------------------------------------------------------------------- 00030 // If your compiler complains about 'true', 'false', and 'bool' it may be an 00031 // older C++ compiler which doesn't understand these constructs. In that case, 00032 // set CS_USE_FAKE_BOOL_TYPE to 'yes' in the makefile, or define the C-macro 00033 // CS_USE_FAKE_BOOL_TYPE in your project file. 00034 //----------------------------------------------------------------------------- 00035 #ifdef CS_USE_FAKE_BOOL_TYPE 00036 typedef int bool; 00037 #undef true 00038 #define true 1 00039 #undef false 00040 #define false 0 00041 #endif 00042 00043 //----------------------------------------------------------------------------- 00044 // The following types should be used whenever you need a variable of 00045 // a specific size (in bits). If these types are already defined by system 00046 // headers for a particular platform, then define CS_BUILTIN_SIZED_TYPES to 00047 // avoid duplicate type definition here. 00048 //----------------------------------------------------------------------------- 00049 #if !defined(CS_BUILTIN_SIZED_TYPES) 00050 typedef unsigned char uint8; 00051 typedef char int8; 00052 typedef unsigned short uint16; 00053 typedef short int16; 00054 typedef unsigned long uint32; 00055 typedef long int32; 00056 #endif 00057 00058 typedef uint32 CS_ID; // Used for uniquely generated id numbers 00059 00060 //------------------------------ 00061 // Shortcuts for normal C types 00062 //------------------------------ 00063 typedef unsigned int uint; 00064 00065 // Time in milli (1/1000) seconds 00066 typedef unsigned int csTicks; 00067 00068 // A pointer to something 00069 typedef void *csSome; 00070 // A pointer to some constant 00071 typedef const void *csConstSome; 00072 00073 #endif // __CS_CSTYPES_H__ Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |