]> granicus.if.org Git - nethack/commitdiff
remove extra potion enums
authorPatR <rankin@nethack.org>
Thu, 12 Jan 2023 22:54:05 +0000 (14:54 -0800)
committerPatR <rankin@nethack.org>
Thu, 12 Jan 2023 22:54:05 +0000 (14:54 -0800)
Generic object handling ended up not using FIRST_POTION, LAST_POTION,
and NUM_POTIONS so don't bother setting those up.

include/objclass.h
include/objects.h
src/allmain.c

index 6df5398095ce314970d72e3436800f2077e27002..bfe5ae66e2be4404d236c083a0ee4a534a54d909 100644 (file)
@@ -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
index 5aa08b7301c37f3a6c8bfdb1203b4ae770bf0a76..c605b90c1ebd5494bee720d5f26307338081019a 100644 (file)
@@ -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 ... */
index fe15ce2134211bd5a6390a46e73912a8889c1ae1..bd33de7a0ddae5c7dd0e4c63cef48e274d53a39c 100644 (file)
@@ -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),