OSDN Git Service

o_ptr->markedが単に非0かどうか判定されている部分を, save.cの物以外全
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 26 Dec 2003 15:17:10 +0000 (15:17 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 26 Dec 2003 15:17:10 +0000 (15:17 +0000)
てOM_FOUNDとのAND演算に置き換えた. また, autopick.cのOM_AUTODESTROYと
のAND演算も念のため括弧で括った.

src/autopick.c
src/cave.c
src/cmd1.c
src/cmd2.c
src/object1.c
src/spells1.c
src/xtra2.c

index 0ba5096..c9e34b0 100644 (file)
@@ -1628,7 +1628,7 @@ static void autopick_delayed_alter_aux(int item)
        /* Get the item (on the floor) */
        else o_ptr = &o_list[0 - item];
 
-       if (o_ptr->k_idx && o_ptr->marked & OM_AUTODESTROY)
+       if (o_ptr->k_idx && (o_ptr->marked & OM_AUTODESTROY))
        {
                char o_name[MAX_NLEN];
 
index e6fadcb..703b8cc 100644 (file)
@@ -1216,7 +1216,7 @@ void map_info(int y, int x, byte *ap, char *cp, byte *tap, char *tcp)
                next_o_idx = o_ptr->next_o_idx;
 
                /* Memorized objects */
-               if (o_ptr->marked)
+               if (o_ptr->marked & OM_FOUND)
                {
                        if (display_autopick)
                        {
index 647f766..cd197ff 100644 (file)
@@ -4640,7 +4640,7 @@ static bool run_test(void)
                        next_o_idx = o_ptr->next_o_idx;
 
                        /* Visible object */
-                       if (o_ptr->marked) return (TRUE);
+                       if (o_ptr->marked & OM_FOUND) return (TRUE);
                }
 
                /* Assume unknown */
index da90f68..7a1aeae 100644 (file)
@@ -434,7 +434,7 @@ static s16b chest_check(int y, int x)
                next_o_idx = o_ptr->next_o_idx;
 
                /* Skip unknown chests XXX XXX */
-               /* if (!o_ptr->marked) continue; */
+               /* if (!(o_ptr->marked & OM_FOUND)) continue; */
 
                /* Check for chest */
                if (o_ptr->tval == TV_CHEST) return (this_o_idx);
index 7e61655..34132f5 100644 (file)
@@ -6275,7 +6275,7 @@ int scan_floor(int *items, int y, int x, int mode)
                if ((mode & 0x01) && !item_tester_okay(o_ptr)) continue;
 
                /* Marked */
-               if ((mode & 0x02) && !o_ptr->marked) continue;
+               if ((mode & 0x02) && !(o_ptr->marked & OM_FOUND)) continue;
 
                /* Accept this item */
                /* XXX Hack -- Enforce limit */
index 478a8e4..793793e 100644 (file)
@@ -1452,7 +1452,7 @@ note_kill = "
                                                object_known(o_ptr);
 
                                                /* Notice */
-                                               if (known && o_ptr->marked)
+                                               if (known && (o_ptr->marked & OM_FOUND))
                                                {
 #ifdef JP
 msg_print("¥«¥Á¥Ã¤È²»¤¬¤·¤¿¡ª");
@@ -1521,7 +1521,7 @@ note_kill = "
                if (do_kill)
                {
                        /* Effect "observed" */
-                       if (known && o_ptr->marked)
+                       if (known && (o_ptr->marked & OM_FOUND))
                        {
                                obvious = TRUE;
                                object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
@@ -1531,7 +1531,7 @@ note_kill = "
                        if (is_art || ignore)
                        {
                                /* Observe the resist */
-                               if (known && o_ptr->marked)
+                               if (known && (o_ptr->marked & OM_FOUND))
                                {
 #ifdef JP
 msg_format("%s¤Ï±Æ¶Á¤ò¼õ¤±¤Ê¤¤¡ª",
@@ -1548,7 +1548,7 @@ msg_format("%s
                        else
                        {
                                /* Describe if needed */
-                               if (known && o_ptr->marked && note_kill)
+                               if (known && (o_ptr->marked & OM_FOUND) && note_kill)
                                {
 #ifdef JP
 msg_format("%s¤Ï%s", o_name, note_kill);
index d2625b4..fd19f3c 100644 (file)
@@ -2871,7 +2871,7 @@ static bool target_set_accept(int y, int x)
                next_o_idx = o_ptr->next_o_idx;
 
                /* Memorized object */
-               if (o_ptr->marked) return (TRUE);
+               if (o_ptr->marked & OM_FOUND) return (TRUE);
        }
 
        /* Interesting memorized features */
@@ -3415,7 +3415,7 @@ static int target_set_aux(int y, int x, int mode, cptr info)
                next_o_idx = o_ptr->next_o_idx;
 
                /* Describe it */
-               if (o_ptr->marked)
+               if (o_ptr->marked & OM_FOUND)
                {
                        char o_name[MAX_NLEN];