[net.sources.games] Patch to adv

mg@ukc.UUCP (M.W.Guy) (10/03/85)

Please find enclosed a patch to the recent posting of "adv", the adventure
gaming program using curses instead of Maryland windows. With our 4.2BSD
version of curses, the cursor fiddled with the top window as you typed your
commands in. This distracting (and slowing) feature is cured thus:

--8<-------
*** ,misc.c	Thu Oct  3 13:43:04 1985
--- misc.c	Wed Oct  2 15:13:46 1985
***************
*** 223,229
  			else
  				Wputc(c, CurWin);
  		}
! 		refresh();
  		ReadingTerminal = 2;
  	}
  	ReadingTerminal = 0;

--- 223,229 -----
  			else
  				Wputc(c, CurWin);
  		}
! 		wrefresh(CurWin);
  		ReadingTerminal = 2;
  	}
  	ReadingTerminal = 0;
--8<-------

Many thanks to Chrisses Torek and Miller for their achievement.

chris@umcp-cs.UUCP (Chris Torek) (10/05/85)

The referenced patch should be put inside a CURSED-dependent #ifdef,
as the new code will not compile with the window library.  Here is
the change I installed.  -Chris

RCS file: RCS/misc.c,v
retrieving revision 1.2
diff -c2 -r1.2 misc.c
*** /tmp/,RCSt1001378	Sat Oct  5 02:26:02 1985
--- misc.c	Sat Oct  5 02:23:08 1985
***************
*** 224,227
  				Wputc(c, CurWin);
  		}
  		refresh();
  		ReadingTerminal = 2;

--- 224,228 -----
  				Wputc(c, CurWin);
  		}
+ #ifndef CURSED
  		refresh();
  #else CURSED
***************
*** 225,228
  		}
  		refresh();
  		ReadingTerminal = 2;
  	}

--- 226,232 -----
  #ifndef CURSED
  		refresh();
+ #else CURSED
+ 		wrefresh(CurWin);
+ #endif CURSED
  		ReadingTerminal = 2;
  	}
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu