summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-07 09:14:53 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-07 09:26:05 +0100
commit5026a1be87655357367b9ae66db018c08899e572 (patch)
tree4ffc8668983e69339aecb5424f0e8092f1f2341d /crawl-ref/source/los.cc
parentdc74095a578a338bb926cfea2db14c2b90c2a633 (diff)
downloadcrawl-ref-5026a1be87655357367b9ae66db018c08899e572.tar.gz
crawl-ref-5026a1be87655357367b9ae66db018c08899e572.zip
Split los_def implementation out into los_def.cc.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r--crawl-ref/source/los.cc76
1 files changed, 0 insertions, 76 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index 7d692ca6be..98b9169d36 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -915,82 +915,6 @@ void losight(env_show_grid& sh, const coord_def& center,
}
-// class los_def
-
-los_def::los_def()
- : show(0), opc(opc_default.clone()), bds(bds_default.clone())
-{
-}
-
-los_def::los_def(const coord_def& c, const opacity_func &o,
- const bounds_func &b)
- : show(0), center(c), opc(o.clone()), bds(b.clone())
-{
-}
-
-los_def::los_def(const los_def& los)
- : show(los.show), center(los.center),
- opc(los.opc->clone()), bds(los.bds->clone())
-{
-}
-
-los_def& los_def::operator=(const los_def& los)
-{
- init(los.center, *los.opc, *los.bds);
- show = los.show;
- return (*this);
-}
-
-void los_def::init(const coord_def &c, const opacity_func &o,
- const bounds_func &b)
-{
- show.init(0);
- set_center(c);
- set_opacity(o);
- set_bounds(b);
-}
-
-los_def::~los_def()
-{
- delete opc;
- delete bds;
-}
-
-void los_def::update()
-{
- losight(show, center, *opc, *bds);
-}
-
-void los_def::set_center(const coord_def& c)
-{
- center = c;
-}
-
-void los_def::set_opacity(const opacity_func &o)
-{
- delete opc;
- opc = o.clone();
-}
-
-void los_def::set_bounds(const bounds_func &b)
-{
- delete bds;
- bds = b.clone();
-}
-
-bool los_def::in_bounds(const coord_def& p) const
-{
- return ((*bds)(p));
-}
-
-bool los_def::see_cell(const coord_def& p) const
-{
- return (::see_cell(show, center, p));
-}
-
-// end los_def
-
-
void losight_permissive(env_show_grid &sh, const coord_def& center)
{
for (int x = -ENV_SHOW_OFFSET; x <= ENV_SHOW_OFFSET; ++x)