- const int step = TILESIZE;
-
- float ei1 = tri->ei1 * step;
- float ei2 = tri->ei2 * step;
- float ei3 = tri->ei3 * step;
-
- float eo1 = tri->eo1 * step;
- float eo2 = tri->eo2 * step;
- float eo3 = tri->eo3 * step;
-
- float xstep1 = -step * tri->dy12;
- float xstep2 = -step * tri->dy23;
- float xstep3 = -step * tri->dy31;
-
- float ystep1 = step * tri->dx12;
- float ystep2 = step * tri->dx23;
- float ystep3 = step * tri->dx31;
+ int c1 = (tri->c1 +
+ tri->dx12 * miny * TILE_SIZE -
+ tri->dy12 * minx * TILE_SIZE);
+ int c2 = (tri->c2 +
+ tri->dx23 * miny * TILE_SIZE -
+ tri->dy23 * minx * TILE_SIZE);
+ int c3 = (tri->c3 +
+ tri->dx31 * miny * TILE_SIZE -
+ tri->dy31 * minx * TILE_SIZE);
+
+ int ei1 = tri->ei1 << TILE_ORDER;
+ int ei2 = tri->ei2 << TILE_ORDER;
+ int ei3 = tri->ei3 << TILE_ORDER;
+
+ int eo1 = tri->eo1 << TILE_ORDER;
+ int eo2 = tri->eo2 << TILE_ORDER;
+ int eo3 = tri->eo3 << TILE_ORDER;
+
+ int xstep1 = -(tri->dy12 << TILE_ORDER);
+ int xstep2 = -(tri->dy23 << TILE_ORDER);
+ int xstep3 = -(tri->dy31 << TILE_ORDER);
+
+ int ystep1 = tri->dx12 << TILE_ORDER;
+ int ystep2 = tri->dx23 << TILE_ORDER;
+ int ystep3 = tri->dx31 << TILE_ORDER;