Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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.  
  23. #ifndef __DOOMTYPE__
  24. #define __DOOMTYPE__
  25.  
  26.  
  27. #ifndef __BYTEBOOL__
  28. #define __BYTEBOOL__
  29. // Fixed to use builtin bool type with C++.
  30. #ifdef __cplusplus
  31. typedef bool boolean;
  32. #else
  33. typedef enum {false, true} boolean;
  34. #endif
  35. typedef unsigned char byte;
  36. #endif
  37.  
  38.  
  39. // Predefined with some OS.
  40. #ifdef LINUX
  41. #include <values.h>
  42. #else
  43. #define MAXCHAR         ((char)0x7f)
  44. #define MAXSHORT        ((short)0x7fff)
  45.  
  46. // Max pos 32-bit int.
  47. #define MAXINT          ((int)0x7fffffff)      
  48. #define MAXLONG         ((long)0x7fffffff)
  49. #define MINCHAR         ((char)0x80)
  50. #define MINSHORT        ((short)0x8000)
  51.  
  52. // Max negative 32-bit integer.
  53. #define MININT          ((int)0x80000000)      
  54. #define MINLONG         ((long)0x80000000)
  55. #endif
  56.  
  57.  
  58.  
  59.  
  60. #endif
  61. //-----------------------------------------------------------------------------
  62. //
  63. // $Log:$
  64. //
  65. //-----------------------------------------------------------------------------
  66.