Ignore:
Timestamp:
Mar 18, 2008, 9:36:56 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of ugly tabs and trailing spaces everywhere.
File:
1 edited

Legend:

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

    r66 r124  
    4747
    4848void vect::init(short imagex1,  short imagey1,  short imagex2, short imagey2,
    49            short screenx1, short screeny1, short screenx2, short screeny2)
     49       short screenx1, short screeny1, short screenx2, short screeny2)
    5050{
    5151  steps=abs(screeny1-screeny2)+1;
     
    118118  {
    119119    right[0].init(0,tx->height()-1,0,0,                         points[6],points[7],points[0],points[1]);
    120     right[1].init(0,0,tx->width()-1,0,                          points[0],points[1],points[2],points[3]);
     120    right[1].init(0,0,tx->width()-1,0,                points[0],points[1],points[2],points[3]);
    121121
    122122    left[0].init(0,tx->height()-1,tx->width()-1,tx->height()-1, points[6],points[7],points[4],points[5]);
     
    139139      steps+=1<<SHB;
    140140      if (right[r].imagex>ix)
    141         idx=((right[r].imagex-ix)<<SHB)/steps;
     141    idx=((right[r].imagex-ix)<<SHB)/steps;
    142142      else idx=((right[r].imagex-ix)<<SHB)/steps;
    143143
    144144      if (right[r].imagey>iy)
    145         idy=((right[r].imagey-iy)<<SHB)/steps;
     145    idy=((right[r].imagey-iy)<<SHB)/steps;
    146146      else idy=((right[r].imagey-iy)<<SHB)/steps;
    147147      scx=left[l].screenx>>SHB;
     
    149149      steps=steps>>SHB;
    150150      if (left[l].screenx<right[r].screenx)
    151         sa=1; else sa=-1;
     151    sa=1; else sa=-1;
    152152      while (steps--)
    153153      {
    154         if (scx>=cx1 && scx<=cx2)
    155           sl[scx]=tx->scan_line(iy>>SHB)[ix>>SHB];
    156         ix+=idx; iy+=idy;
    157         scx+=sa;
     154    if (scx>=cx1 && scx<=cx2)
     155      sl[scx]=tx->scan_line(iy>>SHB)[ix>>SHB];
     156    ix+=idx; iy+=idy;
     157    scx+=sa;
    158158      }
    159159    }
     
    162162    { y=right[r].screeny>>SHB;
    163163      if (!right[r].step())
    164         r++;
     164    r++;
    165165    } while (r!=2 && y==right[r].screeny>>SHB);
    166166
     
    168168    { y=left[l].screeny>>SHB;
    169169      if (!left[l].step())
    170         l++;
     170    l++;
    171171    } while (l!=2 && y==left[l].screeny>>SHB);
    172172
     
    233233  {
    234234    right[0].init(0,tx->height()-1,0,0,                         points[6],points[7],points[0],points[1]);
    235     right[1].init(0,0,tx->width()-1,0,                          points[0],points[1],points[2],points[3]);
     235    right[1].init(0,0,tx->width()-1,0,                points[0],points[1],points[2],points[3]);
    236236    right[2].init(tx->width()-1,0,tx->width()-1,tx->height(),   points[2],points[3],points[4],points[5]);
    237237
     
    256256      steps+=1<<SHB;
    257257      if (right[r].imagex>ix)
    258         idx=((right[r].imagex-ix)<<SHB)/steps;
     258    idx=((right[r].imagex-ix)<<SHB)/steps;
    259259      else idx=((right[r].imagex-ix)<<SHB)/steps;
    260260
    261261      if (right[r].imagey>iy)
    262         idy=((right[r].imagey-iy)<<SHB)/steps;
     262    idy=((right[r].imagey-iy)<<SHB)/steps;
    263263      else idy=((right[r].imagey-iy)<<SHB)/steps;
    264264      scx=left[l].screenx>>SHB;
     
    266266      steps=steps>>SHB;
    267267      if (left[l].screenx<right[r].screenx)
    268         sa=1; else sa=-1;
     268    sa=1; else sa=-1;
    269269      while (steps--)
    270270      {
    271         if (scx>=cx1 && scx<=cx2)
    272         {
    273           unsigned char c=tx->scan_line(iy>>SHB)[ix>>SHB];
    274           if (c!=current_background)
    275             sl[scx]=c;
    276         }
    277         ix+=idx; iy+=idy;
    278         scx+=sa;
     271    if (scx>=cx1 && scx<=cx2)
     272    {
     273      unsigned char c=tx->scan_line(iy>>SHB)[ix>>SHB];
     274      if (c!=current_background)
     275        sl[scx]=c;
     276    }
     277    ix+=idx; iy+=idy;
     278    scx+=sa;
    279279      }
    280280    }
     
    283283    { y=right[r].screeny>>SHB;
    284284      if (!right[r].step())
    285         r++;
     285    r++;
    286286    } while (r!=2 && y==(right[r].screeny>>SHB));
    287287
     
    289289    { y=left[l].screeny>>SHB;
    290290      if (!left[l].step())
    291         l++;
     291    l++;
    292292    } while (l!=2 && y==(left[l].screeny>>SHB));
    293293
Note: See TracChangeset for help on using the changeset viewer.