├── .github └── workflows │ └── gradle.yml ├── .gitignore ├── README.md ├── build.gradle ├── client ├── build.gradle ├── config.json └── src │ └── main │ └── java │ ├── plugin │ ├── Plugin.java │ ├── PluginInfo.java │ ├── PluginRepository.java │ ├── annotations │ │ └── PluginMeta.java │ └── api │ │ ├── API.java │ │ ├── FontColor.java │ │ ├── FontType.java │ │ ├── MiniMenuAction.java │ │ ├── MiniMenuEntry.java │ │ ├── MiniMenuType.java │ │ ├── Privileges.java │ │ ├── TextModifier.java │ │ └── WindowMode.java │ └── rt4 │ ├── AbstractWorld.java │ ├── AnimBase.java │ ├── AnimFrame.java │ ├── AnimFrameset.java │ ├── AreaSound.java │ ├── AreaSoundManager.java │ ├── ArrayUtils.java │ ├── AttachLocRequest.java │ ├── AudioChannel.java │ ├── AudioThread.java │ ├── BasType.java │ ├── BasTypeList.java │ ├── Base37.java │ ├── BrokenInputStream.java │ ├── BrokenOutputStream.java │ ├── BrowserControl.java │ ├── Buffer.java │ ├── BufferedFile.java │ ├── BufferedImageFrameBuffer.java │ ├── BufferedSocket.java │ ├── ByteArray.java │ ├── ByteArrayNode.java │ ├── ByteArrayNodeSecondary.java │ ├── Bzip2DState.java │ ├── Bzip2Decompressor.java │ ├── Cache.java │ ├── Camera.java │ ├── ChangeLocRequest.java │ ├── CharUtils.java │ ├── Chat.java │ ├── Cheat.java │ ├── ClanChat.java │ ├── ClanMember.java │ ├── ClientProt.java │ ├── ClientScript.java │ ├── ClientScriptList.java │ ├── CollisionMap.java │ ├── ColorImageCache.java │ ├── ColorImageCacheEntry.java │ ├── ColorUtils.java │ ├── Component.java │ ├── ComponentPointer.java │ ├── CreateManager.java │ ├── Cross.java │ ├── Cs1ScriptRunner.java │ ├── CursorType.java │ ├── CursorTypeList.java │ ├── DateUtil.java │ ├── DeadClass.java │ ├── DelayedStateChange.java │ ├── DirectByteArray.java │ ├── DisplayMode.java │ ├── Entity.java │ ├── EnumStringEntry.java │ ├── EnumType.java │ ├── EnumTypeList.java │ ├── Environment.java │ ├── Equipment.java │ ├── Find.java │ ├── Flames.java │ ├── FloType.java │ ├── FloTypeList.java │ ├── FluType.java │ ├── FluTypeList.java │ ├── FogManager.java │ ├── Font.java │ ├── FontMetricsList.java │ ├── Fonts.java │ ├── FrameBuffer.java │ ├── FriendsList.java │ ├── GameCanvas.java │ ├── GameShell.java │ ├── GlAlphaSprite.java │ ├── GlBoundingBox.java │ ├── GlBuffer.java │ ├── GlCleaner.java │ ├── GlFont.java │ ├── GlIndexedSprite.java │ ├── GlModel.java │ ├── GlModel_Class23.java │ ├── GlRaster.java │ ├── GlRenderer.java │ ├── GlSolidColorTexture.java │ ├── GlSprite.java │ ├── GlTexture.java │ ├── GlTile.java │ ├── GlVertexBufferObject.java │ ├── GlobalConfig.java │ ├── GlobalJsonConfig.java │ ├── GoSubFrame.java │ ├── GroundDecor.java │ ├── GzipDecompressor.java │ ├── HardReferenceNode.java │ ├── HashTable.java │ ├── HashTableIterator.java │ ├── HintArrowManager.java │ ├── HitBarList.java │ ├── HookRequest.java │ ├── HuffmanCodec.java │ ├── IdkType.java │ ├── IdkTypeList.java │ ├── IgnoreList.java │ ├── ImageProducerFrameBuffer.java │ ├── IndexedSprite.java │ ├── IntHashTable.java │ ├── IntNode.java │ ├── IntUtils.java │ ├── InterfaceList.java │ ├── Inv.java │ ├── InvType.java │ ├── InvTypeList.java │ ├── IsaacRandom.java │ ├── JagString.java │ ├── JavaAudioChannel.java │ ├── JavaMouseWheel.java │ ├── Js5.java │ ├── Js5CacheQueue.java │ ├── Js5CacheRequest.java │ ├── Js5CachedResourceProvider.java │ ├── Js5Compression.java │ ├── Js5GlTextureProvider.java │ ├── Js5Index.java │ ├── Js5MasterIndex.java │ ├── Js5NetQueue.java │ ├── Js5NetRequest.java │ ├── Js5QuickChatCommandDecoder.java │ ├── Js5Request.java │ ├── Js5ResourceProvider.java │ ├── Keyboard.java │ ├── LangUtils.java │ ├── Light.java │ ├── LightType.java │ ├── LightTypeList.java │ ├── Light_Class45.java │ ├── LightingManager.java │ ├── LinkedList.java │ ├── LiquidMaterialRenderer.java │ ├── LoadingBar.java │ ├── LoadingBarAwt.java │ ├── Loc.java │ ├── LocEntity.java │ ├── LocType.java │ ├── LocTypeList.java │ ├── LocalizedText.java │ ├── LoginManager.java │ ├── LongNode.java │ ├── LruHashTable.java │ ├── Map.java │ ├── MapChunk.java │ ├── MapElement.java │ ├── MapElementList.java │ ├── MapList.java │ ├── MapMarker.java │ ├── MaterialManager.java │ ├── MaterialManager_Class106.java │ ├── MaterialManager_Class106_Sub1.java │ ├── MaterialManager_Class106_Sub1_Sub1.java │ ├── MaterialManager_Class106_Sub2.java │ ├── MaterialManager_Class106_Sub2_Sub1.java │ ├── MaterialRenderer.java │ ├── MathUtils.java │ ├── MidiDecoder.java │ ├── MidiInstrument.java │ ├── MidiNote.java │ ├── MidiNoteStream.java │ ├── MidiPcmStream.java │ ├── MidiPlayer.java │ ├── Midi_Class162.java │ ├── MillisTimer.java │ ├── MiniMap.java │ ├── MiniMenu.java │ ├── MixerListener.java │ ├── MixerPcmStream.java │ ├── Model.java │ ├── MonochromeImageCache.java │ ├── MonochromeImageCacheEntry.java │ ├── Mouse.java │ ├── MouseRecorder.java │ ├── MouseWheel.java │ ├── MsiType.java │ ├── MsiTypeList.java │ ├── MusicPlayer.java │ ├── NanoTimer.java │ ├── Node.java │ ├── Npc.java │ ├── NpcList.java │ ├── NpcType.java │ ├── NpcTypeList.java │ ├── ObjStack.java │ ├── ObjStackEntity.java │ ├── ObjStackNode.java │ ├── ObjType.java │ ├── ObjTypeList.java │ ├── OverheadChat.java │ ├── Packet.java │ ├── ParamType.java │ ├── ParamTypeList.java │ ├── ParticleNode.java │ ├── ParticleSystem.java │ ├── PathFinder.java │ ├── PathingEntity.java │ ├── PathingEntity_Class147.java │ ├── PcmResampler.java │ ├── PcmSound.java │ ├── PcmStream.java │ ├── PerlinNoise.java │ ├── PlainTile.java │ ├── Player.java │ ├── PlayerAppearance.java │ ├── PlayerList.java │ ├── PlayerSkillXpTable.java │ ├── Preferences.java │ ├── ProjAnim.java │ ├── ProjAnimNode.java │ ├── Protocol.java │ ├── QuickChatCatType.java │ ├── QuickChatCatTypeList.java │ ├── QuickChatCommandDecoder.java │ ├── QuickChatPhrase.java │ ├── QuickChatPhraseType.java │ ├── QuickChatPhraseTypeList.java │ ├── RandomUtils.java │ ├── Rasteriser.java │ ├── RawModel.java │ ├── ReferenceNode.java │ ├── ReferenceNodeFactory.java │ ├── ReflectionCheck.java │ ├── SceneGraph.java │ ├── SceneGraph_Class120.java │ ├── Scenery.java │ ├── ScriptRunner.java │ ├── SecondaryHashTable.java │ ├── SecondaryLinkedList.java │ ├── SecondaryNode.java │ ├── SeqType.java │ ├── SeqTypeList.java │ ├── ServerActiveProperties.java │ ├── ServerProt.java │ ├── Shadow.java │ ├── ShadowManager.java │ ├── ShadowModelList.java │ ├── ShapedTile.java │ ├── SignLinkAudioChannel.java │ ├── SoftLruHashTable.java │ ├── SoftReferenceNode.java │ ├── SoftReferenceNodeFactory.java │ ├── SoftwareAlphaSprite.java │ ├── SoftwareFont.java │ ├── SoftwareIndexedSprite.java │ ├── SoftwareModel.java │ ├── SoftwareRaster.java │ ├── SoftwareSprite.java │ ├── Song.java │ ├── Sound.java │ ├── SoundBank.java │ ├── SoundPcmStream.java │ ├── SoundPlayer.java │ ├── SpecularMaterialRenderer.java │ ├── SpotAnim.java │ ├── SpotAnimNode.java │ ├── SpotAnimType.java │ ├── SpotAnimTypeList.java │ ├── Sprite.java │ ├── SpriteLoader.java │ ├── Sprites.java │ ├── StockMarketManager.java │ ├── StockMarketOffer.java │ ├── StringInterface.java │ ├── StringNode.java │ ├── StringUtils.java │ ├── StructType.java │ ├── StructTypeList.java │ ├── SynthEnvelope.java │ ├── SynthFilter.java │ ├── SynthInstrument.java │ ├── SynthSound.java │ ├── Texture.java │ ├── TextureOp.java │ ├── TextureOp11.java │ ├── TextureOp12.java │ ├── TextureOp14.java │ ├── TextureOp15.java │ ├── TextureOp16.java │ ├── TextureOp17.java │ ├── TextureOp19.java │ ├── TextureOp23.java │ ├── TextureOp25.java │ ├── TextureOp27.java │ ├── TextureOp28.java │ ├── TextureOp29.java │ ├── TextureOp29SubOp.java │ ├── TextureOp29SubOp1.java │ ├── TextureOp29SubOp2.java │ ├── TextureOp29SubOp3.java │ ├── TextureOp29SubOp4.java │ ├── TextureOp31.java │ ├── TextureOp32.java │ ├── TextureOp33.java │ ├── TextureOp34.java │ ├── TextureOp35.java │ ├── TextureOp37.java │ ├── TextureOp38.java │ ├── TextureOp4.java │ ├── TextureOp5.java │ ├── TextureOpBinary.java │ ├── TextureOpClamp.java │ ├── TextureOpColorFill.java │ ├── TextureOpColorGradient.java │ ├── TextureOpCombine.java │ ├── TextureOpCurve.java │ ├── TextureOpFlip.java │ ├── TextureOpHorizontalGradient.java │ ├── TextureOpInterpolate.java │ ├── TextureOpInvert.java │ ├── TextureOpMonochrome.java │ ├── TextureOpMonochromeFill.java │ ├── TextureOpNoise.java │ ├── TextureOpRange.java │ ├── TextureOpSprite.java │ ├── TextureOpTexture.java │ ├── TextureOpTile.java │ ├── TextureOpTiledSprite.java │ ├── TextureOpVerticalGradient.java │ ├── TextureProvider.java │ ├── ThreadUtils.java │ ├── Tile.java │ ├── Timer.java │ ├── TitleScreen.java │ ├── TracingException.java │ ├── TriangleNormal.java │ ├── UnderwaterMaterialRenderer.java │ ├── UnlitMaterialRenderer.java │ ├── VarbitType.java │ ├── VarbitTypeList.java │ ├── VarcDomain.java │ ├── VarpDomain.java │ ├── VarpType.java │ ├── VarpTypeList.java │ ├── VertexNormal.java │ ├── VorbisCodebook.java │ ├── VorbisFloor.java │ ├── VorbisMapping.java │ ├── VorbisResidue.java │ ├── VorbisSound.java │ ├── Wall.java │ ├── WallDecor.java │ ├── WaterMaterialRenderer.java │ ├── WaterfallMaterialRenderer.java │ ├── WordPack.java │ ├── World.java │ ├── WorldInfo.java │ ├── WorldList.java │ ├── WorldMap.java │ ├── WorldMapFont.java │ └── client.java ├── deob-annotations ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openrs2 │ └── deob │ └── annotation │ ├── OriginalArg.java │ ├── OriginalClass.java │ ├── OriginalMember.java │ └── Pc.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib ├── gluegen-rt-natives-android-aarch64.jar ├── gluegen-rt-natives-linux-aarch64.jar ├── gluegen-rt-natives-linux-amd64.jar ├── gluegen-rt-natives-linux-i586.jar ├── gluegen-rt-natives-macosx-universal.jar ├── gluegen-rt-natives-windows-amd64.jar ├── gluegen-rt-natives-windows-i586.jar ├── gluegen-rt.jar ├── gson.jar ├── jogl-all-natives-android-aarch64.jar ├── jogl-all-natives-linux-aarch64.jar ├── jogl-all-natives-linux-amd64.jar ├── jogl-all-natives-linux-i586.jar ├── jogl-all-natives-macosx-universal.jar ├── jogl-all-natives-windows-amd64.jar ├── jogl-all-natives-windows-i586.jar └── jogl-all.jar ├── playground ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── itspazaz │ └── rt4 │ └── Playground.java ├── plugin-playground ├── build.gradle └── src │ └── main │ ├── java │ ├── InterfaceDebugPlugin │ │ └── plugin.java │ ├── OverheadDebugPlugin │ │ └── plugin.java │ └── VarpLogPlugin │ │ └── plugin.java │ └── kotlin │ ├── AudioQOL │ └── plugin.kt │ ├── BasicInputQOL │ └── plugin.kt │ ├── BetterShiftDrop │ └── plugin.kt │ ├── Craftify │ └── plugin.kt │ ├── EscClose │ └── plugin.kt │ ├── LeftClickAttack │ └── plugin.kt │ ├── LoginTimer │ └── plugin.kt │ ├── MiniMenuQOL │ └── plugin.kt │ ├── RememberMyLogin │ └── plugin.kt │ ├── SlayerTrackerPlugin │ └── plugin.kt │ ├── TabReply │ └── plugin.kt │ └── XPDropPlugin │ ├── XPSprites.kt │ └── plugin.kt ├── ref └── cs2-names.txt ├── settings.gradle └── signlink ├── build.gradle └── src └── main └── java └── rt4 ├── AudioSource.java ├── CursorManager.java ├── FileOnDisk.java ├── FullScreenManager.java ├── MonotonicClock.java ├── PrivilegedRequest.java └── SignLink.java /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | name: Java CI with Gradle 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | 18 | - name: Set up JDK 8 19 | uses: actions/setup-java@v3 20 | with: 21 | java-version: '8' 22 | distribution: 'temurin' 23 | 24 | - name: Build with Gradle 25 | uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee 26 | with: 27 | arguments: build 28 | 29 | - run: mv client/build/libs/client-*.jar client/build/libs/rt4-client.jar 30 | - run: sha256sum client/build/libs/rt4-client.jar | cut -d ' ' -f 1 | tr -d '\n' > client/build/libs/rt4-client.jar.sha256 31 | 32 | - name: Upload a Build Artifact 33 | uses: actions/upload-artifact@v3.1.0 34 | with: 35 | name: rt4-client 36 | path: client/build/libs/* 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .gradle/ 3 | .vscode/ 4 | 5 | bin/ 6 | build/ 7 | dump/ 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Goals 2 | 3 | * Identify all classes 4 | * Create new static classes by grouping related members 5 | * Identify all methods 6 | * Identify all fields 7 | * Identify all local variables 8 | * Remove any remaining obfuscation (possibly none left) 9 | * Fix poor decompiler behavior (fernflower) 10 | * Replace magic numbers and bitmasks with named final fields 11 | * Refactor code to improve behavior/readability 12 | * Modernize code/libraries (High DPI support, modern refresh rates, ...) 13 | * Support existing servers via global config flags that adjust packet behaviors 14 | * Organize classes into packages 15 | 16 | OpenRS2 annotations are left in the source to build a deob map from, in case some of my changes aren't desirable. 17 | That mapping can be used to generate a new deob with everything renamed for you. 18 | 19 | ## Instructions 20 | 21 | Build requirements: 22 | * Java 8+ 23 | 24 | Runtime requirements: 25 | * SD: Java 8+ 26 | * HD on Windows, use Java 15 or lower. There is a JOGL issue on 16+ related to how they grab the WGL context from the window. 27 | * HD on Linux: Java 8+ 28 | * HD on macOS: Not possible yet on latest macOS. Might work for earlier OS versions. 29 | 30 | ``` 31 | git clone https://github.com/Pazaz/RT4-Client.git 32 | cd RT4-Client 33 | ./gradlew run 34 | ``` 35 | 36 | You will be connected to a test server automatically. 37 | This server is provided by 2009scape for their own internal developments. 38 | 39 | ## Deviations 40 | 41 | Configurable: 42 | - Packet behaviors to make it compatible with existing servers 43 | - View distance in HD 44 | - Bilinear map filtering in HD/SD 45 | - Tweening enabled by default (existed in client) 46 | - Shift-click behavior on inventory items enabled by default (existed in client) 47 | 48 | Unconfigurable: 49 | - JOGL was updated to 2.4.0 50 | - Update/render loop was decoupled to tick indepedently from each other 51 | - Camera panning input rewritten to use render loop timing 52 | - Varp array size was extended to 3500 instead of 2500 53 | - Mouse wheel camera movement (click middle button and move mouse) 54 | - Render FPS is set to your monitor's refresh rate 55 | 56 | ## Libraries Used 57 | 58 | - JOGL/Gluegen 2.4.0rc 59 | - Google Gson 2.9.0 60 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/build.gradle -------------------------------------------------------------------------------- /client/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'application' 4 | id 'org.jetbrains.kotlin.jvm' version '1.4.10' 5 | } 6 | 7 | mainClassName = 'rt4.client' 8 | version = '1.0.0' 9 | 10 | sourceCompatibility = 1.8 11 | targetCompatibility = 1.8 12 | 13 | compileJava.options.encoding = 'UTF-8' 14 | 15 | tasks.withType(JavaCompile) { 16 | options.encoding = 'UTF-8' 17 | } 18 | 19 | dependencies { 20 | compileOnly project(':deob-annotations') 21 | implementation project(':signlink') 22 | 23 | implementation 'lib:gson' 24 | implementation 'lib:gluegen-rt' 25 | implementation 'lib:gluegen-rt-natives-windows-amd64' 26 | implementation 'lib:gluegen-rt-natives-windows-i586' 27 | implementation 'lib:gluegen-rt-natives-linux-amd64' 28 | implementation 'lib:gluegen-rt-natives-linux-i586' 29 | implementation 'lib:gluegen-rt-natives-macosx-universal' 30 | implementation 'lib:gluegen-rt-natives-android-aarch64' 31 | implementation 'lib:gluegen-rt-natives-linux-aarch64' 32 | 33 | implementation 'lib:jogl-all' 34 | implementation 'lib:jogl-all-natives-linux-aarch64' 35 | implementation 'lib:jogl-all-natives-windows-amd64' 36 | implementation 'lib:jogl-all-natives-windows-i586' 37 | implementation 'lib:jogl-all-natives-linux-amd64' 38 | implementation 'lib:jogl-all-natives-linux-i586' 39 | implementation 'lib:jogl-all-natives-macosx-universal' 40 | implementation 'lib:jogl-all-natives-android-aarch64' 41 | 42 | runtime 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10' 43 | } 44 | 45 | jar { 46 | manifest { 47 | attributes 'Main-Class': "$mainClassName" 48 | } 49 | from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } } 50 | duplicatesStrategy = DuplicatesStrategy.INCLUDE 51 | } 52 | -------------------------------------------------------------------------------- /client/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ip_management": "test.2009scape.org", 3 | "ip_address": "test.2009scape.org", 4 | "world": 1, 5 | "server_port": 43594, 6 | "wl_port": 43595, 7 | "js5_port": 43595, 8 | "mouseWheelZoom": true, 9 | "pluginsFolder": "plugins" 10 | } -------------------------------------------------------------------------------- /client/src/main/java/plugin/PluginInfo.java: -------------------------------------------------------------------------------- 1 | package plugin; 2 | 3 | import plugin.annotations.PluginMeta; 4 | 5 | import java.io.File; 6 | import java.io.FileNotFoundException; 7 | import java.io.FileReader; 8 | import java.io.IOException; 9 | import java.util.Objects; 10 | import java.util.Properties; 11 | 12 | /** 13 | * A data class for storing information about plugins. 14 | * @author ceikry 15 | */ 16 | class PluginInfo { 17 | double version; 18 | String author; 19 | String description; 20 | 21 | public PluginInfo(String author, String description, double version) { 22 | this.version = version; 23 | this.author = author; 24 | this.description = description; 25 | } 26 | 27 | public static PluginInfo loadFromFile(File file) { 28 | Properties prop = new Properties(); 29 | 30 | try { 31 | prop.load(new FileReader(file)); 32 | } catch (FileNotFoundException e) { 33 | System.err.println("File does not exist! - " + file.getAbsolutePath()); 34 | return new PluginInfo("", "", 0.0); 35 | } catch (IOException e) { 36 | e.printStackTrace(); 37 | return new PluginInfo("", "", 0.0); 38 | } 39 | 40 | return new PluginInfo( 41 | prop.get("AUTHOR").toString(), 42 | prop.get("DESCRIPTION").toString(), 43 | Double.parseDouble(prop.get("VERSION").toString()) 44 | ); 45 | } 46 | 47 | public static PluginInfo loadFromClass(Class clazz) { 48 | PluginMeta info = clazz.getAnnotation(PluginMeta.class); 49 | 50 | if (info == null) { 51 | return null; 52 | } 53 | 54 | return new PluginInfo( 55 | info.author(), 56 | info.description(), 57 | info.version() 58 | ); 59 | } 60 | 61 | @Override 62 | public boolean equals(Object o) { 63 | if (this == o) return true; 64 | if (o == null || getClass() != o.getClass()) return false; 65 | PluginInfo that = (PluginInfo) o; 66 | return Double.compare(that.version, version) == 0 && Objects.equals(author, that.author) && Objects.equals(description, that.description); 67 | } 68 | 69 | @Override 70 | public int hashCode() { 71 | return Objects.hash(version, author, description); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/annotations/PluginMeta.java: -------------------------------------------------------------------------------- 1 | package plugin.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | @Retention(RetentionPolicy.RUNTIME) 7 | public @interface PluginMeta { 8 | String author(); 9 | String description(); 10 | double version(); 11 | } 12 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/api/FontColor.java: -------------------------------------------------------------------------------- 1 | package plugin.api; 2 | 3 | import java.awt.*; 4 | 5 | public class FontColor { 6 | public static FontColor YELLOW = new FontColor(16776960); 7 | 8 | public final int colorCode; 9 | 10 | public FontColor(int colorCode) { 11 | this.colorCode = colorCode; 12 | } 13 | 14 | public static FontColor fromColor(Color color) { 15 | return new FontColor((color.getRed() << 16) + (color.getGreen() << 8) + color.getBlue()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/api/FontType.java: -------------------------------------------------------------------------------- 1 | package plugin.api; 2 | 3 | public enum FontType { 4 | SMALL, 5 | LARGE 6 | } 7 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/api/MiniMenuAction.java: -------------------------------------------------------------------------------- 1 | package plugin.api; 2 | 3 | import java.util.HashMap; 4 | 5 | public enum MiniMenuAction { 6 | WALK_HERE(60), 7 | NPC_1(17), 8 | NPC_2(16), 9 | NPC_3(4), 10 | NPC_4(19), 11 | NPC_5(2), 12 | NPC_EXAMINE(1007), 13 | PLAYER_1(30), 14 | PLAYER_BLOCK(34), 15 | PLAYER_TRADE(29), 16 | PLAYER_REQ_ASSIST(37), 17 | PLAYER_FOLLOW(31), 18 | PLAYER_5(57), 19 | OBJ_1(47), 20 | OBJ_EQUIP(5), 21 | OBJ_4(35), 22 | OBJ_OPERATE(23), 23 | OBJ_5(58), 24 | OBJ_EXAMINE(1002), 25 | OBJSTACK_1(18), 26 | OBJSTACK_2(20), 27 | LOC_1(42), 28 | LOC_2(50), 29 | LOC_3(49), 30 | LOC_4(46), 31 | LOC_5(1001), 32 | LOC_EXAMINE(1004), 33 | CUSTOM_1(9990), 34 | CUSTOM_2(9991), 35 | CUSTOM_3(9992), 36 | CUSTOM_4(9993), 37 | CUSTOM_5(9994), 38 | CUSTOM_6(9995), 39 | CUSTOM_7(9996), 40 | CUSTOM_8(9997), 41 | CUSTOM_9(9998), 42 | CUSTOM_10(9999), 43 | ; 44 | 45 | public final short actionCode; 46 | public static HashMap actionCodeMap = new HashMap<>(); 47 | 48 | MiniMenuAction(int actionCode) { 49 | this.actionCode = (short) actionCode; 50 | } 51 | 52 | static { 53 | for (MiniMenuAction a : values()) { 54 | actionCodeMap.put((int) a.actionCode, a); 55 | } 56 | } 57 | 58 | public static MiniMenuAction forActionCode(short actionCode) { 59 | return actionCodeMap.get((int) actionCode); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/api/MiniMenuType.java: -------------------------------------------------------------------------------- 1 | package plugin.api; 2 | 3 | public enum MiniMenuType { 4 | NPC, 5 | PLAYER, 6 | LOCATION, 7 | TILE, 8 | OBJ, 9 | OBJSTACK, 10 | CUSTOM 11 | } 12 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/api/Privileges.java: -------------------------------------------------------------------------------- 1 | package plugin.api; 2 | 3 | public enum Privileges { 4 | NONE, 5 | PMOD, 6 | JMOD 7 | } 8 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/api/TextModifier.java: -------------------------------------------------------------------------------- 1 | package plugin.api; 2 | 3 | public enum TextModifier { 4 | CENTER, 5 | LEFT, 6 | RIGHT, 7 | SHAKE, 8 | WAVE, 9 | WAVE_2 10 | } 11 | -------------------------------------------------------------------------------- /client/src/main/java/plugin/api/WindowMode.java: -------------------------------------------------------------------------------- 1 | package plugin.api; 2 | 3 | public enum WindowMode { 4 | FIXED, 5 | RESIZABLE, 6 | FULLSCREEN 7 | } 8 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/AbstractWorld.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!gj") 7 | public abstract class AbstractWorld { 8 | 9 | @OriginalMember(owner = "client!gj", name = "j", descriptor = "I") 10 | public int country; 11 | 12 | @OriginalMember(owner = "client!gj", name = "l", descriptor = "I") 13 | public int players; 14 | 15 | @OriginalMember(owner = "client!gj", name = "o", descriptor = "I") 16 | public int flags; 17 | 18 | @OriginalMember(owner = "client!gj", name = "a", descriptor = "(I)Z") 19 | public final boolean isMembers() { 20 | return (this.flags & 0x1) != 0; 21 | } 22 | 23 | @OriginalMember(owner = "client!gj", name = "a", descriptor = "(Z)Z") 24 | public final boolean isPvp() { 25 | return (this.flags & 0x4) != 0; 26 | } 27 | 28 | @OriginalMember(owner = "client!gj", name = "c", descriptor = "(I)Z") 29 | public final boolean isLootShare() { 30 | return (this.flags & 0x8) != 0; 31 | } 32 | 33 | @OriginalMember(owner = "client!gj", name = "d", descriptor = "(I)Z") 34 | public final boolean isQuickChat() { 35 | return (this.flags & 0x2) != 0; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/AnimBase.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!jm") 9 | public final class AnimBase extends Node { 10 | 11 | @OriginalMember(owner = "client!jm", name = "p", descriptor = "I") 12 | public final int id; 13 | 14 | @OriginalMember(owner = "client!jm", name = "x", descriptor = "I") 15 | public final int transforms; 16 | 17 | @OriginalMember(owner = "client!jm", name = "v", descriptor = "[[I") 18 | public final int[][] bones; 19 | 20 | @OriginalMember(owner = "client!jm", name = "B", descriptor = "[I") 21 | public final int[] types; 22 | 23 | @OriginalMember(owner = "client!jm", name = "y", descriptor = "[Z") 24 | public final boolean[] shadow; 25 | 26 | @OriginalMember(owner = "client!jm", name = "q", descriptor = "[I") 27 | public final int[] parts; 28 | 29 | @OriginalMember(owner = "client!jm", name = "", descriptor = "(I[B)V") 30 | public AnimBase(@OriginalArg(0) int id, @OriginalArg(1) byte[] bytes) { 31 | this.id = id; 32 | @Pc(9) Buffer buffer = new Buffer(bytes); 33 | this.transforms = buffer.g1(); 34 | this.bones = new int[this.transforms][]; 35 | this.types = new int[this.transforms]; 36 | this.shadow = new boolean[this.transforms]; 37 | this.parts = new int[this.transforms]; 38 | @Pc(36) int i; 39 | for (i = 0; i < this.transforms; i++) { 40 | this.types[i] = buffer.g1(); 41 | } 42 | for (i = 0; i < this.transforms; i++) { 43 | this.shadow[i] = buffer.g1() == 1; 44 | } 45 | for (i = 0; i < this.transforms; i++) { 46 | this.parts[i] = buffer.g2(); 47 | } 48 | for (i = 0; i < this.transforms; i++) { 49 | this.bones[i] = new int[buffer.g1()]; 50 | } 51 | for (i = 0; i < this.transforms; i++) { 52 | for (@Pc(118) int j = 0; j < this.bones[i].length; j++) { 53 | this.bones[i][j] = buffer.g1(); 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/AudioThread.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | @OriginalClass("client!cj") 8 | public final class AudioThread implements Runnable { 9 | 10 | @OriginalMember(owner = "client!cj", name = "m", descriptor = "Lsignlink!ll;") 11 | public SignLink signLink; 12 | 13 | @OriginalMember(owner = "client!cj", name = "p", descriptor = "[Lclient!vh;") 14 | public final AudioChannel[] channels = new AudioChannel[2]; 15 | 16 | @OriginalMember(owner = "client!cj", name = "g", descriptor = "Z") 17 | public volatile boolean stop = false; 18 | 19 | @OriginalMember(owner = "client!cj", name = "t", descriptor = "Z") 20 | public volatile boolean running = false; 21 | 22 | @OriginalMember(owner = "client!cj", name = "run", descriptor = "()V") 23 | @Override 24 | public final void run() { 25 | this.running = true; 26 | try { 27 | while (!this.stop) { 28 | for (@Pc(9) int i = 0; i < 2; i++) { 29 | @Pc(19) AudioChannel channel = this.channels[i]; 30 | if (channel != null) { 31 | channel.loop(); 32 | } 33 | } 34 | ThreadUtils.sleep(10L); 35 | GameShell.flush(this.signLink, null); 36 | } 37 | } catch (@Pc(43) Exception ex) { 38 | ex.printStackTrace(); 39 | TracingException.report(null, ex); 40 | } finally { 41 | this.running = false; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/BasTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class BasTypeList { 8 | @OriginalMember(owner = "client!vf", name = "a", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 10 | @OriginalMember(owner = "client!nd", name = "p", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!ge", name = "a", descriptor = "(BLclient!ve;)V") 14 | public static void init(@OriginalArg(1) Js5 arg0) { 15 | archive = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!hb", name = "a", descriptor = "(ZI)Lclient!ck;") 19 | public static BasType get(@OriginalArg(1) int arg0) { 20 | @Pc(10) BasType local10 = (BasType) types.get(arg0); 21 | if (local10 != null) { 22 | return local10; 23 | } 24 | @Pc(21) byte[] local21 = archive.fetchFile(32, arg0); 25 | local10 = new BasType(); 26 | if (local21 != null) { 27 | local10.decode(new Buffer(local21)); 28 | } 29 | local10.method878(); 30 | types.put(local10, arg0); 31 | return local10; 32 | } 33 | 34 | @OriginalMember(owner = "client!jk", name = "e", descriptor = "(B)V") 35 | public static void clear() { 36 | types.clear(); 37 | } 38 | 39 | @OriginalMember(owner = "client!bi", name = "c", descriptor = "(II)V") 40 | public static void clean() { 41 | types.clean(5); 42 | } 43 | 44 | @OriginalMember(owner = "client!di", name = "d", descriptor = "(I)V") 45 | public static void removeSoft() { 46 | types.removeSoft(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Base37.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class Base37 { 8 | @OriginalMember(owner = "client!ch", name = "v", descriptor = "[B") 9 | public static final byte[] aByteArray12 = new byte[]{95, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57}; 10 | 11 | @OriginalMember(owner = "client!ge", name = "a", descriptor = "(IJ)Lclient!na;") 12 | public static JagString decode37(@OriginalArg(1) long arg0) { 13 | if (arg0 <= 0L || arg0 >= 6582952005840035281L) { 14 | return null; 15 | } else if (arg0 % 37L == 0L) { 16 | return null; 17 | } else { 18 | @Pc(32) int local32 = 0; 19 | @Pc(34) long local34 = arg0; 20 | while (local34 != 0L) { 21 | local34 /= 37L; 22 | local32++; 23 | } 24 | @Pc(48) byte[] local48 = new byte[local32]; 25 | while (arg0 != 0L) { 26 | @Pc(65) long local65 = arg0; 27 | arg0 /= 37L; 28 | local32--; 29 | local48[local32] = aByteArray12[(int) (local65 - arg0 * 37L)]; 30 | } 31 | @Pc(88) JagString local88 = new JagString(); 32 | local88.chars = local48; 33 | local88.length = local48.length; 34 | return local88; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/BrokenInputStream.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | import java.io.InputStream; 7 | 8 | @OriginalClass("client!qk") 9 | public final class BrokenInputStream extends InputStream { 10 | 11 | @OriginalMember(owner = "client!qk", name = "read", descriptor = "()I") 12 | @Override 13 | public final int read() { 14 | ThreadUtils.sleep(30000L); 15 | return -1; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/BrokenOutputStream.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | 10 | @OriginalClass("client!vg") 11 | public final class BrokenOutputStream extends OutputStream { 12 | 13 | @OriginalMember(owner = "client!vg", name = "write", descriptor = "(I)V") 14 | @Override 15 | public final void write(@OriginalArg(0) int arg0) throws IOException { 16 | throw new IOException(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/BrowserControl.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | import java.applet.Applet; 7 | 8 | public final class BrowserControl { 9 | 10 | @OriginalMember(owner = "client!gh", name = "a", descriptor = "(Ljava/lang/String;BLjava/applet/Applet;)Ljava/lang/Object;") 11 | public static Object call(@OriginalArg(0) String arg0, @OriginalArg(2) Applet arg1) throws Throwable { 12 | return null; // JSObject.getWindow(arg1).call(arg0, (Object[]) null); 13 | } 14 | 15 | @OriginalMember(owner = "client!gh", name = "a", descriptor = "(Ljava/applet/Applet;Ljava/lang/String;[Ljava/lang/Object;B)Ljava/lang/Object;") 16 | public static Object call(@OriginalArg(0) Applet arg0, @OriginalArg(1) String arg1, @OriginalArg(2) Object[] arg2) throws Throwable { 17 | return null; // JSObject.getWindow(arg0).call(arg1, arg2); 18 | } 19 | 20 | @OriginalMember(owner = "client!gh", name = "a", descriptor = "(Ljava/applet/Applet;ZLjava/lang/String;)V") 21 | public static void eval(@OriginalArg(0) Applet arg0, @OriginalArg(2) String arg1) throws Throwable { 22 | // JSObject.getWindow(arg0).eval(arg1); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/BufferedImageFrameBuffer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.awt.Component; 9 | import java.awt.*; 10 | import java.awt.image.*; 11 | import java.util.Hashtable; 12 | 13 | @OriginalClass("client!ti") 14 | public final class BufferedImageFrameBuffer extends FrameBuffer { 15 | 16 | @OriginalMember(owner = "client!ti", name = "p", descriptor = "Ljava/awt/Component;") 17 | private Component component; 18 | 19 | @OriginalMember(owner = "client!ti", name = "a", descriptor = "(IILjava/awt/Graphics;I)V") 20 | @Override 21 | public final void draw(@OriginalArg(2) Graphics graphics) { 22 | graphics.drawImage(this.image, 0, 0, this.component); 23 | } 24 | 25 | @OriginalMember(owner = "client!ti", name = "a", descriptor = "(IZILjava/awt/Component;)V") 26 | @Override 27 | public final void init(@OriginalArg(0) int height, @OriginalArg(2) int width, @OriginalArg(3) Component component) { 28 | this.pixels = new int[width * height + 1]; 29 | this.height = height; 30 | this.width = width; 31 | @Pc(22) DataBufferInt buffer = new DataBufferInt(this.pixels, this.pixels.length); 32 | @Pc(30) DirectColorModel model = new DirectColorModel(32, 16711680, 65280, 255); 33 | @Pc(40) WritableRaster raster = Raster.createWritableRaster(model.createCompatibleSampleModel(this.width, this.height), buffer, null); 34 | this.image = new BufferedImage(model, raster, false, new Hashtable()); 35 | this.component = component; 36 | this.makeTarget(); 37 | } 38 | 39 | @OriginalMember(owner = "client!ti", name = "a", descriptor = "(IIIILjava/awt/Graphics;I)V") 40 | @Override 41 | public final void drawAt(@OriginalArg(0) int width, @OriginalArg(1) int x, @OriginalArg(3) int height, @OriginalArg(4) Graphics graphics, @OriginalArg(5) int y) { 42 | @Pc(2) Shape clip = graphics.getClip(); 43 | graphics.clipRect(x, y, width, height); 44 | graphics.drawImage(this.image, 0, 0, this.component); 45 | graphics.setClip(clip); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ByteArray.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!u") 9 | public abstract class ByteArray { 10 | 11 | @OriginalMember(owner = "client!gk", name = "g", descriptor = "Z") 12 | public static boolean directBuffersUnsupported = false; 13 | 14 | @OriginalMember(owner = "client!km", name = "a", descriptor = "(ILjava/lang/Object;Z)[B") 15 | public static byte[] unwrap(@OriginalArg(1) Object in, @OriginalArg(2) boolean copy) { 16 | if (in == null) { 17 | return null; 18 | } else if (in instanceof byte[]) { 19 | @Pc(14) byte[] bytes = (byte[]) in; 20 | return copy ? copy(bytes) : bytes; 21 | } else if (in instanceof ByteArray) { 22 | @Pc(34) ByteArray array = (ByteArray) in; 23 | return array.get(); 24 | } else { 25 | throw new IllegalArgumentException(); 26 | } 27 | } 28 | 29 | @OriginalMember(owner = "client!bm", name = "a", descriptor = "(B[B)[B") 30 | public static byte[] copy(@OriginalArg(1) byte[] in) { 31 | @Pc(6) int len = in.length; 32 | @Pc(9) byte[] out = new byte[len]; 33 | JagString.copy(in, 0, out, 0, len); 34 | return out; 35 | } 36 | 37 | @OriginalMember(owner = "client!cj", name = "a", descriptor = "(ZI[B)Ljava/lang/Object;") 38 | public static Object wrap(@OriginalArg(2) byte[] bytes) { 39 | if (bytes == null) { 40 | return null; 41 | } 42 | if (bytes.length > 136 && !directBuffersUnsupported) { 43 | try { 44 | @Pc(27) ByteArray array = new DirectByteArray(); 45 | array.set(bytes); 46 | return array; 47 | } catch (@Pc(34) Throwable ex) { 48 | directBuffersUnsupported = true; 49 | } 50 | } 51 | return bytes; 52 | } 53 | 54 | @OriginalMember(owner = "client!u", name = "a", descriptor = "(I)[B") 55 | public abstract byte[] get(); 56 | 57 | @OriginalMember(owner = "client!u", name = "a", descriptor = "(I[B)V") 58 | public abstract void set(@OriginalArg(1) byte[] bytes); 59 | } 60 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ByteArrayNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!ea") 8 | public final class ByteArrayNode extends Node { 9 | 10 | @OriginalMember(owner = "client!ea", name = "t", descriptor = "[B") 11 | public final byte[] value; 12 | 13 | @OriginalMember(owner = "client!ea", name = "", descriptor = "([B)V") 14 | public ByteArrayNode(@OriginalArg(0) byte[] value) { 15 | this.value = value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ByteArrayNodeSecondary.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!hc") 8 | public final class ByteArrayNodeSecondary extends SecondaryNode { 9 | 10 | @OriginalMember(owner = "client!hc", name = "Q", descriptor = "[B") 11 | public final byte[] value; 12 | 13 | @OriginalMember(owner = "client!hc", name = "", descriptor = "([B)V") 14 | public ByteArrayNodeSecondary(@OriginalArg(0) byte[] value) { 15 | this.value = value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/CharUtils.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | public class CharUtils { 7 | @OriginalMember(owner = "client!va", name = "a", descriptor = "(IB)Z") 8 | public static boolean isLetter(@OriginalArg(0) int c) { 9 | return c >= 97 && c <= 122 || c >= 65 && c <= 90; 10 | } 11 | 12 | @OriginalMember(owner = "client!bn", name = "d", descriptor = "(II)Z") 13 | public static boolean isDigit(@OriginalArg(1) int c) { 14 | return c >= 48 && c <= 57; 15 | } 16 | 17 | @OriginalMember(owner = "client!gj", name = "a", descriptor = "(II)Z") 18 | public static boolean isLetterOrDigit(@OriginalArg(0) int c) { 19 | if (c >= 97 && c <= 122) { 20 | return true; 21 | } else if (c >= 65 && c <= 90) { 22 | return true; 23 | } else { 24 | return c >= 48 && c <= 57; 25 | } 26 | } 27 | 28 | @OriginalMember(owner = "client!we", name = "b", descriptor = "(II)Z") 29 | public static boolean isValidChar(@OriginalArg(1) int c) { 30 | if (c >= 32 && c <= 126) { 31 | return true; 32 | } else if (c >= 160 && c <= 255) { 33 | return true; 34 | } else { 35 | return c == 128 || c == 140 || c == 151 || c == 156 || c == 159; 36 | } 37 | } 38 | 39 | @OriginalMember(owner = "client!ld", name = "a", descriptor = "(IB)I") 40 | public static int toUpperCase(@OriginalArg(0) int c) { 41 | if (c >= 97 && c <= 122 || c >= 224 && c <= 254 && c != 247) { 42 | return c - 32; 43 | } else if (c == 255) { 44 | return 159; 45 | } else if (c == 156) { 46 | return 140; 47 | } else { 48 | return c; 49 | } 50 | } 51 | 52 | @OriginalMember(owner = "client!sk", name = "c", descriptor = "(II)I") 53 | public static int toLowerCase(@OriginalArg(1) int c) { 54 | if (c >= 65 && c <= 90 || c >= 192 && c <= 222 && c != 215) { 55 | return c + 32; 56 | } else if (c == 159) { 57 | return 255; 58 | } else if (c == 140) { 59 | return 156; 60 | } else { 61 | return c; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ClanChat.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class ClanChat { 8 | @OriginalMember(owner = "client!wj", name = "l", descriptor = "I") 9 | public static int transmitAt = 0; 10 | @OriginalMember(owner = "client!mj", name = "u", descriptor = "B") 11 | public static byte rank; 12 | @OriginalMember(owner = "client!e", name = "rc", descriptor = "B") 13 | public static byte minKick; 14 | @OriginalMember(owner = "client!wb", name = "m", descriptor = "Lclient!na;") 15 | public static JagString owner = null; 16 | @OriginalMember(owner = "client!be", name = "ac", descriptor = "Lclient!na;") 17 | public static JagString name = null; 18 | @OriginalMember(owner = "client!rg", name = "y", descriptor = "I") 19 | public static int size; 20 | @OriginalMember(owner = "client!qc", name = "bb", descriptor = "[Lclient!kl;") 21 | public static ClanMember[] members; 22 | 23 | @OriginalMember(owner = "client!kh", name = "b", descriptor = "(I)V") 24 | public static void leave() { 25 | Protocol.outboundBuffer.p1isaac(ClientProt.CLAN_JOINCHAT_LEAVECHAT); 26 | Protocol.outboundBuffer.p8(0L); 27 | } 28 | 29 | @OriginalMember(owner = "client!mf", name = "a", descriptor = "(JI)V") 30 | public static void join(@OriginalArg(0) long arg0) { 31 | if ((long) 0 != arg0) { 32 | Protocol.outboundBuffer.p1isaac(ClientProt.CLAN_JOINCHAT_LEAVECHAT); 33 | Protocol.outboundBuffer.p8(arg0); 34 | } 35 | } 36 | 37 | @OriginalMember(owner = "client!od", name = "a", descriptor = "(ILclient!na;)V") 38 | public static void kick(@OriginalArg(1) JagString arg0) { 39 | if (members == null) { 40 | return; 41 | } 42 | @Pc(22) long local22 = arg0.encode37(); 43 | @Pc(24) int local24 = 0; 44 | if (local22 == 0L) { 45 | return; 46 | } 47 | while (members.length > local24 && members[local24].key != local22) { 48 | local24++; 49 | } 50 | if (local24 < members.length && members[local24] != null) { 51 | Protocol.outboundBuffer.p1isaac(ClientProt.CLAN_KICKUSER); 52 | Protocol.outboundBuffer.p8(members[local24].key); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ClanMember.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!kl") 7 | public final class ClanMember extends Node { 8 | 9 | @OriginalMember(owner = "client!kl", name = "p", descriptor = "B") 10 | public byte rank; 11 | 12 | @OriginalMember(owner = "client!kl", name = "q", descriptor = "Lclient!na;") 13 | public JagString worldName; 14 | 15 | @OriginalMember(owner = "client!kl", name = "t", descriptor = "Lclient!na;") 16 | public JagString username; 17 | 18 | @OriginalMember(owner = "client!kl", name = "x", descriptor = "I") 19 | public int world; 20 | } 21 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ClientScript.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!qc") 7 | public final class ClientScript extends SecondaryNode { 8 | 9 | @OriginalMember(owner = "client!qc", name = "I", descriptor = "I") 10 | public int intArgs; 11 | 12 | @OriginalMember(owner = "client!qc", name = "L", descriptor = "I") 13 | public int intLocals; 14 | 15 | @OriginalMember(owner = "client!qc", name = "N", descriptor = "I") 16 | public int stringArgs; 17 | 18 | @OriginalMember(owner = "client!qc", name = "O", descriptor = "[I") 19 | public int[] opcodes; 20 | 21 | @OriginalMember(owner = "client!qc", name = "Q", descriptor = "[Lclient!sc;") 22 | public HashTable[] switchTables; 23 | 24 | @OriginalMember(owner = "client!qc", name = "R", descriptor = "Lclient!na;") 25 | public JagString name; 26 | 27 | @OriginalMember(owner = "client!qc", name = "S", descriptor = "I") 28 | public int stringLocals; 29 | 30 | @OriginalMember(owner = "client!qc", name = "T", descriptor = "[Lclient!na;") 31 | public JagString[] stringOperands; 32 | 33 | @OriginalMember(owner = "client!qc", name = "W", descriptor = "[I") 34 | public int[] intOperands; 35 | } 36 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ColorImageCacheEntry.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!qi") 8 | public final class ColorImageCacheEntry extends Node { 9 | 10 | @OriginalMember(owner = "client!qi", name = "s", descriptor = "I") 11 | public final int index; 12 | 13 | @OriginalMember(owner = "client!qi", name = "q", descriptor = "I") 14 | public final int row; 15 | 16 | @OriginalMember(owner = "client!qi", name = "", descriptor = "(II)V") 17 | public ColorImageCacheEntry(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { 18 | this.index = arg1; 19 | this.row = arg0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ComponentPointer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!wk") 7 | public final class ComponentPointer extends Node { 8 | 9 | @OriginalMember(owner = "client!wk", name = "r", descriptor = "I") 10 | public int interfaceId; 11 | 12 | @OriginalMember(owner = "client!wk", name = "s", descriptor = "I") 13 | public int anInt5879; 14 | } 15 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Cross.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | 5 | public class Cross { 6 | @OriginalMember(owner = "client!fi", name = "k", descriptor = "I") 7 | public static int type = 0; 8 | @OriginalMember(owner = "client!bg", name = "M", descriptor = "I") 9 | public static int milliseconds = 0; 10 | @OriginalMember(owner = "client!c", name = "eb", descriptor = "I") 11 | public static int y = 0; 12 | @OriginalMember(owner = "client!jh", name = "j", descriptor = "I") 13 | public static int x = 0; 14 | } 15 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/CursorType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!ia") 9 | public final class CursorType { 10 | 11 | @OriginalMember(owner = "client!ia", name = "a", descriptor = "I") 12 | public int hotSpotY; 13 | 14 | @OriginalMember(owner = "client!ia", name = "c", descriptor = "I") 15 | public int hotSpotX; 16 | 17 | @OriginalMember(owner = "client!ia", name = "i", descriptor = "I") 18 | private int spriteId; 19 | 20 | @OriginalMember(owner = "client!ia", name = "a", descriptor = "(B)Lclient!mm;") 21 | public final SoftwareSprite getSprite() { 22 | @Pc(7) SoftwareSprite local7 = (SoftwareSprite) CursorTypeList.sprites.get(this.spriteId); 23 | if (local7 != null) { 24 | return local7; 25 | } 26 | local7 = SoftwareSprite.loadSoftwareAlphaSprite(CursorTypeList.spritesArchive, this.spriteId); 27 | if (local7 != null) { 28 | CursorTypeList.sprites.put(local7, this.spriteId); 29 | } 30 | return local7; 31 | } 32 | 33 | @OriginalMember(owner = "client!ia", name = "a", descriptor = "(Lclient!wa;IB)V") 34 | public final void decode(@OriginalArg(0) Buffer arg0, @OriginalArg(1) int arg1) { 35 | while (true) { 36 | @Pc(18) int local18 = arg0.g1(); 37 | if (local18 == 0) { 38 | return; 39 | } 40 | this.decode(arg1, local18, arg0); 41 | } 42 | } 43 | 44 | @OriginalMember(owner = "client!ia", name = "a", descriptor = "(IIILclient!wa;)V") 45 | private void decode(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Buffer arg2) { 46 | if (arg1 == 1) { 47 | this.spriteId = arg2.g2(); 48 | } else if (arg1 == 2) { 49 | this.hotSpotX = arg2.g1(); 50 | this.hotSpotY = arg2.g1(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/CursorTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class CursorTypeList { 8 | @OriginalMember(owner = "client!ge", name = "i", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 10 | @OriginalMember(owner = "client!ah", name = "i", descriptor = "Lclient!n;") 11 | public static final SoftLruHashTable sprites = new SoftLruHashTable(2); 12 | @OriginalMember(owner = "client!mc", name = "Z", descriptor = "Lclient!ve;") 13 | public static Js5 archive; 14 | @OriginalMember(owner = "client!tk", name = "j", descriptor = "Lclient!ve;") 15 | public static Js5 spritesArchive; 16 | 17 | @OriginalMember(owner = "client!u", name = "a", descriptor = "(BLclient!ve;Lclient!ve;)V") 18 | public static void init(@OriginalArg(1) Js5 arg0, @OriginalArg(2) Js5 arg1) { 19 | archive = arg0; 20 | spritesArchive = arg1; 21 | } 22 | 23 | @OriginalMember(owner = "client!qg", name = "d", descriptor = "(II)Lclient!ia;") 24 | public static CursorType get(@OriginalArg(0) int arg0) { 25 | @Pc(10) CursorType local10 = (CursorType) types.get(arg0); 26 | if (local10 != null) { 27 | return local10; 28 | } 29 | @Pc(20) byte[] local20 = archive.fetchFile(33, arg0); 30 | local10 = new CursorType(); 31 | if (local20 != null) { 32 | local10.decode(new Buffer(local20), arg0); 33 | } 34 | types.put(local10, arg0); 35 | return local10; 36 | } 37 | 38 | @OriginalMember(owner = "client!an", name = "i", descriptor = "(I)V") 39 | public static void clear() { 40 | types.clear(); 41 | sprites.clear(); 42 | } 43 | 44 | @OriginalMember(owner = "client!c", name = "d", descriptor = "(II)V") 45 | public static void clean() { 46 | types.clean(5); 47 | sprites.clean(5); 48 | } 49 | 50 | @OriginalMember(owner = "client!ca", name = "a", descriptor = "(Z)V") 51 | public static void removeSoft() { 52 | types.removeSoft(); 53 | sprites.removeSoft(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/DeadClass.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | 5 | // Has no usages. 6 | 7 | public final class DeadClass { 8 | 9 | @OriginalMember(owner = "client!ul", name = "I", descriptor = "Lclient!gn;") 10 | public static final LruHashTable cache = new LruHashTable(4); 11 | 12 | @OriginalMember(owner = "client!ck", name = "b", descriptor = "Lclient!na;") 13 | private static final JagString aClass100_195 = JagString.parse("Discard"); 14 | @OriginalMember(owner = "client!ck", name = "o", descriptor = "Lclient!na;") 15 | private static final JagString aClass100_200 = JagString.parse("Loaded world list data"); 16 | @OriginalMember(owner = "client!cn", name = "L", descriptor = "I") 17 | public static double yawAccel = 0; 18 | 19 | @OriginalMember(owner = "client!rc", name = "R", descriptor = "Z") 20 | private static boolean aBoolean74; 21 | } 22 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/DirectByteArray.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.nio.ByteBuffer; 9 | 10 | @OriginalClass("client!ua") 11 | public final class DirectByteArray extends ByteArray { 12 | 13 | @OriginalMember(owner = "client!ua", name = "m", descriptor = "Ljava/nio/ByteBuffer;") 14 | private ByteBuffer buffer; 15 | 16 | @OriginalMember(owner = "client!ua", name = "a", descriptor = "(I[B)V") 17 | @Override 18 | public final void set(@OriginalArg(1) byte[] bytes) { 19 | this.buffer = ByteBuffer.allocateDirect(bytes.length); 20 | this.buffer.position(0); 21 | this.buffer.put(bytes); 22 | } 23 | 24 | @OriginalMember(owner = "client!ua", name = "a", descriptor = "(I)[B") 25 | @Override 26 | public final byte[] get() { 27 | @Pc(4) byte[] bytes = new byte[this.buffer.capacity()]; 28 | this.buffer.position(0); 29 | this.buffer.get(bytes); 30 | return bytes; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Entity.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!th") 8 | public abstract class Entity { 9 | 10 | @OriginalMember(owner = "client!th", name = "a", descriptor = "(III)Lclient!th;") 11 | public Entity createModel() { 12 | return this; 13 | } 14 | 15 | @OriginalMember(owner = "client!th", name = "a", descriptor = "()Z") 16 | public boolean method4543() { 17 | return false; 18 | } 19 | 20 | @OriginalMember(owner = "client!th", name = "a", descriptor = "(Lclient!th;IIIZ)V") 21 | public void method4544(@OriginalArg(0) Entity arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) boolean arg4) { 22 | } 23 | 24 | @OriginalMember(owner = "client!th", name = "a", descriptor = "(IIIII)V") 25 | public abstract void method4545(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4); 26 | 27 | @OriginalMember(owner = "client!th", name = "a", descriptor = "(IIIIIIIIJILclient!ga;)V") 28 | public abstract void render(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) long arg8, @OriginalArg(9) int arg9, @OriginalArg(10) ParticleSystem arg10); 29 | 30 | @OriginalMember(owner = "client!th", name = "b", descriptor = "()I") 31 | public abstract int getMinY(); 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/EnumStringEntry.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!hb") 8 | public final class EnumStringEntry extends Node { 9 | 10 | @OriginalMember(owner = "client!hb", name = "y", descriptor = "Lclient!na;") 11 | public final JagString value; 12 | 13 | @OriginalMember(owner = "client!hb", name = "", descriptor = "(Lclient!na;I)V") 14 | public EnumStringEntry(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1) { 15 | this.value = arg0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/EnumTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class EnumTypeList { 8 | @OriginalMember(owner = "client!lj", name = "p", descriptor = "Lclient!gn;") 9 | public static final LruHashTable types = new LruHashTable(128); 10 | @OriginalMember(owner = "client!gk", name = "e", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!gl", name = "a", descriptor = "(Lclient!ve;I)V") 14 | public static void init(@OriginalArg(0) Js5 arg0) { 15 | archive = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!ui", name = "a", descriptor = "(IZ)Lclient!ml;") 19 | public static EnumType get(@OriginalArg(0) int arg0) { 20 | @Pc(10) EnumType local10 = (EnumType) types.get(arg0); 21 | if (local10 != null) { 22 | return local10; 23 | } 24 | @Pc(24) byte[] local24 = archive.fetchFile(getGroupId(arg0), getFileId(arg0)); 25 | local10 = new EnumType(); 26 | if (local24 != null) { 27 | local10.decode(new Buffer(local24)); 28 | } 29 | types.put(local10, arg0); 30 | return local10; 31 | } 32 | 33 | @OriginalMember(owner = "client!i", name = "e", descriptor = "(BI)I") 34 | public static int getFileId(@OriginalArg(1) int arg0) { 35 | return arg0 & 0xFF; 36 | } 37 | 38 | @OriginalMember(owner = "client!hi", name = "a", descriptor = "(BI)I") 39 | public static int getGroupId(@OriginalArg(1) int arg0) { 40 | return arg0 >>> 8; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Equipment.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | import org.openrs2.deob.annotation.Pc; 5 | 6 | public class Equipment { 7 | @OriginalMember(owner = "client!ta", name = "p", descriptor = "[I") 8 | public static int[] objIds; 9 | 10 | @OriginalMember(owner = "client!eh", name = "a", descriptor = "(I)V") 11 | public static void init() { 12 | @Pc(8) int[] ids = new int[ObjTypeList.capacity]; 13 | @Pc(10) int j = 0; 14 | @Pc(12) int i; 15 | for (i = 0; i < ObjTypeList.capacity; i++) { 16 | @Pc(19) ObjType type = ObjTypeList.get(i); 17 | if (type.manwear >= 0 || type.womanwear >= 0) { 18 | ids[j++] = i; 19 | } 20 | } 21 | objIds = new int[j]; 22 | for (i = 0; i < j; i++) { 23 | objIds[i] = ids[i]; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/FloTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class FloTypeList { 8 | @OriginalMember(owner = "client!t", name = "p", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 10 | @OriginalMember(owner = "client!hj", name = "a", descriptor = "I") 11 | public static int capacity; 12 | @OriginalMember(owner = "client!cl", name = "J", descriptor = "Lclient!ve;") 13 | public static Js5 archive; 14 | 15 | @OriginalMember(owner = "client!qc", name = "a", descriptor = "(ZLclient!ve;)V") 16 | public static void init(@OriginalArg(1) Js5 arg0) { 17 | archive = arg0; 18 | capacity = archive.getGroupCapacity(4); 19 | } 20 | 21 | @OriginalMember(owner = "client!um", name = "a", descriptor = "(BI)Lclient!wl;") 22 | public static FloType method4395(@OriginalArg(1) int id) { 23 | @Pc(6) FloType floorOverlay = (FloType) types.get(id); 24 | if (floorOverlay != null) { 25 | return floorOverlay; 26 | } 27 | @Pc(30) byte[] data = archive.fetchFile(4, id); 28 | floorOverlay = new FloType(); 29 | if (data != null) { 30 | floorOverlay.decode(new Buffer(data), id); 31 | } 32 | types.put(floorOverlay, id); 33 | return floorOverlay; 34 | } 35 | 36 | @OriginalMember(owner = "client!uh", name = "e", descriptor = "(I)V") 37 | public static void removeSoft() { 38 | types.removeSoft(); 39 | } 40 | 41 | @OriginalMember(owner = "client!wh", name = "a", descriptor = "(I)V") 42 | public static void clear() { 43 | types.clear(); 44 | } 45 | 46 | @OriginalMember(owner = "client!aj", name = "c", descriptor = "(II)V") 47 | public static void clean() { 48 | types.clean(5); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/FluTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class FluTypeList { 8 | @OriginalMember(owner = "client!gj", name = "p", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 10 | @OriginalMember(owner = "client!oj", name = "x", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!qc", name = "a", descriptor = "(ZI)Lclient!ni;") 14 | public static FluType get(@OriginalArg(1) int id) { 15 | @Pc(10) FluType floorUnderlay = (FluType) types.get(id); 16 | if (floorUnderlay != null) { 17 | return floorUnderlay; 18 | } 19 | @Pc(27) byte[] data = archive.fetchFile(1, id); 20 | floorUnderlay = new FluType(); 21 | if (data != null) { 22 | floorUnderlay.decode(id, new Buffer(data)); 23 | } 24 | types.put(floorUnderlay, id); 25 | return floorUnderlay; 26 | } 27 | 28 | @OriginalMember(owner = "client!hc", name = "a", descriptor = "(Lclient!ve;I)V") 29 | public static void init(@OriginalArg(0) Js5 arg0) { 30 | archive = arg0; 31 | } 32 | 33 | @OriginalMember(owner = "client!sd", name = "f", descriptor = "(B)V") 34 | public static void removeSoft() { 35 | types.removeSoft(); 36 | } 37 | 38 | @OriginalMember(owner = "client!ed", name = "c", descriptor = "(I)V") 39 | public static void clear() { 40 | types.clear(); 41 | } 42 | 43 | @OriginalMember(owner = "client!fk", name = "b", descriptor = "(IB)V") 44 | public static void clean() { 45 | types.clean(5); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/FontMetricsList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class FontMetricsList { 8 | @OriginalMember(owner = "client!l", name = "f", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable fontMetrics = new SoftLruHashTable(4); 10 | 11 | @OriginalMember(owner = "client!li", name = "a", descriptor = "(II)Lclient!dd;") 12 | public static SoftwareFont get(@OriginalArg(1) int arg0) { 13 | @Pc(16) SoftwareFont local16 = (SoftwareFont) fontMetrics.get(arg0); 14 | if (local16 != null) { 15 | return local16; 16 | } 17 | @Pc(26) byte[] local26 = client.js5Archive13.fetchFile(arg0, 0); 18 | local16 = new SoftwareFont(local26); 19 | local16.setNameIcons(Sprites.nameIcons, null); 20 | fontMetrics.put(local16, arg0); 21 | return local16; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/FrameBuffer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.awt.Component; 9 | import java.awt.*; 10 | 11 | @OriginalClass("client!vk") 12 | public abstract class FrameBuffer { 13 | 14 | @OriginalMember(owner = "client!vk", name = "e", descriptor = "[I") 15 | protected int[] pixels; 16 | 17 | @OriginalMember(owner = "client!vk", name = "g", descriptor = "Ljava/awt/Image;") 18 | protected Image image; 19 | 20 | @OriginalMember(owner = "client!vk", name = "i", descriptor = "I") 21 | protected int height; 22 | 23 | @OriginalMember(owner = "client!vk", name = "k", descriptor = "I") 24 | protected int width; 25 | 26 | @OriginalMember(owner = "client!kd", name = "a", descriptor = "(IIZLjava/awt/Component;)Lclient!vk;") 27 | public static FrameBuffer create(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) Component arg2) { 28 | try { 29 | @Pc(16) FrameBuffer local16 = new BufferedImageFrameBuffer(); 30 | local16.init(arg0, arg1, arg2); 31 | return local16; 32 | } catch (@Pc(25) Throwable local25) { 33 | @Pc(29) ImageProducerFrameBuffer local29 = new ImageProducerFrameBuffer(); 34 | local29.init(arg0, arg1, arg2); 35 | return local29; 36 | } 37 | } 38 | 39 | @OriginalMember(owner = "client!vk", name = "a", descriptor = "(IILjava/awt/Graphics;I)V") 40 | public abstract void draw(@OriginalArg(2) Graphics graphics); 41 | 42 | @OriginalMember(owner = "client!vk", name = "a", descriptor = "(I)V") 43 | public final void makeTarget() { 44 | SoftwareRaster.setSize(this.pixels, this.width, this.height); 45 | } 46 | 47 | @OriginalMember(owner = "client!vk", name = "a", descriptor = "(IIIILjava/awt/Graphics;I)V") 48 | public abstract void drawAt(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Graphics graphics, @OriginalArg(5) int arg4); 49 | 50 | @OriginalMember(owner = "client!vk", name = "a", descriptor = "(IZILjava/awt/Component;)V") 51 | public abstract void init(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component component); 52 | } 53 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GameCanvas.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | import java.awt.Component; 8 | import java.awt.*; 9 | 10 | @OriginalClass("client!tm") 11 | public final class GameCanvas extends Canvas { 12 | 13 | @OriginalMember(owner = "client!tm", name = "m", descriptor = "Ljava/awt/Component;") 14 | private final Component component; 15 | 16 | @OriginalMember(owner = "client!tm", name = "", descriptor = "(Ljava/awt/Component;)V") 17 | public GameCanvas(@OriginalArg(0) Component component) { 18 | this.component = component; 19 | } 20 | 21 | @OriginalMember(owner = "client!tm", name = "update", descriptor = "(Ljava/awt/Graphics;)V") 22 | @Override 23 | public final void update(@OriginalArg(0) Graphics graphics) { 24 | this.component.update(graphics); 25 | } 26 | 27 | @OriginalMember(owner = "client!tm", name = "paint", descriptor = "(Ljava/awt/Graphics;)V") 28 | @Override 29 | public final void paint(@OriginalArg(0) Graphics graphics) { 30 | this.component.paint(graphics); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GlBoundingBox.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!ae") 7 | public final class GlBoundingBox { 8 | 9 | @OriginalMember(owner = "client!ae", name = "a", descriptor = "S") 10 | public short minY; 11 | 12 | @OriginalMember(owner = "client!ae", name = "b", descriptor = "S") 13 | public short maxY; 14 | 15 | @OriginalMember(owner = "client!ae", name = "c", descriptor = "S") 16 | public short cylinderRadius; 17 | 18 | @OriginalMember(owner = "client!ae", name = "d", descriptor = "S") 19 | public short maxX; 20 | 21 | @OriginalMember(owner = "client!ae", name = "e", descriptor = "S") 22 | public short minX; 23 | 24 | @OriginalMember(owner = "client!ae", name = "f", descriptor = "S") 25 | public short maxZ; 26 | 27 | @OriginalMember(owner = "client!ae", name = "g", descriptor = "S") 28 | public short minZ; 29 | 30 | @OriginalMember(owner = "client!ae", name = "h", descriptor = "Z") 31 | public boolean valid = false; 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GlBuffer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | import java.nio.ByteBuffer; 7 | 8 | @OriginalClass("client!ql") 9 | public final class GlBuffer { 10 | 11 | @OriginalMember(owner = "client!ql", name = "e", descriptor = "Lclient!vi;") 12 | public GlVertexBufferObject vbo; 13 | 14 | @OriginalMember(owner = "client!ql", name = "f", descriptor = "Ljava/nio/ByteBuffer;") 15 | public ByteBuffer buffer; 16 | 17 | @OriginalMember(owner = "client!ql", name = "b", descriptor = "Z") 18 | public boolean valid = false; 19 | 20 | @OriginalMember(owner = "client!ql", name = "a", descriptor = "I") 21 | public int pointer = 0; 22 | 23 | @OriginalMember(owner = "client!ql", name = "m", descriptor = "I") 24 | public int stride = 0; 25 | } 26 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GlModel_Class23.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!de") 7 | public final class GlModel_Class23 { 8 | 9 | @OriginalMember(owner = "client!de", name = "a", descriptor = "[S") 10 | public short[] aShortArray7; 11 | 12 | @OriginalMember(owner = "client!de", name = "b", descriptor = "[S") 13 | public short[] aShortArray8; 14 | 15 | @OriginalMember(owner = "client!de", name = "c", descriptor = "[S") 16 | public short[] aShortArray9; 17 | 18 | @OriginalMember(owner = "client!de", name = "d", descriptor = "[S") 19 | public short[] aShortArray10; 20 | } 21 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GlobalJsonConfig.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import com.google.gson.Gson; 4 | 5 | import java.io.FileReader; 6 | 7 | public class GlobalJsonConfig { 8 | public static GlobalJsonConfig instance = null; 9 | 10 | public static void load(String path) { 11 | Gson gson = new Gson(); 12 | 13 | try { 14 | instance = gson.fromJson(new FileReader(path), GlobalJsonConfig.class); 15 | } catch (Exception ex) { 16 | System.err.println("No config.json file, using defaults"); 17 | } 18 | } 19 | 20 | // ---- 21 | 22 | String ip_management; 23 | String ip_address; 24 | int world; 25 | int server_port; 26 | int wl_port; 27 | int js5_port; 28 | boolean mouseWheelZoom = GlobalConfig.MOUSEWHEEL_ZOOM; 29 | public String pluginsFolder = "plugins"; 30 | } 31 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GoSubFrame.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!hj") 7 | public final class GoSubFrame { 8 | 9 | @OriginalMember(owner = "client!hj", name = "b", descriptor = "[I") 10 | public int[] intLocals; 11 | 12 | @OriginalMember(owner = "client!hj", name = "f", descriptor = "[Lclient!na;") 13 | public JagString[] stringLocals; 14 | 15 | @OriginalMember(owner = "client!hj", name = "h", descriptor = "Lclient!qc;") 16 | public ClientScript script; 17 | 18 | @OriginalMember(owner = "client!hj", name = "k", descriptor = "I") 19 | public int pc = -1; 20 | } 21 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GroundDecor.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!bm") 7 | public final class GroundDecor { 8 | 9 | @OriginalMember(owner = "client!bm", name = "c", descriptor = "Lclient!th;") 10 | public Entity entity; 11 | 12 | @OriginalMember(owner = "client!bm", name = "g", descriptor = "I") 13 | public int xFine; 14 | 15 | @OriginalMember(owner = "client!bm", name = "i", descriptor = "I") 16 | public int anInt733; 17 | 18 | @OriginalMember(owner = "client!bm", name = "m", descriptor = "J") 19 | public long key; 20 | 21 | @OriginalMember(owner = "client!bm", name = "o", descriptor = "I") 22 | public int zFine; 23 | 24 | @OriginalMember(owner = "client!bm", name = "n", descriptor = "Z") 25 | public boolean aBoolean49 = false; 26 | } 27 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/GzipDecompressor.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.util.zip.Inflater; 9 | 10 | @OriginalClass("client!ha") 11 | public final class GzipDecompressor { 12 | 13 | @OriginalMember(owner = "client!ha", name = "j", descriptor = "Ljava/util/zip/Inflater;") 14 | private Inflater anInflater1; 15 | 16 | @OriginalMember(owner = "client!ha", name = "", descriptor = "()V") 17 | public GzipDecompressor() { 18 | this(-1, 1000000, 1000000); 19 | } 20 | 21 | @OriginalMember(owner = "client!ha", name = "", descriptor = "(III)V") 22 | private GzipDecompressor(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { 23 | } 24 | 25 | @OriginalMember(owner = "client!ha", name = "a", descriptor = "([BLclient!wa;Z)V") 26 | public final void method1842(@OriginalArg(0) byte[] arg0, @OriginalArg(1) Buffer arg1) { 27 | if (arg1.data[arg1.offset] != 31 || arg1.data[arg1.offset + 1] != -117) { 28 | throw new RuntimeException("Invalid GZIP header!"); 29 | } 30 | if (this.anInflater1 == null) { 31 | this.anInflater1 = new Inflater(true); 32 | } 33 | try { 34 | this.anInflater1.setInput(arg1.data, arg1.offset + 10, -8 - (arg1.offset + 10) + arg1.data.length); 35 | this.anInflater1.inflate(arg0); 36 | } catch (@Pc(64) Exception local64) { 37 | this.anInflater1.reset(); 38 | throw new RuntimeException("Invalid GZIP compressed data!"); 39 | } 40 | this.anInflater1.reset(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/HardReferenceNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!he") 8 | public final class HardReferenceNode extends ReferenceNode { 9 | 10 | @OriginalMember(owner = "client!he", name = "X", descriptor = "Ljava/lang/Object;") 11 | private final Object referent; 12 | 13 | @OriginalMember(owner = "client!he", name = "", descriptor = "(Ljava/lang/Object;)V") 14 | public HardReferenceNode(@OriginalArg(0) Object arg0) { 15 | this.referent = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!he", name = "a", descriptor = "(Z)Ljava/lang/Object;") 19 | @Override 20 | public final Object get() { 21 | return this.referent; 22 | } 23 | 24 | @OriginalMember(owner = "client!he", name = "e", descriptor = "(I)Z") 25 | @Override 26 | public final boolean isSoft() { 27 | return false; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/HashTableIterator.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!l") 9 | public final class HashTableIterator { 10 | 11 | @OriginalMember(owner = "client!l", name = "a", descriptor = "Lclient!ab;") 12 | private Node aClass3_135; 13 | 14 | @OriginalMember(owner = "client!l", name = "c", descriptor = "I") 15 | private int anInt3447 = 0; 16 | 17 | @OriginalMember(owner = "client!l", name = "e", descriptor = "Lclient!sc;") 18 | private final HashTable aClass133_10; 19 | 20 | @OriginalMember(owner = "client!l", name = "", descriptor = "(Lclient!sc;)V") 21 | public HashTableIterator(@OriginalArg(0) HashTable arg0) { 22 | this.aClass133_10 = arg0; 23 | } 24 | 25 | @OriginalMember(owner = "client!l", name = "a", descriptor = "(I)Lclient!ab;") 26 | public final Node method2700() { 27 | @Pc(30) Node local30; 28 | if (this.anInt3447 > 0 && this.aClass133_10.aClass3Array1[this.anInt3447 - 1] != this.aClass3_135) { 29 | local30 = this.aClass3_135; 30 | this.aClass3_135 = local30.aClass3_222; 31 | return local30; 32 | } 33 | do { 34 | if (this.aClass133_10.anInt5023 <= this.anInt3447) { 35 | return null; 36 | } 37 | local30 = this.aClass133_10.aClass3Array1[this.anInt3447++].aClass3_222; 38 | } while (local30 == this.aClass133_10.aClass3Array1[this.anInt3447 - 1]); 39 | this.aClass3_135 = local30.aClass3_222; 40 | return local30; 41 | } 42 | 43 | @OriginalMember(owner = "client!l", name = "a", descriptor = "(B)Lclient!ab;") 44 | public final Node method2701() { 45 | this.anInt3447 = 0; 46 | return this.method2700(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/HitBarList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | 5 | public class HitBarList { 6 | @OriginalMember(owner = "client!fm", name = "S", descriptor = "Lclient!n;") 7 | public static final SoftLruHashTable hitBars = new SoftLruHashTable(4); 8 | } 9 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/HookRequest.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!jl") 7 | public final class HookRequest extends Node { 8 | 9 | @OriginalMember(owner = "client!jl", name = "q", descriptor = "Lclient!be;") 10 | public Component target; 11 | 12 | @OriginalMember(owner = "client!jl", name = "r", descriptor = "Lclient!na;") 13 | public JagString opBase; 14 | 15 | @OriginalMember(owner = "client!jl", name = "w", descriptor = "I") 16 | public int mouseY; 17 | 18 | @OriginalMember(owner = "client!jl", name = "z", descriptor = "I") 19 | public int keyChar; 20 | 21 | @OriginalMember(owner = "client!jl", name = "A", descriptor = "I") 22 | public int keyCode; 23 | 24 | @OriginalMember(owner = "client!jl", name = "B", descriptor = "I") 25 | public int op; 26 | 27 | @OriginalMember(owner = "client!jl", name = "C", descriptor = "Z") 28 | public boolean aBoolean158; 29 | 30 | @OriginalMember(owner = "client!jl", name = "D", descriptor = "I") 31 | public int mouseX; 32 | 33 | @OriginalMember(owner = "client!jl", name = "E", descriptor = "[Ljava/lang/Object;") 34 | public Object[] arguments; 35 | 36 | @OriginalMember(owner = "client!jl", name = "F", descriptor = "Lclient!be;") 37 | public Component source; 38 | } 39 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/IdkTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class IdkTypeList { 8 | 9 | @OriginalMember(owner = "client!fe", name = "jb", descriptor = "Lclient!n;") 10 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 11 | 12 | @OriginalMember(owner = "client!bd", name = "g", descriptor = "Lclient!ve;") 13 | public static Js5 modelsArchive; 14 | 15 | @OriginalMember(owner = "client!ri", name = "c", descriptor = "Lclient!ve;") 16 | public static Js5 archive; 17 | 18 | @OriginalMember(owner = "client!ec", name = "z", descriptor = "I") 19 | public static int count; 20 | 21 | @OriginalMember(owner = "client!jl", name = "a", descriptor = "(ILclient!ve;Lclient!ve;)V") 22 | public static void init(@OriginalArg(1) Js5 arg0, @OriginalArg(2) Js5 arg1) { 23 | modelsArchive = arg0; 24 | archive = arg1; 25 | count = archive.getGroupCapacity(3); 26 | } 27 | 28 | @OriginalMember(owner = "client!gg", name = "d", descriptor = "(II)Lclient!dm;") 29 | public static IdkType get(@OriginalArg(0) int id) { 30 | @Pc(10) IdkType type = (IdkType) types.get(id); 31 | if (type != null) { 32 | return type; 33 | } 34 | @Pc(21) byte[] src = archive.fetchFile(3, id); 35 | type = new IdkType(); 36 | if (src != null) { 37 | type.decode(new Buffer(src)); 38 | } 39 | types.put(type, id); 40 | return type; 41 | } 42 | 43 | @OriginalMember(owner = "client!oi", name = "a", descriptor = "(I)V") 44 | public static void removeSoft() { 45 | types.removeSoft(); 46 | } 47 | 48 | @OriginalMember(owner = "client!t", name = "b", descriptor = "(I)V") 49 | public static void clear() { 50 | types.clear(); 51 | } 52 | 53 | @OriginalMember(owner = "client!te", name = "a", descriptor = "(IZ)V") 54 | public static void clean() { 55 | types.clean(5); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/IndexedSprite.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!ok") 8 | public abstract class IndexedSprite { 9 | 10 | @OriginalMember(owner = "client!ok", name = "a", descriptor = "I") 11 | public int width; 12 | 13 | @OriginalMember(owner = "client!ok", name = "d", descriptor = "I") 14 | public int yOffset; 15 | 16 | @OriginalMember(owner = "client!ok", name = "i", descriptor = "I") 17 | public int innerHeight; 18 | 19 | @OriginalMember(owner = "client!ok", name = "k", descriptor = "I") 20 | public int height; 21 | 22 | @OriginalMember(owner = "client!ok", name = "l", descriptor = "I") 23 | public int innerWidth; 24 | 25 | @OriginalMember(owner = "client!ok", name = "m", descriptor = "I") 26 | public int xOffset; 27 | 28 | @OriginalMember(owner = "client!ok", name = "", descriptor = "()V") 29 | protected IndexedSprite() { 30 | } 31 | 32 | @OriginalMember(owner = "client!ok", name = "a", descriptor = "(III)V") 33 | public abstract void method3335(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2); 34 | 35 | @OriginalMember(owner = "client!ok", name = "a", descriptor = "(II)V") 36 | public abstract void renderTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1); 37 | } 38 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/IntHashTable.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!jg") 9 | public final class IntHashTable { 10 | 11 | @OriginalMember(owner = "client!jg", name = "f", descriptor = "[I") 12 | private final int[] anIntArray285; 13 | 14 | @OriginalMember(owner = "client!jg", name = "", descriptor = "([I)V") 15 | public IntHashTable(@OriginalArg(0) int[] arg0) { 16 | @Pc(5) int local5; 17 | for (local5 = 1; local5 <= (arg0.length >> 1) + arg0.length; local5 <<= 0x1) { 18 | } 19 | this.anIntArray285 = new int[local5 + local5]; 20 | @Pc(28) int local28; 21 | for (local28 = 0; local28 < local5 + local5; local28++) { 22 | this.anIntArray285[local28] = -1; 23 | } 24 | local28 = 0; 25 | while (arg0.length > local28) { 26 | @Pc(55) int local55; 27 | for (local55 = local5 - 1 & arg0[local28]; this.anIntArray285[local55 + local55 + 1] != -1; local55 = local5 - 1 & local55 + 1) { 28 | } 29 | this.anIntArray285[local55 + local55] = arg0[local28]; 30 | this.anIntArray285[local55 + local55 + 1] = local28++; 31 | } 32 | } 33 | 34 | @OriginalMember(owner = "client!jg", name = "a", descriptor = "(II)I") 35 | public final int get(@OriginalArg(0) int arg0) { 36 | @Pc(16) int local16 = (this.anIntArray285.length >> 1) - 1; 37 | @Pc(20) int local20 = local16 & arg0; 38 | while (true) { 39 | @Pc(29) int local29 = this.anIntArray285[local20 + local20 + 1]; 40 | if (local29 == -1) { 41 | return -1; 42 | } 43 | if (arg0 == this.anIntArray285[local20 + local20]) { 44 | return local29; 45 | } 46 | local20 = local20 + 1 & local16; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/IntNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!ka") 8 | public final class IntNode extends Node { 9 | 10 | @OriginalMember(owner = "client!ka", name = "p", descriptor = "I") 11 | public int value; 12 | 13 | @OriginalMember(owner = "client!ka", name = "", descriptor = "()V") 14 | public IntNode() { 15 | } 16 | 17 | @OriginalMember(owner = "client!ka", name = "", descriptor = "(I)V") 18 | public IntNode(@OriginalArg(0) int arg0) { 19 | this.value = arg0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/InvType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!md") 9 | public final class InvType extends SecondaryNode { 10 | 11 | @OriginalMember(owner = "client!md", name = "K", descriptor = "I") 12 | public int size = 0; 13 | 14 | @OriginalMember(owner = "client!md", name = "a", descriptor = "(Lclient!wa;I)V") 15 | public final void decode(@OriginalArg(0) Buffer buffer) { 16 | while (true) { 17 | @Pc(10) int opcode = buffer.g1(); 18 | if (opcode == 0) { 19 | return; 20 | } 21 | this.decode(buffer, opcode); 22 | } 23 | } 24 | 25 | @OriginalMember(owner = "client!md", name = "a", descriptor = "(Lclient!wa;IZ)V") 26 | private void decode(@OriginalArg(0) Buffer buffer, @OriginalArg(1) int opcode) { 27 | if (opcode == 2) { 28 | this.size = buffer.g2(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/InvTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class InvTypeList { 8 | @OriginalMember(owner = "client!ha", name = "p", descriptor = "Lclient!gn;") 9 | public static final LruHashTable types = new LruHashTable(64); 10 | @OriginalMember(owner = "client!al", name = "q", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!je", name = "a", descriptor = "(ILclient!ve;)V") 14 | public static void init(@OriginalArg(1) Js5 arg0) { 15 | archive = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!u", name = "a", descriptor = "(II)Lclient!md;") 19 | public static InvType get(@OriginalArg(0) int id) { 20 | @Pc(16) InvType invType = (InvType) types.get(id); 21 | if (invType != null) { 22 | return invType; 23 | } 24 | @Pc(27) byte[] data = archive.fetchFile(5, id); 25 | invType = new InvType(); 26 | if (data != null) { 27 | invType.decode(new Buffer(data)); 28 | } 29 | types.put(invType, id); 30 | return invType; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/JavaMouseWheel.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.awt.Component; 9 | import java.awt.event.MouseWheelEvent; 10 | import java.awt.event.MouseWheelListener; 11 | 12 | import static rt4.MathUtils.clamp; 13 | 14 | @OriginalClass("client!o") 15 | public final class JavaMouseWheel extends MouseWheel implements MouseWheelListener { 16 | 17 | @OriginalMember(owner = "client!o", name = "g", descriptor = "I") 18 | public int currentRotation = 0; 19 | public int previousRotation = 0; 20 | 21 | @OriginalMember(owner = "client!o", name = "a", descriptor = "(ZLjava/awt/Component;)V") 22 | @Override 23 | public final void stop(@OriginalArg(1) Component arg0) { 24 | arg0.removeMouseWheelListener(this); 25 | } 26 | 27 | @OriginalMember(owner = "client!o", name = "a", descriptor = "(I)I") 28 | @Override 29 | public final synchronized int getRotation() { 30 | @Pc(2) int local2 = this.currentRotation; 31 | this.currentRotation = 0; 32 | return local2; 33 | } 34 | 35 | @OriginalMember(owner = "client!o", name = "mouseWheelMoved", descriptor = "(Ljava/awt/event/MouseWheelEvent;)V") 36 | @Override 37 | public final synchronized void mouseWheelMoved(@OriginalArg(0) MouseWheelEvent arg0) { 38 | this.previousRotation = this.currentRotation; 39 | this.currentRotation += arg0.getWheelRotation(); 40 | } 41 | 42 | @OriginalMember(owner = "client!o", name = "a", descriptor = "(Ljava/awt/Component;I)V") 43 | @Override 44 | public final void start(@OriginalArg(0) Component arg0) { 45 | arg0.addMouseWheelListener(this); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Js5CacheRequest.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!c") 7 | public final class Js5CacheRequest extends Js5Request { 8 | 9 | @OriginalMember(owner = "client!c", name = "X", descriptor = "Lclient!ge;") 10 | public Cache cache; 11 | 12 | @OriginalMember(owner = "client!c", name = "ab", descriptor = "[B") 13 | public byte[] data; 14 | 15 | @OriginalMember(owner = "client!c", name = "cb", descriptor = "I") 16 | public int type; 17 | 18 | @OriginalMember(owner = "client!c", name = "b", descriptor = "(Z)[B") 19 | @Override 20 | public final byte[] getData() { 21 | if (this.incomplete) { 22 | throw new RuntimeException(); 23 | } 24 | return this.data; 25 | } 26 | 27 | @OriginalMember(owner = "client!c", name = "a", descriptor = "(Z)I") 28 | @Override 29 | public final int getPercentageComplete() { 30 | return this.incomplete ? 0 : 100; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Js5Compression.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public final class Js5Compression { 8 | 9 | @OriginalMember(owner = "client!mf", name = "x", descriptor = "Lclient!ha;") 10 | public static final GzipDecompressor GZIP_DECOMPRESSOR = new GzipDecompressor(); 11 | 12 | @OriginalMember(owner = "client!kf", name = "j", descriptor = "I") 13 | public static final int MAX_LENGTH = 0; 14 | 15 | @OriginalMember(owner = "client!ml", name = "a", descriptor = "(B[B)[B") 16 | public static byte[] uncompress(@OriginalArg(1) byte[] in) { 17 | @Pc(17) Buffer buffer = new Buffer(in); 18 | @Pc(21) int type = buffer.g1(); 19 | @Pc(25) int len = buffer.g4(); 20 | if (len < 0 || MAX_LENGTH != 0 && MAX_LENGTH < len) { 21 | throw new RuntimeException(); 22 | } else if (type == 0) { 23 | @Pc(53) byte[] bytes = new byte[len]; 24 | buffer.gdata(len, bytes); 25 | return bytes; 26 | } else { 27 | @Pc(65) int uncompressedLen = buffer.g4(); 28 | if (uncompressedLen < 0 || MAX_LENGTH != 0 && MAX_LENGTH < uncompressedLen) { 29 | throw new RuntimeException(); 30 | } 31 | @Pc(85) byte[] out = new byte[uncompressedLen]; 32 | if (type == 1) { 33 | Bzip2Decompressor.bunzip2(out, uncompressedLen, in, len); 34 | } else { 35 | GZIP_DECOMPRESSOR.method1842(out, buffer); 36 | } 37 | return out; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Js5NetRequest.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!pm") 7 | public final class Js5NetRequest extends Js5Request { 8 | 9 | @OriginalMember(owner = "client!pm", name = "U", descriptor = "B") 10 | public byte trailerLen; 11 | 12 | @OriginalMember(owner = "client!pm", name = "Z", descriptor = "I") 13 | public int blockPosition; 14 | 15 | @OriginalMember(owner = "client!pm", name = "bb", descriptor = "Lclient!wa;") 16 | public Buffer buffer; 17 | 18 | @OriginalMember(owner = "client!pm", name = "a", descriptor = "(Z)I") 19 | @Override 20 | public final int getPercentageComplete() { 21 | return this.buffer == null ? 0 : this.buffer.offset * 100 / (this.buffer.data.length - this.trailerLen); 22 | } 23 | 24 | @OriginalMember(owner = "client!pm", name = "b", descriptor = "(Z)[B") 25 | @Override 26 | public final byte[] getData() { 27 | if (this.incomplete || this.buffer.offset < this.buffer.data.length - this.trailerLen) { 28 | throw new RuntimeException(); 29 | } 30 | return this.buffer.data; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Js5QuickChatCommandDecoder.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!af") 9 | public final class Js5QuickChatCommandDecoder implements QuickChatCommandDecoder { 10 | 11 | @OriginalMember(owner = "client!af", name = "a", descriptor = "(I[IIJ)Lclient!na;") 12 | @Override 13 | public final JagString decode(@OriginalArg(0) int command, @OriginalArg(1) int[] params, @OriginalArg(3) long value) { 14 | if (command == 0) { 15 | @Pc(12) EnumType type = EnumTypeList.get(params[0]); 16 | return type.getString((int) value); 17 | } else if (command == 1 || command == 10) { 18 | @Pc(31) ObjType type = ObjTypeList.get((int) value); 19 | return type.name; 20 | } else if (command == 6 || command == 7 || command == 11) { 21 | return EnumTypeList.get(params[0]).getString((int) value); 22 | } else { 23 | return null; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Js5Request.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!il") 7 | public abstract class Js5Request extends SecondaryNode { 8 | 9 | @OriginalMember(owner = "client!il", name = "L", descriptor = "Z") 10 | public boolean urgent; 11 | 12 | @OriginalMember(owner = "client!il", name = "T", descriptor = "Z") 13 | public boolean orphan; 14 | 15 | @OriginalMember(owner = "client!il", name = "P", descriptor = "Z") 16 | public volatile boolean incomplete = true; 17 | 18 | @OriginalMember(owner = "client!il", name = "a", descriptor = "(Z)I") 19 | public abstract int getPercentageComplete(); 20 | 21 | @OriginalMember(owner = "client!il", name = "b", descriptor = "(Z)[B") 22 | public abstract byte[] getData(); 23 | } 24 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Js5ResourceProvider.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!v") 8 | public abstract class Js5ResourceProvider { 9 | 10 | @OriginalMember(owner = "client!v", name = "", descriptor = "()V") 11 | protected Js5ResourceProvider() { 12 | } 13 | 14 | @OriginalMember(owner = "client!v", name = "b", descriptor = "(I)Lclient!ii;") 15 | public abstract Js5Index fetchIndex(); 16 | 17 | @OriginalMember(owner = "client!v", name = "a", descriptor = "(II)V") 18 | public abstract void prefetchGroup(@OriginalArg(0) int arg0); 19 | 20 | @OriginalMember(owner = "client!v", name = "b", descriptor = "(II)I") 21 | public abstract int getPercentageComplete(@OriginalArg(0) int arg0); 22 | 23 | @OriginalMember(owner = "client!v", name = "c", descriptor = "(II)[B") 24 | public abstract byte[] fetchGroup(@OriginalArg(0) int arg0); 25 | } 26 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/LangUtils.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public final class LangUtils { 8 | 9 | @OriginalMember(owner = "client!mc", name = "fb", descriptor = "Lclient!na;") 10 | private static final JagString LANG_PT = JagString.parse("pt"); 11 | @OriginalMember(owner = "client!mc", name = "mb", descriptor = "Lclient!na;") 12 | private static final JagString LANG_EN = JagString.parse("en"); 13 | @OriginalMember(owner = "client!mc", name = "vb", descriptor = "Lclient!na;") 14 | private static final JagString LANG_DE = JagString.parse("de"); 15 | @OriginalMember(owner = "client!mc", name = "pb", descriptor = "Lclient!na;") 16 | private static final JagString LANG_FR = JagString.parse("fr"); 17 | @OriginalMember(owner = "client!mc", name = "ob", descriptor = "[Lclient!na;") 18 | public static final JagString[] LANGUAGES = new JagString[]{LANG_EN, LANG_DE, LANG_FR, LANG_PT}; 19 | 20 | @OriginalMember(owner = "client!hm", name = "a", descriptor = "(Lclient!na;B)I") 21 | public static int method2053(@OriginalArg(0) JagString arg0) { 22 | for (@Pc(12) int local12 = 0; local12 < LANGUAGES.length; local12++) { 23 | if (LANGUAGES[local12].equalsIgnoreCase(arg0)) { 24 | return local12; 25 | } 26 | } 27 | return -1; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/LightType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!ic") 9 | public final class LightType { 10 | 11 | @OriginalMember(owner = "client!ic", name = "g", descriptor = "I") 12 | public int anInt2867 = 2048; 13 | 14 | @OriginalMember(owner = "client!ic", name = "c", descriptor = "I") 15 | public int anInt2865 = 0; 16 | 17 | @OriginalMember(owner = "client!ic", name = "o", descriptor = "I") 18 | public int anInt2872 = 0; 19 | 20 | @OriginalMember(owner = "client!ic", name = "p", descriptor = "I") 21 | public int anInt2873 = 2048; 22 | 23 | @OriginalMember(owner = "client!ic", name = "a", descriptor = "(ILclient!wa;I)V") 24 | public final void decode(@OriginalArg(1) Buffer arg0, @OriginalArg(2) int arg1) { 25 | while (true) { 26 | @Pc(5) int local5 = arg0.g1(); 27 | if (local5 == 0) { 28 | return; 29 | } 30 | this.method2258(local5, arg0, arg1); 31 | } 32 | } 33 | 34 | @OriginalMember(owner = "client!ic", name = "a", descriptor = "(ILclient!wa;IZ)V") 35 | private void method2258(@OriginalArg(0) int arg0, @OriginalArg(1) Buffer arg1, @OriginalArg(2) int arg2) { 36 | if (arg0 == 1) { 37 | this.anInt2865 = arg1.g1(); 38 | } else if (arg0 == 2) { 39 | this.anInt2873 = arg1.g2(); 40 | } else if (arg0 == 3) { 41 | this.anInt2867 = arg1.g2(); 42 | } else if (arg0 == 4) { 43 | this.anInt2872 = arg1.g2b(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/LightTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class LightTypeList { 8 | @OriginalMember(owner = "client!rm", name = "d", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 10 | @OriginalMember(owner = "client!gl", name = "a", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!id", name = "a", descriptor = "(Lclient!ve;B)V") 14 | public static void init(@OriginalArg(0) Js5 arg0) { 15 | archive = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!la", name = "a", descriptor = "(II)Lclient!ic;") 19 | public static LightType get(@OriginalArg(1) int arg0) { 20 | @Pc(10) LightType local10 = (LightType) types.get(arg0); 21 | if (local10 != null) { 22 | return local10; 23 | } 24 | @Pc(26) byte[] local26 = archive.fetchFile(31, arg0); 25 | local10 = new LightType(); 26 | if (local26 != null) { 27 | local10.decode(new Buffer(local26), arg0); 28 | } 29 | types.put(local10, arg0); 30 | return local10; 31 | } 32 | 33 | @OriginalMember(owner = "client!c", name = "c", descriptor = "(II)V") 34 | public static void clean() { 35 | types.clean(5); 36 | } 37 | 38 | @OriginalMember(owner = "client!gd", name = "b", descriptor = "(I)V") 39 | public static void clear() { 40 | types.clear(); 41 | } 42 | 43 | @OriginalMember(owner = "client!hd", name = "a", descriptor = "(I)V") 44 | public static void removeSoft() { 45 | types.removeSoft(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/LoadingBar.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class LoadingBar { 8 | @OriginalMember(owner = "client!oj", name = "a", descriptor = "(BZLclient!rk;)V") 9 | public static void render(@OriginalArg(1) boolean arg0, @OriginalArg(2) Font arg1) { 10 | @Pc(9) int local9; 11 | if (GlRenderer.enabled || arg0) { 12 | local9 = GameShell.canvasHeight; 13 | @Pc(15) int local15 = local9 * 956 / 503; 14 | TitleScreen.titleBg.renderResized((GameShell.canvasWidth - local15) / 2, 0, local15, local9); 15 | TitleScreen.logo.renderTransparent(GameShell.canvasWidth / 2 - TitleScreen.logo.width / 2, 18); 16 | } 17 | arg1.renderCenter(LocalizedText.GAME0_LOADING, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 - 26, 16777215, -1); 18 | local9 = GameShell.canvasHeight / 2 - 18; 19 | if (GlRenderer.enabled) { 20 | GlRaster.drawRect(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409); 21 | GlRaster.drawRect(GameShell.canvasWidth / 2 - 151, local9 - -1, 302, 32, 0); 22 | GlRaster.fillRect(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409); 23 | GlRaster.fillRect(GameShell.canvasWidth / 2 + client.mainLoadPercentage * 3 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0); 24 | } else { 25 | SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409); 26 | SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 151, local9 + 1, 302, 32, 0); 27 | SoftwareRaster.fillRect(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409); 28 | SoftwareRaster.fillRect(client.mainLoadPercentage * 3 + GameShell.canvasWidth / 2 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0); 29 | } 30 | arg1.renderCenter(client.mainLoadSecondaryText, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 + 4, 16777215, -1); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/LocEntity.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!sm") 7 | public final class LocEntity { 8 | 9 | @OriginalMember(owner = "client!sm", name = "a", descriptor = "Lclient!ek;") 10 | public SoftwareIndexedSprite sprite; 11 | 12 | @OriginalMember(owner = "client!sm", name = "j", descriptor = "Lclient!th;") 13 | public Entity model; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/LongNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!eb") 8 | public final class LongNode extends Node { 9 | 10 | @OriginalMember(owner = "client!eb", name = "v", descriptor = "J") 11 | public long value; 12 | 13 | @OriginalMember(owner = "client!eb", name = "", descriptor = "(J)V") 14 | public LongNode(@OriginalArg(0) long arg0) { 15 | this.value = arg0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MapChunk.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!lh") 8 | public final class MapChunk extends Node { 9 | 10 | @OriginalMember(owner = "client!lh", name = "y", descriptor = "I") 11 | public final int displayMinZ; 12 | 13 | @OriginalMember(owner = "client!lh", name = "v", descriptor = "I") 14 | public final int displayMaxX; 15 | 16 | @OriginalMember(owner = "client!lh", name = "w", descriptor = "I") 17 | public final int displayMaxZ; 18 | 19 | @OriginalMember(owner = "client!lh", name = "t", descriptor = "I") 20 | public final int displayMinX; 21 | 22 | @OriginalMember(owner = "client!lh", name = "", descriptor = "(IIII)V") 23 | public MapChunk(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { 24 | this.displayMinZ = arg3; 25 | this.displayMaxX = arg1; 26 | this.displayMaxZ = arg2; 27 | this.displayMinX = arg0; 28 | } 29 | 30 | @OriginalMember(owner = "client!lh", name = "a", descriptor = "(BII)Z") 31 | public final boolean containsDisplay(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { 32 | return arg1 >= this.displayMinX && this.displayMaxZ >= arg1 && this.displayMaxX <= arg0 && arg0 <= this.displayMinZ; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MapElement.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!oj") 7 | public final class MapElement extends Node { 8 | 9 | @OriginalMember(owner = "client!oj", name = "q", descriptor = "I") 10 | public int anInt4307; 11 | 12 | @OriginalMember(owner = "client!oj", name = "r", descriptor = "I") 13 | public int id; 14 | 15 | @OriginalMember(owner = "client!oj", name = "A", descriptor = "I") 16 | public int anInt4314; 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MapMarker.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!nc") 7 | public final class MapMarker { 8 | 9 | @OriginalMember(owner = "client!nc", name = "b", descriptor = "I") 10 | public int anInt4045; 11 | 12 | @OriginalMember(owner = "client!nc", name = "c", descriptor = "I") 13 | public int anInt4046; 14 | 15 | @OriginalMember(owner = "client!nc", name = "f", descriptor = "I") 16 | public int anInt4047; 17 | 18 | @OriginalMember(owner = "client!nc", name = "g", descriptor = "I") 19 | public int anInt4048; 20 | 21 | @OriginalMember(owner = "client!nc", name = "i", descriptor = "I") 22 | public int anInt4050; 23 | 24 | @OriginalMember(owner = "client!nc", name = "l", descriptor = "I") 25 | public int targetX; 26 | 27 | @OriginalMember(owner = "client!nc", name = "p", descriptor = "I") 28 | public int actorTargetId; 29 | 30 | @OriginalMember(owner = "client!nc", name = "q", descriptor = "I") 31 | public int type; 32 | 33 | @OriginalMember(owner = "client!nc", name = "k", descriptor = "I") 34 | public int playerModelId = -1; 35 | } 36 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MaterialManager_Class106_Sub1_Sub1.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!ng") 9 | public final class MaterialManager_Class106_Sub1_Sub1 extends MaterialManager_Class106_Sub1 { 10 | 11 | @OriginalMember(owner = "client!ng", name = "O", descriptor = "[B") 12 | private byte[] aByteArray58; 13 | 14 | @OriginalMember(owner = "client!ng", name = "", descriptor = "()V") 15 | public MaterialManager_Class106_Sub1_Sub1() { 16 | super(8, 5, 8, 8, 2, 0.1F, 0.55F, 3.0F); 17 | } 18 | 19 | @OriginalMember(owner = "client!ng", name = "b", descriptor = "(III)[B") 20 | public final byte[] method3215() { 21 | this.aByteArray58 = new byte[524288]; 22 | this.method3841(); 23 | return this.aByteArray58; 24 | } 25 | 26 | @OriginalMember(owner = "client!ng", name = "a", descriptor = "(IB)V") 27 | @Override 28 | protected final void method3209(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { 29 | @Pc(3) int local3 = arg0 * 2; 30 | @Pc(7) int local7 = arg1 & 0xFF; 31 | @Pc(10) int local10 = local3; 32 | @Pc(11) int local11 = local3 + 1; 33 | this.aByteArray58[local10] = (byte) (local7 * 3 >> 5); 34 | this.aByteArray58[local11] = (byte) (local7 >> 2); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MaterialManager_Class106_Sub2_Sub1.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!sb") 9 | public final class MaterialManager_Class106_Sub2_Sub1 extends MaterialManager_Class106_Sub2 { 10 | 11 | @OriginalMember(owner = "client!sb", name = "I", descriptor = "[B") 12 | private byte[] aByteArray68; 13 | 14 | @OriginalMember(owner = "client!sb", name = "", descriptor = "()V") 15 | public MaterialManager_Class106_Sub2_Sub1() { 16 | super(12, 5, 16, 2, 2, 0.45F); 17 | } 18 | 19 | @OriginalMember(owner = "client!sb", name = "a", descriptor = "(IB)V") 20 | @Override 21 | protected final void method3853(@OriginalArg(0) int arg0, @OriginalArg(1) byte arg1) { 22 | @Pc(3) int local3 = arg0 * 2; 23 | @Pc(12) byte local12 = (byte) ((arg1 >> 1 & 0x7F) + 127); 24 | @Pc(15) int local15 = local3; 25 | @Pc(16) int local16 = local3 + 1; 26 | this.aByteArray68[local15] = local12; 27 | this.aByteArray68[local16] = local12; 28 | } 29 | 30 | @OriginalMember(owner = "client!sb", name = "b", descriptor = "(III)[B") 31 | public final byte[] method3854() { 32 | this.aByteArray68 = new byte[524288]; 33 | this.method3841(); 34 | return this.aByteArray68; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MaterialRenderer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!pc") 8 | public interface MaterialRenderer { 9 | 10 | @OriginalMember(owner = "client!pc", name = "a", descriptor = "()V") 11 | void unbind(); 12 | 13 | @OriginalMember(owner = "client!pc", name = "b", descriptor = "()V") 14 | void bind(); 15 | 16 | @OriginalMember(owner = "client!pc", name = "a", descriptor = "(I)V") 17 | void setArgument(@OriginalArg(0) int arg0); 18 | 19 | @OriginalMember(owner = "client!pc", name = "c", descriptor = "()I") 20 | int getFlags(); 21 | } 22 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MathUtils.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | @OriginalClass("client!hf") 8 | public final class MathUtils { 9 | 10 | @OriginalMember(owner = "client!hf", name = "g", descriptor = "[I") 11 | public static final int[] sin = new int[2048]; 12 | 13 | @OriginalMember(owner = "client!hf", name = "h", descriptor = "[I") 14 | public static final int[] reciprical16 = new int[2048]; 15 | 16 | @OriginalMember(owner = "client!hf", name = "f", descriptor = "[I") 17 | private static final int[] reciprical15 = new int[512]; 18 | 19 | @OriginalMember(owner = "client!hf", name = "r", descriptor = "[I") 20 | public static final int[] cos = new int[2048]; 21 | 22 | static { 23 | @Pc(33) int i; 24 | for (i = 1; i < 512; i++) { 25 | reciprical15[i] = 32768 / i; 26 | } 27 | for (i = 1; i < 2048; i++) { 28 | reciprical16[i] = 65536 / i; 29 | } 30 | for (i = 0; i < 2048; i++) { 31 | sin[i] = (int) (Math.sin((double) i * 0.0030679615D) * 65536.0D); 32 | cos[i] = (int) (Math.cos((double) i * 0.0030679615D) * 65536.0D); 33 | } 34 | } 35 | 36 | public static int clamp(int min, int max, int value) { 37 | return Math.max(min, Math.min(max, value)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Midi_Class162.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!wh") 7 | public final class Midi_Class162 { 8 | 9 | @OriginalMember(owner = "client!wh", name = "a", descriptor = "I") 10 | public int anInt5807; 11 | 12 | @OriginalMember(owner = "client!wh", name = "b", descriptor = "[B") 13 | public byte[] aByteArray80; 14 | 15 | @OriginalMember(owner = "client!wh", name = "e", descriptor = "I") 16 | public int anInt5809; 17 | 18 | @OriginalMember(owner = "client!wh", name = "f", descriptor = "I") 19 | public int anInt5810; 20 | 21 | @OriginalMember(owner = "client!wh", name = "h", descriptor = "I") 22 | public int anInt5811; 23 | 24 | @OriginalMember(owner = "client!wh", name = "k", descriptor = "I") 25 | public int anInt5813; 26 | 27 | @OriginalMember(owner = "client!wh", name = "p", descriptor = "[B") 28 | public byte[] aByteArray81; 29 | 30 | @OriginalMember(owner = "client!wh", name = "q", descriptor = "I") 31 | public int anInt5814; 32 | 33 | @OriginalMember(owner = "client!wh", name = "r", descriptor = "I") 34 | public int anInt5815; 35 | } 36 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MixerListener.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!cc") 8 | public abstract class MixerListener extends Node { 9 | 10 | @OriginalMember(owner = "client!cc", name = "p", descriptor = "I") 11 | public int anInt905; 12 | 13 | @OriginalMember(owner = "client!cc", name = "a", descriptor = "(Lclient!ei;)I") 14 | public abstract int method779(@OriginalArg(0) MixerPcmStream arg0); 15 | 16 | @OriginalMember(owner = "client!cc", name = "a", descriptor = "()V") 17 | public abstract void method780(); 18 | } 19 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MonochromeImageCacheEntry.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!lb") 8 | public final class MonochromeImageCacheEntry extends Node { 9 | 10 | @OriginalMember(owner = "client!lb", name = "t", descriptor = "I") 11 | public final int row; 12 | 13 | @OriginalMember(owner = "client!lb", name = "C", descriptor = "I") 14 | public final int index; 15 | 16 | @OriginalMember(owner = "client!lb", name = "", descriptor = "(II)V") 17 | public MonochromeImageCacheEntry(@OriginalArg(0) int index, @OriginalArg(1) int row) { 18 | this.row = row; 19 | this.index = index; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MouseRecorder.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | @OriginalClass("client!jd") 8 | public final class MouseRecorder implements Runnable { 9 | 10 | @OriginalMember(owner = "client!od", name = "f", descriptor = "Lclient!jd;") 11 | public static MouseRecorder instance; 12 | @OriginalMember(owner = "client!tm", name = "e", descriptor = "Z") 13 | public static boolean enabled = false; 14 | @OriginalMember(owner = "client!oe", name = "a", descriptor = "I") 15 | public static int mouseRecorderPrevY = 0; 16 | @OriginalMember(owner = "client!vh", name = "s", descriptor = "I") 17 | public static int mouseRecorderPrevX = 0; 18 | @OriginalMember(owner = "client!jd", name = "e", descriptor = "Z") 19 | public boolean running = true; 20 | 21 | @OriginalMember(owner = "client!jd", name = "f", descriptor = "Ljava/lang/Object;") 22 | public final Object lock = new Object(); 23 | 24 | @OriginalMember(owner = "client!jd", name = "k", descriptor = "I") 25 | public int samples = 0; 26 | 27 | @OriginalMember(owner = "client!jd", name = "l", descriptor = "[I") 28 | public final int[] y = new int[500]; 29 | 30 | @OriginalMember(owner = "client!jd", name = "n", descriptor = "[I") 31 | public final int[] x = new int[500]; 32 | 33 | @OriginalMember(owner = "client!jd", name = "run", descriptor = "()V") 34 | @Override 35 | public final void run() { 36 | while (this.running) { 37 | @Pc(12) Object local12 = this.lock; 38 | synchronized (this.lock) { 39 | if (this.samples < 500) { 40 | this.x[this.samples] = Mouse.lastMouseX; 41 | this.y[this.samples] = Mouse.lastMouseY; 42 | this.samples++; 43 | } 44 | } 45 | ThreadUtils.sleep(50L); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MouseWheel.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.awt.Component; 9 | 10 | @OriginalClass("client!uc") 11 | public abstract class MouseWheel { 12 | 13 | @OriginalMember(owner = "client!eh", name = "j", descriptor = "I") 14 | public static int wheelRotation = 0; 15 | 16 | @OriginalMember(owner = "client!dh", name = "a", descriptor = "(B)Lclient!uc;") 17 | public static MouseWheel create() { 18 | try { 19 | return new JavaMouseWheel(); 20 | } catch (@Pc(15) Throwable local15) { 21 | return null; 22 | } 23 | } 24 | 25 | @OriginalMember(owner = "client!uc", name = "a", descriptor = "(I)I") 26 | public abstract int getRotation(); 27 | 28 | @OriginalMember(owner = "client!uc", name = "a", descriptor = "(ZLjava/awt/Component;)V") 29 | public abstract void stop(@OriginalArg(1) Component arg0); 30 | 31 | @OriginalMember(owner = "client!uc", name = "a", descriptor = "(Ljava/awt/Component;I)V") 32 | public abstract void start(@OriginalArg(0) Component arg0); 33 | } 34 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MsiType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!aa") 9 | public final class MsiType { 10 | 11 | @OriginalMember(owner = "client!aa", name = "f", descriptor = "I") 12 | public int anInt11; 13 | 14 | @OriginalMember(owner = "client!aa", name = "i", descriptor = "I") 15 | public int spriteId; 16 | 17 | @OriginalMember(owner = "client!aa", name = "s", descriptor = "Z") 18 | public boolean aBoolean2 = false; 19 | 20 | @OriginalMember(owner = "client!aa", name = "a", descriptor = "(BLclient!wa;I)V") 21 | public final void decode(@OriginalArg(1) Buffer arg0, @OriginalArg(2) int arg1) { 22 | while (true) { 23 | @Pc(5) int local5 = arg0.g1(); 24 | if (local5 == 0) { 25 | return; 26 | } 27 | this.method11(local5, arg0, arg1); 28 | } 29 | } 30 | 31 | @OriginalMember(owner = "client!aa", name = "a", descriptor = "(IB)Lclient!ek;") 32 | public final SoftwareIndexedSprite getSprite(@OriginalArg(0) int arg0) { 33 | @Pc(17) SoftwareIndexedSprite local17 = (SoftwareIndexedSprite) MsiTypeList.sprites.get(arg0 << 16 | this.spriteId); 34 | if (local17 != null) { 35 | return local17; 36 | } 37 | MsiTypeList.spritesArchive.isFileReady(this.spriteId); 38 | local17 = SpriteLoader.loadSoftwareIndexedSprite(this.spriteId, MsiTypeList.spritesArchive); 39 | if (local17 != null) { 40 | local17.adjustPalette(MsiTypeList.redDelta, MsiTypeList.greenDelta, MsiTypeList.blueDelta); 41 | local17.innerWidth = local17.width; 42 | local17.innerHeight = local17.height; 43 | for (@Pc(59) int local59 = 0; local59 < arg0; local59++) { 44 | local17.flipVertical(); 45 | } 46 | MsiTypeList.sprites.put(local17, arg0 << 16 | this.spriteId); 47 | } 48 | return local17; 49 | } 50 | 51 | @OriginalMember(owner = "client!aa", name = "a", descriptor = "(ILclient!wa;II)V") 52 | private void method11(@OriginalArg(0) int arg0, @OriginalArg(1) Buffer arg1, @OriginalArg(2) int arg2) { 53 | if (arg0 == 1) { 54 | this.spriteId = arg1.g2(); 55 | } else if (arg0 == 2) { 56 | this.anInt11 = arg1.g3(); 57 | } else if (arg0 == 3) { 58 | this.aBoolean2 = true; 59 | } else if (arg0 == 4) { 60 | this.spriteId = -1; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/MusicPlayer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | public class MusicPlayer { 7 | @OriginalMember(owner = "client!s", name = "c", descriptor = "I") 8 | public static int groupId = -1; 9 | @OriginalMember(owner = "client!uf", name = "m", descriptor = "I") 10 | public static int titleSong; 11 | 12 | @OriginalMember(owner = "client!li", name = "a", descriptor = "(ZI)V") 13 | public static void playSong(@OriginalArg(1) int arg0) { 14 | if (arg0 == -1 && !MidiPlayer.jingle) { 15 | MidiPlayer.method4548(); 16 | } else if (arg0 != -1 && (groupId != arg0 || !MidiPlayer.isPlaying()) && Preferences.musicVolume != 0 && !MidiPlayer.jingle) { 17 | MidiPlayer.playFadeOut(arg0, client.js5Archive6, Preferences.musicVolume); 18 | } 19 | groupId = arg0; 20 | } 21 | 22 | @OriginalMember(owner = "client!wj", name = "a", descriptor = "(IIB)V") 23 | public static void playJingle(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { 24 | if (Preferences.musicVolume != 0 && arg1 != -1) { 25 | MidiPlayer.playImmediate(client.js5Archive11, arg1, Preferences.musicVolume); 26 | MidiPlayer.jingle = true; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/NanoTimer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!om") 9 | public final class NanoTimer extends Timer { 10 | 11 | @OriginalMember(owner = "client!om", name = "k", descriptor = "J") 12 | private long aLong142 = System.nanoTime(); 13 | 14 | @OriginalMember(owner = "client!om", name = "b", descriptor = "(I)V") 15 | @Override 16 | public final void reset() { 17 | this.aLong142 = System.nanoTime(); 18 | } 19 | 20 | @OriginalMember(owner = "client!om", name = "a", descriptor = "(III)I") 21 | @Override 22 | public final int sleep(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { 23 | @Pc(9) long local9 = (long) arg0 * 1000000L; 24 | @Pc(14) long local14 = this.aLong142 - System.nanoTime(); 25 | if (local9 > local14) { 26 | local14 = local9; 27 | } 28 | ThreadUtils.sleep(local14 / 1000000L); 29 | @Pc(31) int local31 = 0; 30 | @Pc(33) long local33 = System.nanoTime(); 31 | while (local31 < 10 && (local31 < 1 || this.aLong142 < local33)) { 32 | local31++; 33 | this.aLong142 += (long) arg1 * 1000000L; 34 | } 35 | if (local33 > this.aLong142) { 36 | this.aLong142 = local33; 37 | } 38 | return local31; 39 | } 40 | 41 | @Override 42 | public int count(int arg0, int arg1) { 43 | @Pc(9) long local9 = (long) arg0 * 1000000L; 44 | @Pc(14) long local14 = this.aLong142 - System.nanoTime(); 45 | if (local9 > local14) { 46 | local14 = local9; 47 | } 48 | @Pc(31) int local31 = 0; 49 | @Pc(33) long local33 = System.nanoTime(); 50 | while (local31 < 10 && (local31 < 1 || this.aLong142 < local33)) { 51 | local31++; 52 | this.aLong142 += (long) arg1 * 1000000L; 53 | } 54 | if (local33 > this.aLong142) { 55 | this.aLong142 = local33; 56 | } 57 | return local31; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Node.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!ab") 7 | public class Node { 8 | 9 | @OriginalMember(owner = "client!ab", name = "a", descriptor = "J") 10 | public long key; 11 | 12 | @OriginalMember(owner = "client!ab", name = "d", descriptor = "Lclient!ab;") 13 | public Node aClass3_222; 14 | 15 | @OriginalMember(owner = "client!ab", name = "l", descriptor = "Lclient!ab;") 16 | public Node aClass3_223; 17 | 18 | @OriginalMember(owner = "client!ab", name = "a", descriptor = "(I)Z") 19 | public final boolean isLinked() { 20 | return this.aClass3_223 != null; 21 | } 22 | 23 | @OriginalMember(owner = "client!ab", name = "b", descriptor = "(I)V") 24 | public final void unlink() { 25 | if (this.aClass3_223 != null) { 26 | this.aClass3_223.aClass3_222 = this.aClass3_222; 27 | this.aClass3_222.aClass3_223 = this.aClass3_223; 28 | this.aClass3_223 = null; 29 | this.aClass3_222 = null; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ObjStack.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!uj") 9 | public final class ObjStack extends Entity { 10 | 11 | @OriginalMember(owner = "client!uj", name = "v", descriptor = "I") 12 | public int amount; 13 | 14 | @OriginalMember(owner = "client!uj", name = "D", descriptor = "I") 15 | public int type; 16 | 17 | @OriginalMember(owner = "client!uj", name = "z", descriptor = "I") 18 | private int minY = -32768; 19 | 20 | @OriginalMember(owner = "client!uj", name = "a", descriptor = "(IIIII)V") 21 | @Override 22 | public final void method4545(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) { 23 | } 24 | 25 | @OriginalMember(owner = "client!uj", name = "a", descriptor = "(IIIIIIIIJILclient!ga;)V") 26 | @Override 27 | public final void render(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) long arg8, @OriginalArg(9) int arg9, @OriginalArg(10) ParticleSystem arg10) { 28 | @Pc(16) Model local16 = ObjTypeList.get(this.type).getModel(-1, 0, null, this.amount, 0); 29 | if (local16 != null) { 30 | local16.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); 31 | this.minY = local16.getMinY(); 32 | } 33 | } 34 | 35 | @OriginalMember(owner = "client!uj", name = "b", descriptor = "()I") 36 | @Override 37 | public final int getMinY() { 38 | return this.minY; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ObjStackEntity.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!jj") 7 | public final class ObjStackEntity { 8 | 9 | @OriginalMember(owner = "client!jj", name = "a", descriptor = "Lclient!th;") 10 | public Entity secondary; 11 | 12 | @OriginalMember(owner = "client!jj", name = "b", descriptor = "I") 13 | public int anInt3057; 14 | 15 | @OriginalMember(owner = "client!jj", name = "c", descriptor = "Lclient!th;") 16 | public Entity tertiary; 17 | 18 | @OriginalMember(owner = "client!jj", name = "h", descriptor = "Lclient!th;") 19 | public Entity primary; 20 | 21 | @OriginalMember(owner = "client!jj", name = "k", descriptor = "I") 22 | public int zFine; 23 | 24 | @OriginalMember(owner = "client!jj", name = "n", descriptor = "I") 25 | public int anInt3063; 26 | 27 | @OriginalMember(owner = "client!jj", name = "o", descriptor = "I") 28 | public int xFine; 29 | 30 | @OriginalMember(owner = "client!jj", name = "r", descriptor = "J") 31 | public long key; 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ObjStackNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!pa") 8 | public final class ObjStackNode extends SecondaryNode { 9 | 10 | @OriginalMember(owner = "client!pa", name = "T", descriptor = "Lclient!uj;") 11 | public final ObjStack value; 12 | 13 | @OriginalMember(owner = "client!pa", name = "", descriptor = "(Lclient!uj;)V") 14 | public ObjStackNode(@OriginalArg(0) ObjStack arg0) { 15 | this.value = arg0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ParamType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!hn") 9 | public final class ParamType extends SecondaryNode { 10 | 11 | @OriginalMember(owner = "client!hn", name = "I", descriptor = "I") 12 | public int defaultInt; 13 | 14 | @OriginalMember(owner = "client!hn", name = "L", descriptor = "I") 15 | private int type; 16 | 17 | @OriginalMember(owner = "client!hn", name = "Q", descriptor = "Lclient!na;") 18 | public JagString defaultString; 19 | 20 | @OriginalMember(owner = "client!hn", name = "a", descriptor = "(ILclient!wa;)V") 21 | public final void decode(@OriginalArg(1) Buffer buffer) { 22 | while (true) { 23 | @Pc(13) int opcode = buffer.g1(); 24 | if (opcode == 0) { 25 | return; 26 | } 27 | this.decode(opcode, buffer); 28 | } 29 | } 30 | 31 | @OriginalMember(owner = "client!hn", name = "a", descriptor = "(ILclient!wa;I)V") 32 | private void decode(@OriginalArg(0) int opcode, @OriginalArg(1) Buffer buffer) { 33 | if (opcode == 1) { 34 | this.type = buffer.g1(); 35 | } else if (opcode == 2) { 36 | this.defaultInt = buffer.g4(); 37 | } else if (opcode == 5) { 38 | this.defaultString = buffer.gjstr(); 39 | } 40 | } 41 | 42 | @OriginalMember(owner = "client!hn", name = "f", descriptor = "(I)Z") 43 | public final boolean isString() { 44 | return this.type == 115; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ParamTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class ParamTypeList { 8 | @OriginalMember(owner = "client!wd", name = "a", descriptor = "Lclient!gn;") 9 | public static final LruHashTable types = new LruHashTable(64); 10 | @OriginalMember(owner = "client!d", name = "hb", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!sf", name = "a", descriptor = "(BLclient!ve;)V") 14 | public static void init(@OriginalArg(1) Js5 arg0) { 15 | archive = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!ih", name = "a", descriptor = "(II)Lclient!hn;") 19 | public static ParamType get(@OriginalArg(1) int id) { 20 | @Pc(6) ParamType paramType = (ParamType) types.get(id); 21 | if (paramType != null) { 22 | return paramType; 23 | } 24 | @Pc(30) byte[] data = archive.fetchFile(11, id); 25 | paramType = new ParamType(); 26 | if (data != null) { 27 | paramType.decode(new Buffer(data)); 28 | } 29 | types.put(paramType, id); 30 | return paramType; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ParticleNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | 5 | @OriginalClass("client!ri") 6 | public class ParticleNode { 7 | } 8 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ParticleSystem.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import com.jogamp.opengl.GL2; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.nio.FloatBuffer; 9 | 10 | @OriginalClass("client!ga") 11 | public final class ParticleSystem extends ParticleNode { 12 | 13 | static { 14 | new SecondaryHashTable(8); 15 | new Buffer(131056); 16 | } 17 | 18 | @OriginalMember(owner = "client!ga", name = "a", descriptor = "()V") 19 | public static void load() { 20 | @Pc(1) GL2 gl = GlRenderer.gl; 21 | if (gl.isExtensionAvailable("GL_ARB_point_parameters")) { 22 | @Pc(20) float[] coefficients = new float[]{1.0F, 0.0F, 5.0E-4F}; 23 | gl.glPointParameterfv(GL2.GL_POINT_DISTANCE_ATTENUATION, coefficients, 0); 24 | @Pc(28) FloatBuffer buffer = FloatBuffer.allocate(1); 25 | gl.glGetFloatv(GL2.GL_POINT_SIZE_MAX, buffer); 26 | @Pc(36) float pointSizeMax = buffer.get(0); 27 | if (pointSizeMax > 1024.0F) { 28 | pointSizeMax = 1024.0F; 29 | } 30 | gl.glPointParameterf(GL2.GL_POINT_SIZE_MIN, 1.0F); 31 | gl.glPointParameterf(GL2.GL_POINT_SIZE_MAX, pointSizeMax); 32 | } 33 | if (gl.isExtensionAvailable("GL_ARB_point_sprite")) { 34 | } 35 | } 36 | 37 | @OriginalMember(owner = "client!ga", name = "b", descriptor = "()V") 38 | public static void quit() { 39 | } 40 | 41 | @OriginalMember(owner = "client!ga", name = "d", descriptor = "()V") 42 | public final void method1646() { 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/PathingEntity_Class147.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!ub") 7 | public final class PathingEntity_Class147 { 8 | 9 | @OriginalMember(owner = "client!ub", name = "b", descriptor = "I") 10 | public int anInt5396; 11 | 12 | @OriginalMember(owner = "client!ub", name = "d", descriptor = "I") 13 | public int anInt5398; 14 | 15 | @OriginalMember(owner = "client!ub", name = "f", descriptor = "I") 16 | public int anInt5399; 17 | 18 | @OriginalMember(owner = "client!ub", name = "g", descriptor = "I") 19 | public int anInt5400; 20 | 21 | @OriginalMember(owner = "client!ub", name = "l", descriptor = "I") 22 | public int anInt5404; 23 | 24 | @OriginalMember(owner = "client!ub", name = "q", descriptor = "I") 25 | public int anInt5408; 26 | } 27 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/PcmSound.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!kj") 8 | public final class PcmSound extends Sound { 9 | 10 | @OriginalMember(owner = "client!kj", name = "r", descriptor = "Z") 11 | public boolean aBoolean165; 12 | 13 | @OriginalMember(owner = "client!kj", name = "u", descriptor = "I") 14 | public int rate; 15 | 16 | @OriginalMember(owner = "client!kj", name = "q", descriptor = "[B") 17 | public byte[] samples; 18 | 19 | @OriginalMember(owner = "client!kj", name = "t", descriptor = "I") 20 | public int start; 21 | 22 | @OriginalMember(owner = "client!kj", name = "s", descriptor = "I") 23 | public int end; 24 | 25 | @OriginalMember(owner = "client!kj", name = "", descriptor = "(I[BII)V") 26 | public PcmSound(@OriginalArg(0) int arg0, @OriginalArg(1) byte[] arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { 27 | this.rate = arg0; 28 | this.samples = arg1; 29 | this.start = arg2; 30 | this.end = arg3; 31 | } 32 | 33 | @OriginalMember(owner = "client!kj", name = "", descriptor = "(I[BIIZ)V") 34 | public PcmSound(@OriginalArg(0) int arg0, @OriginalArg(1) byte[] arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) boolean arg4) { 35 | this.rate = arg0; 36 | this.samples = arg1; 37 | this.start = arg2; 38 | this.end = arg3; 39 | this.aBoolean165 = arg4; 40 | } 41 | 42 | @OriginalMember(owner = "client!kj", name = "a", descriptor = "(Lclient!vj;)Lclient!kj;") 43 | public final PcmSound resample(@OriginalArg(0) PcmResampler arg0) { 44 | this.samples = arg0.method4520(this.samples); 45 | this.rate = arg0.scaleRate(this.rate); 46 | if (this.start == this.end) { 47 | this.start = this.end = arg0.scalePosition(this.start); 48 | } else { 49 | this.start = arg0.scalePosition(this.start); 50 | this.end = arg0.scalePosition(this.end); 51 | if (this.start == this.end) { 52 | this.start--; 53 | } 54 | } 55 | return this; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/PcmStream.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!qb") 8 | public abstract class PcmStream extends Node { 9 | 10 | @OriginalMember(owner = "client!qb", name = "p", descriptor = "I") 11 | public int anInt5626; 12 | 13 | @OriginalMember(owner = "client!qb", name = "q", descriptor = "Lclient!ik;") 14 | public Sound sound; 15 | 16 | @OriginalMember(owner = "client!qb", name = "s", descriptor = "Lclient!qb;") 17 | public PcmStream aClass3_Sub3_8; 18 | 19 | @OriginalMember(owner = "client!qb", name = "r", descriptor = "Z") 20 | public volatile boolean active = true; 21 | 22 | @OriginalMember(owner = "client!qb", name = "a", descriptor = "()I") 23 | public abstract int method4404(); 24 | 25 | @OriginalMember(owner = "client!qb", name = "a", descriptor = "([III)V") 26 | protected final void readIfActive(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { 27 | if (this.active) { 28 | this.read(arg0, arg1, arg2); 29 | } else { 30 | this.skip(arg2); 31 | } 32 | } 33 | 34 | @OriginalMember(owner = "client!qb", name = "b", descriptor = "()Lclient!qb;") 35 | public abstract PcmStream firstSubStream(); 36 | 37 | @OriginalMember(owner = "client!qb", name = "c", descriptor = "()I") 38 | public int method4407() { 39 | return 255; 40 | } 41 | 42 | @OriginalMember(owner = "client!qb", name = "b", descriptor = "([III)V") 43 | public abstract void read(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2); 44 | 45 | @OriginalMember(owner = "client!qb", name = "d", descriptor = "()Lclient!qb;") 46 | public abstract PcmStream nextSubStream(); 47 | 48 | @OriginalMember(owner = "client!qb", name = "c", descriptor = "(I)V") 49 | public abstract void skip(@OriginalArg(0) int arg0); 50 | } 51 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/PlainTile.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!rh") 8 | public final class PlainTile { 9 | 10 | @OriginalMember(owner = "client!rh", name = "m", descriptor = "Z") 11 | public boolean aBoolean241 = true; 12 | 13 | @OriginalMember(owner = "client!rh", name = "f", descriptor = "I") 14 | public final int anInt4867; 15 | 16 | @OriginalMember(owner = "client!rh", name = "c", descriptor = "I") 17 | public final int anInt4865; 18 | 19 | @OriginalMember(owner = "client!rh", name = "n", descriptor = "I") 20 | public final int anInt4872; 21 | 22 | @OriginalMember(owner = "client!rh", name = "l", descriptor = "I") 23 | public final int anInt4871; 24 | 25 | @OriginalMember(owner = "client!rh", name = "b", descriptor = "I") 26 | public final int anInt4864; 27 | 28 | @OriginalMember(owner = "client!rh", name = "i", descriptor = "I") 29 | public final int anInt4869; 30 | 31 | @OriginalMember(owner = "client!rh", name = "", descriptor = "(IIIIIIZ)V") 32 | public PlainTile(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) boolean arg6) { 33 | this.anInt4867 = arg1; 34 | this.anInt4865 = arg2; 35 | this.anInt4872 = arg0; 36 | this.anInt4871 = arg5; 37 | this.aBoolean241 = arg6; 38 | this.anInt4864 = arg3; 39 | this.anInt4869 = arg4; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/PlayerList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | import org.openrs2.deob.annotation.Pc; 5 | 6 | public class PlayerList { 7 | @OriginalMember(owner = "client!ja", name = "l", descriptor = "[Lclient!wa;") 8 | public static final Buffer[] appearanceCache = new Buffer[2048]; 9 | @OriginalMember(owner = "client!mi", name = "S", descriptor = "[Lclient!e;") 10 | public static final Player[] players = new Player[2048]; 11 | @OriginalMember(owner = "client!ib", name = "f", descriptor = "[I") 12 | public static final int[] ids = new int[2048]; 13 | @OriginalMember(owner = "client!ke", name = "Y", descriptor = "[I") 14 | public static final int[] anIntArray309 = new int[]{1, 4}; 15 | @OriginalMember(owner = "client!nk", name = "O", descriptor = "Lclient!e;") 16 | public static Player self; 17 | @OriginalMember(owner = "client!bf", name = "E", descriptor = "I") 18 | public static int selfId = -1; 19 | @OriginalMember(owner = "client!vl", name = "j", descriptor = "I") 20 | public static int size = 0; 21 | @OriginalMember(owner = "client!i", name = "Ub", descriptor = "[Lclient!na;") 22 | public static JagString[] playerNames; 23 | @OriginalMember(owner = "client!vg", name = "a", descriptor = "[Lclient!na;") 24 | public static JagString[] playerNames2; 25 | 26 | @OriginalMember(owner = "client!fk", name = "b", descriptor = "(I)V") 27 | public static void method1444() { 28 | for (@Pc(7) int local7 = -1; local7 < size; local7++) { 29 | @Pc(21) int local21; 30 | if (local7 == -1) { 31 | local21 = 2047; 32 | } else { 33 | local21 = ids[local7]; 34 | } 35 | @Pc(31) Player local31 = players[local21]; 36 | if (local31 != null) { 37 | NpcList.method4514(local31.getSize(), local31); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/PlayerSkillXpTable.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | import org.openrs2.deob.annotation.Pc; 5 | 6 | public class PlayerSkillXpTable { 7 | 8 | @OriginalMember(owner = "client!ud", name = "T", descriptor = "[I") 9 | public static final int[] updatedStats = new int[32]; 10 | 11 | @OriginalMember(owner = "client!lb", name = "p", descriptor = "[I") 12 | public static final int[] baseLevels = new int[25]; 13 | 14 | @OriginalMember(owner = "client!hk", name = "fb", descriptor = "[I") 15 | public static final int[] boostedLevels = new int[25]; 16 | 17 | @OriginalMember(owner = "client!sg", name = "b", descriptor = "[I") 18 | public static final int[] experience = new int[25]; 19 | 20 | @OriginalMember(owner = "client!h", name = "S", descriptor = "[I") 21 | public static final int[] xpLevelLookup = new int[99]; 22 | 23 | @OriginalMember(owner = "client!oj", name = "z", descriptor = "[Z") 24 | public static final boolean[] ENABLED_SKILLS = new boolean[]{true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false}; 25 | 26 | @OriginalMember(owner = "client!ha", name = "m", descriptor = "I") 27 | public static int updatedStatsWriterIndex = 0; 28 | 29 | static { 30 | @Pc(4) int local4 = 0; 31 | for (@Pc(6) int local6 = 0; local6 < 99; local6++) { 32 | @Pc(13) int local13 = local6 + 1; 33 | @Pc(26) int local26 = (int) (Math.pow(2.0D, (double) local13 / 7.0D) * 300.0D + (double) local13); 34 | local4 += local26; 35 | PlayerSkillXpTable.xpLevelLookup[local6] = local4 / 4; 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ProjAnimNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!ud") 8 | public final class ProjAnimNode extends SecondaryNode { 9 | 10 | @OriginalMember(owner = "client!ud", name = "R", descriptor = "Lclient!ra;") 11 | public final ProjAnim value; 12 | 13 | @OriginalMember(owner = "client!ud", name = "", descriptor = "(Lclient!ra;)V") 14 | public ProjAnimNode(@OriginalArg(0) ProjAnim value) { 15 | this.value = value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/QuickChatCatTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class QuickChatCatTypeList { 8 | @OriginalMember(owner = "client!fm", name = "db", descriptor = "Lclient!gn;") 9 | public static final LruHashTable types = new LruHashTable(64); 10 | @OriginalMember(owner = "client!gn", name = "t", descriptor = "Lclient!ve;") 11 | public static Js5 archive1; 12 | @OriginalMember(owner = "client!ce", name = "d", descriptor = "Lclient!ve;") 13 | public static Js5 archive2; 14 | 15 | @OriginalMember(owner = "client!ja", name = "a", descriptor = "(Lclient!ve;Lclient!ve;I)V") 16 | public static void init(@OriginalArg(0) Js5 arg0, @OriginalArg(1) Js5 arg1) { 17 | archive1 = arg1; 18 | archive2 = arg0; 19 | } 20 | 21 | @OriginalMember(owner = "client!tb", name = "b", descriptor = "(IB)Lclient!bc;") 22 | public static QuickChatCatType get(@OriginalArg(0) int id) { 23 | @Pc(10) QuickChatCatType quickChatCat = (QuickChatCatType) types.get(id); 24 | if (quickChatCat != null) { 25 | return quickChatCat; 26 | } 27 | @Pc(24) byte[] data; 28 | if (id < 32768) { 29 | data = archive1.fetchFile(0, id); 30 | } else { 31 | data = archive2.fetchFile(0, id & 0x7FFF); 32 | } 33 | quickChatCat = new QuickChatCatType(); 34 | if (data != null) { 35 | quickChatCat.decode(new Buffer(data)); 36 | } 37 | if (id >= 32768) { 38 | quickChatCat.method465(); 39 | } 40 | types.put(quickChatCat, id); 41 | return quickChatCat; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/QuickChatCommandDecoder.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!of") 8 | public interface QuickChatCommandDecoder { 9 | 10 | @OriginalMember(owner = "client!of", name = "a", descriptor = "(I[IIJ)Lclient!na;") 11 | JagString decode(@OriginalArg(0) int arg0, @OriginalArg(1) int[] arg1, @OriginalArg(3) long arg2); 12 | } 13 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/QuickChatPhrase.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!bd") 7 | public final class QuickChatPhrase { 8 | 9 | @OriginalMember(owner = "client!bd", name = "c", descriptor = "I") 10 | public int id; 11 | 12 | @OriginalMember(owner = "client!bd", name = "f", descriptor = "Lclient!cb;") 13 | public QuickChatPhraseType type; 14 | 15 | @OriginalMember(owner = "client!bd", name = "h", descriptor = "[I") 16 | public int[] values; 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/RandomUtils.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | import java.util.Random; 8 | 9 | public class RandomUtils { 10 | @OriginalMember(owner = "client!d", name = "c", descriptor = "(III)I") 11 | public static int shuffle(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { 12 | @Pc(11) int local11 = arg1 - 1 & arg0 >> 31; 13 | return local11 + (arg0 + (arg0 >>> 31)) % arg1; 14 | } 15 | 16 | @OriginalMember(owner = "client!ni", name = "a", descriptor = "(BILjava/util/Random;)I") 17 | public static int nextInt(@OriginalArg(1) int arg0, @OriginalArg(2) Random arg1) { 18 | if (arg0 <= 0) { 19 | throw new IllegalArgumentException(); 20 | } else if (IntUtils.isPowerOfTwo(arg0)) { 21 | return (int) (((long) arg1.nextInt() & 0xFFFFFFFFL) * (long) arg0 >> 32); 22 | } else { 23 | @Pc(38) int local38 = Integer.MIN_VALUE - (int) (0x100000000L % (long) arg0); 24 | @Pc(41) int local41; 25 | do { 26 | local41 = arg1.nextInt(); 27 | } while (local38 <= local41); 28 | return shuffle(local41, arg0); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ReferenceNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!gf") 7 | public abstract class ReferenceNode extends SecondaryNode { 8 | 9 | @OriginalMember(owner = "client!gf", name = "", descriptor = "()V") 10 | protected ReferenceNode() { 11 | } 12 | 13 | @OriginalMember(owner = "client!gf", name = "a", descriptor = "(Z)Ljava/lang/Object;") 14 | public abstract Object get(); 15 | 16 | @OriginalMember(owner = "client!gf", name = "e", descriptor = "(I)Z") 17 | public abstract boolean isSoft(); 18 | } 19 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ReferenceNodeFactory.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!q") 9 | public abstract class ReferenceNodeFactory { 10 | 11 | @OriginalMember(owner = "client!uh", name = "ab", descriptor = "Lclient!q;") 12 | public static final ReferenceNodeFactory SOFT_REFERENCE_NODE_FACTORY = createSoftReferenceNodeFactory(); 13 | 14 | @OriginalMember(owner = "client!dh", name = "b", descriptor = "(I)Lclient!q;") 15 | public static ReferenceNodeFactory createSoftReferenceNodeFactory() { 16 | try { 17 | return new SoftReferenceNodeFactory(); 18 | } catch (@Pc(15) Throwable local15) { 19 | return null; 20 | } 21 | } 22 | 23 | @OriginalMember(owner = "client!q", name = "a", descriptor = "(Lclient!gf;I)Lclient!gf;") 24 | public abstract ReferenceNode create(@OriginalArg(0) ReferenceNode arg0); 25 | } 26 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Scenery.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!ec") 7 | public final class Scenery { 8 | 9 | @OriginalMember(owner = "client!ec", name = "a", descriptor = "I") 10 | public int zMin; 11 | 12 | @OriginalMember(owner = "client!ec", name = "c", descriptor = "Lclient!th;") 13 | public Entity entity; 14 | 15 | @OriginalMember(owner = "client!ec", name = "e", descriptor = "I") 16 | public int zMax; 17 | 18 | @OriginalMember(owner = "client!ec", name = "f", descriptor = "I") 19 | public int anInt1699; 20 | 21 | @OriginalMember(owner = "client!ec", name = "h", descriptor = "I") 22 | public int xMin; 23 | 24 | @OriginalMember(owner = "client!ec", name = "j", descriptor = "I") 25 | public int anInt1703; 26 | 27 | @OriginalMember(owner = "client!ec", name = "m", descriptor = "I") 28 | public int anInt1705; 29 | 30 | @OriginalMember(owner = "client!ec", name = "o", descriptor = "I") 31 | public int anInt1706; 32 | 33 | @OriginalMember(owner = "client!ec", name = "p", descriptor = "I") 34 | public int anInt1707; 35 | 36 | @OriginalMember(owner = "client!ec", name = "s", descriptor = "I") 37 | public int level; 38 | 39 | @OriginalMember(owner = "client!ec", name = "w", descriptor = "I") 40 | public int xMax; 41 | 42 | @OriginalMember(owner = "client!ec", name = "x", descriptor = "I") 43 | public int anInt1714; 44 | 45 | @OriginalMember(owner = "client!ec", name = "A", descriptor = "J") 46 | public long key = 0L; 47 | } 48 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/SecondaryHashTable.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!rm") 9 | public final class SecondaryHashTable { 10 | 11 | @OriginalMember(owner = "client!rm", name = "e", descriptor = "[Lclient!rg;") 12 | private final SecondaryNode[] buckets; 13 | 14 | @OriginalMember(owner = "client!rm", name = "", descriptor = "(I)V") 15 | public SecondaryHashTable(@OriginalArg(0) int arg0) { 16 | this.buckets = new SecondaryNode[arg0]; 17 | for (@Pc(7) int local7 = 0; local7 < arg0; local7++) { 18 | @Pc(23) SecondaryNode local23 = this.buckets[local7] = new SecondaryNode(); 19 | local23.secondaryPrev = local23; 20 | local23.secondaryNext = local23; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/SecondaryNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!rg") 7 | public class SecondaryNode extends Node { 8 | 9 | @OriginalMember(owner = "client!rg", name = "v", descriptor = "J") 10 | public long secondaryKey; 11 | 12 | @OriginalMember(owner = "client!rg", name = "w", descriptor = "Lclient!rg;") 13 | public SecondaryNode secondaryPrev; 14 | 15 | @OriginalMember(owner = "client!rg", name = "G", descriptor = "Lclient!rg;") 16 | public SecondaryNode secondaryNext; 17 | 18 | @OriginalMember(owner = "client!rg", name = "e", descriptor = "(B)V") 19 | public final void unlinkSecondary() { 20 | if (this.secondaryPrev != null) { 21 | this.secondaryPrev.secondaryNext = this.secondaryNext; 22 | this.secondaryNext.secondaryPrev = this.secondaryPrev; 23 | this.secondaryNext = null; 24 | this.secondaryPrev = null; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/SignLinkAudioChannel.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | import java.awt.Component; 8 | 9 | @OriginalClass("client!hl") 10 | public final class SignLinkAudioChannel extends AudioChannel { 11 | 12 | @OriginalMember(owner = "client!hl", name = "M", descriptor = "Lsignlink!ai;") 13 | public static AudioSource audioSource; 14 | 15 | @OriginalMember(owner = "client!hl", name = "L", descriptor = "I") 16 | private final int channel; 17 | 18 | @OriginalMember(owner = "client!hl", name = "", descriptor = "(Lsignlink!ll;I)V") 19 | public SignLinkAudioChannel(@OriginalArg(0) SignLink signLink, @OriginalArg(1) int channel) { 20 | audioSource = signLink.getAudioSource(); 21 | this.channel = channel; 22 | } 23 | 24 | @OriginalMember(owner = "client!hl", name = "c", descriptor = "()I") 25 | @Override 26 | protected final int getBufferSize() { 27 | return audioSource.getBufferSize(this.channel); 28 | } 29 | 30 | @OriginalMember(owner = "client!hl", name = "a", descriptor = "()V") 31 | @Override 32 | protected final void write() { 33 | audioSource.write(this.channel, this.samples); 34 | } 35 | 36 | @OriginalMember(owner = "client!hl", name = "a", descriptor = "(Ljava/awt/Component;)V") 37 | @Override 38 | public final void init(@OriginalArg(0) Component component) throws Exception { 39 | audioSource.init(AudioChannel.sampleRate, component, AudioChannel.stereo); 40 | } 41 | 42 | @OriginalMember(owner = "client!hl", name = "b", descriptor = "()V") 43 | @Override 44 | protected final void close() { 45 | audioSource.close(this.channel); 46 | } 47 | 48 | @OriginalMember(owner = "client!hl", name = "a", descriptor = "(I)V") 49 | @Override 50 | public final void open(@OriginalArg(0) int bufferCapacity) throws Exception { 51 | if (bufferCapacity > 32768) { 52 | throw new IllegalArgumentException(); 53 | } 54 | audioSource.open(this.channel, bufferCapacity); 55 | } 56 | 57 | @OriginalMember(owner = "client!hl", name = "d", descriptor = "()V") 58 | @Override 59 | protected final void flush() { 60 | audioSource.flush(this.channel); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/SoftReferenceNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | import java.lang.ref.SoftReference; 8 | 9 | @OriginalClass("client!qd") 10 | public final class SoftReferenceNode extends ReferenceNode { 11 | 12 | @OriginalMember(owner = "client!qd", name = "U", descriptor = "Ljava/lang/ref/SoftReference;") 13 | private final SoftReference reference; 14 | 15 | @OriginalMember(owner = "client!qd", name = "", descriptor = "(Ljava/lang/Object;)V") 16 | public SoftReferenceNode(@OriginalArg(0) Object arg0) { 17 | this.reference = new SoftReference(arg0); 18 | } 19 | 20 | @OriginalMember(owner = "client!qd", name = "a", descriptor = "(Z)Ljava/lang/Object;") 21 | @Override 22 | public final Object get() { 23 | return this.reference.get(); 24 | } 25 | 26 | @OriginalMember(owner = "client!qd", name = "e", descriptor = "(I)Z") 27 | @Override 28 | public final boolean isSoft() { 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/SoftReferenceNodeFactory.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!db") 8 | public final class SoftReferenceNodeFactory extends ReferenceNodeFactory { 9 | 10 | @OriginalMember(owner = "client!db", name = "a", descriptor = "(Lclient!gf;I)Lclient!gf;") 11 | @Override 12 | public final ReferenceNode create(@OriginalArg(0) ReferenceNode arg0) { 13 | return new SoftReferenceNode(arg0.get()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Sound.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!ik") 7 | public abstract class Sound extends Node { 8 | 9 | @OriginalMember(owner = "client!ik", name = "p", descriptor = "I") 10 | public int position; 11 | 12 | @OriginalMember(owner = "client!ik", name = "", descriptor = "()V") 13 | protected Sound() { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/SpotAnimNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!bk") 8 | public final class SpotAnimNode extends SecondaryNode { 9 | 10 | @OriginalMember(owner = "client!bk", name = "M", descriptor = "Lclient!bh;") 11 | public final SpotAnim aClass8_Sub2_1; 12 | 13 | @OriginalMember(owner = "client!bk", name = "", descriptor = "(Lclient!bh;)V") 14 | public SpotAnimNode(@OriginalArg(0) SpotAnim arg0) { 15 | this.aClass8_Sub2_1 = arg0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/StockMarketManager.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | 5 | public class StockMarketManager { 6 | @OriginalMember(owner = "client!si", name = "X", descriptor = "[Lclient!sg;") 7 | public static final StockMarketOffer[] offers = new StockMarketOffer[6]; 8 | @OriginalMember(owner = "client!ql", name = "d", descriptor = "I") 9 | public static int transmitAt = 0; 10 | } 11 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/StockMarketOffer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!sg") 8 | public final class StockMarketOffer { 9 | 10 | @OriginalMember(owner = "client!sg", name = "a", descriptor = "B") 11 | private byte statusAndType; 12 | 13 | @OriginalMember(owner = "client!sg", name = "f", descriptor = "I") 14 | public int completedCount; 15 | 16 | @OriginalMember(owner = "client!sg", name = "g", descriptor = "I") 17 | public int count; 18 | 19 | @OriginalMember(owner = "client!sg", name = "j", descriptor = "I") 20 | public int completedGold; 21 | 22 | @OriginalMember(owner = "client!sg", name = "m", descriptor = "I") 23 | public int item; 24 | 25 | @OriginalMember(owner = "client!sg", name = "s", descriptor = "I") 26 | public int price; 27 | 28 | @OriginalMember(owner = "client!sg", name = "", descriptor = "()V") 29 | public StockMarketOffer() { 30 | } 31 | 32 | @OriginalMember(owner = "client!sg", name = "", descriptor = "(Lclient!wa;)V") 33 | public StockMarketOffer(@OriginalArg(0) Buffer arg0) { 34 | this.statusAndType = arg0.g1b(); 35 | this.item = arg0.g2(); 36 | this.price = arg0.g4(); 37 | this.count = arg0.g4(); 38 | this.completedCount = arg0.g4(); 39 | this.completedGold = arg0.g4(); 40 | } 41 | 42 | @OriginalMember(owner = "client!sg", name = "a", descriptor = "(Z)I") 43 | public final int getStatus() { 44 | return this.statusAndType & 0x7; 45 | } 46 | 47 | @OriginalMember(owner = "client!sg", name = "b", descriptor = "(B)I") 48 | public final int getType() { 49 | return (this.statusAndType & 0x8) == 8 ? 1 : 0; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/StringInterface.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | 5 | @OriginalClass("client!oa") 6 | public interface StringInterface { 7 | } 8 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/StringNode.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!sj") 8 | public final class StringNode extends Node { 9 | 10 | @OriginalMember(owner = "client!sj", name = "A", descriptor = "Lclient!na;") 11 | public JagString value; 12 | 13 | @OriginalMember(owner = "client!sj", name = "", descriptor = "()V") 14 | public StringNode() { 15 | } 16 | 17 | @OriginalMember(owner = "client!sj", name = "", descriptor = "(Lclient!na;)V") 18 | public StringNode(@OriginalArg(0) JagString arg0) { 19 | this.value = arg0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/StructType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!lk") 9 | public final class StructType extends SecondaryNode { 10 | 11 | @OriginalMember(owner = "client!lk", name = "I", descriptor = "Lclient!sc;") 12 | private HashTable params; 13 | 14 | @OriginalMember(owner = "client!lk", name = "a", descriptor = "(IIB)I") 15 | public final int getParam(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { 16 | if (this.params == null) { 17 | return arg1; 18 | } else { 19 | @Pc(29) IntNode local29 = (IntNode) this.params.get(arg0); 20 | return local29 == null ? arg1 : local29.value; 21 | } 22 | } 23 | 24 | @OriginalMember(owner = "client!lk", name = "a", descriptor = "(Lclient!wa;IB)V") 25 | private void decode(@OriginalArg(0) Buffer arg0, @OriginalArg(1) int arg1) { 26 | if (arg1 != 249) { 27 | return; 28 | } 29 | @Pc(17) int local17 = arg0.g1(); 30 | @Pc(25) int local25; 31 | if (this.params == null) { 32 | local25 = IntUtils.clp2(local17); 33 | this.params = new HashTable(local25); 34 | } 35 | for (local25 = 0; local25 < local17; local25++) { 36 | @Pc(45) boolean local45 = arg0.g1() == 1; 37 | @Pc(49) int local49 = arg0.g3(); 38 | @Pc(58) Node local58; 39 | if (local45) { 40 | local58 = new StringNode(arg0.gjstr()); 41 | } else { 42 | local58 = new IntNode(arg0.g4()); 43 | } 44 | this.params.put(local58, local49); 45 | } 46 | } 47 | 48 | @OriginalMember(owner = "client!lk", name = "a", descriptor = "(Lclient!na;BI)Lclient!na;") 49 | public final JagString getParam(@OriginalArg(0) JagString arg0, @OriginalArg(2) int arg1) { 50 | if (this.params == null) { 51 | return arg0; 52 | } else { 53 | @Pc(16) StringNode local16 = (StringNode) this.params.get(arg1); 54 | return local16 == null ? arg0 : local16.value; 55 | } 56 | } 57 | 58 | @OriginalMember(owner = "client!lk", name = "a", descriptor = "(ILclient!wa;)V") 59 | public final void decode(@OriginalArg(1) Buffer arg0) { 60 | while (true) { 61 | @Pc(5) int local5 = arg0.g1(); 62 | if (local5 == 0) { 63 | return; 64 | } 65 | this.decode(arg0, local5); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/StructTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class StructTypeList { 8 | @OriginalMember(owner = "client!sk", name = "bb", descriptor = "Lclient!gn;") 9 | public static final LruHashTable types = new LruHashTable(64); 10 | @OriginalMember(owner = "client!bm", name = "e", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!eh", name = "a", descriptor = "(Lclient!ve;I)V") 14 | public static void init(@OriginalArg(0) Js5 arg0) { 15 | archive = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!jj", name = "a", descriptor = "(BI)Lclient!lk;") 19 | public static StructType get(@OriginalArg(1) int arg0) { 20 | @Pc(10) StructType local10 = (StructType) types.get(arg0); 21 | if (local10 != null) { 22 | return local10; 23 | } 24 | @Pc(26) byte[] local26 = archive.fetchFile(26, arg0); 25 | local10 = new StructType(); 26 | if (local26 != null) { 27 | local10.decode(new Buffer(local26)); 28 | } 29 | types.put(local10, arg0); 30 | return local10; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOp29SubOp.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!kf") 8 | public abstract class TextureOp29SubOp { 9 | 10 | @OriginalMember(owner = "client!kf", name = "e", descriptor = "I") 11 | public final int anInt5229; 12 | 13 | @OriginalMember(owner = "client!kf", name = "g", descriptor = "I") 14 | protected final int anInt5231; 15 | 16 | @OriginalMember(owner = "client!kf", name = "b", descriptor = "I") 17 | public final int anInt5228; 18 | 19 | @OriginalMember(owner = "client!kf", name = "", descriptor = "(III)V") 20 | protected TextureOp29SubOp(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { 21 | this.anInt5229 = arg1; 22 | this.anInt5231 = arg2; 23 | this.anInt5228 = arg0; 24 | } 25 | 26 | @OriginalMember(owner = "client!kf", name = "a", descriptor = "(III)V") 27 | public abstract void method4007(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1); 28 | 29 | @OriginalMember(owner = "client!kf", name = "a", descriptor = "(IZI)V") 30 | public abstract void method4009(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1); 31 | 32 | @OriginalMember(owner = "client!kf", name = "c", descriptor = "(III)V") 33 | public abstract void method4013(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1); 34 | } 35 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOp29SubOp1.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!ci") 9 | public final class TextureOp29SubOp1 extends TextureOp29SubOp { 10 | 11 | @OriginalMember(owner = "client!ci", name = "s", descriptor = "I") 12 | private final int anInt1015; 13 | 14 | @OriginalMember(owner = "client!ci", name = "o", descriptor = "I") 15 | private final int anInt1012; 16 | 17 | @OriginalMember(owner = "client!ci", name = "m", descriptor = "I") 18 | private final int anInt1010; 19 | 20 | @OriginalMember(owner = "client!ci", name = "v", descriptor = "I") 21 | private final int anInt1017; 22 | 23 | @OriginalMember(owner = "client!ci", name = "", descriptor = "(IIIIII)V") 24 | public TextureOp29SubOp1(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { 25 | super(-1, arg4, arg5); 26 | this.anInt1015 = arg3; 27 | this.anInt1012 = arg1; 28 | this.anInt1010 = arg0; 29 | this.anInt1017 = arg2; 30 | } 31 | 32 | @OriginalMember(owner = "client!al", name = "a", descriptor = "(ILclient!wa;)Lclient!ci;") 33 | public static TextureOp29SubOp1 create(@OriginalArg(1) Buffer arg0) { 34 | return new TextureOp29SubOp1(arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g3(), arg0.g1()); 35 | } 36 | 37 | @OriginalMember(owner = "client!ci", name = "a", descriptor = "(III)V") 38 | @Override 39 | public final void method4007(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { 40 | } 41 | 42 | @OriginalMember(owner = "client!ci", name = "c", descriptor = "(III)V") 43 | @Override 44 | public final void method4013(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { 45 | } 46 | 47 | @OriginalMember(owner = "client!ci", name = "a", descriptor = "(IZI)V") 48 | @Override 49 | public final void method4009(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { 50 | @Pc(10) int local10 = arg1 * this.anInt1010 >> 12; 51 | @Pc(25) int local25 = this.anInt1017 * arg1 >> 12; 52 | @Pc(32) int local32 = arg0 * this.anInt1012 >> 12; 53 | @Pc(39) int local39 = arg0 * this.anInt1015 >> 12; 54 | TextureOp29.method3982(this.anInt5229, local39, local10, local32, local25); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOp35.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!pg") 9 | public final class TextureOp35 extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!pg", name = "U", descriptor = "I") 12 | private int anInt4503 = 4096; 13 | 14 | @OriginalMember(owner = "client!pg", name = "", descriptor = "()V") 15 | public TextureOp35() { 16 | super(1, true); 17 | } 18 | 19 | @OriginalMember(owner = "client!pg", name = "a", descriptor = "(IB)[I") 20 | @Override 21 | public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { 22 | @Pc(19) int[] local19 = this.monochromeImageCache.get(arg0); 23 | if (this.monochromeImageCache.invalid) { 24 | @Pc(34) int[] local34 = this.getChildMonochromeOutput(0, arg0 - 1 & Texture.heightMask); 25 | @Pc(40) int[] local40 = this.getChildMonochromeOutput(0, arg0); 26 | @Pc(50) int[] local50 = this.getChildMonochromeOutput(0, Texture.heightMask & arg0 + 1); 27 | for (@Pc(52) int local52 = 0; local52 < Texture.width; local52++) { 28 | @Pc(67) int local67 = (local50[local52] - local34[local52]) * this.anInt4503; 29 | @Pc(87) int local87 = this.anInt4503 * (local40[Texture.widthMask & local52 + 1] - local40[local52 - 1 & Texture.widthMask]); 30 | @Pc(91) int local91 = local87 >> 12; 31 | @Pc(95) int local95 = local67 >> 12; 32 | @Pc(101) int local101 = local91 * local91 >> 12; 33 | @Pc(107) int local107 = local95 * local95 >> 12; 34 | @Pc(121) int local121 = (int) (Math.sqrt((float) (local107 + local101 + 4096) / 4096.0F) * 4096.0D); 35 | @Pc(130) int local130 = local121 == 0 ? 0 : 16777216 / local121; 36 | local19[local52] = 4096 - local130; 37 | } 38 | } 39 | return local19; 40 | } 41 | 42 | @OriginalMember(owner = "client!pg", name = "a", descriptor = "(ILclient!wa;Z)V") 43 | @Override 44 | public final void decode(@OriginalArg(0) int arg0, @OriginalArg(1) Buffer arg1) { 45 | if (arg0 == 0) { 46 | this.anInt4503 = arg1.g2(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpBinary.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!ca") 9 | public final class TextureOpBinary extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!ca", name = "T", descriptor = "I") 12 | private int maxValue = 4096; 13 | 14 | @OriginalMember(owner = "client!ca", name = "P", descriptor = "I") 15 | private int minValue = 0; 16 | 17 | @OriginalMember(owner = "client!ca", name = "", descriptor = "()V") 18 | public TextureOpBinary() { 19 | super(1, true); 20 | } 21 | 22 | @OriginalMember(owner = "client!ca", name = "a", descriptor = "(IB)[I") 23 | @Override 24 | public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { 25 | @Pc(19) int[] local19 = this.monochromeImageCache.get(arg0); 26 | if (this.monochromeImageCache.invalid) { 27 | @Pc(29) int[] local29 = this.getChildMonochromeOutput(0, arg0); 28 | for (@Pc(31) int local31 = 0; local31 < Texture.width; local31++) { 29 | @Pc(38) int local38 = local29[local31]; 30 | local19[local31] = this.minValue <= local38 && local38 <= this.maxValue ? 4096 : 0; 31 | } 32 | } 33 | return local19; 34 | } 35 | 36 | @OriginalMember(owner = "client!ca", name = "a", descriptor = "(ILclient!wa;Z)V") 37 | @Override 38 | public final void decode(@OriginalArg(0) int arg0, @OriginalArg(1) Buffer arg1) { 39 | if (arg0 == 0) { 40 | this.minValue = arg1.g2(); 41 | } else if (arg0 == 1) { 42 | this.maxValue = arg1.g2(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpColorFill.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!fm") 9 | public final class TextureOpColorFill extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!fm", name = "P", descriptor = "I") 12 | private int red; 13 | 14 | @OriginalMember(owner = "client!fm", name = "X", descriptor = "I") 15 | private int green; 16 | 17 | @OriginalMember(owner = "client!fm", name = "Z", descriptor = "I") 18 | private int blue; 19 | 20 | @OriginalMember(owner = "client!fm", name = "", descriptor = "(I)V") 21 | private TextureOpColorFill(@OriginalArg(0) int arg0) { 22 | super(0, false); 23 | this.setColor(arg0); 24 | } 25 | 26 | @OriginalMember(owner = "client!fm", name = "", descriptor = "()V") 27 | public TextureOpColorFill() { 28 | this(0); 29 | } 30 | 31 | @OriginalMember(owner = "client!fm", name = "a", descriptor = "(BI)V") 32 | private void setColor(@OriginalArg(1) int arg0) { 33 | this.green = arg0 >> 4 & 0xFF0; 34 | this.blue = (arg0 & 0xFF) << 4; 35 | this.red = arg0 >> 12 & 0xFF0; 36 | } 37 | 38 | @OriginalMember(owner = "client!fm", name = "b", descriptor = "(II)[[I") 39 | @Override 40 | public final int[][] getColorOutput(@OriginalArg(1) int arg0) { 41 | @Pc(22) int[][] local22 = this.colorImageCache.get(arg0); 42 | if (this.colorImageCache.invalid) { 43 | @Pc(31) int[] local31 = local22[0]; 44 | @Pc(35) int[] local35 = local22[1]; 45 | @Pc(39) int[] local39 = local22[2]; 46 | for (@Pc(41) int local41 = 0; local41 < Texture.width; local41++) { 47 | local31[local41] = this.red; 48 | local35[local41] = this.green; 49 | local39[local41] = this.blue; 50 | } 51 | } 52 | return local22; 53 | } 54 | 55 | @OriginalMember(owner = "client!fm", name = "a", descriptor = "(ILclient!wa;Z)V") 56 | @Override 57 | public final void decode(@OriginalArg(0) int arg0, @OriginalArg(1) Buffer arg1) { 58 | if (arg0 == 0) { 59 | this.setColor(arg1.g3()); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpHorizontalGradient.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!rl") 8 | public final class TextureOpHorizontalGradient extends TextureOp { 9 | 10 | @OriginalMember(owner = "client!rl", name = "", descriptor = "()V") 11 | public TextureOpHorizontalGradient() { 12 | super(0, true); 13 | } 14 | 15 | @OriginalMember(owner = "client!rl", name = "a", descriptor = "(IB)[I") 16 | @Override 17 | public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { 18 | return Texture.widthFractions; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpInvert.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!tb") 9 | public final class TextureOpInvert extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!tb", name = "", descriptor = "()V") 12 | public TextureOpInvert() { 13 | super(1, false); 14 | } 15 | 16 | @OriginalMember(owner = "client!tb", name = "a", descriptor = "(IB)[I") 17 | @Override 18 | public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { 19 | @Pc(7) int[] local7 = this.monochromeImageCache.get(arg0); 20 | if (this.monochromeImageCache.invalid) { 21 | @Pc(21) int[] local21 = this.getChildMonochromeOutput(0, arg0); 22 | for (@Pc(23) int local23 = 0; local23 < Texture.width; local23++) { 23 | local7[local23] = 4096 - local21[local23]; 24 | } 25 | } 26 | return local7; 27 | } 28 | 29 | @OriginalMember(owner = "client!tb", name = "a", descriptor = "(ILclient!wa;Z)V") 30 | @Override 31 | public final void decode(@OriginalArg(0) int arg0, @OriginalArg(1) Buffer arg1) { 32 | if (arg0 == 0) { 33 | this.monochrome = arg1.g1() == 1; 34 | } 35 | } 36 | 37 | @OriginalMember(owner = "client!tb", name = "b", descriptor = "(II)[[I") 38 | @Override 39 | public final int[][] getColorOutput(@OriginalArg(1) int arg0) { 40 | @Pc(18) int[][] local18 = this.colorImageCache.get(arg0); 41 | if (this.colorImageCache.invalid) { 42 | @Pc(28) int[][] local28 = this.getChildColorOutput(arg0, 0); 43 | @Pc(32) int[] local32 = local28[2]; 44 | @Pc(36) int[] local36 = local28[0]; 45 | @Pc(40) int[] local40 = local28[1]; 46 | @Pc(44) int[] local44 = local18[0]; 47 | @Pc(48) int[] local48 = local18[1]; 48 | @Pc(52) int[] local52 = local18[2]; 49 | for (@Pc(54) int local54 = 0; local54 < Texture.width; local54++) { 50 | local44[local54] = 4096 - local36[local54]; 51 | local48[local54] = 4096 - local40[local54]; 52 | local52[local54] = 4096 - local32[local54]; 53 | } 54 | } 55 | return local18; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpMonochrome.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!fn") 9 | public final class TextureOpMonochrome extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!fn", name = "", descriptor = "()V") 12 | public TextureOpMonochrome() { 13 | super(1, true); 14 | } 15 | 16 | @OriginalMember(owner = "client!fn", name = "a", descriptor = "(IB)[I") 17 | @Override 18 | public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { 19 | @Pc(19) int[] local19 = this.monochromeImageCache.get(arg0); 20 | if (this.monochromeImageCache.invalid) { 21 | @Pc(30) int[][] local30 = this.getChildColorOutput(arg0, 0); 22 | @Pc(34) int[] local34 = local30[0]; 23 | @Pc(38) int[] local38 = local30[2]; 24 | @Pc(42) int[] local42 = local30[1]; 25 | for (@Pc(44) int local44 = 0; local44 < Texture.width; local44++) { 26 | local19[local44] = (local38[local44] + local34[local44] + local42[local44]) / 3; 27 | } 28 | } 29 | return local19; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpMonochromeFill.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!mi") 9 | public final class TextureOpMonochromeFill extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!mi", name = "bb", descriptor = "I") 12 | private int anInt3894; 13 | 14 | @OriginalMember(owner = "client!mi", name = "", descriptor = "(I)V") 15 | private TextureOpMonochromeFill(@OriginalArg(0) int arg0) { 16 | super(0, true); 17 | this.anInt3894 = 4096; 18 | this.anInt3894 = arg0; 19 | } 20 | 21 | @OriginalMember(owner = "client!mi", name = "", descriptor = "()V") 22 | public TextureOpMonochromeFill() { 23 | this(4096); 24 | } 25 | 26 | @OriginalMember(owner = "client!mi", name = "a", descriptor = "(ILclient!wa;Z)V") 27 | @Override 28 | public final void decode(@OriginalArg(0) int arg0, @OriginalArg(1) Buffer arg1) { 29 | if (arg0 == 0) { 30 | this.anInt3894 = (arg1.g1() << 12) / 255; 31 | } 32 | } 33 | 34 | @OriginalMember(owner = "client!mi", name = "a", descriptor = "(IB)[I") 35 | @Override 36 | public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { 37 | @Pc(17) int[] local17 = this.monochromeImageCache.get(arg0); 38 | if (this.monochromeImageCache.invalid) { 39 | ArrayUtils.fill(local17, 0, Texture.width, this.anInt3894); 40 | } 41 | return local17; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpNoise.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!rj") 9 | public final class TextureOpNoise extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!rj", name = "", descriptor = "()V") 12 | public TextureOpNoise() { 13 | super(0, true); 14 | } 15 | 16 | @OriginalMember(owner = "client!rj", name = "c", descriptor = "(III)I") 17 | private int method3769(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { 18 | @Pc(19) int local19 = arg1 + arg0 * 57; 19 | @Pc(25) int local25 = local19 ^ local19 << 1; 20 | return 4096 - (local25 * (local25 * local25 * 15731 + 789221) + 1376312589 & Integer.MAX_VALUE) / 262144; 21 | } 22 | 23 | @OriginalMember(owner = "client!rj", name = "a", descriptor = "(IB)[I") 24 | @Override 25 | public final int[] getMonochromeOutput(@OriginalArg(0) int arg0) { 26 | @Pc(15) int[] local15 = this.monochromeImageCache.get(arg0); 27 | if (this.monochromeImageCache.invalid) { 28 | @Pc(27) int local27 = Texture.heightFractions[arg0]; 29 | for (@Pc(29) int local29 = 0; local29 < Texture.width; local29++) { 30 | local15[local29] = this.method3769(local27, Texture.widthFractions[local29]) % 4096; 31 | } 32 | } 33 | return local15; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpTiledSprite.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!kd") 9 | public final class TextureOpTiledSprite extends TextureOpSprite { 10 | 11 | @OriginalMember(owner = "client!kd", name = "b", descriptor = "(II)[[I") 12 | @Override 13 | public final int[][] getColorOutput(@OriginalArg(1) int arg0) { 14 | @Pc(11) int[][] local11 = this.colorImageCache.get(arg0); 15 | if (this.colorImageCache.invalid && this.loadSprite()) { 16 | @Pc(24) int[] local24 = local11[0]; 17 | @Pc(32) int local32 = arg0 % this.height * this.height; 18 | @Pc(36) int[] local36 = local11[1]; 19 | @Pc(40) int[] local40 = local11[2]; 20 | for (@Pc(42) int local42 = 0; local42 < Texture.width; local42++) { 21 | @Pc(55) int local55 = this.pixels[local32 + local42 % this.width]; 22 | local40[local42] = (local55 & 0xFF) << 4; 23 | local36[local42] = local55 >> 4 & 0xFF0; 24 | local24[local42] = local55 >> 12 & 0xFF0; 25 | } 26 | } 27 | return local11; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureOpVerticalGradient.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!qg") 9 | public final class TextureOpVerticalGradient extends TextureOp { 10 | 11 | @OriginalMember(owner = "client!qg", name = "", descriptor = "()V") 12 | public TextureOpVerticalGradient() { 13 | super(0, true); 14 | } 15 | 16 | @OriginalMember(owner = "client!qg", name = "a", descriptor = "(IB)[I") 17 | @Override 18 | public final int[] getMonochromeOutput(@OriginalArg(0) int y) { 19 | @Pc(9) int[] dest = this.monochromeImageCache.get(y); 20 | if (this.monochromeImageCache.invalid) { 21 | ArrayUtils.fill(dest, 0, Texture.width, Texture.heightFractions[y]); 22 | } 23 | return dest; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TextureProvider.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!m") 8 | public interface TextureProvider { 9 | 10 | @OriginalMember(owner = "client!m", name = "a", descriptor = "(BI)Z") 11 | boolean isOpaque(@OriginalArg(1) int arg0); 12 | 13 | @OriginalMember(owner = "client!m", name = "a", descriptor = "(IZ)V") 14 | void method3227(@OriginalArg(0) int arg0); 15 | 16 | @OriginalMember(owner = "client!m", name = "b", descriptor = "(IZ)I") 17 | int method3228(@OriginalArg(0) int arg0); 18 | 19 | @OriginalMember(owner = "client!m", name = "a", descriptor = "(II)I") 20 | int method3229(@OriginalArg(1) int arg0); 21 | 22 | @OriginalMember(owner = "client!m", name = "b", descriptor = "(II)Z") 23 | boolean method3230(@OriginalArg(1) int arg0); 24 | 25 | @OriginalMember(owner = "client!m", name = "c", descriptor = "(II)Z") 26 | boolean method3231(@OriginalArg(0) int arg0); 27 | 28 | @OriginalMember(owner = "client!m", name = "a", descriptor = "(IZF)[I") 29 | int[] method3232(@OriginalArg(0) int arg0, @OriginalArg(2) float arg1); 30 | 31 | @OriginalMember(owner = "client!m", name = "b", descriptor = "(BI)Z") 32 | boolean isLowDetail(@OriginalArg(1) int arg0); 33 | 34 | @OriginalMember(owner = "client!m", name = "d", descriptor = "(II)I") 35 | int getAverageColor(@OriginalArg(0) int arg0); 36 | 37 | @OriginalMember(owner = "client!m", name = "e", descriptor = "(II)[I") 38 | int[] getPixels(@OriginalArg(1) int arg0); 39 | 40 | @OriginalMember(owner = "client!m", name = "f", descriptor = "(II)Z") 41 | boolean method3236(@OriginalArg(0) int arg0); 42 | 43 | @OriginalMember(owner = "client!m", name = "g", descriptor = "(II)I") 44 | int getMaterialType(@OriginalArg(0) int arg0); 45 | 46 | @OriginalMember(owner = "client!m", name = "h", descriptor = "(II)I") 47 | int method3238(@OriginalArg(1) int arg0); 48 | } 49 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/ThreadUtils.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class ThreadUtils { 8 | @OriginalMember(owner = "client!sk", name = "a", descriptor = "(JI)V") 9 | public static void sleep(@OriginalArg(0) long arg0) { 10 | if (arg0 <= 0L) { 11 | return; 12 | } 13 | if (arg0 % 10L == 0L) { 14 | sleepUninterruptibly(arg0 - 1L); 15 | sleepUninterruptibly(1L); 16 | } else { 17 | sleepUninterruptibly(arg0); 18 | } 19 | } 20 | 21 | @OriginalMember(owner = "client!rm", name = "a", descriptor = "(JB)V") 22 | public static void sleepUninterruptibly(@OriginalArg(0) long arg0) { 23 | try { 24 | Thread.sleep(arg0); 25 | } catch (@Pc(11) InterruptedException local11) { 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Timer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!s") 9 | public abstract class Timer { 10 | 11 | @OriginalMember(owner = "client!fi", name = "a", descriptor = "(B)Lclient!s;") 12 | public static Timer create() { 13 | try { 14 | return new NanoTimer(); 15 | } catch (@Pc(15) Throwable ex) { 16 | return new MillisTimer(); 17 | } 18 | } 19 | 20 | @OriginalMember(owner = "client!s", name = "a", descriptor = "(III)I") 21 | public abstract int sleep(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1); 22 | 23 | @OriginalMember(owner = "client!s", name = "b", descriptor = "(I)V") 24 | public abstract void reset(); 25 | 26 | public abstract int count(int arg0, int arg1); 27 | } 28 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/TriangleNormal.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | @OriginalClass("client!qj") 8 | public final class TriangleNormal { 9 | 10 | @OriginalMember(owner = "client!qj", name = "c", descriptor = "I") 11 | public int anInt4767; 12 | 13 | @OriginalMember(owner = "client!qj", name = "e", descriptor = "I") 14 | public int anInt4769; 15 | 16 | @OriginalMember(owner = "client!qj", name = "f", descriptor = "I") 17 | public int anInt4770; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/UnlitMaterialRenderer.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!ue") 8 | public final class UnlitMaterialRenderer implements MaterialRenderer { 9 | 10 | @OriginalMember(owner = "client!ue", name = "b", descriptor = "()V") 11 | @Override 12 | public final void bind() { 13 | if (Preferences.highDetailLighting) { 14 | GlRenderer.setLightingEnabled(false); 15 | } 16 | } 17 | 18 | @OriginalMember(owner = "client!ue", name = "c", descriptor = "()I") 19 | @Override 20 | public final int getFlags() { 21 | return 0; 22 | } 23 | 24 | @OriginalMember(owner = "client!ue", name = "a", descriptor = "(I)V") 25 | @Override 26 | public final void setArgument(@OriginalArg(0) int arg0) { 27 | } 28 | 29 | @OriginalMember(owner = "client!ue", name = "a", descriptor = "()V") 30 | @Override 31 | public final void unbind() { 32 | if (Preferences.highDetailLighting) { 33 | GlRenderer.setLightingEnabled(true); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/VarbitType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!kk") 9 | public final class VarbitType { 10 | 11 | @OriginalMember(owner = "client!kk", name = "c", descriptor = "I") 12 | public int startBit; 13 | 14 | @OriginalMember(owner = "client!kk", name = "h", descriptor = "I") 15 | public int endBit; 16 | 17 | @OriginalMember(owner = "client!kk", name = "l", descriptor = "I") 18 | public int baseVar; 19 | 20 | @OriginalMember(owner = "client!kk", name = "a", descriptor = "(Lclient!wa;I)V") 21 | public final void decode(@OriginalArg(0) Buffer buffer) { 22 | while (true) { 23 | @Pc(9) int opcode = buffer.g1(); 24 | if (opcode == 0) { 25 | return; 26 | } 27 | this.decode(buffer, opcode); 28 | } 29 | } 30 | 31 | @OriginalMember(owner = "client!kk", name = "a", descriptor = "(Lclient!wa;II)V") 32 | private void decode(@OriginalArg(0) Buffer buffer, @OriginalArg(2) int opcode) { 33 | if (opcode == 1) { 34 | this.baseVar = buffer.g2(); 35 | this.startBit = buffer.g1(); 36 | this.endBit = buffer.g1(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/VarbitTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class VarbitTypeList { 8 | @OriginalMember(owner = "client!jl", name = "G", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 10 | @OriginalMember(owner = "client!nj", name = "c", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | 13 | @OriginalMember(owner = "client!og", name = "a", descriptor = "(Lclient!ve;I)V") 14 | public static void init(@OriginalArg(0) Js5 arg0) { 15 | archive = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!jl", name = "a", descriptor = "(IB)Lclient!kk;") 19 | public static VarbitType get(@OriginalArg(0) int id) { 20 | @Pc(10) VarbitType varbit = (VarbitType) types.get(id); 21 | if (varbit != null) { 22 | return varbit; 23 | } 24 | @Pc(31) byte[] data = archive.fetchFile(getGroupId(id), getFileId(id)); 25 | varbit = new VarbitType(); 26 | if (data != null) { 27 | varbit.decode(new Buffer(data)); 28 | } 29 | types.put(varbit, id); 30 | return varbit; 31 | } 32 | 33 | @OriginalMember(owner = "client!wa", name = "d", descriptor = "(BI)V") 34 | public static void clean() { 35 | types.clean(5); 36 | } 37 | 38 | @OriginalMember(owner = "client!gd", name = "a", descriptor = "(I)V") 39 | public static void removeSoft() { 40 | types.removeSoft(); 41 | } 42 | 43 | @OriginalMember(owner = "client!ec", name = "b", descriptor = "(I)V") 44 | public static void clear() { 45 | types.clear(); 46 | } 47 | 48 | @OriginalMember(owner = "client!wf", name = "a", descriptor = "(II)I") 49 | public static int getFileId(@OriginalArg(0) int arg0) { 50 | return arg0 & 0x3FF; 51 | } 52 | 53 | @OriginalMember(owner = "client!uj", name = "a", descriptor = "(II)I") 54 | public static int getGroupId(@OriginalArg(0) int arg0) { 55 | return arg0 >>> 10; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/VarcDomain.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalMember; 4 | 5 | public class VarcDomain { 6 | @OriginalMember(owner = "client!t", name = "E", descriptor = "[I") 7 | public static final int[] updatedVarcstrs = new int[32]; 8 | @OriginalMember(owner = "client!km", name = "Bc", descriptor = "[I") 9 | public static final int[] updatedVarcs = new int[32]; 10 | @OriginalMember(owner = "client!me", name = "P", descriptor = "[I") 11 | public static final int[] varcs = new int[2000]; 12 | @OriginalMember(owner = "client!sf", name = "h", descriptor = "[Lclient!na;") 13 | public static final JagString[] varcstrs = new JagString[1000]; 14 | @OriginalMember(owner = "client!fl", name = "B", descriptor = "I") 15 | public static int updatedVarcstrsWriterIndex = 0; 16 | @OriginalMember(owner = "client!ac", name = "o", descriptor = "I") 17 | public static int updatedVarcsWriterIndex = 0; 18 | } 19 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/VarpType.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | @OriginalClass("client!eh") 9 | public final class VarpType { 10 | 11 | @OriginalMember(owner = "client!eh", name = "e", descriptor = "I") 12 | public int clientCode = 0; 13 | 14 | @OriginalMember(owner = "client!eh", name = "a", descriptor = "(ILclient!wa;)V") 15 | public final void decode(@OriginalArg(1) Buffer buffer) { 16 | while (true) { 17 | @Pc(5) int opcode = buffer.g1(); 18 | if (opcode == 0) { 19 | return; 20 | } 21 | this.decode(buffer, opcode); 22 | } 23 | } 24 | 25 | @OriginalMember(owner = "client!eh", name = "a", descriptor = "(Lclient!wa;BI)V") 26 | private void decode(@OriginalArg(0) Buffer buffer, @OriginalArg(2) int opcode) { 27 | if (opcode == 5) { 28 | this.clientCode = buffer.g2(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/VarpTypeList.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class VarpTypeList { 8 | @OriginalMember(owner = "client!sm", name = "c", descriptor = "Lclient!n;") 9 | public static final SoftLruHashTable types = new SoftLruHashTable(64); 10 | @OriginalMember(owner = "client!gg", name = "ab", descriptor = "Lclient!ve;") 11 | public static Js5 archive; 12 | @OriginalMember(owner = "client!nb", name = "p", descriptor = "I") 13 | public static int anInt4043; 14 | 15 | @OriginalMember(owner = "client!sj", name = "a", descriptor = "(Lclient!ve;B)V") 16 | public static void init(@OriginalArg(0) Js5 arg0) { 17 | archive = arg0; 18 | anInt4043 = archive.getGroupCapacity(16); 19 | } 20 | 21 | @OriginalMember(owner = "client!ub", name = "a", descriptor = "(II)Lclient!eh;") 22 | public static VarpType get(@OriginalArg(1) int id) { 23 | @Pc(10) VarpType varp = (VarpType) types.get(id); 24 | if (varp != null) { 25 | return varp; 26 | } 27 | @Pc(20) byte[] data = archive.fetchFile(16, id); 28 | varp = new VarpType(); 29 | if (data != null) { 30 | varp.decode(new Buffer(data)); 31 | } 32 | types.put(varp, id); 33 | return varp; 34 | } 35 | 36 | @OriginalMember(owner = "client!ud", name = "d", descriptor = "(I)V") 37 | public static void clear() { 38 | types.clear(); 39 | } 40 | 41 | @OriginalMember(owner = "client!ab", name = "b", descriptor = "(B)V") 42 | public static void removeSoft() { 43 | types.removeSoft(); 44 | } 45 | 46 | @OriginalMember(owner = "client!bn", name = "c", descriptor = "(II)V") 47 | public static void clean() { 48 | types.clean(5); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/VertexNormal.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | @OriginalClass("client!hd") 8 | public final class VertexNormal { 9 | 10 | @OriginalMember(owner = "client!hd", name = "b", descriptor = "I") 11 | public int y; 12 | 13 | @OriginalMember(owner = "client!hd", name = "d", descriptor = "I") 14 | public int magnitude; 15 | 16 | @OriginalMember(owner = "client!hd", name = "m", descriptor = "I") 17 | public int z; 18 | 19 | @OriginalMember(owner = "client!hd", name = "n", descriptor = "I") 20 | public int x; 21 | 22 | @OriginalMember(owner = "client!hd", name = "", descriptor = "()V") 23 | public VertexNormal() { 24 | } 25 | 26 | @OriginalMember(owner = "client!hd", name = "", descriptor = "(Lclient!hd;)V") 27 | public VertexNormal(@OriginalArg(0) VertexNormal arg0) { 28 | this.magnitude = arg0.magnitude; 29 | this.x = arg0.x; 30 | this.y = arg0.y; 31 | this.z = arg0.z; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/VorbisMapping.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | @OriginalClass("client!uk") 8 | public final class VorbisMapping { 9 | 10 | @OriginalMember(owner = "client!uk", name = "d", descriptor = "I") 11 | public final int submaps; 12 | 13 | @OriginalMember(owner = "client!uk", name = "a", descriptor = "I") 14 | public int mux; 15 | 16 | @OriginalMember(owner = "client!uk", name = "b", descriptor = "[I") 17 | public final int[] submapFloor; 18 | 19 | @OriginalMember(owner = "client!uk", name = "c", descriptor = "[I") 20 | public final int[] submapResidue; 21 | 22 | @OriginalMember(owner = "client!uk", name = "", descriptor = "()V") 23 | public VorbisMapping() { 24 | VorbisSound.readBits(16); 25 | this.submaps = VorbisSound.readBit() == 0 ? 1 : VorbisSound.readBits(4) + 1; 26 | if (VorbisSound.readBit() != 0) { 27 | VorbisSound.readBits(8); 28 | } 29 | VorbisSound.readBits(2); 30 | if (this.submaps > 1) { 31 | this.mux = VorbisSound.readBits(4); 32 | } 33 | this.submapFloor = new int[this.submaps]; 34 | this.submapResidue = new int[this.submaps]; 35 | for (@Pc(42) int local42 = 0; local42 < this.submaps; local42++) { 36 | VorbisSound.readBits(8); 37 | this.submapFloor[local42] = VorbisSound.readBits(8); 38 | this.submapResidue[local42] = VorbisSound.readBits(8); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/Wall.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!jh") 7 | public final class Wall { 8 | 9 | @OriginalMember(owner = "client!jh", name = "a", descriptor = "I") 10 | public int zFine; 11 | 12 | @OriginalMember(owner = "client!jh", name = "e", descriptor = "Lclient!th;") 13 | public Entity primary; 14 | 15 | @OriginalMember(owner = "client!jh", name = "h", descriptor = "Lclient!th;") 16 | public Entity secondary; 17 | 18 | @OriginalMember(owner = "client!jh", name = "k", descriptor = "I") 19 | public int xFine; 20 | 21 | @OriginalMember(owner = "client!jh", name = "l", descriptor = "I") 22 | public int anInt3049; 23 | 24 | @OriginalMember(owner = "client!jh", name = "o", descriptor = "I") 25 | public int anInt3051; 26 | 27 | @OriginalMember(owner = "client!jh", name = "q", descriptor = "I") 28 | public int anInt3052; 29 | 30 | @OriginalMember(owner = "client!jh", name = "d", descriptor = "J") 31 | public long key = 0L; 32 | } 33 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/WallDecor.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!df") 7 | public final class WallDecor { 8 | 9 | @OriginalMember(owner = "client!df", name = "a", descriptor = "I") 10 | public int anInt1388; 11 | 12 | @OriginalMember(owner = "client!df", name = "d", descriptor = "Lclient!th;") 13 | public Entity secondary; 14 | 15 | @OriginalMember(owner = "client!df", name = "e", descriptor = "I") 16 | public int xFine; 17 | 18 | @OriginalMember(owner = "client!df", name = "f", descriptor = "I") 19 | public int anInt1391; 20 | 21 | @OriginalMember(owner = "client!df", name = "g", descriptor = "I") 22 | public int zOffset; 23 | 24 | @OriginalMember(owner = "client!df", name = "h", descriptor = "I") 25 | public int zFine; 26 | 27 | @OriginalMember(owner = "client!df", name = "j", descriptor = "Lclient!th;") 28 | public Entity primary; 29 | 30 | @OriginalMember(owner = "client!df", name = "k", descriptor = "I") 31 | public int xOffset; 32 | 33 | @OriginalMember(owner = "client!df", name = "m", descriptor = "I") 34 | public int anInt1395; 35 | 36 | @OriginalMember(owner = "client!df", name = "i", descriptor = "J") 37 | public long key = 0L; 38 | } 39 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/WordPack.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | public class WordPack { 8 | @OriginalMember(owner = "client!vl", name = "f", descriptor = "Lclient!na;") 9 | public static final JagString CABBAGE = JagString.parse("Cabbage"); 10 | @OriginalMember(owner = "client!f", name = "W", descriptor = "Lclient!fi;") 11 | public static HuffmanCodec codec; 12 | 13 | @OriginalMember(owner = "client!a", name = "a", descriptor = "(Lclient!fi;I)V") 14 | public static void init(@OriginalArg(0) HuffmanCodec arg0) { 15 | codec = arg0; 16 | } 17 | 18 | @OriginalMember(owner = "client!lg", name = "a", descriptor = "(ZLclient!wa;Lclient!na;)I") 19 | public static int encode(@OriginalArg(1) Buffer arg0, @OriginalArg(2) JagString arg1) { 20 | @Pc(6) int local6 = arg0.offset; 21 | @Pc(14) byte[] local14 = arg1.method3148(); 22 | arg0.psmarts(local14.length); 23 | arg0.offset += codec.encode(local14.length, arg0.data, local14, 0, arg0.offset); 24 | return arg0.offset - local6; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/World.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!ba") 7 | public final class World extends AbstractWorld { 8 | 9 | @OriginalMember(owner = "client!ba", name = "t", descriptor = "Lclient!na;") 10 | public JagString activity; 11 | 12 | @OriginalMember(owner = "client!ba", name = "u", descriptor = "I") 13 | public int id; 14 | 15 | @OriginalMember(owner = "client!ba", name = "A", descriptor = "Lclient!na;") 16 | public JagString hostname; 17 | 18 | @OriginalMember(owner = "client!ba", name = "g", descriptor = "(I)Lclient!ee;") 19 | public final WorldInfo getWorldInfo() { 20 | return WorldList.countries[this.country]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /client/src/main/java/rt4/WorldInfo.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("client!ee") 7 | public final class WorldInfo { 8 | 9 | @OriginalMember(owner = "client!ee", name = "h", descriptor = "I") 10 | public int flag; 11 | 12 | @OriginalMember(owner = "client!ee", name = "i", descriptor = "Lclient!na;") 13 | public JagString name; 14 | } 15 | -------------------------------------------------------------------------------- /deob-annotations/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'java-library' 4 | } 5 | 6 | version = '0.1.0' 7 | 8 | sourceCompatibility = 1.8 9 | targetCompatibility = 1.8 10 | -------------------------------------------------------------------------------- /deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalArg.java: -------------------------------------------------------------------------------- 1 | package org.openrs2.deob.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Target; 5 | 6 | @Target({ElementType.PARAMETER}) 7 | public @interface OriginalArg { 8 | int value(); 9 | } 10 | -------------------------------------------------------------------------------- /deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalClass.java: -------------------------------------------------------------------------------- 1 | package org.openrs2.deob.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Target; 5 | 6 | @Target({ElementType.TYPE}) 7 | public @interface OriginalClass { 8 | String value(); 9 | } 10 | -------------------------------------------------------------------------------- /deob-annotations/src/main/java/org/openrs2/deob/annotation/OriginalMember.java: -------------------------------------------------------------------------------- 1 | package org.openrs2.deob.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Target; 5 | 6 | @Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD}) 7 | public @interface OriginalMember { 8 | String owner(); 9 | 10 | String name(); 11 | 12 | String descriptor(); 13 | } 14 | -------------------------------------------------------------------------------- /deob-annotations/src/main/java/org/openrs2/deob/annotation/Pc.java: -------------------------------------------------------------------------------- 1 | package org.openrs2.deob.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Target; 5 | 6 | @Target({ElementType.LOCAL_VARIABLE, ElementType.PARAMETER}) 7 | public @interface Pc { 8 | int value(); 9 | } 10 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /lib/gluegen-rt-natives-android-aarch64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt-natives-android-aarch64.jar -------------------------------------------------------------------------------- /lib/gluegen-rt-natives-linux-aarch64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt-natives-linux-aarch64.jar -------------------------------------------------------------------------------- /lib/gluegen-rt-natives-linux-amd64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt-natives-linux-amd64.jar -------------------------------------------------------------------------------- /lib/gluegen-rt-natives-linux-i586.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt-natives-linux-i586.jar -------------------------------------------------------------------------------- /lib/gluegen-rt-natives-macosx-universal.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt-natives-macosx-universal.jar -------------------------------------------------------------------------------- /lib/gluegen-rt-natives-windows-amd64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt-natives-windows-amd64.jar -------------------------------------------------------------------------------- /lib/gluegen-rt-natives-windows-i586.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt-natives-windows-i586.jar -------------------------------------------------------------------------------- /lib/gluegen-rt.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gluegen-rt.jar -------------------------------------------------------------------------------- /lib/gson.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/gson.jar -------------------------------------------------------------------------------- /lib/jogl-all-natives-android-aarch64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all-natives-android-aarch64.jar -------------------------------------------------------------------------------- /lib/jogl-all-natives-linux-aarch64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all-natives-linux-aarch64.jar -------------------------------------------------------------------------------- /lib/jogl-all-natives-linux-amd64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all-natives-linux-amd64.jar -------------------------------------------------------------------------------- /lib/jogl-all-natives-linux-i586.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all-natives-linux-i586.jar -------------------------------------------------------------------------------- /lib/jogl-all-natives-macosx-universal.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all-natives-macosx-universal.jar -------------------------------------------------------------------------------- /lib/jogl-all-natives-windows-amd64.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all-natives-windows-amd64.jar -------------------------------------------------------------------------------- /lib/jogl-all-natives-windows-i586.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all-natives-windows-i586.jar -------------------------------------------------------------------------------- /lib/jogl-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pazaz/RT4-Client/5f83213ebb08288c65f56ca64312ed628d86d1c5/lib/jogl-all.jar -------------------------------------------------------------------------------- /playground/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'application' 4 | } 5 | 6 | mainClassName = 'com.itspazaz.rt4.Playground' 7 | version = '1.0.0' 8 | 9 | sourceCompatibility = 1.8 10 | targetCompatibility = 1.8 11 | 12 | compileJava.options.encoding = 'UTF-8' 13 | 14 | tasks.withType(JavaCompile) { 15 | options.encoding = 'UTF-8' 16 | } 17 | 18 | dependencies { 19 | implementation project(':client') // TODO: abstract client/engine code 20 | } 21 | 22 | jar { 23 | manifest { 24 | attributes 'Main-Class': "$mainClassName" 25 | } 26 | from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } } 27 | duplicatesStrategy = DuplicatesStrategy.INCLUDE 28 | } 29 | -------------------------------------------------------------------------------- /plugin-playground/src/main/java/OverheadDebugPlugin/plugin.java: -------------------------------------------------------------------------------- 1 | package OverheadDebugPlugin; 2 | 3 | import plugin.Plugin; 4 | import plugin.annotations.PluginMeta; 5 | import plugin.api.*; 6 | import rt4.*; 7 | 8 | @PluginMeta( 9 | author = "Ceikry", 10 | description = "Draws helpful overhead debug information.", 11 | version = 1.3 12 | ) 13 | public class plugin extends Plugin { 14 | private boolean isEnabled = false; 15 | 16 | @Override 17 | public void PlayerOverheadDraw(Player player, int screenX, int screenY) { 18 | if (!isEnabled) return; 19 | 20 | API.DrawText( 21 | FontType.SMALL, 22 | FontColor.YELLOW, 23 | TextModifier.CENTER, 24 | player.username.toString(), 25 | screenX, 26 | screenY 27 | ); 28 | } 29 | 30 | @Override 31 | public void NPCOverheadDraw(Npc npc, int screenX, int screenY) { 32 | if (!isEnabled) return; 33 | 34 | String npcSb = 35 | (npc.type.name.strEquals(JagString.parse("null")) 36 | ? npc.type.getMultiNpc() != null 37 | ? "Wrapper [" + npc.type.getMultiNpc().name + "]" 38 | : "Wrapper" 39 | : npc.type.name) + 40 | " [G: " + 41 | npc.spotAnimId + 42 | "] [R: " + npc.getBasId() + 43 | "] [A: " + npc.seqId + 44 | "] [Vb: " + 45 | npc.type.multiNpcVarbit + "]"; 46 | 47 | API.DrawText( 48 | FontType.SMALL, 49 | FontColor.YELLOW, 50 | TextModifier.CENTER, 51 | npcSb, 52 | screenX, 53 | screenY 54 | ); 55 | } 56 | 57 | @Override 58 | public void ProcessCommand(String commandStr, String[] args) { 59 | if (!API.PlayerHasPrivilege(Privileges.JMOD)) return; 60 | 61 | if (commandStr.equalsIgnoreCase("::npcdebug")) { 62 | isEnabled = !isEnabled; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.kt: -------------------------------------------------------------------------------- 1 | package BetterShiftDrop 2 | 3 | import plugin.Plugin 4 | import plugin.annotations.PluginMeta 5 | import plugin.api.API 6 | import plugin.api.MiniMenuEntry 7 | import rt4.Cheat 8 | import rt4.Keyboard 9 | 10 | @PluginMeta( 11 | author = "bushtail", 12 | description = "Better dropping and destroying while holding shift.", 13 | version = 1.0 14 | ) 15 | class plugin : Plugin() { 16 | override fun Init() { 17 | Cheat.shiftClick = false 18 | } 19 | override fun OnMiniMenuCreate(currentEntries: Array?) { 20 | if(currentEntries == null) return 21 | if(API.IsKeyPressed(Keyboard.KEY_SHIFT)) { 22 | for(entry in currentEntries) { 23 | if(entry.verb.toLowerCase() == "drop" || entry.verb.toLowerCase() == "destroy") continue 24 | if(!entry.isStrictlySecondary) entry.toggleStrictlySecondary() 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /plugin-playground/src/main/kotlin/Craftify/plugin.kt: -------------------------------------------------------------------------------- 1 | package Craftify 2 | 3 | import plugin.Plugin 4 | import plugin.annotations.PluginMeta 5 | import plugin.api.API 6 | import plugin.api.FontColor 7 | import plugin.api.FontType 8 | import plugin.api.TextModifier 9 | import rt4.Fonts 10 | import rt4.Player 11 | import java.awt.Color 12 | 13 | 14 | @PluginMeta( 15 | author = "bushtail", 16 | description = "Reupload of the old plugin I lost the source for.", 17 | version = 1.0 18 | ) 19 | class plugin : Plugin() { 20 | 21 | override fun PlayerOverheadDraw(player: Player?, screenX: Int, screenY: Int) { 22 | if(player == null) return 23 | val width = Fonts.p11Full.getStringWidth(player.username) 24 | API.FillRect(screenX - width / 2, screenY - 12, width, 14, FontColor.fromColor(Color.BLACK).colorCode, 84) 25 | API.DrawText(FontType.SMALL, FontColor.fromColor(Color.WHITE), TextModifier.CENTER, player.username.toString(), screenX, screenY) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /plugin-playground/src/main/kotlin/EscClose/plugin.kt: -------------------------------------------------------------------------------- 1 | package EscClose 2 | 3 | import plugin.Plugin 4 | import plugin.annotations.PluginMeta 5 | import plugin.api.API 6 | import java.awt.event.KeyAdapter 7 | import java.awt.event.KeyEvent 8 | 9 | @PluginMeta ( 10 | author = "Chisato", 11 | description = "Allows you to use ESC in order to (safety) close the open interface/dialogue.", 12 | version = 1.0 13 | ) 14 | class plugin : Plugin() { 15 | override fun Init() { 16 | API.AddKeyboardListener(object : KeyAdapter() { 17 | override fun keyPressed(e: KeyEvent) { 18 | if (e.keyCode == KeyEvent.VK_ESCAPE) 19 | API.DispatchCommand("::xface") 20 | } 21 | }) 22 | } 23 | } -------------------------------------------------------------------------------- /plugin-playground/src/main/kotlin/LeftClickAttack/plugin.kt: -------------------------------------------------------------------------------- 1 | package LeftClickAttack 2 | 3 | import plugin.Plugin 4 | import plugin.annotations.PluginMeta 5 | import plugin.api.MiniMenuEntry 6 | 7 | @PluginMeta( 8 | author = "bushtail", 9 | description = "Provides left-click attack for level > 128 combat.", 10 | version = 1.0 11 | ) 12 | class plugin : Plugin() { 13 | override fun OnMiniMenuCreate(currentEntries: Array?) { 14 | if (currentEntries == null) return 15 | for (entry in currentEntries) { 16 | if(entry.verb.toLowerCase() == "attack" && entry.isStrictlySecondary) 17 | entry.toggleStrictlySecondary() 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /plugin-playground/src/main/kotlin/RememberMyLogin/plugin.kt: -------------------------------------------------------------------------------- 1 | package RememberMyLogin 2 | 3 | import plugin.Plugin 4 | import plugin.annotations.PluginMeta 5 | import plugin.api.API 6 | import rt4.Component 7 | import rt4.JagString 8 | import rt4.Player 9 | 10 | @PluginMeta ( 11 | author = "Ceikry", 12 | description = "Stores your last used login for automatic reuse", 13 | version = 1.0 14 | ) 15 | class plugin : Plugin() { 16 | var hasRan = false 17 | var username = "" 18 | var password = "" 19 | 20 | override fun Init() { 21 | username = API.GetData("login-user") as? String ?: "" 22 | password = API.GetData("login-pass") as? String ?: "" 23 | } 24 | 25 | override fun ComponentDraw(componentIndex: Int, component: Component?, screenX: Int, screenY: Int) { 26 | if (hasRan || API.IsLoggedIn()) return 27 | if (component!!.text == JagString.of("Please Log In")) { 28 | API.SetVarcStr(32, username) 29 | API.SetVarcStr(33, password) 30 | hasRan = true 31 | } 32 | } 33 | 34 | override fun OnLogin() { 35 | username = String(Player.usernameInput.chars) 36 | password = String(Player.password.chars) 37 | API.StoreData("login-user", username) 38 | API.StoreData("login-pass", password) 39 | } 40 | 41 | override fun OnLogout() { 42 | hasRan = false 43 | } 44 | } -------------------------------------------------------------------------------- /plugin-playground/src/main/kotlin/TabReply/plugin.kt: -------------------------------------------------------------------------------- 1 | package TabReply 2 | 3 | import plugin.Plugin 4 | import plugin.annotations.PluginMeta 5 | import plugin.api.API 6 | import java.awt.event.KeyAdapter 7 | import java.awt.event.KeyEvent 8 | 9 | @PluginMeta ( 10 | author = "Ceikry", 11 | description = "Allows you to press tab to reply to DMs.", 12 | version = 1.0 13 | ) 14 | class plugin : Plugin() { 15 | override fun Init() { 16 | API.AddKeyboardListener(object : KeyAdapter() { 17 | override fun keyPressed(e: KeyEvent) { 18 | if (e.keyCode == KeyEvent.VK_TAB) 19 | API.DispatchCommand("::reply") 20 | } 21 | }) 22 | } 23 | } -------------------------------------------------------------------------------- /plugin-playground/src/main/kotlin/XPDropPlugin/XPSprites.kt: -------------------------------------------------------------------------------- 1 | package XPDropPlugin 2 | 3 | import plugin.api.API 4 | import rt4.Sprite 5 | 6 | object XPSprites { 7 | fun getSpriteForSkill(skillId: Int) : Sprite? { 8 | return API.GetSprite(getSpriteId(skillId)) 9 | } 10 | 11 | private fun getSpriteId(skillId: Int) : Int { 12 | return when (skillId) { 13 | 0 -> 197 14 | 1 -> 199 15 | 2 -> 198 16 | 3 -> 203 17 | 4 -> 200 18 | 5 -> 201 19 | 6 -> 202 20 | 7 -> 212 21 | 8 -> 214 22 | 9 -> 208 23 | 10 -> 211 24 | 11 -> 213 25 | 12 -> 207 26 | 13 -> 210 27 | 14 -> 209 28 | 15 -> 205 29 | 16 -> 204 30 | 17 -> 206 31 | 18 -> 216 32 | 19 -> 217 33 | 20 -> 215 34 | 21 -> 220 35 | 22 -> 221 36 | 23 -> 222 37 | else -> 222 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = "rt4-client" 2 | 3 | dependencyResolutionManagement { 4 | repositories { 5 | mavenCentral() 6 | flatDir { 7 | dirs 'lib' 8 | } 9 | } 10 | } 11 | 12 | include( 13 | "deob-annotations", 14 | "signlink", 15 | "client", 16 | "playground" 17 | ) 18 | 19 | startParameter.excludedTaskNames << ':playground:run' 20 | include 'plugin-playground' 21 | 22 | -------------------------------------------------------------------------------- /signlink/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'java-library' 4 | } 5 | 6 | version = '1.0.0' 7 | 8 | sourceCompatibility = 1.8 9 | targetCompatibility = 1.8 10 | 11 | dependencies { 12 | compileOnly project(':deob-annotations') 13 | compileOnly 'lib:jogl-all' 14 | } 15 | -------------------------------------------------------------------------------- /signlink/src/main/java/rt4/AudioSource.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | 7 | import java.awt.*; 8 | 9 | @OriginalClass("signlink!ai") 10 | public interface AudioSource { 11 | 12 | @OriginalMember(owner = "signlink!ai", name = "a", descriptor = "(II)V") 13 | void close(@OriginalArg(0) int channel); 14 | 15 | @OriginalMember(owner = "signlink!ai", name = "b", descriptor = "(BI)I") 16 | int getBufferSize(@OriginalArg(1) int channel); 17 | 18 | @OriginalMember(owner = "signlink!ai", name = "a", descriptor = "(III)V") 19 | void open(@OriginalArg(0) int channel, @OriginalArg(2) int bufferCapacity) throws Exception; 20 | 21 | @OriginalMember(owner = "signlink!ai", name = "a", descriptor = "(BI)V") 22 | void flush(@OriginalArg(1) int channel); 23 | 24 | @OriginalMember(owner = "signlink!ai", name = "a", descriptor = "(IBLjava/awt/Component;Z)V") 25 | void init(@OriginalArg(0) int sampleRate, @OriginalArg(2) Component component, @OriginalArg(3) boolean stereo) throws Exception; 26 | 27 | @OriginalMember(owner = "signlink!ai", name = "a", descriptor = "(I[I)V") 28 | void write(@OriginalArg(0) int channel, @OriginalArg(1) int[] samples); 29 | } 30 | -------------------------------------------------------------------------------- /signlink/src/main/java/rt4/CursorManager.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalArg; 4 | import org.openrs2.deob.annotation.OriginalClass; 5 | import org.openrs2.deob.annotation.OriginalMember; 6 | import org.openrs2.deob.annotation.Pc; 7 | 8 | import java.awt.*; 9 | import java.awt.image.BufferedImage; 10 | 11 | @OriginalClass("signlink!g") 12 | public final class CursorManager { 13 | 14 | @OriginalMember(owner = "signlink!g", name = "b", descriptor = "Ljava/awt/Component;") 15 | private Component component; 16 | 17 | @OriginalMember(owner = "signlink!g", name = "a", descriptor = "Ljava/awt/Robot;") 18 | private final Robot robot = new Robot(); 19 | 20 | @OriginalMember(owner = "signlink!g", name = "", descriptor = "()V") 21 | public CursorManager() throws Exception { 22 | } 23 | 24 | @OriginalMember(owner = "signlink!g", name = "a", descriptor = "(BLjava/awt/Point;ILjava/awt/Component;I[I)V") 25 | public final void setCursor(@OriginalArg(1) Point hotSpot, @OriginalArg(2) int width, @OriginalArg(3) Component component, @OriginalArg(4) int height, @OriginalArg(5) int[] pixels) { 26 | if (pixels == null) { 27 | component.setCursor(null); 28 | } else { 29 | @Pc(13) BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); 30 | image.setRGB(0, 0, width, height, pixels, 0, width); 31 | component.setCursor(component.getToolkit().createCustomCursor(image, hotSpot, null)); 32 | } 33 | } 34 | 35 | @OriginalMember(owner = "signlink!g", name = "a", descriptor = "(III)V") 36 | public final void setPosition(@OriginalArg(0) int x, @OriginalArg(2) int y) { 37 | this.robot.mouseMove(x, y); 38 | } 39 | 40 | @OriginalMember(owner = "signlink!g", name = "a", descriptor = "(Ljava/awt/Component;IZ)V") 41 | public final void setComponent(@OriginalArg(0) Component component, @OriginalArg(2) boolean reset) { 42 | if (reset) { 43 | component = null; 44 | } else if (component == null) { 45 | throw new NullPointerException(); 46 | } 47 | if (component == this.component) { 48 | return; 49 | } 50 | if (this.component != null) { 51 | this.component.setCursor(null); 52 | this.component = null; 53 | } 54 | if (component != null) { 55 | component.setCursor(component.getToolkit().createCustomCursor(new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB), new Point(0, 0), null)); 56 | this.component = component; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /signlink/src/main/java/rt4/MonotonicClock.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | import org.openrs2.deob.annotation.Pc; 6 | 7 | @OriginalClass("signlink!ad") 8 | public final class MonotonicClock { 9 | 10 | @OriginalMember(owner = "signlink!ad", name = "a", descriptor = "J") 11 | private static long leapMillis; 12 | 13 | @OriginalMember(owner = "signlink!ad", name = "b", descriptor = "J") 14 | private static long previous; 15 | 16 | @OriginalMember(owner = "signlink!ad", name = "a", descriptor = "(B)J") 17 | public static synchronized long currentTimeMillis() { 18 | @Pc(1) long now = System.currentTimeMillis(); 19 | if (previous > now) { 20 | leapMillis += previous - now; 21 | } 22 | previous = now; 23 | return leapMillis + now; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /signlink/src/main/java/rt4/PrivilegedRequest.java: -------------------------------------------------------------------------------- 1 | package rt4; 2 | 3 | import org.openrs2.deob.annotation.OriginalClass; 4 | import org.openrs2.deob.annotation.OriginalMember; 5 | 6 | @OriginalClass("signlink!im") 7 | public final class PrivilegedRequest { 8 | 9 | @OriginalMember(owner = "signlink!im", name = "e", descriptor = "Ljava/lang/Object;") 10 | public volatile Object result; 11 | 12 | @OriginalMember(owner = "signlink!im", name = "f", descriptor = "I") 13 | public int type; 14 | 15 | @OriginalMember(owner = "signlink!im", name = "b", descriptor = "Lsignlink!im;") 16 | public PrivilegedRequest next; 17 | 18 | @OriginalMember(owner = "signlink!im", name = "c", descriptor = "Ljava/lang/Object;") 19 | public Object objectArg; 20 | 21 | @OriginalMember(owner = "signlink!im", name = "a", descriptor = "I") 22 | public int intArg2; 23 | 24 | @OriginalMember(owner = "signlink!im", name = "g", descriptor = "I") 25 | public int intArg1; 26 | 27 | @OriginalMember(owner = "signlink!im", name = "d", descriptor = "I") 28 | public volatile int status = 0; 29 | } 30 | --------------------------------------------------------------------------------