summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/lightman.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-03-30 15:01:00 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2013-03-30 15:23:05 +0100
commite218dcfdf2c58f8841e7ebd220527d08e870a6d5 (patch)
treea567db04a8a51e2db87f80e259faf222a7d4becd /src/graphics/engine/lightman.h
parentbfc701e286259d9a7aa2ff8240704eab2ba3a237 (diff)
parente607fed265070be8c518d4302d8b76f738421fb3 (diff)
downloadcolobot-e218dcfdf2c58f8841e7ebd220527d08e870a6d5.tar.gz
colobot-e218dcfdf2c58f8841e7ebd220527d08e870a6d5.tar.bz2
colobot-e218dcfdf2c58f8841e7ebd220527d08e870a6d5.zip
Merge branch 'dev'
Merging content from dev
Diffstat (limited to 'src/graphics/engine/lightman.h')
-rw-r--r--src/graphics/engine/lightman.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/graphics/engine/lightman.h b/src/graphics/engine/lightman.h
index d83dfb3..ab66524 100644
--- a/src/graphics/engine/lightman.h
+++ b/src/graphics/engine/lightman.h
@@ -71,8 +71,8 @@ struct LightProgression
*/
enum LightPriority
{
- LIGHT_PRI_HIGH,
- LIGHT_PRI_LOW
+ LIGHT_PRI_HIGH = 1,
+ LIGHT_PRI_LOW = 2
};
/**
@@ -129,7 +129,7 @@ class CLightManager
{
public:
//! Constructor
- CLightManager(CInstanceManager *iMan, CEngine* engine);
+ CLightManager(CEngine* engine);
//! Destructor
virtual ~CLightManager();
@@ -189,7 +189,21 @@ public:
void UpdateDeviceLights(EngineObjectType type);
protected:
- CInstanceManager* m_iMan;
+ class LightsComparator
+ {
+ public:
+ LightsComparator(Math::Vector eyePos, EngineObjectType objectType);
+
+ bool operator()(const DynamicLight& left, const DynamicLight& right);
+
+ private:
+ float GetLightWeight(const DynamicLight& dynLight);
+
+ Math::Vector m_eyePos;
+ EngineObjectType m_objectType;
+ };
+
+protected:
CEngine* m_engine;
CDevice* m_device;
@@ -197,7 +211,7 @@ protected:
float m_time;
//! List of dynamic lights
std::vector<DynamicLight> m_dynLights;
- //! Map of current light allotment: graphics light -> dynamic light
+ //! Map of current light allocation: graphics light -> dynamic light
std::vector<int> m_lightMap;
};