Skip to content

Commit

Permalink
refactor: misc renamings
Browse files Browse the repository at this point in the history
some audio, seq, cs2, components, signlink, lighting, camera
  • Loading branch information
MatthewBishop committed Sep 13, 2024
1 parent 33c4fde commit fdb090e
Show file tree
Hide file tree
Showing 346 changed files with 4,829 additions and 4,832 deletions.
22 changes: 11 additions & 11 deletions client/src/main/java/AbstractWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
public abstract class AbstractWorld {

@OriginalMember(owner = "client!wha", name = "m", descriptor = "I")
public int anInt7561;
public int players;

@OriginalMember(owner = "client!wha", name = "i", descriptor = "I")
public int anInt7563;
public int flags;

@OriginalMember(owner = "client!wha", name = "c", descriptor = "I")
public int anInt7564;
public int country;

@OriginalMember(owner = "client!wha", name = "a", descriptor = "(Z)Z")
public final boolean method6706() {
return (this.anInt7563 & 0x2) != 0;
public final boolean isQuickChat() {
return (this.flags & 0x2) != 0;
}

@OriginalMember(owner = "client!wha", name = "c", descriptor = "(I)Z")
public final boolean method6708() {
return (this.anInt7563 & 0x4) != 0;
public final boolean isPvp() {
return (this.flags & 0x4) != 0;
}

@OriginalMember(owner = "client!wha", name = "b", descriptor = "(I)Z")
public final boolean method6709() {
return (this.anInt7563 & 0x1) != 0;
public final boolean isMembers() {
return (this.flags & 0x1) != 0;
}

@OriginalMember(owner = "client!wha", name = "b", descriptor = "(Z)Z")
public final boolean method6712() {
return (this.anInt7563 & 0x8) != 0;
public final boolean isLootShare() {
return (this.flags & 0x8) != 0;
}
}
58 changes: 29 additions & 29 deletions client/src/main/java/AudioChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
public class AudioChannel {

@OriginalMember(owner = "client!cd", name = "t", descriptor = "[I")
public int[] anIntArray315;
public int[] samples;

@OriginalMember(owner = "client!cd", name = "A", descriptor = "Lclient!dea;")
private PcmStream aClass2_Sub6_6;

@OriginalMember(owner = "client!cd", name = "B", descriptor = "I")
public int anInt4097;
public int bufferCapacity;

@OriginalMember(owner = "client!cd", name = "k", descriptor = "I")
public int anInt4098;
public int sampleRate2;

@OriginalMember(owner = "client!cd", name = "v", descriptor = "I")
private int anInt4103;
Expand Down Expand Up @@ -80,36 +80,36 @@ private void method3584() {

@OriginalMember(owner = "client!cd", name = "c", descriptor = "(I)V")
public final synchronized void close() {
if (Static232.aAudioThread1 != null) {
if (Static232.thread != null) {
@Pc(11) boolean allChannelsClosed = true;
for (@Pc(13) int i = 0; i < 2; i++) {
if (Static232.aAudioThread1.aAudioChannelArray1[i] == this) {
Static232.aAudioThread1.aAudioChannelArray1[i] = null;
if (Static232.thread.channels[i] == this) {
Static232.thread.channels[i] = null;
}
if (Static232.aAudioThread1.aAudioChannelArray1[i] != null) {
if (Static232.thread.channels[i] != null) {
allChannelsClosed = false;
}
}
if (allChannelsClosed) {
Static232.aAudioThread1.allChannelsClosed = true;
while (Static232.aAudioThread1.isRunning) {
Static232.thread.allChannelsClosed = true;
while (Static232.thread.isRunning) {
Static638.sleep(50L);
}
Static232.aAudioThread1 = null;
Static232.thread = null;
}
}
this.method3596();
this.anIntArray315 = null;
this.samples = null;
this.isClosed = true;
}

@OriginalMember(owner = "client!cd", name = "d", descriptor = "()I")
protected int method3587() throws Exception {
return this.anInt4097;
return this.bufferCapacity;
}

@OriginalMember(owner = "client!cd", name = "b", descriptor = "(I)V")
public void method3588(@OriginalArg(0) int arg0) throws Exception {
public void open(@OriginalArg(0) int arg0) throws Exception {
}

@OriginalMember(owner = "client!cd", name = "b", descriptor = "()V")
Expand Down Expand Up @@ -141,7 +141,7 @@ public final synchronized void method3592() {
}

@OriginalMember(owner = "client!cd", name = "a", descriptor = "(Ljava/awt/Component;)V")
public void method3593(@OriginalArg(0) Component arg0) throws Exception {
public void init(@OriginalArg(0) Component arg0) throws Exception {
}

@OriginalMember(owner = "client!cd", name = "b", descriptor = "(B)V")
Expand All @@ -156,48 +156,48 @@ public final synchronized void method3594() {
}
while (local11 > this.aLong128 + 5000L) {
this.method3584();
this.aLong128 += (long) (256000 / Static686.anInt8944);
this.aLong128 += (long) (256000 / Static686.sampleRate);
local11 = Static588.currentTimeWithDrift();
}
} catch (@Pc(54) Exception local54) {
this.aLong128 = local11;
}
if (this.anIntArray315 == null) {
if (this.samples == null) {
return;
}
try {
if (this.aLong129 != 0L) {
if (this.aLong129 > local11) {
return;
}
this.method3588(this.anInt4097);
this.open(this.bufferCapacity);
this.aLong129 = 0L;
this.aBoolean320 = true;
}
@Pc(95) int local95 = this.method3587();
if (this.anInt4100 - local95 > this.anInt4101) {
this.anInt4101 = this.anInt4100 - local95;
}
@Pc(118) int local118 = this.anInt4098 + this.anInt4103;
@Pc(118) int local118 = this.sampleRate2 + this.anInt4103;
if (local118 + 256 > 16384) {
local118 = 16128;
}
if (this.anInt4097 < local118 + 256) {
this.anInt4097 += 1024;
if (this.anInt4097 > 16384) {
this.anInt4097 = 16384;
if (this.bufferCapacity < local118 + 256) {
this.bufferCapacity += 1024;
if (this.bufferCapacity > 16384) {
this.bufferCapacity = 16384;
}
this.method3596();
this.method3588(this.anInt4097);
this.open(this.bufferCapacity);
local95 = 0;
if (this.anInt4097 < local118 + 256) {
local118 = this.anInt4097 - 256;
this.anInt4103 = local118 - this.anInt4098;
if (this.bufferCapacity < local118 + 256) {
local118 = this.bufferCapacity - 256;
this.anInt4103 = local118 - this.sampleRate2;
}
this.aBoolean320 = true;
}
while (local118 > local95) {
this.method3595(this.anIntArray315);
this.method3595(this.samples);
local95 += 256;
this.method3590();
}
Expand Down Expand Up @@ -225,13 +225,13 @@ public final synchronized void method3594() {
@OriginalMember(owner = "client!cd", name = "a", descriptor = "([II)V")
private void method3595(@OriginalArg(0) int[] arg0) {
@Pc(1) short local1 = 256;
if (Static316.aBoolean644) {
if (Static316.stereo) {
local1 = 512;
}
Static734.method7688(arg0, 0, local1);
this.anInt4099 -= 256;
if (this.aClass2_Sub6_6 != null && this.anInt4099 <= 0) {
this.anInt4099 += Static686.anInt8944 >> 4;
this.anInt4099 += Static686.sampleRate >> 4;
Static440.method5964(this.aClass2_Sub6_6);
this.method3591(this.aClass2_Sub6_6.method9136(), this.aClass2_Sub6_6);
@Pc(47) int local47 = 0;
Expand Down
8 changes: 4 additions & 4 deletions client/src/main/java/AudioThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
public final class AudioThread implements Runnable {

@OriginalMember(owner = "client!faa", name = "g", descriptor = "Lclient!vq;")
public Signlink aSignlink2;
public Signlink signLink;

@OriginalMember(owner = "client!faa", name = "f", descriptor = "[Lclient!cd;")
public final AudioChannel[] aAudioChannelArray1 = new AudioChannel[2];
public final AudioChannel[] channels = new AudioChannel[2];

@OriginalMember(owner = "client!faa", name = "h", descriptor = "Z")
public volatile boolean allChannelsClosed = false;
Expand All @@ -24,13 +24,13 @@ public void run() {
try {
while (!this.allChannelsClosed) {
for (@Pc(12) int local12 = 0; local12 < 2; local12++) {
@Pc(21) AudioChannel local21 = this.aAudioChannelArray1[local12];
@Pc(21) AudioChannel local21 = this.channels[local12];
if (local21 != null) {
local21.method3594();
}
}
Static638.sleep(10L);
Static61.method1312(this.aSignlink2, (Object) null);
Static61.method1312(this.signLink, (Object) null);
}
} catch (@Pc(49) Exception local49) {
Static240.method3496(local49, (String) null);
Expand Down
4 changes: 2 additions & 2 deletions client/src/main/java/Class15.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public Class15() {
}

@OriginalMember(owner = "client!ak", name = "a", descriptor = "(Ljava/awt/Frame;IIIII)V")
public void method248(@OriginalArg(0) Frame arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4) {
public void enter(@OriginalArg(0) Frame arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(5) int arg4) {
try {
arg0.setVisible(true);
Method getPeer = Frame.class.getDeclaredMethod("getPeer");
Expand All @@ -52,7 +52,7 @@ public void method249(@OriginalArg(0) Frame arg0) {
}

@OriginalMember(owner = "client!ak", name = "a", descriptor = "(I)[I")
public int[] method250() {
public int[] listmodes() {
this.aDirectDraw1.enumDisplayModes(0, (DDSurfaceDesc) null, (IUnknown) null, this);
Static17.anIntArray28 = new int[Static17.anInt240];
Static17.anInt240 = 0;
Expand Down
Loading

0 comments on commit fdb090e

Please sign in to comment.