more explicit enum values

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