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/pcxread.cpp

    r494 r512  
    1010
    1111#include "config.h"
     12
     13#include "common.h"
    1214
    1315#include "pcxread.h"
     
    6062  PCX_header.xmin=0;
    6163  PCX_header.ymin=0;
    62   PCX_header.xmax=im->width()-1;
    63   PCX_header.ymax=im->height()-1;
     64  PCX_header.xmax=im->Size().x-1;
     65  PCX_header.ymax=im->Size().y-1;
    6466  PCX_header.hres=320;
    6567  PCX_header.vres=200;
    6668  PCX_header.reserved=0;
    6769  PCX_header.color_planes=1;
    68   PCX_header.bytes_per_line=im->width();
     70  PCX_header.bytes_per_line=im->Size().x;
    6971  PCX_header.palette_type=0;
    7072  memset(PCX_header.filter,0,58);
     
    7880  int y,run_length,x;
    7981  unsigned char *sl,code;
    80   for (y=0; y<im->height(); y++)
     82  for (y=0; y<im->Size().y; y++)
    8183  {
    8284    sl=im->scan_line(y);
    83     for (x=0; x<im->width(); )
     85    for (x=0; x<im->Size().x; )
    8486    {
    8587      run_length=1;
    86       while (x+run_length<im->width() && sl[x]==sl[x+run_length])
     88      while (x+run_length<im->Size().x && sl[x]==sl[x+run_length])
    8789        run_length++;
    8890      if (run_length==1 && sl[x]<64)
Note: See TracChangeset for help on using the changeset viewer.