From 2bc5aaf6343ea87b19a274afe29ffec6621eeba5 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 15 May 2016 01:02:11 -0500 Subject: [PATCH] WOO BITMATH --- src/photo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } }