// common cvars for all panels
float i;
- for (i = 0; i < panel_cnt; ++i)
+ for (i = 0; i < HUD_PANEL_NUM; ++i)
{
fputs(fh, strcat("seta hud_", HUD_Panel_GetName(i), " ", ftos(cvar(strcat("hud_", HUD_Panel_GetName(i)))), "\n"));
fputs(fh, strcat("seta hud_", HUD_Panel_GetName(i), "_pos \"", cvar_string(strcat("hud_", HUD_Panel_GetName(i), "_pos")), "\"", "\n"));
myCenter = '0 0 0'; // shut up fteqcc, there IS a reference
targCenter = '0 0 0'; // shut up fteqcc, there IS a reference
- for (i = 0; i < panel_cnt; ++i) {
+ for (i = 0; i < HUD_PANEL_NUM; ++i) {
if(i == id || !HUD_Panel_CheckActive(i))
continue;
myCenter = '0 0 0'; // shut up fteqcc, there IS a reference
targCenter = '0 0 0'; // shut up fteqcc, there IS a reference
- for (i = 0; i < panel_cnt; ++i) {
+ for (i = 0; i < HUD_PANEL_NUM; ++i) {
if(i == id || !HUD_Panel_CheckActive(i))
continue;
vector panelPos;
vector panelSize;
- for(i = 0; i <= panel_cnt; ++i)
+ for(i = 0; i <= HUD_PANEL_NUM; ++i)
{
panelPos = HUD_Panel_GetPos(i);
panelSize = HUD_Panel_GetSize(i);
void HUD_WeaponIcons()
{
- float id = 0;
+ float id = HUD_PANEL_WEAPONICONS;
float alpha, stat_weapons; // "constants"
vector pos, mySize, accuracy_color;
float i, weapid, fade, weapon_stats, weapon_hit, weapon_damage, weapon_cnt; // variables
void HUD_Inventory()
{
- float id = 1;
+ float id = HUD_PANEL_INVENTORY;
float i;
float stat_items;
// Powerups (#2)
//
void HUD_Powerups() {
- float id = 2;
+ float id = HUD_PANEL_POWERUPS;
float stat_items;
stat_items = getstati(STAT_ITEMS);
//
void HUD_HealthArmor(void)
{
- float id = 3;
+ float id = HUD_PANEL_HEALTHARMOR;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
void HUD_Notify (void)
{
- float id = 4;
+ float id = HUD_PANEL_NOTIFY;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
//
void HUD_Timer()
{
- float id = 5;
+ float id = HUD_PANEL_TIMER;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
//
void HUD_Radar(void)
{
- float id = 6;
+ float id = HUD_PANEL_RADAR;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
//
void HUD_Score()
{
- float id = 7;
+ float id = HUD_PANEL_SCORE;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
// Race timer (#8)
//
void HUD_RaceTimer (void) {
- float id = 8;
+ float id = HUD_PANEL_RACETIMER;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
void HUD_VoteWindow(void)
{
- float id = 9;
+ float id = HUD_PANEL_VOTE;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && !hud_configure)
return;
- float id = 10;
+ float id = HUD_PANEL_MODICONS;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
//
void HUD_DrawPressedKeys(void)
{
- float id = 11;
+ float id = HUD_PANEL_PRESSEDKEYS;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
float chat_prevtime;
void HUD_Chat(void)
{
- float id = 12;
+ float id = HUD_PANEL_CHAT;
vector pos, mySize;
pos = HUD_Panel_GetPos(id);
mySize = HUD_Panel_GetSize(id);
float WR_RELOAD = 9; // (SVQC) does not need to do anything
float WR_RESETPLAYER = 10; // (SVQC) does not need to do anything
float WR_IMPACTEFFECT = 11; // (CSQC) impact effect
+
+
+float HUD_PANEL_WEAPONICONS = 0;
+float HUD_PANEL_INVENTORY = 1;
+float HUD_PANEL_POWERUPS = 2;
+float HUD_PANEL_HEALTHARMOR = 3;
+float HUD_PANEL_NOTIFY = 4;
+float HUD_PANEL_TIMER = 5;
+float HUD_PANEL_RADAR = 6;
+float HUD_PANEL_SCORE = 7;
+float HUD_PANEL_RACETIMER = 8;
+float HUD_PANEL_VOTE = 9;
+float HUD_PANEL_MODICONS = 10;
+float HUD_PANEL_PRESSEDKEYS = 11;
+float HUD_PANEL_CHAT = 12;
+float HUD_PANEL_NUM = 13;
string HUD_Panel_GetName(float id)
{
switch(id) {
- case 0: return "weaponicons"; break;
- case 1: return "inventory"; break;
- case 2: return "powerups"; break;
- case 3: return "healtharmor"; break;
- case 4: return "notify"; break;
- case 5: return "timer"; break;
- case 6: return "radar"; break;
- case 7: return "score"; break;
- case 8: return "racetimer"; break;
- case 9: return "vote"; break;
- case 10: return "modicons"; break;
- case 11: return "pressedkeys"; break;
- case 12: return "chat"; break;
+ case HUD_PANEL_WEAPONICONS: return "weaponicons"; break;
+ case HUD_PANEL_INVENTORY: return "inventory"; break;
+ case HUD_PANEL_POWERUPS: return "powerups"; break;
+ case HUD_PANEL_HEALTHARMOR: return "healtharmor"; break;
+ case HUD_PANEL_NOTIFY: return "notify"; break;
+ case HUD_PANEL_TIMER: return "timer"; break;
+ case HUD_PANEL_RADAR: return "radar"; break;
+ case HUD_PANEL_SCORE: return "score"; break;
+ case HUD_PANEL_RACETIMER: return "racetimer"; break;
+ case HUD_PANEL_VOTE: return "vote"; break;
+ case HUD_PANEL_MODICONS: return "modicons"; break;
+ case HUD_PANEL_PRESSEDKEYS: return "pressedkeys"; break;
+ case HUD_PANEL_CHAT: return "chat"; break;
default: return "";
}
}