summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-02-28 21:26:09 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2013-02-28 22:06:22 +0100
commit08c646bb929c7bc98b005521b6e0c14428f651d0 (patch)
treebd708ad596274bea8c387122bcd9fceadf620373 /test/unit
parentb361d27d332591c59b5f8613fbf724d82872b877 (diff)
downloadcolobot-08c646bb929c7bc98b005521b6e0c14428f651d0.tar.gz
colobot-08c646bb929c7bc98b005521b6e0c14428f651d0.tar.bz2
colobot-08c646bb929c7bc98b005521b6e0c14428f651d0.zip
Fixed stupid error, tweaked ambient light colors
* fixed stupid error in light manager * tweaked ambient light colors to 0.1 of diffuse; colors should not be oversaturated now
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/graphics/engine/lightman_test.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/graphics/engine/lightman_test.cpp b/test/unit/graphics/engine/lightman_test.cpp
index 529cee8..b20b058 100644
--- a/test/unit/graphics/engine/lightman_test.cpp
+++ b/test/unit/graphics/engine/lightman_test.cpp
@@ -75,6 +75,7 @@ void LightManagerUT::AddLight(int type, LightPriority priority, bool used, bool
Light light;
light.type = static_cast<LightType>(type);
+ light.position = pos;
lightManager.SetLight(rank, light);
lightManager.SetLightEnabled(rank, enabled);
@@ -109,7 +110,7 @@ TEST_F(LightManagerUT, LightSorting_IncludeTypesAreIncluded)
AddLight(2, LIGHT_PRI_LOW, true, true, Math::Vector(0.0f, 0.0f, 0.0f), ENG_OBJTYPE_TERRAIN, ENG_OBJTYPE_NULL);
AddLight(3, LIGHT_PRI_LOW, true, true, Math::Vector(0.0f, 0.0f, 0.0f), ENG_OBJTYPE_QUARTZ, ENG_OBJTYPE_NULL);
- std::vector<int> expectedLights = { 1, 2 };
+ std::vector<int> expectedLights = { 2, 1 };
CheckLightSorting(ENG_OBJTYPE_TERRAIN, expectedLights);
}
@@ -123,7 +124,7 @@ TEST_F(LightManagerUT, LightSorting_ExcludeTypesAreExcluded)
AddLight(2, LIGHT_PRI_LOW, true, true, Math::Vector(0.0f, 0.0f, 0.0f), ENG_OBJTYPE_NULL, ENG_OBJTYPE_TERRAIN);
AddLight(3, LIGHT_PRI_LOW, true, true, Math::Vector(0.0f, 0.0f, 0.0f), ENG_OBJTYPE_NULL, ENG_OBJTYPE_QUARTZ);
- std::vector<int> expectedLights = { 1, 3 };
+ std::vector<int> expectedLights = { 3, 1 };
CheckLightSorting(ENG_OBJTYPE_TERRAIN, expectedLights);
}
@@ -140,6 +141,6 @@ TEST_F(LightManagerUT, LightSorting_SortingAccordingToDistance)
AddLight(5, LIGHT_PRI_LOW, true, true, Math::Vector(100.0f, 0.0f, 0.0f), ENG_OBJTYPE_NULL, ENG_OBJTYPE_NULL);
AddLight(6, LIGHT_PRI_HIGH, true, true, Math::Vector(21.0f, 0.0f, 0.0f), ENG_OBJTYPE_NULL, ENG_OBJTYPE_NULL);
- std::vector<int> expectedLights = { 1, 2, 3 };
+ std::vector<int> expectedLights = { 2, 1, 3 };
CheckLightSorting(ENG_OBJTYPE_TERRAIN, expectedLights);
}