1 /* ---------------------------------------------------------------------- * 2 * mps.h 3 * This file is part of lincity. 4 * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001. 5 * ---------------------------------------------------------------------- */ 6 7 #ifndef __mps_h__ 8 #define __mps_h__ 9 10 #include "geometry.h" 11 #include "cliglobs.h" 12 13 void mps_full_refresh (void); 14 void mappoint_stats (int, int, int); 15 16 /* New, simplified mps routines */ 17 18 #define MPS_MAP 0 /* Left click on map; x/y module statistics */ 19 #define MPS_ENV 1 /* Right click on map; x/y environmental status */ 20 #define MPS_GLOBAL 2 /* Global style; choose one of below */ 21 22 #define MPS_GLOBAL_FINANCE 0 /* Overall financial information */ 23 #define MPS_GLOBAL_OTHER_COSTS 1 /* More detailed financials */ 24 #define MPS_GLOBAL_HOUSING 2 /* Citywide population information */ 25 26 #define MPS_GLOBAL_STYLES 3 /* Number of global styles */ 27 28 #define MPS_INFO_CHARS (MAPPOINT_STATS_W / 8) + 1 29 30 void mps_init(); 31 32 int mps_set(int style, int x, int y); /* Attaches an area or global display */ 33 void mps_redraw(void); /* Re-draw the mps area, bezel and all */ 34 void mps_refresh(void); /* refresh the information display's contents */ 35 void mps_update(void); /* Update text contents for later display (refresh) */ 36 void mps_global_advance(void); /* Changes global var to next display */ 37 38 39 /* mps_info storage functions; place values of corresponding type into 40 mps_info[], performing certain pretification. The single argument 41 forms center their argument. The dual arguments left-justify the 42 first and right-justify the second. the ..p forms put a % after 43 the second argument 44 */ 45 void mps_store_title(int i, char * t); 46 void mps_store_fp(int i, double f); 47 void mps_store_f(int i, double f); 48 void mps_store_d(int i, int d); 49 50 void mps_store_ss(int i, char * s1, char * s2); 51 void mps_store_sd(int i, char * s, int d); 52 void mps_store_sfp(int i, char * s, double fl); 53 54 void mps_store_sss(int i, char * s1, char * s2, char * s3); 55 56 57 /* Data for new mps routines */ 58 extern char mps_info[MAPPOINT_STATS_LINES][MPS_INFO_CHARS]; 59 extern int mps_global_style; 60 61 /* MPS Global displays */ 62 void mps_global_finance(void); 63 void mps_global_other_costs(void); 64 void mps_global_housing(void); 65 void mps_right (int x, int y); 66 67 68 #define _generic_mps 69 #ifdef _generic_mps 70 #endif 71 72 73 #endif /* __mps_h__ */ 74 75