]> git.pond.sub.org Git - empserver/blobdiff - src/lib/global/land.c
config: Drop configuration table size macros
[empserver] / src / lib / global / land.c
index e51b223966be833eba17c6d1d7d6944e1acd19f1..e4081d502ab20a9a8c6d5dcb4e18aa46513e5ad4 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
@@ -26,7 +25,7 @@
  *  ---
  *
  *  land.c: Land unit characteristics
- * 
+ *
  *  Known contributors to this file:
  *     Thomas Ruschak, 1992
  *     Ken Stevens, 1995
@@ -44,7 +43,7 @@
  * Initialized on startup from land.config and deity custom config (if any).
  * Terminated by a sentinel with null l_name.
  */
-struct lchrstr lchr[LND_TYPE_MAX + 2];
+struct lchrstr lchr[];
 
 #define logx(a, b) (log((a)) / log((b)))
 #define LND_ATTDEF(b, t) (((b) * (1.0 + ((sqrt((t)) / 100.0) * 4.0)))  \
@@ -54,9 +53,6 @@ struct lchrstr lchr[LND_TYPE_MAX + 2];
                       ? 127 : (b * (1.0 + ((sqrt(t) / 100.0) * 2.1))))
 #define LND_VUL(b, t) ((b * (1.0 - ((sqrt(t) / 100.0) * 1.1))) < 0     \
                       ? 0 : (b * (1.0 - ((sqrt(t) / 100.0) * 1.1))))
-#define LND_VIS(b, t) (b)
-#define LND_SPY(b, t) (b)
-#define LND_RAD(b, t) (b)
 #define LND_FRG(b, t) ((t) ?                                \
                       ((b) * (logx((t), 35.0) < 1.0 ? 1.0 : \
                               logx((t), 35.0))) : (b))
@@ -65,13 +61,8 @@ struct lchrstr lchr[LND_TYPE_MAX + 2];
                               logx((t), 60.0))) : (b))
 #define LND_ACC(b, t) ((b * (1.0 - ((sqrt(t) / 100.0) * 1.1))) < 0     \
                       ? 0 : (b * (1.0 - ((sqrt(t) / 100.0) * 1.1))))
-#define LND_AMM(b, t) (b)
 #define LND_AAF(b, t) ((b * (1.0 + ((sqrt(t) / 100.0) * 3.0))) > 127   \
                       ? 127 : (b * (1.0 + ((sqrt(t) / 100.0) * 3.0))))
-#define LND_FC(b, t)  (b)
-#define LND_FU(b, t)  (b)
-#define LND_XPL(b, t) (b)
-#define LND_MXL(b, t) (b)
 
 float
 l_att(struct lchrstr *lcp, int tech)