就在第一行发生了* * 核心转储。
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Init(SDL_INIT_VIDEO);
SDL_Surface *screen;
SDL_Surface *background;
SDL_Surface *tablero;
SDL_Surface *x;
SDL_Surface *o;
SDL_Rect posFondo;
//SDL_Rect posPlayerX[5];
//SDL_Rect posPlayerO[5];
SDL_Event suceso;
// Definir
x = SDL_LoadBMP("players.bmp");
o = SDL_LoadBMP("players.bmp");
tablero = SDL_LoadBMP("tablero.bmp");
/* Clear bg colors */
SDL_SetColorKey(x, SDL_SRCCOLORKEY,
SDL_MapRGB(x->format, 255, 0, 255));
SDL_SetColorKey(o, SDL_SRCCOLORKEY,
SDL_MapRGB(o->format, 255, 0, 255));
SDL_SetColorKey(tablero, SDL_SRCCOLORKEY,
SDL_MapRGB(tablero->format, 255, 0, 255));
/* END */
screen = SDL_SetVideoMode(600, 600, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);
if (screen == NULL) { return 0; }
/* Positions */
posFondo.x = 0;
posFondo.y = 0;
while (true) {
SDL_BlitSurface(tablero, NULL, screen, &posFondo);
//SDL_BlitSurface
while(SDL_PollEvent(&suceso)) {
if (suceso.type == SDL_QUIT) {
break; break;
}
}
SDL_Flip(screen);
SDL_Delay ( 5 );
}
我找不到问题,我尝试删除一些东西并添加动态变量(新的,删除类型)并且不...