Prints
This commit is contained in:
@@ -158,7 +158,9 @@ readchar(struct rogue_state *rs)
|
|||||||
{
|
{
|
||||||
static uint32_t counter;
|
static uint32_t counter;
|
||||||
if ( rs->ind < rs->numkeys )
|
if ( rs->ind < rs->numkeys )
|
||||||
|
{
|
||||||
return(rs->keystrokes[rs->ind++]);
|
return(rs->keystrokes[rs->ind++]);
|
||||||
|
}
|
||||||
if ( rs->replaydone != 0 && counter++ < 3 )
|
if ( rs->replaydone != 0 && counter++ < 3 )
|
||||||
fprintf(stderr,"replay finished but readchar called\n");
|
fprintf(stderr,"replay finished but readchar called\n");
|
||||||
rs->replaydone = (uint32_t)time(NULL);
|
rs->replaydone = (uint32_t)time(NULL);
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ playit(struct rogue_state *rs)
|
|||||||
int32_t quit(int sig)
|
int32_t quit(int sig)
|
||||||
{
|
{
|
||||||
struct rogue_state *rs = &globalR;
|
struct rogue_state *rs = &globalR;
|
||||||
int oy, ox;
|
int oy, ox, c;
|
||||||
//fprintf(stderr,"inside quit(%d)\n",sig);
|
//fprintf(stderr,"inside quit(%d)\n",sig);
|
||||||
if ( rs->guiflag != 0 )
|
if ( rs->guiflag != 0 )
|
||||||
{
|
{
|
||||||
@@ -635,7 +635,8 @@ int32_t quit(int sig)
|
|||||||
}
|
}
|
||||||
getyx(curscr, oy, ox);
|
getyx(curscr, oy, ox);
|
||||||
msg(rs,"really quit?");
|
msg(rs,"really quit?");
|
||||||
if (readchar(rs) == 'y')
|
sleep(1);
|
||||||
|
if ( (c= readchar(rs)) == 'y')
|
||||||
{
|
{
|
||||||
if ( rs->guiflag != 0 )
|
if ( rs->guiflag != 0 )
|
||||||
{
|
{
|
||||||
@@ -652,12 +653,13 @@ int32_t quit(int sig)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//score(rs,purse, 1, 0);
|
//score(rs,purse, 1, 0);
|
||||||
//fprintf(stderr,"done!\n");
|
fprintf(stderr,"done!\n");
|
||||||
}
|
}
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,"'Q' answer (%c)\n",c);
|
||||||
move(0, 0);
|
move(0, 0);
|
||||||
clrtoeol();
|
clrtoeol();
|
||||||
status(rs);
|
status(rs);
|
||||||
|
|||||||
Reference in New Issue
Block a user