/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2008, 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.
*
* ---
*
* Steve McClure, 1996
*/
-#include "misc.h"
-#include "player.h"
-#include "var.h"
+#include <config.h>
+
#include "file.h"
#include "land.h"
-#include "ship.h"
-#include "xy.h"
-#include "nat.h"
+#include "lost.h"
+#include "misc.h"
#include "nsc.h"
+#include "optlist.h"
#include "plane.h"
+#include "player.h"
#include "prototypes.h"
-#include "optlist.h"
+#include "ship.h"
int
-lnd_postread(int n, s_char *ptr)
+lnd_postread(int n, void *ptr)
{
- struct lndstr *llp = (struct lndstr *)ptr;
+ struct lndstr *llp = ptr;
struct shpstr theship;
struct lndstr theland;
return 1;
}
-/*ARGSUSED*/
int
-lnd_prewrite(int n, s_char *ptr)
+lnd_prewrite(int n, void *ptr)
{
- struct lndstr *llp = (struct lndstr *)ptr;
+ struct lndstr *llp = ptr;
struct lndstr land;
struct lndstr *lp;
struct plnstr *pp;
time(&llp->lnd_timestamp);
if (llp->lnd_own && llp->lnd_effic < LAND_MINEFF) {
- makelost(EF_LAND, llp->lnd_own, llp->lnd_uid, llp->lnd_x,
- llp->lnd_y);
+ makelost(EF_LAND, llp->lnd_own, llp->lnd_uid,
+ llp->lnd_x, llp->lnd_y);
llp->lnd_own = 0;
getland(n, &land);
for (i = 0; NULL != (lp = getlandp(i)); i++) {
if (lp->lnd_own && lp->lnd_land == n) {
mpr(lp->lnd_own, "%s MIA!\n", prland(lp));
- makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x,
- lp->lnd_y);
+ makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
+ lp->lnd_x, lp->lnd_y);
lp->lnd_own = 0;
lp->lnd_effic = 0;
lp->lnd_ship = -1;
for (i = 0; NULL != (pp = getplanep(i)); i++) {
if (pp->pln_own && pp->pln_land == n) {
mpr(pp->pln_own, "%s MIA!\n", prplane(pp));
- makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
- pp->pln_y);
+ makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
+ pp->pln_x, pp->pln_y);
pp->pln_own = 0;
pp->pln_effic = 0;
pp->pln_ship = -1;
}
void
-lnd_init(int n, s_char *ptr)
+lnd_init(int n, void *ptr)
{
- struct lndstr *lp = (struct lndstr *)ptr;
+ struct lndstr *lp = ptr;
lp->ef_type = EF_LAND;
lp->lnd_uid = n;
lp->lnd_own = 0;
}
-s_char *
+char *
prland(struct lndstr *lp)
{
return prbuf("%s #%d", lchr[(int)lp->lnd_type].l_name, lp->lnd_uid);