]> git.pond.sub.org Git - empserver/blobdiff - include/land.h
Get rid of the need to fix up lchr[].
[empserver] / include / land.h
index c308102f4796230e1f962af490f8ef548b6e04d7..339cf410c8edf9916f0d5ea1b6053ee89aee60af 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, 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
@@ -36,6 +36,7 @@
 #ifndef LAND_H
 #define LAND_H
 
+#include <time.h>
 #include "item.h"
 #include "queue.h"
 #include "retreat.h"
@@ -77,7 +78,7 @@ struct lndstr {
     short lnd_ptime;           /* how many etus remain in this stage */
     short lnd_land;            /* pointer to transporting unit */
     unsigned char lnd_nland;
-    time_t lnd_access;         /* Last time mob was updated (MOB_ACCESS) */
+    short lnd_access;          /* Last tick mob was updated (MOB_ACCESS) */
     float lnd_att;             /* attack multiplier */
     float lnd_def;             /* defense multiplier */
     int lnd_vul;               /* vulnerability (0-100) */
@@ -102,7 +103,7 @@ struct lchrstr {
     char *l_name;              /* full name of type of land unit */
     int l_lcm;                 /* units of lcm to build */
     int l_hcm;                 /* units of hcm to build */
-    int l_mil;                 /* how many mil it takes to build */
+    int l_mil;                 /* how many mil it takes to build (unused) */
     int l_gun;                 /* how many guns it takes to build (unused) */
     int l_shell;               /* #shells it takes to build (unused) */
     int l_tech;                        /* tech required to build */
@@ -175,7 +176,7 @@ struct lchrstr {
 
 #define getland(n, p) ef_read(EF_LAND, (n), (p))
 #define putland(n, p) ef_write(EF_LAND, (n), (p))
-#define getlandp(n) (struct lndstr *)ef_ptr(EF_LAND, (n))
+#define getlandp(n) ((struct lndstr *)ef_ptr(EF_LAND, (n)))
 
 extern struct lchrstr lchr[LND_TYPE_MAX + 2];
 
@@ -191,7 +192,6 @@ extern int lnd_check_mines(struct emp_qelem *);
 extern double lnd_pathcost(struct lndstr *, double);
 extern int lnd_mobtype(struct lndstr *);
 extern double lnd_mobcost(struct lndstr *, struct sctstr *);
-extern char *lnd_path(int, struct lndstr *, char *);
 
 extern double attack_val(int, struct lndstr *);
 extern double defense_val(struct lndstr *);
@@ -206,8 +206,6 @@ extern int count_sect_units(struct sctstr *);
 extern void count_units(struct shpstr *);
 extern void lnd_count_units(struct lndstr *);
 extern void lnd_mar(struct emp_qelem *, double *, double *, int *, natid);
-extern void lnd_put(struct emp_qelem *, natid);
-extern void lnd_list(struct emp_qelem *);
 extern int lnd_hardtarget(struct lndstr *);
 extern int lnd_mar_one_sector(struct emp_qelem *, int, natid, int);
 extern int lnd_support(natid, natid, coord, coord, int);