Atrinik Server  4.0
material.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 MATERIAL_H
31 #define MATERIAL_H
32 
34 #define NROFMATERIALS 13
35 
37 #define NROFMATERIALS_REAL 64
38 
39 #define NUM_MATERIALS_REAL NROFMATERIALS * NROFMATERIALS_REAL + 1
40 
46 #define M_NONE 0
47 
48 #define M_PAPER 1
49 
50 #define M_IRON 2
51 
52 #define M_GLASS 4
53 
54 #define M_LEATHER 8
55 
56 #define M_WOOD 16
57 
58 #define M_ORGANIC 32
59 
60 #define M_STONE 64
61 
62 #define M_CLOTH 128
63 
64 #define M_ADAMANT 256
65 
66 #define M_LIQUID 512
67 
68 #define M_SOFT_METAL 1024
69 
70 #define M_BONE 2048
71 
72 #define M_ICE 4096
73 
76 #define M_START_PAPER 0 * 64 + 1
77 
78 #define M_START_IRON 1 * 64 + 1
79 
80 #define M_START_GLASS 2 * 64 + 1
81 
82 #define M_START_LEATHER 3 * 64 + 1
83 
84 #define M_START_WOOD 4 * 64 + 1
85 
86 #define M_START_ORGANIC 5 * 64 + 1
87 
88 #define M_START_STONE 6 * 64 + 1
89 
90 #define M_START_CLOTH 7 * 64 + 1
91 
92 #define M_START_ADAMANT 8 * 64 + 1
93 
94 #define M_START_LIQUID 9 * 64 + 1
95 
96 #define M_START_SOFT_METAL 10 * 64 + 1
97 
98 #define M_START_BONE 11 * 64 + 1
99 
100 #define M_START_ICE 12 * 64 + 1
101 
105 typedef struct material {
107  const char *name;
108 } material_t;
109 
113 typedef struct material_real {
115  char name[MAX_BUF];
116 
118  int quality;
119 
121  int type;
122 
124  int def_race;
126 
127 /* Prototypes */
128 
130 material_real_t materials_real[NUM_MATERIALS_REAL];
131 
132 void
133 material_init(void);
134 
135 #endif
struct material material_t
char name[MAX_BUF]
Definition: material.h:115
material_t materials[NROFMATERIALS]
Definition: material.c:37
void material_init(void)
Definition: material.c:62
#define NROFMATERIALS
Definition: material.h:34
material_real_t materials_real[NUM_MATERIALS_REAL]
Definition: material.c:56
struct material_real material_real_t
const char * name
Definition: material.h:107