summaryrefslogtreecommitdiff
path: root/meme/gaux.c
blob: 9295448df0a12112668fd27c18ddb2dea45b8d94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
}