PL_DEFS.H 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /******************************************************************************
  2. pl_defs.h
  3. PLUSH 3D VERSION 1.2 CONSTANTS DEFINITION HEADER
  4. Copyright (c) 1996-2000, Justin Frankel
  5. ******************************************************************************/
  6. #ifndef _PL_DEFS_H_
  7. #define _PL_DEFS_H_
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /* pi! */
  12. #define PL_PI 3.14159265359
  13. /* Utility min() and max() functions */
  14. #define plMin(x,y) (( ( x ) > ( y ) ? ( y ) : ( x )))
  15. #define plMax(x,y) (( ( x ) < ( y ) ? ( y ) : ( x )))
  16. /*
  17. ** Shade modes. Used with plMat.ShadeType
  18. ** Note that (PL_SHADE_GOURAUD|PL_SHADE_GOURAUD_DISTANCE) and
  19. ** (PL_SHADE_FLAT|PL_SHADE_FLAT_DISTANCE) are valid shading modes.
  20. */
  21. #define PL_SHADE_NONE (1)
  22. #define PL_SHADE_FLAT (2)
  23. #define PL_SHADE_FLAT_DISTANCE (4)
  24. #define PL_SHADE_GOURAUD (8)
  25. #define PL_SHADE_GOURAUD_DISTANCE (16)
  26. /*
  27. ** Light modes. Used with plLight.Type or plLightSet().
  28. ** Note that PL_LIGHT_POINT_ANGLE assumes no falloff and uses the angle between
  29. ** the light and the point, PL_LIGHT_POINT_DISTANCE has falloff with proportion
  30. ** to distance**2 (see plLightSet() for setting it), PL_LIGHT_POINT does both.
  31. */
  32. #define PL_LIGHT_NONE (0x0)
  33. #define PL_LIGHT_VECTOR (0x1)
  34. #define PL_LIGHT_POINT (0x2|0x4)
  35. #define PL_LIGHT_POINT_DISTANCE (0x2)
  36. #define PL_LIGHT_POINT_ANGLE (0x4)
  37. /* Used internally; PL_FILL_* are stored in plMat._st. */
  38. #define PL_FILL_SOLID (0x0)
  39. #define PL_FILL_TEXTURE (0x1)
  40. #define PL_FILL_ENVIRONMENT (0x2)
  41. #define PL_FILL_TRANSPARENT (0x4)
  42. #define PL_TEXENV_ADD (0)
  43. #define PL_TEXENV_MUL (1)
  44. #define PL_TEXENV_AVG (2)
  45. #define PL_TEXENV_TEXMINUSENV (3)
  46. #define PL_TEXENV_ENVMINUSTEX (4)
  47. #define PL_TEXENV_MIN (5)
  48. #define PL_TEXENV_MAX (6)
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif /* !_PL_DEFS_H_ */