超えそうな場合はcave_floor_bold()で偽になりそれから先は処理されない.
また, モンスターは常に(1, 1)から(cur_hgt - 2, cur_wid - 2)の範囲内に
いる. このことから, cave[][]の配列外アクセスは起きないので,
mon_*_hack()内のin_bounds2()は常に真になる. このパラノイアコードを一
旦コメントアウトすることで比較回数を削り, わずかに高速化を図った.
cave_type *c_ptr;
int midpoint, dpf, d;
- /* Out of bounds */
- if (!in_bounds2(y, x)) return;
+ /* We trust this grid is in bounds */
+ /* if (!in_bounds2(y, x)) return; */
c_ptr = &cave[y][x];
cave_type *c_ptr;
int midpoint, dpf, d;
- /* Out of bounds */
- if (!in_bounds2(y, x)) return;
+ /* We trust this grid is in bounds */
+ /* if (!in_bounds2(y, x)) return; */
c_ptr = &cave[y][x];