mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-19 21:10:19 -07:00
Basic NPC rendering under playground project
This commit is contained in:
parent
8fb5b3fc75
commit
3a90dfc1b3
43 changed files with 555 additions and 315 deletions
|
|
@ -9,63 +9,63 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class Js5MasterIndex {
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "a", descriptor = "Lclient!wa;")
|
||||
private Buffer aClass3_Sub15_1;
|
||||
private Buffer buffer;
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "s", descriptor = "[Lclient!bg;")
|
||||
private Js5CachedResourceProvider[] aClass14_Sub1Array1;
|
||||
private Js5CachedResourceProvider[] resourceProviders;
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "j", descriptor = "Lclient!k;")
|
||||
private final Js5CacheQueue aClass80_1;
|
||||
private final Js5CacheQueue cacheQueue;
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "f", descriptor = "Lclient!jb;")
|
||||
private final Js5NetQueue aClass73_1;
|
||||
private final Js5NetQueue netQueue;
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "c", descriptor = "Lclient!pm;")
|
||||
private Js5NetRequest aClass3_Sub2_Sub5_Sub2_1;
|
||||
private Js5NetRequest request;
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "<init>", descriptor = "(Lclient!jb;Lclient!k;)V")
|
||||
public Js5MasterIndex(@OriginalArg(0) Js5NetQueue arg0, @OriginalArg(1) Js5CacheQueue arg1) {
|
||||
this.aClass80_1 = arg1;
|
||||
this.aClass73_1 = arg0;
|
||||
if (!this.aClass73_1.method2326()) {
|
||||
this.aClass3_Sub2_Sub5_Sub2_1 = this.aClass73_1.method2330(255, (byte) 0, 255, true);
|
||||
this.cacheQueue = arg1;
|
||||
this.netQueue = arg0;
|
||||
if (!this.netQueue.isUrgentRequestQueueFull()) {
|
||||
this.request = this.netQueue.read(255, (byte) 0, 255, true);
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "b", descriptor = "(I)Z")
|
||||
public final boolean isReady() {
|
||||
if (this.aClass3_Sub15_1 != null) {
|
||||
if (this.buffer != null) {
|
||||
return true;
|
||||
}
|
||||
if (this.aClass3_Sub2_Sub5_Sub2_1 == null) {
|
||||
if (this.aClass73_1.method2326()) {
|
||||
if (this.request == null) {
|
||||
if (this.netQueue.isUrgentRequestQueueFull()) {
|
||||
return false;
|
||||
}
|
||||
this.aClass3_Sub2_Sub5_Sub2_1 = this.aClass73_1.method2330(255, (byte) 0, 255, true);
|
||||
this.request = this.netQueue.read(255, (byte) 0, 255, true);
|
||||
}
|
||||
if (this.aClass3_Sub2_Sub5_Sub2_1.aBoolean226) {
|
||||
if (this.request.incomplete) {
|
||||
return false;
|
||||
} else {
|
||||
this.aClass3_Sub15_1 = new Buffer(this.aClass3_Sub2_Sub5_Sub2_1.method3554());
|
||||
this.aClass14_Sub1Array1 = new Js5CachedResourceProvider[(this.aClass3_Sub15_1.data.length - 5) / 8];
|
||||
this.buffer = new Buffer(this.request.getData());
|
||||
this.resourceProviders = new Js5CachedResourceProvider[(this.buffer.data.length - 5) / 8];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!al", name = "a", descriptor = "(B)V")
|
||||
public final void method179() {
|
||||
if (this.aClass14_Sub1Array1 == null) {
|
||||
if (this.resourceProviders == null) {
|
||||
return;
|
||||
}
|
||||
@Pc(13) int local13;
|
||||
for (local13 = 0; local13 < this.aClass14_Sub1Array1.length; local13++) {
|
||||
if (this.aClass14_Sub1Array1[local13] != null) {
|
||||
this.aClass14_Sub1Array1[local13].method537();
|
||||
for (local13 = 0; local13 < this.resourceProviders.length; local13++) {
|
||||
if (this.resourceProviders[local13] != null) {
|
||||
this.resourceProviders[local13].method537();
|
||||
}
|
||||
}
|
||||
for (local13 = 0; local13 < this.aClass14_Sub1Array1.length; local13++) {
|
||||
if (this.aClass14_Sub1Array1[local13] != null) {
|
||||
this.aClass14_Sub1Array1[local13].method534();
|
||||
for (local13 = 0; local13 < this.resourceProviders.length; local13++) {
|
||||
if (this.resourceProviders[local13] != null) {
|
||||
this.resourceProviders[local13].method534();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -77,20 +77,20 @@ public final class Js5MasterIndex {
|
|||
|
||||
@OriginalMember(owner = "client!al", name = "a", descriptor = "(Lclient!ge;IIZLclient!ge;)Lclient!bg;")
|
||||
private Js5CachedResourceProvider method188(@OriginalArg(0) Cache arg0, @OriginalArg(2) int arg1, @OriginalArg(4) Cache arg2) {
|
||||
if (this.aClass3_Sub15_1 == null) {
|
||||
if (this.buffer == null) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
this.aClass3_Sub15_1.offset = arg1 * 8 + 5;
|
||||
if (this.aClass3_Sub15_1.data.length <= this.aClass3_Sub15_1.offset) {
|
||||
this.buffer.offset = arg1 * 8 + 5;
|
||||
if (this.buffer.data.length <= this.buffer.offset) {
|
||||
throw new RuntimeException();
|
||||
} else if (this.aClass14_Sub1Array1[arg1] == null) {
|
||||
@Pc(56) int local56 = this.aClass3_Sub15_1.g4();
|
||||
@Pc(61) int local61 = this.aClass3_Sub15_1.g4();
|
||||
@Pc(75) Js5CachedResourceProvider local75 = new Js5CachedResourceProvider(arg1, arg0, arg2, this.aClass73_1, this.aClass80_1, local56, local61, true);
|
||||
this.aClass14_Sub1Array1[arg1] = local75;
|
||||
} else if (this.resourceProviders[arg1] == null) {
|
||||
@Pc(56) int local56 = this.buffer.g4();
|
||||
@Pc(61) int local61 = this.buffer.g4();
|
||||
@Pc(75) Js5CachedResourceProvider local75 = new Js5CachedResourceProvider(arg1, arg0, arg2, this.netQueue, this.cacheQueue, local56, local61, true);
|
||||
this.resourceProviders[arg1] = local75;
|
||||
return local75;
|
||||
} else {
|
||||
return this.aClass14_Sub1Array1[arg1];
|
||||
return this.resourceProviders[arg1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue