summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/losparam.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2011-12-27 20:19:45 -0500
committerNeil Moore <neil@s-z.org>2011-12-27 20:19:45 -0500
commitc0bbaee3e9372376e7a628e18481e4c6b916bbb0 (patch)
tree7a04e40924368a1e0ce63918a08c27a1d6c56180 /crawl-ref/source/losparam.cc
parentefb6b1fd7b0c5027acd6d6ecede9bb34dfbea356 (diff)
downloadcrawl-ref-c0bbaee3e9372376e7a628e18481e4c6b916bbb0.tar.gz
crawl-ref-c0bbaee3e9372376e7a628e18481e4c6b916bbb0.zip
Eliminate duplicated symbols.
Objects, even const ones, should not be defined in header files, or there will be one copy for each source file that included that header. Move the offending definitions into source files, and replace them with extern declarations in the headers. Also, make the opc_* instances const and not static.
Diffstat (limited to 'crawl-ref/source/losparam.cc')
-rw-r--r--crawl-ref/source/losparam.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/losparam.cc b/crawl-ref/source/losparam.cc
index 1d7d6154f2..d92f4deb98 100644
--- a/crawl-ref/source/losparam.cc
+++ b/crawl-ref/source/losparam.cc
@@ -14,6 +14,14 @@
#include "state.h"
#include "terrain.h"
+const opacity_default opc_default;
+const opacity_fullyopaque opc_fullyopaque;
+const opacity_no_trans opc_no_trans;
+const opacity_immob opc_immob;
+const opacity_solid opc_solid;
+const opacity_solid_see opc_solid_see;
+const opacity_no_actor opc_no_actor;
+
opacity_type opacity_default::operator()(const coord_def& p) const
{
// Secret doors in translucent walls shouldn't block LOS,