Skip to content

Commit

Permalink
feat: Authentic as default, ::chat selector
Browse files Browse the repository at this point in the history
  • Loading branch information
Pazaz committed Nov 30, 2023
1 parent 2cb4fc9 commit c785b58
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 8 deletions.
19 changes: 17 additions & 2 deletions client/src/main/java/jagex2/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public final class Client extends GameShell {
private boolean showPerformance = false;
private boolean showOccluders = false;
private boolean showDebug = false;
private int chatEra = 2; // 0 - early beta, 1 - late beta, 2 - launch

@OriginalMember(owner = "client!client", name = "E", descriptor = "I")
public static int opHeld1Counter;
Expand Down Expand Up @@ -3060,6 +3061,8 @@ private void handleInputKey() {
Draw3D.fixTransparency = true;
Pix24.bilinearFiltering = true;
Draw2D.fullViewport = true;
} else if (this.chatTyped.equals("::chat")) {
this.chatEra = (this.chatEra + 1) % 3;
} else if (this.chatTyped.startsWith("::")) {
this.out.p1isaac(4);
this.out.p1(this.chatTyped.length() - 1);
Expand Down Expand Up @@ -9378,6 +9381,9 @@ private void drawChatback() {
this.drawParentInterface(0, 0, IfType.instances[this.chatInterfaceId], 0);
} else if (this.stickyChatInterfaceId == -1) {
@Pc(135) BitmapFont local135 = this.fontPlain12;
if (this.chatEra == 0) {
local135 = this.fontQuill8;
}
@Pc(137) int local137 = 0;
Draw2D.setBounds(77, 0, 463, 0);
for (@Pc(145) int local145 = 0; local145 < 100; local145++) {
Expand Down Expand Up @@ -9444,8 +9450,17 @@ private void drawChatback() {
this.chatScrollHeight = 78;
}
this.drawScrollbar(463, 0, this.chatScrollHeight - this.chatScrollOffset - 77, this.chatScrollHeight, 77);
local135.drawString(4, 90, 0, JString.formatName(this.username) + ":");
local135.drawString(local135.stringWidth(this.username + ": ") + 6, 90, 255, this.chatTyped + "*");
if (this.chatEra == 0) {
// 186-194?
local135.drawString(3, 90, 0x000000, this.chatTyped + "*");
} else if (this.chatEra == 1) {
// <204
local135.drawString(3, 90, 0x0000FF, this.chatTyped + "*");
} else if (this.chatEra == 2) {
// 204+
local135.drawString(4, 90, 0, JString.formatName(this.username) + ":");
local135.drawString(local135.stringWidth(this.username + ": ") + 6, 90, 0x0000FF, this.chatTyped + "*");
}
Draw2D.drawHorizontalLine(0, 77, 479, 0);
} else {
this.drawParentInterface(0, 0, IfType.instances[this.stickyChatInterfaceId], 0);
Expand Down
2 changes: 1 addition & 1 deletion runetek3-web/src/main/java/jagex2/graphics/Pix24.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@OriginalClass("client!hb")
public final class Pix24 extends Draw2D {

public static boolean bilinearFiltering = true;
public static boolean bilinearFiltering = false;

@OriginalMember(owner = "client!hb", name = "A", descriptor = "[I")
public int[] pixels;
Expand Down
2 changes: 1 addition & 1 deletion runetek3/src/main/java/jagex2/graphics/Draw2D.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@OriginalClass("client!fb")
public class Draw2D extends Hashable {

public static boolean fullViewport = true;
public static boolean fullViewport = false;

@OriginalMember(owner = "client!fb", name = "k", descriptor = "[I")
public static int[] data;
Expand Down
2 changes: 1 addition & 1 deletion runetek3/src/main/java/jagex2/graphics/Draw3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@OriginalClass("client!gb")
public final class Draw3D extends Draw2D {

public static boolean fixTransparency = true;
public static boolean fixTransparency = false;

@OriginalMember(owner = "client!gb", name = "A", descriptor = "Z")
public static boolean lowMemory = true;
Expand Down
2 changes: 1 addition & 1 deletion runetek3/src/main/java/jagex2/graphics/Pix24.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@OriginalClass("client!hb")
public final class Pix24 extends Draw2D {

public static boolean bilinearFiltering = true;
public static boolean bilinearFiltering = false;

@OriginalMember(owner = "client!hb", name = "A", descriptor = "[I")
public int[] pixels;
Expand Down
19 changes: 17 additions & 2 deletions webclient/src/main/java/jagex2/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public final class Client extends GameShell {
private boolean showPerformance = false;
private boolean showOccluders = false;
private boolean showDebug = false;
private int chatEra = 2; // 0 - early beta, 1 - late beta, 2 - launch

/**
* Are we ticking or are we tocking?
Expand Down Expand Up @@ -3078,6 +3079,8 @@ private void handleInputKey() {
Draw3D.fixTransparency = true;
Pix24.bilinearFiltering = true;
Draw2D.fullViewport = true;
} else if (this.chatTyped.equals("::chat")) {
this.chatEra = (this.chatEra + 1) % 3;
} else if (this.chatTyped.startsWith("::")) {
this.out.p1isaac(ClientProt.CLIENT_CHEAT);
this.out.p1(this.chatTyped.length() - 1);
Expand Down Expand Up @@ -9328,6 +9331,9 @@ private void drawChatback() {
this.drawParentInterface(0, 0, IfType.instances[this.chatInterfaceId], 0);
} else if (this.stickyChatInterfaceId == -1) {
@Pc(135) BitmapFont local135 = this.fontPlain12;
if (this.chatEra == 0) {
local135 = this.fontQuill8;
}
@Pc(137) int local137 = 0;
Draw2D.setBounds(77, 0, 463, 0);
for (@Pc(145) int local145 = 0; local145 < 100; local145++) {
Expand Down Expand Up @@ -9394,8 +9400,17 @@ private void drawChatback() {
this.chatScrollHeight = 78;
}
this.drawScrollbar(463, 0, this.chatScrollHeight - this.chatScrollOffset - 77, this.chatScrollHeight, 77);
local135.drawString(4, 90, 0, JString.formatName(this.username) + ":");
local135.drawString(local135.stringWidth(this.username + ": ") + 6, 90, 255, this.chatTyped + "*");
if (this.chatEra == 0) {
// 186-194?
local135.drawString(3, 90, 0x000000, this.chatTyped + "*");
} else if (this.chatEra == 1) {
// <204
local135.drawString(3, 90, 0x0000FF, this.chatTyped + "*");
} else if (this.chatEra == 2) {
// 204+
local135.drawString(4, 90, 0, JString.formatName(this.username) + ":");
local135.drawString(local135.stringWidth(this.username + ": ") + 6, 90, 0x0000FF, this.chatTyped + "*");
}
Draw2D.drawHorizontalLine(0, 77, 479, 0);
} else {
this.drawParentInterface(0, 0, IfType.instances[this.stickyChatInterfaceId], 0);
Expand Down

0 comments on commit c785b58

Please sign in to comment.