summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-02-19 01:13:43 (EST)
committer P. J. McDermott <pjm@nac.net>2013-02-19 01:13:43 (EST)
commit8aff6e6c8590c23f7935fef5085f683d95e24db0 (patch)
treecd8e1a18c159ba55d531d1431d6cf105ba6379f1
parent9166c530c7dba3a572d6c762bc10ae25791acb1d (diff)
downloadoverworld-rpg-8aff6e6c8590c23f7935fef5085f683d95e24db0.zip
overworld-rpg-8aff6e6c8590c23f7935fef5085f683d95e24db0.tar.gz
overworld-rpg-8aff6e6c8590c23f7935fef5085f683d95e24db0.tar.bz2
Attempt to store surfaces in video memory.
This shouldn't noticably affect performance on any modern PC.
-rw-r--r--src/area.c2
-rw-r--r--src/viewport.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/area.c b/src/area.c
index 674a81c..111a1a8 100644
--- a/src/area.c
+++ b/src/area.c
@@ -45,7 +45,7 @@ blit_map_layer(struct map *map, enum map_layer_id map_layer,
SDL_Rect tilerect, layerrect;
area->map_layers[area_layer] = SDL_CreateRGBSurface(
- SDL_SWSURFACE | SDL_SRCCOLORKEY | SDL_SRCALPHA,
+ SDL_HWSURFACE | SDL_SRCCOLORKEY | SDL_SRCALPHA,
map->width * map->tilewidth,
map->height * map->tileheight,
32,
diff --git a/src/viewport.c b/src/viewport.c
index 97e73dd..1a6e9dc 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_SWSURFACE | SDL_ANYFORMAT);
+ SDL_HWSURFACE | SDL_ANYFORMAT);
if (vp->screen == NULL) {
err(1, "Failed to set video mode (%s)", SDL_GetError());
}