(ship_bomb, deli, do_demo, fuel, grin, look_ship)
(ltend, multifire, quite_bigdef, mine, landmine) (do_loan, prod, printdiff, sell, sona, stre) (tend, fire_dchrg, vers, work, ac_planedamage) (ac_shipflak, ask_off, get_mine_dsupport, att_fight) (ask_move_in_off, detonate, sd, land_gun) (land_unitgun, lnd_fort_interdiction, lnd_fortify) (perform_mission, pln_mine, pln_mobcost) (retreat_ship1, retreat_land1, shp_sweep) (shp_fort_interdiction, shp_missle_defense) (new_work, growfood, upd_land, land_repair) (get_materials, do_mob_ship, do_mob_land) (load_it, unload_it, prod_plane, produce) (guerrilla, upd_buildeff, spread_fallout) (upd_ship, ship_repair, min, dmin, MIN): Remove min() and dmin() functions and replace with a MIN macro in misc.h. Remove local MIN macros and use the new one in misc.h. This change removes the need for the special case for _WIN32. (fuel, look_ship, multifire, mission, sona) (plane_sona, ef_open, player_accept, player_main) (ac_dog, att_get_combat, calc_mobcost) (ask_move_in_off, intelligence_report) (build_mission_list_type, perform_mission) (show_mission, use_supply, dodistribute) (allocate_memory, max, dmax, MAX): Remove max() and dmax() functions and replace with a MAX macro in misc.h. Remove local MAX macros and use the new one in misc.h. This change removes the need for the special case for _WIN32.
This commit is contained in:
parent
b89de57d51
commit
04a8b84592
48 changed files with 152 additions and 251 deletions
|
@ -558,7 +558,7 @@ use_supply(struct lndstr *lp)
|
|||
lp->lnd_item[I_SHELL] = shells;
|
||||
}
|
||||
|
||||
lp->lnd_item[I_SHELL] = max(lp->lnd_item[I_SHELL] - shells_needed, 0);
|
||||
lp->lnd_item[I_SHELL] = MAX(lp->lnd_item[I_SHELL] - shells_needed, 0);
|
||||
|
||||
if (lp->lnd_frg) /* artillery */
|
||||
goto done;
|
||||
|
@ -574,7 +574,7 @@ use_supply(struct lndstr *lp)
|
|||
lp->lnd_item[I_FOOD] = food;
|
||||
}
|
||||
|
||||
lp->lnd_item[I_FOOD] = max(lp->lnd_item[I_FOOD] - food_needed, 0);
|
||||
lp->lnd_item[I_FOOD] = MAX(lp->lnd_item[I_FOOD] - food_needed, 0);
|
||||
|
||||
if (opt_FUEL) {
|
||||
fuel_needed = lp->lnd_fuelu;
|
||||
|
@ -600,7 +600,7 @@ use_supply(struct lndstr *lp)
|
|||
if (petrol_needed) {
|
||||
if (petrol >= petrol_needed) {
|
||||
lp->lnd_item[I_PETROL]
|
||||
= max(lp->lnd_item[I_PETROL] - petrol_needed, 0);
|
||||
= MAX(lp->lnd_item[I_PETROL] - petrol_needed, 0);
|
||||
lp->lnd_fuel += petrol_needed * 10;
|
||||
} else {
|
||||
lp->lnd_fuel += lp->lnd_item[I_PETROL] * 10;
|
||||
|
@ -608,7 +608,7 @@ use_supply(struct lndstr *lp)
|
|||
}
|
||||
}
|
||||
|
||||
lp->lnd_fuel = max(lp->lnd_fuel - fuel_needed, 0);
|
||||
lp->lnd_fuel = MAX(lp->lnd_fuel - fuel_needed, 0);
|
||||
}
|
||||
/* end opt_FUEL */
|
||||
done:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue