Crossfire Server, Trunk  R20513
Functions
info.c File Reference

The functions in this file are purely mean to generate information in differently formatted output, mainly about monsters. More...

#include "global.h"
#include <stdlib.h>
Include dependency graph for info.c:

Go to the source code of this file.

Functions

static void bitstostring (long bits, int num, char *str)
 Writes num ones and zeros to the given string based on the bits variable. More...
 
void dump_abilities (void)
 Dump to standard out the abilities of all monsters. More...
 
void print_monsters (void)
 As dump_abilities(), but with an alternative way of output. More...
 

Detailed Description

The functions in this file are purely mean to generate information in differently formatted output, mainly about monsters.

Definition in file info.c.

Function Documentation

static void bitstostring ( long  bits,
int  num,
char *  str 
)
static

Writes num ones and zeros to the given string based on the bits variable.

Parameters
bitsvariable to convert to binary string
numnumber of bits to dump. Values above 32 will be ignored.
strstring to write to. Must be long enough.
Note
no check is done whether str has enough space to write or not. Final \0 is appended to str.

Definition at line 39 of file info.c.

Referenced by print_monsters().

Here is the caller graph for this function:

void dump_abilities ( void  )

Dump to standard out the abilities of all monsters.

Definition at line 63 of file info.c.

References liv::ac, archt::clone, describe_item(), liv::exp, first_archetype, FLAG_CHANGING, FLAG_MONSTER, FMT64, liv::hp, obj::name, archt::name, archt::next, obj::other_arch, QUERY_FLAG, obj::stats, and stringbuffer_finish().

Referenced by init_beforeplay().

Here is the call graph for this function:

Here is the caller graph for this function:

void print_monsters ( void  )

As dump_abilities(), but with an alternative way of output.

Definition at line 95 of file info.c.

References liv::ac, obj::arch, arch_to_object(), obj::attacktype, bitstostring(), liv::dam, liv::exp, first_archetype, FLAG_MONSTER, FMT64, liv::maxhp, archt::name, new_exp(), archt::next, NROFATTACKS, object_free_drop_inventory(), QUERY_FLAG, obj::resist, obj::stats, and liv::wc.

Referenced by init_beforeplay().

Here is the call graph for this function:

Here is the caller graph for this function: