Source:NetHack 5.0.0/include/amiconf.h

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to amiconf.h from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/include/amiconf.h#line12]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

1. /* NetHack 3.6	amiconf.h	$NHDT-Date: 1432512775 2015/05/25 00:12:55 $  $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
2. /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1990, 1991, 1992, 1993.
3.  */
4. /* NetHack may be freely redistributed.  See license for details. */
5. 
6. #ifndef AMICONF_H
7. #define AMICONF_H
8. 
9. #undef abs /* avoid using macro form of abs */
10. #ifndef __SASC_60
11. #undef min /* this gets redefined */
12. #undef max /* this gets redefined */
13. #endif
14. 
15. #include <time.h> /* get time_t defined before use! */
16. 
17. #ifdef CROSS_TO_AMIGA
18. #include <stdlib.h>
19. #include <string.h>
20. #include <unistd.h>
21. #include <dos/dos.h>
22. #include <clib/dos_protos.h>
23. #include <proto/dos.h>
24. #endif
25. 
26. #ifdef __SASC_60    /* since SAS can prevent re-inclusion */
27. #include <stdlib.h> /* general things, including builtins */
28. #include <string.h>
29. #endif
30. 
31. #ifdef AZTEC_50
32. #include <stdlib.h>
33. #define AZTEC_C_WORKAROUND /* Bug which turns up in sounds.c. Bummer... */
34. #define NO_SIGNAL          /* 5.0 signal handling doesn't like SIGINT... */
35. #endif
36. 
37. #ifdef _DCC
38. #include <stdlib.h>
39. #define _SIZE_T
40. #endif
41. 
42. #ifndef __GNUC__
43. typedef long off_t;
44. #endif
45. 
46. #define MICRO /* must be defined to allow some inclusions */
47. 
48. #define NOCWD_ASSUMPTIONS /* Allow paths to be specified for HACKDIR, \
49.                              LEVELDIR, SAVEDIR, BONESDIR, DATADIR,    \
50.                              SCOREDIR, LOCKDIR, CONFIGDIR, and TROUBLEDIR */
51. 
52. #define PATHLEN 130
53. 
54. /* data librarian defs */
55. #define DLBFILE "nhdat"   /* main library */
56. /* nhsdat sound library not used in 5.0 */
57. #undef DLBFILE2
58. 
59. #ifndef CROSS_TO_AMIGA
60. #define FILENAME_CMP stricmp /* case insensitive */
61. #else
62. #define FILENAME_CMP strcmpi /* case insensitive */
63. #endif
64. 
65. #ifndef __SASC_60
66. #define O_BINARY 0
67. #endif
68. 
69. /* Compile in New Intuition look for 2.0 */
70. #ifdef IDCMP_CLOSEWINDOW
71. #ifndef INTUI_NEW_LOOK
72. #define INTUI_NEW_LOOK 1
73. #endif
74. #endif
75. 
76. #define MFLOPPY /* You'll probably want this; provides assistance \
77.                  * for typical personal computer configurations   \
78.                  */
79. #ifndef CROSS_TO_AMIGA
80. #define RANDOM
81. #endif
82. 
83. /* ### amidos.c ### */
84. 
85. extern void nethack_exit(int);
86. 
87. /* ### amiwbench.c ### */
88. 
89. extern void ami_wbench_init(void);
90. extern void ami_wbench_args(void);
91. extern int ami_wbench_getsave(int);
92. extern void ami_wbench_unlink(char *);
93. extern int ami_wbench_iconsize(char *);
94. extern void ami_wbench_iconwrite(char *);
95. extern int ami_wbench_badopt(const char *);
96. extern void ami_wbench_cleanup(void);
97. extern void getlind(const char *, char *, const char *);
98. 
99. /* ### winreq.c ### */
100. 
101. extern void amii_setpens(int);
102. 
103. extern void exit(int);
104. extern void CleanUp(void);
105. extern void Abort(long);
106. extern int getpid(void);
107. extern char *CopyFile(const char *, const char *);
108. extern int kbhit(void);
109. extern int WindowGetchar(void);
110. extern void ami_argset(int *, char *[]);
111. extern void ami_mkargline(int *, char **[]);
112. extern void ami_wininit_data(int);
113. 
114. #define FromWBench 0 /* A hint for compiler ... */
115. /* extern boolean FromWBench;	/* how were we run? */
116. extern int ami_argc;
117. extern char **ami_argv;
118. 
119. #ifndef MICRO_H
120. #include "micro.h"
121. #endif
122. 
123. #ifndef PCCONF_H
124. #include "pcconf.h" /* remainder of stuff is almost same as the PC */
125. #endif
126. 
127. #define remove(x) unlink(x)
128. 
129. /* DICE wants rewind() to return void.	We want it to return int. */
130. #if defined(_DCC) || defined(__GNUC__)
131. #define rewind(f) fseek(f, 0, 0)
132. #endif
133. 
134. #ifdef AZTEC_C
135. extern FILE *freopen(const char *, const char *, FILE *);
136. extern char *gets(char *);
137. #endif
138. 
139. /*
140.  * If AZTEC_C  we can't use the long cpath in vision.c....
141.  */
142. #ifdef AZTEC_C
143. #undef MACRO_CPATH
144. #endif
145. 
146. /*
147.  *  (Possibly) configurable Amiga options:
148.  */
149. 
150. #define HACKFONT  /* Use special hack.font */
151. #ifndef CROSS_TO_AMIGA   /* issues with prototype and spawnl */
152. #define SHELL  /* Have a shell escape command (!) */
153. #endif
154. #define MAIL      /* Get mail at unexpected occasions */
155. #define DEFAULT_ICON "NetHack:default.icon" /* private icon */
156. #define AMIFLUSH /* toss typeahead (select flush in .cnf) */
157. /* #define OPT_DISPMAP		/* enable fast_map option */
158. 
159. /* new window system options */
160. /* WRONG - AMIGA_INTUITION should go away */
161. #ifdef AMII_GRAPHICS
162. #define AMIGA_INTUITION /* high power graphics interface (amii) */
163. #endif
164. 
165. #define CHANGE_COLOR 1
166. #define DEPTH 6 /* Maximum depth of the screen allowed */
167. #define AMII_MAXCOLORS (1L << DEPTH)
168. typedef unsigned short AMII_COLOR_TYPE;
169. 
170. #define PORT_HELP "nethack:amii.hlp"
171. 
172. #undef TERMLIB
173. 
174. #define AMII_MUFFLED_VOLUME 40
175. #define AMII_SOFT_VOLUME 50
176. #define AMII_OKAY_VOLUME 60
177. #define AMII_LOUDER_VOLUME 80
178. 
179. #ifdef TTY_GRAPHICS
180. #define ANSI_DEFAULT
181. #endif
182. 
183. extern int amibbs; /* BBS mode? */
184. 
185. #ifdef AMII_GRAPHICS
186. extern int amii_numcolors;
187. void amii_setpens(int);
188. #endif
189. 
190. /* for cmd.c: override version in micro.h */
191. #ifdef __SASC_60
192. #undef M
193. #define M(c) ((c) -128)
194. #endif
195. struct ami_sysflags {
196.     char sysflagsid[10];
197. #ifdef AMIFLUSH
198.     boolean altmeta;  /* use ALT keys as META */
199.     boolean amiflush; /* kill typeahead */
200. #endif
201. #ifdef AMII_GRAPHICS 
202.     int numcols;
203.     unsigned short amii_dripens[20]; /* DrawInfo Pens currently there are 13 in v39 */
204.     AMII_COLOR_TYPE amii_curmap[AMII_MAXCOLORS]; /* colormap */
205. #endif
206. #ifdef OPT_DISPMAP
207.     boolean fast_map; /* use optimized, less flexible map display */
208. #endif
209. #ifdef MFLOPPY
210.     boolean asksavedisk;
211. #endif
212. };
213. extern struct ami_sysflags sysflags;
214. 
215. #endif /* AMICONF_H */