summaryrefslogtreecommitdiff
path: root/meme/gaux.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-09-15 01:08:15 (GMT)
committerWerner Almesberger <werner@almesberger.net>2014-09-15 01:08:15 (GMT)
commit43d5bbb2ce7f6c4e0f2aa250821496ce0c1388be (patch)
tree2a84f4bac48bb43555eb506df33e0edbaf2b41b3 /meme/gaux.c
parentae311573dd3d45f11747fabfc874e7c61903d6b6 (diff)
downloadmisc-43d5bbb2ce7f6c4e0f2aa250821496ce0c1388be.zip
misc-43d5bbb2ce7f6c4e0f2aa250821496ce0c1388be.tar.gz
misc-43d5bbb2ce7f6c4e0f2aa250821496ce0c1388be.tar.bz2
meme/gaux.h, gaux.c: forgot to commit these
Diffstat (limited to 'meme/gaux.c')
-rw-r--r--meme/gaux.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/meme/gaux.c b/meme/gaux.c
new file mode 100644
index 0000000..9295448
--- /dev/null
+++ b/meme/gaux.c
@@ -0,0 +1,24 @@
+/*
+ * gaux.c - Auxiliary graphics functions
+ *
+ * Written 2014 by Werner Almesberger
+ * Copyright 2014 Werner Almesberger
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+
+#include "SDL.h"
+
+
+SDL_Surface *sdl_surface(Uint32 flags, int width, int height)
+{
+ SDL_PixelFormat *fmt;
+
+ fmt = SDL_GetVideoInfo()->vfmt;
+ return SDL_CreateRGBSurface(flags, width, height,
+ fmt->BitsPerPixel, fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask);
+}