]> granicus.if.org Git - nethack/commit
cham changes (trunk only)
authornethack.allison <nethack.allison>
Tue, 15 Jun 2004 11:38:32 +0000 (11:38 +0000)
committernethack.allison <nethack.allison>
Tue, 15 Jun 2004 11:38:32 +0000 (11:38 +0000)
commitc8ef9338f0cb39262a4d2c892c1d36bd45a01e2c
tree244f86c7ec6f7b816edbb5f33586f85b9e2503c8
parent87507aed4283b89feb5b0825199fb463785580ac
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
22 files changed:
doc/fixes35.0
include/extern.h
include/mondata.h
include/monflag.h
include/monst.h
include/patchlevel.h
src/allmain.c
src/apply.c
src/cmd.c
src/dogmove.c
src/eat.c
src/fountain.c
src/mhitu.c
src/minion.c
src/mon.c
src/monst.c
src/muse.c
src/pline.c
src/polyself.c
src/potion.c
src/trap.c
src/zap.c