Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void method378(int offset0, int offset1, int offset2, int endx0, int i1, int startx0, int gradient0, int l1, int color0, int j2, int k2, int l2, int i3, int j3, int k3, int l3, int i4, int j4, int id) {
- /* Get the unpacked texture */
- int ai[] = unpackTexture(id);
- aBoolean1463 = !aBooleanArray1475[id];
- k2 = j2 - k2;
- j3 = i3 - j3;
- i4 = l3 - i4;
- l2 -= j2;
- k3 -= i3;
- j4 -= l3;
- /* X, Y, Z ?*/
- int l4 = l2 * i3 - k3 * j2 << 14;
- int i5 = k3 * l3 - j4 * i3 << 8;
- int j5 = j4 * j2 - l2 * l3 << 5;
- /* X, Y, Z ?*/
- int k5 = k2 * i3 - j3 * j2 << 14;
- int l5 = j3 * l3 - i4 * i3 << 8;
- int i6 = i4 * j2 - k2 * l3 << 5;
- /* X, Y, Z ?*/
- int j6 = j3 * l2 - k2 * k3 << 14;
- int k6 = i4 * k3 - j3 * j4 << 8;
- int l6 = k2 * j4 - i4 * l2 << 5;
- int i7 = 0;
- int j7 = 0;
- if(offset1 != offset0)
- {
- i7 = (g - endx0 << 16) / (offset1 - offset0);
- j7 = (l1 - gradient0 << 16) / (offset1 - offset0);
- }
- int k7 = 0;
- int l7 = 0;
- if(offset2 != offset1)
- {
- k7 = (startx0 - g << 16) / (offset2 - offset1);
- l7 = (color0 - l1 << 16) / (offset2 - offset1);
- }
- int i8 = 0;
- int j8 = 0;
- if(offset2 != offset0)
- {
- i8 = (endx0 - startx0 << 16) / (offset0 - offset2);
- j8 = (gradient0 - color0 << 16) / (offset0 - offset2);
- }
- /* Case 1 */
- if(offset0 <= offset1 && offset0 <= offset2)
- {
- /* 3 height values */
- if(offset0 >= Raster.rheight)
- return;
- if(offset1 > Raster.rheight)
- offset1 = Raster.rheight;
- if(offset2 > Raster.rheight)
- offset2 = Raster.rheight;
- if(offset1 < offset2)
- {
- startx0 = endx0 <<= 16;
- color0 = gradient0 <<= 16;
- if(offset0 < 0)
- {
- startx0 -= i8 * offset0;
- endx0 -= i7 * offset0;
- color0 -= j8 * offset0;
- gradient0 -= j7 * offset0;
- offset0 = 0;
- }
- g <<= 16;
- l1 <<= 16;
- if(offset1 < 0)
- {
- i1 -= k7 * offset1;
- l1 -= l7 * offset1;
- offset1 = 0;
- }
- int k8 = offset0 - r3d_midheight;
- l4 += j5 * k8;
- k5 += i6 * k8;
- j6 += l6 * k8;
- if(offset0 != offset1 && i8 < i7 || offset0 == offset1 && i8 > k7)
- {
- offset2 -= offset1;
- offset1 -= offset0;
- offset0 = areas[offset0];
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += i8;
- endx0 += i7;
- color0 += j8;
- gradient0 += j7;
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += i8;
- endx1 += k7;
- color0 += j8;
- gradient1 += l7;
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- offset2 -= offset1;
- offset1 -= offset0;
- offset0 = areas[offset0];
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += i8;
- endx0 += i7;
- color0 += j8;
- gradient0 += j7;
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += i8;
- endx1 += k7;
- color0 += j8;
- gradient1 += l7;
- /* Add row */
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- endx1 = endx0 <<= 16;
- gradient1 = gradient0 <<= 16;
- if(offset0 < 0)
- {
- endx1 -= i8 * offset0;
- endx0 -= i7 * offset0;
- gradient1 -= j8 * offset0;
- gradient0 -= j7 * offset0;
- offset0 = 0;
- }
- startx0 <<= 16;
- color0 <<= 16;
- if(offset2 < 0)
- {
- startx0 -= k7 * offset2;
- color0 -= l7 * offset2;
- offset2 = 0;
- }
- int l8 = offset0 - r3d_midheight;
- l4 += j5 * l8;
- k5 += i6 * l8;
- j6 += l6 * l8;
- if(offset0 != offset2 && i8 < i7 || offset0 == offset2 && k7 > i7)
- {
- offset1 -= offset2;
- offset2 -= offset0;
- offset0 = areas[offset0];
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += i8;
- endx0 += i7;
- gradient1 += j8;
- gradient0 += j7;
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += k7;
- endx0 += i7;
- color0 += l7;
- gradient0 += j7;
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- offset1 -= offset2;
- offset2 -= offset0;
- offset0 = areas[offset0];
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += i8;
- endx0 += i7;
- gradient1 += j8;
- gradient0 += j7;
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset0, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += k7;
- endx0 += i7;
- color0 += l7;
- gradient0 += j7;
- offset0 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- /* Case 2 */
- if(offset1 <= offset2)
- {
- if(offset1 >= Raster.rheight)
- return;
- if(offset2 > Raster.rheight)
- offset2 = Raster.rheight;
- if(offset0 > Raster.rheight)
- offset0 = Raster.rheight;
- if(offset2 < offset0)
- {
- endx0 = endx1 <<= 16;
- gradient0 = gradient1 <<= 16;
- if(offset1 < 0)
- {
- endx0 -= i7 * offset1;
- endx1 -= k7 * offset1;
- gradient0 -= j7 * offset1;
- gradient1 -= l7 * offset1;
- offset1 = 0;
- }
- startx0 <<= 16;
- color0 <<= 16;
- if(offset2 < 0)
- {
- startx0 -= i8 * offset2;
- color0 -= j8 * offset2;
- offset2 = 0;
- }
- int i9 = offset1 - r3d_midheight;
- l4 += j5 * i9;
- k5 += i6 * i9;
- j6 += l6 * i9;
- if(offset1 != offset2 && i7 < k7 || offset1 == offset2 && i7 > i8)
- {
- offset0 -= offset2;
- offset2 -= offset1;
- offset1 = areas[offset1];
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += i7;
- endx1 += k7;
- gradient0 += j7;
- gradient1 += l7;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += i7;
- startx0 += i8;
- gradient0 += j7;
- color0 += j8;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- offset0 -= offset2;
- offset2 -= offset1;
- offset1 = areas[offset1];
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += i7;
- endx1 += k7;
- gradient0 += j7;
- gradient1 += l7;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += i7;
- startx0 += i8;
- gradient0 += j7;
- color0 += j8;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- startx0 = endx1 <<= 16;
- color0 = gradient1 <<= 16;
- if(offset1 < 0)
- {
- startx0 -= i7 * offset1;
- endx1 -= k7 * offset1;
- color0 -= j7 * offset1;
- gradient1 -= l7 * offset1;
- offset1 = 0;
- }
- endx0 <<= 16;
- gradient0 <<= 16;
- if(offset0 < 0)
- {
- endx0 -= i8 * offset0;
- gradient0 -= j8 * offset0;
- offset0 = 0;
- }
- int j9 = offset1 - r3d_midheight;
- l4 += j5 * j9;
- k5 += i6 * j9;
- j6 += l6 * j9;
- if(i7 < k7)
- {
- offset2 -= offset0;
- offset0 -= offset1;
- offset1 = areas[offset1];
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += i7;
- endx1 += k7;
- color0 += j7;
- gradient1 += l7;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += i8;
- endx1 += k7;
- gradient0 += j8;
- gradient1 += l7;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- offset2 -= offset0;
- offset0 -= offset1;
- offset1 = areas[offset1];
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- startx0 += i7;
- endx1 += k7;
- color0 += j7;
- gradient1 += l7;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset2 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset1, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += i8;
- endx1 += k7;
- gradient0 += j8;
- gradient1 += l7;
- offset1 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- /* Case 3 */
- if(offset2 >= Raster.rheight)
- return;
- if(offset0 > Raster.rheight)
- offset0 = Raster.rheight;
- if(offset1 > Raster.rheight)
- offset1 = Raster.rheight;
- if(offset0 < offset1)
- {
- endx1 = startx0 <<= 16;
- gradient1 = color0 <<= 16;
- if(offset2 < 0)
- {
- endx1 -= k7 * offset2;
- startx0 -= i8 * offset2;
- gradient1 -= l7 * offset2;
- color0 -= j8 * offset2;
- offset2 = 0;
- }
- endx0 <<= 16;
- gradient0 <<= 16;
- if(offset0 < 0)
- {
- endx0 -= i7 * offset0;
- gradient0 -= j7 * offset0;
- offset0 = 0;
- }
- int k9 = offset2 - r3d_midheight;
- l4 += j5 * k9;
- k5 += i6 * k9;
- j6 += l6 * k9;
- if(k7 < i8)
- {
- offset1 -= offset0;
- offset0 -= offset2;
- offset2 = areas[offset2];
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += k7;
- startx0 += i8;
- gradient1 += l7;
- color0 += j8;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += k7;
- endx0 += i7;
- gradient1 += l7;
- gradient0 += j7;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- offset1 -= offset0;
- offset0 -= offset2;
- offset2 = areas[offset2];
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += k7;
- startx0 += i8;
- gradient1 += l7;
- color0 += j8;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += k7;
- endx0 += i7;
- gradient1 += l7;
- gradient0 += j7;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- endx0 = startx0 <<= 16;
- gradient0 = color0 <<= 16;
- if(offset2 < 0)
- {
- endx0 -= k7 * offset2;
- startx0 -= i8 * offset2;
- gradient0 -= l7 * offset2;
- color0 -= j8 * offset2;
- offset2 = 0;
- }
- endx1 <<= 16;
- gradient1 <<= 16;
- if(offset1 < 0)
- {
- endx1 -= i7 * offset1;
- gradient1 -= j7 * offset1;
- offset1 = 0;
- }
- int l9 = offset2 - r3d_midheight;
- l4 += j5 * l9;
- k5 += i6 * l9;
- j6 += l6 * l9;
- if(k7 < i8)
- {
- offset0 -= offset1;
- offset1 -= offset2;
- offset2 = areas[offset2];
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += k7;
- startx0 += i8;
- gradient0 += l7;
- color0 += j8;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += i7;
- startx0 += i8;
- gradient1 += j7;
- color0 += j8;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- return;
- }
- offset0 -= offset1;
- offset1 -= offset2;
- offset2 = areas[offset2];
- while(--offset1 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
- endx0 += k7;
- startx0 += i8;
- gradient0 += l7;
- color0 += j8;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- while(--offset0 >= 0)
- {
- method379(Raster.output, ai, 0, 0, offset2, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
- endx1 += i7;
- startx0 += i8;
- gradient1 += j7;
- color0 += j8;
- offset2 += Raster.rmax_width;
- l4 += j5;
- k5 += i6;
- j6 += l6;
- }
- }
Add Comment
Please, Sign In to add comment