gba-trycatch
diff src/sdlsys/gbasys.h @ 6:73b5f2e5d18a
first triangle on screen
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 18 Jun 2014 04:13:02 +0300 |
parents | 850be43b3135 |
children | b0ed38f13261 |
line diff
1.1 --- a/src/sdlsys/gbasys.h Mon Jun 16 22:01:45 2014 +0300 1.2 +++ b/src/sdlsys/gbasys.h Wed Jun 18 04:13:02 2014 +0300 1.3 @@ -8,15 +8,15 @@ 1.4 void *pixels; 1.5 }; 1.6 1.7 -extern struct pixel_buffer *back_buffer; 1.8 +extern struct pixel_buffer *back_buffer, *front_buffer; 1.9 1.10 #define RGB(r, g, b)\ 1.11 - ((((b) >> 3) & 0x1f) << 10) |\ 1.12 - ((((g) >> 3) & 0x1f) << 5) |\ 1.13 + ((((b) >> 3) & 0x1f) << 11) |\ 1.14 + ((((g) >> 2) & 0x3f) << 5) |\ 1.15 (((r) >> 3) & 0x1f) 1.16 1.17 -#define GET_R(c) ((((c) >> 10) & 0x1f) << 3) 1.18 -#define GET_G(c) ((((c) >> 5) & 0x1f) << 3) 1.19 +#define GET_R(c) ((((c) >> 11) & 0x1f) << 3) 1.20 +#define GET_G(c) ((((c) >> 5) & 0x3f) << 2) 1.21 #define GET_B(c) (((c) & 0x1f) << 3) 1.22 1.23 /* defined in main_sdl.c */