OSDN Git Service

[Fix] #37353 戻ってしまっていた #define 中のマクロ定義を再度削除。
authordeskull <deskull@users.sourceforge.jp>
Mon, 15 Apr 2019 14:53:37 +0000 (23:53 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 15 Apr 2019 14:57:59 +0000 (23:57 +0900)
src/defines.h

index 88da2c1..4d8cc01 100644 (file)
 #define MR1_SINKA 0x01
 
 
-#define is_friendly(A) \
-        (bool)(((A)->smart & SM_FRIENDLY) ? TRUE : FALSE)
-
-#define is_friendly_idx(IDX) \
-        (bool)((IDX) > 0 && is_friendly(&current_floor_ptr->m_list[(IDX)]))
-
-#define is_pet(A) \
-        (bool)(((A)->smart & SM_PET) ? TRUE : FALSE)
-
-#define is_hostile(A) \
-        (bool)((is_friendly(A) || is_pet(A)) ? FALSE : TRUE)
-
 /* Hack -- Determine monster race appearance index is same as race index */
 #define is_original_ap(A) \
         (bool)(((A)->ap_r_idx == (A)->r_idx) ? TRUE : FALSE)
  */
 #define term_screen     (angband_term[0])
 
-
-/*
- * Determine if a given inventory item is "aware"
- */
-#define object_is_aware(T) \
-    (k_info[(T)->k_idx].aware)
-
-/*
- * Determine if a given inventory item is "tried"
- */
-#define object_is_tried(T) \
-    (k_info[(T)->k_idx].tried)
-
-
-/*
- * Determine if a given inventory item is "known"
- * Test One -- Check for special "known" tag
- * Test Two -- Check for "Easy Know" + "Aware"
- */
-#define object_is_known(T) \
-    (((T)->ident & (IDENT_KNOWN)) || \
-     (k_info[(T)->k_idx].easy_know && k_info[(T)->k_idx].aware))
-
-
 /*
  * Return the "attr" for a given item.
  * Use "flavor" if available.
         (k_info[k_info[(T)->k_idx].flavor].x_char) : \
         (k_info[(T)->k_idx].x_char))
 
-
-/*
- * Artifacts use the "name1" field
- */
-#define object_is_fixed_artifact(T) \
-       ((T)->name1 ? TRUE : FALSE)
-
-/*
- * Ego-Items use the "name2" field
- */
-#define object_is_ego(T) \
-       ((T)->name2 ? TRUE : FALSE)
-
-
-/*
- * Broken items.
- */
-#define object_is_broken(T) \
-       ((T)->ident & (IDENT_BROKEN))
-
-/*
- * Cursed items.
- */
-#define object_is_cursed(T) \
-       ((T)->curse_flags)
-
-
 /*
  * Convert an "attr"/"char" pair into a "pict" (P)
  */
 #define GRID_X(G) \
        ((int)((G) % 256U))
 
-
-/*
- * Determines if a map location is fully inside the outer walls
- */
-#define in_bounds(Y,X) \
-   (((Y) > 0) && ((X) > 0) && ((Y) < current_floor_ptr->height-1) && ((X) < current_floor_ptr->width-1))
-
-/*
- * Determines if a map location is on or inside the outer walls
- */
-#define in_bounds2(Y,X) \
-   (((Y) >= 0) && ((X) >= 0) && ((Y) < current_floor_ptr->height) && ((X) < current_floor_ptr->width))
-
-/*
- * Determines if a map location is on or inside the outer walls
- * (unsigned version)
- */
-#define in_bounds2u(Y,X) \
-   (((Y) < current_floor_ptr->height) && ((X) < current_floor_ptr->width))
-
 /*
  * Determines if a map location is currently "on screen" -RAK-
  * Note that "panel_contains(Y,X)" always implies "in_bounds2(Y,X)".
 
 
 /*
- * Determine if player is on this grid
- */
-#define player_bold(Y,X) \
-       (((Y) == p_ptr->y) && ((X) == p_ptr->x))
-
-
-/*
- * Grid based version of "player_bold()"
- */
-#define player_grid(C) \
-       ((C) == &current_floor_ptr->grid_array[p_ptr->y][p_ptr->x])
-
-
-#define cave_have_flag_bold(Y,X,INDEX) \
-       (have_flag(f_info[current_floor_ptr->grid_array[(Y)][(X)].feat].flags, (INDEX)))
-
-
-#define cave_have_flag_grid(C,INDEX) \
-       (have_flag(f_info[(C)->feat].flags, (INDEX)))
-
-
-/*
- * Determine if a "feature" supports "los"
- */
-#define feat_supports_los(F) \
-       (have_flag(f_info[(F)].flags, FF_LOS))
-
-
-/*
- * Determine if a "legal" grid supports "los"
- */
-#define cave_los_bold(Y,X) \
-       (feat_supports_los(current_floor_ptr->grid_array[(Y)][(X)].feat))
-
-#define cave_los_grid(C) \
-       (feat_supports_los((C)->feat))
-
-
-/*
- * Determine if a "legal" grid is a "clean" floor grid
- * Determine if terrain-change spells are allowed in a grid.
- *
- * Line 1 -- forbid non-floors
- * Line 2 -- forbid object terrains
- * Line 3 -- forbid normal objects
- */
-#define cave_clean_bold(Y,X) \
-       (cave_have_flag_bold((Y), (X), FF_FLOOR) && \
-        !(current_floor_ptr->grid_array[Y][X].info & CAVE_OBJECT) && \
-         (current_floor_ptr->grid_array[Y][X].o_idx == 0))
-
-
-/*
- * Determine if an object can be dropped on a "legal" grid
- *
- * Line 1 -- forbid non-drops
- * Line 2 -- forbid object terrains
- */
-#define cave_drop_bold(Y,X) \
-       (cave_have_flag_bold((Y), (X), FF_DROP) && \
-        !(current_floor_ptr->grid_array[Y][X].info & CAVE_OBJECT))
-
-
-/*
- * Determine if a "legal" grid is an "empty" floor grid
- * Determine if monsters are allowed to move into a grid
- *
- * Line 1 -- forbid non-placement grids
- * Line 2 -- forbid normal monsters
- * Line 3 -- forbid the player
- */
-#define cave_empty_bold(Y,X) \
-       (cave_have_flag_bold((Y), (X), FF_PLACE) && \
-        !(current_floor_ptr->grid_array[Y][X].m_idx) && \
-        !player_bold(Y,X))
-
-
-/*
- * Determine if a "legal" grid is an "empty" floor grid
- * Determine if monster generation is allowed in a grid
- *
- * Line 1 -- forbid non-empty grids
- * Line 2 -- forbid trees while dungeon generation
- */
-#define cave_empty_bold2(Y,X) \
-       (cave_empty_bold(Y,X) && \
-        (character_dungeon || !cave_have_flag_bold((Y), (X), FF_TREE)))
-
-
-/*
- * Determine if a "legal" grid is an "naked" floor grid
- *
- * Line 1 -- forbid non-clean gird
- * Line 2 -- forbid monsters
- * Line 3 -- forbid the player
- */
-#define cave_naked_bold(Y,X) \
-       (cave_clean_bold(Y,X) && \
-        !(current_floor_ptr->grid_array[Y][X].m_idx) && \
-        !player_bold(Y,X))
-
-
-/*
- * Determine if a "legal" grid is "permanent"
- *
- * Line 1 -- permanent flag
- */
-#define cave_perma_bold(Y,X) \
-       (cave_have_flag_bold((Y), (X), FF_PERMANENT))
-
-
-/*
- * Grid based version of "cave_empty_bold()"
- */
-#define cave_empty_grid(C) \
-       (cave_have_flag_grid((C), FF_PLACE) && \
-        !((C)->m_idx) && \
-        !player_grid(C))
-
-
-/*
- * Grid based version of "cave_perma_bold()"
- */
-#define cave_perma_grid(C) \
-       (cave_have_flag_grid((C), FF_PERMANENT))
-
-
-#define pattern_tile(Y,X) \
-       (cave_have_flag_bold((Y), (X), FF_PATTERN))
-
-/*
- * Does the grid stop disintegration?
- */
-#define cave_stop_disintegration(Y,X) \
-       (!cave_have_flag_bold((Y), (X), FF_PROJECT) && \
-        (!cave_have_flag_bold((Y), (X), FF_HURT_DISI) || \
-         cave_have_flag_bold((Y), (X), FF_PERMANENT)))
-
-
-/*
- * Determine if a "legal" grid is within "los" of the player
- *
- * Note the use of comparison to zero to force a "boolean" result
- */
-#define player_has_los_grid(C) \
-    (((C)->info & (CAVE_VIEW)) != 0)
-
-/*
- * Determine if a "legal" grid is within "los" of the player
- *
- * Note the use of comparison to zero to force a "boolean" result
- */
-#define player_has_los_bold(Y,X) \
-    (((current_floor_ptr->grid_array[Y][X].info & (CAVE_VIEW)) != 0) || p_ptr->inside_battle)
-
-
-/*
- * Determine if a "feature" is "permanent wall"
- */
-#define permanent_wall(F) \
-       (have_flag((F)->flags, FF_WALL) && \
-        have_flag((F)->flags, FF_PERMANENT))
-
-/*
- * Get feature mimic from f_info[] (applying "mimic" field)
- */
-#define get_feat_mimic(C) \
-       (f_info[(C)->mimic ? (C)->mimic : (C)->feat].mimic)
-
-/*
  * Hack -- Prepare to use the "Secure" routines
  */
 #if defined(SET_UID) && defined(SECURE)