Ignore:
Timestamp:
Apr 20, 2011, 12:39:27 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: use vec2i for image::size and unroll all necessary changes
everywhere else in the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/include.cpp

    r494 r512  
    1010
    1111#include "config.h"
     12
     13#include "common.h"
    1214
    1315#include "include.h"
     
    5355      }
    5456    }
    55     fprintf(fp,"unsigned char %s[%d*%d]={\n    ",tmp_name,
    56             im->width(),im->height());
    57     int x,y,max=im->width()*im->height()-1;
    58     for (y=0,i=0; y<im->height(); y++)
    59       for (x=0; x<im->width(); x++,i++)
     57    vec2i size = im->Size();
     58    fprintf(fp,"unsigned char %s[%d*%d]={\n    ",tmp_name, size.x, size.y);
     59    int x,y,max=size.x*size.y-1;
     60    for (y=0,i=0; y<size.y; y++)
     61      for (x=0; x<size.x; x++,i++)
    6062      {
    6163        fprintf(fp,"%d",(int)im->pixel(x,y));
Note: See TracChangeset for help on using the changeset viewer.