Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
We're using the alpha component of the palette entries, let's name it…
… appropriately.
  • Loading branch information
slouken committed Mar 24, 2013
1 parent ddf7cd2 commit 027d5f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions IMG_bmp.c
Expand Up @@ -384,14 +384,14 @@ static SDL_Surface *LoadBMP_RW (SDL_RWops *src, int freesrc)
SDL_RWread(src, &palette->colors[i].b, 1, 1);
SDL_RWread(src, &palette->colors[i].g, 1, 1);
SDL_RWread(src, &palette->colors[i].r, 1, 1);
palette->colors[i].unused = 0;
palette->colors[i].a = SDL_ALPHA_OPAQUE;
}
} else {
for ( i = 0; i < (int)biClrUsed; ++i ) {
SDL_RWread(src, &palette->colors[i].b, 1, 1);
SDL_RWread(src, &palette->colors[i].g, 1, 1);
SDL_RWread(src, &palette->colors[i].r, 1, 1);
SDL_RWread(src, &palette->colors[i].unused, 1, 1);
SDL_RWread(src, &palette->colors[i].a, 1, 1);
}
}
palette->ncolors = biClrUsed;
Expand Down
4 changes: 2 additions & 2 deletions showimage.c
Expand Up @@ -43,7 +43,7 @@ static void draw_background(SDL_Renderer *renderer, int w, int h)
for (x = 0; x < w; x += rect.w) {
/* use an 8x8 checkerboard pattern */
i = (((x ^ y) >> 3) & 1);
SDL_SetRenderDrawColor(renderer, col[i].r, col[i].g, col[i].b, col[i].unused);
SDL_SetRenderDrawColor(renderer, col[i].r, col[i].g, col[i].b, col[i].a);

rect.x = x;
rect.y = y;
Expand All @@ -67,7 +67,7 @@ int main(int argc, char *argv[])
return(1);
}

flags = SDL_WINDOW_HIDDEN;
flags = 0;//SDL_WINDOW_HIDDEN;
for ( i=1; argv[i]; ++i ) {
if ( strcmp(argv[i], "-fullscreen") == 0 ) {
SDL_ShowCursor(0);
Expand Down

0 comments on commit 027d5f6

Please sign in to comment.