gbasys

changeset 10:9d05431f4a16

fixed GET_R/GET_B macros which where reversed
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 30 Jan 2016 05:23:48 +0200
parents 85f219fcdc82
children 2b31bd7e96b4
files src/gfx.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/gfx.h	Sun Jun 22 06:27:18 2014 +0300
     1.2 +++ b/src/gfx.h	Sat Jan 30 05:23:48 2016 +0200
     1.3 @@ -36,9 +36,9 @@
     1.4  	((((g) >> 3) & 0x1f) << 5) |\
     1.5  	(((r) >> 3) & 0x1f)
     1.6  
     1.7 -#define GET_R(c)	((((c) >> 10) & 0x1f) << 3)
     1.8 +#define GET_R(c)	(((c) & 0x1f) << 3)
     1.9  #define GET_G(c)	((((c) >> 5) & 0x1f) << 3)
    1.10 -#define GET_B(c)	(((c) & 0x1f) << 3)
    1.11 +#define GET_B(c)	((((c) >> 10) & 0x1f) << 3)
    1.12  
    1.13  int set_video_mode(int mode, int back_buffering);
    1.14  void flip(void);