MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / R_InvertColor

Function R_InvertColor

neo/renderer/Image_program.cpp:175–186  ·  view source on GitHub ↗

================= R_InvertColor ================= */

Source from the content-addressed store, hash-verified

173=================
174*/
175static void R_InvertColor( byte *data, int width, int height ) {
176 int i;
177 int c;
178
179 c = width * height* 4;
180
181 for ( i = 0 ; i < c ; i+=4 ) {
182 data[i+0] = 255 - data[i+0];
183 data[i+1] = 255 - data[i+1];
184 data[i+2] = 255 - data[i+2];
185 }
186}
187
188
189/*

Callers 1

R_ParseImageProgram_rFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected