src/video/SDL_bmp.c
changeset 7068 1fa727447de3
parent 7024 72cb3e205571
child 7191 75360622e65f
equal deleted inserted replaced
7067:7ac321f6e0e4 7068:1fa727447de3
   258             for (i = 0; i < (int) biClrUsed; ++i) {
   258             for (i = 0; i < (int) biClrUsed; ++i) {
   259                 SDL_RWread(src, &palette->colors[i].b, 1, 1);
   259                 SDL_RWread(src, &palette->colors[i].b, 1, 1);
   260                 SDL_RWread(src, &palette->colors[i].g, 1, 1);
   260                 SDL_RWread(src, &palette->colors[i].g, 1, 1);
   261                 SDL_RWread(src, &palette->colors[i].r, 1, 1);
   261                 SDL_RWread(src, &palette->colors[i].r, 1, 1);
   262                 SDL_RWread(src, &palette->colors[i].a, 1, 1);
   262                 SDL_RWread(src, &palette->colors[i].a, 1, 1);
       
   263 
       
   264                 /* According to Microsoft documentation, the fourth element
       
   265                    is reserved and must be zero, so we shouldn't treat it as
       
   266                    alpha.
       
   267                 */
       
   268                 palette->colors[i].a = SDL_ALPHA_OPAQUE;
   263             }
   269             }
   264         }
   270         }
   265     }
   271     }
   266 
   272 
   267     /* Read the surface pixels.  Note that the bmp image is upside down */
   273     /* Read the surface pixels.  Note that the bmp image is upside down */