SetSkyColor (deprecated since 4.9.5.0 CE)

Category: Sky
Since engine version: 4.6.5.0 CP

Description

SetSkyColor modulates the passed color with the first color set in Landscape.SkyFade in the Scenario.txt and sets it as sky color modulation. This changes the corresponding palette entry in 8bit mode.

Syntax

void SetSkyColor (int index, int red, int green, int blue);

Parameters

index:
0-19: Sky color index.
red:
Red value 0-255.
green:
Green value 0-255.
blue:
Blue value 0-255.

Remark

This function is deprecated, and only works properly in the old 8-bit graphics system (for NewGfx it is emulated makeshift). Instead, SetSkyAdjust should be used.
By emulating SetSkyColor and SetSkyFade both have the same function: SetSkyColor(0, r, g, b) == SetSkyFade(r, g, b)

Example

var i=20; while (i--) SetSkyColor(i, Random(256), Random(256), Random(256));
Makes a colorful sky.

Changelog

Date Author Version Description
24th December 2022 Funni 4.9.5.0 CE Deprecated: 8Bit-DDraw was removed with the first version of Clonk Endeavour.
See also: GetSkyColor, SetGamma, SetSkyAdjust, SetSkyFade
Sven2, June 2002
Funni, 24th December 2022