Crossfire Server, Branch 1.12
R12190
|
God-related common functions. More...
Go to the source code of this file.
Functions | |
static void | add_god_to_list (archetype *god_arch) |
Adds specified god to linked list, gives it an id. | |
void | dump_gods (void) |
Prints all gods to stderr. | |
void | free_all_god (void) |
Frees all god information. | |
godlink * | get_rand_god (void) |
Returns a random god. | |
void | init_gods (void) |
This takes a look at all of the archetypes to find the objects which correspond to the GODS (type GOD) | |
static godlink * | init_godslist (void) |
Initializes a god structure. | |
const object * | pntr_to_god_obj (godlink *godlnk) |
Returns a pointer to the object We need to be VERY careful about using this, as we are returning a pointer to the CLONE object. |
God-related common functions.
Definition in file holy.c.
static void add_god_to_list | ( | archetype * | god_arch | ) | [static] |
Adds specified god to linked list, gives it an id.
god_arch | God to add. If NULL, will log an error. |
Definition at line 80 of file holy.c.
References add_string(), glnk::arch, first_god, glnk::id, init_godslist(), llevDebug, llevError, LOG(), glnk::name, and glnk::next.
Referenced by init_gods().
void dump_gods | ( | void | ) |
Prints all gods to stderr.
Definition at line 161 of file holy.c.
References DESCRIBE_ABILITY, DESCRIBE_PATH, describe_resistance(), first_god, FLAG_BLIND, FLAG_MAKE_INVIS, FLAG_REFL_MISSILE, FLAG_REFL_SPELL, FLAG_SEE_IN_DARK, FLAG_STEALTH, FLAG_UNDEAD, FLAG_USE_ARMOUR, FLAG_USE_WEAPON, FLAG_XRAYS, HUGE_BUF, glnk::next, pntr_to_god_obj(), QUERY_FLAG, and snprintf().
Referenced by init_beforeplay().
void free_all_god | ( | void | ) |
Frees all god information.
Definition at line 142 of file holy.c.
References first_god, free_string(), llevDebug, LOG(), glnk::name, and glnk::next.
Referenced by cleanup().
godlink* get_rand_god | ( | void | ) |
Returns a random god.
Definition at line 111 of file holy.c.
References first_god, glnk::id, llevError, LOG(), and glnk::next.
Referenced by god_info_msg().
void init_gods | ( | void | ) |
This takes a look at all of the archetypes to find the objects which correspond to the GODS (type GOD)
Definition at line 63 of file holy.c.
References add_god_to_list(), first_archetype, GOD, llevDebug, and LOG().
Referenced by init_beforeplay(), main(), and setup().
static godlink* init_godslist | ( | void | ) | [static] |
Initializes a god structure.
Definition at line 47 of file holy.c.
References glnk::arch, fatal(), glnk::id, glnk::name, glnk::next, and OUT_OF_MEMORY.
Referenced by add_god_to_list().
const object* pntr_to_god_obj | ( | godlink * | godlnk | ) |
Returns a pointer to the object We need to be VERY careful about using this, as we are returning a pointer to the CLONE object.
-b.t.
godlnk | god to get object. |
Definition at line 133 of file holy.c.
References glnk::arch.
Referenced by dump_gods(), find_god(), and god_info_msg().