config: Slightly neater configuration table size macros
Macro SHP_TYPE_MAX is the largest possible ship type number. It is only used to size mchr[], and we need + 2 there. Replace by MCHR_SZ for simplicity. Same for LND_TYPE_MAX, PLN_TYPE_MAX, P_MAX, and SCT_TYPE_MAX: replace by LCHR_SZ, PLCHR_SZ, PCHR_SZ, and DCHR_SZ. Same for N_MAXNUKE, except that one is more than the largest type number. Replace by NCHR_SZ. For consistency, define ICHR_SZ and INTRCHR_SZ for sizing ichr[] and intrchr_sz[]. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
6bad464348
commit
e7583a519e
14 changed files with 31 additions and 30 deletions
|
@ -30,7 +30,7 @@
|
|||
* Thomas Ruschak, 1992
|
||||
* Ken Stevens, 1995
|
||||
* Steve McClure, 1998
|
||||
* Markus Armbruster, 2004-2016
|
||||
* Markus Armbruster, 2004-2020
|
||||
*/
|
||||
|
||||
#ifndef LAND_H
|
||||
|
@ -41,7 +41,6 @@
|
|||
#include "retreat.h"
|
||||
#include "types.h"
|
||||
|
||||
#define LND_TYPE_MAX 30
|
||||
#define LAND_MINEFF 10
|
||||
#define LAND_MINFIREEFF 40 /* arty must be this effic to fire */
|
||||
|
||||
|
@ -125,7 +124,8 @@ struct lchrstr {
|
|||
#define putland(n, p) ef_write(EF_LAND, (n), (p))
|
||||
#define getlandp(n) ((struct lndstr *)ef_ptr(EF_LAND, (n)))
|
||||
|
||||
extern struct lchrstr lchr[LND_TYPE_MAX + 2];
|
||||
#define LCHR_SZ 32
|
||||
extern struct lchrstr lchr[LCHR_SZ];
|
||||
|
||||
enum {
|
||||
LND_AIROPS_EFF = 50 /* min. efficiency for air ops */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue