SUPER.H (4069B)
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: /CounterStrike/SUPER.H 1 3/03/97 10:25a 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 : SUPER.H * 24 * * 25 * Programmer : Joe L. Bostic * 26 * * 27 * Start Date : 07/28/95 * 28 * * 29 * Last Update : July 28, 1995 [JLB] * 30 * * 31 *---------------------------------------------------------------------------------------------* 32 * Functions: * 33 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 34 35 #ifndef SUPER_H 36 #define SUPER_H 37 38 #include "ftimer.h" 39 40 class SuperClass { 41 public: 42 SuperClass(NoInitClass const & x) : Control(x) {}; 43 SuperClass(void) : Control(NoInitClass()) {}; 44 SuperClass(int recharge, bool powered, VoxType charging=VOX_NONE, VoxType ready=VOX_NONE, VoxType impatient=VOX_NONE, VoxType suspend=VOX_NONE); 45 46 bool Suspend(bool on); 47 bool Enable(bool onetime = false, bool player=false, bool quiet=false); 48 void Forced_Charge(bool player=false); 49 bool AI(bool player=false); 50 bool Remove(bool forced=false); 51 void Impatient_Click(void) const; 52 int Anim_Stage(void) const; 53 bool Discharged(bool player); 54 bool Is_Ready(void) const {return(IsReady);} 55 bool Is_Present(void) const {return(IsPresent);} 56 bool Is_One_Time(void) const {return(IsOneTime && IsPresent);} 57 bool Is_Powered(void) const {return(IsPowered);} 58 59 //Needed access to recharge times for tooltips - 2019/08/14 Jason Scott 60 int Get_Recharge_Time() const { return(RechargeTime); }; 61 62 private: 63 bool Recharge(bool player=false); 64 65 unsigned IsPowered:1; 66 unsigned IsPresent:1; 67 unsigned IsOneTime:1; 68 unsigned IsReady:1; 69 70 CDTimerClass<FrameTimerClass> Control; 71 int OldStage; 72 73 VoxType VoxRecharge; 74 VoxType VoxCharging; 75 VoxType VoxImpatient; 76 VoxType VoxSuspend; 77 int RechargeTime; 78 79 //Needed to make ANIMATION_STAGES public so the animation frame numbers could be turned into progress 80 //percentages - 2019/08/07 Jason Scott 81 public: 82 enum { 83 ANIMATION_STAGES=54 84 }; 85 }; 86 87 88 89 #endif