Atrinik Server  4.0
arch.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef ARCH_H
31 #define ARCH_H
32 
33 #include <object.h>
34 #include <decls.h>
35 
40 struct archetype {
41  struct archetype *head;
42  struct archetype *more;
43 
44  UT_hash_handle hh;
45 
46  shstr *name;
47  object clone;
48 };
49 
54 enum {
67 
69 };
70 
71 /* Prototypes */
72 
73 #ifndef __CPROTO__
74 
77 bool arch_in_init;
78 archetype_t *wp_archetype;
79 
80 void arch_init(void);
81 void arch_deinit(void);
82 void arch_add(archetype_t *at);
83 archetype_t *arch_find(const char *name);
84 object *arch_get(const char *name);
85 object *arch_to_object(archetype_t *at);
87 
88 #endif
89 
90 #endif
archetype_t * arch_table
Definition: arch.c:41
The 'inv_group_prev' archetype.
Definition: arch.h:64
The 'inv_start' archetype.
Definition: arch.h:65
archetype_t * arch_clone(archetype_t *at)
Definition: arch.c:464
The 'inv_end' archetype.
Definition: arch.h:66
The 'ring_normal' archetype.
Definition: arch.h:59
The 'base_info' archetype.
Definition: arch.h:57
object * arch_get(const char *name)
Definition: arch.c:430
The 'empty_archetype' archetype.
Definition: arch.h:56
The 'amulet_normal' archetype.
Definition: arch.h:61
void arch_add(archetype_t *at)
Definition: arch.c:390
The 'ring_generic' archetype.
Definition: arch.h:60
void arch_deinit(void)
Definition: arch.c:104
archetype_t * arches[ARCH_MAX]
Definition: arch.c:45
Definition: arch.h:40
struct archetype * more
Next part of a linked object.
Definition: arch.h:42
object * arch_to_object(archetype_t *at)
Definition: arch.c:446
void arch_init(void)
Definition: arch.c:78
UT_hash_handle hh
Hash handle.
Definition: arch.h:44
The 'waypoint' archetype.
Definition: arch.h:55
The 'inv_group_next' archetype.
Definition: arch.h:63
shstr * name
More definite name, like "kobold".
Definition: arch.h:46
Maximum number of cached archetype pointers.
Definition: arch.h:68
The 'amulet_generic' archetype.
Definition: arch.h:62
bool arch_in_init
Definition: arch.c:50
struct archetype * head
The main part of a linked object.
Definition: arch.h:41
The 'level_up' archetype.
Definition: arch.h:58
object clone
An object from which to do object_copy().
Definition: arch.h:47
archetype_t * arch_find(const char *name)
Definition: arch.c:407