1 #ifndef BUILDING_COUNT_H 2 #define BUILDING_COUNT_H 3 4 #include "core/buffer.h" 5 #include "building/type.h" 6 #include "game/resource.h" 7 8 /** 9 * @file 10 * Building totals 11 */ 12 13 /** 14 * Updates the building counts and does some extra work on the side 15 */ 16 void building_count_update(void); 17 18 /** 19 * Returns the active building count for the type 20 * @param type Building type 21 * @return Number of active buildings 22 */ 23 int building_count_active(building_type type); 24 25 /** 26 * Returns the building count for the type 27 * @param type Building type 28 * @return Total number of buildings 29 */ 30 int building_count_total(building_type type); 31 32 /** 33 * Returns the upgraded building count for the type 34 * @param type Building type 35 * @return Number of upgraded buildings 36 */ 37 38 int building_count_upgraded(building_type type); 39 40 41 /** 42 * Returns the active building count for the resource type 43 * @param resource Resource type 44 * @return Number of active buildings 45 */ 46 int building_count_industry_active(resource_type resource); 47 48 int building_count_colosseum(void); 49 50 int building_count_grand_temples(void); 51 52 int building_count_grand_temples_active(void); 53 54 /** 55 * Returns the building count for the resource type 56 * @param resource Resource type 57 * @return Total number of buildings 58 */ 59 int building_count_industry_total(resource_type resource); 60 61 /** 62 * Save the building counts 63 * @param industry Buffer for industry 64 * @param culture1 Culture part 1 65 * @param culture2 Culture part 2 (schools) 66 * @param culture3 Culture part 3 (temples) 67 * @param military Military 68 * @param support Market and water 69 */ 70 void building_count_save_state( 71 buffer *industry, buffer *culture1, buffer *culture2, buffer *culture3, buffer *military, buffer *support); 72 73 /** 74 * Load the building counts 75 * @param industry Buffer for industry 76 * @param culture1 Culture part 1 77 * @param culture2 Culture part 2 (schools) 78 * @param culture3 Culture part 3 (temples) 79 * @param military Military 80 * @param support Market and water 81 */ 82 void building_count_load_state( 83 buffer *industry, buffer *culture1, buffer *culture2, buffer *culture3, buffer *military, buffer *support, int includes_buffer_size); 84 85 #endif // BUILDING_COUNT_H 86