(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:
Ron Koenderink 2006-01-12 14:23:55 +00:00
parent b89de57d51
commit 04a8b84592
48 changed files with 152 additions and 251 deletions

View file

@ -72,13 +72,13 @@ mine(void)
continue;
if ((shells = ship.shp_item[I_SHELL]) == 0)
continue;
mines_avail = min(shells, mines);
mines_avail = MIN(shells, mines);
if (getsect(ship.shp_x, ship.shp_y, &sect) == 0 ||
(sect.sct_type != SCT_WATER && sect.sct_type != SCT_BSPAN)) {
pr("You can't lay mines there!!\n");
continue;
}
sect.sct_mines = min(sect.sct_mines + mines_avail, MINES_MAX);
sect.sct_mines = MIN(sect.sct_mines + mines_avail, MINES_MAX);
ship.shp_item[I_SHELL] = shells - mines_avail;
putsect(&sect);
ship.shp_mission = 0;
@ -123,7 +123,7 @@ landmine(void)
putland(land.lnd_uid, &land);
if (!(shells = land.lnd_item[I_SHELL]))
continue;
shells = min(shells, land.lnd_mobil);
shells = MIN(shells, land.lnd_mobil);
if (!getsect(land.lnd_x, land.lnd_y, &sect) ||
sect.sct_type == SCT_WATER || sect.sct_type == SCT_BSPAN) {
pr("You can't lay mines there!!\n");
@ -141,7 +141,7 @@ landmine(void)
land.lnd_mission = 0;
total_mines_laid = 0;
while (shells > 0 && total_mines_laid < mines_wanted) {
mines_laid = min(shells, mines_wanted - total_mines_laid);
mines_laid = MIN(shells, mines_wanted - total_mines_laid);
land.lnd_item[I_SHELL] = shells - mines_laid;
land.lnd_mobil -= mines_laid;
putland(land.lnd_uid, &land);
@ -149,10 +149,10 @@ landmine(void)
putland(land.lnd_uid, &land);
total_mines_laid += mines_laid;
shells = land.lnd_item[I_SHELL];
shells = min(shells, land.lnd_mobil);
shells = MIN(shells, land.lnd_mobil);
}
getsect(sect.sct_x, sect.sct_y, &sect);
sect.sct_mines = min(sect.sct_mines + total_mines_laid, MINES_MAX);
sect.sct_mines = MIN(sect.sct_mines + total_mines_laid, MINES_MAX);
putsect(&sect);
if (total_mines_laid == mines_wanted) {
pr("%s laid a total of %d mines in %s",