Simplify some pointer logic

This commit is contained in:
Clownacy 2020-11-03 20:22:51 +00:00
parent f1fd371db7
commit 6c1eb23fe1

View file

@ -240,12 +240,11 @@ void RenderBackend_UploadSurface(RenderBackend_Surface *surface, const unsigned
}
const unsigned char *src_pixel = pixels;
unsigned char *buffer_pointer = buffer;
// Convert the colour-keyed pixels to RGBA32
for (size_t y = 0; y < height; ++y)
{
unsigned char *buffer_pointer = &buffer[y * width * 4];
for (size_t x = 0; x < width; ++x)
{
*buffer_pointer++ = src_pixel[0];