diff --git a/src/photo.c b/src/photo.c index 5eeee50..036e2b6 100644 --- a/src/photo.c +++ b/src/photo.c @@ -104,8 +104,8 @@ void cammy_photo_import(cammy_photo *dest, uint8_t *src, int stride) { value = from ^ 0x03; } - tile->data[2*tile_y] |= (value & 0x01) << (tile_x ^ 7); - tile->data[2*tile_y+1] |= ((value & 0x02) >> 1) << (tile_x ^ 7); + tile->data[ tile_y<<1] |= (value & 0x01) << (tile_x ^ 7); + tile->data[(tile_y<<1)|1] |= ((value & 0x02) >> 1) << (tile_x ^ 7); } } }