File: radar.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 (69 lines) | stat: -rw-r--r-- 1,921 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
/*
 * 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 _RADAR_H
#define _RADAR_H

#include "radar/radarsetup.h"

extern int Radar_static_looping;

struct object;
struct blip;
struct color;

extern void radar_init_std();
extern void radar_plot_object_std( object *objp );
extern void radar_frame_init_std();
extern void radar_mission_init_std();
extern void radar_frame_render_std(float frametime);

// observer hud rendering code uses this function
void radar_draw_blips_sorted_std(int distort);
void radar_draw_range_std();
void radar_blit_gauge_std();
void radar_stuff_blip_info_std(object *objp, int is_bright, color **blip_color, int *blip_type);
void radar_null_nblips_std();
void radar_draw_circle_std( int x, int y, int rad );
void radar_blip_draw_distorted_std(blip *b);
void radar_blip_draw_flicker_std(blip *b);
void radar_draw_image_std( int x, int y, int rad, int idx, int size);

class HudGaugeRadarStd: public HudGaugeRadar
{
	hud_frames Radar_gauge;

	int current_target_x, current_target_y;
	color radar_crosshairs;

	// formerly parts of Current_radar_global
	float Radar_center_offsets[2];
public:
	HudGaugeRadarStd();
	void initCenterOffsets(float x, float y);
	void initBitmaps(char *fname);

	void blipDrawDistorted(blip *b, int x, int y);
	void blipDrawFlicker(blip *b, int x, int y);
	void blitGauge();
	void drawBlips(int blip_type, int bright, int distort);
	void drawBlipsSorted(int distort);
	void drawContactCircle( int x, int y, int rad );
	void drawContactImage( int x, int y, int rad, int idx, int clr_idx, int size );
	void drawCrosshairs(int x, int y);
	void render(float frametime);
	void pageIn();
	void plotBlip(blip *b, int *x, int *y);
	void plotObject( object *objp );
};

#endif