diff xrogue/n_level.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 f54901b9c39b
children
line wrap: on
line diff
--- a/xrogue/n_level.c	Sat Mar 20 22:36:52 2021 -0400
+++ b/xrogue/n_level.c	Wed Apr 14 18:55:33 2021 -0400
@@ -100,22 +100,22 @@
                 if (vert)
                     for (j=1; j<cols-1; j++) {
                         if (top) {
-                            cch = mvinch(i+2, j);
+                            cch = mvinch(i+2, j) & A_CHARTEXT;
                             mvaddch(lines-6+i, j, cch);
                         }
                         else {
-                            cch = mvinch(lines-4-i, j);
+                            cch = mvinch(lines-4-i, j) & A_CHARTEXT;
                             mvaddch(4-i, j, cch);
                         }
                     }
                 else
                     for (j=2; j<lines-3; j++) {
                         if (top) {
-                            cch = mvinch(j, i+1);
+                            cch = mvinch(j, i+1) & A_CHARTEXT;
                             mvaddch(j, cols-4+i, cch);
                         }
                         else {
-                            cch = mvinch(j, cols-2-i);
+                            cch = mvinch(j, cols-2-i) & A_CHARTEXT;
                             mvaddch(j, 3-i, cch);
                         }
                     }
@@ -310,7 +310,7 @@
                 rnd_pos(&rooms[rm], &tp->t_pos);
             } until (cnt++ > 2500 || winat(tp->t_pos.y, tp->t_pos.x) == FLOOR);
             mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type);
-            tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x);
+            tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x) & A_CHARTEXT;
 
             /*
              * If it has a fire, mark it
@@ -335,7 +335,7 @@
         nitem = next(item);
         tp = THINGPTR(item);
         mvwaddch(mw, tp->t_pos.y, tp->t_pos.x, tp->t_type);
-        tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x);
+        tp->t_oldch = mvwinch(cw, tp->t_pos.y, tp->t_pos.x) & A_CHARTEXT;
 
         /*
          * If it has a fire, mark it