neingeist
/
cscape
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

34 lines
1.5 KiB
C

/* $Revision$ */
#include "SDL.h"
char farben[] =
{ 0, 0, 0,48,48,48, 1, 0,43, 1, 3,43, 2, 5,44, 2, 7,44, 3, 9,45, 4,11,46,
5,13,47, 6,15,48, 7,17,49, 8,19,50, 9,21,51,10,22,52,11,24,52,12,26,54,
13,28,54,14,30,56,15,32,56,16,34,58,17,34,58,17,36,58,18,38,60,19,40,60,
20,42,62,21,44,62,10,31, 0,11,31, 0,11,31, 1,11,32, 1,12,32, 1,12,32, 2,
12,33, 2,13,33, 2,14,33, 3,15,33, 3,15,34, 3,15,34, 4,15,35, 4,16,35, 4,
16,35, 5,16,36, 5,17,36, 5,17,36, 6,18,37, 6,18,38, 7,19,38, 8,20,39, 8,
20,40, 9,21,40,10,22,41,10,22,42,11,23,42,12,24,43,12,24,44,13,25,44,14,
25,45,14,26,46,15,27,46,16,27,47,17,28,47,18,28,48,19,29,49,19,30,49,20,
30,50,21,31,51,21,32,51,22,32,52,23,33,53,23,34,53,24,34,54,25,35,55,25,
36,55,26,36,56,27,37,57,27,38,57,27,39,57,27,41,57,27,42,57,27,43,57,27,
44,57,27,45,57,27,46,57,27,47,57,27,49,57,27,50,57,27,51,57,27,52,57,27,
53,57,27,55,57,27,56,57,27,57,57,27,58,57,27,58,57,26,58,57,25,58,57,24,
58,56,23,58,55,22,58,54,20,58,53,19,58,51,18,58,50,17,58,50,16,58,49,15,
58,48,14,58,47,13,58,46,12,58,45,11,58,44,11,58,44,10,58,43,10,58,42, 9,
57,41, 8,57,40, 8,56,39, 7,56,38, 6,55,37, 5,55,35, 4,54,33, 4,54,31, 2,
32,32,32,63,63,63,63,63,63,63,63,63,63,63,63,48,48,48,63,63,63,63,63,63 };
void map_setpalette(SDL_Surface *screen) {
SDL_Color colors[128];
int i;
for(i=0;i<=127;i++) {
colors[i].r=farben[i*3+0]<<2;
colors[i].g=farben[i*3+1]<<2;
colors[i].b=farben[i*3+2]<<2;
}
SDL_SetPalette(screen, SDL_LOGPAL|SDL_PHYSPAL, colors, 0, 128);
}