OSDN Git Service

論理演算の使い方の修正.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 15 Jun 2003 17:26:49 +0000 (17:26 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 15 Jun 2003 17:26:49 +0000 (17:26 +0000)
src/cave.c
src/monster2.c

index 4291600..0b55822 100644 (file)
@@ -1417,7 +1417,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                 * Monsters with both CHAR_CLEAR and ATTR_CLEAR
                                 * flags are always unseen.
                                 */
-                               if (!(~r_ptr->flags1 & (RF1_CHAR_CLEAR | RF1_ATTR_CLEAR)))
+                               if ((r_ptr->flags1 & (RF1_CHAR_CLEAR | RF1_ATTR_CLEAR)) == (RF1_CHAR_CLEAR | RF1_ATTR_CLEAR))
                                {
                                        /* Do nothing */
                                }
@@ -1446,7 +1446,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                 * Monsters with both CHAR_CLEAR and ATTR_CLEAR
                                 * flags are always unseen.
                                 */
-                               else if (!(~r_ptr->flags1 & (RF1_CHAR_CLEAR | RF1_ATTR_CLEAR)))
+                               else if ((r_ptr->flags1 & (RF1_CHAR_CLEAR | RF1_ATTR_CLEAR)) == (RF1_CHAR_CLEAR | RF1_ATTR_CLEAR))
                                {
                                        /* Do nothing */
                                }
index 05dfe61..5442a40 100644 (file)
@@ -1688,7 +1688,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
 
 
        /* Handle visible monsters, "reflexive" request */
-       else if (!(~mode & (MD_POSSESSIVE | MD_OBJECTIVE)))
+       else if ((mode & (MD_POSSESSIVE | MD_OBJECTIVE)) == (MD_POSSESSIVE | MD_OBJECTIVE))
        {
                /* The monster is visible, so use its gender */
 #ifdef JP