• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision23eb95c61f38fb82a810b92787c6c5d44f497961 (tree)
Time2019-04-15 23:57:59
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Fix] #37353 戻ってしまっていた #define 中のマクロ定義を再度削除。

Change Summary

Incremental Difference

--- a/src/defines.h
+++ b/src/defines.h
@@ -2547,18 +2547,6 @@
25472547 #define MR1_SINKA 0x01
25482548
25492549
2550-#define is_friendly(A) \
2551- (bool)(((A)->smart & SM_FRIENDLY) ? TRUE : FALSE)
2552-
2553-#define is_friendly_idx(IDX) \
2554- (bool)((IDX) > 0 && is_friendly(&current_floor_ptr->m_list[(IDX)]))
2555-
2556-#define is_pet(A) \
2557- (bool)(((A)->smart & SM_PET) ? TRUE : FALSE)
2558-
2559-#define is_hostile(A) \
2560- (bool)((is_friendly(A) || is_pet(A)) ? FALSE : TRUE)
2561-
25622550 /* Hack -- Determine monster race appearance index is same as race index */
25632551 #define is_original_ap(A) \
25642552 (bool)(((A)->ap_r_idx == (A)->r_idx) ? TRUE : FALSE)
@@ -2597,30 +2585,6 @@
25972585 */
25982586 #define term_screen (angband_term[0])
25992587
2600-
2601-/*
2602- * Determine if a given inventory item is "aware"
2603- */
2604-#define object_is_aware(T) \
2605- (k_info[(T)->k_idx].aware)
2606-
2607-/*
2608- * Determine if a given inventory item is "tried"
2609- */
2610-#define object_is_tried(T) \
2611- (k_info[(T)->k_idx].tried)
2612-
2613-
2614-/*
2615- * Determine if a given inventory item is "known"
2616- * Test One -- Check for special "known" tag
2617- * Test Two -- Check for "Easy Know" + "Aware"
2618- */
2619-#define object_is_known(T) \
2620- (((T)->ident & (IDENT_KNOWN)) || \
2621- (k_info[(T)->k_idx].easy_know && k_info[(T)->k_idx].aware))
2622-
2623-
26242588 /*
26252589 * Return the "attr" for a given item.
26262590 * Use "flavor" if available.
@@ -2643,33 +2607,6 @@
26432607 (k_info[k_info[(T)->k_idx].flavor].x_char) : \
26442608 (k_info[(T)->k_idx].x_char))
26452609
2646-
2647-/*
2648- * Artifacts use the "name1" field
2649- */
2650-#define object_is_fixed_artifact(T) \
2651- ((T)->name1 ? TRUE : FALSE)
2652-
2653-/*
2654- * Ego-Items use the "name2" field
2655- */
2656-#define object_is_ego(T) \
2657- ((T)->name2 ? TRUE : FALSE)
2658-
2659-
2660-/*
2661- * Broken items.
2662- */
2663-#define object_is_broken(T) \
2664- ((T)->ident & (IDENT_BROKEN))
2665-
2666-/*
2667- * Cursed items.
2668- */
2669-#define object_is_cursed(T) \
2670- ((T)->curse_flags)
2671-
2672-
26732610 /*
26742611 * Convert an "attr"/"char" pair into a "pict" (P)
26752612 */
@@ -2707,26 +2644,6 @@
27072644 #define GRID_X(G) \
27082645 ((int)((G) % 256U))
27092646
2710-
2711-/*
2712- * Determines if a map location is fully inside the outer walls
2713- */
2714-#define in_bounds(Y,X) \
2715- (((Y) > 0) && ((X) > 0) && ((Y) < current_floor_ptr->height-1) && ((X) < current_floor_ptr->width-1))
2716-
2717-/*
2718- * Determines if a map location is on or inside the outer walls
2719- */
2720-#define in_bounds2(Y,X) \
2721- (((Y) >= 0) && ((X) >= 0) && ((Y) < current_floor_ptr->height) && ((X) < current_floor_ptr->width))
2722-
2723-/*
2724- * Determines if a map location is on or inside the outer walls
2725- * (unsigned version)
2726- */
2727-#define in_bounds2u(Y,X) \
2728- (((Y) < current_floor_ptr->height) && ((X) < current_floor_ptr->width))
2729-
27302647 /*
27312648 * Determines if a map location is currently "on screen" -RAK-
27322649 * Note that "panel_contains(Y,X)" always implies "in_bounds2(Y,X)".
@@ -2737,176 +2654,6 @@
27372654
27382655
27392656 /*
2740- * Determine if player is on this grid
2741- */
2742-#define player_bold(Y,X) \
2743- (((Y) == p_ptr->y) && ((X) == p_ptr->x))
2744-
2745-
2746-/*
2747- * Grid based version of "player_bold()"
2748- */
2749-#define player_grid(C) \
2750- ((C) == &current_floor_ptr->grid_array[p_ptr->y][p_ptr->x])
2751-
2752-
2753-#define cave_have_flag_bold(Y,X,INDEX) \
2754- (have_flag(f_info[current_floor_ptr->grid_array[(Y)][(X)].feat].flags, (INDEX)))
2755-
2756-
2757-#define cave_have_flag_grid(C,INDEX) \
2758- (have_flag(f_info[(C)->feat].flags, (INDEX)))
2759-
2760-
2761-/*
2762- * Determine if a "feature" supports "los"
2763- */
2764-#define feat_supports_los(F) \
2765- (have_flag(f_info[(F)].flags, FF_LOS))
2766-
2767-
2768-/*
2769- * Determine if a "legal" grid supports "los"
2770- */
2771-#define cave_los_bold(Y,X) \
2772- (feat_supports_los(current_floor_ptr->grid_array[(Y)][(X)].feat))
2773-
2774-#define cave_los_grid(C) \
2775- (feat_supports_los((C)->feat))
2776-
2777-
2778-/*
2779- * Determine if a "legal" grid is a "clean" floor grid
2780- * Determine if terrain-change spells are allowed in a grid.
2781- *
2782- * Line 1 -- forbid non-floors
2783- * Line 2 -- forbid object terrains
2784- * Line 3 -- forbid normal objects
2785- */
2786-#define cave_clean_bold(Y,X) \
2787- (cave_have_flag_bold((Y), (X), FF_FLOOR) && \
2788- !(current_floor_ptr->grid_array[Y][X].info & CAVE_OBJECT) && \
2789- (current_floor_ptr->grid_array[Y][X].o_idx == 0))
2790-
2791-
2792-/*
2793- * Determine if an object can be dropped on a "legal" grid
2794- *
2795- * Line 1 -- forbid non-drops
2796- * Line 2 -- forbid object terrains
2797- */
2798-#define cave_drop_bold(Y,X) \
2799- (cave_have_flag_bold((Y), (X), FF_DROP) && \
2800- !(current_floor_ptr->grid_array[Y][X].info & CAVE_OBJECT))
2801-
2802-
2803-/*
2804- * Determine if a "legal" grid is an "empty" floor grid
2805- * Determine if monsters are allowed to move into a grid
2806- *
2807- * Line 1 -- forbid non-placement grids
2808- * Line 2 -- forbid normal monsters
2809- * Line 3 -- forbid the player
2810- */
2811-#define cave_empty_bold(Y,X) \
2812- (cave_have_flag_bold((Y), (X), FF_PLACE) && \
2813- !(current_floor_ptr->grid_array[Y][X].m_idx) && \
2814- !player_bold(Y,X))
2815-
2816-
2817-/*
2818- * Determine if a "legal" grid is an "empty" floor grid
2819- * Determine if monster generation is allowed in a grid
2820- *
2821- * Line 1 -- forbid non-empty grids
2822- * Line 2 -- forbid trees while dungeon generation
2823- */
2824-#define cave_empty_bold2(Y,X) \
2825- (cave_empty_bold(Y,X) && \
2826- (character_dungeon || !cave_have_flag_bold((Y), (X), FF_TREE)))
2827-
2828-
2829-/*
2830- * Determine if a "legal" grid is an "naked" floor grid
2831- *
2832- * Line 1 -- forbid non-clean gird
2833- * Line 2 -- forbid monsters
2834- * Line 3 -- forbid the player
2835- */
2836-#define cave_naked_bold(Y,X) \
2837- (cave_clean_bold(Y,X) && \
2838- !(current_floor_ptr->grid_array[Y][X].m_idx) && \
2839- !player_bold(Y,X))
2840-
2841-
2842-/*
2843- * Determine if a "legal" grid is "permanent"
2844- *
2845- * Line 1 -- permanent flag
2846- */
2847-#define cave_perma_bold(Y,X) \
2848- (cave_have_flag_bold((Y), (X), FF_PERMANENT))
2849-
2850-
2851-/*
2852- * Grid based version of "cave_empty_bold()"
2853- */
2854-#define cave_empty_grid(C) \
2855- (cave_have_flag_grid((C), FF_PLACE) && \
2856- !((C)->m_idx) && \
2857- !player_grid(C))
2858-
2859-
2860-/*
2861- * Grid based version of "cave_perma_bold()"
2862- */
2863-#define cave_perma_grid(C) \
2864- (cave_have_flag_grid((C), FF_PERMANENT))
2865-
2866-
2867-#define pattern_tile(Y,X) \
2868- (cave_have_flag_bold((Y), (X), FF_PATTERN))
2869-
2870-/*
2871- * Does the grid stop disintegration?
2872- */
2873-#define cave_stop_disintegration(Y,X) \
2874- (!cave_have_flag_bold((Y), (X), FF_PROJECT) && \
2875- (!cave_have_flag_bold((Y), (X), FF_HURT_DISI) || \
2876- cave_have_flag_bold((Y), (X), FF_PERMANENT)))
2877-
2878-
2879-/*
2880- * Determine if a "legal" grid is within "los" of the player
2881- *
2882- * Note the use of comparison to zero to force a "boolean" result
2883- */
2884-#define player_has_los_grid(C) \
2885- (((C)->info & (CAVE_VIEW)) != 0)
2886-
2887-/*
2888- * Determine if a "legal" grid is within "los" of the player
2889- *
2890- * Note the use of comparison to zero to force a "boolean" result
2891- */
2892-#define player_has_los_bold(Y,X) \
2893- (((current_floor_ptr->grid_array[Y][X].info & (CAVE_VIEW)) != 0) || p_ptr->inside_battle)
2894-
2895-
2896-/*
2897- * Determine if a "feature" is "permanent wall"
2898- */
2899-#define permanent_wall(F) \
2900- (have_flag((F)->flags, FF_WALL) && \
2901- have_flag((F)->flags, FF_PERMANENT))
2902-
2903-/*
2904- * Get feature mimic from f_info[] (applying "mimic" field)
2905- */
2906-#define get_feat_mimic(C) \
2907- (f_info[(C)->mimic ? (C)->mimic : (C)->feat].mimic)
2908-
2909-/*
29102657 * Hack -- Prepare to use the "Secure" routines
29112658 */
29122659 #if defined(SET_UID) && defined(SECURE)
Show on old repository browser