X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=io.c;h=ec30ccffc676959c9c59bd9cfe7dacf4e58fdb17;hp=3bc3b9c2c88d225069e90723e3ba96093f871dd8;hb=059e1d86fb9ffc34d236e8913614996b3621b45c;hpb=80aa958a55a62baa32586414ac671ee450369d25 diff --git a/io.c b/io.c index 3bc3b9c..ec30ccf 100644 --- a/io.c +++ b/io.c @@ -100,6 +100,13 @@ void clearscreen(void) { #endif } +void waitfor(void) { +/* wait for user action -- OK to do nothing if on a TTY */ +#ifdef SERGEEV + getche(); +#endif /* SERGEEV */ +} + void pause_game(int i) { char *prompt; #ifndef SERGEEV @@ -304,6 +311,22 @@ void warble(void) #endif /* SERGEEV */ } +void setpassword(void) { +#ifndef SERGEEV + while (TRUE) { + scan(); + strcpy(game.passwd, citem); + chew(); + if (*game.passwd != 0) break; + proutn("Please type in a secret password-"); + } +#else + int i; + for(i=0;i<3;i++) game.passwd[i]=(char)(97+(int)(Rand()*25)); + game.passwd[3]=0; +#endif /* SERGEEV */ +} + void getline(char *line, int max) { if (curses) { #ifndef SERGEEV