Make this C89-compatible

This commit is contained in:
twinaphex 2017-12-29 04:46:13 +01:00
parent 3101ee8036
commit 893cd2b472

View File

@ -139,6 +139,7 @@ static bool switch_frame(void *data, const void *frame,
{
for(y = 0; y < height; y++)
{
unsigned subx, suby;
uint32_t spixel = frame_pixels[(y*pitch/sizeof(uint16_t)) + x];
uint32_t dpixel = 0;
uint8_t r = (spixel >> 11) & 31;
@ -149,8 +150,8 @@ static bool switch_frame(void *data, const void *frame,
b = (b * 256) / 32;
dpixel = (r << 0) | (g << 8) | (b << 16) | (0xFF << 24);
for (int subx = 0; subx < xsf; subx++)
for (int suby = 0; suby < ysf; suby++)
for (subx = 0; subx < xsf; subx++)
for (suby = 0; suby < ysf; suby++)
image[(((y*sf)+suby+centery)*1280)
+ ((x*sf)+subx+centerx)] = dpixel;
}