Lines Matching refs:surface
54 SDL_Surface *surface;
85 surface = NULL;
223 /* Create a compatible surface, note that the colors are RGB ordered */
224 surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
226 if ( surface == NULL ) {
232 palette = (surface->format)->palette;
255 /* Read the surface pixels. Note that the bmp image is upside down */
261 top = (Uint8 *)surface->pixels;
262 end = (Uint8 *)surface->pixels+(surface->h*surface->pitch);
273 pad = ((surface->pitch%4) ?
274 (4-(surface->pitch%4)) : 0);
280 bits = end - surface->pitch;
288 for ( i=0; i<surface->w; ++i ) {
303 if ( SDL_RWread(src, bits, 1, surface->pitch)
304 != surface->pitch ) {
316 for(i = 0; i < surface->w; i++)
323 for(i = 0; i < surface->w; i++)
339 bits += surface->pitch;
341 bits -= surface->pitch;
349 if ( surface ) {
350 SDL_FreeSurface(surface);
352 surface = NULL;
357 return(surface);
364 SDL_Surface *surface;
388 surface = NULL;
392 surface = saveme;
409 surface = saveme;
414 surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
422 if ( surface != NULL ) {
427 if ( SDL_LowerBlit(saveme, &bounds, surface,
429 SDL_FreeSurface(surface);
432 surface = NULL;
438 if ( surface && (SDL_LockSurface(surface) == 0) ) {
439 const int bw = surface->w*surface->format->BytesPerPixel;
458 biWidth = surface->w;
459 biHeight = surface->h;
461 biBitCount = surface->format->BitsPerPixel;
463 biSizeImage = surface->h*surface->pitch;
466 if ( surface->format->palette ) {
467 biClrUsed = surface->format->palette->ncolors;
487 if ( surface->format->palette ) {
491 colors = surface->format->palette->colors;
492 ncolors = surface->format->palette->ncolors;
512 bits = (Uint8 *)surface->pixels+(surface->h*surface->pitch);
514 while ( bits > (Uint8 *)surface->pixels ) {
515 bits -= surface->pitch;
539 SDL_UnlockSurface(surface);
540 if ( surface != saveme ) {
541 SDL_FreeSurface(surface);