ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/holy.C
(Generate patch)

Comparing deliantra/server/common/holy.C (file contents):
Revision 1.18 by root, Mon Oct 12 14:00:57 2009 UTC vs.
Revision 1.20 by root, Fri Nov 6 12:49:19 2009 UTC

28 28
29#include <global.h> 29#include <global.h>
30#include <living.h> 30#include <living.h>
31#include <spells.h> 31#include <spells.h>
32 32
33/* init_gods() - this takes a look at all of the archetypes to find
34 * the objects which correspond to the GODS (type GOD) */
35
36void
37init_gods (void)
38{
39 LOG (llevDebug, "Initialising gods...\n");
40
41 for_all_archetypes (at)
42 if (at->type == GOD)
43 add_god_to_list (at);
44
45 LOG (llevDebug, "done.\n");
46}
47
48/* add_god_to_list()- called only from init_gods */ 33/* add_god_to_list()- called only from init_gods */
49void 34static void
50add_god_to_list (archetype *god_arch) 35add_god_to_list (archetype *god_arch)
51{ 36{
52 if (!god_arch) 37 if (!god_arch)
53 { 38 {
54 LOG (llevError, "ERROR: Tried to add null god to list!\n"); 39 LOG (llevError, "ERROR: Tried to add null god to list!\n");
83} 68}
84 69
85/* baptize_altar() - (cosmetically) change the name to that of the 70/* baptize_altar() - (cosmetically) change the name to that of the
86 * god in question, then set the title for later use. -b.t. 71 * god in question, then set the title for later use. -b.t.
87 */ 72 */
88int 73static int
89baptize_altar (object *op) 74baptize_altar (object *op)
90{ 75{
91 char buf[MAX_BUF]; 76 char buf[MAX_BUF];
92 77
93 /* if the title field is pre-set, then that altar is 78 /* if the title field is pre-set, then that altar is
152 { 137 {
153 godnext = god->next; 138 godnext = god->next;
154 delete god; 139 delete god;
155 } 140 }
156} 141}
142
143/* init_gods() - this takes a look at all of the archetypes to find
144 * the objects which correspond to the GODS (type GOD) */
145void
146init_gods (void)
147{
148 LOG (llevDebug, "Initialising gods...\n");
149
150 for_all_archetypes (at)
151 if (at->type == GOD)
152 add_god_to_list (at);
153
154 LOG (llevDebug, "done.\n");
155}
156

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines