… | |
… | |
21 | * |
21 | * |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
23 | */ |
23 | */ |
24 | |
24 | |
25 | /* #defines are needed by living.h, so they must be loaded early */ |
25 | /* #defines are needed by living.h, so they must be loaded early */ |
26 | #ifndef MATERIAL_H_1 |
26 | #ifndef MATERIAL_H_ |
27 | #define MATERIAL_H_1 |
27 | #define MATERIAL_H_ |
28 | |
28 | |
29 | #define NROFMATERIALS 13 |
29 | #define NROFMATERIALS 13 |
30 | |
30 | |
31 | #define M_PAPER 1 |
31 | #define M_PAPER 1 |
32 | #define M_IRON 2 |
32 | #define M_IRON 2 |
… | |
… | |
39 | #define M_ADAMANT 256 |
39 | #define M_ADAMANT 256 |
40 | #define M_LIQUID 512 |
40 | #define M_LIQUID 512 |
41 | #define M_SOFT_METAL 1024 |
41 | #define M_SOFT_METAL 1024 |
42 | #define M_BONE 2048 |
42 | #define M_BONE 2048 |
43 | #define M_ICE 4096 |
43 | #define M_ICE 4096 |
44 | #define M_SPECIAL 8192 /* when displaying names, don't show the |
44 | #define M_SPECIAL 8192 /* when displaying names, don't show the materialname */ |
45 | materialname */ |
|
|
46 | |
45 | |
47 | struct materialtype_t : zero_initialised |
46 | struct materialtype_t : zero_initialised |
48 | { |
47 | { |
49 | struct materialtype_t *next; |
48 | struct materialtype_t *next; |
50 | shstr name; |
49 | shstr name; |
… | |
… | |
60 | sint8 ac; |
59 | sint8 ac; |
61 | sint8 sp; |
60 | sint8 sp; |
62 | int weight; |
61 | int weight; |
63 | int value; |
62 | int value; |
64 | int density; // g/cm³ * 1000 == kg/m³ |
63 | int density; // g/cm³ * 1000 == kg/m³ |
|
|
64 | |
|
|
65 | materialtype_t (); |
65 | }; |
66 | }; |
66 | |
67 | |
67 | extern materialtype_t *materialt; |
68 | extern materialtype_t *materialt; |
|
|
69 | extern materialtype_t material_null; // defined in shstr.C |
68 | |
70 | |
69 | #endif /* MATERIAL_H_1 */ |
71 | void load_materials (); |
|
|
72 | // provide a material for the item if the material isn't set yet |
|
|
73 | void select_material (object *op, int difficulty); |
70 | |
74 | |
|
|
75 | #endif |
|
|
76 | |