ESCAPE
This commit is contained in:
@@ -161,8 +161,9 @@ readchar(struct rogue_state *rs)
|
|||||||
rs->replaydone = (uint32_t)time(NULL);
|
rs->replaydone = (uint32_t)time(NULL);
|
||||||
return(rs->keystrokes[rs->ind++]);
|
return(rs->keystrokes[rs->ind++]);
|
||||||
}
|
}
|
||||||
fatal("replay finished but readchar called\n");
|
//fatal("replay finished but readchar called\n");
|
||||||
return(' ');
|
rs->replaydone = (uint32_t)time(NULL);
|
||||||
|
return(ESCAPE);
|
||||||
}
|
}
|
||||||
if ( rs == 0 || rs->guiflag != 0 )
|
if ( rs == 0 || rs->guiflag != 0 )
|
||||||
{
|
{
|
||||||
@@ -277,10 +278,18 @@ wait_for(struct rogue_state *rs,int ch)
|
|||||||
|
|
||||||
if (ch == '\n')
|
if (ch == '\n')
|
||||||
while ((c = readchar(rs)) != '\n' && c != '\r')
|
while ((c = readchar(rs)) != '\n' && c != '\r')
|
||||||
continue;
|
{
|
||||||
|
if ( rs->replaydone != 0 )
|
||||||
|
return;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
while (readchar(rs) != ch)
|
while (readchar(rs) != ch)
|
||||||
continue;
|
{
|
||||||
|
if ( rs->replaydone != 0 )
|
||||||
|
return;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -543,7 +543,7 @@ playit(struct rogue_state *rs)
|
|||||||
{
|
{
|
||||||
if ( rs->replaydone != 0 )
|
if ( rs->replaydone != 0 )
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"replaydone\n"); sleep(3);
|
fprintf(stderr,"replaydone\n"); sleep(3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( rs->sleeptime != 0 )
|
if ( rs->sleeptime != 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user