doomtype.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Emacs style mode select -*- C++ -*-
  2. //-----------------------------------------------------------------------------
  3. //
  4. // $Id:$
  5. //
  6. // Copyright (C) 1993-1996 by id Software, Inc.
  7. //
  8. // This source is available for distribution and/or modification
  9. // only under the terms of the DOOM Source Code License as
  10. // published by id Software. All rights reserved.
  11. //
  12. // The source is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
  15. // for more details.
  16. //
  17. // DESCRIPTION:
  18. // Simple basic typedefs, isolated here to make it easier
  19. // separating modules.
  20. //
  21. //-----------------------------------------------------------------------------
  22. #ifndef __DOOMTYPE__
  23. #define __DOOMTYPE__
  24. #ifndef __BYTEBOOL__
  25. #define __BYTEBOOL__
  26. // Fixed to use builtin bool type with C++.
  27. #ifdef __cplusplus
  28. typedef bool boolean;
  29. #else
  30. typedef enum {false, true} boolean;
  31. #endif
  32. typedef unsigned char byte;
  33. #endif
  34. // Predefined with some OS.
  35. #ifdef LINUX
  36. #include <values.h>
  37. #else
  38. #define MAXCHAR ((char)0x7f)
  39. #define MAXSHORT ((short)0x7fff)
  40. // Max pos 32-bit int.
  41. #define MAXINT ((int)0x7fffffff)
  42. #define MAXLONG ((long)0x7fffffff)
  43. #define MINCHAR ((char)0x80)
  44. #define MINSHORT ((short)0x8000)
  45. // Max negative 32-bit integer.
  46. #define MININT ((int)0x80000000)
  47. #define MINLONG ((long)0x80000000)
  48. #endif
  49. #endif
  50. //-----------------------------------------------------------------------------
  51. //
  52. // $Log:$
  53. //
  54. //-----------------------------------------------------------------------------