Open source remastering of the Freespace 2 engine
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 */
15 #include "hud/hud.h"
17 //Odd def for escort frames
18 #define NUM_ESCORT_FRAMES 3
20 extern int Max_escort_ships;
22 class object;
25 void hud_escort_init();
26 void hud_setup_escort_list(int level = 1);
28 void hud_add_remove_ship_escort(int objnum, int supress_feedback = 0);
29 void hud_escort_clear_all(bool clear_flags = false);
30 void hud_escort_ship_hit(object *objp, int quadrant);
33 void hud_add_ship_to_escort(int objnum, int supress_feedback);
34 void hud_remove_ship_from_escort(int objnum);
37 void hud_escort_add_player(short id);
38 void hud_escort_remove_player(short id);
40 class HudGaugeEscort: public HudGauge
41 {
42 protected:
45  int header_text_offsets[2]; // coordinates of the header text
46  char header_text[NAME_LENGTH]; // Header text for the Escort Gauge. Default is "monitoring"
47  int list_start_offsets[2]; // Offset Start of the Ship List
48  int entry_h; // the height of each entry
49  int entry_stagger_w; // width of the staircase effect
51  int ship_name_offsets[2]; // Offset of the Ship Name column
52  int ship_integrity_offsets[2]; // Offset of the Ship Hull column
53  int ship_status_offsets[2]; // Offset of the Ship Status column
54  int ship_name_max_width; // max width of ship name entries
55  bool right_align_names; // whether or not to right-align ship names
56 public:
58  void initBitmaps(char *fname_top, char *fname_middle, char *fname_bottom);
59  void initHeaderText(char *text);
60  void initHeaderTextOffsets(int x, int y);
61  void initListStartOffsets(int x, int y);
62  void initEntryHeight(int h);
63  void initEntryStaggerWidth(int w);
64  void initBottomBgOffset(int offset);
65  void initShipNameOffsets(int x, int y);
66  void initShipIntegrityOffsets(int x, int y);
67  void initShipStatusOffsets(int x, int y);
68  void initShipNameMaxWidth(int w);
69  void initRightAlignNames(bool align);
70  int setGaugeColorEscort(int index, int team);
71  virtual void render(float frametime);
72  void pageIn();
73  void renderIcon(int x, int y, int index);
74  void renderIconDogfight(int x, int y, int index);
75 };
77 #endif /* __FREESPACE_HUDESCORT_VIEW_H__ */
hud_frames Escort_gauges[NUM_ESCORT_FRAMES]
Definition: hudescort.h:43
void initShipStatusOffsets(int x, int y)
Definition: hudescort.cpp:194
void initBitmaps(char *fname_top, char *fname_middle, char *fname_bottom)
Definition: hudescort.cpp:210
int hud_escort_return_objnum(int index)
Definition: hudescort.cpp:1032
int entry_stagger_w
Definition: hudescort.h:49
GLfloat GLfloat GLfloat GLfloat h
Definition: Glext.h:7280
int bottom_bg_offset
Definition: hudescort.h:50
GLuint index
Definition: Glext.h:5608
void renderIcon(int x, int y, int index)
Definition: hudescort.cpp:343
void hud_escort_remove_player(short id)
Definition: hudescort.cpp:1074
CButton * team
void initShipNameMaxWidth(int w)
Definition: hudescort.cpp:200
void initEntryHeight(int h)
Definition: hudescort.cpp:167
void initShipNameOffsets(int x, int y)
Definition: hudescort.cpp:182
void hud_escort_cull_list()
Definition: hudescort.cpp:793
object * objp
Definition: lua.cpp:3105
void initHeaderTextOffsets(int x, int y)
Definition: hudescort.cpp:155
Definition: hud.h:201
int ship_integrity_offsets[2]
Definition: hudescort.h:52
GLintptr offset
Definition: Glext.h:5497
void initShipIntegrityOffsets(int x, int y)
Definition: hudescort.cpp:188
void hud_add_remove_ship_escort(int objnum, int supress_feedback=0)
Definition: hudescort.cpp:917
void initHeaderText(char *text)
Definition: hudescort.cpp:150
void hud_setup_escort_list(int level=1)
Definition: hudescort.cpp:651
void renderIconDogfight(int x, int y, int index)
Definition: hudescort.cpp:404
int hud_escort_num_ships_on_list()
Definition: hudescort.cpp:1026
void initRightAlignNames(bool align)
Definition: hudescort.cpp:205
Definition: hud.h:32
void hud_escort_add_player(short id)
Definition: hudescort.cpp:1054
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
Definition: object.h:141
void hud_escort_update_list()
Definition: hudescort.cpp:451
void hud_escort_ship_hit(object *objp, int quadrant)
Definition: hudescort.cpp:989
int setGaugeColorEscort(int index, int team)
Definition: hudescort.cpp:240
Definition: globals.h:15
GLubyte GLubyte GLubyte GLubyte w
Definition: Glext.h:5679
char header_text[NAME_LENGTH]
Definition: hudescort.h:46
int Max_escort_ships
Definition: hudescort.cpp:52
bool right_align_names
Definition: hudescort.h:55
int ship_name_offsets[2]
Definition: hudescort.h:51
void hud_escort_init()
Definition: hudescort.cpp:470
int ship_status_offsets[2]
Definition: hudescort.h:53
Definition: hudescort.h:18
void initListStartOffsets(int x, int y)
Definition: hudescort.cpp:161
void hud_remove_ship_from_escort(int objnum)
Definition: hudescort.cpp:954
int list_start_offsets[2]
Definition: hudescort.h:47
GLint level
Definition: Glext.h:5180
int header_text_offsets[2]
Definition: hudescort.h:45
void hud_escort_clear_all(bool clear_flags=false)
Definition: hudescort.cpp:482
virtual void render(float frametime)
Definition: hudescort.cpp:288
void initBottomBgOffset(int offset)
Definition: hudescort.cpp:177
void hud_escort_target_next()
Definition: hudescort.cpp:1006
void hud_escort_view_toggle()
Definition: hudescort.cpp:838
void hud_add_ship_to_escort(int objnum, int supress_feedback)
Definition: hudescort.cpp:849
GLint y
Definition: Gl.h:1505
int ship_name_max_width
Definition: hudescort.h:54
void initEntryStaggerWidth(int w)
Definition: hudescort.cpp:172