diff options
author | ahoka <ahoka@NetBSD.org> | 2009-12-19 19:27:53 +0000 |
---|---|---|
committer | ahoka <ahoka@NetBSD.org> | 2009-12-19 19:27:53 +0000 |
commit | 0de22ad5b4722fffbd76b79e6dbfcc8b69dbf6e9 (patch) | |
tree | 82a8dc91b4e99172c3dabe36bcc2b6d5792d3eec /tetris | |
parent | 3e92ea973d1f5e8b5aabe15ae98b3312496eabce (diff) | |
download | bsdgames-darwin-0de22ad5b4722fffbd76b79e6dbfcc8b69dbf6e9.tar.gz bsdgames-darwin-0de22ad5b4722fffbd76b79e6dbfcc8b69dbf6e9.tar.zst bsdgames-darwin-0de22ad5b4722fffbd76b79e6dbfcc8b69dbf6e9.zip |
Hide the cursor during the game.
Diffstat (limited to 'tetris')
-rw-r--r-- | tetris/screen.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tetris/screen.c b/tetris/screen.c index 38efd686..cb9d2023 100644 --- a/tetris/screen.c +++ b/tetris/screen.c @@ -1,4 +1,4 @@ -/* $NetBSD: screen.c,v 1.24 2009/08/12 08:51:21 dholland Exp $ */ +/* $NetBSD: screen.c,v 1.25 2009/12/19 19:27:53 ahoka Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -84,7 +84,9 @@ static char *LLstr, /* last line, first column */ *pcstr, /* pad character */ *TEstr, /* end cursor motion mode */ - *TIstr; /* begin cursor motion mode */ + *TIstr, /* begin cursor motion mode */ + *VIstr, /* make cursor invisible */ + *VEstr; /* make cursor appear normal */ char *SEstr, /* end standout mode */ *SOstr; /* begin standout mode */ @@ -111,6 +113,8 @@ static struct tcsinfo { /* termcap string info; some abbrevs above */ {"so", &SOstr}, {"te", &TEstr}, {"ti", &TIstr}, + {"vi", &VIstr}, + {"ve", &VEstr}, {"up", &UP}, /* cursor up */ { {0}, NULL} }; @@ -299,6 +303,8 @@ scr_set(void) */ if (TIstr) putstr(TIstr); /* termcap(5) says this is not padded */ + if (VIstr) + putstr(VIstr); /* termcap(5) says this is not padded */ if (tstp != SIG_IGN) (void) signal(SIGTSTP, scr_stop); if (ttou != SIG_IGN) @@ -329,6 +335,8 @@ scr_end(void) /* exit screen mode */ if (TEstr) putstr(TEstr); /* termcap(5) says this is not padded */ + if (VEstr) + putstr(VEstr); /* termcap(5) says this is not padded */ (void) fflush(stdout); (void) tcsetattr(0, TCSADRAIN, &oldtt); isset = 0; |