MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / GlobeStaticData

Method GlobeStaticData

src/Geoscape/Globe.cpp:114–160  ·  view source on GitHub ↗

initialization

Source from the content-addressed store, hash-verified

112
113 //initialization
114 GlobeStaticData() : random_surf_size(60)
115 {
116 //filling terminator gradient LUT
117 for (int i=0; i<240; ++i)
118 {
119 int j = i - 120;
120
121 if (j<-66) j=-16;
122 else
123 if (j<-48) j=-15;
124 else
125 if (j<-33) j=-14;
126 else
127 if (j<-22) j=-13;
128 else
129 if (j<-15) j=-12;
130 else
131 if (j<-11) j=-11;
132 else
133 if (j<-9) j=-10;
134
135 if (j>120) j=19;
136 else
137 if (j>98) j=18;
138 else
139 if (j>86) j=17;
140 else
141 if (j>74) j=16;
142 else
143 if (j>54) j=15;
144 else
145 if (j>38) j=14;
146 else
147 if (j>26) j=13;
148 else
149 if (j>18) j=12;
150 else
151 if (j>13) j=11;
152 else
153 if (j>10) j=10;
154 else
155 if (j>8) j=9;
156
157 shade_gradient[i]= j+16;
158 }
159
160 }
161};
162
163GlobeStaticData static_data;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected