/xbmc/screensavers/rsxs-0.9/src/skyrocket/star.hh

http://github.com/xbmc/xbmc · C++ Header · 57 lines · 28 code · 7 blank · 22 comment · 0 complexity · 3f59236fab909cff4110b74071a30b24 MD5 · raw file

  1. /*
  2. * Really Slick XScreenSavers
  3. * Copyright (C) 2002-2006 Michael Chapman
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. *****************************************************************************
  19. *
  20. * This is a Linux port of the Really Slick Screensavers,
  21. * Copyright (C) 2002 Terence M. Welsh, available from www.reallyslick.com
  22. */
  23. #ifndef _STAR_HH
  24. #define _STAR_HH
  25. #include <common.hh>
  26. #include <color.hh>
  27. #include <particle.hh>
  28. #include <resources.hh>
  29. #include <vector.hh>
  30. class Star : public Particle {
  31. private:
  32. RGBColor _RGB;
  33. float _size;
  34. float _brightness;
  35. bool _smoker;
  36. Vector _smokePos;
  37. unsigned int _list;
  38. public:
  39. Star(
  40. const Vector& pos, const Vector& vel, float drag, float lifetime,
  41. const RGBColor& RGB, float size, bool smoker = false,
  42. unsigned int list = Resources::DisplayLists::flares
  43. ) :
  44. Particle(pos, vel, drag, lifetime), _RGB(RGB), _size(size),
  45. _smoker(smoker), _smokePos(_pos), _list(list) {}
  46. void update();
  47. void updateCameraOnly();
  48. void draw() const;
  49. };
  50. #endif // _STAR_HH