SUPER.H (3962B)
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\super.h_v 1.5 16 Oct 1995 16:47:04 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(int recharge=0, VoxType charging=VOX_NONE, VoxType ready=VOX_NONE, VoxType impatient=VOX_NONE, VoxType suspend=VOX_NONE); 43 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(bool forced=false); 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 56 //Needed access to recharge times for tooltips - 2019/08/14 Jason Scott 57 int Get_Recharge_Time() const { return(RechargeTime); }; 58 59 private: 60 bool Recharge(bool player=false); 61 62 unsigned IsPresent:1; 63 unsigned IsOneTime:1; 64 unsigned IsReady:1; 65 unsigned IsSuspended:1; 66 67 TCountDownTimerClass Control; 68 int OldStage; 69 int SuspendTime; 70 71 VoxType VoxRecharge; 72 VoxType VoxCharging; 73 VoxType VoxImpatient; 74 VoxType VoxSuspend; 75 int RechargeTime; 76 77 //Needed to make ANIMATION_STAGES public so the animation frame numbers could be turned into progress 78 //percentages - 2019/08/07 Jason Scott 79 public: 80 enum { 81 ANIMATION_STAGES=102 82 }; 83 }; 84 85 86 87 #endif