diff rogue4/misc.c @ 304:e52a8a7ad4c5

Fix many compiler warnings. There should only be two changes in behavior: arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly applied to characters who are not monks instead of monks who are not empty-handed. urogue/fight.c: fixed an interaction with the "debug" macro that could cause the wrong message to be displayed.
author John "Elwin" Edwards
date Wed, 14 Apr 2021 18:55:33 -0400
parents 0250220d8cdd
children
line wrap: on
line diff
--- a/rogue4/misc.c	Sat Mar 20 22:36:52 2021 -0400
+++ b/rogue4/misc.c	Wed Apr 14 18:55:33 2021 -0400
@@ -58,9 +58,7 @@
     register int passcount = 0;
     register char pfl, *fp, pch;
     register int sy, sx, sumhero = 0, diffhero = 0;
-    register int oldx, oldy;
 
-    getyx(stdscr, oldy, oldx);
     rp = proom;
     if (!ce(oldpos, hero))
     {
@@ -115,12 +113,15 @@
 	    fp = &_flags[index];
 	    ch = _level[index];
 	    if (pch != DOOR && ch != DOOR)
+	    {
 		if ((pfl & F_PASS) != (*fp & F_PASS))
 		    continue;
 		else if ((*fp & F_PASS) && (*fp & F_PNUM) != (pfl & F_PNUM))
 		    continue;
+	    }
 
 	    if ((tp = _monst[index]) != NULL)
+	    {
 		if (on(player, SEEMONST) && on(*tp, ISINVIS))
 		{
 		    if (door_stop && !firstmove)
@@ -137,6 +138,7 @@
 		    if (see_monst(tp))
 			ch = tp->t_disguise;
 		}
+	    }
 
 	    move(y, x);
 	    if (ch != inch())