diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-08-23 16:00:26 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-08-23 16:00:26 +0200 |
commit | 50f052544948f47e03a607ac6e98dae4034156a8 (patch) | |
tree | eed3e4fe0683d61a3b6f12bb17156ff0de2ce539 /crawl-ref/source/losglobal.h | |
parent | 36d3879b72b34a470671e596d6ef678f4c962e27 (diff) | |
download | crawl-ref-50f052544948f47e03a607ac6e98dae4034156a8.tar.gz crawl-ref-50f052544948f47e03a607ac6e98dae4034156a8.zip |
More than double the speed of LOS calculations.
There are two speed-ups:
* no need to check rays in the bounding square beyond a circle
* don't calculate both LOS_DEFAULT and LOS_NO_TRANS every time
Diffstat (limited to 'crawl-ref/source/losglobal.h')
-rw-r--r-- | crawl-ref/source/losglobal.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/losglobal.h b/crawl-ref/source/losglobal.h index 2fad6726d4..348e9dd455 100644 --- a/crawl-ref/source/losglobal.h +++ b/crawl-ref/source/losglobal.h @@ -3,10 +3,9 @@ enum los_type { + LOS_ARENA = 0, LOS_DEFAULT = (1 << 0), LOS_NO_TRANS = (1 << 1), - LOS_FLAG_INVALID = (1 << 7), // internal use - LOS_ARENA = LOS_FLAG_INVALID, // hack }; void invalidate_los_around(const coord_def& p); |