mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-20 13:30:30 -07:00
Placeholder names for Class106
This commit is contained in:
parent
bd10ece252
commit
b6b74ceb36
12 changed files with 166 additions and 179 deletions
|
|
@ -92,8 +92,8 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
local5.glRotatef(-((float) MaterialManager.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.allows3DTextureMapping) {
|
||||
local5.glBindTexture(GL2.GL_TEXTURE_2D, Static151.anIntArray341[(int) ((float) (GlRenderer.anInt5323 * 64) * 0.005F) % 64]);
|
||||
if (!MaterialManager.allows3DTextureMapping) {
|
||||
local5.glBindTexture(GL2.GL_TEXTURE_2D, MaterialManager.anIntArray341[(int) ((float) (GlRenderer.anInt5323 * 64) * 0.005F) % 64]);
|
||||
}
|
||||
local5.glActiveTexture(GL2.GL_TEXTURE0);
|
||||
if (this.anInt4829 == GlRenderer.anInt5323) {
|
||||
|
|
@ -105,7 +105,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
local5.glProgramLocalParameter4fvARB(GL2.GL_VERTEX_PROGRAM_ARB, local87, this.aFloatBuffer1);
|
||||
local85 += 4;
|
||||
}
|
||||
if (Static151.allows3DTextureMapping) {
|
||||
if (MaterialManager.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);
|
||||
|
|
@ -119,8 +119,8 @@ 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.allows3DTextureMapping) {
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, Static151.anInt3587);
|
||||
if (MaterialManager.allows3DTextureMapping) {
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, MaterialManager.texture3D);
|
||||
}
|
||||
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_ADD);
|
||||
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_ALPHA, GL2.GL_REPLACE);
|
||||
|
|
@ -137,7 +137,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.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
|
||||
local1.glDisable(MaterialManager.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);
|
||||
|
|
@ -169,9 +169,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.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
|
||||
local5.glEnable(MaterialManager.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
|
||||
} else {
|
||||
local5.glDisable(Static151.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
|
||||
local5.glDisable(MaterialManager.allows3DTextureMapping ? GL2.GL_TEXTURE_3D : GL2.GL_TEXTURE_2D);
|
||||
}
|
||||
local5.glActiveTexture(GL2.GL_TEXTURE0);
|
||||
if ((arg0 & 0x40) == 0) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
package rt4;
|
||||
|
||||
import com.jogamp.opengl.GL2;
|
||||
import org.openrs2.deob.annotation.OriginalArg;
|
||||
import org.openrs2.deob.annotation.OriginalMember;
|
||||
import org.openrs2.deob.annotation.Pc;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class MaterialManager {
|
||||
public static final int WATER = 4;
|
||||
|
||||
|
|
@ -25,6 +28,20 @@ public class MaterialManager {
|
|||
public static int anInt406;
|
||||
@OriginalMember(owner = "client!qc", name = "cb", descriptor = "I")
|
||||
public static int anInt4675;
|
||||
@OriginalMember(owner = "client!lm", name = "e", descriptor = "Z")
|
||||
public static boolean allows3DTextureMapping;
|
||||
@OriginalMember(owner = "client!lm", name = "a", descriptor = "[I")
|
||||
public static int[] waterfallTextures = null;
|
||||
@OriginalMember(owner = "client!lm", name = "b", descriptor = "[I")
|
||||
public static int[] anIntArray341 = null;
|
||||
@OriginalMember(owner = "client!lm", name = "f", descriptor = "I")
|
||||
public static int texture3D = -1;
|
||||
@OriginalMember(owner = "client!lm", name = "g", descriptor = "I")
|
||||
public static int waterfallTextureId = -1;
|
||||
@OriginalMember(owner = "client!lm", name = "c", descriptor = "Ljava/nio/ByteBuffer;")
|
||||
private static ByteBuffer aByteBuffer6;
|
||||
@OriginalMember(owner = "client!lm", name = "d", descriptor = "Ljava/nio/ByteBuffer;")
|
||||
private static ByteBuffer textureBuffer;
|
||||
|
||||
@OriginalMember(owner = "client!cb", name = "b", descriptor = "(III)V")
|
||||
public static void setMaterial(@OriginalArg(1) int arg, @OriginalArg(2) int type) {
|
||||
|
|
@ -68,12 +85,12 @@ public class MaterialManager {
|
|||
@OriginalMember(owner = "client!nj", name = "a", descriptor = "(I)V")
|
||||
public static void quit() {
|
||||
renderers = null;
|
||||
Static151.method2808();
|
||||
method2808();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!te", name = "e", descriptor = "(I)V")
|
||||
public static void init() {
|
||||
Static151.method2809();
|
||||
method2809();
|
||||
renderers = new MaterialRenderer[7];
|
||||
renderers[1] = new SpecularMaterialRenderer();
|
||||
renderers[2] = new LiquidMaterialRenderer();
|
||||
|
|
@ -91,4 +108,119 @@ public class MaterialManager {
|
|||
anInt406 = arg3;
|
||||
anInt4675 = arg2;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "a", descriptor = "()V")
|
||||
public static void method2807() {
|
||||
@Pc(11) byte[] local11;
|
||||
if (textureBuffer == null) {
|
||||
@Pc(5) MaterialManager_Class106_Sub1_Sub1 local5 = new MaterialManager_Class106_Sub1_Sub1();
|
||||
local11 = local5.method3215();
|
||||
textureBuffer = ByteBuffer.allocateDirect(local11.length);
|
||||
textureBuffer.position(0);
|
||||
textureBuffer.put(local11);
|
||||
textureBuffer.flip();
|
||||
}
|
||||
if (aByteBuffer6 == null) {
|
||||
@Pc(32) MaterialManager_Class106_Sub2_Sub1 local32 = new MaterialManager_Class106_Sub2_Sub1();
|
||||
local11 = local32.method3854();
|
||||
aByteBuffer6 = ByteBuffer.allocateDirect(local11.length);
|
||||
aByteBuffer6.position(0);
|
||||
aByteBuffer6.put(local11);
|
||||
aByteBuffer6.flip();
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "b", descriptor = "()V")
|
||||
public static void method2808() {
|
||||
@Pc(4) GL2 local4;
|
||||
@Pc(11) int[] local11;
|
||||
if (texture3D != -1) {
|
||||
local4 = GlRenderer.gl;
|
||||
local11 = new int[] {texture3D};
|
||||
local4.glDeleteTextures(1, local11, 0);
|
||||
texture3D = -1;
|
||||
GlCleaner.onCardTexture -= textureBuffer.limit() * 2;
|
||||
}
|
||||
if (anIntArray341 != null) {
|
||||
local4 = GlRenderer.gl;
|
||||
local4.glDeleteTextures(64, anIntArray341, 0);
|
||||
anIntArray341 = null;
|
||||
GlCleaner.onCardTexture -= textureBuffer.limit() * 2;
|
||||
}
|
||||
if (waterfallTextureId != -1) {
|
||||
local4 = GlRenderer.gl;
|
||||
local11 = new int[] {waterfallTextureId};
|
||||
local4.glDeleteTextures(1, local11, 0);
|
||||
waterfallTextureId = -1;
|
||||
GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2;
|
||||
}
|
||||
if (waterfallTextures != null) {
|
||||
local4 = GlRenderer.gl;
|
||||
local4.glDeleteTextures(64, waterfallTextures, 0);
|
||||
waterfallTextures = null;
|
||||
GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "c", descriptor = "()V")
|
||||
public static void method2809() {
|
||||
allows3DTextureMapping = GlRenderer.extTexture3dSupported;
|
||||
method2807();
|
||||
method2811();
|
||||
method2812();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "e", descriptor = "()V")
|
||||
private static void method2811() {
|
||||
@Pc(1) GL2 local1 = GlRenderer.gl;
|
||||
if (allows3DTextureMapping) {
|
||||
@Pc(6) int[] local6 = new int[1];
|
||||
local1.glGenTextures(1, local6, 0);
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]);
|
||||
textureBuffer.position(0);
|
||||
local1.glTexImage3D(GL2.GL_TEXTURE_3D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, textureBuffer);
|
||||
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);
|
||||
texture3D = local6[0];
|
||||
GlCleaner.onCardTexture += textureBuffer.limit() * 2;
|
||||
} else {
|
||||
anIntArray341 = new int[64];
|
||||
local1.glGenTextures(64, anIntArray341, 0);
|
||||
for (@Pc(65) int local65 = 0; local65 < 64; local65++) {
|
||||
GlRenderer.setTextureId(anIntArray341[local65]);
|
||||
textureBuffer.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, textureBuffer);
|
||||
local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
|
||||
local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
|
||||
}
|
||||
GlCleaner.onCardTexture += textureBuffer.limit() * 2;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "f", descriptor = "()V")
|
||||
private static void method2812() {
|
||||
@Pc(1) GL2 local1 = GlRenderer.gl;
|
||||
if (allows3DTextureMapping) {
|
||||
@Pc(6) int[] local6 = new int[1];
|
||||
local1.glGenTextures(1, local6, 0);
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]);
|
||||
aByteBuffer6.position(0);
|
||||
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);
|
||||
waterfallTextureId = local6[0];
|
||||
GlCleaner.onCardTexture += aByteBuffer6.limit() * 2;
|
||||
return;
|
||||
}
|
||||
waterfallTextures = new int[64];
|
||||
local1.glGenTextures(64, waterfallTextures, 0);
|
||||
for (@Pc(65) int local65 = 0; local65 < 64; 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);
|
||||
local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
|
||||
}
|
||||
GlCleaner.onCardTexture += aByteBuffer6.limit() * 2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import org.openrs2.deob.annotation.OriginalMember;
|
|||
import org.openrs2.deob.annotation.Pc;
|
||||
|
||||
@OriginalClass("client!wf")
|
||||
public abstract class Class106 {
|
||||
public abstract class MaterialManager_Class106 {
|
||||
|
||||
@OriginalMember(owner = "client!wf", name = "c", descriptor = "[S")
|
||||
private short[] aShortArray70;
|
||||
|
|
@ -31,7 +31,7 @@ public abstract class Class106 {
|
|||
protected int anInt5008 = 4;
|
||||
|
||||
@OriginalMember(owner = "client!wf", name = "<init>", descriptor = "(IIIII)V")
|
||||
protected Class106(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
|
||||
protected MaterialManager_Class106(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
|
||||
this.anInt5002 = arg3;
|
||||
this.anInt5008 = arg1;
|
||||
this.anInt5000 = arg0;
|
||||
|
|
@ -5,7 +5,7 @@ import org.openrs2.deob.annotation.OriginalClass;
|
|||
import org.openrs2.deob.annotation.OriginalMember;
|
||||
|
||||
@OriginalClass("client!we")
|
||||
public class Class106_Sub1 extends Class106 {
|
||||
public class MaterialManager_Class106_Sub1 extends MaterialManager_Class106 {
|
||||
|
||||
@OriginalMember(owner = "client!we", name = "B", descriptor = "I")
|
||||
private int anInt4135;
|
||||
|
|
@ -35,7 +35,7 @@ public class Class106_Sub1 extends Class106 {
|
|||
private int anInt4129;
|
||||
|
||||
@OriginalMember(owner = "client!we", name = "<init>", descriptor = "(IIIIIFFF)V")
|
||||
protected Class106_Sub1(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) float arg5, @OriginalArg(6) float arg6, @OriginalArg(7) float arg7) {
|
||||
protected MaterialManager_Class106_Sub1(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) float arg5, @OriginalArg(6) float arg6, @OriginalArg(7) float arg7) {
|
||||
super(arg0, arg1, arg2, arg3, arg4);
|
||||
this.anInt4134 = (int) (arg7 * 4096.0F);
|
||||
this.anInt4139 = (int) (arg6 * 4096.0F);
|
||||
|
|
@ -6,13 +6,13 @@ import org.openrs2.deob.annotation.OriginalMember;
|
|||
import org.openrs2.deob.annotation.Pc;
|
||||
|
||||
@OriginalClass("client!ng")
|
||||
public final class Class106_Sub1_Sub1 extends Class106_Sub1 {
|
||||
public final class MaterialManager_Class106_Sub1_Sub1 extends MaterialManager_Class106_Sub1 {
|
||||
|
||||
@OriginalMember(owner = "client!ng", name = "O", descriptor = "[B")
|
||||
private byte[] aByteArray58;
|
||||
|
||||
@OriginalMember(owner = "client!ng", name = "<init>", descriptor = "()V")
|
||||
public Class106_Sub1_Sub1() {
|
||||
public MaterialManager_Class106_Sub1_Sub1() {
|
||||
super(8, 5, 8, 8, 2, 0.1F, 0.55F, 3.0F);
|
||||
}
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ import org.openrs2.deob.annotation.OriginalMember;
|
|||
import org.openrs2.deob.annotation.Pc;
|
||||
|
||||
@OriginalClass("client!vd")
|
||||
public class Class106_Sub2 extends Class106 {
|
||||
public class MaterialManager_Class106_Sub2 extends MaterialManager_Class106 {
|
||||
|
||||
@OriginalMember(owner = "client!vd", name = "x", descriptor = "I")
|
||||
private int anInt5010;
|
||||
|
|
@ -21,7 +21,7 @@ public class Class106_Sub2 extends Class106 {
|
|||
private final int[] anIntArray441 = new int[this.anInt5008];
|
||||
|
||||
@OriginalMember(owner = "client!vd", name = "<init>", descriptor = "(IIIIIF)V")
|
||||
protected Class106_Sub2(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) float arg5) {
|
||||
protected MaterialManager_Class106_Sub2(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) float arg5) {
|
||||
super(arg0, arg1, arg2, arg3, arg4);
|
||||
for (@Pc(15) int local15 = 0; local15 < this.anInt5008; local15++) {
|
||||
this.anIntArray441[local15] = (short) (Math.pow((double) arg5, (double) local15) * 4096.0D);
|
||||
|
|
@ -6,13 +6,13 @@ import org.openrs2.deob.annotation.OriginalMember;
|
|||
import org.openrs2.deob.annotation.Pc;
|
||||
|
||||
@OriginalClass("client!sb")
|
||||
public final class Class106_Sub2_Sub1 extends Class106_Sub2 {
|
||||
public final class MaterialManager_Class106_Sub2_Sub1 extends MaterialManager_Class106_Sub2 {
|
||||
|
||||
@OriginalMember(owner = "client!sb", name = "I", descriptor = "[B")
|
||||
private byte[] aByteArray68;
|
||||
|
||||
@OriginalMember(owner = "client!sb", name = "<init>", descriptor = "()V")
|
||||
public Class106_Sub2_Sub1() {
|
||||
public MaterialManager_Class106_Sub2_Sub1() {
|
||||
super(12, 5, 16, 2, 2, 0.45F);
|
||||
}
|
||||
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
package rt4;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import com.jogamp.opengl.*;
|
||||
import org.openrs2.deob.annotation.OriginalMember;
|
||||
import org.openrs2.deob.annotation.Pc;
|
||||
|
||||
public final class Static151 {
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "c", descriptor = "Ljava/nio/ByteBuffer;")
|
||||
private static ByteBuffer aByteBuffer6;
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "d", descriptor = "Ljava/nio/ByteBuffer;")
|
||||
private static ByteBuffer aByteBuffer7;
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "e", descriptor = "Z")
|
||||
public static boolean allows3DTextureMapping;
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "a", descriptor = "[I")
|
||||
public static int[] waterfallTextures = null;
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "b", descriptor = "[I")
|
||||
public static int[] anIntArray341 = null;
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "f", descriptor = "I")
|
||||
public static int anInt3587 = -1;
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "g", descriptor = "I")
|
||||
public static int waterfallTextureId = -1;
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "a", descriptor = "()V")
|
||||
public static void method2807() {
|
||||
@Pc(11) byte[] local11;
|
||||
if (aByteBuffer7 == null) {
|
||||
@Pc(5) Class106_Sub1_Sub1 local5 = new Class106_Sub1_Sub1();
|
||||
local11 = local5.method3215();
|
||||
aByteBuffer7 = ByteBuffer.allocateDirect(local11.length);
|
||||
aByteBuffer7.position(0);
|
||||
aByteBuffer7.put(local11);
|
||||
aByteBuffer7.flip();
|
||||
}
|
||||
if (aByteBuffer6 == null) {
|
||||
@Pc(32) Class106_Sub2_Sub1 local32 = new Class106_Sub2_Sub1();
|
||||
local11 = local32.method3854();
|
||||
aByteBuffer6 = ByteBuffer.allocateDirect(local11.length);
|
||||
aByteBuffer6.position(0);
|
||||
aByteBuffer6.put(local11);
|
||||
aByteBuffer6.flip();
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "b", descriptor = "()V")
|
||||
public static void method2808() {
|
||||
@Pc(4) GL2 local4;
|
||||
@Pc(11) int[] local11;
|
||||
if (anInt3587 != -1) {
|
||||
local4 = GlRenderer.gl;
|
||||
local11 = new int[] { anInt3587 };
|
||||
local4.glDeleteTextures(1, local11, 0);
|
||||
anInt3587 = -1;
|
||||
GlCleaner.onCardTexture -= aByteBuffer7.limit() * 2;
|
||||
}
|
||||
if (anIntArray341 != null) {
|
||||
local4 = GlRenderer.gl;
|
||||
local4.glDeleteTextures(64, anIntArray341, 0);
|
||||
anIntArray341 = null;
|
||||
GlCleaner.onCardTexture -= aByteBuffer7.limit() * 2;
|
||||
}
|
||||
if (waterfallTextureId != -1) {
|
||||
local4 = GlRenderer.gl;
|
||||
local11 = new int[] {waterfallTextureId};
|
||||
local4.glDeleteTextures(1, local11, 0);
|
||||
waterfallTextureId = -1;
|
||||
GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2;
|
||||
}
|
||||
if (waterfallTextures != null) {
|
||||
local4 = GlRenderer.gl;
|
||||
local4.glDeleteTextures(64, waterfallTextures, 0);
|
||||
waterfallTextures = null;
|
||||
GlCleaner.onCardTexture -= aByteBuffer6.limit() * 2;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "c", descriptor = "()V")
|
||||
public static void method2809() {
|
||||
allows3DTextureMapping = GlRenderer.extTexture3dSupported;
|
||||
method2807();
|
||||
method2811();
|
||||
method2812();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "e", descriptor = "()V")
|
||||
private static void method2811() {
|
||||
@Pc(1) GL2 local1 = GlRenderer.gl;
|
||||
if (allows3DTextureMapping) {
|
||||
@Pc(6) int[] local6 = new int[1];
|
||||
local1.glGenTextures(1, local6, 0);
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]);
|
||||
aByteBuffer7.position(0);
|
||||
local1.glTexImage3D(GL2.GL_TEXTURE_3D, 0, GL2.GL_LUMINANCE_ALPHA, 64, 64, 64, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, aByteBuffer7);
|
||||
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);
|
||||
anInt3587 = local6[0];
|
||||
GlCleaner.onCardTexture += aByteBuffer7.limit() * 2;
|
||||
} else {
|
||||
anIntArray341 = new int[64];
|
||||
local1.glGenTextures(64, anIntArray341, 0);
|
||||
for (@Pc(65) int local65 = 0; local65 < 64; local65++) {
|
||||
GlRenderer.setTextureId(anIntArray341[local65]);
|
||||
aByteBuffer7.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, aByteBuffer7);
|
||||
local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
|
||||
local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
|
||||
}
|
||||
GlCleaner.onCardTexture += aByteBuffer7.limit() * 2;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!lm", name = "f", descriptor = "()V")
|
||||
private static void method2812() {
|
||||
@Pc(1) GL2 local1 = GlRenderer.gl;
|
||||
if (allows3DTextureMapping) {
|
||||
@Pc(6) int[] local6 = new int[1];
|
||||
local1.glGenTextures(1, local6, 0);
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, local6[0]);
|
||||
aByteBuffer6.position(0);
|
||||
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);
|
||||
waterfallTextureId = local6[0];
|
||||
GlCleaner.onCardTexture += aByteBuffer6.limit() * 2;
|
||||
return;
|
||||
}
|
||||
waterfallTextures = new int[64];
|
||||
local1.glGenTextures(64, waterfallTextures, 0);
|
||||
for (@Pc(65) int local65 = 0; local65 < 64; 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);
|
||||
local1.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
|
||||
}
|
||||
GlCleaner.onCardTexture += aByteBuffer6.limit() * 2;
|
||||
}
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ public final class UnderwaterMaterialRenderer implements MaterialRenderer {
|
|||
local1.glNewList(this.anInt5806, GL2.GL_COMPILE);
|
||||
local1.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
if (aBoolean308) {
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, Static151.anInt3587);
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, MaterialManager.texture3D);
|
||||
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_ADD);
|
||||
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_OPERAND0_RGB, GL2.GL_SRC_COLOR);
|
||||
local1.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_ALPHA, GL2.GL_REPLACE);
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ 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.allows3DTextureMapping) {
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, Static151.anInt3587);
|
||||
if (MaterialManager.allows3DTextureMapping) {
|
||||
local1.glBindTexture(GL2.GL_TEXTURE_3D, MaterialManager.texture3D);
|
||||
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);
|
||||
local1.glTexGenfv(GL2.GL_Q, GL2.GL_OBJECT_PLANE, new float[] { 0.0F, 0.0F, 0.0F, 1.0F }, 0);
|
||||
|
|
@ -125,7 +125,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.allows3DTextureMapping) {
|
||||
if (MaterialManager.allows3DTextureMapping) {
|
||||
local1.glDisable(GL2.GL_TEXTURE_GEN_R);
|
||||
local1.glDisable(GL2.GL_TEXTURE_GEN_Q);
|
||||
local1.glDisable(GL2.GL_TEXTURE_3D);
|
||||
|
|
@ -147,8 +147,8 @@ public final class WaterMaterialRenderer implements MaterialRenderer {
|
|||
local1.glTexEnvfv(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_COLOR, aFloatArray2, 0);
|
||||
local1.glActiveTexture(GL2.GL_TEXTURE0);
|
||||
if ((arg0 & 0x1) == 1) {
|
||||
if (!Static151.allows3DTextureMapping) {
|
||||
GlRenderer.setTextureId(Static151.anIntArray341[GlRenderer.anInt5323 * 64 / 100 % 64]);
|
||||
if (!MaterialManager.allows3DTextureMapping) {
|
||||
GlRenderer.setTextureId(MaterialManager.anIntArray341[GlRenderer.anInt5323 * 64 / 100 % 64]);
|
||||
} else if (this.anInt4442 != GlRenderer.anInt5323) {
|
||||
this.aFloatArray23[0] = 0.0F;
|
||||
this.aFloatArray23[1] = 0.0F;
|
||||
|
|
@ -157,14 +157,14 @@ 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.allows3DTextureMapping) {
|
||||
} else if (MaterialManager.allows3DTextureMapping) {
|
||||
this.aFloatArray23[0] = 0.0F;
|
||||
this.aFloatArray23[1] = 0.0F;
|
||||
this.aFloatArray23[2] = 0.0F;
|
||||
this.aFloatArray23[3] = 0.0F;
|
||||
local1.glTexGenfv(GL2.GL_R, GL2.GL_OBJECT_PLANE, this.aFloatArray23, 0);
|
||||
} else {
|
||||
GlRenderer.setTextureId(Static151.anIntArray341[0]);
|
||||
GlRenderer.setTextureId(MaterialManager.anIntArray341[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,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.allows3DTextureMapping) {
|
||||
if (MaterialManager.allows3DTextureMapping) {
|
||||
this.aFloatArray21[3] = (float) GlRenderer.anInt5323 * local18;
|
||||
this.aFloatArray21[1] = 0.0F;
|
||||
this.aFloatArray21[0] = 0.0F;
|
||||
|
|
@ -68,7 +68,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.waterfallTextures[local189 % 64]);
|
||||
local7.glBindTexture(GL2.GL_TEXTURE_2D, MaterialManager.waterfallTextures[local189 % 64]);
|
||||
}
|
||||
local7.glActiveTexture(GL2.GL_TEXTURE0);
|
||||
}
|
||||
|
|
@ -93,8 +93,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.allows3DTextureMapping) {
|
||||
local3.glBindTexture(GL2.GL_TEXTURE_3D, Static151.waterfallTextureId);
|
||||
if (MaterialManager.allows3DTextureMapping) {
|
||||
local3.glBindTexture(GL2.GL_TEXTURE_3D, MaterialManager.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);
|
||||
|
|
@ -109,7 +109,7 @@ public final class WaterfallMaterialRenderer implements MaterialRenderer {
|
|||
local3.glEndList();
|
||||
local3.glNewList(this.anInt4236 + 1, GL2.GL_COMPILE);
|
||||
local3.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
if (Static151.allows3DTextureMapping) {
|
||||
if (MaterialManager.allows3DTextureMapping) {
|
||||
local3.glDisable(GL2.GL_TEXTURE_3D);
|
||||
local3.glDisable(GL2.GL_TEXTURE_GEN_R);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1536,7 +1536,7 @@ public final class client extends GameShell {
|
|||
mainLoadState = 150;
|
||||
clean = true;
|
||||
} else if (mainLoadState == 150) {
|
||||
Static151.method2807();
|
||||
MaterialManager.method2807();
|
||||
if (Preferences.safeMode) {
|
||||
Preferences.windowMode = 0;
|
||||
Preferences.antiAliasingMode = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue