trees 716 Posted December 28, 2019 Popular Post Report Share Posted December 28, 2019 A better guide for runesuite This will add anti-aliasing feature to any 317 client, the naming may be different, thats up to you to sort. Step 1: Mouse Click Area Fix Search for 'l == 519' in client.java int y; int x; if (!this.menuOpen) { x = this.saveClickX - 4; y = this.saveClickY - 4; } else { x = j - 4; y = k - 4; } if (Configuration.anti_aliasing == true) { x <<= 1; y <<= 1; } this.worldController.method312(y, x); Step 2: Anti Aliasing Rendering 1/2 This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up Search for 'method146'; Directly under 'int [] offsets = null'; Add the following int[] offsets = null; if (Configuration.anti_aliasing == true) { Model.currentCursorX <<= 1; Model.currentCursorY <<= 1; WorldController.focalLength <<= 1; pixels = Rasterizer.pixels; Rasterizer.pixels = antialiasingPixels; offsets = Rasterizer.anIntArray1472; Rasterizer.anIntArray1472 = antialiasingOffsets; Rasterizer.bottomX <<= 1; Rasterizer.bottomY <<= 1; DrawingArea.width <<= 1; DrawingArea.height <<= 1; DrawingArea.centerX <<= 1; DrawingArea.centerY <<= 1; DrawingArea.anInt1387 <<= 1; Rasterizer.textureInt1 <<= 1; Rasterizer.textureInt2 <<= 1; } Step 3: Anti Aliasing Render 2/2 Directly under 'worldController.method313'; Add the following; Note if you have fog rendering, the fog rendering should be just above this new code your adding and under 'method313' DrawingArea.setAllPixelsToZero(); worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve); if (Configuration.anti_aliasing == true) { Model.currentCursorX >>= 1; Model.currentCursorY >>= 1; WorldController.focalLength >>= 1; Rasterizer.pixels = pixels; Rasterizer.anIntArray1472 = offsets; Rasterizer.bottomX >>= 1; Rasterizer.bottomY >>= 1; DrawingArea.width >>= 1; DrawingArea.height >>= 1; DrawingArea.centerX >>= 1; DrawingArea.centerY >>= 1; DrawingArea.anInt1387 >>= 1; Rasterizer.textureInt1 >>= 1; Rasterizer.textureInt2 >>= 1; int w = DrawingArea.width; int h = DrawingArea.height; for (int x = 0; x < w; x++) { for (int y = 0; y < h; y++) { int x2 = x << 1; int y2 = y << 1; int w2 = w << 1; int c1 = antialiasingPixels[(x2 + y2 * w2)]; int c2 = antialiasingPixels[(x2 + 1 + y2 * w2)]; int c3 = antialiasingPixels[(x2 + (y2 + 1) * w2)]; int c4 = antialiasingPixels[(x2 + 1 + (y2 + 1) * w2)]; int r = (c1 >> 16 & 0xFF) + (c2 >> 16 & 0xFF) + (c3 >> 16 & 0xFF) + (c4 >> 16 & 0xFF) >> 2; int g = (c1 >> 8 & 0xFF) + (c2 >> 8 & 0xFF) + (c3 >> 8 & 0xFF) + (c4 >> 8 & 0xFF) >> 2; int b = (c1 & 0xFF) + (c2 & 0xFF) + (c3 & 0xFF) + (c4 & 0xFF) >> 2; DrawingArea.pixels[(x + y * DrawingArea.width)] = (r << 16 | g << 8 | b); } } } this code should all be followed with something that looks similar to the following, if you have done all that, congratulations! Make the 'Configuration.anti_aliasing' any boolean you please and test it out and continue below. worldController.clearObj5Cache(); updateEntities(); drawHeadIcon(); method37(k2); draw3dScreen(); aGraphicsBuffer_1165.drawGraphics(4, super.graphics, 4); xCameraPos = l; zCameraPos = i1; yCameraPos = j1; yCameraCurve = k1; xCameraCurve = l1; Grab a redbull, you'll need it. Step 4: The world controller / game scene Open your 'WorldController.java' (or 'Scene.java') Add and declare the following focalLength declarations anywhere (find below) and replace '>> 9' with the 'WorldController.focalLength' in the following methods; method311, method315, method 316; public static int focalLength = 512; static { focalLength = 512; } The following will be my methods using the focalLength, which may vary from yours. private static boolean method311(int i, int j, int k) { int l = j * anInt460 + k * anInt461 >> 16; int i1 = j * anInt461 - k * anInt460 >> 16; int j1 = i * anInt458 + i1 * anInt459 >> 16; int k1 = i * anInt459 - i1 * anInt458 >> 16; if (j1 < 50 || j1 > 3500) return false; int l1 = anInt493 + (l * WorldController.focalLength) / j1; int i2 = anInt494 + (k1 * WorldController.focalLength) / j1; return l1 >= anInt495 && l1 <= anInt497 && i2 >= anInt496 && i2 <= anInt498; } private void method315(Class43 class43, int i, int j, int k, int l, int i1, int j1, int k1) { int l1; int i2 = l1 = (j1 << 7) - anInt455; int j2; int k2 = j2 = (k1 << 7) - anInt457; int l2; int i3 = l2 = i2 + 128; int j3; int k3 = j3 = k2 + 128; int l3 = anIntArrayArrayArray440[i][j1][k1] - anInt456; int i4 = anIntArrayArrayArray440[i][j1 + 1][k1] - anInt456; int j4 = anIntArrayArrayArray440[i][j1 + 1][k1 + 1] - anInt456; int k4 = anIntArrayArrayArray440[i][j1][k1 + 1] - anInt456; int l4 = k2 * l + i2 * i1 >> 16; k2 = k2 * i1 - i2 * l >> 16; i2 = l4; l4 = l3 * k - k2 * j >> 16; k2 = l3 * j + k2 * k >> 16; l3 = l4; if (k2 < 50) return; l4 = j2 * l + i3 * i1 >> 16; j2 = j2 * i1 - i3 * l >> 16; i3 = l4; l4 = i4 * k - j2 * j >> 16; j2 = i4 * j + j2 * k >> 16; i4 = l4; if (j2 < 50) return; l4 = k3 * l + l2 * i1 >> 16; k3 = k3 * i1 - l2 * l >> 16; l2 = l4; l4 = j4 * k - k3 * j >> 16; k3 = j4 * j + k3 * k >> 16; j4 = l4; if (k3 < 50) return; l4 = j3 * l + l1 * i1 >> 16; j3 = j3 * i1 - l1 * l >> 16; l1 = l4; l4 = k4 * k - j3 * j >> 16; j3 = k4 * j + j3 * k >> 16; k4 = l4; if (j3 < 50) return; int i5 = Rasterizer.textureInt1 + (i2 * WorldController.focalLength) / k2; int j5 = Rasterizer.textureInt2 + (l3 * WorldController.focalLength) / k2; int k5 = Rasterizer.textureInt1 + (i3 * WorldController.focalLength) / j2; int l5 = Rasterizer.textureInt2 + (i4 * WorldController.focalLength) / j2; int i6 = Rasterizer.textureInt1 + (l2 * WorldController.focalLength) / k3; int j6 = Rasterizer.textureInt2 + (j4 * WorldController.focalLength) / k3; int k6 = Rasterizer.textureInt1 + (l1 * WorldController.focalLength) / j3; int l6 = Rasterizer.textureInt2 + (k4 * WorldController.focalLength) / j3; Rasterizer.anInt1465 = 0; if ((i6 - k6) * (l5 - l6) - (j6 - l6) * (k5 - k6) > 0) { private void method316(int i, int j, int k, ShapedTile shapedTile, int l, int i1, int j1) { int k1 = shapedTile.origVertexX.length; for (int l1 = 0; l1 < k1; l1++) { int i2 = shapedTile.origVertexX[l1] - anInt455; int k2 = shapedTile.origVertexY[l1] - anInt456; int i3 = shapedTile.origVertexZ[l1] - anInt457; int k3 = i3 * k + i2 * j1 >> 16; i3 = i3 * j1 - i2 * k >> 16; i2 = k3; k3 = k2 * l - i3 * j >> 16; i3 = k2 * j + i3 * l >> 16; k2 = k3; if (i3 < 50) return; if (Configuration.enableHDTextures || shapedTile.triangleTexture != null) { shapedTile.viewSpaceX[l1] = i2; shapedTile.viewSpaceY[l1] = k2; shapedTile.viewSpaceZ[l1] = i3; } shapedTile.screenX[l1] = Rasterizer.textureInt1 + (i2 * WorldController.focalLength) / i3; shapedTile.screenY[l1] = Rasterizer.textureInt2 + (k2 * WorldController.focalLength) / i3; shapedTile.viewSpaceZ[l1] = i3; shapedTile.viewSpaceZ[l1] = i3; } Rasterizer.anInt1465 = 0; k1 = shapedTile.triangleA.length; Step 5: Some model fixes Open 'Model.java' search for 'method443' (or 'renderAtPoint') and look around for some more of those '>> 9' and replace like we did before in 'method443' The following will be my methods using the focalLength, which may vary from yours. @Override public final void method443(int i, int j, int k, int l, int i1, int j1, int k1, int l1, int i2) { int j2 = l1 * i1 - j1 * l >> 16; int k2 = k1 * j + j2 * k >> 16; int l2 = anInt1650 * k >> 16; int i3 = k2 + l2; if (i3 <= 50 || k2 >= 3500) return; int j3 = l1 * l + j1 * i1 >> 16; int k3 = (j3 - anInt1650) * WorldController.focalLength; if (k3 / i3 >= DrawingArea.centerY) return; int l3 = (j3 + anInt1650) * WorldController.focalLength; if (l3 / i3 <= -DrawingArea.centerY) return; int i4 = k1 * k - j2 * j >> 16; int j4 = anInt1650 * j >> 16; int k4 = (i4 + j4) * WorldController.focalLength; if (k4 / i3 <= -DrawingArea.anInt1387) return; int l4 = j4 + (super.modelHeight * k >> 16); int i5 = (i4 - l4) * WorldController.focalLength; if (i5 / i3 >= DrawingArea.anInt1387) return; int j5 = l2 + (super.modelHeight * j >> 16); boolean flag = false; if (k2 - j5 <= 50) flag = true; boolean flag1 = false; if (i2 > 0 && objectExists) { int k5 = k2 - l2; if (k5 <= 50) k5 = 50; if (j3 > 0) { k3 /= i3; l3 /= k5; } else { l3 /= i3; k3 /= k5; } if (i4 > 0) { i5 /= i3; k4 /= k5; } else { k4 /= i3; i5 /= k5; } int i6 = currentCursorX - Rasterizer.textureInt1; int k6 = currentCursorY - Rasterizer.textureInt2; if (i6 > k3 && i6 < l3 && k6 > i5 && k6 < k4) if (aBoolean1659) anIntArray1688[objectsRendered++] = i2; else flag1 = true; } int l5 = Rasterizer.textureInt1; int j6 = Rasterizer.textureInt2; int l6 = 0; int i7 = 0; if (i != 0) { l6 = SINE[i]; i7 = COSINE[i]; } for (int j7 = 0; j7 < numberOfVerticeCoordinates; j7++) { int k7 = verticesXCoordinate[j7]; int l7 = verticesYCoordinate[j7]; int i8 = verticesZCoordinate[j7]; if (i != 0) { int j8 = i8 * l6 + k7 * i7 >> 16; i8 = i8 * i7 - k7 * l6 >> 16; k7 = j8; } k7 += j1; l7 += k1; i8 += l1; int k8 = i8 * l + k7 * i1 >> 16; i8 = i8 * i1 - k7 * l >> 16; k7 = k8; k8 = l7 * k - i8 * j >> 16; i8 = l7 * j + i8 * k >> 16; l7 = k8; anIntArray1667[j7] = i8 - k2; if (i8 >= 50) { projected_vertex_x[j7] = (l5 + k7 * WorldController.focalLength / i8); projected_vertex_y[j7] = (j6 + l7 * WorldController.focalLength / i8); if (Rasterizer.saveDepth) { vertexPerspectiveDepth[j7] = i8; } } else { projected_vertex_x[j7] = -5000; flag = true; } if (flag || numberOfTexturedFaces > 0) { camera_vertex_y[j7] = k7; camera_vertex_x[j7] = l7; camera_vertex_z[j7] = i8; } } try { method483(flag, flag1, i2); return; } catch (Exception _ex) { return; } } 9 Link to comment Share on other sites More sharing options...
Yvnghills 10 Posted April 30, 2020 Report Share Posted April 30, 2020 Fxcking amazing, appreciate tha contribution lad Link to comment Share on other sites More sharing options...
Origin 1,874 Posted June 10, 2020 Report Share Posted June 10, 2020 this was an intense read. appreciate the information Link to comment Share on other sites More sharing options...
khepius 0 Posted November 25, 2022 Report Share Posted November 25, 2022 sasank Link to comment Share on other sites More sharing options...
umix 0 Posted June 11, 2023 Report Share Posted June 11, 2023 Its cool to see how you set this code up. Thanks for sharing. Link to comment Share on other sites More sharing options...
GodJesseJames 912 Posted June 11, 2023 Report Share Posted June 11, 2023 awesome Link to comment Share on other sites More sharing options...
Juice2 0 Posted June 12, 2023 Report Share Posted June 12, 2023 Thank you for this! 😍 Link to comment Share on other sites More sharing options...
Anežka 3 Posted June 17, 2023 Report Share Posted June 17, 2023 very nice Link to comment Share on other sites More sharing options...
DruggedCamels 0 Posted August 10, 2023 Report Share Posted August 10, 2023 very nice Link to comment Share on other sites More sharing options...
vaulkin 0 Posted September 28, 2023 Report Share Posted September 28, 2023 Ayo nice Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now