test/testpalette.c
changeset 1429 aff0170f9f1b
parent 1151 be9c9c8f6d53
child 1516 4d241ea8a1cd
equal deleted inserted replaced
1428:5f52867ba65c 1429:aff0170f9f1b
   171 	fprintf(stderr, "error setting %dx%d 8bpp indexed mode: %s\n",
   171 	fprintf(stderr, "error setting %dx%d 8bpp indexed mode: %s\n",
   172 		SCRW, SCRH, SDL_GetError());
   172 		SCRW, SCRH, SDL_GetError());
   173 	quit(1);
   173 	quit(1);
   174     }
   174     }
   175 
   175 
       
   176     if (vidflags & SDL_FULLSCREEN) SDL_ShowCursor (SDL_FALSE);
       
   177 
   176     if(!(boat[0] = SDL_LoadBMP("sail.bmp")))
   178     if(!(boat[0] = SDL_LoadBMP("sail.bmp")))
   177 	sdlerr("loading sail.bmp");
   179 	sdlerr("loading sail.bmp");
   178     /* We've chosen magenta (#ff00ff) as colour key for the boat */
   180     /* We've chosen magenta (#ff00ff) as colour key for the boat */
   179     SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL,
   181     SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL,
   180 		    SDL_MapRGB(boat[0]->format, 0xff, 0x00, 0xff));
   182 		    SDL_MapRGB(boat[0]->format, 0xff, 0x00, 0xff));
   331     } while(fade_level > 0);
   333     } while(fade_level > 0);
   332 
   334 
   333     printf("%d frames, %.2f fps\n",
   335     printf("%d frames, %.2f fps\n",
   334 	   frames, 1000.0 * frames / (SDL_GetTicks() - start));
   336 	   frames, 1000.0 * frames / (SDL_GetTicks() - start));
   335 
   337 
       
   338     if (vidflags & SDL_FULLSCREEN) SDL_ShowCursor (SDL_TRUE);
   336     SDL_Quit();
   339     SDL_Quit();
   337     return 0;
   340     return 0;
   338 }
   341 }
   339 
   342