diff xrogue/bolt.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 7c1cb43f346e
children
line wrap: on
line diff
--- a/xrogue/bolt.c	Sat Mar 20 22:36:52 2021 -0400
+++ b/xrogue/bolt.c	Wed Apr 14 18:55:33 2021 -0400
@@ -53,9 +53,9 @@
     bounces = 0;        /* No bounces yet */
     nofont(cw);
     for (y = 0; y < BOLT_LENGTH && !used; y++) {
-        ch = winat(pos.y, pos.x);
+        ch = winat(pos.y, pos.x) & A_CHARTEXT;
         spotpos[y].place = pos;
-        spotpos[y].oldch = mvwinch(cw, pos.y, pos.x);
+        spotpos[y].oldch = mvwinch(cw, pos.y, pos.x) & A_CHARTEXT;
 
         /* Are we at hero? */
         if (ce(pos, hero)) goto at_hero;
@@ -70,8 +70,8 @@
                     dir.x = -dir.x;
                 }
                 else {
-                    unsigned char chx = mvinch(pos.y-dir.y, pos.x),
-                         chy = mvinch(pos.y, pos.x-dir.x);
+                    unsigned char chx = mvinch(pos.y-dir.y, pos.x) & A_CHARTEXT,
+                         chy = mvinch(pos.y, pos.x-dir.x) & A_CHARTEXT;
                     bool anychange = FALSE; /* Did we change anthing */
 
                     if (chy == WALL || chy == SECRETDOOR ||