File: SetGamma.xml

package info (click to toggle)
openclonk 8.1-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 169,520 kB
  • sloc: cpp: 180,479; ansic: 108,988; xml: 31,371; python: 1,223; php: 767; makefile: 145; sh: 101; javascript: 34
file content (90 lines) | stat: -rw-r--r-- 3,149 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>SetGamma</title>
    <category>Global</category>
    <version>5.1 OC</version>
    <syntax>
      <rtype>bool</rtype>
      <params>
        <param>
          <type>int</type>
          <name>color1</name>
          <desc>Adjusting darker colors. Default <funclink>RGB</funclink>(0,0,0) for no adjustment.</desc>
        </param>
        <param>
          <type>int</type>
          <name>color2</name>
          <desc>Adjusting medium colors. Default <funclink>RGB</funclink>(128,128,128) for no adjustment.</desc>
        </param>
        <param>
          <type>int</type>
          <name>color3</name>
          <desc>Adjusting brighter colors. Default <funclink>RGB</funclink>(255,255,255) for no adjustment.</desc>
        </param>
        <param>
          <type>int</type>
          <name>ramp_index</name>
          <desc>0-7: index of the gamma ramp to be changed. There are eight gamma ramps which are applied subsequently. In this way, e.g. global time-of-day objects can modify the global lighting situation without conflicting with secondary lighting effects such as a lightning flash.</desc>
        </param>
      </params>
    </syntax>
    <desc>Sets a gamma ramp. Using gamma ramps, the global light situation of the game can be adjusted by assigning an individual data table to each color channel from which a new brightness value is read. By doing this you can strengthen chosen color ranges, darken or lighten the complete game or even invert light and darkness.</desc>
    <remark>
      The eight gamma ramps have the following effects:<br/><br/>
      <table>
        <rowh>
          <col>ramp_index</col>
          <col>Function</col>
        </rowh>
        <row>
          <col>0</col>
          <col>Scenario global value</col>
        </row>
        <row>
          <col>1</col>
          <col>Climate/Seasons (will be used internally if activated in the scenario)</col>
        </row>
        <row>
          <col>2</col>
          <col>free</col>
        </row>
        <row>
          <col>3</col>
          <col>Day/Night</col>
        </row>
        <row>
          <col>4</col>
          <col>free</col>
        </row>
        <row>
          <col>5</col>
          <col>Lightning</col>
        </row>
        <row>
          <col>6</col>
          <col>Magic Effects</col>
        </row>
        <row>
          <col>7</col>
          <col>free</col>
        </row>
      </table>
<br/> Generally, lower ramp indices mean longer color changes; higher indices mean shorter effects.
    </remark>
    <examples>
      <example>
        <code>SetGamma(<funclink>RGB</funclink>(50,0,0), <funclink>RGB</funclink>(140,100,100), <funclink>RGB</funclink>(255,220,220));</code>
        <text>Adds a light red hue to the game.</text>
      </example>
    </examples>
    <related>
      <funclink>ResetGamma</funclink>
      <funclink>RGB</funclink>
    </related>
  </func>
  <author>Sven2</author><date>2002-04</date>
</funcs>