Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removing #ifdef's



> 
>  It would also improve readability of the code some to remove all the #ifdefs
> that are currently around some of those debug areas because they generate mor
> output that people generally want.

Well, how about we remove lots of #ifdef's in general?  They DO make
the code more confusing.

I'm talking about removing compile time options that are
non-controversial.  Like for example, I don't think anyone would
find crossfire playable anymore with #define USE_SKILLS.

How about eliminating these #ifdef's:

USE_SKILLS  (rewrite code so it ON)
#define NO_AUTO_SKILL_SWITCH   (-->ON)
ALCHEMY  (-->ON)
FULL_RING_DESCRIPTION  (-->ON)
MULTIPLE_GODS  (-->ON)
SPELLPOINT_LEVEL_DEPEND (-->ON)
USE_LIGHTING(-->ON)
#define	USE_SWAP_STATS(-->ON)
#define SORT_ROLLED_STATS(-->ON)

As to all the #ifdef's about logging, I think it would
be cleaner to do it like this:

*never* #ifdef logging commands in the code in general.

Make the LOG command smart so that it'll do all the ifs
rather than bury them all over the code.

Here's an example call:

Log(llevDebug,LOG_ATTACK_DEBUG|LOG_MAGIC_DEBUG,"Error message here");
and hav ethe log function decide whether to log attack-debug messages
and/or LOG_MAGIC_DEBUG messages.

PeterM