1414
1515#include <time.h> /* get time_t defined before use! */
1616
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+
1726#ifdef __SASC_60 /* since SAS can prevent re-inclusion */
1827#include <stdlib.h> /* general things, including builtins */
1928#include <string.h>
2837#ifdef _DCC
2938#include <stdlib.h>
3039#define _SIZE_T
31- #define DCC30_BUG /* A bitfield bug (from dog.c, others) in DICE 3.0. */
3240#endif
3341
3442#ifndef __GNUC__
@@ -41,16 +49,18 @@ typedef long off_t;
4149 LEVELDIR, SAVEDIR, BONESDIR, DATADIR, \
4250 SCOREDIR, LOCKDIR, CONFIGDIR, and TROUBLEDIR */
4351
52+ #define PATHLEN 130
53+
4454/* data librarian defs */
45- #ifndef NOCWD_ASSUMPTIONS
46- #define DLBFILE "NetHack:nhdat" /* main library */
47- #define DLBFILE2 "NetHack:nhsdat" /* sound library */
48- #else
4955#define DLBFILE "nhdat" /* main library */
50- #define DLBFILE2 "nhsdat" /* sound library */
51- #endif
56+ /* nhsdat sound library not used in 5.0 */
57+ #undef DLBFILE2
5258
59+ #ifndef CROSS_TO_AMIGA
5360#define FILENAME_CMP stricmp /* case insensitive */
61+ #else
62+ #define FILENAME_CMP strcmpi /* case insensitive */
63+ #endif
5464
5565#ifndef __SASC_60
5666#define O_BINARY 0
@@ -66,38 +76,40 @@ typedef long off_t;
6676#define MFLOPPY /* You'll probably want this; provides assistance \
6777 * for typical personal computer configurations \
6878 */
79+ #ifndef CROSS_TO_AMIGA
6980#define RANDOM
81+ #endif
7082
7183/* ### amidos.c ### */
7284
73- extern void FDECL ( nethack_exit , (int ) );
85+ extern void nethack_exit (int );
7486
7587/* ### amiwbench.c ### */
7688
77- extern void NDECL ( ami_wbench_init );
78- extern void NDECL ( ami_wbench_args );
79- extern int FDECL ( ami_wbench_getsave , (int ) );
80- extern void FDECL ( ami_wbench_unlink , (char * ) );
81- extern int FDECL ( ami_wbench_iconsize , (char * ) );
82- extern void FDECL ( ami_wbench_iconwrite , (char * ) );
83- extern int FDECL ( ami_wbench_badopt , (const char * ) );
84- extern void NDECL ( ami_wbench_cleanup );
85- extern void FDECL ( getlind , (const char * , char * , const char * ) );
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 * );
8698
8799/* ### winreq.c ### */
88100
89101extern void amii_setpens (int );
90102
91- extern void FDECL ( exit , (int ) );
92- extern void NDECL ( CleanUp );
93- extern void FDECL ( Abort , (long ) );
94- extern int NDECL ( getpid );
95- extern char * FDECL ( CopyFile , (const char * , const char * ) );
96- extern int NDECL ( kbhit );
97- extern int NDECL ( WindowGetchar );
98- extern void FDECL ( ami_argset , (int * , char * []) );
99- extern void FDECL ( ami_mkargline , (int * , char * * []) );
100- extern void FDECL ( ami_wininit_data , (int ) );
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 );
101113
102114#define FromWBench 0 /* A hint for compiler ... */
103115/* extern boolean FromWBench; /* how were we run? */
@@ -120,12 +132,10 @@ extern char **ami_argv;
120132#endif
121133
122134#ifdef AZTEC_C
123- extern FILE * FDECL ( freopen , (const char * , const char * , FILE * ) );
124- extern char * FDECL ( gets , (char * ) );
135+ extern FILE * freopen (const char * , const char * , FILE * );
136+ extern char * gets (char * );
125137#endif
126138
127- #define msmsg printf
128-
129139/*
130140 * If AZTEC_C we can't use the long cpath in vision.c....
131141 */
@@ -137,9 +147,10 @@ extern char *FDECL(gets, (char *));
137147 * (Possibly) configurable Amiga options:
138148 */
139149
140- #define TEXTCOLOR /* Use colored monsters and objects */
141150#define HACKFONT /* Use special hack.font */
142- #define SHELL /* Have a shell escape command (!) */
151+ #ifndef CROSS_TO_AMIGA /* issues with prototype and spawnl */
152+ #define SHELL /* Have a shell escape command (!) */
153+ #endif
143154#define MAIL /* Get mail at unexpected occasions */
144155#define DEFAULT_ICON "NetHack:default.icon" /* private icon */
145156#define AMIFLUSH /* toss typeahead (select flush in .cnf) */
@@ -152,13 +163,7 @@ extern char *FDECL(gets, (char *));
152163#endif
153164
154165#define CHANGE_COLOR 1
155-
156- #ifdef TEXTCOLOR
157166#define DEPTH 6 /* Maximum depth of the screen allowed */
158- #else
159- #define DEPTH 2 /* Four colors...sigh... */
160- #endif
161-
162167#define AMII_MAXCOLORS (1L << DEPTH)
163168typedef unsigned short AMII_COLOR_TYPE ;
164169
@@ -179,13 +184,35 @@ extern int amibbs; /* BBS mode? */
179184
180185#ifdef AMII_GRAPHICS
181186extern int amii_numcolors ;
182- void FDECL ( amii_setpens , (int ) );
187+ void amii_setpens (int );
183188#endif
184189
185190/* for cmd.c: override version in micro.h */
186191#ifdef __SASC_60
187192#undef M
188193#define M (c ) ((c) -128)
189194#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+ #undef SYSCF
216+ #undef SYSCF_FILE
190217
191218#endif /* AMICONF_H */
0 commit comments