1 #ifndef CITY_DATA_PRIVATE_H 2 #define CITY_DATA_PRIVATE_H 3 4 #include <stdint.h> 5 6 #include "city/emperor.h" 7 #include "city/finance.h" 8 #include "city/houses.h" 9 #include "city/labor.h" 10 #include "city/resource.h" 11 #include "map/point.h" 12 13 typedef struct { 14 int8_t happiness; 15 int8_t target_happiness; 16 int8_t wrath_bolts; 17 int8_t blessing_done; 18 int8_t small_curse_done; 19 int32_t months_since_festival; 20 int8_t happy_bolts; 21 int8_t unused2; 22 int8_t unused3; 23 } god_status; 24 25 extern struct city_data_t { 26 struct { 27 int16_t senate_placed; 28 uint8_t senate_x; 29 uint8_t senate_y; 30 int16_t senate_grid_offset; 31 int32_t senate_building_id; 32 int32_t hippodrome_placed; 33 int8_t barracks_x; 34 int8_t barracks_y; 35 int16_t barracks_grid_offset; 36 int32_t barracks_building_id; 37 int32_t barracks_placed; 38 int8_t distribution_center_x; 39 int8_t distribution_center_y; 40 int16_t distribution_center_grid_offset; 41 int32_t distribution_center_building_id; 42 int32_t distribution_center_placed; 43 int32_t trade_center_building_id; 44 int8_t triumphal_arches_available; 45 int8_t triumphal_arches_placed; 46 int16_t working_wharfs; 47 int32_t caravanserai_building_id; 48 int32_t shipyard_boats_requested; 49 int16_t working_docks; 50 int16_t working_dock_ids[10]; 51 int32_t mission_post_operational; 52 map_point main_native_meeting; 53 int8_t unknown_value; 54 int32_t mess_hall_building_id; 55 int32_t num_striking_industries; 56 } building; 57 struct { 58 int16_t animals; 59 int32_t attacking_natives; 60 int32_t enemies; 61 int32_t imperial_soldiers; 62 int32_t rioters; 63 int32_t robbers; 64 int32_t looters; 65 int32_t protesters; 66 int32_t soldiers; 67 int32_t security_breach_duration; 68 } figure; 69 house_demands houses; 70 struct { 71 emperor_gift gifts[3]; 72 int32_t selected_gift_size; 73 int32_t months_since_gift; 74 int32_t gift_overdose_penalty; 75 76 int32_t debt_state; 77 int32_t months_in_debt; 78 79 int32_t player_rank; 80 int32_t salary_rank; 81 int32_t salary_amount; 82 int32_t donate_amount; 83 int32_t personal_savings; 84 struct { 85 int32_t count; 86 int32_t size; 87 int32_t soldiers_killed; 88 int32_t warnings_given; 89 int32_t days_until_invasion; 90 int32_t duration_day_countdown; 91 int32_t retreat_message_shown; 92 } invasion; 93 } emperor; 94 struct { 95 uint8_t total_legions; 96 uint8_t total_soldiers; 97 uint8_t empire_service_legions; 98 int32_t legionary_legions; 99 int32_t native_attack_duration; 100 int32_t soldiers_in_city; // soldiers not on campaign, needing food from mess hall 101 } military; 102 struct { 103 uint8_t city; 104 int8_t city_foreign_months_left; 105 int8_t total_count; 106 int8_t won_count; 107 uint8_t enemy_strength; 108 uint8_t roman_strength; 109 int8_t months_until_battle; 110 int8_t roman_months_to_travel_forth; 111 int8_t roman_months_to_travel_back; 112 int8_t enemy_months_traveled; 113 int8_t roman_months_traveled; 114 } distant_battle; 115 struct { 116 int32_t treasury; 117 int32_t tax_percentage; 118 int32_t estimated_tax_income; 119 int32_t estimated_wages; 120 finance_overview last_year; 121 finance_overview this_year; 122 int32_t interest_so_far; 123 int32_t salary_so_far; 124 int32_t wages_so_far; 125 int32_t levies_so_far; 126 int16_t stolen_this_year; 127 int16_t stolen_last_year; 128 int32_t cheated_money; 129 int32_t tribute_not_paid_last_year; 130 int32_t tribute_not_paid_total_years; 131 int32_t wage_rate_paid_this_year; 132 int32_t wage_rate_paid_last_year; 133 int32_t tourism_rating; 134 int32_t tourism_last_month; 135 int32_t tourism_lowest_factor; 136 int32_t tourism_last_year; 137 int16_t tourism_this_year; 138 int16_t tourist_spawn_delay; 139 } finance; 140 struct { 141 int32_t taxed_plebs; 142 int32_t taxed_patricians; 143 int32_t untaxed_plebs; 144 int32_t untaxed_patricians; 145 int32_t percentage_taxed_plebs; 146 int32_t percentage_taxed_patricians; 147 int32_t percentage_taxed_people; 148 struct { 149 int32_t collected_plebs; 150 int32_t collected_patricians; 151 int32_t uncollected_plebs; 152 int32_t uncollected_patricians; 153 } yearly; 154 struct { 155 int32_t collected_plebs; 156 int32_t collected_patricians; 157 int32_t uncollected_plebs; 158 int32_t uncollected_patricians; 159 } monthly; 160 } taxes; 161 struct { 162 int32_t population; 163 int32_t population_last_year; 164 int32_t school_age; 165 int32_t academy_age; 166 int32_t working_age; 167 struct { 168 int32_t values[2400]; 169 int32_t next_index; 170 int32_t count; 171 } monthly; 172 int16_t at_age[100]; 173 int32_t at_level[20]; 174 175 int32_t yearly_update_requested; 176 int32_t yearly_births; 177 int32_t yearly_deaths; 178 int32_t lost_removal; 179 int32_t lost_homeless; 180 int32_t lost_troop_request; 181 int32_t last_change; 182 int32_t total_all_years; 183 int32_t total_years; 184 int32_t average_per_year; 185 int32_t highest_ever; 186 int32_t total_capacity; 187 int32_t room_in_houses; 188 189 int32_t people_in_tents; 190 int32_t people_in_tents_shacks; 191 int32_t people_in_large_insula_and_above; 192 int32_t people_in_villas_palaces; 193 int32_t percentage_plebs; 194 195 int32_t last_used_house_add; 196 int32_t last_used_house_remove; 197 int32_t graph_order; 198 } population; 199 struct { 200 int32_t wages; 201 int32_t wages_rome; 202 int32_t workers_available; 203 int32_t workers_employed; 204 int32_t workers_unemployed; 205 int32_t workers_needed; 206 int32_t unemployment_percentage; 207 int32_t unemployment_percentage_for_senate; 208 labor_category_data categories[10]; 209 } labor; 210 struct { 211 int32_t immigration_duration; 212 int32_t emigration_duration; 213 int32_t immigration_amount_per_batch; 214 int32_t emigration_amount_per_batch; 215 int32_t immigration_queue_size; 216 int32_t emigration_queue_size; 217 int32_t immigrated_today; 218 int32_t emigrated_today; 219 int32_t refused_immigrants_today; 220 int32_t no_immigration_cause; 221 int32_t percentage; 222 int32_t newcomers; 223 int32_t emigration_message_shown; 224 } migration; 225 struct { 226 int32_t value; 227 int32_t previous_value; 228 int32_t message_delay; 229 230 int8_t include_tents; 231 int32_t unemployment; 232 int32_t wages; 233 int32_t low_mood_cause; 234 int16_t blessing_festival_boost; 235 236 int32_t protesters; 237 int32_t criminals; // muggers+rioters 238 int8_t crime_cooldown; 239 } sentiment; 240 struct { 241 int32_t num_hospital_workers; 242 int32_t target_value; 243 int32_t value; 244 } health; 245 struct { 246 int32_t culture; 247 int32_t prosperity; 248 int32_t peace; 249 int32_t favor; 250 struct { 251 int32_t theater; 252 int32_t religion; 253 int32_t school; 254 int32_t library; 255 int32_t academy; 256 } culture_points; 257 int32_t prosperity_treasury_last_year; 258 int32_t prosperity_max; 259 int32_t peace_destroyed_buildings; 260 int32_t peace_years_of_peace; 261 int32_t peace_num_criminals; 262 int32_t peace_num_rioters; 263 int32_t peace_riot_cause; 264 int32_t favor_salary_penalty; 265 int32_t favor_milestone_penalty; 266 int32_t favor_ignored_request_penalty; 267 int32_t favor_last_year; 268 int32_t favor_change; // 0 = dropping, 1 = stalling, 2 = rising 269 270 int32_t selected; 271 int32_t culture_explanation; 272 int32_t prosperity_explanation; 273 int32_t peace_explanation; 274 int32_t favor_explanation; 275 } ratings; 276 struct { 277 int32_t average_entertainment; 278 int32_t average_religion; 279 int32_t average_education; 280 int32_t average_health; 281 int32_t religion_coverage; 282 int32_t population_with_venus_access; 283 int32_t average_desirability; 284 } culture; 285 struct { 286 god_status gods[5]; 287 int32_t least_happy_god; 288 int32_t angry_message_delay; 289 int32_t venus_curse_active; 290 int32_t venus_blessing_months_left; 291 int32_t neptune_double_trade_active; 292 int32_t neptune_sank_ships; 293 int32_t mars_spirit_power; 294 } religion; 295 struct { 296 int32_t theater_shows; 297 int32_t theater_no_shows_weighted; 298 int32_t amphitheater_shows; 299 int32_t amphitheater_no_shows_weighted; 300 int32_t colosseum_shows; 301 int32_t colosseum_no_shows_weighted; 302 int32_t arena_shows; 303 int32_t arena_no_shows_weighted; 304 int32_t hippodrome_shows; 305 int32_t hippodrome_no_shows_weighted; 306 int32_t venue_needing_shows; 307 int32_t hippodrome_has_race; 308 int32_t hippodrome_message_shown; 309 int32_t colosseum_message_shown; 310 } entertainment; 311 struct { 312 struct { 313 int32_t months_to_go; 314 int32_t god; 315 int32_t size; 316 } planned; 317 struct { 318 int32_t god; 319 int32_t size; 320 } selected; 321 int32_t small_cost; 322 int32_t large_cost; 323 int32_t grand_cost; 324 int32_t grand_wine; 325 int32_t not_enough_wine; 326 327 int32_t months_since_festival; 328 int32_t first_festival_effect_months; 329 int32_t second_festival_effect_months; 330 } festival; 331 struct { 332 int32_t selected_games_id; 333 int32_t months_to_go; 334 int32_t remaining_duration; 335 int32_t months_since_last; 336 int32_t games_is_active; 337 int32_t naval_battle_bonus_months; 338 int32_t naval_battle_distant_battle_bonus; 339 int32_t executions_bonus_months; 340 int32_t imperial_games_bonus_months; 341 int32_t games_4_bonus_months; 342 uint8_t chosen_horse; 343 int32_t bet_amount; 344 } games; 345 struct { 346 int16_t space_in_warehouses[RESOURCE_MAX]; 347 int16_t stored_in_warehouses[RESOURCE_MAX]; 348 int32_t space_in_workshops[6]; 349 int32_t stored_in_workshops[6]; 350 int16_t trade_status[RESOURCE_MAX]; 351 int16_t export_status_before_stockpiling[RESOURCE_MAX]; 352 int16_t import_over[RESOURCE_MAX]; 353 int16_t export_over[RESOURCE_MAX]; 354 int32_t stockpiled[RESOURCE_MAX]; 355 int16_t mothballed[RESOURCE_MAX]; 356 int32_t wine_types_available; 357 int32_t food_types_available; 358 int32_t food_types_eaten; 359 int32_t granary_food_stored[RESOURCE_MAX_FOOD]; 360 int32_t granary_total_stored; 361 int32_t food_supply_months; 362 int32_t food_needed_per_month; 363 int32_t food_consumed_last_month; 364 int32_t food_produced_last_month; 365 int32_t food_produced_this_month; 366 struct { 367 int operating; 368 int not_operating; 369 int not_operating_with_food; 370 int understaffed; 371 } granaries; 372 int16_t last_used_warehouse; 373 } resource; 374 struct { 375 int8_t march_enemy; 376 int8_t march_horse; 377 int8_t march_wolf; 378 int8_t shoot_arrow; 379 int8_t hit_soldier; 380 int8_t hit_spear; 381 int8_t hit_club; 382 int8_t hit_elephant; 383 int8_t hit_axe; 384 int8_t hit_wolf; 385 int8_t die_citizen; 386 int8_t die_soldier; 387 } sound; 388 struct { 389 int16_t num_land_routes; 390 int16_t num_sea_routes; 391 int16_t land_trade_problem_duration; 392 int16_t sea_trade_problem_duration; 393 int32_t caravan_import_resource; 394 int32_t caravan_backup_import_resource; 395 int32_t docker_import_resource; 396 int32_t docker_export_resource; 397 uint8_t land_policy; 398 uint8_t sea_policy; 399 } trade; 400 struct { 401 map_tile entry_point; 402 map_tile exit_point; 403 map_tile entry_flag; 404 map_tile exit_flag; 405 struct { 406 int32_t id; 407 int32_t size; 408 } largest_road_networks[10]; 409 } map; 410 struct { 411 int32_t has_won; 412 int32_t continue_months_left; 413 int32_t continue_months_chosen; 414 int32_t fired_message_shown; 415 int32_t victory_message_shown; 416 int32_t start_saved_game_written; 417 int32_t tutorial_fire_message_shown; 418 int32_t tutorial_disease_message_shown; 419 int32_t tutorial_senate_built; 420 } mission; 421 struct { 422 int32_t food_types; 423 int32_t food_stress_cumulative; 424 int32_t mess_hall_warning_shown; 425 int32_t missing_mess_hall_warning_shown; 426 int32_t food_percentage_missing_this_month; 427 int32_t total_food; 428 } mess_hall; 429 struct { 430 int32_t total_food; 431 } caravanserai; 432 struct { 433 int8_t other_player[18068]; 434 int8_t unknown_00a0; 435 int8_t unknown_00a1; 436 int8_t unknown_00a2; 437 int8_t unknown_00a3; 438 int8_t unknown_00a4; 439 int8_t unknown_00a6; 440 int8_t unknown_00a7; 441 int32_t unknown_00c0; 442 int32_t unused_27d0; 443 int32_t unknown_27e0[4]; 444 int16_t unknown_27f0; 445 int16_t unknown_27f4[18]; 446 int16_t unknown_2828; 447 int16_t unused_28ca; 448 int8_t unknown_2924[272]; 449 int32_t unknown_2b6c; 450 int32_t unknown_2c20[1400]; 451 int32_t houses_requiring_unknown_to_evolve[8]; 452 int32_t unknown_4238[4]; 453 int32_t unknown_4284; 454 int32_t unknown_4294[2]; 455 int32_t unknown_4334; 456 int32_t unknown_4374[2]; 457 int16_t unknown_439c[3]; 458 int8_t padding_43b2[2]; 459 int32_t unknown_43d8[5]; 460 int32_t unknown_43f0; 461 int32_t unused_4454; 462 int32_t unknown_446c[4]; 463 int32_t unused_4488; 464 int32_t unused_native_force_attack; 465 int32_t unused_44e0[2]; 466 int32_t unused_44f8; 467 int32_t unused_4524[11]; 468 uint8_t unknown_458e; 469 int8_t unused_45a5[6]; 470 int8_t unknown_464c[232]; 471 int32_t unknown_order; 472 int32_t faction_id; 473 uint8_t faction_bytes[2]; 474 } unused; 475 } city_data; 476 477 #endif // CITY_DATA_PRIVATE_H 478