Rename Class85 to VarbitType

This commit is contained in:
Pazaz 2022-04-23 15:27:22 -04:00
parent 7f4e090ebf
commit e11ef7d372
9 changed files with 56 additions and 57 deletions

View file

@ -88,7 +88,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
local5.glRotatef(-((float) Static254.anInt5559 * 360.0F) / 2048.0F, 1.0F, 0.0F, 0.0F);
local5.glRotatef(-180.0F, 1.0F, 0.0F, 0.0F);
local5.glMatrixMode(GL2.GL_MODELVIEW);
if (!Static151.aBoolean176) {
if (!Static151.allows3DTextureMapping) {
local5.glBindTexture(GL2.GL_TEXTURE_2D, Static151.anIntArray341[(int) ((float) (GlRenderer.anInt5323 * 64) * 0.005F) % 64]);
}
local5.glActiveTexture(GL2.GL_TEXTURE0);
@ -101,7 +101,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
local5.glProgramLocalParameter4fvARB(GL2.GL_VERTEX_PROGRAM_ARB, local87, this.aFloatBuffer1);
local85 += 4;
}
if (Static151.aBoolean176) {
if (Static151.allows3DTextureMapping) {
local5.glProgramLocalParameter4fARB(GL2.GL_VERTEX_PROGRAM_ARB, 65, (float) GlRenderer.anInt5323 * 0.005F, 0.0F, 0.0F, 1.0F);
} else {
local5.glProgramLocalParameter4fARB(GL2.GL_VERTEX_PROGRAM_ARB, 65, 0.0F, 0.0F, 0.0F, 1.0F);
@ -115,7 +115,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
this.anInt4831 = local1.glGenLists(2);
local1.glNewList(this.anInt4831, GL2.GL_COMPILE);
local1.glActiveTexture(GL2.GL_TEXTURE1);
if (Static151.aBoolean176) {
if (Static151.allows3DTextureMapping) {
local1.glBindTexture(GL2.GL_TEXTURE_3D, Static151.anInt3587);
}
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_ADD);
@ -133,7 +133,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_MODULATE);
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_ALPHA, GL2.GL_MODULATE);
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_ALPHA, GL2.GL_TEXTURE);
local1.glDisable(Static151.aBoolean176 ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
local1.glDisable(Static151.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
local1.glActiveTexture(GL2.GL_TEXTURE0);
local1.glBindProgramARB(GL2.GL_VERTEX_PROGRAM_ARB, 0);
local1.glDisable(GL2.GL_VERTEX_PROGRAM_ARB);
@ -165,9 +165,9 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
@Pc(5) GL2 local5 = GlRenderer.gl;
local5.glActiveTexture(GL2.GL_TEXTURE1);
if ((arg0 & 0x80) == 0) {
local5.glEnable(Static151.aBoolean176 ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
local5.glEnable(Static151.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
} else {
local5.glDisable(Static151.aBoolean176 ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
local5.glDisable(Static151.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
}
local5.glActiveTexture(GL2.GL_TEXTURE0);
if ((arg0 & 0x40) == 0) {

View file

@ -44,13 +44,13 @@ public final class Static125 {
}
@OriginalMember(owner = "client!jl", name = "a", descriptor = "(IB)Lclient!kk;")
public static Class85 method2449(@OriginalArg(0) int arg0) {
@Pc(10) Class85 local10 = (Class85) aClass99_19.method3106((long) arg0);
public static VarbitType method2449(@OriginalArg(0) int arg0) {
@Pc(10) VarbitType local10 = (VarbitType) aClass99_19.method3106((long) arg0);
if (local10 != null) {
return local10;
}
@Pc(31) byte[] local31 = Static172.aClass153_69.getFile(Static254.method4349(arg0), Static274.method3845(arg0));
local10 = new Class85();
local10 = new VarbitType();
if (local31 != null) {
local10.method2651(new Buffer(local31));
}

View file

@ -12,10 +12,10 @@ public final class Static151 {
private static ByteBuffer aByteBuffer7;
@OriginalMember(owner = "client!lm", name = "e", descriptor = "Z")
public static boolean aBoolean176;
public static boolean allows3DTextureMapping;
@OriginalMember(owner = "client!lm", name = "a", descriptor = "[I")
public static int[] anIntArray340 = null;
public static int[] waterfallTextures = null;
@OriginalMember(owner = "client!lm", name = "b", descriptor = "[I")
public static int[] anIntArray341 = null;
@ -24,7 +24,7 @@ public final class Static151 {
public static int anInt3587 = -1;
@OriginalMember(owner = "client!lm", name = "g", descriptor = "I")
public static int anInt3588 = -1;
public static int waterfallTextureId = -1;
@OriginalMember(owner = "client!lm", name = "a", descriptor = "()V")
public static void method2807() {
@ -37,9 +37,7 @@ public final class Static151 {
aByteBuffer7.put(local11);
aByteBuffer7.flip();
}
if (aByteBuffer6 != null) {
return;
}
if (aByteBuffer6 == null) {
@Pc(32) Class106_Sub2_Sub1 local32 = new Class106_Sub2_Sub1();
local11 = local32.method3854();
aByteBuffer6 = ByteBuffer.allocateDirect(local11.length);
@ -47,6 +45,7 @@ public final class Static151 {
aByteBuffer6.put(local11);
aByteBuffer6.flip();
}
}
@OriginalMember(owner = "client!lm", name = "b", descriptor = "()V")
public static void method2808() {
@ -65,24 +64,24 @@ public final class Static151 {
anIntArray341 = null;
Static63.onCardTexture -= aByteBuffer7.limit() * 2;
}
if (anInt3588 != -1) {
if (waterfallTextureId != -1) {
local4 = GlRenderer.gl;
local11 = new int[] { anInt3588 };
local11 = new int[] {waterfallTextureId};
local4.glDeleteTextures(1, local11, 0);
anInt3588 = -1;
waterfallTextureId = -1;
Static63.onCardTexture -= aByteBuffer6.limit() * 2;
}
if (anIntArray340 != null) {
if (waterfallTextures != null) {
local4 = GlRenderer.gl;
local4.glDeleteTextures(64, anIntArray340, 0);
anIntArray340 = null;
local4.glDeleteTextures(64, waterfallTextures, 0);
waterfallTextures = null;
Static63.onCardTexture -= aByteBuffer6.limit() * 2;
}
}
@OriginalMember(owner = "client!lm", name = "c", descriptor = "()V")
public static void method2809() {
aBoolean176 = GlRenderer.extTexture3dSupported;
allows3DTextureMapping = GlRenderer.extTexture3dSupported;
method2807();
method2811();
method2812();
@ -91,7 +90,7 @@ public final class Static151 {
@OriginalMember(owner = "client!lm", name = "e", descriptor = "()V")
private static void method2811() {
@Pc(1) GL2 local1 = GlRenderer.gl;
if (aBoolean176) {
if (allows3DTextureMapping) {
@Pc(6) int[] local6 = new int[1];
local1.glGenTextures(1, local6, 0);
local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]);
@ -101,8 +100,7 @@ public final class Static151 {
local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
anInt3587 = local6[0];
Static63.onCardTexture += aByteBuffer7.limit() * 2;
return;
}
} else {
anIntArray341 = new int[64];
local1.glGenTextures(64, anIntArray341, 0);
for (@Pc(65) int local65 = 0; local65 < 64; local65++) {
@ -114,11 +112,12 @@ public final class Static151 {
}
Static63.onCardTexture += aByteBuffer7.limit() * 2;
}
}
@OriginalMember(owner = "client!lm", name = "f", descriptor = "()V")
private static void method2812() {
@Pc(1) GL2 local1 = GlRenderer.gl;
if (aBoolean176) {
if (allows3DTextureMapping) {
@Pc(6) int[] local6 = new int[1];
local1.glGenTextures(1, local6, 0);
local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]);
@ -126,14 +125,14 @@ public final class Static151 {
local1.glTexImage3D(GL2.GL_TEXTURE_3D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, aByteBuffer6);
local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
local1.glTexParameteri(GL2.GL_TEXTURE_3D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
anInt3588 = local6[0];
waterfallTextureId = local6[0];
Static63.onCardTexture += aByteBuffer6.limit() * 2;
return;
}
anIntArray340 = new int[64];
local1.glGenTextures(64, anIntArray340, 0);
waterfallTextures = new int[64];
local1.glGenTextures(64, waterfallTextures, 0);
for (@Pc(65) int local65 = 0; local65 < 64; local65++) {
GlRenderer.setTextureId(anIntArray340[local65]);
GlRenderer.setTextureId(waterfallTextures[local65]);
aByteBuffer6.position(local65 * 64 * 64 * 2);
local1.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, aByteBuffer6);
local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);

View file

@ -65,7 +65,7 @@ public final class Static155 {
@OriginalMember(owner = "client!me", name = "a", descriptor = "(II)I")
public static int getVarbit(@OriginalArg(1) int arg0) {
@Pc(13) Class85 local13 = Static125.method2449(arg0);
@Pc(13) VarbitType local13 = Static125.method2449(arg0);
@Pc(16) int local16 = local13.anInt3327;
@Pc(19) int local19 = local13.anInt3323;
@Pc(22) int local22 = local13.anInt3318;

View file

@ -97,7 +97,7 @@ public final class Static202 {
@OriginalMember(owner = "client!qg", name = "a", descriptor = "(IZI)V")
public static void setVarbitClient(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) {
@Pc(7) Class85 local7 = Static125.method2449(arg0);
@Pc(7) VarbitType local7 = Static125.method2449(arg0);
@Pc(10) int local10 = local7.anInt3323;
@Pc(16) int local16 = local7.anInt3318;
@Pc(19) int local19 = local7.anInt3327;

View file

@ -21,7 +21,7 @@ public final class Static272 {
@OriginalMember(owner = "client!wd", name = "a", descriptor = "(BII)V")
public static void method3995(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) {
@Pc(14) Class85 local14 = Static125.method2449(arg1);
@Pc(14) VarbitType local14 = Static125.method2449(arg1);
@Pc(17) int local17 = local14.anInt3327;
@Pc(20) int local20 = local14.anInt3323;
@Pc(23) int local23 = local14.anInt3318;

View file

@ -4,7 +4,7 @@ import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;
@OriginalClass("client!kk")
public final class Class85 {
public final class VarbitType {
@OriginalMember(owner = "client!kk", name = "c", descriptor = "I")
public int anInt3318;

View file

@ -55,7 +55,7 @@ public final class WaterMaterialRenderer implements MaterialRenderer {
local1.glTexGenfv(GL2.GL_T, GL2.GL_OBJECT_PLANE, new float[] { 0.0F, 0.0F, 9.765625E-4F, 0.0F }, 0);
local1.glEnable(GL2.GL_TEXTURE_GEN_S);
local1.glEnable(GL2.GL_TEXTURE_GEN_T);
if (Static151.aBoolean176) {
if (Static151.allows3DTextureMapping) {
local1.glBindTexture(GL2.GL_TEXTURE_3D, Static151.anInt3587);
local1.glTexGeni(GL2.GL_R, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR);
local1.glTexGeni(GL2.GL_Q, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR);
@ -95,7 +95,7 @@ public final class WaterMaterialRenderer implements MaterialRenderer {
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2GL3.GL_SRC1_ALPHA, GL2.GL_PREVIOUS);
local1.glDisable(GL2.GL_TEXTURE_GEN_S);
local1.glDisable(GL2.GL_TEXTURE_GEN_T);
if (Static151.aBoolean176) {
if (Static151.allows3DTextureMapping) {
local1.glDisable(GL2.GL_TEXTURE_GEN_R);
local1.glDisable(GL2.GL_TEXTURE_GEN_Q);
local1.glDisable(GL2.GL_TEXTURE_3D);
@ -117,7 +117,7 @@ public final class WaterMaterialRenderer implements MaterialRenderer {
local1.glTexEnvfv(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_COLOR, Static257.aFloatArray2, 0);
local1.glActiveTexture(GL2.GL_TEXTURE0);
if ((arg0 & 0x1) == 1) {
if (!Static151.aBoolean176) {
if (!Static151.allows3DTextureMapping) {
GlRenderer.setTextureId(Static151.anIntArray341[GlRenderer.anInt5323 * 64 / 100 % 64]);
} else if (this.anInt4442 != GlRenderer.anInt5323) {
this.aFloatArray23[0] = 0.0F;
@ -127,7 +127,7 @@ public final class WaterMaterialRenderer implements MaterialRenderer {
local1.glTexGenfv(GL2.GL_R, GL2.GL_OBJECT_PLANE, this.aFloatArray23, 0);
this.anInt4442 = GlRenderer.anInt5323;
}
} else if (Static151.aBoolean176) {
} else if (Static151.allows3DTextureMapping) {
this.aFloatArray23[0] = 0.0F;
this.aFloatArray23[1] = 0.0F;
this.aFloatArray23[2] = 0.0F;

View file

@ -58,7 +58,7 @@ public final class WaterfallMaterialRenderer implements MaterialRenderer {
this.aFloatArray21[1] = local36;
local7.glTexGenfv(GL2.GL_T, GL2.GL_EYE_PLANE, this.aFloatArray21, 0);
local7.glPopMatrix();
if (Static151.aBoolean176) {
if (Static151.allows3DTextureMapping) {
this.aFloatArray21[3] = (float) GlRenderer.anInt5323 * local18;
this.aFloatArray21[1] = 0.0F;
this.aFloatArray21[0] = 0.0F;
@ -66,7 +66,7 @@ public final class WaterfallMaterialRenderer implements MaterialRenderer {
local7.glTexGenfv(GL2.GL_R, GL2.GL_OBJECT_PLANE, this.aFloatArray21, 0);
} else {
@Pc(189) int local189 = (int) ((float) GlRenderer.anInt5323 * local18 * 64.0F);
local7.glBindTexture(GL2.GL_TEXTURE_2D, Static151.anIntArray340[local189 % 64]);
local7.glBindTexture(GL2.GL_TEXTURE_2D, Static151.waterfallTextures[local189 % 64]);
}
local7.glActiveTexture(GL2.GL_TEXTURE0);
}
@ -91,8 +91,8 @@ public final class WaterfallMaterialRenderer implements MaterialRenderer {
this.anInt4236 = local3.glGenLists(2);
local3.glNewList(this.anInt4236, GL2.GL_COMPILE);
local3.glActiveTexture(GL2.GL_TEXTURE1);
if (Static151.aBoolean176) {
local3.glBindTexture(GL2.GL_TEXTURE_3D, Static151.anInt3588);
if (Static151.allows3DTextureMapping) {
local3.glBindTexture(GL2.GL_TEXTURE_3D, Static151.waterfallTextureId);
local3.glTexGeni(GL2.GL_R, GL2.GL_TEXTURE_GEN_MODE, GL2.GL_OBJECT_LINEAR);
local3.glEnable(GL2.GL_TEXTURE_GEN_R);
local3.glEnable(GL2.GL_TEXTURE_3D);
@ -107,7 +107,7 @@ public final class WaterfallMaterialRenderer implements MaterialRenderer {
local3.glEndList();
local3.glNewList(this.anInt4236 + 1, GL2.GL_COMPILE);
local3.glActiveTexture(GL2.GL_TEXTURE1);
if (Static151.aBoolean176) {
if (Static151.allows3DTextureMapping) {
local3.glDisable(GL2.GL_TEXTURE_3D);
local3.glDisable(GL2.GL_TEXTURE_GEN_R);
} else {