File: radarorb.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 (71 lines) | stat: -rw-r--r-- 1,628 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
/*
 * 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 _RADARORB_H
#define _RADARORB_H

#include "radar/radarsetup.h"

extern int Radar_static_looping;

struct object;
struct blip;
struct color;
struct vec3d;

#define NUM_ORB_RING_SLICES 16

class HudGaugeRadarOrb: public HudGaugeRadar
{
	char Radar_fname[MAX_FILENAME_LEN];
	hud_frames Radar_gauge;

	vec3d target_position;

	vec3d orb_ring_yz[NUM_ORB_RING_SLICES];
	vec3d orb_ring_xy[NUM_ORB_RING_SLICES];
	vec3d orb_ring_xz[NUM_ORB_RING_SLICES];

	color Orb_color_orange;
	color Orb_color_teal;
	color Orb_color_purple;
	color Orb_crosshairs;

	float Radar_center_offsets[2];
public:
	HudGaugeRadarOrb();
	void initBitmaps(char *fname);
	void initCenterOffsets(float x, float y);

	void loadDefaultPositions();
	void blipDrawDistorted(blip *b, vec3d *pos);
	void blipDrawFlicker(blip *b, vec3d *pos);
	void blitGauge();
	void drawBlips(int blip_type, int bright, int distort);
	void drawBlipsSorted(int distort);
	void drawContact(vec3d *pnt, int rad);
	void drawContactHtl(vec3d *pnt, int rad);
	void drawContactImage(vec3d *pnt, int rad, int idx, int clr_idx, float mult);
	void drawCrosshairs( vec3d pnt );
	void doneDrawing();
	void doneDrawingHtl();
	void drawOutlines();
	void drawOutlinesHtl();
	void setupView();
	void setupViewHtl();
	int calcAlpha(vec3d* pt);
	void render(float frametime);
	void pageIn();
	void plotBlip(blip *b, vec3d *scaled_pos);
};

#endif