Skip to content

Commit

Permalink
Updated Visual C++ project with dynamic image library loading
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 12, 2006
1 parent dabf347 commit 52297ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion IMG_tif.c
Expand Up @@ -204,7 +204,7 @@ SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src)
TIFF* tiff;
SDL_Surface* surface = NULL;
Uint32 img_width, img_height;
Uint32 Rmask, Gmask, Bmask, Amask, mask;
Uint32 Rmask, Gmask, Bmask, Amask;
Uint32 x, y;
Uint32 half;

Expand Down
Binary file modified VisualC.zip
Binary file not shown.
22 changes: 11 additions & 11 deletions showimage.c
Expand Up @@ -49,21 +49,21 @@ void draw_background(SDL_Surface *screen)
Uint32 c = col[((x ^ y) >> 3) & 1];
switch(bpp) {
case 1:
dst[x] = c;
dst[x] = (Uint8)c;
break;
case 2:
((Uint16 *)dst)[x] = c;
((Uint16 *)dst)[x] = (Uint16)c;
break;
case 3:
if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {
dst[x * 3] = c;
dst[x * 3 + 1] = c >> 8;
dst[x * 3 + 2] = c >> 16;
} else {
dst[x * 3] = c >> 16;
dst[x * 3 + 1] = c >> 8;
dst[x * 3 + 2] = c;
}
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
dst[x * 3] = (Uint8)(c);
dst[x * 3 + 1] = (Uint8)(c >> 8);
dst[x * 3 + 2] = (Uint8)(c >> 16);
#else
dst[x * 3] = (Uint8)(c >> 16);
dst[x * 3 + 1] = (Uint8)(c >> 8);
dst[x * 3 + 2] = (Uint8)(c);
#endif
break;
case 4:
((Uint32 *)dst)[x] = c;
Expand Down

0 comments on commit 52297ee

Please sign in to comment.