25 #ifndef PEGASUS_ENERGYMONITOR_H 26 #define PEGASUS_ENERGYMONITOR_H 28 #include "pegasus/elements.h" 39 void startBlinking(
Sprite *sprite, int32 frame1, int32 frame2, uint32 numBlinks, TimeValue blinkDuration, TimeScale blinkScale);
43 void timeChanged(
const TimeValue)
override;
48 TimeValue _blinkDuration;
55 static const uint32 kMaxJMPEnergy = 7200;
57 static const uint32 kCasualEnergy = kMaxJMPEnergy * 100 / 100;
58 static const uint32 kWorriedEnergy = kMaxJMPEnergy * 50 / 100;
59 static const uint32 kNervousEnergy = kMaxJMPEnergy * 25 / 100;
60 static const uint32 kPanicStrickenEnergy = kMaxJMPEnergy * 5 / 100;
62 static const uint32 kFullEnergy = kCasualEnergy;
64 static const uint32 kFrameLightOff = 0;
65 static const uint32 kFrameLightYellow = 1;
66 static const uint32 kFrameLightOrange = 2;
67 static const uint32 kFrameLightRed = 3;
69 static const int kEnergyDrainNormal = 1;
70 static const int kMarsReactorEnergyDrainNoShield = 6;
71 static const int kMarsReactorEnergyDrainWithShield = 3;
72 static const int kWSCPoisonEnergyDrainWithDart = 20;
73 static const int kWSCPoisonEnergyDrainNoDart = 10;
80 void setEnergyValue(
const uint32);
81 void startEnergyDraining();
84 void stopEnergyDraining();
85 void drainEnergy(
const int32);
86 int32 getCurrentEnergy();
88 void restoreLastEnergyValue();
89 void saveCurrentEnergyValue();
91 void calibrateEnergyBar();
94 void timeChanged(
const TimeValue)
override;
103 bool _calibrating, _dontFlash;
Definition: elements.h:168
Definition: rational.h:40
Definition: energymonitor.h:75
Definition: energymonitor.h:34
Definition: elements.h:117
Definition: ai_action.h:33