#include "sstlinux.h"
static int rows, linecount; /* for paging */
-static bool pause_latch;
WINDOW *curwnd;
WINDOW *fullscreen_window;
/* wait for user action -- OK to do nothing if on a TTY */
{
if (game.options & OPTION_CURSES)
- getch();
+ wgetch(prompt_window);
}
-void pause_reset(void)
+void announce(void)
{
- pause_latch = false;
+ skip(1);
+ prouts(_("[ANNOUNCEMENT ARRIVING...]"));
+ skip(1);
}
-void pause_game(bool announcement)
+static void pause_game(void)
{
- if (pause_latch)
- return;
- else {
char *prompt;
char buf[BUFSIZ];
- if (announcement) {
- if (game.skill > SKILL_FAIR)
- prompt = _("[ANOUNCEMENT ARRIVING...]");
- else
- prompt = _("[IMPORTANT ANNOUNCEMENT ARRIVING -- PRESS ENTER TO CONTINUE]");
- }
- else {
- if (game.skill > SKILL_FAIR)
- prompt = _("[CONTINUE?]");
- else
- prompt = _("[PRESS ENTER TO CONTINUE]");
+ if (game.skill > SKILL_FAIR)
+ prompt = _("[CONTINUE?]");
+ else
+ prompt = _("[PRESS ENTER TO CONTINUE]");
- }
if (game.options & OPTION_CURSES) {
drawmaps(0);
setwnd(prompt_window);
wrefresh(prompt_window);
setwnd(message_window);
} else {
+ int j;
putchar('\n');
proutn(prompt);
fgets(buf, sizeof(buf), stdin);
- if (announcement) {
- int j;
- for (j = 0; j < rows; j++)
- putchar('\n');
- }
+ for (j = 0; j < rows; j++)
+ putchar('\n');
linecount = 0;
}
- pause_latch = true;
- }
}
while (i-- > 0) {
if (game.options & OPTION_CURSES) {
if (curwnd == message_window && getcury(curwnd) >= getmaxy(curwnd) - 3) {
- pause_game(false);
+ pause_game();
clrscr();
} else {
proutn("\n");
} else {
linecount++;
if (linecount >= rows)
- pause_game(false);
+ pause_game();
else
putchar('\n');
}