Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void drawMinimapTile(int pixels[], int mapPixel, int z, int x,
- int y, int scanLength) {
- Ground ground = groundArray[z][x][y];
- if (ground == null) {
- return;
- }
- Class43 class43 = ground.aClass43_1311;
- if (class43 != null) {
- if (class43.anInt716 != 12345678 && client.HDLookAndFeel) {
- if (class43.mapColor == 0) {
- return;
- }
- int hs = class43.anInt716 & ~0x7f;
- int l1 = class43.anInt719 & 0x7f;
- int l2 = class43.anInt718 & 0x7f;
- int l3 = (class43.anInt716 & 0x7f) - l1;
- int l4 = (class43.anInt717 & 0x7f) - l2;
- l1 <<= 2;
- l2 <<= 2;
- for (int k1 = 0; k1 < 4; k1++) {
- pixels[mapPixel] = Rasterizer.hsl2rgb[hs | (l1 >> 2)];
- pixels[mapPixel + 1] = Rasterizer.hsl2rgb[hs
- | (l1 * 3 + l2 >> 4)];
- pixels[mapPixel + 2] = Rasterizer.hsl2rgb[hs
- | (l1 + l2 >> 3)];
- pixels[mapPixel + 3] = Rasterizer.hsl2rgb[hs
- | (l1 + l2 * 3 >> 4)];
- l1 += l3;
- l2 += l4;
- mapPixel += scanLength;
- }
- return;
- }
- int mapRGB = class43.mapColor;
- if (mapRGB == 0) {
- return;
- }
- for (int k1 = 0; k1 < 4; k1++) {
- pixels[mapPixel] = mapRGB;
- pixels[mapPixel + 1] = mapRGB;
- pixels[mapPixel + 2] = mapRGB;
- pixels[mapPixel + 3] = mapRGB;
- mapPixel += scanLength;
- }
- return;
- }
- Class40 class40 = ground.aClass40_1312;
- if (class40 == null) {
- return;
- }
- int shape = class40.anInt684;
- int rotation = class40.anInt685;
- int underlayRGB = class40.anInt686;
- int overlayRGB = class40.anInt687;
- int shadePoints[] = anIntArrayArray489[shape];
- int shapeIndices[] = anIntArrayArray490[rotation];
- int shapePtr = 0;
- if (class40.color62 != 12345678 && client.HDLookAndFeel) {
- int hs1 = class40.color62 & ~0x7f;
- int l11 = class40.color92 & 0x7f;
- int l21 = class40.color82 & 0x7f;
- int l31 = (class40.color62 & 0x7f) - l11;
- int l41 = (class40.color72 & 0x7f) - l21;
- l11 <<= 2;
- l21 <<= 2;
- for (int k1 = 0; k1 < 4; k1++) {
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel] = Rasterizer.hsl2rgb[hs1 | (l11 >> 2)];
- }
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel + 1] = Rasterizer.hsl2rgb[hs1
- | (l11 * 3 + l21 >> 4)];
- }
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel + 2] = Rasterizer.hsl2rgb[hs1
- | (l11 + l21 >> 3)];
- }
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel + 3] = Rasterizer.hsl2rgb[hs1
- | (l11 + l21 * 3 >> 4)];
- }
- l11 += l31;
- l21 += l41;
- mapPixel += scanLength;
- }
- if (underlayRGB != 0 && class40.color61 != 12345678) {
- mapPixel -= scanLength << 2;
- shapePtr -= 16;
- hs1 = class40.color61 & ~0x7f;
- l11 = class40.color91 & 0x7f;
- l21 = class40.color81 & 0x7f;
- l31 = (class40.color61 & 0x7f) - l11;
- l41 = (class40.color71 & 0x7f) - l21;
- l11 <<= 2;
- l21 <<= 2;
- for (int k1 = 0; k1 < 4; k1++) {
- if (shadePoints[shapeIndices[shapePtr++]] == 0) {
- pixels[mapPixel] = Rasterizer.hsl2rgb[hs1 | (l11 >> 2)];
- }
- if (shadePoints[shapeIndices[shapePtr++]] == 0) {
- pixels[mapPixel + 1] = Rasterizer.hsl2rgb[hs1
- | (l11 * 3 + l21 >> 4)];
- }
- if (shadePoints[shapeIndices[shapePtr++]] == 0) {
- pixels[mapPixel + 2] = Rasterizer.hsl2rgb[hs1
- | (l11 + l21 >> 3)];
- }
- if (shadePoints[shapeIndices[shapePtr++]] == 0) {
- pixels[mapPixel + 3] = Rasterizer.hsl2rgb[hs1
- | (l11 + l21 * 3 >> 4)];
- }
- l11 += l31;
- l21 += l41;
- mapPixel += scanLength;
- }
- }
- return;
- }
- if (underlayRGB != 0) {
- for (int i3 = 0; i3 < 4; i3++) {
- pixels[mapPixel] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
- : underlayRGB;
- pixels[mapPixel + 1] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
- : underlayRGB;
- pixels[mapPixel + 2] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
- : underlayRGB;
- pixels[mapPixel + 3] = shadePoints[shapeIndices[shapePtr++]] != 0 ? overlayRGB
- : underlayRGB;
- mapPixel += scanLength;
- }
- return;
- }
- for (int j3 = 0; j3 < 4; j3++) {
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel] = overlayRGB;
- }
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel + 1] = overlayRGB;
- }
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel + 2] = overlayRGB;
- }
- if (shadePoints[shapeIndices[shapePtr++]] != 0) {
- pixels[mapPixel + 3] = overlayRGB;
- }
- mapPixel += scanLength;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement