Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed up structure to match header, added missing Aloss
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 7, 2011
1 parent 7e4a861 commit ec797d2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/video/SDL_RLEaccel.c
Expand Up @@ -610,17 +610,19 @@ SDL_RLEBlit(SDL_Surface * src, SDL_Rect * srcrect,
typedef struct
{
Uint8 BytesPerPixel;
Uint8 padding[3];
Uint32 Rmask;
Uint32 Gmask;
Uint32 Bmask;
Uint32 Amask;
Uint8 Rloss;
Uint8 Gloss;
Uint8 Bloss;
Uint8 Aloss;
Uint8 Rshift;
Uint8 Gshift;
Uint8 Bshift;
Uint8 Ashift;
Uint32 Rmask;
Uint32 Gmask;
Uint32 Bmask;
Uint32 Amask;
} RLEDestFormat;

/* blit a pixel-alpha RLE surface clipped at the right and/or left edges */
Expand Down Expand Up @@ -1097,17 +1099,18 @@ RLEAlphaSurface(SDL_Surface * surface)
/* save the destination format so we can undo the encoding later */
RLEDestFormat *r = (RLEDestFormat *) rlebuf;
r->BytesPerPixel = df->BytesPerPixel;
r->Rmask = df->Rmask;
r->Gmask = df->Gmask;
r->Bmask = df->Bmask;
r->Amask = df->Amask;
r->Rloss = df->Rloss;
r->Gloss = df->Gloss;
r->Bloss = df->Bloss;
r->Aloss = df->Aloss;
r->Rshift = df->Rshift;
r->Gshift = df->Gshift;
r->Bshift = df->Bshift;
r->Ashift = df->Ashift;
r->Rmask = df->Rmask;
r->Gmask = df->Gmask;
r->Bmask = df->Bmask;
r->Amask = df->Amask;
}
dst = rlebuf + sizeof(RLEDestFormat);

Expand Down

0 comments on commit ec797d2

Please sign in to comment.