From 2bc98ed29afcb79c9cdfab6f0940378e4f195280 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 19 Feb 2013 17:34:25 -0500 Subject: Limit surfaces to 8 bpp. Set keys and palettes. Also clean up main() a bit more. --- (limited to 'src/resources') diff --git a/src/resources/map.c b/src/resources/map.c index 0719a14..6c96650 100644 --- a/src/resources/map.c +++ b/src/resources/map.c @@ -461,6 +461,10 @@ tmx_tileset_el_start(void *pv, const char *name, const char **attr) } sprintf(path, "%s/%s", dirname, source); img = img_png_get(path); + /* TODO: Get the color key from the trans attribute. */ + SDL_SetColorKey(img->image, SDL_SRCCOLORKEY, + SDL_MapRGB(img->image->format, + 0xFC, 0x00, 0xFF)); free(source); } else if (ts->type == TILESET_TYPE_COLLISION) { ts->collision_tiles = malloc(ts->width * ts->height * -- cgit v0.9.1