File: hudwingmanstatus.h

package info (click to toggle)
freespace2 3.7.0%2Brepack-2
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 22,848 kB
  • ctags: 41,897
  • sloc: cpp: 369,931; makefile: 1,060; xml: 129; sh: 112
file content (80 lines) | stat: -rw-r--r-- 2,457 bytes parent folder | download
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
/*
 * 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 __HUDWINGMAN_STATUS_H__
#define __HUDWINGMAN_STATUS_H__

#include "hud/hud.h"

void	hud_init_wingman_status_gauge();
void	hud_wingman_status_update();
void	hud_wingman_status_render();
void	hud_wingman_status_init_flash();
int	hud_wingman_status_maybe_flash(int wing_index, int wing_pos);
void	hud_set_wingman_status_dead(int wing_index, int wing_pos);
void	hud_set_wingman_status_departed(int wing_index, int wing_pos);
void	hud_set_wingman_status_alive( int wing_index, int wing_pos);
void	hud_set_wingman_status_none( int wing_index, int wing_pos);
void	hud_wingman_status_start_flash(int wing_index, int wing_pos);
void	hud_wingman_status_set_index(int shipnum);

class HudGaugeWingmanStatus: public HudGauge
{
protected:
	hud_frames Wingman_status_left;
	hud_frames Wingman_status_middle;
	hud_frames Wingman_status_right;
	hud_frames Wingman_status_dots;

	int header_offsets[2];
	int left_frame_end_x;
	int right_frame_start_offset;
	
	int actual_origin[2];
	int single_wing_offsets[2];
	int multiple_wing_offsets[2];
	int wing_width;
	int wing_name_offsets[2];

	enum {GROW_LEFT, GROW_RIGHT, GROW_DOWN};
	int grow_mode;

	int wingmate_offsets[MAX_SHIPS_PER_WING][2];

	int next_flash[MAX_SQUADRON_WINGS][MAX_SHIPS_PER_WING];
	int flash_status;
public:
	HudGaugeWingmanStatus();
	void initBitmaps(char *fname_left, char *fname_middle, char *fname_right, char *fname_dots);
	void initHeaderOffsets(int x, int y);
	void initLeftFrameEndX(int x);
	void initSingleWingOffsets(int x, int y);
	void initMultipleWingOffsets(int x, int y);
	void initWingWidth(int w);
	void initRightBgOffset(int offset);
	void initWingNameOffsets(int x, int y);
	void initWingmate1Offsets(int x, int y);
	void initWingmate2Offsets(int x, int y);
	void initWingmate3Offsets(int x, int y);
	void initWingmate4Offsets(int x, int y);
	void initWingmate5Offsets(int x, int y);
	void initWingmate6Offsets(int x, int y);
	void initGrowMode(int mode);
	void pageIn();
	void initialize();
	void render(float frametime);
	void renderBackground(int num_wings_to_draw);
	void renderDots(int wing_index, int screen_index, int num_wings_to_draw);
	void initFlash();
	bool maybeFlashStatus(int wing_index, int wing_pos);
};

#endif