naev 0.12.6
map.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "opengl_tex.h"
7#include "outfit.h"
8#include "space.h"
9
10#define MAP_WDWNAME "wdwStarMap"
11
12#define SYS_VOLATILITY_VOLATILE 50.
13#define SYS_VOLATILITY_DANGEROUS 50.
14
18typedef struct MapDecorator_ {
20 double x, y;
23
27typedef enum MapMode_ {
28 MAPMODE_TRAVEL,
29 MAPMODE_DISCOVER,
31 MAPMODE_TRADE,
32 MAPMODE_EDITOR,
33} MapMode;
34
35/* init/exit */
36int map_init( void );
37void map_exit( void );
38
39/* open the map window */
40void map_open( void );
41void map_close( void );
42int map_isOpen( void );
43
44/* misc */
45StarSystem *const *map_getRoute( void );
46StarSystem *map_getDestination( int *jumps );
47void map_setZoom( unsigned int wid, double zoom );
48void map_select( const StarSystem *sys, char shifted );
49void map_cycleMissions( int dir );
50void map_toggleNotes( void );
51void map_cleanup( void );
52void map_clear( void );
53void map_jump( void );
54
55/* manipulate universe stuff */
56StarSystem **map_getJumpPath( StarSystem *sysstart, const vec2 *posstart,
57 StarSystem *sysend, int ignore_known,
58 int show_hidden, StarSystem **old_data,
59 double *o_distance );
60int map_map( const Outfit *map );
61int map_isUseless( const Outfit *map );
62
63/* Local map stuff. */
64int localmap_map( const Outfit *lmap );
65int localmap_isUseless( const Outfit *lmap );
66
67/* shows a map at x, y (relative to wid) with size w,h */
68void map_show( int wid, int x, int y, int w, int h, double zoom, double xoff,
69 double yoff );
70int map_center( int wid, const char *sys );
71
72/* Internal rendering sort of stuff. */
73void map_renderParams( double bx, double by, double xpos, double ypos, double w,
74 double h, double zoom, double *x, double *y, double *r );
75void map_renderFactionDisks( double x, double y, double zoom, double r,
76 int editor, double alpha );
77void map_renderSystemEnvironment( double x, double y, double zoom, int editor,
78 double alpha );
79void map_renderDecorators( double x, double y, double zoom, int editor,
80 double alpha );
81void map_renderJumps( double x, double y, double zoom, double radius,
82 int editor );
83void map_renderSystems( double bx, double by, double x, double y, double zoom,
84 double w, double h, double r, MapMode mode );
85void map_renderNotes( double bx, double by, double x, double y, double zoom,
86 double w, double h, int editor, double alpha );
87void map_renderNames( double bx, double by, double x, double y, double zoom,
88 double w, double h, int editor, double alpha );
89void map_updateFactionPresence( const unsigned int wid, const char *name,
90 const StarSystem *sys, int omniscient );
91int map_load( void );
Images to be shown on the map.
Definition map.h:18
double y
Definition map.h:20
glTexture * image
Definition map.h:19
int detection_radius
Definition map.h:21
A ship outfit, depends radically on the type.
Definition outfit.h:372
Abstraction for rendering sprite sheets.
Definition opengl_tex.h:43
Represents a 2d vector.
Definition vec2.h:45