-/* 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"
*
#ifdef USE_SOUND
-static cptr ANGBAND_DIR_XTRA_SOUND;
+static concptr ANGBAND_DIR_XTRA_SOUND;
/*
* Flag set once "sound" has been initialized
/*
* An array of sound file names
*/
-static cptr sound_file[SOUND_MAX];
+static concptr sound_file[SOUND_MAX];
#endif /* USE_SOUND */
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 */
/*
* Check for existance of a file
*/
-static bool check_file(cptr s)
+static bool check_file(concptr s)
{
FILE *fff;
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 */
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 */
* think hard about how map_info() in cave.c should handle the color
* of something that we here draw in reverse. It's not so simple, alas.
*/
-static void Term_acs_text_gcu(int x, int y, int n, byte a, cptr s)
+static void Term_acs_text_gcu(int x, int y, int n, byte a, concptr s)
{
term_data *td = (term_data *)(Term->data);
int i;
/*
* Place some text on the screen using an attribute
*/
-static errr Term_text_gcu(int x, int y, int n, byte a, cptr s)
+static errr Term_text_gcu(int x, int y, int n, byte a, concptr s)
{
term_data *td = (term_data *)(Term->data);
}
-static void hook_quit(cptr str)
+static void hook_quit(concptr str)
{
/* Unused */
(void)str;
(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 */
}