Update the Amiga Intuition window port (AMII/AMIV) for the 3.7 window_procs API. Key changes: - Update all window function signatures for 3.7 - Add assembly trampolines for AmigaOS register-based callbacks - Convert all K&R function definitions to C99 - Add cross-compilation build system (cross-pre1/pre2/post.370) using bebbo's m68k-amigaos-gcc with -noixemul -std=gnu17 -m68000 - Clipping fixes: viewport centering, simplified ScrollRaster, duplicate Ctrl-R suppression, glyph buffer invalidation - Add menucolor support in menu rendering - Move native txt2iff.c and xpm2iff.c to outdated/ - Add nethack.cnf and README.amiga
86 lines
1.6 KiB
C
86 lines
1.6 KiB
C
/* NetHack 3.6 amitty.c $NHDT-Date: 1432512795 2015/05/25 00:13:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
|
|
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */
|
|
/* NetHack may be freely redistributed. See license for details. */
|
|
|
|
/* TTY-specific code for the Amiga
|
|
* This is still experimental.
|
|
* Still to do:
|
|
* add real termcap handling - currently requires ANSI_DEFAULT
|
|
*/
|
|
|
|
#include "hack.h"
|
|
#include "tcap.h"
|
|
#include <stdio.h>
|
|
#include <proto/dos.h>
|
|
|
|
#ifdef _DCC
|
|
#define getch() getchar()
|
|
#endif
|
|
#ifdef __SASC_60
|
|
#include <clib/dos_protos.h>
|
|
#endif
|
|
|
|
void tty_change_color(void);
|
|
char *tty_get_color_string(void);
|
|
|
|
int amibbs = 0; /* BBS mode */
|
|
char bbs_id[80] = ""; /* BBS uid equivalent */
|
|
long afh_in, afh_out; /* BBS mode Amiga filehandles */
|
|
|
|
#ifdef TTY_GRAPHICS
|
|
|
|
void
|
|
settty(const char *s)
|
|
{
|
|
end_screen();
|
|
if (s)
|
|
raw_print(s);
|
|
iflags.cbreak = ON; /* this is too easy: probably wrong */
|
|
#if 1 /* should be version>=36 */
|
|
/* if(IsInteractive(afh_in)){ */
|
|
SetMode(afh_in, 0); /* con mode */
|
|
/* } */
|
|
#endif
|
|
}
|
|
void
|
|
gettty()
|
|
{
|
|
#if 1 /* should be VERSION >=36 */
|
|
/* if(IsInteractive(afh_in)){ */
|
|
SetMode(afh_in, 1); /* raw mode */
|
|
/* } */
|
|
#endif
|
|
}
|
|
void
|
|
setftty()
|
|
{
|
|
iflags.cbreak = ON; /* ditto */
|
|
}
|
|
char kill_char = 'X' - '@';
|
|
char erase_char = '\b';
|
|
int
|
|
tgetch(void)
|
|
{
|
|
unsigned char x;
|
|
Read(afh_in, &x, 1);
|
|
return (x == '\r') ? '\n' : x;
|
|
}
|
|
void
|
|
get_scr_size()
|
|
{
|
|
CO = 80;
|
|
LI = 24;
|
|
}
|
|
|
|
#endif
|
|
|
|
void
|
|
tty_change_color()
|
|
{
|
|
}
|
|
char *
|
|
tty_get_color_string()
|
|
{
|
|
return ("");
|
|
}
|