SUPER.H 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. ** Command & Conquer Red Alert(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: /CounterStrike/SUPER.H 1 3/03/97 10:25a 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 : SUPER.H *
  26. * *
  27. * Programmer : Joe L. Bostic *
  28. * *
  29. * Start Date : 07/28/95 *
  30. * *
  31. * Last Update : July 28, 1995 [JLB] *
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #ifndef SUPER_H
  37. #define SUPER_H
  38. #include "ftimer.h"
  39. class SuperClass {
  40. public:
  41. SuperClass(NoInitClass const & x) : Control(x) {};
  42. SuperClass(void) : Control(NoInitClass()) {};
  43. SuperClass(int recharge, bool powered, VoxType charging=VOX_NONE, VoxType ready=VOX_NONE, VoxType impatient=VOX_NONE, VoxType suspend=VOX_NONE);
  44. bool Suspend(bool on);
  45. bool Enable(bool onetime = false, bool player=false, bool quiet=false);
  46. void Forced_Charge(bool player=false);
  47. bool AI(bool player=false);
  48. bool Remove(void);
  49. void Impatient_Click(void) const;
  50. int Anim_Stage(void) const;
  51. bool Discharged(bool player);
  52. bool Is_Ready(void) const {return(IsReady);}
  53. bool Is_Present(void) const {return(IsPresent);}
  54. bool Is_One_Time(void) const {return(IsOneTime && IsPresent);}
  55. bool Is_Powered(void) const {return(IsPowered);}
  56. private:
  57. bool Recharge(bool player=false);
  58. unsigned IsPowered:1;
  59. unsigned IsPresent:1;
  60. unsigned IsOneTime:1;
  61. unsigned IsReady:1;
  62. CDTimerClass<FrameTimerClass> Control;
  63. int OldStage;
  64. VoxType VoxRecharge;
  65. VoxType VoxCharging;
  66. VoxType VoxImpatient;
  67. VoxType VoxSuspend;
  68. int RechargeTime;
  69. enum {
  70. ANIMATION_STAGES=54
  71. };
  72. };
  73. #endif