IMG_xcf.c
changeset 236 cce1251de477
parent 204 dcb38b0e78a6
child 280 ec4ae96c100c
     1.1 --- a/IMG_xcf.c	Sun Nov 08 15:58:44 2009 +0000
     1.2 +++ b/IMG_xcf.c	Sun Nov 08 17:13:36 2009 +0000
     1.3 @@ -222,7 +222,7 @@
     1.4  			is_XCF = 1;
     1.5  		}
     1.6  	}
     1.7 -	SDL_RWseek(src, start, SEEK_SET);
     1.8 +	SDL_RWseek(src, start, RW_SEEK_SET);
     1.9  	return(is_XCF);
    1.10  }
    1.11  
    1.12 @@ -282,7 +282,7 @@
    1.13      break;
    1.14    default:
    1.15      //    SDL_RWread (src, &prop->data, prop->length, 1);
    1.16 -    SDL_RWseek (src, prop->length, SEEK_CUR);
    1.17 +    SDL_RWseek (src, prop->length, RW_SEEK_CUR);
    1.18    }
    1.19  }
    1.20  
    1.21 @@ -553,17 +553,17 @@
    1.22    int x, y, tx, ty, ox, oy, i, j;
    1.23    Uint32 *row;
    1.24  
    1.25 -  SDL_RWseek (src, layer->hierarchy_file_offset, SEEK_SET);
    1.26 +  SDL_RWseek (src, layer->hierarchy_file_offset, RW_SEEK_SET);
    1.27    hierarchy = read_xcf_hierarchy (src);
    1.28  
    1.29    level = NULL;
    1.30    for (i = 0; hierarchy->level_file_offsets [i]; i++) {
    1.31 -    SDL_RWseek (src, hierarchy->level_file_offsets [i], SEEK_SET);
    1.32 +    SDL_RWseek (src, hierarchy->level_file_offsets [i], RW_SEEK_SET);
    1.33      level = read_xcf_level (src);
    1.34  
    1.35      ty = tx = 0;
    1.36      for (j = 0; level->tile_file_offsets [j]; j++) {
    1.37 -      SDL_RWseek (src, level->tile_file_offsets [j], SEEK_SET);
    1.38 +      SDL_RWseek (src, level->tile_file_offsets [j], RW_SEEK_SET);
    1.39        ox = tx+64 > level->width ? level->width % 64 : 64;
    1.40        oy = ty+64 > level->height ? level->height % 64 : 64;
    1.41  
    1.42 @@ -739,7 +739,7 @@
    1.43    // Blit layers backwards, because Gimp saves them highest first
    1.44    for (i = offsets; i > 0; i--) {
    1.45      SDL_Rect rs, rd;
    1.46 -    SDL_RWseek (src, head->layer_file_offsets [i-1], SEEK_SET);
    1.47 +    SDL_RWseek (src, head->layer_file_offsets [i-1], RW_SEEK_SET);
    1.48  
    1.49      layer = read_xcf_layer (src);
    1.50      do_layer_surface (lays, src, head, layer, load_tile);
    1.51 @@ -759,7 +759,7 @@
    1.52  
    1.53    SDL_FreeSurface (lays);
    1.54  
    1.55 -  SDL_RWseek (src, fp, SEEK_SET);
    1.56 +  SDL_RWseek (src, fp, RW_SEEK_SET);
    1.57  
    1.58    // read channels
    1.59    channel = NULL;
    1.60 @@ -767,9 +767,9 @@
    1.61    while ((offset = SDL_ReadBE32 (src))) {
    1.62      channel = (xcf_channel **) realloc (channel, sizeof (xcf_channel *) * (chnls+1));
    1.63      fp = SDL_RWtell (src);
    1.64 -    SDL_RWseek (src, offset, SEEK_SET);
    1.65 +    SDL_RWseek (src, offset, RW_SEEK_SET);
    1.66      channel [chnls++] = (read_xcf_channel (src));
    1.67 -    SDL_RWseek (src, fp, SEEK_SET);    
    1.68 +    SDL_RWseek (src, fp, RW_SEEK_SET);    
    1.69    }
    1.70  
    1.71    if (chnls) {
    1.72 @@ -797,7 +797,7 @@
    1.73  done:
    1.74    free_xcf_header (head);
    1.75    if ( error ) {
    1.76 -    SDL_RWseek(src, start, SEEK_SET);
    1.77 +    SDL_RWseek(src, start, RW_SEEK_SET);
    1.78      if ( surface ) {
    1.79        SDL_FreeSurface(surface);
    1.80        surface = NULL;