Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -1088,325 +1088,314 @@ public class ModelLoader
|
||||
|
||||
}
|
||||
|
||||
void decodeOldFormat(ModelDefinition def, byte[] var1)
|
||||
void decodeOldFormat(ModelDefinition def, byte[] inputData)
|
||||
{
|
||||
boolean var2 = false;
|
||||
boolean var3 = false;
|
||||
InputStream var4 = new InputStream(var1);
|
||||
InputStream var5 = new InputStream(var1);
|
||||
InputStream var6 = new InputStream(var1);
|
||||
InputStream var7 = new InputStream(var1);
|
||||
InputStream var8 = new InputStream(var1);
|
||||
var4.setOffset(var1.length - 18);
|
||||
int var9 = var4.readUnsignedShort();
|
||||
int var10 = var4.readUnsignedShort();
|
||||
int var11 = var4.readUnsignedByte();
|
||||
int var12 = var4.readUnsignedByte();
|
||||
int var13 = var4.readUnsignedByte();
|
||||
int var14 = var4.readUnsignedByte();
|
||||
int var15 = var4.readUnsignedByte();
|
||||
int var16 = var4.readUnsignedByte();
|
||||
int var17 = var4.readUnsignedShort();
|
||||
int var18 = var4.readUnsignedShort();
|
||||
int var19 = var4.readUnsignedShort();
|
||||
int var20 = var4.readUnsignedShort();
|
||||
byte var21 = 0;
|
||||
int var22 = var21 + var9;
|
||||
int var23 = var22;
|
||||
var22 += var10;
|
||||
int var24 = var22;
|
||||
if (var13 == 255)
|
||||
boolean usesFaceRenderTypes = false;
|
||||
boolean usesFaceTextures = false;
|
||||
InputStream stream1 = new InputStream(inputData);
|
||||
InputStream stream2 = new InputStream(inputData);
|
||||
InputStream stream3 = new InputStream(inputData);
|
||||
InputStream stream4 = new InputStream(inputData);
|
||||
InputStream stream5 = new InputStream(inputData);
|
||||
stream1.setOffset(inputData.length - 18);
|
||||
int vertexCount = stream1.readUnsignedShort();
|
||||
int faceCount = stream1.readUnsignedShort();
|
||||
int textureCount = stream1.readUnsignedByte();
|
||||
int isTextured = stream1.readUnsignedByte();
|
||||
int faceRenderPriority = stream1.readUnsignedByte();
|
||||
int hasFaceTransparencies = stream1.readUnsignedByte();
|
||||
int hasPackedTransparencyVertexGroups = stream1.readUnsignedByte();
|
||||
int hasPackedVertexGroups = stream1.readUnsignedByte();
|
||||
int vertexXDataByteCount = stream1.readUnsignedShort();
|
||||
int vertexYDataByteCount = stream1.readUnsignedShort();
|
||||
int vertezZDataByteCount = stream1.readUnsignedShort();
|
||||
int faceIndexDataByteCount = stream1.readUnsignedShort();
|
||||
byte offsetOfVertexFlags = 0;
|
||||
int dataOffset = offsetOfVertexFlags + vertexCount;
|
||||
int offsetOfFaceIndexCompressionTypes = dataOffset;
|
||||
dataOffset += faceCount;
|
||||
int offsetOfFaceRenderPriorities = dataOffset;
|
||||
if (faceRenderPriority == 255)
|
||||
{
|
||||
var22 += var10;
|
||||
dataOffset += faceCount;
|
||||
}
|
||||
|
||||
int var25 = var22;
|
||||
if (var15 == 1)
|
||||
int offsetOfPackedTransparencyVertexGroups = dataOffset;
|
||||
if (hasPackedTransparencyVertexGroups == 1)
|
||||
{
|
||||
var22 += var10;
|
||||
dataOffset += faceCount;
|
||||
}
|
||||
|
||||
int var26 = var22;
|
||||
if (var12 == 1)
|
||||
int offsetOfFaceTextureFlags = dataOffset;
|
||||
if (isTextured == 1)
|
||||
{
|
||||
var22 += var10;
|
||||
dataOffset += faceCount;
|
||||
}
|
||||
|
||||
int var27 = var22;
|
||||
if (var16 == 1)
|
||||
int offsetOfPackedVertexGroups = dataOffset;
|
||||
if (hasPackedVertexGroups == 1)
|
||||
{
|
||||
var22 += var9;
|
||||
dataOffset += vertexCount;
|
||||
}
|
||||
|
||||
int var28 = var22;
|
||||
if (var14 == 1)
|
||||
int offsetOfFaceTransparencies = dataOffset;
|
||||
if (hasFaceTransparencies == 1)
|
||||
{
|
||||
var22 += var10;
|
||||
dataOffset += faceCount;
|
||||
}
|
||||
|
||||
int var29 = var22;
|
||||
var22 += var20;
|
||||
int var30 = var22;
|
||||
var22 += var10 * 2;
|
||||
int var31 = var22;
|
||||
var22 += var11 * 6;
|
||||
int var32 = var22;
|
||||
var22 += var17;
|
||||
int var33 = var22;
|
||||
var22 += var18;
|
||||
int var10000 = var22 + var19;
|
||||
def.vertexCount = var9;
|
||||
def.faceCount = var10;
|
||||
def.numTextureFaces = var11;
|
||||
def.vertexX = new int[var9];
|
||||
def.vertexY = new int[var9];
|
||||
def.vertexZ = new int[var9];
|
||||
def.faceIndices1 = new int[var10];
|
||||
def.faceIndices2 = new int[var10];
|
||||
def.faceIndices3 = new int[var10];
|
||||
if (var11 > 0)
|
||||
int offsetOfFaceIndexData = dataOffset;
|
||||
dataOffset += faceIndexDataByteCount;
|
||||
int offsetOfFaceColorsOrFaceTextures = dataOffset;
|
||||
dataOffset += faceCount * 2;
|
||||
int offsetOfTextureIndices = dataOffset;
|
||||
dataOffset += textureCount * 6;
|
||||
int offsetOfVertexXData = dataOffset;
|
||||
dataOffset += vertexXDataByteCount;
|
||||
int offsetOfVertexYData = dataOffset;
|
||||
dataOffset += vertexYDataByteCount;
|
||||
int offsetOfVertexZData = dataOffset;
|
||||
def.vertexCount = vertexCount;
|
||||
def.faceCount = faceCount;
|
||||
def.numTextureFaces = textureCount;
|
||||
def.vertexX = new int[vertexCount];
|
||||
def.vertexY = new int[vertexCount];
|
||||
def.vertexZ = new int[vertexCount];
|
||||
def.faceIndices1 = new int[faceCount];
|
||||
def.faceIndices2 = new int[faceCount];
|
||||
def.faceIndices3 = new int[faceCount];
|
||||
if (textureCount > 0)
|
||||
{
|
||||
def.textureRenderTypes = new byte[var11];
|
||||
def.texIndices1 = new short[var11];
|
||||
def.texIndices2 = new short[var11];
|
||||
def.texIndices3 = new short[var11];
|
||||
def.textureRenderTypes = new byte[textureCount];
|
||||
def.texIndices1 = new short[textureCount];
|
||||
def.texIndices2 = new short[textureCount];
|
||||
def.texIndices3 = new short[textureCount];
|
||||
}
|
||||
|
||||
if (var16 == 1)
|
||||
if (hasPackedVertexGroups == 1)
|
||||
{
|
||||
def.packedVertexGroups = new int[var9];
|
||||
def.packedVertexGroups = new int[vertexCount];
|
||||
}
|
||||
|
||||
if (var12 == 1)
|
||||
if (isTextured == 1)
|
||||
{
|
||||
def.faceRenderTypes = new byte[var10];
|
||||
def.textureCoords = new byte[var10];
|
||||
def.faceTextures = new short[var10];
|
||||
def.faceRenderTypes = new byte[faceCount];
|
||||
def.textureCoords = new byte[faceCount];
|
||||
def.faceTextures = new short[faceCount];
|
||||
}
|
||||
|
||||
if (var13 == 255)
|
||||
if (faceRenderPriority == 255)
|
||||
{
|
||||
def.faceRenderPriorities = new byte[var10];
|
||||
def.faceRenderPriorities = new byte[faceCount];
|
||||
}
|
||||
else
|
||||
{
|
||||
def.priority = (byte) var13;
|
||||
def.priority = (byte) faceRenderPriority;
|
||||
}
|
||||
|
||||
if (var14 == 1)
|
||||
if (hasFaceTransparencies == 1)
|
||||
{
|
||||
def.faceTransparencies = new byte[var10];
|
||||
def.faceTransparencies = new byte[faceCount];
|
||||
}
|
||||
|
||||
if (var15 == 1)
|
||||
if (hasPackedTransparencyVertexGroups == 1)
|
||||
{
|
||||
def.packedTransparencyVertexGroups = new int[var10];
|
||||
def.packedTransparencyVertexGroups = new int[faceCount];
|
||||
}
|
||||
|
||||
def.faceColors = new short[var10];
|
||||
var4.setOffset(var21);
|
||||
var5.setOffset(var32);
|
||||
var6.setOffset(var33);
|
||||
var7.setOffset(var22);
|
||||
var8.setOffset(var27);
|
||||
int var35 = 0;
|
||||
int var36 = 0;
|
||||
int var37 = 0;
|
||||
def.faceColors = new short[faceCount];
|
||||
stream1.setOffset(offsetOfVertexFlags);
|
||||
stream2.setOffset(offsetOfVertexXData);
|
||||
stream3.setOffset(offsetOfVertexYData);
|
||||
stream4.setOffset(offsetOfVertexZData);
|
||||
stream5.setOffset(offsetOfPackedVertexGroups);
|
||||
int previousVertexX = 0;
|
||||
int previousVertexY = 0;
|
||||
int previousVertexZ = 0;
|
||||
|
||||
int var38;
|
||||
int var39;
|
||||
int var40;
|
||||
int var41;
|
||||
int var42;
|
||||
for (var38 = 0; var38 < var9; ++var38)
|
||||
for (int i = 0; i < vertexCount; ++i)
|
||||
{
|
||||
var39 = var4.readUnsignedByte();
|
||||
var40 = 0;
|
||||
if ((var39 & 1) != 0)
|
||||
int vertexFlags = stream1.readUnsignedByte();
|
||||
int deltaX = 0;
|
||||
if ((vertexFlags & 1) != 0)
|
||||
{
|
||||
var40 = var5.readShortSmart();
|
||||
deltaX = stream2.readShortSmart();
|
||||
}
|
||||
|
||||
var41 = 0;
|
||||
if ((var39 & 2) != 0)
|
||||
int deltaY = 0;
|
||||
if ((vertexFlags & 2) != 0)
|
||||
{
|
||||
var41 = var6.readShortSmart();
|
||||
deltaY = stream3.readShortSmart();
|
||||
}
|
||||
|
||||
var42 = 0;
|
||||
if ((var39 & 4) != 0)
|
||||
int deltaZ = 0;
|
||||
if ((vertexFlags & 4) != 0)
|
||||
{
|
||||
var42 = var7.readShortSmart();
|
||||
deltaZ = stream4.readShortSmart();
|
||||
}
|
||||
|
||||
def.vertexX[var38] = var35 + var40;
|
||||
def.vertexY[var38] = var36 + var41;
|
||||
def.vertexZ[var38] = var37 + var42;
|
||||
var35 = def.vertexX[var38];
|
||||
var36 = def.vertexY[var38];
|
||||
var37 = def.vertexZ[var38];
|
||||
if (var16 == 1)
|
||||
def.vertexX[i] = previousVertexX + deltaX;
|
||||
def.vertexY[i] = previousVertexY + deltaY;
|
||||
def.vertexZ[i] = previousVertexZ + deltaZ;
|
||||
previousVertexX = def.vertexX[i];
|
||||
previousVertexY = def.vertexY[i];
|
||||
previousVertexZ = def.vertexZ[i];
|
||||
if (hasPackedVertexGroups == 1)
|
||||
{
|
||||
def.packedVertexGroups[var38] = var8.readUnsignedByte();
|
||||
def.packedVertexGroups[i] = stream5.readUnsignedByte();
|
||||
}
|
||||
}
|
||||
|
||||
var4.setOffset(var30);
|
||||
var5.setOffset(var26);
|
||||
var6.setOffset(var24);
|
||||
var7.setOffset(var28);
|
||||
var8.setOffset(var25);
|
||||
stream1.setOffset(offsetOfFaceColorsOrFaceTextures);
|
||||
stream2.setOffset(offsetOfFaceTextureFlags);
|
||||
stream3.setOffset(offsetOfFaceRenderPriorities);
|
||||
stream4.setOffset(offsetOfFaceTransparencies);
|
||||
stream5.setOffset(offsetOfPackedTransparencyVertexGroups);
|
||||
|
||||
for (var38 = 0; var38 < var10; ++var38)
|
||||
for (int i = 0; i < faceCount; ++i)
|
||||
{
|
||||
def.faceColors[var38] = (short) var4.readUnsignedShort();
|
||||
if (var12 == 1)
|
||||
def.faceColors[i] = (short) stream1.readUnsignedShort();
|
||||
if (isTextured == 1)
|
||||
{
|
||||
var39 = var5.readUnsignedByte();
|
||||
if ((var39 & 1) == 1)
|
||||
int faceTextureFlags = stream2.readUnsignedByte();
|
||||
if ((faceTextureFlags & 1) == 1)
|
||||
{
|
||||
def.faceRenderTypes[var38] = 1;
|
||||
var2 = true;
|
||||
def.faceRenderTypes[i] = 1;
|
||||
usesFaceRenderTypes = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
def.faceRenderTypes[var38] = 0;
|
||||
def.faceRenderTypes[i] = 0;
|
||||
}
|
||||
|
||||
if ((var39 & 2) == 2)
|
||||
if ((faceTextureFlags & 2) == 2)
|
||||
{
|
||||
def.textureCoords[var38] = (byte) (var39 >> 2);
|
||||
def.faceTextures[var38] = def.faceColors[var38];
|
||||
def.faceColors[var38] = 127;
|
||||
if (def.faceTextures[var38] != -1)
|
||||
def.textureCoords[i] = (byte) (faceTextureFlags >> 2);
|
||||
def.faceTextures[i] = def.faceColors[i];
|
||||
def.faceColors[i] = 127;
|
||||
if (def.faceTextures[i] != -1)
|
||||
{
|
||||
var3 = true;
|
||||
usesFaceTextures = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
def.textureCoords[var38] = -1;
|
||||
def.faceTextures[var38] = -1;
|
||||
def.textureCoords[i] = -1;
|
||||
def.faceTextures[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (var13 == 255)
|
||||
if (faceRenderPriority == 255)
|
||||
{
|
||||
def.faceRenderPriorities[var38] = var6.readByte();
|
||||
def.faceRenderPriorities[i] = stream3.readByte();
|
||||
}
|
||||
|
||||
if (var14 == 1)
|
||||
if (hasFaceTransparencies == 1)
|
||||
{
|
||||
def.faceTransparencies[var38] = var7.readByte();
|
||||
def.faceTransparencies[i] = stream4.readByte();
|
||||
}
|
||||
|
||||
if (var15 == 1)
|
||||
if (hasPackedTransparencyVertexGroups == 1)
|
||||
{
|
||||
def.packedTransparencyVertexGroups[var38] = var8.readUnsignedByte();
|
||||
def.packedTransparencyVertexGroups[i] = stream5.readUnsignedByte();
|
||||
}
|
||||
}
|
||||
|
||||
var4.setOffset(var29);
|
||||
var5.setOffset(var23);
|
||||
var38 = 0;
|
||||
var39 = 0;
|
||||
var40 = 0;
|
||||
var41 = 0;
|
||||
stream1.setOffset(offsetOfFaceIndexData);
|
||||
stream2.setOffset(offsetOfFaceIndexCompressionTypes);
|
||||
int previousIndex1 = 0;
|
||||
int previousIndex2 = 0;
|
||||
int previousIndex3 = 0;
|
||||
|
||||
int var43;
|
||||
int var44;
|
||||
for (var42 = 0; var42 < var10; ++var42)
|
||||
for (int i = 0; i < faceCount; ++i)
|
||||
{
|
||||
var43 = var5.readUnsignedByte();
|
||||
if (var43 == 1)
|
||||
int faceIndexCompressionType = stream2.readUnsignedByte();
|
||||
if (faceIndexCompressionType == 1)
|
||||
{
|
||||
var38 = var4.readShortSmart() + var41;
|
||||
var39 = var4.readShortSmart() + var38;
|
||||
var40 = var4.readShortSmart() + var39;
|
||||
var41 = var40;
|
||||
def.faceIndices1[var42] = var38;
|
||||
def.faceIndices2[var42] = var39;
|
||||
def.faceIndices3[var42] = var40;
|
||||
previousIndex1 = stream1.readShortSmart() + previousIndex3;
|
||||
previousIndex2 = stream1.readShortSmart() + previousIndex1;
|
||||
previousIndex3 = stream1.readShortSmart() + previousIndex2;
|
||||
def.faceIndices1[i] = previousIndex1;
|
||||
def.faceIndices2[i] = previousIndex2;
|
||||
def.faceIndices3[i] = previousIndex3;
|
||||
}
|
||||
|
||||
if (var43 == 2)
|
||||
if (faceIndexCompressionType == 2)
|
||||
{
|
||||
var39 = var40;
|
||||
var40 = var4.readShortSmart() + var41;
|
||||
var41 = var40;
|
||||
def.faceIndices1[var42] = var38;
|
||||
def.faceIndices2[var42] = var39;
|
||||
def.faceIndices3[var42] = var40;
|
||||
previousIndex2 = previousIndex3;
|
||||
previousIndex3 = stream1.readShortSmart() + previousIndex3;
|
||||
def.faceIndices1[i] = previousIndex1;
|
||||
def.faceIndices2[i] = previousIndex2;
|
||||
def.faceIndices3[i] = previousIndex3;
|
||||
}
|
||||
|
||||
if (var43 == 3)
|
||||
if (faceIndexCompressionType == 3)
|
||||
{
|
||||
var38 = var40;
|
||||
var40 = var4.readShortSmart() + var41;
|
||||
var41 = var40;
|
||||
def.faceIndices1[var42] = var38;
|
||||
def.faceIndices2[var42] = var39;
|
||||
def.faceIndices3[var42] = var40;
|
||||
previousIndex1 = previousIndex3;
|
||||
previousIndex3 = stream1.readShortSmart() + previousIndex3;
|
||||
def.faceIndices1[i] = previousIndex1;
|
||||
def.faceIndices2[i] = previousIndex2;
|
||||
def.faceIndices3[i] = previousIndex3;
|
||||
}
|
||||
|
||||
if (var43 == 4)
|
||||
if (faceIndexCompressionType == 4)
|
||||
{
|
||||
var44 = var38;
|
||||
var38 = var39;
|
||||
var39 = var44;
|
||||
var40 = var4.readShortSmart() + var41;
|
||||
var41 = var40;
|
||||
def.faceIndices1[var42] = var38;
|
||||
def.faceIndices2[var42] = var44;
|
||||
def.faceIndices3[var42] = var40;
|
||||
int swap = previousIndex1;
|
||||
previousIndex1 = previousIndex2;
|
||||
previousIndex2 = swap;
|
||||
previousIndex3 = stream1.readShortSmart() + previousIndex3;
|
||||
def.faceIndices1[i] = previousIndex1;
|
||||
def.faceIndices2[i] = previousIndex2;
|
||||
def.faceIndices3[i] = previousIndex3;
|
||||
}
|
||||
}
|
||||
|
||||
var4.setOffset(var31);
|
||||
stream1.setOffset(offsetOfTextureIndices);
|
||||
|
||||
for (var42 = 0; var42 < var11; ++var42)
|
||||
for (int i = 0; i < textureCount; ++i)
|
||||
{
|
||||
def.textureRenderTypes[var42] = 0;
|
||||
def.texIndices1[var42] = (short) var4.readUnsignedShort();
|
||||
def.texIndices2[var42] = (short) var4.readUnsignedShort();
|
||||
def.texIndices3[var42] = (short) var4.readUnsignedShort();
|
||||
def.textureRenderTypes[i] = 0;
|
||||
def.texIndices1[i] = (short) stream1.readUnsignedShort();
|
||||
def.texIndices2[i] = (short) stream1.readUnsignedShort();
|
||||
def.texIndices3[i] = (short) stream1.readUnsignedShort();
|
||||
}
|
||||
|
||||
if (def.textureCoords != null)
|
||||
{
|
||||
boolean var45 = false;
|
||||
boolean usesTextureCoords = false;
|
||||
|
||||
for (var43 = 0; var43 < var10; ++var43)
|
||||
for (int i = 0; i < faceCount; ++i)
|
||||
{
|
||||
var44 = def.textureCoords[var43] & 255;
|
||||
if (var44 != 255)
|
||||
int coord = def.textureCoords[i] & 255;
|
||||
if (coord != 255)
|
||||
{
|
||||
if (def.faceIndices1[var43] == (def.texIndices1[var44] & '\uffff') && def.faceIndices2[var43] == (def.texIndices2[var44] & '\uffff') && def.faceIndices3[var43] == (def.texIndices3[var44] & '\uffff'))
|
||||
if (def.faceIndices1[i] == (def.texIndices1[coord] & '\uffff') && def.faceIndices2[i] == (def.texIndices2[coord] & '\uffff') && def.faceIndices3[i] == (def.texIndices3[coord] & '\uffff'))
|
||||
{
|
||||
def.textureCoords[var43] = -1;
|
||||
def.textureCoords[i] = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var45 = true;
|
||||
usesTextureCoords = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!var45)
|
||||
if (!usesTextureCoords)
|
||||
{
|
||||
def.textureCoords = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (!var3)
|
||||
if (!usesFaceTextures)
|
||||
{
|
||||
def.faceTextures = null;
|
||||
}
|
||||
|
||||
if (!var2)
|
||||
if (!usesFaceRenderTypes)
|
||||
{
|
||||
def.faceRenderTypes = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -665,7 +665,16 @@ public enum Varbits
|
||||
* 0 = on
|
||||
* 1 = off
|
||||
*/
|
||||
BOSS_HEALTH_OVERLAY(12389);
|
||||
BOSS_HEALTH_OVERLAY(12389),
|
||||
|
||||
/**
|
||||
* Whether the PVP kill-death stats widget should be drawn while in the wilderness or in PVP worlds.
|
||||
*
|
||||
* 0 = Disabled
|
||||
* 1 = Enabled
|
||||
*/
|
||||
SHOW_PVP_KDR_STATS(4143),
|
||||
;
|
||||
|
||||
/**
|
||||
* The raw varbit ID.
|
||||
|
||||
@@ -314,6 +314,8 @@ public class Notifier
|
||||
commands.add("notify-send");
|
||||
commands.add(title);
|
||||
commands.add(message);
|
||||
commands.add("-a");
|
||||
commands.add(SHELL_ESCAPE.escape(appName));
|
||||
commands.add("-i");
|
||||
commands.add(SHELL_ESCAPE.escape(notifyIconPath.toAbsolutePath().toString()));
|
||||
commands.add("-u");
|
||||
|
||||
@@ -326,7 +326,9 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
||||
new CrypticClue("A graceful man of many colours, his crates must be full of many delights.", "Hill Giant", CRATE_42067, new WorldPoint(1506, 3590, 2), "Kill any Hill Giant for a medium key. Then search the crate on the top floor of Osten's clothing shop in Shayzien."),
|
||||
new CrypticClue("Search the basket of apples in an orchard, south of the unknown grave surrounded by white roses.", APPLE_BASKET, new WorldPoint(1718, 3626, 0), "Search the middle apple basket in the apple orchard north of Hosidius."),
|
||||
new CrypticClue("Dig in the lair of red wings, within the temple of the Sun and Moon.", new WorldPoint(1820, 9935, 0), "Forthos Dungeon. In the center of the red dragons."),
|
||||
new CrypticClue("Within the town of Lumbridge lives a man named Bob. He walks out of his door and takes 1 step east, 7 steps north, 5 steps west and 1 step south. Once he arrives, he digs a hole and buries his treasure.", new WorldPoint(3230, 3209, 0), "Just west of the bush outside Bob's axe shop in Lumbridge.")
|
||||
new CrypticClue("Within the town of Lumbridge lives a man named Bob. He walks out of his door and takes 1 step east, 7 steps north, 5 steps west and 1 step south. Once he arrives, he digs a hole and buries his treasure.", new WorldPoint(3230, 3209, 0), "Just west of the bush outside Bob's axe shop in Lumbridge."),
|
||||
new CrypticClue("Try not to let yourself be dazzled when you search these drawers.", DRAWERS_350, new WorldPoint(2561, 3323, 0), "Search the western drawers in Jimmy Dazzler's home near the East Ardougne Rat Pits."),
|
||||
new CrypticClue("The Big High War God left his mark on this place.", new WorldPoint(3572, 4372, 0), "Dig anywhere in Yu'biusk. Fairy ring BLQ.")
|
||||
);
|
||||
|
||||
private final String text;
|
||||
|
||||
@@ -54,6 +54,7 @@ public enum FairyRings
|
||||
BKR("Mort Myre Swamp, south of Canifis"),
|
||||
BKS("Zanaris"),
|
||||
BLP("TzHaar area"),
|
||||
BLQ("Yu'biusk"),
|
||||
BLR("Legends' Guild"),
|
||||
|
||||
// C
|
||||
|
||||
@@ -434,8 +434,9 @@ class SceneUploader
|
||||
len += 3;
|
||||
continue;
|
||||
}
|
||||
// HSL override is not applied to flat shade faces or to textured faces
|
||||
else if (faceTextures == null || faceTextures[face] == -1)
|
||||
|
||||
// HSL override is not applied to textured faces
|
||||
if (faceTextures == null || faceTextures[face] == -1)
|
||||
{
|
||||
if (overrideAmount > 0)
|
||||
{
|
||||
@@ -525,8 +526,9 @@ class SceneUploader
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
// HSL override is not applied to flat shade faces or to textured faces
|
||||
else if (faceTextures == null || faceTextures[face] == -1)
|
||||
|
||||
// HSL override is not applied to textured faces
|
||||
if (faceTextures == null || faceTextures[face] == -1)
|
||||
{
|
||||
if (overrideAmount > 0)
|
||||
{
|
||||
|
||||
@@ -205,6 +205,8 @@ public class LootTrackerPlugin extends Plugin
|
||||
private static final String HALLOWED_SEPULCHRE_COFFIN_EVENT = "Coffin (Hallowed Sepulchre)";
|
||||
private static final Set<Integer> HALLOWED_SEPULCHRE_MAP_REGIONS = ImmutableSet.of(8797, 10077, 9308, 10074, 9050); // one map region per floor
|
||||
|
||||
private static final String HALLOWED_SACK_EVENT = "Hallowed Sack";
|
||||
|
||||
// Last man standing map regions
|
||||
private static final Set<Integer> LAST_MAN_STANDING_REGIONS = ImmutableSet.of(13658, 13659, 13660, 13914, 13915, 13916, 13918, 13919, 13920, 14174, 14175, 14176, 14430, 14431, 14432);
|
||||
|
||||
@@ -791,6 +793,7 @@ public class LootTrackerPlugin extends Plugin
|
||||
if (CHEST_EVENT_TYPES.containsValue(eventType)
|
||||
|| SHADE_CHEST_OBJECTS.containsValue(eventType)
|
||||
|| HALLOWED_SEPULCHRE_COFFIN_EVENT.equals(eventType)
|
||||
|| HALLOWED_SACK_EVENT.equals(eventType)
|
||||
|| HERBIBOAR_EVENT.equals(eventType)
|
||||
|| HESPORI_EVENT.equals(eventType)
|
||||
|| WINTERTODT_SUPPLY_CRATE_EVENT.equals(eventType)
|
||||
@@ -876,6 +879,10 @@ public class LootTrackerPlugin extends Plugin
|
||||
setEvent(LootRecordType.EVENT, MAHOGANY_CRATE_EVENT, client.getBoostedSkillLevel(Skill.CONSTRUCTION));
|
||||
takeInventorySnapshot();
|
||||
break;
|
||||
case ItemID.HALLOWED_SACK:
|
||||
setEvent(LootRecordType.EVENT, HALLOWED_SACK_EVENT);
|
||||
takeInventorySnapshot();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,4 +41,5 @@ public class ScreenMarker
|
||||
private Color color;
|
||||
private Color fill;
|
||||
private boolean visible;
|
||||
private boolean labelled;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.awt.event.MouseEvent;
|
||||
import javax.swing.SwingUtilities;
|
||||
import net.runelite.client.input.MouseAdapter;
|
||||
|
||||
public class ScreenMarkerMouseListener extends MouseAdapter
|
||||
class ScreenMarkerMouseListener extends MouseAdapter
|
||||
{
|
||||
private final ScreenMarkerPlugin plugin;
|
||||
|
||||
|
||||
@@ -78,7 +78,8 @@ public class ScreenMarkerOverlay extends Overlay
|
||||
screenMarkerRenderable.setColor(marker.getColor());
|
||||
screenMarkerRenderable.setFill(marker.getFill());
|
||||
screenMarkerRenderable.setStroke(new BasicStroke(marker.getBorderThickness()));
|
||||
screenMarkerRenderable.setPreferredSize(preferredSize);
|
||||
screenMarkerRenderable.setSize(preferredSize);
|
||||
screenMarkerRenderable.setLabel(marker.isLabelled() ? marker.getName() : "");
|
||||
return screenMarkerRenderable.render(graphics);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +203,8 @@ public class ScreenMarkerPlugin extends Plugin
|
||||
pluginPanel.getSelectedBorderThickness(),
|
||||
pluginPanel.getSelectedColor(),
|
||||
pluginPanel.getSelectedFillColor(),
|
||||
true
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
// Set overlay creator bounds to current position and default size
|
||||
|
||||
@@ -27,44 +27,29 @@ package net.runelite.client.plugins.screenmarkers;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Stroke;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.runelite.client.ui.overlay.components.LayoutableRenderableEntity;
|
||||
import net.runelite.client.ui.overlay.RenderableEntity;
|
||||
|
||||
public class ScreenMarkerRenderable implements LayoutableRenderableEntity
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
class ScreenMarkerRenderable implements RenderableEntity
|
||||
{
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter
|
||||
private Point preferredLocation;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter
|
||||
private Dimension preferredSize;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Dimension size;
|
||||
private int borderThickness;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Color color;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Color fill;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Stroke stroke;
|
||||
|
||||
@Getter
|
||||
private final Rectangle bounds = new Rectangle();
|
||||
private String label;
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
int thickness = borderThickness;
|
||||
int width = preferredSize.width;
|
||||
int height = preferredSize.height;
|
||||
int width = size.width;
|
||||
int height = size.height;
|
||||
|
||||
//draw the fill
|
||||
graphics.setColor(fill);
|
||||
@@ -76,7 +61,12 @@ public class ScreenMarkerRenderable implements LayoutableRenderableEntity
|
||||
graphics.setColor(color);
|
||||
graphics.setStroke(stroke);
|
||||
graphics.drawRect(offset, offset, width - thickness, height - thickness);
|
||||
bounds.setSize(preferredSize);
|
||||
return preferredSize;
|
||||
|
||||
if (!label.isEmpty())
|
||||
{
|
||||
graphics.drawString(label, 0, 0);
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
import net.runelite.client.ui.components.FlatTextField;
|
||||
import net.runelite.client.ui.components.colorpicker.RuneliteColorPicker;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
import net.runelite.client.util.ImageUtil;
|
||||
|
||||
class ScreenMarkerPanel extends JPanel
|
||||
@@ -73,10 +74,10 @@ class ScreenMarkerPanel extends JPanel
|
||||
private static final ImageIcon NO_FILL_COLOR_ICON;
|
||||
private static final ImageIcon NO_FILL_COLOR_HOVER_ICON;
|
||||
|
||||
private static final ImageIcon FULL_OPACITY_ICON;
|
||||
private static final ImageIcon FULL_OPACITY_HOVER_ICON;
|
||||
private static final ImageIcon NO_OPACITY_ICON;
|
||||
private static final ImageIcon NO_OPACITY_HOVER_ICON;
|
||||
private static final ImageIcon LABEL_ICON;
|
||||
private static final ImageIcon LABEL_HOVER_ICON;
|
||||
private static final ImageIcon NO_LABEL_ICON;
|
||||
private static final ImageIcon NO_LABEL_HOVER_ICON;
|
||||
|
||||
private static final ImageIcon VISIBLE_ICON;
|
||||
private static final ImageIcon VISIBLE_HOVER_ICON;
|
||||
@@ -91,7 +92,7 @@ class ScreenMarkerPanel extends JPanel
|
||||
|
||||
private final JLabel borderColorIndicator = new JLabel();
|
||||
private final JLabel fillColorIndicator = new JLabel();
|
||||
private final JLabel opacityIndicator = new JLabel();
|
||||
private final JLabel labelIndicator = new JLabel();
|
||||
private final JLabel visibilityLabel = new JLabel();
|
||||
private final JLabel deleteLabel = new JLabel();
|
||||
|
||||
@@ -104,6 +105,7 @@ class ScreenMarkerPanel extends JPanel
|
||||
private final JSpinner thicknessSpinner = new JSpinner(spinnerModel);
|
||||
|
||||
private boolean visible;
|
||||
private boolean showLabel;
|
||||
|
||||
static
|
||||
{
|
||||
@@ -123,13 +125,13 @@ class ScreenMarkerPanel extends JPanel
|
||||
NO_FILL_COLOR_ICON = new ImageIcon(fillImgHover);
|
||||
NO_FILL_COLOR_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(fillImgHover, -100));
|
||||
|
||||
final BufferedImage opacityImg = ImageUtil.loadImageResource(ScreenMarkerPlugin.class, "opacity_icon.png");
|
||||
final BufferedImage opacityImgHover = ImageUtil.luminanceOffset(opacityImg, -150);
|
||||
FULL_OPACITY_ICON = new ImageIcon(opacityImg);
|
||||
FULL_OPACITY_HOVER_ICON = new ImageIcon(opacityImgHover);
|
||||
final BufferedImage labelImg = ImageUtil.loadImageResource(ScreenMarkerPlugin.class, "label_icon.png");
|
||||
final BufferedImage labelImgHover = ImageUtil.luminanceOffset(labelImg, -150);
|
||||
LABEL_ICON = new ImageIcon(labelImg);
|
||||
LABEL_HOVER_ICON = new ImageIcon(labelImgHover);
|
||||
|
||||
NO_OPACITY_ICON = new ImageIcon(opacityImgHover);
|
||||
NO_OPACITY_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(opacityImgHover, -100));
|
||||
NO_LABEL_ICON = new ImageIcon(labelImgHover);
|
||||
NO_LABEL_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(labelImgHover, -100));
|
||||
|
||||
final BufferedImage visibleImg = ImageUtil.loadImageResource(ScreenMarkerPlugin.class, "visible_icon.png");
|
||||
VISIBLE_ICON = new ImageIcon(visibleImg);
|
||||
@@ -149,6 +151,7 @@ class ScreenMarkerPanel extends JPanel
|
||||
this.plugin = plugin;
|
||||
this.marker = marker;
|
||||
this.visible = marker.getMarker().isVisible();
|
||||
this.showLabel = marker.getMarker().isLabelled();
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
setBackground(ColorScheme.DARKER_GRAY_COLOR);
|
||||
@@ -331,50 +334,37 @@ class ScreenMarkerPanel extends JPanel
|
||||
thicknessSpinner.setValue(marker.getMarker().getBorderThickness());
|
||||
thicknessSpinner.setPreferredSize(new Dimension(50, 20));
|
||||
thicknessSpinner.addChangeListener(ce -> updateThickness(true));
|
||||
thicknessSpinner.setToolTipText("Border thickness");
|
||||
|
||||
opacityIndicator.setToolTipText("Toggle background transparency");
|
||||
opacityIndicator.addMouseListener(new MouseAdapter()
|
||||
labelIndicator.addMouseListener(new MouseAdapter()
|
||||
{
|
||||
@Override
|
||||
public void mousePressed(MouseEvent mouseEvent)
|
||||
{
|
||||
final Color fill = marker.getMarker().getFill();
|
||||
|
||||
if (fill.getAlpha() == 0)
|
||||
{
|
||||
marker.getMarker().setFill(new Color(fill.getRed(), fill.getGreen(), fill.getBlue(), DEFAULT_FILL_OPACITY));
|
||||
}
|
||||
else
|
||||
{
|
||||
marker.getMarker().setFill(new Color(fill.getRed(), fill.getGreen(), fill.getBlue(), 0));
|
||||
}
|
||||
|
||||
updateFill();
|
||||
plugin.updateConfig();
|
||||
toggleLabelling(!showLabel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent mouseEvent)
|
||||
{
|
||||
opacityIndicator.setIcon(marker.getMarker().getFill().getAlpha() == 0 ? NO_OPACITY_HOVER_ICON : FULL_OPACITY_HOVER_ICON);
|
||||
labelIndicator.setIcon(showLabel ? LABEL_HOVER_ICON : NO_LABEL_HOVER_ICON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent mouseEvent)
|
||||
{
|
||||
opacityIndicator.setIcon(marker.getMarker().getFill().getAlpha() == 0 ? NO_OPACITY_ICON : FULL_OPACITY_ICON);
|
||||
labelIndicator.setIcon(showLabel ? LABEL_ICON : NO_LABEL_ICON);
|
||||
}
|
||||
});
|
||||
|
||||
leftActions.add(borderColorIndicator);
|
||||
leftActions.add(fillColorIndicator);
|
||||
leftActions.add(opacityIndicator);
|
||||
leftActions.add(labelIndicator);
|
||||
leftActions.add(thicknessSpinner);
|
||||
|
||||
JPanel rightActions = new JPanel(new FlowLayout(FlowLayout.RIGHT, 8, 0));
|
||||
rightActions.setBackground(ColorScheme.DARKER_GRAY_COLOR);
|
||||
|
||||
visibilityLabel.setToolTipText(visible ? "Hide screen marker" : "Show screen marker");
|
||||
visibilityLabel.addMouseListener(new MouseAdapter()
|
||||
{
|
||||
@Override
|
||||
@@ -439,7 +429,7 @@ class ScreenMarkerPanel extends JPanel
|
||||
updateFill();
|
||||
updateBorder();
|
||||
updateBorder();
|
||||
|
||||
updateLabelling();
|
||||
}
|
||||
|
||||
private void preview(boolean on)
|
||||
@@ -460,6 +450,14 @@ class ScreenMarkerPanel extends JPanel
|
||||
updateVisibility();
|
||||
}
|
||||
|
||||
private void toggleLabelling(boolean on)
|
||||
{
|
||||
showLabel = on;
|
||||
marker.getMarker().setLabelled(showLabel);
|
||||
plugin.updateConfig();
|
||||
updateLabelling();
|
||||
}
|
||||
|
||||
private void save()
|
||||
{
|
||||
marker.getMarker().setName(nameInput.getText());
|
||||
@@ -505,6 +503,13 @@ class ScreenMarkerPanel extends JPanel
|
||||
private void updateVisibility()
|
||||
{
|
||||
visibilityLabel.setIcon(visible ? VISIBLE_ICON : INVISIBLE_ICON);
|
||||
visibilityLabel.setToolTipText(visible ? "Hide screen marker" : "Show screen marker");
|
||||
}
|
||||
|
||||
private void updateLabelling()
|
||||
{
|
||||
labelIndicator.setIcon(showLabel ? LABEL_ICON : NO_LABEL_ICON);
|
||||
labelIndicator.setToolTipText(showLabel ? "Hide label" : "Show label");
|
||||
}
|
||||
|
||||
private void updateFill()
|
||||
@@ -523,7 +528,6 @@ class ScreenMarkerPanel extends JPanel
|
||||
}
|
||||
|
||||
fillColorIndicator.setIcon(isFullyTransparent ? NO_FILL_COLOR_ICON : FILL_COLOR_ICON);
|
||||
opacityIndicator.setIcon(isFullyTransparent ? NO_OPACITY_ICON : FULL_OPACITY_ICON);
|
||||
}
|
||||
|
||||
private void updateBorder()
|
||||
@@ -543,9 +547,10 @@ class ScreenMarkerPanel extends JPanel
|
||||
|
||||
private void openFillColorPicker()
|
||||
{
|
||||
final Color fillColor = marker.getMarker().getFill();
|
||||
RuneliteColorPicker colorPicker = plugin.getColorPickerManager().create(
|
||||
SwingUtilities.windowForComponent(this),
|
||||
marker.getMarker().getFill(),
|
||||
fillColor.getAlpha() == 0 ? ColorUtil.colorWithAlpha(fillColor, DEFAULT_FILL_OPACITY) : fillColor,
|
||||
marker.getMarker().getName() + " Fill",
|
||||
false);
|
||||
colorPicker.setLocation(getLocationOnScreen());
|
||||
|
||||
@@ -56,7 +56,7 @@ public class WidgetOverlay extends Overlay
|
||||
new WidgetOverlay(client, WidgetInfo.PEST_CONTROL_KNIGHT_INFO_CONTAINER, OverlayPosition.TOP_LEFT),
|
||||
new WidgetOverlay(client, WidgetInfo.PEST_CONTROL_ACTIVITY_SHIELD_INFO_CONTAINER, OverlayPosition.TOP_RIGHT),
|
||||
new WidgetOverlay(client, WidgetInfo.ZEAH_MESS_HALL_COOKING_DISPLAY, OverlayPosition.TOP_LEFT),
|
||||
new WidgetOverlay(client, WidgetInfo.PVP_KILLDEATH_COUNTER, OverlayPosition.TOP_LEFT),
|
||||
new PvpKDRWidgetOverlay(client, WidgetInfo.PVP_KILLDEATH_COUNTER, OverlayPosition.TOP_LEFT),
|
||||
new WidgetOverlay(client, WidgetInfo.SKOTIZO_CONTAINER, OverlayPosition.TOP_LEFT),
|
||||
new WidgetOverlay(client, WidgetInfo.KOUREND_FAVOUR_OVERLAY, OverlayPosition.TOP_CENTER),
|
||||
new WidgetOverlay(client, WidgetInfo.PYRAMID_PLUNDER_DATA, OverlayPosition.TOP_CENTER),
|
||||
@@ -257,4 +257,24 @@ public class WidgetOverlay extends Overlay
|
||||
return position;
|
||||
}
|
||||
}
|
||||
|
||||
private static class PvpKDRWidgetOverlay extends WidgetOverlay
|
||||
{
|
||||
private PvpKDRWidgetOverlay(Client client, WidgetInfo widgetInfo, OverlayPosition overlayPosition)
|
||||
{
|
||||
super(client, widgetInfo, overlayPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
// Don't draw widget overlay if the PVP KDR stats text will be empty
|
||||
if (client.getVar(Varbits.SHOW_PVP_KDR_STATS) == 1)
|
||||
{
|
||||
return super.render(graphics);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,17 +60,17 @@ public class LinkBrowser
|
||||
return;
|
||||
}
|
||||
|
||||
if (attemptDesktopBrowse(url))
|
||||
{
|
||||
log.debug("Opened url through Desktop#browse to {}", url);
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldAttemptXdg && attemptXdgOpen(url))
|
||||
{
|
||||
log.debug("Opened url through xdg-open to {}", url);
|
||||
return;
|
||||
}
|
||||
|
||||
if (attemptDesktopBrowse(url))
|
||||
{
|
||||
log.debug("Opened url through Desktop#browse to {}", url);
|
||||
return;
|
||||
}
|
||||
|
||||
log.warn("LinkBrowser.browse() could not open {}", url);
|
||||
showMessageBox("Unable to open link. Press 'OK' and the link will be copied to your clipboard.", url);
|
||||
@@ -91,18 +91,18 @@ public class LinkBrowser
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldAttemptXdg && attemptXdgOpen(directory))
|
||||
{
|
||||
log.debug("Opened directory through xdg-open to {}", directory);
|
||||
return;
|
||||
}
|
||||
|
||||
if (attemptDesktopOpen(directory))
|
||||
{
|
||||
log.debug("Opened directory through Desktop#open to {}", directory);
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldAttemptXdg && attemptXdgOpen(directory))
|
||||
{
|
||||
log.debug("Opened directory through xdg-open to {}", directory);
|
||||
return;
|
||||
}
|
||||
|
||||
log.warn("LinkBrowser.open() could not open {}", directory);
|
||||
showMessageBox("Unable to open folder. Press 'OK' and the folder directory will be copied to your clipboard.", directory);
|
||||
}).start();
|
||||
|
||||
@@ -62,52 +62,21 @@ int priority_map(int p, int distance, int _min10, int avg1, int avg2, int avg3)
|
||||
return 17;
|
||||
}
|
||||
default:
|
||||
return -1;
|
||||
// this can't happen unless an invalid priority is sent. just assume 0.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// calculate the number of faces with a lower adjusted priority than
|
||||
// the given adjusted priority
|
||||
int count_prio_offset(__local struct shared_data *shared, int priority) {
|
||||
// this shouldn't ever be outside of (0, 17) because it is the return value from priority_map
|
||||
priority = clamp(priority, 0, 17);
|
||||
int total = 0;
|
||||
switch (priority) {
|
||||
case 17:
|
||||
total += shared->totalMappedNum[16];
|
||||
case 16:
|
||||
total += shared->totalMappedNum[15];
|
||||
case 15:
|
||||
total += shared->totalMappedNum[14];
|
||||
case 14:
|
||||
total += shared->totalMappedNum[13];
|
||||
case 13:
|
||||
total += shared->totalMappedNum[12];
|
||||
case 12:
|
||||
total += shared->totalMappedNum[11];
|
||||
case 11:
|
||||
total += shared->totalMappedNum[10];
|
||||
case 10:
|
||||
total += shared->totalMappedNum[9];
|
||||
case 9:
|
||||
total += shared->totalMappedNum[8];
|
||||
case 8:
|
||||
total += shared->totalMappedNum[7];
|
||||
case 7:
|
||||
total += shared->totalMappedNum[6];
|
||||
case 6:
|
||||
total += shared->totalMappedNum[5];
|
||||
case 5:
|
||||
total += shared->totalMappedNum[4];
|
||||
case 4:
|
||||
total += shared->totalMappedNum[3];
|
||||
case 3:
|
||||
total += shared->totalMappedNum[2];
|
||||
case 2:
|
||||
total += shared->totalMappedNum[1];
|
||||
case 1:
|
||||
total += shared->totalMappedNum[0];
|
||||
case 0:
|
||||
return total;
|
||||
for (int i = 0; i < priority; i++) {
|
||||
total += shared->totalMappedNum[i];
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
void get_face(
|
||||
|
||||
@@ -62,52 +62,21 @@ int priority_map(int p, int distance, int _min10, int avg1, int avg2, int avg3)
|
||||
return 17;
|
||||
}
|
||||
default:
|
||||
return -1;
|
||||
// this can't happen unless an invalid priority is sent. just assume 0.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// calculate the number of faces with a lower adjusted priority than
|
||||
// the given adjusted priority
|
||||
int count_prio_offset(int priority) {
|
||||
// this shouldn't ever be outside of (0, 17) because it is the return value from priority_map
|
||||
priority = clamp(priority, 0, 17);
|
||||
int total = 0;
|
||||
switch (priority) {
|
||||
case 17:
|
||||
total += totalMappedNum[16];
|
||||
case 16:
|
||||
total += totalMappedNum[15];
|
||||
case 15:
|
||||
total += totalMappedNum[14];
|
||||
case 14:
|
||||
total += totalMappedNum[13];
|
||||
case 13:
|
||||
total += totalMappedNum[12];
|
||||
case 12:
|
||||
total += totalMappedNum[11];
|
||||
case 11:
|
||||
total += totalMappedNum[10];
|
||||
case 10:
|
||||
total += totalMappedNum[9];
|
||||
case 9:
|
||||
total += totalMappedNum[8];
|
||||
case 8:
|
||||
total += totalMappedNum[7];
|
||||
case 7:
|
||||
total += totalMappedNum[6];
|
||||
case 6:
|
||||
total += totalMappedNum[5];
|
||||
case 5:
|
||||
total += totalMappedNum[4];
|
||||
case 4:
|
||||
total += totalMappedNum[3];
|
||||
case 3:
|
||||
total += totalMappedNum[2];
|
||||
case 2:
|
||||
total += totalMappedNum[1];
|
||||
case 1:
|
||||
total += totalMappedNum[0];
|
||||
case 0:
|
||||
return total;
|
||||
for (int i = 0; i < priority; i++) {
|
||||
total += totalMappedNum[i];
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
void get_face(uint localId, modelinfo minfo, int cameraYaw, int cameraPitch,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 243 B |
Binary file not shown.
|
Before Width: | Height: | Size: 257 B |
@@ -8,7 +8,7 @@ runelite.wiki.link=https://github.com/open-osrs/runelite/wiki
|
||||
runelite.patreon.link=https://www.patreon.com/openosrs
|
||||
runelite.wiki.troubleshooting.link=https://github.com/open-osrs/runelite/wiki/Troubleshooting-problems-with-the-client
|
||||
runelite.wiki.building.link=https://github.com/open-osrs/runelite/wiki/Building-with-IntelliJ-IDEA#client-failing-to-start
|
||||
runelite.dnschange.link=https://1.1.1.1/dns/
|
||||
runelite.dnschange.link=https://1.1.1.1/dns/#setup-instructions
|
||||
runelite.jav_config=https://oldschool.runescape.com/jav_config.ws
|
||||
runelite.jav_config_backup=https://static.runelite.net/jav_config.ws
|
||||
runelite.pluginhub.url=https://repo.runelite.net/plugins
|
||||
|
||||
Reference in New Issue
Block a user