Merge branch 'master' of git://github.com/BTAxis/naev into testmission
[naev.git] / src / economy.h
blob9e8d0fbfb4c81718b58ed869fd188d62b6ce5e1a
1 /*
2 * See Licensing and Copyright notice in naev.h
3 */
7 #ifndef ECONOMY_H
8 # define ECONOMY_H
11 #include <stdint.h>
14 /**
15 * @struct Commodity
17 * @brief Represents a commodity.
19 * @todo Use inverse normal?
21 typedef struct Commodity_ {
22 char* name; /**< Name of the commodity. */
23 char* description; /**< Description of the commodity. */
24 /* Prices. */
25 double price; /**< Base price of the commodity. */
26 } Commodity;
30 * Commodity stuff.
32 Commodity* commodity_get( const char* name );
33 int commodity_load (void);
34 void commodity_free (void);
38 * Economy stuff.
40 int economy_init (void);
41 int economy_update( unsigned int dt );
42 int economy_refresh (void);
43 void economy_destroy (void);
46 /*
47 * Misc stuff.
49 void credits2str( char *str, uint64_t credits, int decimals );
50 void commodity_Jettison( int pilot, Commodity* com, int quantity );
53 #endif /* ECONOMY_H */