From: PatR Date: Thu, 12 Jan 2023 22:54:05 +0000 (-0800) Subject: remove extra potion enums X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0649f5860a8356e3a628ca1d7edbc7c0d1824538;p=nethack remove extra potion enums Generic object handling ended up not using FIRST_POTION, LAST_POTION, and NUM_POTIONS so don't bother setting those up. --- diff --git a/include/objclass.h b/include/objclass.h index 6df539809..bfe5ae66e 100644 --- a/include/objclass.h +++ b/include/objclass.h @@ -171,7 +171,6 @@ enum objects_nums { }; enum misc_object_nums { - NUM_POTIONS = (LAST_POTION - FIRST_POTION + 1), NUM_REAL_GEMS = (LAST_REAL_GEM - FIRST_REAL_GEM + 1), NUM_GLASS_GEMS = (LAST_GLASS_GEM - FIRST_GLASS_GEM + 1), /* LAST_SPELL is SPE_BLANK_PAPER, guaranteeing that spl_book[] will diff --git a/include/objects.h b/include/objects.h index 5aa08b730..c605b90c1 100644 --- a/include/objects.h +++ b/include/objects.h @@ -1073,7 +1073,6 @@ FOOD("tin", 75, 0, 10, 1, METAL, 0, HI_METAL, TIN), power, POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color, sn) POTION("gain ability", "ruby", 1, 0, 42, 300, CLR_RED, POT_GAIN_ABILITY), -MARKER(FIRST_POTION, POT_GAIN_ABILITY) POTION("restore ability", "pink", 1, 0, 40, 100, CLR_BRIGHT_MAGENTA, POT_RESTORE_ABILITY), POTION("confusion", "orange", 1, CONFUSION, 42, 100, CLR_ORANGE, @@ -1126,7 +1125,6 @@ POTION("oil", "murky", 0, 0, 30, 250, CLR_BROWN, */ POTION("water", "clear", 0, 0, 92, 100, CLR_CYAN, POT_WATER), -MARKER(LAST_POTION, POT_WATER) #undef POTION /* scrolls ... */ diff --git a/src/allmain.c b/src/allmain.c index fe15ce213..bd33de7a0 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -1058,9 +1058,6 @@ dump_enums(void) static const struct enum_dump omdump[] = { dump_om(FIRST_AMULET), dump_om(LAST_AMULET), - dump_om(FIRST_POTION), - dump_om(LAST_POTION), - dump_om(NUM_POTIONS), dump_om(FIRST_SPELL), dump_om(LAST_SPELL), dump_om(MAXSPELL),