More and more enums
This commit is contained in:
@@ -6,6 +6,39 @@
|
|||||||
#define OBJCLASS_H
|
#define OBJCLASS_H
|
||||||
|
|
||||||
/* [misnamed] definition of a type of object */
|
/* [misnamed] definition of a type of object */
|
||||||
|
enum obj_material_types {
|
||||||
|
LIQUID = 1, /* currently only for venom */
|
||||||
|
WAX,
|
||||||
|
VEGGY, /* foodstuffs */
|
||||||
|
FLESH, /* ditto */
|
||||||
|
PAPER,
|
||||||
|
CLOTH,
|
||||||
|
LEATHER,
|
||||||
|
WOOD,
|
||||||
|
BONE,
|
||||||
|
DRAGON_HIDE, /* not leather! */
|
||||||
|
IRON, /* Fe - includes steel */
|
||||||
|
METAL, /* Sn, &c. */
|
||||||
|
COPPER, /* Cu - includes brass */
|
||||||
|
SILVER, /* Ag */
|
||||||
|
GOLD, /* Au */
|
||||||
|
PLATINUM, /* Pt */
|
||||||
|
MITHRIL,
|
||||||
|
PLASTIC,
|
||||||
|
GLASS,
|
||||||
|
GEMSTONE,
|
||||||
|
MINERAL
|
||||||
|
};
|
||||||
|
|
||||||
|
enum obj_armor_types {
|
||||||
|
ARM_SUIT = 0,
|
||||||
|
ARM_SHIELD, /* needed for special wear function */
|
||||||
|
ARM_HELM,
|
||||||
|
ARM_GLOVES,
|
||||||
|
ARM_BOOTS,
|
||||||
|
ARM_CLOAK,
|
||||||
|
ARM_SHIRT
|
||||||
|
};
|
||||||
|
|
||||||
struct objclass {
|
struct objclass {
|
||||||
short oc_name_idx; /* index of actual name */
|
short oc_name_idx; /* index of actual name */
|
||||||
@@ -40,28 +73,7 @@ struct objclass {
|
|||||||
|
|
||||||
/*Bitfield(oc_subtyp,3);*/ /* Now too big for a bitfield... see below */
|
/*Bitfield(oc_subtyp,3);*/ /* Now too big for a bitfield... see below */
|
||||||
|
|
||||||
Bitfield(oc_material, 5);
|
Bitfield(oc_material, 5); /* one of obj_material_types */
|
||||||
#define LIQUID 1 /* currently only for venom */
|
|
||||||
#define WAX 2
|
|
||||||
#define VEGGY 3 /* foodstuffs */
|
|
||||||
#define FLESH 4 /* ditto */
|
|
||||||
#define PAPER 5
|
|
||||||
#define CLOTH 6
|
|
||||||
#define LEATHER 7
|
|
||||||
#define WOOD 8
|
|
||||||
#define BONE 9
|
|
||||||
#define DRAGON_HIDE 10 /* not leather! */
|
|
||||||
#define IRON 11 /* Fe - includes steel */
|
|
||||||
#define METAL 12 /* Sn, &c. */
|
|
||||||
#define COPPER 13 /* Cu - includes brass */
|
|
||||||
#define SILVER 14 /* Ag */
|
|
||||||
#define GOLD 15 /* Au */
|
|
||||||
#define PLATINUM 16 /* Pt */
|
|
||||||
#define MITHRIL 17
|
|
||||||
#define PLASTIC 18
|
|
||||||
#define GLASS 19
|
|
||||||
#define GEMSTONE 20
|
|
||||||
#define MINERAL 21
|
|
||||||
|
|
||||||
#define is_organic(otmp) (objects[otmp->otyp].oc_material <= WOOD)
|
#define is_organic(otmp) (objects[otmp->otyp].oc_material <= WOOD)
|
||||||
#define is_metallic(otmp) \
|
#define is_metallic(otmp) \
|
||||||
@@ -84,13 +96,6 @@ struct objclass {
|
|||||||
schar oc_subtyp;
|
schar oc_subtyp;
|
||||||
#define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */
|
#define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */
|
||||||
#define oc_armcat oc_subtyp /* for armor */
|
#define oc_armcat oc_subtyp /* for armor */
|
||||||
#define ARM_SHIELD 1 /* needed for special wear function */
|
|
||||||
#define ARM_HELM 2
|
|
||||||
#define ARM_GLOVES 3
|
|
||||||
#define ARM_BOOTS 4
|
|
||||||
#define ARM_CLOAK 5
|
|
||||||
#define ARM_SHIRT 6
|
|
||||||
#define ARM_SUIT 0
|
|
||||||
|
|
||||||
uchar oc_oprop; /* property (invis, &c.) conveyed */
|
uchar oc_oprop; /* property (invis, &c.) conveyed */
|
||||||
char oc_class; /* object class */
|
char oc_class; /* object class */
|
||||||
|
|||||||
@@ -145,43 +145,47 @@ enum opcode_defs {
|
|||||||
* mean.
|
* mean.
|
||||||
*/
|
*/
|
||||||
/* MONSTER */
|
/* MONSTER */
|
||||||
#define SP_M_V_PEACEFUL 0
|
enum sp_mon_var_flags {
|
||||||
#define SP_M_V_ALIGN 1
|
SP_M_V_PEACEFUL = 0,
|
||||||
#define SP_M_V_ASLEEP 2
|
SP_M_V_ALIGN,
|
||||||
#define SP_M_V_APPEAR 3
|
SP_M_V_ASLEEP,
|
||||||
#define SP_M_V_NAME 4
|
SP_M_V_APPEAR,
|
||||||
|
SP_M_V_NAME,
|
||||||
|
SP_M_V_FEMALE,
|
||||||
|
SP_M_V_INVIS,
|
||||||
|
SP_M_V_CANCELLED,
|
||||||
|
SP_M_V_REVIVED,
|
||||||
|
SP_M_V_AVENGE,
|
||||||
|
SP_M_V_FLEEING,
|
||||||
|
SP_M_V_BLINDED,
|
||||||
|
SP_M_V_PARALYZED,
|
||||||
|
SP_M_V_STUNNED,
|
||||||
|
SP_M_V_CONFUSED,
|
||||||
|
SP_M_V_SEENTRAPS,
|
||||||
|
|
||||||
#define SP_M_V_FEMALE 5
|
SP_M_V_END
|
||||||
#define SP_M_V_INVIS 6
|
};
|
||||||
#define SP_M_V_CANCELLED 7
|
|
||||||
#define SP_M_V_REVIVED 8
|
|
||||||
#define SP_M_V_AVENGE 9
|
|
||||||
#define SP_M_V_FLEEING 10
|
|
||||||
#define SP_M_V_BLINDED 11
|
|
||||||
#define SP_M_V_PARALYZED 12
|
|
||||||
#define SP_M_V_STUNNED 13
|
|
||||||
#define SP_M_V_CONFUSED 14
|
|
||||||
#define SP_M_V_SEENTRAPS 15
|
|
||||||
|
|
||||||
#define SP_M_V_END 16 /* end of variable parameters */
|
|
||||||
|
|
||||||
/* OBJECT */
|
/* OBJECT */
|
||||||
#define SP_O_V_SPE 0
|
enum sp_obj_var_flags {
|
||||||
#define SP_O_V_CURSE 1
|
SP_O_V_SPE = 0,
|
||||||
#define SP_O_V_CORPSENM 2
|
SP_O_V_CURSE,
|
||||||
#define SP_O_V_NAME 3
|
SP_O_V_CORPSENM,
|
||||||
#define SP_O_V_QUAN 4
|
SP_O_V_NAME,
|
||||||
#define SP_O_V_BURIED 5
|
SP_O_V_QUAN,
|
||||||
#define SP_O_V_LIT 6
|
SP_O_V_BURIED,
|
||||||
#define SP_O_V_ERODED 7
|
SP_O_V_LIT,
|
||||||
#define SP_O_V_LOCKED 8
|
SP_O_V_ERODED,
|
||||||
#define SP_O_V_TRAPPED 9
|
SP_O_V_LOCKED,
|
||||||
#define SP_O_V_RECHARGED 10
|
SP_O_V_TRAPPED,
|
||||||
#define SP_O_V_INVIS 11
|
SP_O_V_RECHARGED,
|
||||||
#define SP_O_V_GREASED 12
|
SP_O_V_INVIS,
|
||||||
#define SP_O_V_BROKEN 13
|
SP_O_V_GREASED,
|
||||||
#define SP_O_V_COORD 14
|
SP_O_V_BROKEN,
|
||||||
#define SP_O_V_END 15 /* end of variable parameters */
|
SP_O_V_COORD,
|
||||||
|
|
||||||
|
SP_O_V_END
|
||||||
|
};
|
||||||
|
|
||||||
/* When creating objects, we need to know whether
|
/* When creating objects, we need to know whether
|
||||||
* it's a container and/or contents.
|
* it's a container and/or contents.
|
||||||
|
|||||||
@@ -27,11 +27,13 @@ NEARDATA struct instance_flags iflags; /* provide linkage */
|
|||||||
#define PREFER_TILED FALSE
|
#define PREFER_TILED FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MESSAGE_OPTION 1
|
enum window_option_types {
|
||||||
#define STATUS_OPTION 2
|
MESSAGE_OPTION = 1,
|
||||||
#define MAP_OPTION 3
|
STATUS_OPTION,
|
||||||
#define MENU_OPTION 4
|
MAP_OPTION,
|
||||||
#define TEXT_OPTION 5
|
MENU_OPTION,
|
||||||
|
TEXT_OPTION
|
||||||
|
};
|
||||||
|
|
||||||
#define PILE_LIMIT_DFLT 5
|
#define PILE_LIMIT_DFLT 5
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user