summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ray.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-14 14:31:46 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-14 15:06:35 +0200
commitc4e7e2eae39db0f26e3106d09bcd90298fa739ab (patch)
treee6e220d9e231c89cd03b6ca51c3a88f1f25831a9 /crawl-ref/source/ray.h
parent2f6262a7da259da4e7f09536580247f541cdd4a6 (diff)
downloadcrawl-ref-c4e7e2eae39db0f26e3106d09bcd90298fa739ab.tar.gz
crawl-ref-c4e7e2eae39db0f26e3106d09bcd90298fa739ab.zip
Replace quadrants by signs.
Diffstat (limited to 'crawl-ref/source/ray.h')
-rw-r--r--crawl-ref/source/ray.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/crawl-ref/source/ray.h b/crawl-ref/source/ray.h
index 0bf5609b7f..1565595d7f 100644
--- a/crawl-ref/source/ray.h
+++ b/crawl-ref/source/ray.h
@@ -7,15 +7,6 @@
#ifndef RAY_H
#define RAY_H
-// quadrant
-enum quad_type
-{
- QUAD_SE = 0,
- QUAD_SW = 1,
- QUAD_NW = 2,
- QUAD_NE = 3
-};
-
// direction of advance:
enum adv_type
{
@@ -30,12 +21,13 @@ public:
double accx;
double accy;
double slope;
- quad_type quadrant;
+ int quadx;
+ int quady;
int fullray_idx; // for cycling: where did we come from?
public:
ray_def(double accx = 0.0, double accy = 0.0, double slope = 0.0,
- quad_type quadrant = QUAD_SE, int fullray_idx = -1);
+ int quadx = 1, int quady = 1, int fullray_idx = -1);
int x() const;
int y() const;
coord_def pos() const;
@@ -54,7 +46,7 @@ public:
void set_degrees(double deg);
protected:
- adv_type raw_advance_0();
+ adv_type raw_advance_pos();
void flip();
adv_type raw_advance();
double reflect(bool x, double oldc, double newc) const;