DIAL8.H (3307B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /* $Header: F:\projects\c&c\vcs\code\dial8.h_v 2.18 16 Oct 1995 16:47:28 JOE_BOSTIC $ */ 17 /*********************************************************************************************** 18 *** 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 *** 19 *********************************************************************************************** 20 * * 21 * Project Name : Command & Conquer * 22 * * 23 * File Name : DIAL8.H * 24 * * 25 * Programmer : Bill Randolph * 26 * * 27 * Start Date : 02/06/95 * 28 * * 29 * Last Update : February 6, 1995 [BR] * 30 * * 31 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 32 33 #ifndef DIAL8_H 34 #define DIAL8_H 35 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 /* 45 ** Get/Set the direction the dial is currently pointing 46 */ 47 DirType Get_Direction(void) const; 48 void Set_Direction(DirType dir); 49 50 /* 51 ** Overloaded draw routine 52 */ 53 virtual int Draw_Me(int forced = false); 54 55 protected: 56 /* 57 ** Overloaded event processing routine 58 */ 59 virtual int Action(unsigned flags, KeyNumType &key); 60 61 private: 62 int FaceX; // x-coord of center of face 63 int FaceY; // y-coord of center of face 64 int FacePoint[8][2]; // coords of the little dial decorations 65 int FaceLine[8][2]; // coords for drawing the dial hand 66 DirType Direction; // 0-255 numerical direction of dial 67 FacingType Facing; // numerical facing direction of dial (0 - 7) 68 FacingType OldFacing; // previous Facing value 69 70 }; 71 72 #endif 73