From 6bac80fa01566645787e416a365e281075ec8282 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Thu, 15 Apr 2021 17:27:01 +0200 Subject: Add comment for clarification --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index cbfa2a7..7c33166 100644 --- a/src/main.c +++ b/src/main.c @@ -239,6 +239,8 @@ static inline void put_pixel_m4(int x, int y, u8 col_index) { int buffer_index = (y * SCREEN_WIDTH + x) / 2; u16 *destination = &SCREEN_BUFFER[buffer_index]; + // Odd pixels will go to the top 8 bits of the destination. Even pixels to + // the lower 8 bits. int odd = x & 0x1; if(odd) { *destination= (*destination & 0xFF) | (col_index << 8); -- cgit v1.2.1