Lephisto/src/economy.h

24 lines
631 B
C

#pragma once
typedef struct Commodity_ {
char* name; /**< Name of the commodity. */
char* description; /**< Description of the commodity. */
double price; /**< Base price of the commodity. */
} Commodity;
/* Commidity stuff. */
Commodity* commodity_get(const char* name);
int commodity_load(void);
void commodity_free(void);
/* Economy stuff. */
int economy_init(void);
int economy_update(unsigned int dt);
int economy_refresh(void);
void economy_destroy(void);
/* Misc. */
void credits2str(char* str, unsigned int credits, int decimals);
void commodity_Jettison(int pilot, Commodity* com, int quantity);