Guest User

Untitled

a guest
Dec 11th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.49 KB | None | 0 0
  1. 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) {
  2. /* Get the unpacked texture */
  3. int ai[] = unpackTexture(id);
  4. aBoolean1463 = !aBooleanArray1475[id];
  5. k2 = j2 - k2;
  6. j3 = i3 - j3;
  7. i4 = l3 - i4;
  8. l2 -= j2;
  9. k3 -= i3;
  10. j4 -= l3;
  11.  
  12. /* X, Y, Z ?*/
  13. int l4 = l2 * i3 - k3 * j2 << 14;
  14. int i5 = k3 * l3 - j4 * i3 << 8;
  15. int j5 = j4 * j2 - l2 * l3 << 5;
  16.  
  17. /* X, Y, Z ?*/
  18. int k5 = k2 * i3 - j3 * j2 << 14;
  19. int l5 = j3 * l3 - i4 * i3 << 8;
  20. int i6 = i4 * j2 - k2 * l3 << 5;
  21.  
  22. /* X, Y, Z ?*/
  23. int j6 = j3 * l2 - k2 * k3 << 14;
  24. int k6 = i4 * k3 - j3 * j4 << 8;
  25. int l6 = k2 * j4 - i4 * l2 << 5;
  26.  
  27. int i7 = 0;
  28. int j7 = 0;
  29. if(offset1 != offset0)
  30. {
  31. i7 = (g - endx0 << 16) / (offset1 - offset0);
  32. j7 = (l1 - gradient0 << 16) / (offset1 - offset0);
  33. }
  34. int k7 = 0;
  35. int l7 = 0;
  36. if(offset2 != offset1)
  37. {
  38. k7 = (startx0 - g << 16) / (offset2 - offset1);
  39. l7 = (color0 - l1 << 16) / (offset2 - offset1);
  40. }
  41. int i8 = 0;
  42. int j8 = 0;
  43. if(offset2 != offset0)
  44. {
  45. i8 = (endx0 - startx0 << 16) / (offset0 - offset2);
  46. j8 = (gradient0 - color0 << 16) / (offset0 - offset2);
  47. }
  48. /* Case 1 */
  49. if(offset0 <= offset1 && offset0 <= offset2)
  50. {
  51. /* 3 height values */
  52. if(offset0 >= Raster.rheight)
  53. return;
  54. if(offset1 > Raster.rheight)
  55. offset1 = Raster.rheight;
  56. if(offset2 > Raster.rheight)
  57. offset2 = Raster.rheight;
  58. if(offset1 < offset2)
  59. {
  60. startx0 = endx0 <<= 16;
  61. color0 = gradient0 <<= 16;
  62. if(offset0 < 0)
  63. {
  64. startx0 -= i8 * offset0;
  65. endx0 -= i7 * offset0;
  66. color0 -= j8 * offset0;
  67. gradient0 -= j7 * offset0;
  68. offset0 = 0;
  69. }
  70. g <<= 16;
  71. l1 <<= 16;
  72. if(offset1 < 0)
  73. {
  74. i1 -= k7 * offset1;
  75. l1 -= l7 * offset1;
  76. offset1 = 0;
  77. }
  78. int k8 = offset0 - r3d_midheight;
  79. l4 += j5 * k8;
  80. k5 += i6 * k8;
  81. j6 += l6 * k8;
  82. if(offset0 != offset1 && i8 < i7 || offset0 == offset1 && i8 > k7)
  83. {
  84. offset2 -= offset1;
  85. offset1 -= offset0;
  86. offset0 = areas[offset0];
  87. while(--offset1 >= 0)
  88. {
  89. method379(Raster.output, ai, 0, 0, offset0, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  90. startx0 += i8;
  91. endx0 += i7;
  92. color0 += j8;
  93. gradient0 += j7;
  94. offset0 += Raster.rmax_width;
  95. l4 += j5;
  96. k5 += i6;
  97. j6 += l6;
  98. }
  99. while(--offset2 >= 0)
  100. {
  101. method379(Raster.output, ai, 0, 0, offset0, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  102. startx0 += i8;
  103. endx1 += k7;
  104. color0 += j8;
  105. gradient1 += l7;
  106. offset0 += Raster.rmax_width;
  107. l4 += j5;
  108. k5 += i6;
  109. j6 += l6;
  110. }
  111. return;
  112. }
  113. offset2 -= offset1;
  114. offset1 -= offset0;
  115. offset0 = areas[offset0];
  116. while(--offset1 >= 0)
  117. {
  118. method379(Raster.output, ai, 0, 0, offset0, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  119. startx0 += i8;
  120. endx0 += i7;
  121. color0 += j8;
  122. gradient0 += j7;
  123. offset0 += Raster.rmax_width;
  124. l4 += j5;
  125. k5 += i6;
  126. j6 += l6;
  127. }
  128. while(--offset2 >= 0)
  129. {
  130. method379(Raster.output, ai, 0, 0, offset0, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  131. startx0 += i8;
  132. endx1 += k7;
  133. color0 += j8;
  134. gradient1 += l7;
  135. /* Add row */
  136. offset0 += Raster.rmax_width;
  137. l4 += j5;
  138. k5 += i6;
  139. j6 += l6;
  140. }
  141. return;
  142. }
  143. endx1 = endx0 <<= 16;
  144. gradient1 = gradient0 <<= 16;
  145. if(offset0 < 0)
  146. {
  147. endx1 -= i8 * offset0;
  148. endx0 -= i7 * offset0;
  149. gradient1 -= j8 * offset0;
  150. gradient0 -= j7 * offset0;
  151. offset0 = 0;
  152. }
  153. startx0 <<= 16;
  154. color0 <<= 16;
  155. if(offset2 < 0)
  156. {
  157. startx0 -= k7 * offset2;
  158. color0 -= l7 * offset2;
  159. offset2 = 0;
  160. }
  161. int l8 = offset0 - r3d_midheight;
  162. l4 += j5 * l8;
  163. k5 += i6 * l8;
  164. j6 += l6 * l8;
  165. if(offset0 != offset2 && i8 < i7 || offset0 == offset2 && k7 > i7)
  166. {
  167. offset1 -= offset2;
  168. offset2 -= offset0;
  169. offset0 = areas[offset0];
  170. while(--offset2 >= 0)
  171. {
  172. method379(Raster.output, ai, 0, 0, offset0, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  173. endx1 += i8;
  174. endx0 += i7;
  175. gradient1 += j8;
  176. gradient0 += j7;
  177. offset0 += Raster.rmax_width;
  178. l4 += j5;
  179. k5 += i6;
  180. j6 += l6;
  181. }
  182. while(--offset1 >= 0)
  183. {
  184. method379(Raster.output, ai, 0, 0, offset0, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  185. startx0 += k7;
  186. endx0 += i7;
  187. color0 += l7;
  188. gradient0 += j7;
  189. offset0 += Raster.rmax_width;
  190. l4 += j5;
  191. k5 += i6;
  192. j6 += l6;
  193. }
  194. return;
  195. }
  196. offset1 -= offset2;
  197. offset2 -= offset0;
  198. offset0 = areas[offset0];
  199. while(--offset2 >= 0)
  200. {
  201. method379(Raster.output, ai, 0, 0, offset0, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  202. endx1 += i8;
  203. endx0 += i7;
  204. gradient1 += j8;
  205. gradient0 += j7;
  206. offset0 += Raster.rmax_width;
  207. l4 += j5;
  208. k5 += i6;
  209. j6 += l6;
  210. }
  211. while(--offset1 >= 0)
  212. {
  213. method379(Raster.output, ai, 0, 0, offset0, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  214. startx0 += k7;
  215. endx0 += i7;
  216. color0 += l7;
  217. gradient0 += j7;
  218. offset0 += Raster.rmax_width;
  219. l4 += j5;
  220. k5 += i6;
  221. j6 += l6;
  222. }
  223. return;
  224. }
  225. /* Case 2 */
  226. if(offset1 <= offset2)
  227. {
  228. if(offset1 >= Raster.rheight)
  229. return;
  230. if(offset2 > Raster.rheight)
  231. offset2 = Raster.rheight;
  232. if(offset0 > Raster.rheight)
  233. offset0 = Raster.rheight;
  234. if(offset2 < offset0)
  235. {
  236. endx0 = endx1 <<= 16;
  237. gradient0 = gradient1 <<= 16;
  238. if(offset1 < 0)
  239. {
  240. endx0 -= i7 * offset1;
  241. endx1 -= k7 * offset1;
  242. gradient0 -= j7 * offset1;
  243. gradient1 -= l7 * offset1;
  244. offset1 = 0;
  245. }
  246. startx0 <<= 16;
  247. color0 <<= 16;
  248. if(offset2 < 0)
  249. {
  250. startx0 -= i8 * offset2;
  251. color0 -= j8 * offset2;
  252. offset2 = 0;
  253. }
  254. int i9 = offset1 - r3d_midheight;
  255. l4 += j5 * i9;
  256. k5 += i6 * i9;
  257. j6 += l6 * i9;
  258. if(offset1 != offset2 && i7 < k7 || offset1 == offset2 && i7 > i8)
  259. {
  260.  
  261. offset0 -= offset2;
  262. offset2 -= offset1;
  263. offset1 = areas[offset1];
  264. while(--offset2 >= 0)
  265. {
  266. method379(Raster.output, ai, 0, 0, offset1, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  267. endx0 += i7;
  268. endx1 += k7;
  269. gradient0 += j7;
  270. gradient1 += l7;
  271. offset1 += Raster.rmax_width;
  272. l4 += j5;
  273. k5 += i6;
  274. j6 += l6;
  275. }
  276. while(--offset0 >= 0)
  277. {
  278. method379(Raster.output, ai, 0, 0, offset1, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  279. endx0 += i7;
  280. startx0 += i8;
  281. gradient0 += j7;
  282. color0 += j8;
  283. offset1 += Raster.rmax_width;
  284. l4 += j5;
  285. k5 += i6;
  286. j6 += l6;
  287. }
  288. return;
  289. }
  290.  
  291. offset0 -= offset2;
  292. offset2 -= offset1;
  293. offset1 = areas[offset1];
  294. while(--offset2 >= 0)
  295. {
  296. method379(Raster.output, ai, 0, 0, offset1, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  297. endx0 += i7;
  298. endx1 += k7;
  299. gradient0 += j7;
  300. gradient1 += l7;
  301. offset1 += Raster.rmax_width;
  302. l4 += j5;
  303. k5 += i6;
  304. j6 += l6;
  305. }
  306. while(--offset0 >= 0)
  307. {
  308. method379(Raster.output, ai, 0, 0, offset1, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  309. endx0 += i7;
  310. startx0 += i8;
  311. gradient0 += j7;
  312. color0 += j8;
  313. offset1 += Raster.rmax_width;
  314. l4 += j5;
  315. k5 += i6;
  316. j6 += l6;
  317. }
  318. return;
  319. }
  320. startx0 = endx1 <<= 16;
  321. color0 = gradient1 <<= 16;
  322. if(offset1 < 0)
  323. {
  324. startx0 -= i7 * offset1;
  325. endx1 -= k7 * offset1;
  326. color0 -= j7 * offset1;
  327. gradient1 -= l7 * offset1;
  328. offset1 = 0;
  329. }
  330. endx0 <<= 16;
  331. gradient0 <<= 16;
  332. if(offset0 < 0)
  333. {
  334. endx0 -= i8 * offset0;
  335. gradient0 -= j8 * offset0;
  336. offset0 = 0;
  337. }
  338. int j9 = offset1 - r3d_midheight;
  339. l4 += j5 * j9;
  340. k5 += i6 * j9;
  341. j6 += l6 * j9;
  342. if(i7 < k7)
  343. {
  344. offset2 -= offset0;
  345. offset0 -= offset1;
  346. offset1 = areas[offset1];
  347. while(--offset0 >= 0)
  348. {
  349. method379(Raster.output, ai, 0, 0, offset1, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  350. startx0 += i7;
  351. endx1 += k7;
  352. color0 += j7;
  353. gradient1 += l7;
  354. offset1 += Raster.rmax_width;
  355. l4 += j5;
  356. k5 += i6;
  357. j6 += l6;
  358. }
  359. while(--offset2 >= 0)
  360. {
  361. method379(Raster.output, ai, 0, 0, offset1, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  362. endx0 += i8;
  363. endx1 += k7;
  364. gradient0 += j8;
  365. gradient1 += l7;
  366. offset1 += Raster.rmax_width;
  367. l4 += j5;
  368. k5 += i6;
  369. j6 += l6;
  370. }
  371. return;
  372. }
  373. offset2 -= offset0;
  374. offset0 -= offset1;
  375. offset1 = areas[offset1];
  376. while(--offset0 >= 0)
  377. {
  378. method379(Raster.output, ai, 0, 0, offset1, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  379. startx0 += i7;
  380. endx1 += k7;
  381. color0 += j7;
  382. gradient1 += l7;
  383. offset1 += Raster.rmax_width;
  384. l4 += j5;
  385. k5 += i6;
  386. j6 += l6;
  387. }
  388. while(--offset2 >= 0)
  389. {
  390. method379(Raster.output, ai, 0, 0, offset1, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  391. endx0 += i8;
  392. endx1 += k7;
  393. gradient0 += j8;
  394. gradient1 += l7;
  395. offset1 += Raster.rmax_width;
  396. l4 += j5;
  397. k5 += i6;
  398. j6 += l6;
  399. }
  400. return;
  401. }
  402. /* Case 3 */
  403. if(offset2 >= Raster.rheight)
  404. return;
  405. if(offset0 > Raster.rheight)
  406. offset0 = Raster.rheight;
  407. if(offset1 > Raster.rheight)
  408. offset1 = Raster.rheight;
  409. if(offset0 < offset1)
  410. {
  411. endx1 = startx0 <<= 16;
  412. gradient1 = color0 <<= 16;
  413. if(offset2 < 0)
  414. {
  415. endx1 -= k7 * offset2;
  416. startx0 -= i8 * offset2;
  417. gradient1 -= l7 * offset2;
  418. color0 -= j8 * offset2;
  419. offset2 = 0;
  420. }
  421. endx0 <<= 16;
  422. gradient0 <<= 16;
  423. if(offset0 < 0)
  424. {
  425. endx0 -= i7 * offset0;
  426. gradient0 -= j7 * offset0;
  427. offset0 = 0;
  428. }
  429. int k9 = offset2 - r3d_midheight;
  430. l4 += j5 * k9;
  431. k5 += i6 * k9;
  432. j6 += l6 * k9;
  433. if(k7 < i8)
  434. {
  435. offset1 -= offset0;
  436. offset0 -= offset2;
  437. offset2 = areas[offset2];
  438. while(--offset0 >= 0)
  439. {
  440. method379(Raster.output, ai, 0, 0, offset2, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  441. endx1 += k7;
  442. startx0 += i8;
  443. gradient1 += l7;
  444. color0 += j8;
  445. offset2 += Raster.rmax_width;
  446. l4 += j5;
  447. k5 += i6;
  448. j6 += l6;
  449. }
  450. while(--offset1 >= 0)
  451. {
  452. method379(Raster.output, ai, 0, 0, offset2, endx1 >> 16, endx0 >> 16, gradient1 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  453. endx1 += k7;
  454. endx0 += i7;
  455. gradient1 += l7;
  456. gradient0 += j7;
  457. offset2 += Raster.rmax_width;
  458. l4 += j5;
  459. k5 += i6;
  460. j6 += l6;
  461. }
  462. return;
  463. }
  464. offset1 -= offset0;
  465. offset0 -= offset2;
  466. offset2 = areas[offset2];
  467. while(--offset0 >= 0)
  468. {
  469. method379(Raster.output, ai, 0, 0, offset2, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  470. endx1 += k7;
  471. startx0 += i8;
  472. gradient1 += l7;
  473. color0 += j8;
  474. offset2 += Raster.rmax_width;
  475. l4 += j5;
  476. k5 += i6;
  477. j6 += l6;
  478. }
  479. while(--offset1 >= 0)
  480. {
  481. method379(Raster.output, ai, 0, 0, offset2, endx0 >> 16, endx1 >> 16, gradient0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  482. endx1 += k7;
  483. endx0 += i7;
  484. gradient1 += l7;
  485. gradient0 += j7;
  486. offset2 += Raster.rmax_width;
  487. l4 += j5;
  488. k5 += i6;
  489. j6 += l6;
  490. }
  491. return;
  492. }
  493. endx0 = startx0 <<= 16;
  494. gradient0 = color0 <<= 16;
  495. if(offset2 < 0)
  496. {
  497. endx0 -= k7 * offset2;
  498. startx0 -= i8 * offset2;
  499. gradient0 -= l7 * offset2;
  500. color0 -= j8 * offset2;
  501. offset2 = 0;
  502. }
  503. endx1 <<= 16;
  504. gradient1 <<= 16;
  505. if(offset1 < 0)
  506. {
  507. endx1 -= i7 * offset1;
  508. gradient1 -= j7 * offset1;
  509. offset1 = 0;
  510. }
  511. int l9 = offset2 - r3d_midheight;
  512. l4 += j5 * l9;
  513. k5 += i6 * l9;
  514. j6 += l6 * l9;
  515. if(k7 < i8)
  516. {
  517. offset0 -= offset1;
  518. offset1 -= offset2;
  519. offset2 = areas[offset2];
  520. while(--offset1 >= 0)
  521. {
  522. method379(Raster.output, ai, 0, 0, offset2, endx0 >> 16, startx0 >> 16, gradient0 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  523. endx0 += k7;
  524. startx0 += i8;
  525. gradient0 += l7;
  526. color0 += j8;
  527. offset2 += Raster.rmax_width;
  528. l4 += j5;
  529. k5 += i6;
  530. j6 += l6;
  531. }
  532. while(--offset0 >= 0)
  533. {
  534. method379(Raster.output, ai, 0, 0, offset2, endx1 >> 16, startx0 >> 16, gradient1 >> 8, color0 >> 8, l4, k5, j6, i5, l5, k6);
  535. endx1 += i7;
  536. startx0 += i8;
  537. gradient1 += j7;
  538. color0 += j8;
  539. offset2 += Raster.rmax_width;
  540. l4 += j5;
  541. k5 += i6;
  542. j6 += l6;
  543. }
  544. return;
  545. }
  546. offset0 -= offset1;
  547. offset1 -= offset2;
  548. offset2 = areas[offset2];
  549. while(--offset1 >= 0)
  550. {
  551. method379(Raster.output, ai, 0, 0, offset2, startx0 >> 16, endx0 >> 16, color0 >> 8, gradient0 >> 8, l4, k5, j6, i5, l5, k6);
  552. endx0 += k7;
  553. startx0 += i8;
  554. gradient0 += l7;
  555. color0 += j8;
  556. offset2 += Raster.rmax_width;
  557. l4 += j5;
  558. k5 += i6;
  559. j6 += l6;
  560. }
  561. while(--offset0 >= 0)
  562. {
  563. method379(Raster.output, ai, 0, 0, offset2, startx0 >> 16, endx1 >> 16, color0 >> 8, gradient1 >> 8, l4, k5, j6, i5, l5, k6);
  564. endx1 += i7;
  565. startx0 += i8;
  566. gradient1 += j7;
  567. color0 += j8;
  568. offset2 += Raster.rmax_width;
  569. l4 += j5;
  570. k5 += i6;
  571. j6 += l6;
  572. }
  573. }
Add Comment
Please, Sign In to add comment