summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-02-19 22:02:34 (EST)
committer P. J. McDermott <pjm@nac.net>2013-02-19 22:02:34 (EST)
commit8935a3d7639615d142510cde24b3ef7f1e71eab5 (patch)
treef0d8904d54f9e01718330c2b29ba806e5a208079
parentda28ffe00430f71665a2fbbaf344ad068317a0bd (diff)
downloadoverworld-rpg-8935a3d7639615d142510cde24b3ef7f1e71eab5.zip
overworld-rpg-8935a3d7639615d142510cde24b3ef7f1e71eab5.tar.gz
overworld-rpg-8935a3d7639615d142510cde24b3ef7f1e71eab5.tar.bz2
Try to get some small performance improvements.
-rw-r--r--src/area.c3
-rw-r--r--src/viewport.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/area.c b/src/area.c
index b660cae..b72faf0 100644
--- a/src/area.c
+++ b/src/area.c
@@ -51,7 +51,8 @@ blit_map_layers(struct area *area)
SDL_FillRect(area->map_layers[l], &dstrect,
SDL_MapRGB(area->map_layers[l]->format,
0xFC, 0x00, 0xFF));
- SDL_SetColorKey(area->map_layers[l], SDL_SRCCOLORKEY,
+ SDL_SetColorKey(area->map_layers[l], SDL_SRCCOLORKEY |
+ SDL_RLEACCEL,
SDL_MapRGB(area->map_layers[l]->format,
0xFC, 0x00, 0xFF));
SDL_SetColors(area->map_layers[l], colors, 0, 256);
diff --git a/src/viewport.c b/src/viewport.c
index 078d37c..05b30a6 100644
--- a/src/viewport.c
+++ b/src/viewport.c
@@ -19,7 +19,7 @@ init_viewport(int width, int height, int bpp)
debug("Setting video mode...");
vp->screen = SDL_SetVideoMode(width, height, bpp,
- SDL_HWSURFACE | SDL_HWPALETTE);
+ SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_HWPALETTE);
if (vp->screen == NULL) {
err(1, "Failed to set video mode (%s)", SDL_GetError());
}