void do_road (int x, int y) { static int wb_count = 0; int *pol = &MP_POL(x,y); Map_Point_Info *minfo = &MP_INFO(x,y); ++transport_cost; if (total_time % DAYS_PER_ROAD_POLLUTION == 0) *pol += ROAD_POLLUTION; if ((total_time & ROAD_GOODS_USED_MASK) == 0 && minfo->int_4 > 0) { --minfo->int_4; ++minfo->int_7; } general_transport (minfo, pol, MAX_WASTE_ON_ROAD, &wb_count); }
void do_rail(int x, int y) { int *pol = &MP_POL(x, y); Map_Point_Info *minfo = &MP_INFO(x, y); transport_cost += 3; if (total_time % DAYS_PER_RAIL_POLLUTION == 0) *pol += RAIL_POLLUTION; if ((total_time & RAIL_GOODS_USED_MASK) == 0 && minfo->int_4 > 0) { --minfo->int_4; ++minfo->int_7; } if ((total_time & RAIL_STEEL_USED_MASK) == 0 && minfo->int_6 > 0) { --minfo->int_6; ++minfo->int_7; } general_transport(x, y, MAX_WASTE_ON_RAIL); }