src/video/SDL_surface.c
changeset 13552 2f75c19fd2f2
parent 13551 4efb3eb7a3b3
child 13643 b68bc68d5cce
equal deleted inserted replaced
13551:4efb3eb7a3b3 13552:2f75c19fd2f2
  1050             }
  1050             }
  1051         }
  1051         }
  1052 
  1052 
  1053         /* Set opaque and backup palette alpha values */
  1053         /* Set opaque and backup palette alpha values */
  1054         if (set_opaque) {
  1054         if (set_opaque) {
       
  1055             int i;
  1055             palette_saved_alpha = SDL_stack_alloc(Uint8, surface->format->palette->ncolors);
  1056             palette_saved_alpha = SDL_stack_alloc(Uint8, surface->format->palette->ncolors);
  1056             int i;
       
  1057             for (i = 0; i < surface->format->palette->ncolors; i++) {
  1057             for (i = 0; i < surface->format->palette->ncolors; i++) {
  1058                 palette_saved_alpha[i] = surface->format->palette->colors[i].a;
  1058                 palette_saved_alpha[i] = surface->format->palette->colors[i].a;
  1059                 surface->format->palette->colors[i].a = SDL_ALPHA_OPAQUE;
  1059                 surface->format->palette->colors[i].a = SDL_ALPHA_OPAQUE;
  1060             }
  1060             }
  1061         }
  1061         }