DIAL8.H 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. ** Command & Conquer(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  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 as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* $Header: F:\projects\c&c\vcs\code\dial8.h_v 2.18 16 Oct 1995 16:47:28 JOE_BOSTIC $ */
  19. /***********************************************************************************************
  20. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Command & Conquer *
  24. * *
  25. * File Name : DIAL8.H *
  26. * *
  27. * Programmer : Bill Randolph *
  28. * *
  29. * Start Date : 02/06/95 *
  30. * *
  31. * Last Update : February 6, 1995 [BR] *
  32. * *
  33. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  34. #ifndef DIAL8_H
  35. #define DIAL8_H
  36. class Dial8Class : public ControlClass
  37. {
  38. public:
  39. /*
  40. ** Constructor/Destructor
  41. */
  42. Dial8Class(int id, int x, int y, int w, int h, DirType dir);
  43. /*
  44. ** Get/Set the direction the dial is currently pointing
  45. */
  46. DirType Get_Direction(void) const;
  47. void Set_Direction(DirType dir);
  48. /*
  49. ** Overloaded draw routine
  50. */
  51. virtual int Draw_Me(int forced = false);
  52. protected:
  53. /*
  54. ** Overloaded event processing routine
  55. */
  56. virtual int Action(unsigned flags, KeyNumType &key);
  57. private:
  58. int FaceX; // x-coord of center of face
  59. int FaceY; // y-coord of center of face
  60. int FacePoint[8][2]; // coords of the little dial decorations
  61. int FaceLine[8][2]; // coords for drawing the dial hand
  62. DirType Direction; // 0-255 numerical direction of dial
  63. FacingType Facing; // numerical facing direction of dial (0 - 7)
  64. FacingType OldFacing; // previous Facing value
  65. };
  66. #endif