Test
This commit is contained in:
@@ -117,6 +117,8 @@ command(struct rogue_state *rs)
|
||||
* turn off count for commands which don't make sense
|
||||
* to repeat
|
||||
*/
|
||||
if ( rs->guiflag == 0 && rs->replaydone != 0 )
|
||||
ch = 'Q';
|
||||
switch (ch)
|
||||
{
|
||||
case CTRL('B'): case CTRL('H'): case CTRL('J'):
|
||||
|
||||
@@ -157,14 +157,14 @@ readchar(struct rogue_state *rs)
|
||||
{
|
||||
if ( rs->ind < rs->numkeys )
|
||||
{
|
||||
if ( rs->ind == rs->numkeys-1 )
|
||||
rs->replaydone = (uint32_t)time(NULL);
|
||||
//if ( rs->ind == rs->numkeys-1 )
|
||||
// rs->replaydone = (uint32_t)time(NULL);
|
||||
fprintf(stderr,"(%c) ",rs->keystrokes[rs->ind]);
|
||||
return(rs->keystrokes[rs->ind++]);
|
||||
}
|
||||
fprintf(stderr,"replay finished but readchar called\n");
|
||||
rs->replaydone = (uint32_t)time(NULL);
|
||||
return(ESCAPE);
|
||||
return('y');
|
||||
}
|
||||
if ( rs == 0 || rs->guiflag != 0 )
|
||||
{
|
||||
|
||||
@@ -571,7 +571,9 @@ quit(int sig)
|
||||
{
|
||||
struct rogue_state *rs = &globalR;
|
||||
int oy, ox;
|
||||
|
||||
fprintf(stder,"inside quit(%d)\n",sig);
|
||||
if ( rs->guiflag != 0 )
|
||||
{
|
||||
NOOP(sig);
|
||||
|
||||
/*
|
||||
@@ -581,7 +583,10 @@ quit(int sig)
|
||||
mpos = 0;
|
||||
getyx(curscr, oy, ox);
|
||||
msg(rs,"really quit?");
|
||||
}
|
||||
if (readchar(rs) == 'y')
|
||||
{
|
||||
if ( rs->guiflag != 0 )
|
||||
{
|
||||
signal(SIGINT, leave);
|
||||
clear();
|
||||
@@ -594,6 +599,11 @@ quit(int sig)
|
||||
my_exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
score(purse, 1, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
move(0, 0);
|
||||
clrtoeol();
|
||||
|
||||
Reference in New Issue
Block a user