-/* File: main-gcu.c */
+/* File: main-gcu.c */
/*
* Copyright (c) 1997 Ben Harrison, and others
#endif
+#include <locale.h>
+
+
/*
* XXX XXX Hack -- POSIX uses "O_NONBLOCK" instead of "O_NDELAY"
*
mvcur(curscr->cury, curscr->curx, LINES - 1, 0);
#else
/* this moves curses to bottom right corner */
- mvcur(curscr->_cury, curscr->_curx, LINES - 1, 0);
+ mvcur(getcury(curscr), getcurx(curscr), LINES - 1, 0);
#endif
/* Exit curses */
mvcur(curscr->cury, curscr->curx, LINES - 1, 0);
#else
/* This moves curses to bottom right corner */
- mvcur(curscr->_cury, curscr->_curx, LINES - 1, 0);
+ mvcur(getcury(curscr), getcurx(curscr), LINES - 1, 0);
#endif
/* Flush the curses buffer */
for (k = 0; (k < 10) && (i == ERR); k++) i = getch();
/* Broken input is special */
- if (i == ERR) exit_game_panic(TRUE);
- if (i == EOF) exit_game_panic(TRUE);
+ if (i == ERR) exit_game_panic();
+ if (i == EOF) exit_game_panic();
}
/* Do not wait */
i = read(0, buf, 1);
/* Hack -- Handle bizarre "errors" */
- if ((i <= 0) && (errno != EINTR)) exit_game_panic(TRUE);
+ if ((i <= 0) && (errno != EINTR)) exit_game_panic();
}
/* Do not wait */
if (!sound_file[v]) return (1);
sprintf(buf,"./gcusound.sh %s\n", sound_file[v]);
- system(buf);
- return (0);
+ return (system(buf) < 0);
#if 0
char *argv[4];
/* Make a noise */
case TERM_XTRA_NOISE:
- (void)write(1, "\007", 1);
- return (0);
+ return write(1, "\007", 1) != 1;
#ifdef USE_SOUND
/* Make a special sound */
(void)argv;
+ setlocale(LC_ALL, "");
+
#ifdef USE_SOUND
/* Build the "sound" path */
colortable[3] = (COLOR_PAIR(1) | A_BRIGHT); /* Orange XXX */
colortable[4] = (COLOR_PAIR(1) | A_NORMAL); /* Red */
colortable[5] = (COLOR_PAIR(2) | A_NORMAL); /* Green */
- colortable[6] = (COLOR_PAIR(4) | A_NORMAL); /* Blue */
+ colortable[6] = (COLOR_PAIR(4) | A_BRIGHT); /* Blue */
colortable[7] = (COLOR_PAIR(3) | A_NORMAL); /* Umber */
colortable[8] = (COLOR_PAIR(7) | A_BRIGHT); /* Dark-grey XXX */
colortable[9] = (COLOR_PAIR(0) | A_NORMAL); /* Light-grey XXX */
- colortable[10] = (COLOR_PAIR(5) | A_NORMAL); /* Purple */
+ colortable[10] = (COLOR_PAIR(5) | A_BRIGHT); /* Purple */
colortable[11] = (COLOR_PAIR(3) | A_BRIGHT); /* Yellow */
- colortable[12] = (COLOR_PAIR(5) | A_BRIGHT); /* Light Red XXX */
+ colortable[12] = (COLOR_PAIR(5) | A_NORMAL); /* Light Red XXX */
colortable[13] = (COLOR_PAIR(2) | A_BRIGHT); /* Light Green */
- colortable[14] = (COLOR_PAIR(4) | A_BRIGHT); /* Light Blue */
+ colortable[14] = (COLOR_PAIR(6) | A_BRIGHT); /* Light Blue */
colortable[15] = (COLOR_PAIR(3) | A_NORMAL); /* Light Umber XXX */
}