OSDN Git Service

[Refactor] #37353 複数の is_bound* マクロを floor.h へ移動。
[hengband/hengband.git] / src / floor.h
1 
2 /*
3  * Flags for change floor mode
4  */
5 #define CFM_UP           0x0001  /* Move up */
6 #define CFM_DOWN         0x0002  /* Move down */
7 #define CFM_LONG_STAIRS  0x0004  /* Randomly occurred long stairs/shaft */
8 #define CFM_XXX          0x0008  /* XXX */
9 #define CFM_SHAFT        0x0010  /* Shaft */
10 #define CFM_RAND_PLACE   0x0020  /* Arrive at random grid */
11 #define CFM_RAND_CONNECT 0x0040  /* Connect with random stairs */
12 #define CFM_SAVE_FLOORS  0x0080  /* Save floors */
13 #define CFM_NO_RETURN    0x0100  /* Flee from random quest etc... */
14 #define CFM_FIRST_FLOOR  0x0200  /* Create exit from the dungeon */
15
16  /*
17   * Determines if a map location is fully inside the outer walls
18   */
19 #define in_bounds(Y,X) \
20    (((Y) > 0) && ((X) > 0) && ((Y) < current_floor_ptr->height-1) && ((X) < current_floor_ptr->width-1))
21
22   /*
23    * Determines if a map location is on or inside the outer walls
24    */
25 #define in_bounds2(Y,X) \
26    (((Y) >= 0) && ((X) >= 0) && ((Y) < current_floor_ptr->height) && ((X) < current_floor_ptr->width))
27
28    /*
29         * Determines if a map location is on or inside the outer walls
30         * (unsigned version)
31         */
32 #define in_bounds2u(Y,X) \
33    (((Y) < current_floor_ptr->height) && ((X) < current_floor_ptr->width))
34