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

Method setPixelIterative

src/Engine/Surface.h:156–165  ·  view source on GitHub ↗

* Changes the color of a pixel in the surface and returns the * next pixel position. Useful when changing a lot of pixels in * a row, eg. loading images. * @param x Pointer to the X position of the pixel. Changed to the next X position in the sequence. * @param y Pointer to the Y position of the pixel. Changed to the next Y position in the sequence. * @param pixel New color for the pixel

Source from the content-addressed store, hash-verified

154 * @param pixel New color for the pixel.
155 */
156 void setPixelIterative(int *x, int *y, Uint8 pixel)
157 {
158 setPixel(*x, *y, pixel);
159 (*x)++;
160 if (*x == getWidth())
161 {
162 (*y)++;
163 *x = 0;
164 }
165 }
166 /**
167 * Returns the color of a specified pixel in the surface.
168 * @param x X position of the pixel.

Callers 2

loadPckMethod · 0.80
loadDatMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected