… | |
… | |
27 | */ |
27 | */ |
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 | |
|
|
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 | |
|
|
36 | void |
|
|
37 | init_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 | |
32 | |
48 | /* add_god_to_list()- called only from init_gods */ |
33 | /* add_god_to_list()- called only from init_gods */ |
49 | void |
34 | void |
50 | add_god_to_list (archetype *god_arch) |
35 | add_god_to_list (archetype *god_arch) |
51 | { |
36 | { |
… | |
… | |
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) */ |
|
|
145 | void |
|
|
146 | init_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 | |