cham changes (trunk only)

This is a foundation patch for patches to follow.
- use a full short index for mon->cham field.
- The current system of providing CHAM_XXX values
  was limited to the 3 bits allocated in the bitfield and invalidated
  save/bones if the field was expanded.
- The current system didn't provide an easy backwards  change
  if multiple monster types wanted to use the bit, there was a one
  to one mapping:  For instance, if you wanted a CHAM_VAMPIRE,
  and you wanted vampires, vampire lords, and Vlad to use it, you
  would have to have CHAM_VAMPIRE, CHAM_VAMPIRE_LORD,
  and CHAM_VLAD defined to achieve that with the one-to-one backward
  mapping.
- This new way just uses the mon[] index in the mon->cham field and
  eliminates the need for CHAM_XXX  (CHAM_ORDINARY is still used).
- no longer requires the cham_to_pm mappings
This commit is contained in:
nethack.allison
2004-06-15 11:38:32 +00:00
parent 87507aed42
commit c8ef9338f0
22 changed files with 98 additions and 83 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)extern.h 3.4 2003/03/14 */
/* SCCS Id: @(#)extern.h 3.4 2004/06/12 */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1187,6 +1187,7 @@ E void NDECL(restartcham);
E void FDECL(restore_cham, (struct monst *));
E boolean FDECL(hideunder, (struct monst*));
E void FDECL(mon_animal_list, (BOOLEAN_P));
E int FDECL(select_newcham_form, (struct monst *));
E int FDECL(newcham, (struct monst *,struct permonst *,BOOLEAN_P,BOOLEAN_P));
E int FDECL(can_be_hatched, (int));
E int FDECL(egg_type_from_parent, (int,BOOLEAN_P));
@@ -1580,7 +1581,7 @@ E void NDECL(self_invis_message);
E void NDECL(set_uasmon);
E void NDECL(change_sex);
E void FDECL(polyself, (BOOLEAN_P));
E void FDECL(polyself, (int));
E int FDECL(polymon, (int));
E void NDECL(rehumanize);
E int NDECL(dobreathe);