… | |
… | |
16 | |
16 | |
17 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | |
20 | |
21 | The authors can be reached via e-mail at crossfire-devel@real-time.com |
21 | The authors can be reached via e-mail at crossfire@schmorp.de |
22 | */ |
22 | */ |
23 | |
23 | |
24 | /* This file is best viewed with a window width of about 100 character */ |
24 | /* This file is best viewed with a window width of about 100 character */ |
25 | |
25 | |
26 | /* This file is really too large. With all the .h files |
26 | /* This file is really too large. With all the .h files |
… | |
… | |
43 | * The following should still hopefully result in an error. |
43 | * The following should still hopefully result in an error. |
44 | */ |
44 | */ |
45 | error - Your ANSI C compiler should be defining __STDC__; |
45 | error - Your ANSI C compiler should be defining __STDC__; |
46 | #endif |
46 | #endif |
47 | |
47 | |
48 | #ifndef WIN32 /* ---win32 exclude unix configuration part */ |
|
|
49 | # include <autoconf.h> |
48 | #include <autoconf.h> |
50 | #endif |
|
|
51 | |
49 | |
52 | #define FONTDIR "" |
50 | #define FONTDIR "" |
53 | #define FONTNAME "" |
51 | #define FONTNAME "" |
54 | |
52 | |
55 | /* Decstations have trouble with fabs()... */ |
53 | /* Decstations have trouble with fabs()... */ |
… | |
… | |
92 | #define FONTSIZE 3000 /* Max chars in font */ |
90 | #define FONTSIZE 3000 /* Max chars in font */ |
93 | |
91 | |
94 | #define MAX_ANIMATIONS 256 |
92 | #define MAX_ANIMATIONS 256 |
95 | |
93 | |
96 | #define MAX_NAME 48 |
94 | #define MAX_NAME 48 |
97 | #define BIG_NAME 32 |
|
|
98 | #define MAX_EXT_TITLE 98 |
95 | #define MAX_EXT_TITLE 98 |
99 | |
96 | |
100 | /* Fatal variables: */ |
97 | /* Fatal variables: */ |
101 | #define OUT_OF_MEMORY 0 |
98 | #define OUT_OF_MEMORY 0 |
102 | #define MAP_ERROR 1 |
99 | #define MAP_ERROR 1 |
… | |
… | |
383 | #define PU_READABLES 0x00400000 |
380 | #define PU_READABLES 0x00400000 |
384 | #define PU_MAGIC_DEVICE 0x00800000 |
381 | #define PU_MAGIC_DEVICE 0x00800000 |
385 | |
382 | |
386 | #define PU_NOT_CURSED 0x01000000 |
383 | #define PU_NOT_CURSED 0x01000000 |
387 | #define PU_JEWELS 0x02000000 |
384 | #define PU_JEWELS 0x02000000 |
|
|
385 | #define PU_FLESH 0x04000000 |
388 | |
386 | |
389 | |
387 | |
390 | /* Instead of using arbitrary constants for indexing the |
388 | /* Instead of using arbitrary constants for indexing the |
391 | * freearr, add these values. <= SIZEOFFREE1 will get you |
389 | * freearr, add these values. <= SIZEOFFREE1 will get you |
392 | * within 1 space. <= SIZEOFFREE2 wll get you withing |
390 | * within 1 space. <= SIZEOFFREE2 wll get you withing |
… | |
… | |
1032 | * |
1030 | * |
1033 | * 0.94.2 - you probably shouldn't need to change any of the rand stuff |
1031 | * 0.94.2 - you probably shouldn't need to change any of the rand stuff |
1034 | * here. |
1032 | * here. |
1035 | */ |
1033 | */ |
1036 | |
1034 | |
1037 | #ifdef HAVE_SRANDOM |
|
|
1038 | # define RANDOM() random() |
1035 | #define RANDOM() random() |
1039 | # define SRANDOM(xyz) srandom(xyz) |
1036 | #define SRANDOM(xyz) srandom(xyz) |
1040 | #else |
|
|
1041 | # ifdef HAVE_SRAND48 |
|
|
1042 | # define RANDOM() lrand48() |
|
|
1043 | # define SRANDOM(xyz) srand48(xyz) |
|
|
1044 | # else |
|
|
1045 | # ifdef HAVE_SRAND |
|
|
1046 | # define RANDOM() rand() |
|
|
1047 | # define SRANDOM(xyz) srand(xyz) |
|
|
1048 | # else |
|
|
1049 | # error "Could not find a usable random routine" |
|
|
1050 | # endif |
|
|
1051 | # endif |
|
|
1052 | #endif |
|
|
1053 | |
1037 | |
1054 | /* Returns the weight of the given object. Note: it does not take the number of |
1038 | /* Returns the weight of the given object. Note: it does not take the number of |
1055 | * items (nrof) into account. |
1039 | * items (nrof) into account. |
1056 | */ |
1040 | */ |
1057 | #define WEIGHT(op) (op->nrof?op->weight:op->weight+op->carrying) |
1041 | #define WEIGHT(op) (op->nrof?op->weight:op->weight+op->carrying) |