/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
*
* ---
*
- * See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- * related information and legal notices. It is expected that any future
- * projects/authors will amend these files as needed.
+ * See files README, COPYING and CREDITS in the root of the source
+ * tree for related information and legal notices. It is expected
+ * that future projects/authors will amend these files as needed.
*
* ---
*
*
*/
+#include <config.h>
+
#include "misc.h"
#include <ctype.h>
-#include "var.h"
+#include "plague.h"
#include "ship.h"
#include "plane.h"
#include "land.h"
-#include "nuke.h"
#include "sect.h"
-#include "news.h"
#include "xy.h"
#include "nsc.h"
#include "nat.h"
#include "common.h"
#include "gen.h"
-/* Format a ship name */
-int
-check_nav(struct sctstr *sect)
-{
- switch (dchr[sect->sct_type].d_flg & 03) {
- case NAVOK:
- break;
-
- case NAV_02:
- if (sect->sct_effic < 2)
- return CN_CONSTRUCTION;
- break;
- case NAV_60:
- if (sect->sct_effic < 60)
- return CN_CONSTRUCTION;
- break;
- default:
- return CN_LANDLOCKED;
- }
- return CN_NAVIGABLE;
-}
-
/* load a specific ship given its
* location and what field to modify.
* new autonav code
if (!abs_max)
return 0; /* can't load the ship, skip to the end. */
- max_amt = min(sect_amt, max_amt - ship_amt);
+ max_amt = MIN(sect_amt, max_amt - ship_amt);
if (max_amt <= 0 && (ship_amt != abs_max)) {
sp->shp_autonav |= AN_LOADING;
return 0;
if (comm == I_CIVIL)
ship_amt--; /* This leaves 1 civs on board the ship */
- max_amt = min(ship_amt, ITEM_MAX - sect_amt);
+ max_amt = MIN(ship_amt, ITEM_MAX - sect_amt);
if (max_amt <= 0)
continue;