Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/tetris Hide the cursor during the game.
details: https://anonhg.NetBSD.org/src/rev/9f245e96f941
branches: trunk
changeset: 750187:9f245e96f941
user: ahoka <ahoka%NetBSD.org@localhost>
date: Sat Dec 19 19:27:53 2009 +0000
description:
Hide the cursor during the game.
diffstat:
games/tetris/screen.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (47 lines):
diff -r b17d509d6acb -r 9f245e96f941 games/tetris/screen.c
--- a/games/tetris/screen.c Sat Dec 19 19:09:48 2009 +0000
+++ b/games/tetris/screen.c Sat Dec 19 19:27:53 2009 +0000
@@ -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 @@
*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 @@
{"so", &SOstr},
{"te", &TEstr},
{"ti", &TIstr},
+ {"vi", &VIstr},
+ {"ve", &VEstr},
{"up", &UP}, /* cursor up */
{ {0}, NULL}
};
@@ -299,6 +303,8 @@
*/
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 @@
/* 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;
Home |
Main Index |
Thread Index |
Old Index