Crossfire Server, Trunk
info.cpp File Reference
#include "global.h"
#include "assets.h"
#include "AssetsManager.h"
#include <stdlib.h>
+ Include dependency graph for info.cpp:

Go to the source code of this file.

Functions

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

Detailed Description

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

Definition in file info.cpp.

Function Documentation

◆ bitstostring()

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 41 of file info.cpp.

References make_face_from_files::str.

Referenced by print_monsters().

+ Here is the caller graph for this function:

◆ dump_abilities()

void dump_abilities ( void  )

Dump to standard out the abilities of all monsters.

Definition at line 65 of file info.cpp.

References AssetsManager::archetypes(), archetype::clone, describe_item(), AssetsCollection< T, Key >::each(), FLAG_CHANGING, FLAG_MONSTER, FMT64, getManager(), HEAD, if(), give::name, archetype::name, object::other_arch, QUERY_FLAG, and stringbuffer_finish().

Referenced by init_beforeplay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_monsters()

void print_monsters ( void  )

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

Definition at line 100 of file info.cpp.

References arch_to_object(), AssetsManager::archetypes(), bitstostring(), AssetsCollection< T, Key >::each(), FLAG_MONSTER, FMT64, getManager(), new_exp(), NROFATTACKS, object_free_drop_inventory(), give::op, and QUERY_FLAG.

Referenced by init_beforeplay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: