1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#ifndef _HUD_ETS_H
#define _HUD_ETS_H
#include "hud/hud.h"
struct object;
#define ETS_RECHARGE_RATE 4.0f // Recharge this percent of total shields/second
const int num_retail_ets_gauges = 3;
extern float Energy_levels[];
extern int Weapon_energy_cheat;
enum SYSTEM_TYPE {WEAPONS, SHIELDS, ENGINES};
void update_ets(object* obj, float fl_frametime);
void ets_init_ship(object* obj);
void ai_manage_ets(object* obj);
void increase_recharge_rate(object* obj, SYSTEM_TYPE enum_value);
void decrease_recharge_rate(object* obj, SYSTEM_TYPE enum_value);
void set_default_recharge_rates(object* obj);
void transfer_energy_to_shields(object* obj);
void transfer_energy_to_weapons(object* obj);
class HudGaugeEts: public HudGauge // HUD_ETS_GAUGE
{
protected:
hud_frames Ets_bar;
int System_type;
char Letter;
int Letter_offsets[2];
int Top_offsets[2];
int Bottom_offsets[2];
int ETS_bar_h;
public:
HudGaugeEts();
HudGaugeEts(int _gauge_object, int _system_type);
void initLetterOffsets(int _x, int _y);
void initTopOffsets(int _x, int _y);
void initBottomOffsets(int _x, int _y);
void initLetter(char _letter); // obligatory PC Load Letter joke. (Swifty)
void initBarHeight(int _ets_bar_h);
void initBitmaps(char *fname);
virtual void blitGauge(int index);
virtual void render(float frametime);
void pageIn();
};
class HudGaugeEtsWeapons: public HudGaugeEts
{
public:
HudGaugeEtsWeapons();
void render(float frametime);
};
class HudGaugeEtsShields: public HudGaugeEts
{
public:
HudGaugeEtsShields();
void render(float frametime);
};
class HudGaugeEtsEngines: public HudGaugeEts
{
public:
HudGaugeEtsEngines();
void render(float frametime);
};
class HudGaugeEtsRetail: public HudGaugeEts
{
protected:
char Letters[num_retail_ets_gauges];
int Gauge_positions[num_retail_ets_gauges];
public:
HudGaugeEtsRetail();
void render(float frametime);
void initLetters(char *_letters);
void initGaugePositions(int *_gauge_positions);
};
#endif
|