(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
|
@ -308,8 +308,8 @@ build_mission_list_type(struct genlist *mi, coord x, coord y, int mission,
|
|||
struct sctstr sect;
|
||||
|
||||
/*
|
||||
size = max(sizeof(struct shpstr),sizeof(struct lndstr));
|
||||
size = max(size,sizeof(struct plnstr));
|
||||
size = MAX(sizeof(struct shpstr),sizeof(struct lndstr));
|
||||
size = MAX(size,sizeof(struct plnstr));
|
||||
block = malloc(size);
|
||||
*/
|
||||
size = sizeof(u_block);
|
||||
|
@ -615,17 +615,17 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
|||
if (md > range2)
|
||||
continue;
|
||||
gun = sp->shp_item[I_GUN];
|
||||
gun = min(gun, sp->shp_glim);
|
||||
gun = MIN(gun, sp->shp_glim);
|
||||
shell = sp->shp_item[I_SHELL];
|
||||
if (shell < gun)
|
||||
shell += supply_commod(sp->shp_own,
|
||||
sp->shp_x, sp->shp_y, I_SHELL,
|
||||
gun - shell);
|
||||
gun = min(gun, shell);
|
||||
gun = min(gun, sp->shp_item[I_MILIT] / 2.0);
|
||||
gun = MIN(gun, shell);
|
||||
gun = MIN(gun, sp->shp_item[I_MILIT] / 2.0);
|
||||
if (gun == 0)
|
||||
continue;
|
||||
gun = max(gun, 1);
|
||||
gun = MAX(gun, 1);
|
||||
dam2 = seagun(sp->shp_effic, gun);
|
||||
if (range2 == 0.0)
|
||||
prb = 1.0;
|
||||
|
@ -880,8 +880,8 @@ show_mission(int type, struct nstr_item *np)
|
|||
s_char *block;
|
||||
struct genitem *gp;
|
||||
|
||||
size = max(sizeof(struct lndstr), sizeof(struct plnstr));
|
||||
size = max(size, sizeof(struct shpstr));
|
||||
size = MAX(sizeof(struct lndstr), sizeof(struct plnstr));
|
||||
size = MAX(size, sizeof(struct shpstr));
|
||||
block = malloc(size);
|
||||
|
||||
while (nxtitem(np, block)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue