OSDN Git Service

[Refactor] #38993 cur_wid/hgt を floor_type に取り込み width/heightに改名。 / Move cur_wid...
[hengband/hengband.git] / src / defines.h
index c2661ad..47756f2 100644 (file)
  * Determines if a map location is fully inside the outer walls
  */
 #define in_bounds(Y,X) \
-   (((Y) > 0) && ((X) > 0) && ((Y) < cur_hgt-1) && ((X) < cur_wid-1))
+   (((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) < cur_hgt) && ((X) < cur_wid))
+   (((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) < cur_hgt) && ((X) < cur_wid))
+   (((Y) < current_floor_ptr->height) && ((X) < current_floor_ptr->width))
 
 /*
  * Determines if a map location is currently "on screen" -RAK-