Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • jennipher11: and now its back
      November 27, 2020, 03:38:57 PM
    • jennipher11: it was the best rsps
      November 27, 2020, 03:38:52 PM
    • jennipher11: try out dodian.net
      November 27, 2020, 03:38:39 PM
    • ZamorakRSPS:[link]
      November 22, 2020, 06:45:19 PM
    • thewraith500: 08 member here come play my server been up for 3 years developing just now advertising Autoscape.org very fun osrs style with some pre-eoc and customs designed by m
      November 20, 2020, 05:53:25 PM
    • Mod Thunder: checkin in from 2008 as well
      November 20, 2020, 05:16:15 AM
    • echaze: anyone still play rsc?
      November 16, 2020, 02:38:40 PM
    • zephrrr: hey all oldie here too. trying to find trpk players
      November 14, 2020, 05:14:26 PM
    • Vengpwe: 08' member checking in.. Hi there guys, long time no see. Any old timers left?
      November 14, 2020, 11:12:42 AM
    • sini: :O
      November 12, 2020, 06:41:02 PM
    • doom_j: you all suck
      November 08, 2020, 09:11:32 PM
    • arham 4: Lmao I remember you Dharma
      November 08, 2020, 02:08:17 PM
    • Dharma: damn why is this site full of spam? :/
      November 06, 2020, 10:37:06 PM
    • 317guy: The feeling knowing this website is where my programming career started thankyou moparscape long time no see
      October 30, 2020, 11:46:05 PM
    • lordy570: long time no see
      October 29, 2020, 09:53:24 AM
    • asshole_rule: no
      October 28, 2020, 08:04:33 PM
    • twins: Wow! Moparscape still exists?!?!?!
      October 28, 2020, 04:47:48 PM
    • Kozs: I'm 23 years old now in 2020, oh have I grown up and Moparscape still has a spot in me heart
      October 25, 2020, 04:20:01 PM
    • Kozs: Love you moparscape, joined here in 2011
      October 25, 2020, 04:19:36 PM
    • iddsyou: great RSPS! [link]  Join us on Discord! [link]  Download: [link]
      October 04, 2020, 03:52:32 AM

    Author Topic: d530 - Rewritten build 530 Runescape client  (Read 5507 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    d530 - Rewritten build 530 Runescape client
    « on: August 01, 2016, 03:50:51 PM »
    This is my personal rewrite of the 530 build of the Runescape client. A lot of class names are placeholders; because they just honestly look better than ClassABC. Some of the placeholders contain information about what they are used with, but don't exactly describe their purpose just yet sufficiently. Don't call me retarded because the names don't make sense in certain cases, I know that. It's just temporary. You try and deduce half of this shit, it's really obscure.

    This client renders farther than a normal client. Pictures below.

    Repository[/url]

    Runescape Gambling

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: d530 - Rewritten build 530 Runescape client
    « Reply #1 on: August 01, 2016, 05:29:44 PM »
    Alright give me a second I can find exactly where it is. I left it out of here, sorry I thought I had it but I guess not.

    Just a warning, I may not have done this correctly, I don't expect it to be. It's sort of a trade secret I wanted to keep since it's unique but if you're not a dumb monkey you can figure it out.

    So you have to update the fog distance to be as far as you want. Or just remove it. Your call.

    Code: Java
    1.  staticfinalvoid setFogColor(int color, int offset){
    2.     if(fogColor != color || fogOffset != offset){
    3.       fogColor = color;
    4.       fogOffset = offset;
    5.       GL var2 = GlRenderer.gl;
    6.       byte minimumStart =50;
    7.       // 7 tiles
    8.       short fogEnd =3584;/*3584*/
    9.      
    10.       fogColorRgb[0]=(float)(color >>16&255)/ 255.0F;
    11.       fogColorRgb[1]=(float)(color >>8&255)/ 255.0F;
    12.       fogColorRgb[2]=(float)(color &255)/ 255.0F;
    13.       // GL_FOG_MODE, GL_LINEAR
    14.       var2.glFogi(2917, 9729);
    15.       var2.glFogf(2914, 0.95F);
    16.       // GL_FOG_HINT, GL_FASTEST
    17.       var2.glHint(3156, 4354);
    18.       int fogStart = fogEnd -512- offset;
    19.       if(fogStart < minimumStart){
    20.         fogStart = minimumStart;
    21.       }
    22.       var2.glFogf(2915, (float) fogStart);
    23.       var2.glFogf(2916, (float)(fogEnd -256));
    24.       var2.glFogfv(2918, fogColorRgb, 0);
    25.     }
    26.   }
    27.  
    28.  

    Then you have to update the projection frustrum far distance to be greater than 3584. Distance you want, take 512 and multiply it by the number of tiles.

    Code: Java
    1. staticfinalvoid method1844(int x, int y, int width, int height, int offX, int offY,
    2.                                float rotationX, float rotationY, int ratioWidth, int ratioHeight){
    3.     int left =(x - offX <<8)/ ratioWidth;
    4.     int right =(x + width - offX <<8)/ ratioWidth;
    5.     int top =(y - offY <<8)/ ratioHeight;
    6.     int bottom =(y + height - offY <<8)/ ratioHeight;
    7.     gl.glMatrixMode(5889);
    8.     gl.glLoadIdentity();
    9.     setProjectionMatrix((float) left * aFloat1801, (float) right * aFloat1801,
    10.       (float)(-bottom)* aFloat1801, (float)(-top)* aFloat1801, 50.0F, 3584F);
    11.     gl.glViewport(x, viewHeight - y - height, width, height);
    12.     gl.glMatrixMode(5888);
    13.     gl.glLoadIdentity();
    14.     gl.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
    15.     if(rotationX != 0.0F){
    16.       gl.glRotatef(rotationX, 1.0F, 0.0F, 0.0F);
    17.     }
    18.  
    19.     if(rotationY != 0.0F){
    20.       gl.glRotatef(rotationY, 0.0F, 1.0F, 0.0F);
    21.     }
    22.  
    23.     viewportSetup =false;
    24.     DummyClass17.screenLowerX= left;
    25.     Unsure.screenUpperX= right;
    26.     DummyClass3.screenUpperY= top;
    27.     BlockConfig.screenLowerY= bottom;
    28.   }
    29.  

    Then you have to update the model depth limit. Same deal.

    Code: Java
    1. finalvoid draw(int rotationY, int var2, int var3, int var4, int var5, int translateX,
    2.                   int translateY, int translateZ, long key, int var11, DummyClass0 var12){
    3.     if(this.amountVertices!=0){
    4.       if(!this.aClass6_3835.aBoolean98){
    5.         this.method1917();
    6.       }
    7.  
    8.       short var13 =this.aClass6_3835.aShort93;
    9.       short var14 =this.aClass6_3835.aShort91;
    10.       short var15 =this.aClass6_3835.aShort92;
    11.       int var16 = translateZ * var5 - translateX * var4 >>16;
    12.       int var17 = translateY * var2 + var16 * var3 >>16;
    13.       int depth = var17 +(var13 * var3 + var15 * var2 >>16);
    14.       if(depth >50){
    15.         int var19 = var17 +(-var13 * var3 + var14 * var2 >>16);
    16.         if(var19 <3584){
    17.  

    Same deal.

    Code: Java
    1. staticfinalvoid drawScene(int cameraX, int cameraY, int cameraZ, int pitch, int yaw,
    2.                               byte[][][] var5, int[] var6, int[] var7, int[] var8, int[] var9,
    3.                               int[] var10, int var11, byte var12, int var13, int var14){
    4.     if(cameraX <0){
    5.       cameraX =0;
    6.     }elseif(cameraX >= SocketStream.sceneWidth*128){
    7.       cameraX = SocketStream.sceneWidth*128-1;
    8.     }
    9.  
    10.     if(cameraZ <0){
    11.       cameraZ =0;
    12.     }elseif(cameraZ >= TextureSampler17.sceneHeight*128){
    13.       cameraZ = TextureSampler17.sceneHeight*128-1;
    14.     }
    15.  
    16.     DummyClass44.pitchSine= DummyClass40.SINE_TABLE[pitch];
    17.     LinearHashTable.pitchCosine= DummyClass40.COSINE_TABLE[pitch];
    18.     TextureSampler25.yawSine= DummyClass40.SINE_TABLE[yaw];
    19.     TextureSampler20.yawCosine= DummyClass40.COSINE_TABLE[yaw];
    20.     MilliFrameRegulator.cameraPosX= cameraX;
    21.     ClientScriptEnum.cameraY= cameraY;
    22.     TextureSampler13.cameraZ= cameraZ;
    23.     TriChromaticImageCache.cameraTileX= cameraX /128;
    24.     TextureSampler7.cameraTileZ= cameraZ /128;
    25.     DummyClass9.viewportLowerX=
    26.       TriChromaticImageCache.cameraTileX- TextureSampler8.viewportLength;
    27.     if(DummyClass9.viewportLowerX<0){
    28.       DummyClass9.viewportLowerX=0;
    29.     }
    30.  
    31.     AbstractObjectNode.viewportLowerZ=
    32.       TextureSampler7.cameraTileZ- TextureSampler8.viewportLength;
    33.     if(AbstractObjectNode.viewportLowerZ<0){
    34.       AbstractObjectNode.viewportLowerZ=0;
    35.     }
    36.  
    37.     MapScene.viewportUpperX= TriChromaticImageCache.cameraTileX+ TextureSampler8.viewportLength;
    38.     if(MapScene.viewportUpperX> SocketStream.sceneWidth){
    39.       MapScene.viewportUpperX= SocketStream.sceneWidth;
    40.     }
    41.  
    42.     SomethingTilek.viewportUpperZ= TextureSampler7.cameraTileZ+ TextureSampler8.viewportLength;
    43.     if(SomethingTilek.viewportUpperZ> TextureSampler17.sceneHeight){
    44.       SomethingTilek.viewportUpperZ= TextureSampler17.sceneHeight;
    45.     }
    46.  
    47.     short far;
    48.     if(GlRenderer.useOpenGlRenderer){
    49.       far =3584;
    50.     }else{
    51.       far =3500;
    52.     }
    53.  

    Then you have to set the viewport size to be whatever you want.

    Code: Java
    1.   // 28x28
    2.           SpawnedGameObject.initializeScene(4, 104, 104, GlRenderer.useOpenGlRenderer?28:25,
    3.             var11);
    4.  
    « Last Edit: August 01, 2016, 05:31:54 PM by sini »

    OfflinePure_

    • Member
    • ****
    • *
    • Posts: 4,687
    • Thanks: +0/-0
      • View Profile
    Re: d530 - Rewritten build 530 Runescape client
    « Reply #2 on: August 01, 2016, 06:35:31 PM »
    Doesn't dummy imply useless? usually does in rs client deob context anyway so might be confusing
    i won the forum

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: d530 - Rewritten build 530 Runescape client
    « Reply #3 on: August 01, 2016, 07:15:19 PM »
    They are useless because instances of them are never created and there is no logical organization of methods inside them. Hence dummy. There's a lot of dummy classes and I checked them all so don't worry.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: d530 - Rewritten build 530 Runescape client
    « Reply #4 on: August 02, 2016, 01:32:07 AM »
    ya jagex's obfuscation creates a lot of dummy classes used to just spread out the static methods and variables. in fact pretty much every static method even if it's related to an instantiated object will not be in the related object's class file. in my refactor i tried to move as many as i could find and create new "dummy" classes to hold potentially related static members/methods, but there's so many you could spend forever doing it

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: d530 - Rewritten build 530 Runescape client
    « Reply #5 on: August 02, 2016, 02:16:13 AM »
    It's a slow process. Yeah. Takes awhile.

    OfflineRuneAgent

    • wololo
    • Member
    • ****
    • *
    • *
    • Posts: 7,515
    • Thanks: +0/-0
      • View Profile
      • MITB FORUMS
    Re: d530 - Rewritten build 530 Runescape client
    « Reply #6 on: August 04, 2016, 08:25:36 AM »
    couldn't you just use a bytecode library and a tree of instructions to sort that out. Just move all the static fields to one shit container and remove the dummy classes as they are emptied, then you can deal with the static field container as a whole.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: d530 - Rewritten build 530 Runescape client
    « Reply #7 on: August 04, 2016, 03:58:07 PM »
    yes

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal