Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 111 lines (85 sloc) 2.332 kb
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 100 101 102 103 104 105 106 107 108 109 110
/*
* See Licensing and Copyright notice in naev.h
*/



#ifndef GUI_H
# define GUI_H


#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_load (const char* name);
void gui_cleanup (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_setGeneric ( Pilot* pilot );

/*
* render
*/
void gui_renderReticles( double dt );
void gui_render( double dt );
void gui_renderTargetReticles( int x, int y, int w, int h, const glColour* c );
void gui_forceBlink (void);

/*
* Messages.
*/
void gui_messageInit( int width, int x, int y );
void gui_clearMessages (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_radarGetPos( int *x, int *y );
void gui_radarGetDim( int *w, int *h );
void gui_radarGetRes( int *res );


/*
* Render radar.
*/
void gui_renderPlanet( int ind, RadarShape shape, double w, double h, double res, int overlay );
void gui_renderJumpPoint( int ind, RadarShape shape, double w, double h, double res, int overlay );
void gui_renderPilot( const Pilot* p, RadarShape shape, double w, double h, double res, int overlay );
void gui_renderPlayer( double res, int overlay );


/*
* Targeting.
*/
void gui_targetPlanetGFX( 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_setRadarRel( int mod );
void gui_getOffset( double *x, double *y );
glTexture* gui_hailIcon (void);
char* gui_pick (void);
int gui_onScreenPilot( double *rx, double *ry, Pilot *pilot );
int gui_onScreenAsset( double *rx, double *ry, JumpPoint *jp, Planet *pnt );


#endif /* GUI_H */
Something went wrong with that request. Please try again.