Crossfire Server, Trunk
|
#include <global.h>
#include <stdlib.h>
#include <check.h>
#include "../include/toolkit_common.h"
#include <assets.h>
Go to the source code of this file.
Macros | |
#define | CCTK_ASSERT(__flag) |
#define | CHECK_TKFLAG(__flag) (status_flag&__flag) |
#define | SET_TKFLAG(__flag) (status_flag |= __flag) |
#define | STATUS_ANIM 0x4000 |
#define | STATUS_ARCH 0x8000 |
#define | STATUS_BLOCK 0x1000 |
#define | STATUS_BMAP 0x2000 |
#define | STATUS_CONFDIR 0x0004 |
#define | STATUS_DATADIR 0x0002 |
#define | STATUS_GLOBALS 0x0100 |
#define | STATUS_HASHTABLE 0x0200 |
#define | STATUS_LOGDIR 0x0001 |
#define | STATUS_OBJECTS 0x0400 |
#define | STATUS_VARS 0x0800 |
Functions | |
object * | cctk_create_game_object (const char *archname) |
void | cctk_init_std_archetypes (void) |
void | cctk_set_object_strings (object *op, const char *string) |
void | cctk_setdatadir (const char *datadir) |
void | cctk_setlog (const char *logfile) |
Variables | |
static int | status_flag = 0 |
#define CCTK_ASSERT | ( | __flag | ) |
Definition at line 54 of file toolkit_common.cpp.
#define CHECK_TKFLAG | ( | __flag | ) | (status_flag&__flag) |
Definition at line 53 of file toolkit_common.cpp.
#define SET_TKFLAG | ( | __flag | ) | (status_flag |= __flag) |
Definition at line 52 of file toolkit_common.cpp.
#define STATUS_ANIM 0x4000 |
Definition at line 50 of file toolkit_common.cpp.
#define STATUS_ARCH 0x8000 |
Definition at line 51 of file toolkit_common.cpp.
#define STATUS_BLOCK 0x1000 |
Definition at line 48 of file toolkit_common.cpp.
#define STATUS_BMAP 0x2000 |
Definition at line 49 of file toolkit_common.cpp.
#define STATUS_CONFDIR 0x0004 |
Definition at line 42 of file toolkit_common.cpp.
#define STATUS_DATADIR 0x0002 |
Definition at line 41 of file toolkit_common.cpp.
#define STATUS_GLOBALS 0x0100 |
Definition at line 44 of file toolkit_common.cpp.
#define STATUS_HASHTABLE 0x0200 |
Definition at line 45 of file toolkit_common.cpp.
#define STATUS_LOGDIR 0x0001 |
Definition at line 40 of file toolkit_common.cpp.
#define STATUS_OBJECTS 0x0400 |
Definition at line 46 of file toolkit_common.cpp.
#define STATUS_VARS 0x0800 |
Definition at line 47 of file toolkit_common.cpp.
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
archname | the archetype name to use (NULL= default one) |
Definition at line 105 of file toolkit_common.cpp.
References archininventory::arch, CCTK_ASSERT, CLEAR_FLAG, find_archetype(), FLAG_FREED, altar_valkyrie::obj, object_create_arch(), STATUS_ARCH, and STATUS_OBJECTS.
Referenced by START_TEST().
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.cpp.
References ASSETS_ALL, assets_collect(), assets_init(), CCTK_ASSERT, Settings::datadir, init_block(), init_globals(), init_hash_table(), init_objects(), init_stats(), SET_TKFLAG, settings, STATUS_ANIM, STATUS_ARCH, STATUS_BLOCK, STATUS_BMAP, STATUS_DATADIR, STATUS_GLOBALS, STATUS_HASHTABLE, STATUS_LOGDIR, STATUS_OBJECTS, and STATUS_VARS.
Referenced by setup().
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
op | The object to initialize |
string | The string to set in all object's char *fields |
Definition at line 127 of file toolkit_common.cpp.
References add_string(), and give::op.
Referenced by START_TEST().
void cctk_setdatadir | ( | const char * | datadir | ) |
Definition at line 69 of file toolkit_common.cpp.
References Settings::confdir, Settings::datadir, SET_TKFLAG, settings, STATUS_CONFDIR, and STATUS_DATADIR.
Referenced by main(), and setup().
void cctk_setlog | ( | const char * | logfile | ) |
set the logdir to use
Definition at line 64 of file toolkit_common.cpp.
References logfile, Settings::logfilename, SET_TKFLAG, settings, and STATUS_LOGDIR.
Referenced by setup().
|
static |
Definition at line 59 of file toolkit_common.cpp.