followup for miscellaneous objects[] macros
The DUMP_ENUMS definition of 'MARKER()' had the expansion of its arguments backwards but isn't even needed, so get rid of it rather than reverse them. nethack --dumpenums handles them separately from object definitions.
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
#define OBJECT(obj,bits,prp,sym,prob,dly,wt, \
|
||||
cost,sdam,ldam,oc1,oc2,nut,color,sn) \
|
||||
{ sn, #sn }
|
||||
#define MARKER(tag,sn) { tag, #sn },
|
||||
#define MARKER(tag,sn) /*empty*/
|
||||
|
||||
#else
|
||||
#error Unproductive inclusion of objects.h
|
||||
|
||||
@@ -1054,18 +1054,20 @@ dump_enums(void)
|
||||
static const char *const titles[NUM_ENUM_DUMPS] = {
|
||||
"monnums", "objects_nums" , "misc_object_nums"
|
||||
};
|
||||
#define dump_om(om) { om, #om }
|
||||
static const struct enum_dump omdump[] = {
|
||||
{ FIRST_AMULET, "FIRST_AMULET" },
|
||||
{ LAST_AMULET, "LAST_AMULET" },
|
||||
{ FIRST_SPELL, "FIRST_SPELL" },
|
||||
{ LAST_SPELL, "LAST_SPELL" },
|
||||
{ MAXSPELL, "MAXSPELL" },
|
||||
{ FIRST_REAL_GEM, "FIRST_REAL_GEM" },
|
||||
{ LAST_REAL_GEM, "LAST_REAL_GEM" },
|
||||
{ FIRST_GLASS_GEM, "FIRST_GLASS_GEM" },
|
||||
{ LAST_GLASS_GEM, "LAST_GLASS_GEM" },
|
||||
{ NUM_GLASS_GEMS, "NUM_GLASS_GEMS" },
|
||||
dump_om(FIRST_AMULET),
|
||||
dump_om(LAST_AMULET),
|
||||
dump_om(FIRST_SPELL),
|
||||
dump_om(LAST_SPELL),
|
||||
dump_om(MAXSPELL),
|
||||
dump_om(FIRST_REAL_GEM),
|
||||
dump_om(LAST_REAL_GEM),
|
||||
dump_om(FIRST_GLASS_GEM),
|
||||
dump_om(LAST_GLASS_GEM),
|
||||
dump_om(NUM_GLASS_GEMS),
|
||||
};
|
||||
#undef dump_om
|
||||
static const struct enum_dump *const ed[NUM_ENUM_DUMPS] = {
|
||||
monsdump, objdump, omdump
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user