Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-11-18 10:51:30 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:32:48 +0300
commitc7e4429a42b5592603b4ea6c03f7373e23ad5fdf (patch)
treec7de50295f575d22dce80bf4d3a20d8d8699c6ae /map/location_state.cpp
parent764ec6d83b08bd8103ae9f688f00c0469a40606b (diff)
[core] condition compilation. We can use old renderer or drape based on define USE_DRAPE
Diffstat (limited to 'map/location_state.cpp')
-rw-r--r--map/location_state.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/map/location_state.cpp b/map/location_state.cpp
index c0e184e65b..96733b60b3 100644
--- a/map/location_state.cpp
+++ b/map/location_state.cpp
@@ -3,9 +3,11 @@
#include "framework.hpp"
#include "move_screen_task.hpp"
+#ifndef USE_DRAPE
#include "../graphics/display_list.hpp"
#include "../graphics/icon.hpp"
#include "../graphics/depth_constants.hpp"
+#endif // USE_DRAPE
#include "../anim/controller.hpp"
#include "../anim/task.hpp"
@@ -246,7 +248,7 @@ State::Params::Params()
State::State(Params const & p)
: TBase(p),
- m_modeInfo(Follow),
+ m_modeInfo(UnknownPosition),
m_errorRadius(0),
m_position(0, 0),
m_drawDirection(0.0),
@@ -454,19 +456,23 @@ void State::InvalidatePosition()
void State::cache()
{
+#ifndef USE_DRAPE
CachePositionArrow();
CacheRoutingArrow();
CacheLocationMark();
m_controller->GetCacheScreen()->completeCommands();
+#endif // USE_DRAPE
}
void State::purge()
{
+#ifndef USE_DRAPE
m_positionArrow.reset();
m_locationMarkDL.reset();
m_positionMarkDL.reset();
m_routingArrow.reset();
+#endif // USE_DRAPE
}
void State::update()
@@ -484,6 +490,7 @@ void State::update()
void State::draw(graphics::OverlayRenderer * r,
math::Matrix<double, 3, 3> const & m) const
{
+#ifndef USE_DRAPE
if (!IsModeHasPosition() || !isVisible())
return;
@@ -525,8 +532,10 @@ void State::draw(graphics::OverlayRenderer * r,
}
else
r->drawDisplayList(m_positionMarkDL.get(), drawM);
+#endif // USE_DRAPE
}
+#ifndef USE_DRAPE
void State::CachePositionArrow()
{
m_positionArrow.reset();
@@ -610,6 +619,8 @@ void State::CacheArrow(graphics::DisplayList * dl, const string & iconName)
cacheScreen->endFrame();
}
+#endif // USE_DRAPE
+
bool State::IsRotationActive() const
{
return m_framework->GetNavigator().DoSupportRotation() && IsDirectionKnown();