From 94577e7cde8d222c7cf91f4c1493a40331404e5f Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 15 May 2016 02:18:11 -0500 Subject: [PATCH] =?UTF-8?q?Make=20Bj=C3=B6rk=20not=20look=20like=20the=20p?= =?UTF-8?q?rotagonist=20of=20Japanese=20horror/thriller=20'Ringu'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/photo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/photo.c b/src/photo.c index 62adf02..a5846ee 100644 --- a/src/photo.c +++ b/src/photo.c @@ -83,10 +83,9 @@ void cammy_photo_export(cammy_photo *src, uint8_t *dest, int stride) { int tile_x = x & 7, tile_y = y & 7; - uint8_t value = 0; - - value |= (tile->data[ tile_y<<1] & (8 >> tile_x)) - | ((tile->data[(tile_y<<1)+1] & (8 >> tile_x)) << 1); + uint8_t value = + (tile->data[ tile_y<<1] & (0x80 >> tile_x)) >> (tile_x ^ 7) + | ((tile->data[(tile_y<<1)|1] & (0x80 >> tile_x)) >> (tile_x ^ 7) << 1); value ^= 3;