From: PatR Date: Tue, 15 Jan 2019 01:10:46 +0000 (-0800) Subject: more explicit enum values X-Git-Tag: NetHack-3.6.2_Released~90^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=285606d4c64573990d127d956fc979e53e32c930;p=nethack more explicit enum values --- diff --git a/include/hack.h b/include/hack.h index e59693d5f..6dfedf762 100644 --- a/include/hack.h +++ b/include/hack.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.h $NHDT-Date: 1525012595 2018/04/29 14:36:35 $ $NHDT-Branch: master $:$NHDT-Revision: 1.82 $ */ +/* NetHack 3.6 hack.h $NHDT-Date: 1547514631 2019/01/15 01:10:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -25,11 +25,11 @@ /* symbolic names for capacity levels */ enum encumbrance_types { UNENCUMBERED = 0, - SLT_ENCUMBER, /* Burdened */ - MOD_ENCUMBER, /* Stressed */ - HVY_ENCUMBER, /* Strained */ - EXT_ENCUMBER, /* Overtaxed */ - OVERLOADED /* Overloaded */ + SLT_ENCUMBER = 1, /* Burdened */ + MOD_ENCUMBER = 2, /* Stressed */ + HVY_ENCUMBER = 3, /* Strained */ + EXT_ENCUMBER = 4, /* Overtaxed */ + OVERLOADED = 5 /* Overloaded */ }; /* weight increment of heavy iron ball */ @@ -46,13 +46,13 @@ enum encumbrance_types { /* hunger states - see hu_stat in eat.c */ enum hunger_state_types { - SATIATED = 0, - NOT_HUNGRY, - HUNGRY, - WEAK, - FAINTING, - FAINTED, - STARVED + SATIATED = 0, + NOT_HUNGRY = 1, + HUNGRY = 2, + WEAK = 3, + FAINTING = 4, + FAINTED = 5, + STARVED = 6 }; /* Macros for how a rumor was delivered in outrumor() */ @@ -63,13 +63,13 @@ enum hunger_state_types { /* Macros for why you are no longer riding */ enum dismount_types { - DISMOUNT_GENERIC = 0, - DISMOUNT_FELL, - DISMOUNT_THROWN, - DISMOUNT_POLY, - DISMOUNT_ENGULFED, - DISMOUNT_BONES, - DISMOUNT_BYCHOICE + DISMOUNT_GENERIC = 0, + DISMOUNT_FELL = 1, + DISMOUNT_THROWN = 2, + DISMOUNT_POLY = 3, + DISMOUNT_ENGULFED = 4, + DISMOUNT_BONES = 5, + DISMOUNT_BYCHOICE = 6 }; /* Special returns from mapglyph() */ @@ -90,25 +90,25 @@ enum dismount_types { /* alteration types--keep in synch with costly_alteration(mkobj.c) */ enum cost_alteration_types { - COST_CANCEL = 0, /* standard cancellation */ - COST_DRAIN, /* drain life upon an object */ - COST_UNCHRG, /* cursed charging */ - COST_UNBLSS, /* unbless (devalues holy water) */ - COST_UNCURS, /* uncurse (devalues unholy water) */ - COST_DECHNT, /* disenchant weapons or armor */ - COST_DEGRD, /* removal of rustproofing, dulling via engraving */ - COST_DILUTE, /* potion dilution */ - COST_ERASE, /* scroll or spellbook blanking */ - COST_BURN, /* dipped into flaming oil */ - COST_NUTRLZ, /* neutralized via unicorn horn */ - COST_DSTROY, /* wand breaking (bill first, useup later) */ - COST_SPLAT, /* cream pie to own face (ditto) */ - COST_BITE, /* start eating food */ - COST_OPEN, /* open tin */ - COST_BRKLCK, /* break box/chest's lock */ - COST_RUST, /* rust damage */ - COST_ROT, /* rotting attack */ - COST_CORRODE /* acid damage */ + COST_CANCEL = 0, /* standard cancellation */ + COST_DRAIN = 1, /* drain life upon an object */ + COST_UNCHRG = 2, /* cursed charging */ + COST_UNBLSS = 3, /* unbless (devalues holy water) */ + COST_UNCURS = 4, /* uncurse (devalues unholy water) */ + COST_DECHNT = 5, /* disenchant weapons or armor */ + COST_DEGRD = 6, /* removal of rustproofing, dulling via engraving */ + COST_DILUTE = 7, /* potion dilution */ + COST_ERASE = 8, /* scroll or spellbook blanking */ + COST_BURN = 9, /* dipped into flaming oil */ + COST_NUTRLZ = 10, /* neutralized via unicorn horn */ + COST_DSTROY = 11, /* wand breaking (bill first, useup later) */ + COST_SPLAT = 12, /* cream pie to own face (ditto) */ + COST_BITE = 13, /* start eating food */ + COST_OPEN = 14, /* open tin */ + COST_BRKLCK = 15, /* break box/chest's lock */ + COST_RUST = 16, /* rust damage */ + COST_ROT = 17, /* rotting attack */ + COST_CORRODE = 18 /* acid damage */ }; /* bitmask flags for corpse_xname(); @@ -123,9 +123,9 @@ enum cost_alteration_types { /* getpos() return values */ enum getpos_retval { LOOK_TRADITIONAL = 0, /* '.' -- ask about "more info?" */ - LOOK_QUICK, /* ',' -- skip "more info?" */ - LOOK_ONCE, /* ';' -- skip and stop looping */ - LOOK_VERBOSE /* ':' -- show more info w/o asking */ + LOOK_QUICK = 1, /* ',' -- skip "more info?" */ + LOOK_ONCE = 2, /* ';' -- skip and stop looping */ + LOOK_VERBOSE = 3 /* ':' -- show more info w/o asking */ }; /* @@ -134,22 +134,22 @@ enum getpos_retval { * code assume that PANIC separates the deaths from the non-deaths. */ enum game_end_types { - DIED = 0, - CHOKING, - POISONING, - STARVING, - DROWNING, - BURNING, - DISSOLVED, - CRUSHING, - STONING, - TURNED_SLIME, - GENOCIDED, - PANICKED, - TRICKED, - QUIT, - ESCAPED, - ASCENDED + DIED = 0, + CHOKING = 1, + POISONING = 2, + STARVING = 3, + DROWNING = 4, + BURNING = 5, + DISSOLVED = 6, + CRUSHING = 7, + STONING = 8, + TURNED_SLIME = 9, + GENOCIDED = 10, + PANICKED = 11, + TRICKED = 12, + QUIT = 13, + ESCAPED = 14, + ASCENDED = 15 }; typedef struct strbuf { @@ -173,21 +173,21 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */ /* types of calls to bhit() */ enum bhit_call_types { - ZAPPED_WAND = 0, - THROWN_WEAPON, - THROWN_TETHERED_WEAPON, - KICKED_WEAPON, - FLASHED_LIGHT, - INVIS_BEAM + ZAPPED_WAND = 0, + THROWN_WEAPON = 1, + THROWN_TETHERED_WEAPON = 2, + KICKED_WEAPON = 3, + FLASHED_LIGHT = 4, + INVIS_BEAM = 5 }; /* attack mode for hmon() */ enum hmon_atkmode_types { - HMON_MELEE = 0, /* hand-to-hand */ - HMON_THROWN, /* normal ranged (or spitting while poly'd) */ - HMON_KICKED, /* alternate ranged */ - HMON_APPLIED, /* polearm, treated as ranged */ - HMON_DRAGGED /* attached iron ball, pulled into mon */ + HMON_MELEE = 0, /* hand-to-hand */ + HMON_THROWN = 1, /* normal ranged (or spitting while poly'd) */ + HMON_KICKED = 2, /* alternate ranged */ + HMON_APPLIED = 3, /* polearm, treated as ranged */ + HMON_DRAGGED = 4 /* attached iron ball, pulled into mon */ }; /* sortloot() return type; needed before extern.h */ @@ -367,14 +367,14 @@ typedef struct sortloot_item Loot; /* Macros for explosion types */ enum explosion_types { - EXPL_DARK = 0, - EXPL_NOXIOUS, - EXPL_MUDDY, - EXPL_WET, - EXPL_MAGICAL, - EXPL_FIERY, - EXPL_FROSTY, - EXPL_MAX + EXPL_DARK = 0, + EXPL_NOXIOUS = 1, + EXPL_MUDDY = 2, + EXPL_WET = 3, + EXPL_MAGICAL = 4, + EXPL_FIERY = 5, + EXPL_FROSTY = 6, + EXPL_MAX = 7 }; /* enlightenment control flags */ @@ -405,25 +405,25 @@ enum explosion_types { /* Macros for messages referring to hands, eyes, feet, etc... */ enum bodypart_types { - ARM = 0, - EYE, - FACE, - FINGER, - FINGERTIP, - FOOT, - HAND, - HANDED, - HEAD, - LEG, - LIGHT_HEADED, - NECK, - SPINE, - TOE, - HAIR, - BLOOD, - LUNG, - NOSE, - STOMACH + ARM = 0, + EYE = 1, + FACE = 2, + FINGER = 3, + FINGERTIP = 4, + FOOT = 5, + HAND = 6, + HANDED = 7, + HEAD = 8, + LEG = 9, + LIGHT_HEADED = 10, + NECK = 11, + SPINE = 12, + TOE = 13, + HAIR = 14, + BLOOD = 15, + LUNG = 16, + NOSE = 17, + STOMACH = 18 }; /* indices for some special tin types */ diff --git a/include/prop.h b/include/prop.h index e9f1fc0c0..ba0dc0863 100644 --- a/include/prop.h +++ b/include/prop.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 prop.h $NHDT-Date: 1437877163 2015/07/26 02:19:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */ +/* NetHack 3.6 prop.h $NHDT-Date: 1547514641 2019/01/15 01:10:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.20 $ */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -12,79 +12,79 @@ */ /* Resistances to troubles */ enum prop_types { - FIRE_RES = 1, - COLD_RES, - SLEEP_RES, - DISINT_RES, - SHOCK_RES, - POISON_RES, - ACID_RES, - STONE_RES, + FIRE_RES = 1, + COLD_RES = 2, + SLEEP_RES = 3, + DISINT_RES = 4, + SHOCK_RES = 5, + POISON_RES = 6, + ACID_RES = 7, + STONE_RES = 8, /* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */ - DRAIN_RES, - SICK_RES, - INVULNERABLE, - ANTIMAGIC, + DRAIN_RES = 9, + SICK_RES = 10, + INVULNERABLE = 11, + ANTIMAGIC = 12, /* Troubles */ - STUNNED, - CONFUSION, - BLINDED, - DEAF, - SICK, - STONED, - STRANGLED, - VOMITING, - GLIB, - SLIMED, - HALLUC, - HALLUC_RES, - FUMBLING, - WOUNDED_LEGS, - SLEEPY, - HUNGER, + STUNNED = 13, + CONFUSION = 14, + BLINDED = 15, + DEAF = 16, + SICK = 17, + STONED = 18, + STRANGLED = 19, + VOMITING = 20, + GLIB = 21, + SLIMED = 22, + HALLUC = 23, + HALLUC_RES = 24, + FUMBLING = 25, + WOUNDED_LEGS = 26, + SLEEPY = 27, + HUNGER = 28, /* Vision and senses */ - SEE_INVIS, - TELEPAT, - WARNING, - WARN_OF_MON, - WARN_UNDEAD, - SEARCHING, - CLAIRVOYANT, - INFRAVISION, - DETECT_MONSTERS, + SEE_INVIS = 29, + TELEPAT = 30, + WARNING = 31, + WARN_OF_MON = 32, + WARN_UNDEAD = 33, + SEARCHING = 34, + CLAIRVOYANT = 35, + INFRAVISION = 36, + DETECT_MONSTERS = 37, /* Appearance and behavior */ - ADORNED, - INVIS, - DISPLACED, - STEALTH, - AGGRAVATE_MONSTER, - CONFLICT, + ADORNED = 38, + INVIS = 39, + DISPLACED = 40, + STEALTH = 41, + AGGRAVATE_MONSTER = 42, + CONFLICT = 43, /* Transportation */ - JUMPING, - TELEPORT, - TELEPORT_CONTROL, - LEVITATION, - FLYING, - WWALKING, - SWIMMING, - MAGICAL_BREATHING, - PASSES_WALLS, + JUMPING = 44, + TELEPORT = 45, + TELEPORT_CONTROL = 46, + LEVITATION = 47, + FLYING = 48, + WWALKING = 49, + SWIMMING = 50, + MAGICAL_BREATHING = 51, + PASSES_WALLS = 52, /* Physical attributes */ - SLOW_DIGESTION, - HALF_SPDAM, - HALF_PHDAM, - REGENERATION, - ENERGY_REGENERATION, - PROTECTION, - PROT_FROM_SHAPE_CHANGERS, - POLYMORPH, - POLYMORPH_CONTROL, - UNCHANGING, - FAST, - REFLECTING, - FREE_ACTION, - FIXED_ABIL, - LIFESAVED + SLOW_DIGESTION = 53, + HALF_SPDAM = 54, + HALF_PHDAM = 55, + REGENERATION = 56, + ENERGY_REGENERATION = 57, + PROTECTION = 58, + PROT_FROM_SHAPE_CHANGERS = 59, + POLYMORPH = 60, + POLYMORPH_CONTROL = 61, + UNCHANGING = 62, + FAST = 63, + REFLECTING = 64, + FREE_ACTION = 65, + FIXED_ABIL = 66, + LIFESAVED = 67 }; #define LAST_PROP (LIFESAVED) diff --git a/include/you.h b/include/you.h index 461b9656f..ad178a2c5 100644 --- a/include/you.h +++ b/include/you.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 you.h $NHDT-Date: 1450231172 2015/12/16 01:59:32 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.30 $ */ +/* NetHack 3.6 you.h $NHDT-Date: 1547514642 2019/01/15 01:10:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.35 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -262,12 +262,12 @@ struct Align { extern const struct Align aligns[]; /* table of available alignments */ enum utraptypes { - TT_BEARTRAP = 0, - TT_PIT, - TT_WEB, - TT_LAVA, - TT_INFLOOR, - TT_BURIEDBALL + TT_BEARTRAP = 0, + TT_PIT = 1, + TT_WEB = 2, + TT_LAVA = 3, + TT_INFLOOR = 4, + TT_BURIEDBALL = 5 }; /*** Information about the player ***/