1 /* aNetHack 0.0.1 windefs.h $ANH-Date: 1432512795 2015/05/25 00:13:15 $ $ANH-Branch: master $:$ANH-Revision: 1.7 $ */
2 /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */
3 /* aNetHack may be freely redistributed. See license for details. */
5 #include <exec/types.h>
6 #include <exec/memory.h>
8 #if !defined(_DCC) && !defined(__GNUC__)
11 #include <exec/alerts.h>
12 #include <exec/devices.h>
13 #include <exec/execbase.h>
14 #include <devices/console.h>
15 #include <devices/conunit.h>
16 #include <graphics/gfxbase.h>
17 #include <intuition/intuition.h>
18 #include <intuition/intuitionbase.h>
19 #include <libraries/gadtools.h>
20 #include <libraries/dosextens.h>
21 #include <libraries/asl.h>
22 /* stddef.h is included in the precompiled version of hack.h . If we include
23 * it here normally (through string.h) we'll get an "illegal typedef" later
24 * on. This is the easiest way I can think of to fix it without messing
25 * around with the rest of the #includes. --AMC
27 #if defined(_DCC) && !defined(HACK_H)
28 #define ptrdiff_t ptrdiff_t_
29 #define size_t size_t_
30 #define wchar_t wchar_t_
36 #if defined(_DCC) && !defined(HACK_H)
42 #ifdef IDCMP_CLOSEWINDOW
43 #ifndef INTUI_NEW_LOOK
44 #define INTUI_NEW_LOOK
56 CLIPPING must be defined
for the AMIGA version
62 /*#define TOPL_GETLINE /* Don't use a window for getlin() */
63 /*#define WINDOW_YN /* Use a window for y/n questions */
66 #include <functions.h>
69 #include <clib/dos_protos.h>
70 #include <clib/exec_protos.h>
71 #include <clib/console_protos.h>
72 #include <clib/layers_protos.h>
73 #include <clib/diskfont_protos.h>
74 #include <clib/gadtools_protos.h>
76 #include <proto/dos.h>
77 #include <proto/exec.h>
78 #include <proto/console.h>
79 #include <proto/layers.h>
80 #include <proto/diskfont.h>
81 #include <proto/gadtools.h>
82 #include <proto/asl.h>
85 /* kludge - see amirip for why */
90 #include <clib/graphics_protos.h>
92 #include <proto/graphics.h>
96 #define __asm /* DICE doesn't like __asm */
105 #include <clib/intuition_protos.h>
107 #include <proto/intuition.h>
112 #include "NH:sys/amiga/lib/libmacs.h"
115 #ifdef INTUI_NEW_LOOK
116 #include <utility/tagitem.h>
119 #define WINVERS_AMII (strcmp("amii", windowprocs.name) == 0)
120 #define WINVERS_AMIV (strcmp("amitile", windowprocs.name) == 0)
121 #define WINVERS_AMIT (strcmp("amitty", windowprocs.name) == 0)
123 /* cw->data[x] contains 2 characters worth of special information. These
124 * characters are stored at the offsets as described here.
126 #define VATTR 0 /* Video attribute is in this slot */
127 #define SEL_ITEM 1 /* If this is a select item, slot is 1 else 0 */
128 #define SOFF 2 /* The string starts here. */
134 * Versions we need of various libraries. We can't use LIBRARY_VERSION
135 * as defined in <exec/types.h> because some of the libraries we need
136 * don't have that version number in the 1.2 ROM.
139 #define LIBRARY_FONT_VERSION 34L
140 #define LIBRARY_TILE_VERSION 37L
142 /* These values are just sorta suggestions in use, but are minimum
146 #define WINDOWHEIGHT 192
147 #define SCREENHEIGHT 200
150 /* This character is a solid block (cursor) in Hack.font */
151 #define CURSOR_CHAR 0x90
155 #define FONTBASELINE 8
158 #define MAPFTHEIGHT 8
159 #define MAPFTBASELN 6
161 /* If Compiling with the "New Look", redefine these now */
162 #ifdef INTUI_NEW_LOOK
163 #define NewWindow ExtNewWindow
164 #define NewScreen ExtNewScreen
167 #define SIZEOF_DISKNAME 8
171 #define RAWHELP 0x5F /* Rawkey code of the HELP key */
175 #define C_BROWN (WINVERS_AMIV ? 11 : 2)
176 #define C_CYAN (WINVERS_AMIV ? 2 : 3)
177 #define C_GREEN (WINVERS_AMIV ? 5 : 4)
178 #define C_MAGENTA (WINVERS_AMIV ? 10 : 5)
179 #define C_BLUE (WINVERS_AMIV ? 4 : 6)
185 #define C_GREYBLUE 12
190 /* Structure describing tile files */
193 long nplanes
; /* Depth of images */
194 long pbytes
; /* Bytes in a plane of data */
195 long across
; /* Number of tiles across */
196 long down
; /* Number of tiles down */
197 long npics
; /* Number of pictures in this file */
198 long xsize
; /* X-size of a tile */
199 long ysize
; /* Y-size of a-tile */
203 #define MAXCOLORS 256