mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-13 10:00:19 -07:00
Renamed Static239 to GlRenderer, started refactoring
This commit is contained in:
parent
ddbfcb0e86
commit
8119ba8336
125 changed files with 962 additions and 962 deletions
|
|
@ -24,9 +24,9 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
|
||||
@OriginalMember(owner = "client!rd", name = "<init>", descriptor = "()V")
|
||||
public LiquidMaterialRenderer() {
|
||||
if (this.anInt4831 < 0 && (Static239.aBoolean274 && Static239.anInt5322 >= 2)) {
|
||||
if (this.anInt4831 < 0 && (GlRenderer.arbVertexProgramSupported && GlRenderer.maxTextureUnits >= 2)) {
|
||||
@Pc(19) int[] local19 = new int[1];
|
||||
@Pc(21) GL2 local21 = Static239.gl;
|
||||
@Pc(21) GL2 local21 = GlRenderer.gl;
|
||||
local21.glGenProgramsARB(1, local19, 0);
|
||||
this.anInt4830 = local19[0];
|
||||
@Pc(42) int[][] local42 = Static33.method874(0.4F);
|
||||
|
|
@ -36,7 +36,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
@Pc(67) int[] local67 = local42[local60];
|
||||
@Pc(71) int[] local71 = local53[local60];
|
||||
for (@Pc(73) int local73 = 0; local73 < 64; local73++) {
|
||||
if (Static239.aBoolean263) {
|
||||
if (GlRenderer.bigEndian) {
|
||||
local58.pFloat((float) local67[local73] / 4096.0F);
|
||||
local58.pFloat((float) local71[local73] / 4096.0F);
|
||||
local58.pFloat(1.0F);
|
||||
|
|
@ -62,7 +62,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
@Override
|
||||
public final void method4602() {
|
||||
if (this.anInt4831 >= 0) {
|
||||
@Pc(5) GL2 local5 = Static239.gl;
|
||||
@Pc(5) GL2 local5 = GlRenderer.gl;
|
||||
local5.glCallList(this.anInt4831 + 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
if (this.anInt4831 < 0) {
|
||||
return;
|
||||
}
|
||||
@Pc(5) GL2 local5 = Static239.gl;
|
||||
@Pc(5) GL2 local5 = GlRenderer.gl;
|
||||
local5.glCallList(this.anInt4831);
|
||||
local5.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
local5.glMatrixMode(GL2.GL_TEXTURE);
|
||||
|
|
@ -89,29 +89,29 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
local5.glRotatef(-180.0F, 1.0F, 0.0F, 0.0F);
|
||||
local5.glMatrixMode(GL2.GL_MODELVIEW);
|
||||
if (!Static151.aBoolean176) {
|
||||
local5.glBindTexture(GL2.GL_TEXTURE_2D, Static151.anIntArray341[(int) ((float) (Static239.anInt5323 * 64) * 0.005F) % 64]);
|
||||
local5.glBindTexture(GL2.GL_TEXTURE_2D, Static151.anIntArray341[(int) ((float) (GlRenderer.anInt5323 * 64) * 0.005F) % 64]);
|
||||
}
|
||||
local5.glActiveTexture(GL2.GL_TEXTURE0);
|
||||
if (this.anInt4829 == Static239.anInt5323) {
|
||||
if (this.anInt4829 == GlRenderer.anInt5323) {
|
||||
return;
|
||||
}
|
||||
@Pc(85) int local85 = (Static239.anInt5323 & 0xFF) * 256;
|
||||
@Pc(85) int local85 = (GlRenderer.anInt5323 & 0xFF) * 256;
|
||||
for (@Pc(87) int local87 = 0; local87 < 64; local87++) {
|
||||
this.aFloatBuffer1.position(local85);
|
||||
local5.glProgramLocalParameter4fvARB(GL2.GL_VERTEX_PROGRAM_ARB, local87, this.aFloatBuffer1);
|
||||
local85 += 4;
|
||||
}
|
||||
if (Static151.aBoolean176) {
|
||||
local5.glProgramLocalParameter4fARB(GL2.GL_VERTEX_PROGRAM_ARB, 65, (float) Static239.anInt5323 * 0.005F, 0.0F, 0.0F, 1.0F);
|
||||
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);
|
||||
}
|
||||
this.anInt4829 = Static239.anInt5323;
|
||||
this.anInt4829 = GlRenderer.anInt5323;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!rd", name = "e", descriptor = "()V")
|
||||
private void method3719() {
|
||||
@Pc(1) GL2 local1 = Static239.gl;
|
||||
@Pc(1) GL2 local1 = GlRenderer.gl;
|
||||
this.anInt4831 = local1.glGenLists(2);
|
||||
local1.glNewList(this.anInt4831, GL2.GL_COMPILE);
|
||||
local1.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
|
|
@ -146,7 +146,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
if (this.anInt4831 < 0) {
|
||||
return;
|
||||
}
|
||||
@Pc(4) GL2 local4 = Static239.gl;
|
||||
@Pc(4) GL2 local4 = GlRenderer.gl;
|
||||
@Pc(7) int[] local7 = new int[1];
|
||||
local4.glBindProgramARB(GL2.GL_VERTEX_PROGRAM_ARB, this.anInt4830);
|
||||
local4.glProgramStringARB(GL2.GL_VERTEX_PROGRAM_ARB, GL2.GL_PROGRAM_FORMAT_ASCII_ARB, "!!ARBvp1.0\nATTRIB iPos = vertex.position;\nATTRIB iColour = vertex.color;\nOUTPUT oPos = result.position;\nOUTPUT oColour = result.color;\nOUTPUT oTexCoord0 = result.texcoord[0];\nOUTPUT oTexCoord1 = result.texcoord[1];\nOUTPUT oFogCoord = result.fogcoord;\nPARAM time = program.local[65];\nPARAM turbulence = program.local[64];\nPARAM lightAmbient = program.local[66]; \nPARAM pMatrix[4] = { state.matrix.projection };\nPARAM mvMatrix[4] = { state.matrix.modelview };\nPARAM ivMatrix[4] = { state.matrix.texture[1] };\nPARAM fNoise[64] = { program.local[0..63] };\nTEMP noise, clipPos, viewPos, worldPos;\nADDRESS noiseAddr;\nDP4 viewPos.x, mvMatrix[0], iPos;\nDP4 viewPos.y, mvMatrix[1], iPos;\nDP4 viewPos.z, mvMatrix[2], iPos;\nDP4 viewPos.w, mvMatrix[3], iPos;\nDP4 worldPos.x, ivMatrix[0], viewPos;\nDP4 worldPos.y, ivMatrix[1], viewPos;\nDP4 worldPos.z, ivMatrix[2], viewPos;\nDP4 worldPos.w, ivMatrix[3], viewPos;\nADD noise.x, worldPos.x, worldPos.z;SUB noise.y, worldPos.z, worldPos.x;MUL noise, noise, 0.0001220703125;\nFRC noise, noise;\nMUL noise, noise, 64;\nARL noiseAddr.x, noise.x;\nMOV noise.x, fNoise[noiseAddr.x].x;\nARL noiseAddr.x, noise.y;\nMOV noise.y, fNoise[noiseAddr.x].y;\nMUL noise, noise, turbulence.x;\nMAD oTexCoord0, worldPos.xzww, 0.0078125, noise;\nMOV oTexCoord0.w, 1;\nMUL oTexCoord1.xy, worldPos.xzww, 0.0009765625;\nMOV oTexCoord1.zw, time.xxxw;\nDP4 clipPos.x, pMatrix[0], viewPos;\nDP4 clipPos.y, pMatrix[1], viewPos;\nDP4 clipPos.z, pMatrix[2], viewPos;\nDP4 clipPos.w, pMatrix[3], viewPos;\nMUL oColour.xyz, iColour, lightAmbient;\nMOV oColour.w, 1;\nMOV oFogCoord.x, clipPos.z;\nMOV oPos, clipPos; \nEND".length(), "!!ARBvp1.0\nATTRIB iPos = vertex.position;\nATTRIB iColour = vertex.color;\nOUTPUT oPos = result.position;\nOUTPUT oColour = result.color;\nOUTPUT oTexCoord0 = result.texcoord[0];\nOUTPUT oTexCoord1 = result.texcoord[1];\nOUTPUT oFogCoord = result.fogcoord;\nPARAM time = program.local[65];\nPARAM turbulence = program.local[64];\nPARAM lightAmbient = program.local[66]; \nPARAM pMatrix[4] = { state.matrix.projection };\nPARAM mvMatrix[4] = { state.matrix.modelview };\nPARAM ivMatrix[4] = { state.matrix.texture[1] };\nPARAM fNoise[64] = { program.local[0..63] };\nTEMP noise, clipPos, viewPos, worldPos;\nADDRESS noiseAddr;\nDP4 viewPos.x, mvMatrix[0], iPos;\nDP4 viewPos.y, mvMatrix[1], iPos;\nDP4 viewPos.z, mvMatrix[2], iPos;\nDP4 viewPos.w, mvMatrix[3], iPos;\nDP4 worldPos.x, ivMatrix[0], viewPos;\nDP4 worldPos.y, ivMatrix[1], viewPos;\nDP4 worldPos.z, ivMatrix[2], viewPos;\nDP4 worldPos.w, ivMatrix[3], viewPos;\nADD noise.x, worldPos.x, worldPos.z;SUB noise.y, worldPos.z, worldPos.x;MUL noise, noise, 0.0001220703125;\nFRC noise, noise;\nMUL noise, noise, 64;\nARL noiseAddr.x, noise.x;\nMOV noise.x, fNoise[noiseAddr.x].x;\nARL noiseAddr.x, noise.y;\nMOV noise.y, fNoise[noiseAddr.x].y;\nMUL noise, noise, turbulence.x;\nMAD oTexCoord0, worldPos.xzww, 0.0078125, noise;\nMOV oTexCoord0.w, 1;\nMUL oTexCoord1.xy, worldPos.xzww, 0.0009765625;\nMOV oTexCoord1.zw, time.xxxw;\nDP4 clipPos.x, pMatrix[0], viewPos;\nDP4 clipPos.y, pMatrix[1], viewPos;\nDP4 clipPos.z, pMatrix[2], viewPos;\nDP4 clipPos.w, pMatrix[3], viewPos;\nMUL oColour.xyz, iColour, lightAmbient;\nMOV oColour.w, 1;\nMOV oFogCoord.x, clipPos.z;\nMOV oPos, clipPos; \nEND");
|
||||
|
|
@ -162,7 +162,7 @@ public final class LiquidMaterialRenderer implements MaterialRenderer {
|
|||
if (this.anInt4831 < 0) {
|
||||
return;
|
||||
}
|
||||
@Pc(5) GL2 local5 = Static239.gl;
|
||||
@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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue