X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fmain-gcu.c;h=0c7f24478af0bae6b722a1cc073a98e6971b3526;hb=882170201699e6f4b6df149d31e1becd3cbf0415;hp=0afe8df86109fe61c43cd3087359b35ca8fe2805;hpb=c79fbb2e4e8ebfb049c0c7a7af1e2c3c209e6b92;p=hengband%2Fhengband.git diff --git a/src/main-gcu.c b/src/main-gcu.c index 0afe8df86..0c7f24478 100644 --- a/src/main-gcu.c +++ b/src/main-gcu.c @@ -254,6 +254,9 @@ static term_data data[MAX_TERM_DATA]; #endif +#include + + /* * XXX XXX Hack -- POSIX uses "O_NONBLOCK" instead of "O_NDELAY" * @@ -600,7 +603,7 @@ static errr Term_xtra_gcu_alive(int v) 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 */ @@ -736,7 +739,7 @@ static void Term_nuke_gcu(term *t) 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 */ @@ -873,9 +876,8 @@ static errr Term_xtra_gcu_sound(int v) 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]; @@ -958,8 +960,7 @@ static errr Term_xtra_gcu(int n, int v) /* 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 */ @@ -1205,6 +1206,8 @@ errr init_gcu(int argc, char *argv[]) (void)argv; + setlocale(LC_ALL, ""); + #ifdef USE_SOUND /* Build the "sound" path */ @@ -1293,15 +1296,15 @@ errr init_gcu(int argc, char *argv[]) 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 */ }