summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
commitd97189f055798b5b2051c1c5770a3def62747461 (patch)
treed66a891dba33d2ce1c882e0de7d6145bb2e0326b /src/map.cpp
parent25dce1399e40f24809842303d48ef090439de1e5 (diff)
downloadplus-d97189f055798b5b2051c1c5770a3def62747461.tar.gz
plus-d97189f055798b5b2051c1c5770a3def62747461.tar.bz2
plus-d97189f055798b5b2051c1c5770a3def62747461.tar.xz
plus-d97189f055798b5b2051c1c5770a3def62747461.zip
Improve perfomance in some object constructors.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 574b70e41..242162429 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -131,6 +131,11 @@ Map::Map(int width, int height, int tileWidth, int tileHeight):
mLastAScrollX(0.0f), mLastAScrollY(0.0f),
mOverlayDetail(config.getIntValue("OverlayDetail")),
mOpacity(config.getFloatValue("guialpha")),
+#ifdef USE_OPENGL
+ mOpenGL(config.getIntValue("opengl")),
+#else
+ mOpenGL(0),
+#endif
mPvp(0),
mTilesetsIndexed(false),
mIndexedTilesets(nullptr),
@@ -165,17 +170,10 @@ Map::Map(int width, int height, int tileWidth, int tileHeight):
config.addListener("guialpha", this);
config.addListener("beingopacity", this);
- mOpacity = config.getFloatValue("guialpha");
if (mOpacity != 1.0f)
mBeingOpacity = config.getBoolValue("beingopacity");
else
mBeingOpacity = false;
-
-#ifdef USE_OPENGL
- mOpenGL = config.getIntValue("opengl");
-#else
- mOpenGL = 0;
-#endif
}
Map::~Map()