NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / sys / amiga / amitty.c
blob9ee73654bede99e1b291e6eccb272b38fcdb6239
1 /* aNetHack 0.0.1 amitty.c $ANH-Date: 1432512795 2015/05/25 00:13:15 $ $ANH-Branch: master $:$ANH-Revision: 1.7 $ */
2 /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */
3 /* aNetHack may be freely redistributed. See license for details. */
5 /* TTY-specific code for the Amiga
6 * This is still experimental.
7 * Still to do:
8 * add real termcap handling - currently requires ANSI_DEFAULT
9 */
11 #include "hack.h"
12 #include "tcap.h"
13 #include <stdio.h>
14 #include <proto/dos.h>
16 #ifdef _DCC
17 #define getch() getchar()
18 #endif
19 #ifdef __SASC_60
20 #include <clib/dos_protos.h>
21 #endif
23 void NDECL(tty_change_color);
24 char *NDECL(tty_get_color_string);
26 #ifdef TTY_GRAPHICS
28 int amibbs = 0; /* BBS mode */
29 char bbs_id[80] = ""; /* BBS uid equivalent */
30 long afh_in, afh_out; /* BBS mode Amiga filehandles */
32 void
33 settty(const char *s)
35 end_screen();
36 if (s)
37 raw_print(s);
38 iflags.cbreak = ON; /* this is too easy: probably wrong */
39 #if 1 /* should be version>=36 */
40 /* if(IsInteractive(afh_in)){ */
41 SetMode(afh_in, 0); /* con mode */
42 /* } */
43 #endif
45 void
46 gettty()
48 #if 1 /* should be VERSION >=36 */
49 /* if(IsInteractive(afh_in)){ */
50 SetMode(afh_in, 1); /* raw mode */
51 /* } */
52 #endif
54 void
55 setftty()
57 iflags.cbreak = ON; /* ditto */
59 char kill_char = 'X' - '@';
60 char erase_char = '\b';
61 tgetch()
63 char x;
64 Read(afh_in, &x, 1);
65 return (x == '\r') ? '\n' : x;
67 void
68 get_scr_size()
70 CO = 80;
71 LI = 24;
74 #endif
76 void
77 tty_change_color()
80 char *
81 tty_get_color_string()
83 return ("");