Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -499,12 +499,12 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
|
||||
#ifdef WIN32
|
||||
/*
|
||||
if (!strncmpi(windowprocs.name, "mswin", 5))
|
||||
if (WINDOWPORT("mswin"))
|
||||
NHWinMainInit();
|
||||
else
|
||||
*/
|
||||
#ifdef TTY_GRAPHICS
|
||||
if (!strncmpi(windowprocs.name, "tty", 3)) {
|
||||
if (WINDOWPORT("tty")) {
|
||||
iflags.use_background_glyph = FALSE;
|
||||
nttty_open(1);
|
||||
} else {
|
||||
|
||||
@@ -198,7 +198,7 @@ getlock()
|
||||
#ifndef SELF_RECOVER
|
||||
if (eraseoldlocks()) {
|
||||
#if defined(WIN32) && defined(TTY_GRAPHICS)
|
||||
if (!strncmpi(windowprocs.name, "tty", 3))
|
||||
if (WINDOWPORT("tty"))
|
||||
clear_screen(); /* display gets fouled up otherwise */
|
||||
#endif
|
||||
goto gotlock;
|
||||
@@ -212,7 +212,7 @@ getlock()
|
||||
#else /*SELF_RECOVER*/
|
||||
if (recover_savefile()) {
|
||||
#if defined(WIN32) && defined(TTY_GRAPHICS)
|
||||
if (!strncmpi(windowprocs.name, "tty", 3))
|
||||
if (WINDOWPORT("tty"))
|
||||
clear_screen(); /* display gets fouled up otherwise */
|
||||
#endif
|
||||
goto gotlock;
|
||||
|
||||
@@ -305,7 +305,7 @@ void intron() /* enable kbd interupts if enabled when game started */
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
/* Ugly hack to keep from changing tty modes for non-tty games -dlc */
|
||||
if (!strcmp(windowprocs.name, "tty") && intr_char != nonesuch
|
||||
if (WINDOWPORT("tty") && intr_char != nonesuch
|
||||
&& curttyb2.intr_sym != '\003') {
|
||||
curttyb2.intr_sym = '\003';
|
||||
setctty();
|
||||
@@ -317,7 +317,7 @@ void introff() /* disable kbd interrupts if required*/
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
/* Ugly hack to keep from changing tty modes for non-tty games -dlc */
|
||||
if (!strcmp(windowprocs.name, "tty") && curttyb2.intr_sym != nonesuch) {
|
||||
if (WINDOWPORT("tty") && curttyb2.intr_sym != nonesuch) {
|
||||
curttyb2.intr_sym = nonesuch;
|
||||
setctty();
|
||||
}
|
||||
@@ -345,7 +345,7 @@ void
|
||||
sco_mapon()
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
if (!strcmp(windowprocs.name, "tty") && sco_flag_console) {
|
||||
if (WINDOWPORT("tty") && sco_flag_console) {
|
||||
if (sco_map_valid != -1) {
|
||||
ioctl(0, LDSMAP, sco_chanmap_buf);
|
||||
}
|
||||
@@ -358,7 +358,7 @@ void
|
||||
sco_mapoff()
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
if (!strcmp(windowprocs.name, "tty") && sco_flag_console) {
|
||||
if (WINDOWPORT("tty") && sco_flag_console) {
|
||||
sco_map_valid = ioctl(0, LDGMAP, sco_chanmap_buf);
|
||||
if (sco_map_valid != -1) {
|
||||
ioctl(0, LDNMAP, (char *) 0);
|
||||
@@ -379,7 +379,7 @@ void
|
||||
init_sco_cons()
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
if (!strcmp(windowprocs.name, "tty") && sco_flag_console) {
|
||||
if (WINDOWPORT("tty") && sco_flag_console) {
|
||||
atexit(sco_mapon);
|
||||
sco_mapoff();
|
||||
load_symset("IBMGraphics", PRIMARY);
|
||||
@@ -409,7 +409,7 @@ void
|
||||
linux_mapon()
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
if (!strcmp(windowprocs.name, "tty") && linux_flag_console) {
|
||||
if (WINDOWPORT("tty") && linux_flag_console) {
|
||||
write(1, "\033(B", 3);
|
||||
}
|
||||
#endif
|
||||
@@ -419,7 +419,7 @@ void
|
||||
linux_mapoff()
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
if (!strcmp(windowprocs.name, "tty") && linux_flag_console) {
|
||||
if (WINDOWPORT("tty") && linux_flag_console) {
|
||||
write(1, "\033(U", 3);
|
||||
}
|
||||
#endif
|
||||
@@ -439,7 +439,7 @@ void
|
||||
init_linux_cons()
|
||||
{
|
||||
#ifdef TTY_GRAPHICS
|
||||
if (!strcmp(windowprocs.name, "tty") && linux_flag_console) {
|
||||
if (WINDOWPORT("tty") && linux_flag_console) {
|
||||
atexit(linux_mapon);
|
||||
linux_mapoff();
|
||||
#ifdef TEXTCOLOR
|
||||
|
||||
@@ -73,8 +73,8 @@ DEBUGINFO = Y
|
||||
# PDCurses header (.h) files and PDCURSES_C to the location
|
||||
# of your PDCurses C files.
|
||||
#
|
||||
ADD_CURSES=Y
|
||||
PDCURSES_TOP=..\..\pdcurses
|
||||
#ADD_CURSES=Y
|
||||
#PDCURSES_TOP=..\..\pdcurses
|
||||
#
|
||||
#==============================================================================
|
||||
# This marks the end of the BUILD DECISIONS section.
|
||||
|
||||
@@ -216,7 +216,7 @@ VA_DECL(const char *, s)
|
||||
/* error() may get called before tty is initialized */
|
||||
if (iflags.window_inited)
|
||||
end_screen();
|
||||
if (windowprocs.name != NULL && !strncmpi(windowprocs.name, "tty", 3)) {
|
||||
if (WINDOWPORT("tty")) {
|
||||
buf[0] = '\n';
|
||||
(void) vsprintf(&buf[1], s, VA_ARGS);
|
||||
Strcat(buf, "\n");
|
||||
@@ -239,6 +239,11 @@ Delay(int ms)
|
||||
void
|
||||
win32_abort()
|
||||
{
|
||||
boolean is_tty = FALSE;
|
||||
|
||||
#ifdef TTY_GRAPHICS
|
||||
is_tty = WINDOWPORT("tty");
|
||||
#endif
|
||||
if (wizard) {
|
||||
int c, ci, ct;
|
||||
|
||||
@@ -248,13 +253,11 @@ win32_abort()
|
||||
msmsg("Execute debug breakpoint wizard?");
|
||||
while ((ci = nhgetch()) != '\n') {
|
||||
if (ct > 0) {
|
||||
#ifdef TTY_GRAPHICS
|
||||
backsp(); /* \b is visible on NT */
|
||||
#endif
|
||||
if (is_tty)
|
||||
backsp(); /* \b is visible on NT console */
|
||||
(void) putchar(' ');
|
||||
#ifdef TTY_GRAPHICS
|
||||
backsp();
|
||||
#endif
|
||||
if (is_tty)
|
||||
backsp();
|
||||
ct = 0;
|
||||
c = 'n';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user