Advertisement
Guest User

Untitled

a guest
Mar 1st, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.61 KB | None | 0 0
  1. public void drawMinimapTile(int pixels[], int mapPixel, int z, int x,
  2. int y, int scanLength) {
  3. Ground ground = groundArray[z][x][y];
  4. if (ground == null) {
  5. return;
  6. }
  7. Class43 class43 = ground.aClass43_1311;
  8. if (class43 != null) {
  9. if (class43.anInt716 != 12345678 && client.HDLookAndFeel) {
  10. if (class43.mapColor == 0) {
  11. return;
  12. }
  13. int hs = class43.anInt716 & ~0x7f;
  14. int l1 = class43.anInt719 & 0x7f;
  15. int l2 = class43.anInt718 & 0x7f;
  16. int l3 = (class43.anInt716 & 0x7f) - l1;
  17. int l4 = (class43.anInt717 & 0x7f) - l2;
  18. l1 <<= 2;
  19. l2 <<= 2;
  20. for (int k1 = 0; k1 < 4; k1++) {
  21. pixels[mapPixel] = Rasterizer.hsl2rgb[hs | (l1 >> 2)];
  22. pixels[mapPixel + 1] = Rasterizer.hsl2rgb[hs
  23. | (l1 * 3 + l2 >> 4)];
  24. pixels[mapPixel + 2] = Rasterizer.hsl2rgb[hs
  25. | (l1 + l2 >> 3)];
  26. pixels[mapPixel + 3] = Rasterizer.hsl2rgb[hs
  27. | (l1 + l2 * 3 >> 4)];
  28. l1 += l3;
  29. l2 += l4;
  30. mapPixel += scanLength;
  31. }
  32. return;
  33. }
  34. int mapRGB = class43.mapColor;
  35. if (mapRGB == 0) {
  36. return;
  37. }
  38. for (int k1 = 0; k1 < 4; k1++) {
  39. pixels[mapPixel] = mapRGB;
  40. pixels[mapPixel + 1] = mapRGB;
  41. pixels[mapPixel + 2] = mapRGB;
  42. pixels[mapPixel + 3] = mapRGB;
  43. mapPixel += scanLength;
  44. }
  45. return;
  46. }
  47. Class40 class40 = ground.aClass40_1312;
  48. if (class40 == null) {
  49. return;
  50. }
  51. int shape = class40.anInt684;
  52. int rotation = class40.anInt685;
  53. int underlayRGB = class40.anInt686;
  54. int overlayRGB = class40.anInt687;
  55. int shadePoints[] = anIntArrayArray489[shape];
  56. int shapeIndices[] = anIntArrayArray490[rotation];
  57. int shapePtr = 0;
  58. if (class40.color62 != 12345678 && client.HDLookAndFeel) {
  59. int hs1 = class40.color62 & ~0x7f;
  60. int l11 = class40.color92 & 0x7f;
  61. int l21 = class40.color82 & 0x7f;
  62. int l31 = (class40.color62 & 0x7f) - l11;
  63. int l41 = (class40.color72 & 0x7f) - l21;
  64. l11 <<= 2;
  65. l21 <<= 2;
  66. for (int k1 = 0; k1 < 4; k1++) {
  67. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  68. pixels[mapPixel] = Rasterizer.hsl2rgb[hs1 | (l11 >> 2)];
  69. }
  70. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  71. pixels[mapPixel + 1] = Rasterizer.hsl2rgb[hs1
  72. | (l11 * 3 + l21 >> 4)];
  73. }
  74. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  75. pixels[mapPixel + 2] = Rasterizer.hsl2rgb[hs1
  76. | (l11 + l21 >> 3)];
  77. }
  78. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  79. pixels[mapPixel + 3] = Rasterizer.hsl2rgb[hs1
  80. | (l11 + l21 * 3 >> 4)];
  81. }
  82. l11 += l31;
  83. l21 += l41;
  84. mapPixel += scanLength;
  85. }
  86. if (underlayRGB != 0 && class40.color61 != 12345678) {
  87. mapPixel -= scanLength << 2;
  88. shapePtr -= 16;
  89. hs1 = class40.color61 & ~0x7f;
  90. l11 = class40.color91 & 0x7f;
  91. l21 = class40.color81 & 0x7f;
  92. l31 = (class40.color61 & 0x7f) - l11;
  93. l41 = (class40.color71 & 0x7f) - l21;
  94. l11 <<= 2;
  95. l21 <<= 2;
  96. for (int k1 = 0; k1 < 4; k1++) {
  97. if (shadePoints[shapeIndices[shapePtr++]] == 0) {
  98. pixels[mapPixel] = Rasterizer.hsl2rgb[hs1 | (l11 >> 2)];
  99. }
  100. if (shadePoints[shapeIndices[shapePtr++]] == 0) {
  101. pixels[mapPixel + 1] = Rasterizer.hsl2rgb[hs1
  102. | (l11 * 3 + l21 >> 4)];
  103. }
  104. if (shadePoints[shapeIndices[shapePtr++]] == 0) {
  105. pixels[mapPixel + 2] = Rasterizer.hsl2rgb[hs1
  106. | (l11 + l21 >> 3)];
  107. }
  108. if (shadePoints[shapeIndices[shapePtr++]] == 0) {
  109. pixels[mapPixel + 3] = Rasterizer.hsl2rgb[hs1
  110. | (l11 + l21 * 3 >> 4)];
  111. }
  112. l11 += l31;
  113. l21 += l41;
  114. mapPixel += scanLength;
  115. }
  116. }
  117. return;
  118. }
  119. if (underlayRGB != 0) {
  120. for (int i3 = 0; i3 < 4; i3++) {
  121. pixels[mapPixel] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
  122. : underlayRGB;
  123. pixels[mapPixel + 1] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
  124. : underlayRGB;
  125. pixels[mapPixel + 2] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
  126. : underlayRGB;
  127. pixels[mapPixel + 3] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
  128. : underlayRGB;
  129. mapPixel += scanLength;
  130. }
  131. return;
  132. }
  133. for (int j3 = 0; j3 < 4; j3++) {
  134. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  135. pixels[mapPixel] = overlayRGB;
  136. }
  137. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  138. pixels[mapPixel + 1] = overlayRGB;
  139. }
  140. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  141. pixels[mapPixel + 2] = overlayRGB;
  142. }
  143. if (shadePoints[shapeIndices[shapePtr++]] != 0) {
  144. pixels[mapPixel + 3] = overlayRGB;
  145. }
  146. mapPixel += scanLength;
  147. }
  148. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement