home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / directx / pplane / common.h next >
C/C++ Source or Header  |  1997-07-14  |  3KB  |  119 lines

  1. #ifndef COMMON_H
  2. #define COMMON_H
  3. /*
  4. **-----------------------------------------------------------------------------
  5. **  File:       Common.h
  6. **  Purpose:    Common definitions and include files
  7. **
  8. **  Microsoft copyright (c) 1996, all rights reserved
  9. **-----------------------------------------------------------------------------
  10. */
  11.  
  12.  
  13. /*
  14. **-----------------------------------------------------------------------------
  15. **  Include files
  16. **-----------------------------------------------------------------------------
  17. */
  18. #define STRICT
  19. #define WIN32_LEAN_AND_MEAN
  20. #include <windows.h>
  21. #include <math.h>
  22. #include <assert.h>
  23. #include <tchar.h>
  24.  
  25. #include <ddraw.h>
  26.  
  27. // Note:  Must Define D3D_OVERLOADS to get C++ version of D3DMATRIX
  28. #define D3D_OVERLOADS
  29. #include <d3d.h>
  30. #include <d3dtypes.h>
  31.  
  32. #include "resource.h"
  33.  
  34.  
  35. /*
  36. **-----------------------------------------------------------------------------
  37. **  Defines
  38. **-----------------------------------------------------------------------------
  39. */
  40. #ifndef FAR
  41.     #define FAR
  42. #endif
  43.  
  44. #ifndef NEAR
  45.     #define NEAR
  46. #endif
  47.  
  48. #ifndef CONST
  49.     #define CONST const
  50. #endif
  51.  
  52. #ifndef MAX_PATH
  53.     #define MAX_PATH 260
  54. #endif
  55.  
  56. #ifndef MAX_STRING
  57.     #define MAX_STRING 260
  58. #endif
  59.  
  60. #ifndef NULL
  61.     #ifdef __cplusplus
  62.         #define NULL 0
  63.     #else
  64.         #define NULL ((void *)0)
  65.     #endif
  66. #endif
  67.  
  68. #ifndef FALSE
  69.     #define FALSE 0
  70. #endif
  71.  
  72. #ifndef TRUE
  73.     #define TRUE 1
  74. #endif
  75.  
  76.  
  77. /*
  78. **-----------------------------------------------------------------------------
  79. **  Typedefs
  80. **-----------------------------------------------------------------------------
  81. */
  82.  
  83.  
  84.     
  85. /*
  86. **-----------------------------------------------------------------------------
  87. **  Macros
  88. **-----------------------------------------------------------------------------
  89. */
  90. #ifndef max
  91.     #define max(a,b)            (((a) > (b)) ? (a) : (b))
  92. #endif
  93.  
  94. #ifndef min
  95.     #define min(a,b)            (((a) < (b)) ? (a) : (b))
  96. #endif
  97.  
  98. #ifndef max3
  99.     #define max3(a,b,c)         (((a) > (b)) ? (((a) > (c)) ? (a) : (c)) : (((b) > (c)) ? (b) : (c)))
  100. #endif
  101.  
  102. #ifndef min3
  103.     #define min3(a,b,c)         (((a) < (b)) ? (((a) < (c)) ? (a) : (c)) : (((b) < (c)) ? (b) : (c)))
  104. #endif
  105.  
  106. #ifndef clamp
  107.     #define clamp(L,V,U)        (((L) > (V)) ? (L) : (((U) < (V)) ? (U) : (V)))
  108. #endif
  109.  
  110.  
  111. /*
  112. **-----------------------------------------------------------------------------
  113. **  End of File
  114. **-----------------------------------------------------------------------------
  115. */
  116. #endif // COMMON_H
  117.  
  118.  
  119.