bump
|
can anyone help me thanks to add the snow floors thanks
bump
bump
bump
Just use the "search" theres bunch of posts how to change the floorcolor to white... https://www.rune-server.ee/showthrea...=1#post2985062
we dont have flo we only have floor
What revision?
we running 126 data vencillio
here my floor code then
Code:/* */ /* */ /* */ public final class Floor { /* */ public static Floor[] cache; /* */ public int rgb; /* */ public int texture; /* */ public boolean occlude; /* */ public int hue; /* */ public int saturation; /* */ public int lumiance; /* */ public int blendHue; /* */ public int blendHueMultiplier; /* */ public int hslToRgb; /* */ /* 15 */ private Floor() { this.texture = -1; /* 16 */ this.occlude = true; /* */ } /* */ /* */ public static void unpackConfig(StreamLoader streamLoader) { /* 20 */ Stream stream = new Stream(streamLoader.getDataForName("flo.dat")); /* */ /* 22 */ int cacheSize = stream.readUnsignedWord(); /* 23 */ System.out.println("Loaded underlay floors: " + cacheSize); /* 24 */ if (cache == null) { /* 25 */ cache = new Floor[cacheSize]; /* */ } /* 27 */ for (int j = 0; j < cacheSize; j++) { /* 28 */ if (cache[j] == null) { /* 29 */ cache[j] = new Floor(); /* */ } /* 31 */ cache[j].readValues(stream); /* */ } /* */ } /* */ /* */ private void readValues(Stream stream) { /* */ for (;;) { /* 37 */ int opcode = stream.readUnsignedByte(); /* 38 */ if (opcode == 0)/* 39 */ return; /* 40 */ if (opcode == 1) { /* 41 */ this.rgb = stream.read3Bytes(); /* 42 */ rgbToHsl(this.rgb); /* 43 */ } else if (opcode == 2) { /* 44 */ this.texture = stream.readUnsignedByte(); /* 45 */ } else if (opcode != 3) /* */ { /* 47 */ if (opcode == 5) { /* 48 */ this.occlude = false; /* 49 */ } else if (opcode == 6) { /* 50 */ stream.readString(); /* 51 */ } else if (opcode == 7) { /* 52 */ int h = this.hue; /* 53 */ int s = this.saturation; /* 54 */ int l = this.lumiance; /* 55 */ int blend = this.blendHue; /* 56 */ int rgb = stream.read3Bytes(); /* 57 */ rgbToHsl(rgb); /* 58 */ this.hue = h; /* 59 */ this.saturation = s; /* 60 */ this.lumiance = l; /* 61 */ this.blendHue = blend; /* 62 */ this.blendHueMultiplier = blend; /* */ } else { /* 64 */ System.out.println("Error unrecognised config code: " + opcode); /* */ } /* */ } /* */ } /* */ } /* */ /* 70 */ private void rgbToHsl(int rgb) { double r = (rgb >> 16 & 0xFF) / 256.0D; /* 71 */ double g = (rgb >> 8 & 0xFF) / 256.0D; /* 72 */ double b = (rgb & 0xFF) / 256.0D; /* 73 */ double min = r; /* 74 */ if (g < min) { /* 75 */ min = g; /* */ } /* 77 */ if (b < min) { /* 78 */ min = b; /* */ } /* 80 */ double max = r; /* 81 */ if (g > max) { /* 82 */ max = g; /* */ } /* 84 */ if (b > max) { /* 85 */ max = b; /* */ } /* 87 */ double h = 0.0D; /* 88 */ double s = 0.0D; /* 89 */ double l = (min + max) / 2.0D; /* 90 */ if (min != max) { /* 91 */ if (l < 0.5D) { /* 92 */ s = (max - min) / (max + min); /* */ } /* 94 */ if (l >= 0.5D) { /* 95 */ s = (max - min) / (2.0D - max - min); /* */ } /* 97 */ if (r == max) { /* 98 */ h = (g - b) / (max - min); /* 99 */ } else if (g == max) { /* 100 */ h = 2.0D + (b - r) / (max - min); /* 101 */ } else if (b == max) { /* 102 */ h = 4.0D + (r - g) / (max - min); /* */ } /* */ } /* 105 */ h /= 6.0D; /* 106 */ this.hue = ((int) (h * 256.0D)); /* 107 */ this.saturation = ((int) (s * 256.0D)); /* 108 */ this.lumiance = ((int) (l * 256.0D)); /* 109 */ if (l > 0.5D) { /* 110 */ this.blendHueMultiplier = ((int) ((1.0D - l) * s * 512.0D)); /* */ } else { /* 112 */ this.blendHueMultiplier = ((int) (l * s * 512.0D)); /* */ } /* 114 */ if (this.blendHueMultiplier < 1) { /* 115 */ this.blendHueMultiplier = 1; /* */ } /* 117 */ this.blendHue = ((int) (h * this.blendHueMultiplier)); /* 118 */ this.hslToRgb = hslToRgb(this.hue, this.saturation, this.lumiance); /* */ } /* */ /* */ private int hslToRgb(int h, int s, int l) { /* 122 */ if (l > 179) { /* 123 */ s /= 2; /* */ } /* 125 */ if (l > 192) { /* 126 */ s /= 2; /* */ } /* 128 */ if (l > 217) { /* 129 */ s /= 2; /* */ } /* 131 */ if (l > 243) { /* 132 */ s /= 2; /* */ } /* 134 */ int rgb = (h / 4 << 10) + (s / 32 << 7) + l / 2; /* 135 */ return rgb; /* */ } /* */ }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |