From 932552bc48cd7160dc4de8ac4f3471ecb54f9901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Wed, 8 Feb 2012 21:20:28 +0000 Subject: [PATCH] paysages: Small fixes to clouds interface. git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@264 b1fd45b6-86a6-48da-8261-f70d1f35bdcc --- gui_qt/formclouds.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gui_qt/formclouds.cpp b/gui_qt/formclouds.cpp index 186ff72..c4eccc4 100644 --- a/gui_qt/formclouds.cpp +++ b/gui_qt/formclouds.cpp @@ -63,9 +63,10 @@ public: _lighting = lightingCreateDefinition(); light.color = COLOR_WHITE; light.amplitude = 0.0; - light.direction.x = 0.0; - light.direction.y = -0.4794; - light.direction.z = 0.8776; + light.direction.x = -1.0; + light.direction.y = -1.0; + light.direction.z = 1.0; + light.direction = v3Normalize(light.direction); light.filtered = 0; light.masked = 1; light.reflection = 1.0; @@ -86,12 +87,12 @@ protected: Color color_layer, result; start.x = x; - start.y = y; - start.z = -100.0; + start.y = -y; + start.z = 100.0; end.x = x; - end.y = y; - end.z = 100.0; + end.y = -y; + end.z = -100.0; result = COLOR_BLUE; color_layer = cloudsGetLayerColor(&_preview_layer, &_renderer, start, end); @@ -182,7 +183,7 @@ void FormClouds::configChangeEvent() void FormClouds::layerAddedEvent() { - if (cloudsAddLayer(&_definition) > 0) + if (cloudsAddLayer(&_definition) >= 0) { BaseForm::layerAddedEvent(); }