Skip to content

Commit

Permalink
chore: Sources for class names, minor renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Pazaz committed May 9, 2024
1 parent b96a42b commit dccd288
Show file tree
Hide file tree
Showing 38 changed files with 157 additions and 123 deletions.
165 changes: 83 additions & 82 deletions client/src/main/java/client.java

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions loader/src/main/java/loader.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import sign.signlink;

import java.applet.Applet;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.*;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.URL;
import java.security.MessageDigest;
import java.util.zip.ZipFile;

import sign.signlink;

public class loader extends Applet implements Runnable {
private static final int swid = 789;
private static final int shei = 532;
Expand Down
10 changes: 3 additions & 7 deletions mapview/src/main/java/WorldmapFont.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.PixelGrabber;

import jagex2.client.GameShell;
import jagex2.graphics.Draw2D;
import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

import java.awt.*;
import java.awt.image.PixelGrabber;

@OriginalClass("mapview!g")
public final class WorldmapFont extends Draw2D {

Expand Down
8 changes: 4 additions & 4 deletions mapview/src/main/java/mapview.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import java.io.*;
import java.net.URL;
import java.security.MessageDigest;

import jagex2.client.GameShell;
import jagex2.graphics.Draw2D;
import jagex2.graphics.Pix24;
Expand All @@ -14,6 +10,10 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

import java.io.*;
import java.net.URL;
import java.security.MessageDigest;

@OriginalClass("mapview!mapview")
public final class mapview extends GameShell {

Expand Down
2 changes: 1 addition & 1 deletion runetek3/src/main/java/jagex2/client/GameShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.net.InetAddress;

// name taken from rsc
@OriginalClass("client!a")
public class GameShell extends Applet implements Runnable, MouseListener, MouseMotionListener, KeyListener, FocusListener, WindowListener {

Expand Down
2 changes: 2 additions & 0 deletions runetek3/src/main/java/jagex2/client/InputTracking.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import jagex2.io.Packet;
import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

@OriginalClass("client!e")
public class InputTracking {

@OriginalMember(owner = "client!e", name = "e", descriptor = "Z")
Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/client/ViewBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import java.awt.*;

// name taken from rsc
@OriginalClass("client!b")
public class ViewBox extends Frame {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// Interface Component - doesn't quite belong under config...
// rs3 has this as config.iftype.Component
@OriginalClass("client!hc")
public class ComType {
public class Component {

public static final int TYPE_LAYER = 0;
public static final int TYPE_UNUSED = 1; // TODO: decodes g2, gbool, center, font, shadowed, colour
Expand All @@ -33,7 +33,7 @@ public class ComType {
public static final int BUTTON_CONTINUE = 6;

@OriginalMember(owner = "client!hc", name = "c", descriptor = "[Lclient!hc;")
public static ComType[] instances;
public static Component[] instances;

@OriginalMember(owner = "client!hc", name = "d", descriptor = "[I")
public int[] invSlotObjId;
Expand Down Expand Up @@ -280,7 +280,7 @@ public static void unpack(@OriginalArg(3) Jagfile jag, @OriginalArg(0) Jagfile m
@Pc(29) int layer = -1;

@Pc(32) int count = dat.g2();
instances = new ComType[count];
instances = new Component[count];

while (dat.pos < dat.data.length) {
@Pc(45) int id = dat.g2();
Expand All @@ -289,7 +289,7 @@ public static void unpack(@OriginalArg(3) Jagfile jag, @OriginalArg(0) Jagfile m
id = dat.g2();
}

@Pc(62) ComType com = instances[id] = new ComType();
@Pc(62) Component com = instances[id] = new Component();
com.id = id;
com.layer = layer;
com.type = dat.g1();
Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/config/FloType.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from rs3
@OriginalClass("client!fc")
public class FloType {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/config/IdkType.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from rs3
@OriginalClass("client!gc")
public class IdkType {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/config/LocType.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from rs3
@OriginalClass("client!ac")
public class LocType {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/config/NpcType.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from rs3
@OriginalClass("client!bc")
public class NpcType {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/config/ObjType.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from rs3
@OriginalClass("client!cc")
public class ObjType {

Expand Down
5 changes: 3 additions & 2 deletions runetek3/src/main/java/jagex2/config/SeqType.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package jagex2.config;

import jagex2.graphics.SeqFrame;
import jagex2.graphics.AnimFrame;
import jagex2.io.Jagfile;
import jagex2.io.Packet;
import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from rs3
@OriginalClass("client!jc")
public class SeqType {

Expand Down Expand Up @@ -92,7 +93,7 @@ public void decode(@OriginalArg(1) Packet dat) {

this.delay[i] = dat.g2();
if (this.delay[i] == 0) {
this.delay[i] = SeqFrame.instances[this.frames[i]].delay;
this.delay[i] = AnimFrame.instances[this.frames[i]].delay;
}

if (this.delay[i] == 0) {
Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/config/SpotAnimType.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name derived from other types + spotanim.dat (it's been renamed in NXT)
@OriginalClass("client!kc")
public class SpotAnimType {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/config/VarpType.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name derived from other types + varp.dat (rs3 has this as VarPlayerType)
@OriginalClass("client!lc")
public class VarpType {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/dash3d/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name and packaging confirmed 100% in rs2/mapview applet strings
@OriginalClass("client!c")
public class World {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/dash3d/World3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from rsc
@OriginalClass("client!r")
public class World3D {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/datastruct/HashTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from jaclib
@OriginalClass("client!t")
public class HashTable {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/datastruct/Hashable.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;

// name taken from jaclib
@OriginalClass("client!db")
public class Hashable extends Linkable {

Expand Down
4 changes: 4 additions & 0 deletions runetek3/src/main/java/jagex2/datastruct/JString.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package jagex2.datastruct;

import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name and packaging confirmed 100% in rs2/mapview applet strings
// later repackaged under jagex2/jstring
@OriginalClass("client!vb")
public class JString {

@OriginalMember(owner = "client!vb", name = "f", descriptor = "[C")
Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/datastruct/LinkList.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from jaclib
@OriginalClass("client!ob")
public class LinkList {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/datastruct/Linkable.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;

// name and packaging confirmed 100% in rs2/mapview applet strings
@OriginalClass("client!u")
public class Linkable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from runetek5
@OriginalClass("client!f")
public class SeqBase {
public class AnimBase {

@OriginalMember(owner = "client!f", name = "a", descriptor = "[Lclient!f;")
public static SeqBase[] instances;
public static AnimBase[] instances;

@OriginalMember(owner = "client!f", name = "b", descriptor = "I")
public int length;
Expand All @@ -30,7 +31,7 @@ public static void unpack(@OriginalArg(1) Jagfile models) {

@Pc(34) int total = head.g2();
@Pc(37) int count = head.g2();
instances = new SeqBase[count + 1];
instances = new AnimBase[count + 1];

for (@Pc(50) int i = 0; i < total; i++) {
@Pc(55) int id = head.g2();
Expand All @@ -50,7 +51,7 @@ public static void unpack(@OriginalArg(1) Jagfile models) {
}
}

instances[id] = new SeqBase();
instances[id] = new AnimBase();
instances[id].length = length;
instances[id].types = transformTypes;
instances[id].labels = groupLabels;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name taken from runetek5
@OriginalClass("client!g")
public class SeqFrame {
public class AnimFrame {

@OriginalMember(owner = "client!g", name = "a", descriptor = "[Lclient!g;")
public static SeqFrame[] instances;
public static AnimFrame[] instances;

@OriginalMember(owner = "client!g", name = "b", descriptor = "I")
public int delay;

@OriginalMember(owner = "client!g", name = "c", descriptor = "Lclient!f;")
public SeqBase base;
public AnimBase base;

@OriginalMember(owner = "client!g", name = "d", descriptor = "I")
public int length;
Expand All @@ -43,7 +44,7 @@ public static void unpack(@OriginalArg(1) Jagfile models) {

@Pc(50) int total = head.g2();
@Pc(53) int count = head.g2();
instances = new SeqFrame[count + 1];
instances = new AnimFrame[count + 1];

@Pc(61) int[] labels = new int[500];
@Pc(64) int[] x = new int[500];
Expand All @@ -52,11 +53,11 @@ public static void unpack(@OriginalArg(1) Jagfile models) {

for (@Pc(72) int i = 0; i < total; i++) {
@Pc(77) int id = head.g2();
@Pc(85) SeqFrame frame = instances[id] = new SeqFrame();
@Pc(85) AnimFrame frame = instances[id] = new AnimFrame();
frame.delay = del.g1();

@Pc(92) int baseId = head.g2();
@Pc(96) SeqBase base = SeqBase.instances[baseId];
@Pc(96) AnimBase base = AnimBase.instances[baseId];
frame.base = base;

@Pc(102) int groupCount = head.g1();
Expand Down
10 changes: 5 additions & 5 deletions runetek3/src/main/java/jagex2/graphics/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,8 @@ public void createLabelReferences() {
@OriginalMember(owner = "client!eb", name = "a", descriptor = "(II)V")
public void applyTransform(@OriginalArg(1) int id) {
if (this.labelVertices != null && id != -1) {
@Pc(11) SeqFrame transform = SeqFrame.instances[id];
@Pc(14) SeqBase skeleton = transform.base;
@Pc(11) AnimFrame transform = AnimFrame.instances[id];
@Pc(14) AnimBase skeleton = transform.base;
baseX = 0;
baseY = 0;
baseZ = 0;
Expand All @@ -1201,9 +1201,9 @@ public void applyTransforms(@OriginalArg(2) int primaryId, @OriginalArg(0) int s
if (mask == null || secondaryId == -1) {
this.applyTransform(primaryId);
} else {
@Pc(19) SeqFrame primary = SeqFrame.instances[primaryId];
@Pc(32) SeqFrame secondary = SeqFrame.instances[secondaryId];
@Pc(35) SeqBase skeleton = primary.base;
@Pc(19) AnimFrame primary = AnimFrame.instances[primaryId];
@Pc(32) AnimFrame secondary = AnimFrame.instances[secondaryId];
@Pc(35) AnimBase skeleton = primary.base;

baseX = 0;
baseY = 0;
Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/graphics/Pix24.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.awt.*;
import java.awt.image.PixelGrabber;

// name derived from Pix8
@OriginalClass("client!hb")
public class Pix24 extends Draw2D {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/graphics/Pix8.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;

// name and packaging confirmed 100% in rs2/mapview applet strings
@OriginalClass("client!ib")
public class Pix8 extends Draw2D {

Expand Down
1 change: 1 addition & 0 deletions runetek3/src/main/java/jagex2/graphics/PixMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.awt.*;
import java.awt.image.*;

// name taken from rsc
@OriginalClass("client!qb")
public class PixMap implements ImageProducer, ImageObserver {

Expand Down
Loading

0 comments on commit dccd288

Please sign in to comment.