gba-x3dtest

changeset 10:23f716fa7f10

changed to mode 5 again, this time with hardware scaling (looks kinda crap)
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 22 Jun 2014 06:31:14 +0300
parents b0ed38f13261
children c47e54796b82
files src/main.c src/palman.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/src/main.c	Sun Jun 22 05:16:10 2014 +0300
     1.2 +++ b/src/main.c	Sun Jun 22 06:31:14 2014 +0300
     1.3 @@ -21,6 +21,7 @@
     1.4  	interrupt(INTR_KEY, keyb_intr);
     1.5  
     1.6  	set_video_mode(GFX_MODE, 1);
     1.7 +	set_bg_scale(171, 206);
     1.8  
     1.9  	clear_buffer(front_buffer, 0);
    1.10  	set_text_writebg(1);
     2.1 --- a/src/palman.h	Sun Jun 22 05:16:10 2014 +0300
     2.2 +++ b/src/palman.h	Sun Jun 22 06:31:14 2014 +0300
     2.3 @@ -1,12 +1,21 @@
     2.4  #ifndef PALMAN_H_
     2.5  #define PALMAN_H_
     2.6  
     2.7 +#include "config.h"
     2.8 +
     2.9 +#ifdef PALMODE
    2.10  #define RGBPAL(r, g, b)	\
    2.11  	(((r) & 0xe0) | (((g) >> 3) & 0x1c) | (((b) >> 6) & 0x3))
    2.12  
    2.13  #define GET_R_PAL(c)	((c) & 0xe0)
    2.14  #define GET_G_PAL(c)	(((c) & 0x1c) << 3)
    2.15  #define GET_B_PAL(c)	(((c) & 0x3) << 6)
    2.16 +#else
    2.17 +#define RGBPAL(r, g, b)		RGB(r, g, b)
    2.18 +#define GET_R_PAL(c)		GET_R(c)
    2.19 +#define GET_G_PAL(c)		GET_G(c)
    2.20 +#define GET_B_PAL(c)		GET_B(c)
    2.21 +#endif
    2.22  
    2.23  void palman_init(void);
    2.24