1 /* SCCS Id: @(#)winkey.c 3.1 93/04/02 */
2 /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */
3 /* NetHack may be freely redistributed. See license for details. */
5 #include "NH:sys/amiga/windefs.h"
6 #include "NH:sys/amiga/winext.h"
7 #include "NH:sys/amiga/winproto.h"
9 amii_nh_poskey(x, y, mod)
12 struct amii_WinDesc *cw;
17 if( cw = amii_wins[WIN_MESSAGE] )
19 cw->wflags &= ~FLMAP_SKIP;
21 cw->wflags |= FLMSG_FIRST;
25 if( WIN_MAP != WIN_ERR && (cw = amii_wins[ WIN_MAP ]) && ( w = cw->win ) )
30 panic( "no MAP window opened for nh_poskey\n" );
36 type = WindowGetevent( );
40 if( lastevent.un.mouse.qual )
43 /* X coordinates are 1 based, Y are 1 based. */
44 *x = ( (lastevent.un.mouse.x - w->BorderLeft) / mxsize ) + 1;
45 *y = ( ( lastevent.un.mouse.y - w->BorderTop - MAPFTBASELN ) /
56 else if( type == WEKEY )
58 lastevent.type = WEUNK;
59 return( lastevent.un.key );
68 struct amii_WinDesc *cw=amii_wins[WIN_MESSAGE];
70 if( WIN_MAP != WIN_ERR && amii_wins[ WIN_MAP ] )
75 cw->wflags &= ~FLMAP_SKIP;
84 /* nothing now - later I have no idea. Is this just a Mac hook? */
93 raw_print( "Press Return..." );
97 while( c != '\n' && c != '\r' )