Crossfire Server, Trunk  R20513
Functions
toolkit_common.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

objectcctk_create_game_object (const char *archname)
 Initialize a simple object. More...
 
void cctk_init_std_archetypes (void)
 Loads up to archetype initialisation using standard crossfire files in source tree. More...
 
void cctk_set_object_strings (object *op, const char *string)
 Set all strings in given object to given parameter string, used for checking cleaning of objects, mainly. More...
 
void cctk_setconfdir (const char *confdir)
 
void cctk_setdatadir (const char *datadir)
 
void cctk_setlog (const char *logfile)
 set the logdir to use More...
 

Function Documentation

object* cctk_create_game_object ( const char *  archname)

Initialize a simple object.

Make it appear as an actual ingame object by setting appropriate flags (so it is part of game, not just a storage) Requires arch and object initialized in status flag

Parameters
archnamethe archetype name to use (NULL= default one)
Returns
created object, including its more parts, or NULL if archetype doesn't exist.

Definition at line 106 of file toolkit_common.c.

References CCTK_ASSERT, CLEAR_FLAG, find_archetype(), FLAG_FREED, object_create_arch(), STATUS_ARCH, and STATUS_OBJECTS.

Referenced by START_TEST().

Here is the call graph for this function:

Here is the caller graph for this function:

void cctk_init_std_archetypes ( void  )

Loads up to archetype initialisation using standard crossfire files in source tree.

This function requires that cctk_setlog and cctk_setdatadir have both been run already.

Definition at line 83 of file toolkit_common.c.

References Settings::archetypes, CCTK_ASSERT, FALSE, init_anim(), init_archetypes(), init_block(), init_globals(), init_hash_table(), init_objects(), init_stats(), read_bmap_names(), read_smooth(), SET_TKFLAG, settings, STATUS_ANIM, STATUS_ARCH, STATUS_BLOCK, STATUS_BMAP, STATUS_DATADIR, STATUS_GLOBALS, STATUS_HASHTABLE, STATUS_LOGDIR, STATUS_OBJECTS, STATUS_VARS, and Settings::treasures.

Referenced by setup().

Here is the call graph for this function:

Here is the caller graph for this function:

void cctk_set_object_strings ( object op,
const char *  string 
)

Set all strings in given object to given parameter string, used for checking cleaning of objects, mainly.

Parameters
opThe object to initialize
stringThe string to set in all object's char *fields

Definition at line 128 of file toolkit_common.c.

References add_string(), obj::lore, obj::materialname, obj::msg, obj::name, obj::name_pl, obj::race, obj::skill, obj::slaying, and obj::title.

Referenced by START_TEST().

Here is the call graph for this function:

Here is the caller graph for this function:

void cctk_setconfdir ( const char *  confdir)

Definition at line 73 of file toolkit_common.c.

References Settings::confdir, SET_TKFLAG, settings, and STATUS_CONFDIR.

Referenced by setup().

Here is the caller graph for this function:

void cctk_setdatadir ( const char *  datadir)

Definition at line 68 of file toolkit_common.c.

References Settings::datadir, SET_TKFLAG, settings, and STATUS_DATADIR.

Referenced by setup().

Here is the caller graph for this function:

void cctk_setlog ( const char *  logfile)

set the logdir to use

Definition at line 63 of file toolkit_common.c.

References logfile, Settings::logfilename, SET_TKFLAG, settings, and STATUS_LOGDIR.

Referenced by setup().

Here is the caller graph for this function: