summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/losparam.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-25 17:21:02 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-10-25 17:52:27 +0100
commit2d971303df529463e968ab80f292d7178c69dccd (patch)
tree7901fb13fe28bc03d8ce5837d4ff14552f8ee502 /crawl-ref/source/losparam.h
parent68dacf2cd4725dd770cb86bddb1575226e2675ec (diff)
downloadcrawl-ref-2d971303df529463e968ab80f292d7178c69dccd.tar.gz
crawl-ref-2d971303df529463e968ab80f292d7178c69dccd.zip
Method alternatives to losparam operators.
This adds variants bounds_func::call(p) of bounds_func::operator()(p) and similar which I know how to call from gdb.
Diffstat (limited to 'crawl-ref/source/losparam.h')
-rw-r--r--crawl-ref/source/losparam.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/losparam.h b/crawl-ref/source/losparam.h
index 7a152a0225..b2d378192b 100644
--- a/crawl-ref/source/losparam.h
+++ b/crawl-ref/source/losparam.h
@@ -21,12 +21,24 @@ struct opacity_func
{
virtual ~opacity_func() {}
virtual opacity_type operator()(const coord_def& p) const = 0;
+
+ // XXX: to be able to call from gdb.
+ virtual opacity_type call(const coord_def& p) const
+ {
+ return (*this)(p);
+ }
};
struct bounds_func
{
virtual ~bounds_func() {}
virtual bool operator()(const coord_def& p) const = 0;
+
+ // XXX: to be able to call from gdb.
+ virtual bool call(const coord_def& p) const
+ {
+ return (*this)(p);
+ }
};
// Default LOS rules.