(empfile,mission_flags,ship_ca,land_ca,plane_ca): Add mission flags table.
This commit is contained in:
parent
bee3f4aa88
commit
23f134aa75
4 changed files with 18 additions and 2 deletions
|
@ -132,7 +132,8 @@ struct empfile {
|
|||
#define EF_META 30
|
||||
#define EF_META_TYPE 31
|
||||
#define EF_META_FLAGS 32
|
||||
#define EF_MAX 33
|
||||
#define EF_MISSION_FLAGS 33
|
||||
#define EF_MAX 34
|
||||
|
||||
#define EF_IS_GAME_STATE(type) (EF_SECTOR <= (type) && (type) <= EF_LOST)
|
||||
|
||||
|
|
|
@ -224,6 +224,7 @@ extern struct symbol treaty_flags[];
|
|||
extern struct castr mdchr_ca[];
|
||||
extern struct symbol meta_type[];
|
||||
extern struct symbol meta_flags[];
|
||||
extern struct symbol mission_flags[];
|
||||
|
||||
/* src/lib/subs/nstr.c */
|
||||
extern int nstr_comp(struct nscstr *np, int len, int type, char *str);
|
||||
|
|
|
@ -163,6 +163,8 @@ struct empfile empfile[] = {
|
|||
PTR_CACHE(meta_type, EFF_CFG)},
|
||||
{EF_META_FLAGS, "meta flags", NULL, symbol_ca,
|
||||
PTR_CACHE(meta_flags, EFF_CFG)},
|
||||
{EF_MISSION_FLAGS, "mission flags", NULL, symbol_ca,
|
||||
PTR_CACHE(mission_flags, EFF_CFG)},
|
||||
|
||||
/* Sentinel */
|
||||
{EF_BAD, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL},
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include "lost.h"
|
||||
#include "product.h"
|
||||
#include "file.h"
|
||||
#include "mission.h"
|
||||
|
||||
#define fldoff(str, fld) offsetof(struct str, fld)
|
||||
|
||||
|
@ -184,7 +185,7 @@ struct castr dchr_ca[] = {
|
|||
{ NSC_CHAR, NSC_EXTRA, 0, fldoff(genitem, group), "group", EF_BAD}, \
|
||||
{ NSC_XCOORD, 0, 0, fldoff(genitem, opx), "opx", EF_BAD}, \
|
||||
{ NSC_YCOORD, 0, 0, fldoff(genitem, opy), "opy", EF_BAD}, \
|
||||
{ NSC_SHORT, 0, 0, fldoff(genitem, mission), "mission", EF_BAD}, \
|
||||
{ NSC_SHORT, 0, 0, fldoff(genitem, mission), "mission", EF_MISSION_FLAGS}, \
|
||||
{ NSC_SHORT, 0, 0, fldoff(genitem, radius), "radius", EF_BAD}
|
||||
|
||||
struct castr ship_ca[] = {
|
||||
|
@ -637,3 +638,14 @@ struct symbol meta_type[] = {
|
|||
{NSC_STRINGY,"c"},
|
||||
{NSC_NOTYPE, NULL}
|
||||
};
|
||||
|
||||
struct symbol mission_flags[] = {
|
||||
{MI_INTERDICT, "interdiction"},
|
||||
{MI_SUPPORT, "support"},
|
||||
{MI_RESERVE, "reserve"},
|
||||
{MI_ESCORT, "escort"},
|
||||
{MI_AIR_DEFENSE, "air defense"},
|
||||
{MI_DSUPPORT, "defensive support"},
|
||||
{MI_OSUPPORT, "offensive support"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue