~hidravfx-dev-team/hidravfx/trunk

« back to all changes in this revision

Viewing changes to src/layer.c

  • Committer: Laszlo.simon
  • Date: 2011-03-12 23:51:28 UTC
  • Revision ID: git-v1:f127e894b62d5129c6a9f00d070401bf8895ae44
Conform effects added to code gen. Minimal bash completion support added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
      && (x>=l.l) && (x<=l.l+l.w-1) && (y>=l.t) && (y<=l.t+l.h-1))
114
114
  {
115
115
     x1 = x;
116
 
     x0 = x-x1;
117
116
     y1 = y;
118
 
     y0 = y-y1;
119
 
     x1 = x1-l.l;
120
 
     y1 = y1-l.t;
121
 
     x2 = (x1==x) ? x1 : x1+1;
122
 
     y2 = (y1==y) ? y1 : y1+1;
123
 
     return linear2(l.ch[ch][y1][x1],l.ch[ch][y1][x2],
124
 
                    l.ch[ch][y2][x1],l.ch[ch][y2][x2],
125
 
                    x0,y0);
 
117
     if((x1 == x) && (y1 == y))
 
118
     {
 
119
       return(l.ch[ch][y1][x1]);
 
120
     }
 
121
     else
 
122
     {
 
123
       x0 = x-x1;
 
124
       y0 = y-y1;
 
125
       x1 = x1-l.l;
 
126
       y1 = y1-l.t;
 
127
       x2 = (x1==x) ? x1 : x1+1;
 
128
       y2 = (y1==y) ? y1 : y1+1;
 
129
       return linear2(l.ch[ch][y1][x1],l.ch[ch][y1][x2],
 
130
                      l.ch[ch][y2][x1],l.ch[ch][y2][x2],
 
131
                      x0,y0);
 
132
     }
126
133
  }
127
134
  else
128
135
  {