diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-29 20:46:58 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-01 21:45:23 +0100 |
commit | 1c16d581d94baca62ddb6ad136e444e87fbe13d6 (patch) | |
tree | c9edb3d4f8f5efabf208c20cbb02f3b3e4d31a4b /crawl-ref/source | |
parent | 81392eb43b111bc23b2a7950c240494b9cf3d15d (diff) | |
download | crawl-ref-1c16d581d94baca62ddb6ad136e444e87fbe13d6.tar.gz crawl-ref-1c16d581d94baca62ddb6ad136e444e87fbe13d6.zip |
Remove get/set_degrees from ray_def.
These were used by the temporarily disabled chaos beams.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/ray.cc | 41 | ||||
-rw-r--r-- | crawl-ref/source/ray.h | 5 |
2 files changed, 0 insertions, 46 deletions
diff --git a/crawl-ref/source/ray.cc b/crawl-ref/source/ray.cc index 5635aaf161..1094c5f0ae 100644 --- a/crawl-ref/source/ray.cc +++ b/crawl-ref/source/ray.cc @@ -117,47 +117,6 @@ void ray_def::advance_and_bounce() set_reflect_point(oldaccx, oldaccy, blocked_x, blocked_y); } -double ray_def::get_degrees() const -{ - if (slope > 100.0) - return (quadx < 0 ? 90.0 : 270.0); - else if (double_is_zero(slope)) - return (quady > 0 ? 0.0 : 180.0); - - // 0 < deg < 90 - double deg = atan(slope) * 180.0 / M_PI; - if (quadx < 0) - deg = 180.0 - deg; - if (quady < 0) - deg = 360.0 - deg; - return (deg); -} - -void ray_def::set_degrees(double deg) -{ - while (deg < 0.0) - deg += 360.0; - while (deg >= 360.0) - deg -= 360.0; - - if (deg > 180.0) - { - quady = -1; - deg = 360 - deg; - } - if (deg > 90.0) - { - quadx = -1; - deg = 180 - deg; - } - - slope = tan(deg / 180.0 * M_PI); - if (double_is_zero(slope)) - slope = 0.0; - if (slope > 1000.0) - slope = 1000.0; -} - void ray_def::regress() { quadx = -quadx; quady= -quady; diff --git a/crawl-ref/source/ray.h b/crawl-ref/source/ray.h index a720dc4885..5dd97dd0a9 100644 --- a/crawl-ref/source/ray.h +++ b/crawl-ref/source/ray.h @@ -39,11 +39,6 @@ public: void advance_and_bounce(); void regress(); - // Gets/sets the slope in terms of degrees, with 0 = east, 90 = north, - // 180 = west, 270 = south, 360 = east, -90 = south, etc - double get_degrees() const; - void set_degrees(double deg); - protected: adv_type raw_advance_pos(); void flip(); |