paysages: Small fixes to clouds interface.

git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@264 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
Michaël Lemaire 2012-02-08 21:20:28 +00:00 committed by ThunderK
parent 6f0859bbe0
commit 932552bc48

View file

@ -63,9 +63,10 @@ public:
_lighting = lightingCreateDefinition(); _lighting = lightingCreateDefinition();
light.color = COLOR_WHITE; light.color = COLOR_WHITE;
light.amplitude = 0.0; light.amplitude = 0.0;
light.direction.x = 0.0; light.direction.x = -1.0;
light.direction.y = -0.4794; light.direction.y = -1.0;
light.direction.z = 0.8776; light.direction.z = 1.0;
light.direction = v3Normalize(light.direction);
light.filtered = 0; light.filtered = 0;
light.masked = 1; light.masked = 1;
light.reflection = 1.0; light.reflection = 1.0;
@ -86,12 +87,12 @@ protected:
Color color_layer, result; Color color_layer, result;
start.x = x; start.x = x;
start.y = y; start.y = -y;
start.z = -100.0; start.z = 100.0;
end.x = x; end.x = x;
end.y = y; end.y = -y;
end.z = 100.0; end.z = -100.0;
result = COLOR_BLUE; result = COLOR_BLUE;
color_layer = cloudsGetLayerColor(&_preview_layer, &_renderer, start, end); color_layer = cloudsGetLayerColor(&_preview_layer, &_renderer, start, end);
@ -182,7 +183,7 @@ void FormClouds::configChangeEvent()
void FormClouds::layerAddedEvent() void FormClouds::layerAddedEvent()
{ {
if (cloudsAddLayer(&_definition) > 0) if (cloudsAddLayer(&_definition) >= 0)
{ {
BaseForm::layerAddedEvent(); BaseForm::layerAddedEvent();
} }