Ignore:
Timestamp:
Mar 16, 2008, 12:52:51 PM (11 years ago)
Author:
Sam Hocevar
Message:
  • Fix spelling errors all over the place.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/items.cpp

    r56 r112  
    208208foretile::foretile(bFILE *fp)
    209209{
    210   uint8_t *sl;
    211   image *img=load_image(fp);
    212 
    213 
    214   // create the micro image of the fore tile by aveginging the color values in 2 x 2 space
    215   // and storeing teh closest match
    216 //  uint8_t *buffer=(uint8_t *)&micro_image;
    217   int x,y,w=img->width(),h=img->height(),l;
    218   int r[AUTOTILE_WIDTH*AUTOTILE_HEIGHT],
    219       g[AUTOTILE_WIDTH*AUTOTILE_HEIGHT],
    220       b[AUTOTILE_WIDTH*AUTOTILE_HEIGHT],
    221       t[AUTOTILE_WIDTH*AUTOTILE_HEIGHT];
    222   memset(t,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
    223   memset(r,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
    224   memset(g,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
    225   memset(b,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
     210    uint8_t *sl;
     211    image *img = load_image(fp);
     212
     213    // create the micro image of the fore tile by averaging the color values
     214    // in 2×2 space and storing the closest match
     215
     216    //uint8_t *buffer=(uint8_t *)&micro_image;
     217    int x, y, w = img->width(), h = img->height(), l;
     218    int r[AUTOTILE_WIDTH * AUTOTILE_HEIGHT],
     219        g[AUTOTILE_WIDTH * AUTOTILE_HEIGHT],
     220        b[AUTOTILE_WIDTH * AUTOTILE_HEIGHT],
     221        t[AUTOTILE_WIDTH * AUTOTILE_HEIGHT];
     222    memset(t, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
     223    memset(r, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
     224    memset(g, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
     225    memset(b, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
    226226 
    227227  if (!pal)
Note: See TracChangeset for help on using the changeset viewer.