FS2_Open
Open source remastering of the Freespace 2 engine
hudwingmanstatus.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #include <ctype.h> // for 'tolower'
13 
14 
15 #include "globalincs/alphacolors.h"
16 #include "globalincs/linklist.h"
17 #include "hud/hudtargetbox.h"
18 #include "hud/hudwingmanstatus.h"
19 #include "iff_defs/iff_defs.h"
20 #include "io/timer.h"
21 #include "mission/missionparse.h"
22 #include "network/multi.h"
23 #include "object/object.h"
24 #include "ship/ship.h"
25 #include "weapon/emp.h"
26 
27 
28 #define HUD_WINGMAN_STATUS_NUM_FRAMES 5
29 #define BACKGROUND_LEFT 0
30 #define BACKGROUND_MIDDLE 1
31 #define BACKGROUND_RIGHT 2
32 #define WINGMAN_STATUS_DOTS 3
33 #define WINGMAN_STATUS_NAMES 4
34 
35 #define HUD_WINGMAN_STATUS_NONE 0 // wingman doesn't exist
36 #define HUD_WINGMAN_STATUS_DEAD 1 // wingman has died
37 #define HUD_WINGMAN_STATUS_ALIVE 2 // wingman is in the mission
38 #define HUD_WINGMAN_STATUS_NOT_HERE 3 // wingman hasn't arrived, or has departed
39 
40 typedef struct Wingman_status
41 {
42  int ignore; // set to 1 when we should ignore this item -- used in team v. team
43  int used;
44  float hull[MAX_SHIPS_PER_WING]; // 0.0 -> 1.0
45  int status[MAX_SHIPS_PER_WING]; // HUD_WINGMAN_STATUS_*
47 
49 
50 #define HUD_WINGMAN_UPDATE_STATUS_INTERVAL 200
51 static int HUD_wingman_update_timer;
52 
53 static int HUD_wingman_flash_duration[MAX_SQUADRON_WINGS][MAX_SHIPS_PER_WING];
54 static int HUD_wingman_flash_next[MAX_SQUADRON_WINGS][MAX_SHIPS_PER_WING];
55 static int HUD_wingman_flash_is_bright;
56 
57 // flag a player wing ship as destroyed
58 void hud_set_wingman_status_dead(int wing_index, int wing_pos)
59 {
60  Assert(wing_index >= 0 && wing_index < MAX_SQUADRON_WINGS);
61  Assert(wing_pos >= 0 && wing_pos < MAX_SHIPS_PER_WING);
62 
63  HUD_wingman_status[wing_index].status[wing_pos] = HUD_WINGMAN_STATUS_DEAD;
64 }
65 
66 // flags a given player wing ship as departed
67 void hud_set_wingman_status_departed(int wing_index, int wing_pos)
68 {
69  Assert(wing_index >= 0 && wing_index < MAX_SQUADRON_WINGS);
70  Assert(wing_pos >= 0 && wing_pos < MAX_SHIPS_PER_WING);
71 
72  HUD_wingman_status[wing_index].status[wing_pos] = HUD_WINGMAN_STATUS_NOT_HERE;
73 }
74 
75 // flags a given player wing ship as not existing
76 void hud_set_wingman_status_none( int wing_index, int wing_pos)
77 {
78  int i;
79 
80  Assert(wing_index >= 0 && wing_index < MAX_SQUADRON_WINGS);
81  Assert(wing_pos >= 0 && wing_pos < MAX_SHIPS_PER_WING);
82 
83  HUD_wingman_status[wing_index].status[wing_pos] = HUD_WINGMAN_STATUS_NONE;
84 
85  int used = 0;
86  for ( i = 0; i < MAX_SHIPS_PER_WING; i++ ) {
87  if ( HUD_wingman_status[wing_index].status[i] != HUD_WINGMAN_STATUS_NONE ) {
88  used = 1;
89  break;
90  }
91  }
92 
93  HUD_wingman_status[wing_index].used = used;
94 }
95 
96 // flags a given player wing ship as "alive" (for multiplayer respawns )
97 void hud_set_wingman_status_alive( int wing_index, int wing_pos)
98 {
99  Assert(wing_index >= 0 && wing_index < MAX_SQUADRON_WINGS);
100  Assert(wing_pos >= 0 && wing_pos < MAX_SHIPS_PER_WING);
101 
102  HUD_wingman_status[wing_index].status[wing_pos] = HUD_WINGMAN_STATUS_ALIVE;
103 }
104 
106 {
107 /*
108  int i, j, wing_index;
109 
110  for ( i = 0; i < Num_wings; i++ ) {
111  wing_index = ship_squadron_wing_lookup(Wings[i].name);
112 
113  if ( (wing_index >= 0) && (Wings[i].total_arrived_count == 0) ) {
114  HUD_wingman_status[wing_index].used = 1;
115  for (j = 0; j < Wings[i].wave_count; j++) {
116  HUD_wingman_status[wing_index].status[j] = HUD_WINGMAN_STATUS_NOT_HERE;
117  }
118  }
119  }
120 */
121 }
122 
123 // function which marks the other team wing as not used for the wingman status gauge
125 {
126  int wing_index;
127 
128  // do nothing in single player or non team v. team games
129  if ( Game_mode & GM_NORMAL )
130  return;
131 
132  if ( !IS_MISSION_MULTI_TEAMS )
133  return;
134 
135  Assert(MAX_TVT_WINGS == 2); // Goober5000
136 
137  wing_index = -1;
138  if ( Net_player->p_info.team == 0 )
139  wing_index = 1;
140  else if ( Net_player->p_info.team == 1 )
141  wing_index = 0;
142 
143  if ( wing_index == -1 )
144  return;
145 
146  HUD_wingman_status[wing_index].ignore = 1;
147 }
148 
149 
150 // called once per level to init the wingman status gauge. Loads in the frames the first time
152 {
153  int i, j;
154 
156 
157  HUD_wingman_update_timer=timestamp(0); // update status right away
158 
159  for (i = 0; i < MAX_SQUADRON_WINGS; i++) {
160  HUD_wingman_status[i].ignore = 0;
161  HUD_wingman_status[i].used = 0;
162  for ( j = 0; j < MAX_SHIPS_PER_WING; j++ ) {
163  HUD_wingman_status[i].status[j] = HUD_WINGMAN_STATUS_NONE;
164  }
165  }
166 
170 }
171 
172 // Update the status of the wingman status
174 {
175  if ( timestamp_elapsed(HUD_wingman_update_timer) ) {
176  int wing_index,wing_pos;
177  ship_obj *so;
178  object *ship_objp;
179  ship *shipp;
180 
181  HUD_wingman_update_timer=timestamp(HUD_WINGMAN_UPDATE_STATUS_INTERVAL);
182 
183  for ( so = GET_FIRST(&Ship_obj_list); so != END_OF_LIST(&Ship_obj_list); so = GET_NEXT(so) ) {
184  ship_objp = &Objects[so->objnum];
185  shipp = &Ships[ship_objp->instance];
186 
187  wing_index = shipp->wing_status_wing_index;
188  wing_pos = shipp->wing_status_wing_pos;
189 
190  if ( (wing_index >= 0) && (wing_pos >= 0) && !(ship_objp->flags & OF_SHOULD_BE_DEAD) ) {
191 
192  HUD_wingman_status[wing_index].used = 1;
193  if (!(shipp->flags & SF_DEPARTING) ) {
194  HUD_wingman_status[wing_index].status[wing_pos] = HUD_WINGMAN_STATUS_ALIVE;
195  }
196  HUD_wingman_status[wing_index].hull[wing_pos] = get_hull_pct(ship_objp);
197  if ( HUD_wingman_status[wing_index].hull[wing_pos] <= 0 ) {
198  HUD_wingman_status[wing_index].status[wing_pos] = HUD_WINGMAN_STATUS_DEAD;
199  }
200  }
201  }
202  }
203 }
204 
207 {
208 }
209 
211 {
212  initFlash();
213 
215 }
217 {
218  header_offsets[0] = x;
219  header_offsets[1] = y;
220 }
221 
223 {
224  fixed_header_position = fixed;
225 }
226 
228 {
230 }
231 
233 {
234  single_wing_offsets[0] = x;
235  single_wing_offsets[1] = y;
236 }
237 
239 {
242 }
243 
245 {
246  wing_width = w;
247 }
248 
250 {
252 }
253 
255 {
256  wing_name_offsets[0] = x;
257  wing_name_offsets[1] = y;
258 }
259 
261 {
262  wingmate_offsets[0][0] = x;
263  wingmate_offsets[0][1] = y;
264 }
265 
267 {
268  wingmate_offsets[1][0] = x;
269  wingmate_offsets[1][1] = y;
270 }
271 
273 {
274  wingmate_offsets[2][0] = x;
275  wingmate_offsets[2][1] = y;
276 }
277 
279 {
280  wingmate_offsets[3][0] = x;
281  wingmate_offsets[3][1] = y;
282 }
283 
285 {
286  wingmate_offsets[4][0] = x;
287  wingmate_offsets[4][1] = y;
288 }
289 
291 {
292  wingmate_offsets[5][0] = x;
293  wingmate_offsets[5][1] = y;
294 }
295 
296 void HudGaugeWingmanStatus::initBitmaps(char *fname_left, char *fname_middle, char *fname_right, char *fname_dots)
297 {
299  if ( Wingman_status_left.first_frame == -1 ) {
300  Warning(LOCATION, "Error loading %s\n", fname_left);
301  }
302 
304  if ( Wingman_status_middle.first_frame == -1 ) {
305  Warning(LOCATION, "Error loading %s\n", fname_middle);
306  }
307 
309  if ( Wingman_status_right.first_frame == -1 ) {
310  Warning(LOCATION, "Error loading %s\n", fname_right);
311  }
312 
314  if ( Wingman_status_dots.first_frame == -1 ) {
315  Warning(LOCATION, "Error loading %s\n", fname_dots);
316  }
317 }
318 
320  grow_mode = mode;
321 }
322 
323 void HudGaugeWingmanStatus::renderBackground(int num_wings_to_draw)
324 {
325  int sx, sy, header_x, header_y, bitmap;
326 
327  if((num_wings_to_draw < 1) || (num_wings_to_draw > 5)){
328  Int3();
329  return;
330  }
331 
332  if((num_wings_to_draw > 2) && (grow_mode == GROW_LEFT)) {
333  // make some room for the spacers
334  sx = position[0] - (num_wings_to_draw - 2)*wing_width;
335  } else {
336  sx = position[0];
337  }
338  sy = position[1];
339 
341 
342  if ( bitmap > -1 ) {
343  renderBitmap(bitmap, sx, sy);
344  }
345 
346  //Tell renderDots() where to start
347  actual_origin[0] = sx;
348  actual_origin[1] = sy;
349 
350  // write "wingmen" on gauge
351  if (fixed_header_position) {
352  header_x = position[0] + header_offsets[0];
353  header_y = position[1] + header_offsets[1];
354  } else {
355  header_x = sx + header_offsets[0];
356  header_y = sy + header_offsets[1];
357  }
358  renderString(header_x, header_y, XSTR( "wingmen", 352));
359 
360  // bring us to the end of the left portion so we can draw the last or middle bits depending on how many wings we have to draw
361  if ( grow_mode == GROW_DOWN ) {
362  sy += left_frame_end_x;
363  } else {
364  sx += left_frame_end_x;
365  }
366 
368 
369  if ( grow_mode == GROW_DOWN ) {
370  for ( int i = 0; i < num_wings_to_draw; i++ ) {
371  renderBitmap(bitmap, sx, sy);
372  sy += wing_width;
373  }
374 
376  } else {
377  if(num_wings_to_draw > 2 && bitmap > 0) {
378  for(int i = 0; i < num_wings_to_draw - 2; i++){
379  renderBitmap(bitmap, sx, sy);
380  sx += wing_width;
381  }
382  }
383 
385  }
386 
388  renderBitmap(bitmap, sx, sy);
389 }
390 
391 void HudGaugeWingmanStatus::renderDots(int wing_index, int screen_index, int num_wings_to_draw)
392 {
393  int i, sx, sy, is_bright, bitmap = -1;
394 
395  if ( Wingman_status_dots.first_frame < 0 ) {
396  return;
397  }
398 
399  if(num_wings_to_draw == 1) {
400  sx = position[0] + single_wing_offsets[0];
401  sy = position[1] + single_wing_offsets[1];
402  } else if ( grow_mode == GROW_DOWN ) {
403  sx = actual_origin[0] + multiple_wing_offsets[0]; // wing_width = 35
404  sy = actual_origin[1] + multiple_wing_offsets[1] + screen_index*wing_width;
405  } else {
406  sx = actual_origin[0] + multiple_wing_offsets[0] + (screen_index - 1)*wing_width; // wing_width = 35
408  }
409 
410  // draw wingman dots
411  for ( i = 0; i < MAX_SHIPS_PER_WING; i++ ) {
412 
413  if ( maybeFlashStatus(wing_index, i) ) {
414  is_bright=1;
415  } else {
416  is_bright=0;
417  }
418 
419  switch( HUD_wingman_status[wing_index].status[i] ) {
420 
423  if ( HUD_wingman_status[wing_index].hull[i] > 0.5f ) {
424  // use gauge color
425  setGaugeColor(is_bright ? HUD_C_BRIGHT : HUD_C_NORMAL);
426  } else {
428  }
429  break;
430 
433  bitmap = Wingman_status_dots.first_frame+1;
434  break;
435 
437  setGaugeColor(is_bright ? HUD_C_BRIGHT : HUD_C_NORMAL);
438  bitmap = Wingman_status_dots.first_frame+1;
439  break;
440 
441  default:
442  bitmap=-1;
443  break;
444 
445  } // end swtich
446 
447  if ( bitmap > -1 ) {
448  renderBitmap(bitmap, sx + wingmate_offsets[i][0], sy + wingmate_offsets[i][1]);
449  }
450  }
451 
452  // draw wing name
453  sx += wing_name_offsets[0];
454  sy += wing_name_offsets[1];
455 
456  setGaugeColor();
457 
458  // Goober5000 - get the lowercase abbreviation
459  char abbrev[4];
460  abbrev[0] = (char) tolower(Squadron_wing_names[wing_index][0]);
461  abbrev[1] = (char) tolower(Squadron_wing_names[wing_index][1]);
462  abbrev[2] = (char) tolower(Squadron_wing_names[wing_index][2]);
463  abbrev[3] = '\0';
464 
465  // Goober5000 - center it (round the offset rather than truncate it)
466  int abbrev_width;
467  gr_get_string_size(&abbrev_width, NULL, abbrev);
468  renderString(sx - (int)((float)abbrev_width/2.0f+0.5f), sy, abbrev);
469 }
470 
471 int hud_wingman_status_wingmen_exist(int num_wings_to_draw)
472 {
473  int i, j, count = 0;
474 
475  switch ( num_wings_to_draw ) {
476  case 0:
477  count = 0;
478  break;
479  case 1:
480  for (i = 0; i < MAX_SQUADRON_WINGS; i++) {
481  if ( HUD_wingman_status[i].used > 0 ) {
482  for ( j = 0; j < MAX_SHIPS_PER_WING; j++ ) {
483  if ( HUD_wingman_status[i].status[j] != HUD_WINGMAN_STATUS_NONE ) {
484  count++;
485  }
486  }
487  }
488  }
489  break;
490  default:
491  count = 2;
492  break;
493 
494  }
495 
496  if ( count > 1 ) {
497  return 1;
498  }
499 
500  return 0;
501 }
502 
503 void HudGaugeWingmanStatus::render(float frametime)
504 {
505  int i, count, num_wings_to_draw = 0;
506 
507  for (i = 0; i < MAX_SQUADRON_WINGS; i++) {
508  if ( (HUD_wingman_status[i].used > 0) && (HUD_wingman_status[i].ignore == 0) ) {
509  num_wings_to_draw++;
510  }
511  }
512 
513  if ( !hud_wingman_status_wingmen_exist(num_wings_to_draw) ) {
514  return;
515  }
516 
517  // hud_set_default_color();
518  setGaugeColor();
519 
520  // blit the background frames
521  renderBackground(num_wings_to_draw);
522 
523  count = 0;
524  for (i = 0; i < MAX_SQUADRON_WINGS; i++) {
525  if ( (HUD_wingman_status[i].used <= 0) || (HUD_wingman_status[i].ignore == 1) ) {
526  continue;
527  }
528 
529  renderDots(i, count, num_wings_to_draw);
530  count++;
531  }
532 }
533 
534 // init the flashing timers for the wingman status gauge
536 {
537  int i, j;
538 
539  for ( i = 0; i < MAX_SQUADRON_WINGS; i++ ) {
540  for ( j = 0; j < MAX_SHIPS_PER_WING; j++ ) {
541  HUD_wingman_flash_duration[i][j] = timestamp(0);
542  HUD_wingman_flash_next[i][j] = timestamp(0);
543  }
544  }
545 
546  HUD_wingman_flash_is_bright = 0;
547 }
548 
550 {
551  int i, j;
552 
553  for ( i = 0; i < MAX_SQUADRON_WINGS; i++ ) {
554  for ( j = 0; j < MAX_SHIPS_PER_WING; j++ ) {
555  next_flash[i][j] = timestamp(0);
556  }
557  }
558 
559  flash_status = 0;
560 }
561 
562 // start the targetbox item flashing for TBOX_FLASH_DURATION
563 void hud_wingman_status_start_flash(int wing_index, int wing_pos)
564 {
565  HUD_wingman_flash_duration[wing_index][wing_pos] = timestamp(TBOX_FLASH_DURATION);
566 }
567 
568 // set the color for flashing dot
569 // exit: 1 => set bright color
570 // 0 => set default color
571 int hud_wingman_status_maybe_flash(int wing_index, int wing_pos)
572 {
573  int index, draw_bright=0;
574 
575  index = wing_index*MAX_SHIPS_PER_WING + wing_pos;
576 
577  if ( !timestamp_elapsed(HUD_wingman_flash_duration[wing_index][wing_pos]) ) {
578  if ( timestamp_elapsed(HUD_wingman_flash_next[wing_index][wing_pos]) ) {
579  HUD_wingman_flash_next[wing_index][wing_pos] = timestamp(TBOX_FLASH_INTERVAL);
580  HUD_wingman_flash_is_bright ^= (1<<index); // toggle between default and bright frames
581  }
582 
583  if ( HUD_wingman_flash_is_bright & (1<<index) ) {
584  draw_bright=1;
585  }
586  }
587 
588  return draw_bright;
589 }
590 
591 bool HudGaugeWingmanStatus::maybeFlashStatus(int wing_index, int wing_pos)
592 {
593  int index;
594  bool draw_bright = false;
595 
596  index = wing_index*MAX_SHIPS_PER_WING + wing_pos;
597 
598  if ( !timestamp_elapsed(HUD_wingman_flash_duration[wing_index][wing_pos]) ) {
599  if ( timestamp_elapsed(next_flash[wing_index][wing_pos]) ) {
600  next_flash[wing_index][wing_pos] = timestamp(TBOX_FLASH_INTERVAL);
601  flash_status ^= (1<<index); // toggle between default and bright frames
602  }
603 
604  if ( flash_status & (1<<index) ) {
605  draw_bright = true;
606  }
607  }
608 
609  return draw_bright;
610 }
611 
613 {
614  int wing_index;
615 
616  // Check for squadron wings
617  wing_index = ship_squadron_wing_lookup(wingp->name);
618  if ( wing_index < 0 )
619  return;
620 
621  // this wing is shown on the squadron display
622  shipp->wing_status_wing_index = (char) wing_index;
623 
624  // for the first wave, just use the parse object position
625  if (wingp->current_wave == 1)
626  {
627  shipp->wing_status_wing_pos = (char) pobjp->pos_in_wing;
628  }
629  // for subsequent waves, find the first position not taken
630  else
631  {
632  int i, pos, wing_bitfield = 0;
633 
634  // fill in all the positions currently used by this wing
635  for (i = 0; i < wingp->wave_count; i++)
636  {
637  pos = Ships[wingp->ship_index[i]].wing_status_wing_pos;
638  if (pos >= 0)
639  wing_bitfield |= (1<<pos);
640  }
641 
642  // now assign the first available slot
643  for (i = 0; i < MAX_SHIPS_PER_WING; i++)
644  {
645  if (!(wing_bitfield & (1<<i)))
646  {
647  shipp->wing_status_wing_pos = (char) i;
648  break;
649  }
650  }
651  }
652 }
653 
655 {
660 }
void hud_init_wingman_status_gauge()
virtual void initialize()
Definition: hud.cpp:1049
void hud_set_wingman_status_none(int wing_index, int wing_pos)
int timestamp(int delta_ms)
Definition: timer.cpp:226
int i
Definition: multi_pxo.cpp:466
char wing_status_wing_pos
Definition: ship.h:553
#define HUD_WINGMAN_STATUS_NONE
#define HUD_OBJECT_WINGMAN_STATUS
Definition: hudparse.h:82
int hud_wingman_status_wingmen_exist(int num_wings_to_draw)
#define HUD_C_BRIGHT
Definition: hud.h:162
int pos_in_wing
Definition: missionparse.h:385
int Game_mode
Definition: systemvars.cpp:24
void renderDots(int wing_index, int screen_index, int num_wings_to_draw)
net_player * Net_player
Definition: multi.cpp:94
void hud_wingman_status_update()
color Color_red
Definition: alphacolors.cpp:34
#define IS_MISSION_MULTI_TEAMS
Definition: missionparse.h:96
GLuint index
Definition: Glext.h:5608
char wing_status_wing_index
Definition: ship.h:552
#define VM_WARP_CHASE
Definition: systemvars.h:37
void initWingmate4Offsets(int x, int y)
#define HUD_WINGMAN_UPDATE_STATUS_INTERVAL
void setGaugeColor(int bright_index=-4)
Definition: hud.cpp:445
void initWingmate6Offsets(int x, int y)
int bitmap
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
Assert(pm!=NULL)
float hull[MAX_SHIPS_PER_WING]
void hud_wingman_status_set_index(wing *wingp, ship *shipp, p_object *pobjp)
#define VM_EXTERNAL
Definition: systemvars.h:31
GLclampf f
Definition: Glext.h:7097
void hud_set_wingman_status_departed(int wing_index, int wing_pos)
Definition: ship.h:1516
void initFixedHeaderPosition(bool fixed)
GLenum mode
Definition: Glext.h:5794
int next_flash[MAX_SQUADRON_WINGS][MAX_SHIPS_PER_WING]
void render(float frametime)
void gr_set_color_fast(color *dst)
Definition: 2d.cpp:1197
uint flags
Definition: ship.h:644
#define MAX_SHIPS_PER_WING
Definition: globals.h:52
#define HUD_WINGMAN_STATUS_ALIVE
#define Int3()
Definition: pstypes.h:292
#define MAX_SQUADRON_WINGS
Definition: globals.h:55
ship * shipp
Definition: lua.cpp:9162
#define MAX_TVT_WINGS
Definition: globals.h:59
void initRightBgOffset(int offset)
int bm_load_animation(const char *real_filename, int *nframes, int *fps, int *keyframe, int can_drop_frames, int dir_type)
Loads a bitmap sequance so we can draw with it.
Definition: bmpman.cpp:1420
Definition: hud.h:201
wingman_status HUD_wingman_status[MAX_SQUADRON_WINGS]
int objnum
Definition: ship.h:1483
int instance
Definition: object.h:150
#define TBOX_FLASH_DURATION
Definition: hudtargetbox.h:21
GLintptr offset
Definition: Glext.h:5497
#define VM_DEAD_VIEW
Definition: systemvars.h:33
net_player_info p_info
Definition: multi.h:473
hud_frames Wingman_status_middle
int wingmate_offsets[MAX_SHIPS_PER_WING][2]
char name[NAME_LENGTH]
Definition: ship.h:1517
void hud_wingman_kill_multi_teams()
float get_hull_pct(object *objp)
Definition: object.cpp:271
int num_frames
Definition: hud.h:34
char Squadron_wing_names[MAX_SQUADRON_WINGS][NAME_LENGTH]
Definition: ship.cpp:140
void initMultipleWingOffsets(int x, int y)
#define w(p)
Definition: modelsinc.h:68
void initBitmaps(char *fname_left, char *fname_middle, char *fname_right, char *fname_dots)
hud_frames Wingman_status_left
Definition: bmpman.h:101
#define HUD_WINGMAN_STATUS_NOT_HERE
hud_frames Wingman_status_dots
Definition: ship.h:534
bool maybeFlashStatus(int wing_index, int wing_pos)
void renderString(int x, int y, const char *str)
Definition: hud.cpp:665
int wave_count
Definition: ship.h:1527
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
object Objects[MAX_OBJECTS]
Definition: object.cpp:62
const char * XSTR(const char *str, int index)
Definition: localize.cpp:851
int hud_wingman_status_maybe_flash(int wing_index, int wing_pos)
void initHeaderOffsets(int x, int y)
color Color_bright_red
Definition: alphacolors.cpp:34
struct Wingman_status wingman_status
int first_frame
Definition: hud.h:33
#define HUD_WINGMEN_STATUS
Definition: hudgauges.h:49
void renderBackground(int num_wings_to_draw)
ship Ships[MAX_SHIPS]
Definition: ship.cpp:122
#define SF_DEPARTING
Definition: ship.h:475
#define HUD_C_NORMAL
Definition: hud.h:164
GLubyte GLubyte GLubyte GLubyte w
Definition: Glext.h:5679
void hud_wingman_status_init_flash()
int position[2]
Definition: hud.h:204
void bm_page_in_aabitmap(int bitmapnum, int nframes)
Marks a texture as being used for this level, and is anti-aliased.
Definition: bmpman.cpp:2354
void hud_wingman_status_init_late_wings()
void gr_get_string_size(int *w, int *h, const char *text, int len=9999)
Definition: font.cpp:196
void initWingNameOffsets(int x, int y)
void hud_set_wingman_status_dead(int wing_index, int wing_pos)
int current_wave
Definition: ship.h:1522
void initSingleWingOffsets(int x, int y)
void hud_set_wingman_status_alive(int wing_index, int wing_pos)
ship_obj Ship_obj_list
Definition: ship.cpp:162
#define LOCATION
Definition: pstypes.h:245
#define VM_PADLOCK_ANY
Definition: systemvars.h:46
#define HUD_WINGMAN_STATUS_DEAD
#define timestamp_elapsed(stamp)
Definition: timer.h:102
void initWingmate1Offsets(int x, int y)
#define OF_SHOULD_BE_DEAD
Definition: object.h:106
hull_check pos
Definition: lua.cpp:5050
#define TBOX_FLASH_INTERVAL
Definition: hudtargetbox.h:22
void hud_wingman_status_start_flash(int wing_index, int wing_pos)
GLint GLsizei count
Definition: Gl.h:1491
void initWingmate3Offsets(int x, int y)
int ship_index[MAX_SHIPS_PER_WING]
Definition: ship.h:1531
#define VM_OTHER_SHIP
Definition: systemvars.h:35
#define GM_NORMAL
Definition: systemvars.h:19
false
Definition: lua.cpp:6789
uint flags
Definition: object.h:151
hud_frames Wingman_status_right
GLint y
Definition: Gl.h:1505
int status[MAX_SHIPS_PER_WING]
void renderBitmap(int x, int y)
Definition: hud.cpp:782
int ship_squadron_wing_lookup(const char *wing_name)
Definition: ship.cpp:17636
void initWingmate5Offsets(int x, int y)
void initWingmate2Offsets(int x, int y)