OSDN Git Service

光源の半径の最大値を11に拡張。配列溢れがない事をdefine.hのコメントに記述。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 30 Apr 2002 08:41:36 +0000 (08:41 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 30 Apr 2002 08:41:36 +0000 (08:41 +0000)
src/cave.c
src/defines.h
src/xtra1.c

index d0259b8..664d162 100644 (file)
@@ -3060,9 +3060,6 @@ void forget_lite(void)
  * list the "nearby" grids before the more "distant" ones in the
  * array of torch-lit grids.
  *
- * We will correctly handle "large" radius lites, though currently,
- * it is impossible for the player to have more than radius 3 lite.
- *
  * We assume that "radius zero" lite is in fact no lite at all.
  *
  *     Torch     Lantern     Artifacts
@@ -3180,7 +3177,7 @@ void update_lite(void)
                int d;
 
                /* Paranoia -- see "LITE_MAX" */
-               if (p > 5) p = 5;
+               if (p > 11) p = 11;
 
                /* South-East of the player */
                if (cave_floor_bold(py+1, px+1))
index 0d6054d..7ef28ee 100644 (file)
 
 /*
  * Maximum size of the "lite" array (see "cave.c")
- * Note that the "lite radius" will NEVER exceed 5, and even if the "lite"
- * was rectangular, we would never require more than 128 entries in the array.
+ * Note that the "lite radius" will NEVER exceed 11, and we would
+ * never require more than 369 entries in the array for circular "lite".
  */
 #define LITE_MAX 512
 
index d212ba1..fc2a8fa 100644 (file)
@@ -3115,7 +3115,7 @@ static void calc_torch(void)
        /* see cave.c:update_lite() and defines.h:LITE_MAX */
        if (d_info[dungeon_type].flags1 & DF1_DARKNESS && p_ptr->cur_lite > 1)
                p_ptr->cur_lite = 1;
-       if (p_ptr->cur_lite > 5) p_ptr->cur_lite = 5;
+       if (p_ptr->cur_lite > 11) p_ptr->cur_lite = 11;
        if (p_ptr->cur_lite < 0) p_ptr->cur_lite = 0;
 
        /* check if the player doesn't have a lite source, */