Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

  1. #ifndef ATMOSPHERE_H
  2. #define ATMOSPHERE_H
  3. #ifndef ATMOSPHERE_EXTERN
  4. #define ATMOSPHERE_EXTERN extern
  5. #endif
  6. #include "Color.h"
  7. #include "Point.h"
  8. const int weather_max_name = 64;
  9. class Weather {
  10. public:
  11. Weather();
  12. Weather(const char *n, GLfloat fd, GLfloat fs = 1, Color fc = white,
  13. Color s1 = blue, Color s2 = white,
  14. GLfloat sb = 1,
  15. GLenum ls = GL_LIGHT0, GLenum la = GL_LIGHT1);
  16. ~Weather();
  17. Weather operator=(Weather a);
  18. /* The sun position is used to determine how light / dark it is */
  19. void apply(Point sun);
  20. void draw_sky(Point sun);
  21. /* This is how much to blur shadows due to haze or fog */
  22. GLfloat shadow_blur();
  23. char name[weather_max_name];
  24. GLfloat fog_density;
  25. Color fog_color;
  26. /* Fog spread relates the height to the density of the fog -- 1.0
  27. * leads to uniform fog */
  28. GLfloat fog_spread;
  29. Color sky_top;
  30. Color sky_bottom;
  31. GLenum light_sun, light_ambient;
  32. GLfloat sun_brightness;
  33. private:
  34. };
  35. const int nweathers = 4;
  36. extern Weather weathers[nweathers];
  37. const int def_weather_index = 0;
  38. #undef ATMOSPHERE_EXTERN
  39. #endif