summaryrefslogtreecommitdiffstats
path: root/src/resources
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-02-19 17:34:25 (EST)
committer P. J. McDermott <pjm@nac.net>2013-02-19 17:34:25 (EST)
commit2bc98ed29afcb79c9cdfab6f0940378e4f195280 (patch)
tree8e518d50c15bd9c3ad29963640df6643f222eaf8 /src/resources
parent953782576764dc42ba2abfc1097255f53060ce71 (diff)
downloadoverworld-rpg-2bc98ed29afcb79c9cdfab6f0940378e4f195280.zip
overworld-rpg-2bc98ed29afcb79c9cdfab6f0940378e4f195280.tar.gz
overworld-rpg-2bc98ed29afcb79c9cdfab6f0940378e4f195280.tar.bz2
Limit surfaces to 8 bpp. Set keys and palettes.
Also clean up main() a bit more.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/map.c4
1 files changed, 4 insertions, 0 deletions
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 *