#include <stdlib.h>
#include "SDL.h"
#include "SDL_draw.h"
int main(int argc, char *argv[])
{
SDL_Surface *screen;// 屏幕
int width, height;
Uint8 video_bpp;
Uint32 videoflags;
if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, "SDL初始化失败。。。。 %s", SDL_GetError());
exit(1);
}
atexit(SDL_Quit); //退出
videoflags = SDL_SWSURFACE | SDL_ANYFORMAT;
width = 640;
height = 480;
video_bpp = 0;
/*Video mode activation*/
screen = SDL_SetVideoMode(width, height