Fixed up structure to match header, added missing Aloss
authorSam Lantinga <slouken@libsdl.org>
Sun, 06 Mar 2011 23:54:50 -0800
changeset 54353de226f0cc06
parent 5434 fb5e9db92a77
child 5436 29977c050731
Fixed up structure to match header, added missing Aloss
src/video/SDL_RLEaccel.c
     1.1 --- a/src/video/SDL_RLEaccel.c	Sun Mar 06 23:54:20 2011 -0800
     1.2 +++ b/src/video/SDL_RLEaccel.c	Sun Mar 06 23:54:50 2011 -0800
     1.3 @@ -610,17 +610,19 @@
     1.4  typedef struct
     1.5  {
     1.6      Uint8 BytesPerPixel;
     1.7 +    Uint8 padding[3];
     1.8 +    Uint32 Rmask;
     1.9 +    Uint32 Gmask;
    1.10 +    Uint32 Bmask;
    1.11 +    Uint32 Amask;
    1.12      Uint8 Rloss;
    1.13      Uint8 Gloss;
    1.14      Uint8 Bloss;
    1.15 +    Uint8 Aloss;
    1.16      Uint8 Rshift;
    1.17      Uint8 Gshift;
    1.18      Uint8 Bshift;
    1.19      Uint8 Ashift;
    1.20 -    Uint32 Rmask;
    1.21 -    Uint32 Gmask;
    1.22 -    Uint32 Bmask;
    1.23 -    Uint32 Amask;
    1.24  } RLEDestFormat;
    1.25  
    1.26  /* blit a pixel-alpha RLE surface clipped at the right and/or left edges */
    1.27 @@ -1097,17 +1099,18 @@
    1.28          /* save the destination format so we can undo the encoding later */
    1.29          RLEDestFormat *r = (RLEDestFormat *) rlebuf;
    1.30          r->BytesPerPixel = df->BytesPerPixel;
    1.31 +        r->Rmask = df->Rmask;
    1.32 +        r->Gmask = df->Gmask;
    1.33 +        r->Bmask = df->Bmask;
    1.34 +        r->Amask = df->Amask;
    1.35          r->Rloss = df->Rloss;
    1.36          r->Gloss = df->Gloss;
    1.37          r->Bloss = df->Bloss;
    1.38 +        r->Aloss = df->Aloss;
    1.39          r->Rshift = df->Rshift;
    1.40          r->Gshift = df->Gshift;
    1.41          r->Bshift = df->Bshift;
    1.42          r->Ashift = df->Ashift;
    1.43 -        r->Rmask = df->Rmask;
    1.44 -        r->Gmask = df->Gmask;
    1.45 -        r->Bmask = df->Bmask;
    1.46 -        r->Amask = df->Amask;
    1.47      }
    1.48      dst = rlebuf + sizeof(RLEDestFormat);
    1.49