summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 21:15:17 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-07 07:13:16 +0100
commitfbec5462191d3029b731f6727b4be348ccc90ea6 (patch)
tree3423f7d1c10c69971d68964c4b2c3f1ce7061624
parent7e656bd3d636b6f209b83834c76de6263e1d6562 (diff)
downloadcrawl-ref-fbec5462191d3029b731f6727b4be348ccc90ea6.tar.gz
crawl-ref-fbec5462191d3029b731f6727b4be348ccc90ea6.zip
Split out los_def into separate header file.
-rw-r--r--crawl-ref/source/los.h27
-rw-r--r--crawl-ref/source/los_def.h32
2 files changed, 33 insertions, 26 deletions
diff --git a/crawl-ref/source/los.h b/crawl-ref/source/los.h
index 441ec0c0d1..f631e6417f 100644
--- a/crawl-ref/source/los.h
+++ b/crawl-ref/source/los.h
@@ -7,6 +7,7 @@
#define LOS_H
#include "env.h"
+#include "los_def.h"
#include "losparam.h"
#define EPSILON_VALUE 0.00001
@@ -41,32 +42,6 @@ void losight(env_show_grid& sh, const coord_def& center,
const bounds_func &bds = bds_default);
void losight(env_show_grid& sh, const los_param& param);
-class los_def
-{
- env_show_grid show;
- coord_def center;
- opacity_func const * opc;
- bounds_func const * bds;
-
-public:
- los_def();
- los_def(const coord_def& c, const opacity_func &o = opc_default,
- const bounds_func &b = bds_default);
- los_def(const los_def& l);
- ~los_def();
- los_def& operator=(const los_def& l);
- void init(const coord_def& center, const opacity_func& o,
- const bounds_func& b);
- void set_center(const coord_def& center);
- void set_opacity(const opacity_func& o);
- void set_bounds(const bounds_func& b);
-
- void update();
- bool in_bounds(const coord_def& p) const;
- bool see_cell(const coord_def& p) const;
-};
-
-
void calc_show_los();
bool see_cell(const env_show_grid &show,
const coord_def &c,
diff --git a/crawl-ref/source/los_def.h b/crawl-ref/source/los_def.h
new file mode 100644
index 0000000000..25e197218f
--- /dev/null
+++ b/crawl-ref/source/los_def.h
@@ -0,0 +1,32 @@
+#ifndef LOS_DEF_H
+#define LOS_DEF_H
+
+#include "losparam.h"
+
+class los_def
+{
+ env_show_grid show;
+ coord_def center;
+ opacity_func const * opc;
+ bounds_func const * bds;
+
+public:
+ los_def();
+ los_def(const coord_def& c, const opacity_func &o = opc_default,
+ const bounds_func &b = bds_default);
+ los_def(const los_def& l);
+ ~los_def();
+ los_def& operator=(const los_def& l);
+ void init(const coord_def& center, const opacity_func& o,
+ const bounds_func& b);
+ void set_center(const coord_def& center);
+ void set_opacity(const opacity_func& o);
+ void set_bounds(const bounds_func& b);
+
+ void update();
+ bool in_bounds(const coord_def& p) const;
+ bool see_cell(const coord_def& p) const;
+};
+
+#endif
+