gba-trycatch

diff src/palman.c @ 9:b0ed38f13261

working on the rasterizer
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 22 Jun 2014 05:16:10 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/palman.c	Sun Jun 22 05:16:10 2014 +0300
     1.3 @@ -0,0 +1,16 @@
     1.4 +#include "gbasys.h"
     1.5 +#include "palman.h"
     1.6 +
     1.7 +void palman_init(void)
     1.8 +{
     1.9 +	int i;
    1.10 +
    1.11 +	for(i=0; i<255; i++) {
    1.12 +		int r = GET_R_PAL(i);
    1.13 +		int g = GET_G_PAL(i);
    1.14 +		int b = GET_B_PAL(i);
    1.15 +
    1.16 +		set_palette(i, r, g, b);
    1.17 +	}
    1.18 +	set_palette(255, 255, 255, 255);
    1.19 +}