diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-17 16:42:31 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-17 16:45:18 +0200 |
commit | 050ad8a6b955cb29b4eb337ba07399da1fb6c3b0 (patch) | |
tree | 890a9584a5d29cc67e5e3e154ca0325889cd762d /crawl-ref/source/defines.h | |
parent | 47332d4cd5e3297f9c80cac5e6cc83790920cf28 (diff) | |
download | crawl-ref-050ad8a6b955cb29b4eb337ba07399da1fb6c3b0.tar.gz crawl-ref-050ad8a6b955cb29b4eb337ba07399da1fb6c3b0.zip |
Make default LOS configurable.
Setting LOS_RADIUS in defines.h now works. Fixed a couple of
things to allow this, including an apparent off-by-one error
in crawl_view -- not quite sure this doesn't break anything.
Diffstat (limited to 'crawl-ref/source/defines.h')
-rw-r--r-- | crawl-ref/source/defines.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index a5ca761886..ef22c9d029 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -106,18 +106,23 @@ const int LABYRINTH_BORDER = 4; #define Y_ABYSS_WIDTH (Y_ABYSS_2 - Y_ABYSS_1 + 1) #define Y_ABYSS_CENTER (Y_ABYSS_1 + Y_ABYSS_WIDTH / 2) -#define LOS_RADIUS 8 +// default LOS radius +#define LOS_RADIUS 10 +// default LOS radius squared, for comparison with distance() #define LOS_RADIUS_SQ (LOS_RADIUS * LOS_RADIUS + 1) +// maximal LOS radius #define LOS_MAX_RADIUS LOS_RADIUS #define LOS_MAX_RADIUS_SQ (LOS_MAX_RADIUS * LOS_MAX_RADIUS + 1) -#define LOS_MAX_RADIUS LOS_RADIUS +// maximal horizontal or vertical LOS range: +// a quadrant needs to fit inside an 2D array with +// 0 <= x, y <= LOS_MAX_RANGE #define LOS_MAX_RANGE LOS_MAX_RADIUS -#define ENV_SHOW_OFFSET (LOS_MAX_RANGE + 1) +#define ENV_SHOW_OFFSET LOS_MAX_RANGE #define ENV_SHOW_DIAMETER (ENV_SHOW_OFFSET * 2 + 1) #define VIEW_BASE_WIDTH 33 // FIXME: never used -#define VIEW_MIN_WIDTH 17 -#define VIEW_MIN_HEIGHT 17 +#define VIEW_MIN_WIDTH ENV_SHOW_DIAMETER +#define VIEW_MIN_HEIGHT ENV_SHOW_DIAMETER #define MSG_MIN_HEIGHT 7 // max traps per level @@ -143,7 +148,7 @@ const int MAX_SKILL_LEVEL = 27; const int MIN_HIT_MISS_PERCENTAGE = 5; // grids that monsters can see -const int MONSTER_LOS_RANGE = 8; +const int MONSTER_LOS_RANGE = LOS_RADIUS; // Maximum charge level for rods const int MAX_ROD_CHARGE = 17; |