forked from naev/naev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.h
99 lines (88 loc) · 2.47 KB
/
gui.h
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* See Licensing and Copyright notice in naev.h
*/
#pragma once
#include "opengl.h"
#include "pilot.h"
#include "space.h"
/*
* enums
*/
typedef enum RadarShape_ {
RADAR_RECT, /**< Rectangular radar. */
RADAR_CIRCLE /**< Circular radar. */
} RadarShape; /**< Player's radar shape. */
/*
* Loading/cleaning up.
*/
int gui_init (void);
void gui_free (void);
int gui_exists( const char *name );
int gui_load( const char *name );
void gui_cleanup (void);
void gui_reload (void);
/*
* Triggers.
*/
void gui_setCargo (void);
void gui_setNav (void);
void gui_setTarget (void);
void gui_setShip (void);
void gui_setSystem (void);
void gui_updateFaction (void);
void gui_updateEffects (void);
void gui_setGeneric( const Pilot* pilot );
/*
* Rendering.
*/
void gui_renderReticles( double dt );
void gui_render( double dt );
void gui_forceBlink (void);
/*
* Messages.
*/
void gui_messageInit( int width, int x, int y );
void gui_clearMessages (void);
void gui_cooldownEnd (void);
void gui_messageScrollUp( int lines );
void gui_messageScrollDown( int lines );
/*
* Radar.
*/
int gui_radarInit( int circle, int w, int h );
void gui_radarRender( double x, double y );
void gui_radarGetRes( double* res );
int gui_borderClickEvent( SDL_Event *event );
int gui_radarClickEvent( SDL_Event* event );
/*
* Render radar.
*/
void gui_renderSpob( int ind, RadarShape shape, double w, double h, double res, double alpha, int overlay );
void gui_renderJumpPoint( int ind, RadarShape shape, double w, double h, double res, double alpha, int overlay );
void gui_renderPilot( const Pilot* p, RadarShape shape, double w, double h, double res, int overlay );
void gui_renderAsteroid( const Asteroid* a, double w, double h, double res, int overlay );
void gui_renderPlayer( double res, int overlay );
/*
* Targeting.
*/
void gui_targetSpobGFX( glTexture *gfx );
void gui_targetPilotGFX( glTexture *gfx );
/*
* Mouse.
*/
int gui_handleEvent( SDL_Event *evt );
void gui_mouseClickEnable( int enabel );
void gui_mouseMoveEnable( int enabel );
/*
* Misc.
*/
void gui_setViewport( double x, double y, double w, double h );
void gui_clearViewport (void);
void gui_setDefaults (void);
void gui_setRadarResolution( double res );
void gui_setRadarRel( int mod );
void gui_getOffset( double *x, double *y );
glTexture* gui_hailIcon (void);
const char* gui_pick (void);
int gui_onScreenPilot( double *rx, double *ry, const Pilot *pilot );
int gui_onScreenSpob( double *rx, double *ry, const JumpPoint *jp, const Spob *pnt );