mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-09 16:45:46 -07:00
Canvas scaling in OpenGL, refactor GameShell and some graphics classes
This commit is contained in:
parent
3c58eb3a01
commit
bded93da5f
26 changed files with 336 additions and 291 deletions
|
|
@ -118,7 +118,7 @@ public final class Class3_Sub14 extends Node {
|
|||
this.anIntArray227 = new int[this.anInt2484];
|
||||
this.anIntArray231 = new int[this.anInt2484];
|
||||
this.anIntArrayArray17 = new int[this.anInt2484][];
|
||||
this.aClass133_8 = new HashTable(Static165.method3164(this.anInt2482));
|
||||
this.aClass133_8 = new HashTable(Static165.clp2(this.anInt2482));
|
||||
if (this.aBoolean140) {
|
||||
this.anIntArrayArray18 = new int[this.anInt2484][];
|
||||
this.aBooleanArray54 = new boolean[this.anInt2484];
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ public final class Class45 {
|
|||
this.aByteArray25 = new byte[this.anInt2019];
|
||||
this.aByteArray23 = new byte[this.anInt2019];
|
||||
this.aByteArray24 = new byte[this.anInt2019];
|
||||
this.aClass133_4 = new HashTable(Static165.method3164(this.anInt2019));
|
||||
this.aClass133_4 = new HashTable(Static165.clp2(this.anInt2019));
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!fj", name = "c", descriptor = "()V")
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public final class EnumType extends SecondaryNode {
|
|||
this.anInt3960 = arg1.g4();
|
||||
} else if (arg0 == 5 || arg0 == 6) {
|
||||
@Pc(41) int local41 = arg1.g2();
|
||||
this.aClass133_16 = new HashTable(Static165.method3164(local41));
|
||||
this.aClass133_16 = new HashTable(Static165.clp2(local41));
|
||||
for (@Pc(51) int local51 = 0; local51 < local41; local51++) {
|
||||
@Pc(58) int local58 = arg1.g4();
|
||||
@Pc(70) Node local70;
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ public abstract class Font extends SecondaryNode {
|
|||
private int[] anIntArray347;
|
||||
|
||||
@OriginalMember(owner = "client!rk", name = "I", descriptor = "[I")
|
||||
protected int[] anIntArray343;
|
||||
protected int[] spriteInnerWidths;
|
||||
|
||||
@OriginalMember(owner = "client!rk", name = "U", descriptor = "[I")
|
||||
protected int[] anIntArray345;
|
||||
protected int[] spriteInnerHeights;
|
||||
|
||||
@OriginalMember(owner = "client!rk", name = "V", descriptor = "I")
|
||||
private int anInt3625;
|
||||
|
|
@ -44,17 +44,17 @@ public abstract class Font extends SecondaryNode {
|
|||
protected Font(@OriginalArg(0) byte[] arg0, @OriginalArg(1) int[] arg1, @OriginalArg(2) int[] arg2, @OriginalArg(3) int[] arg3, @OriginalArg(4) int[] arg4) {
|
||||
this.anIntArray344 = arg1;
|
||||
this.anIntArray347 = arg2;
|
||||
this.anIntArray343 = arg3;
|
||||
this.anIntArray345 = arg4;
|
||||
this.spriteInnerWidths = arg3;
|
||||
this.spriteInnerHeights = arg4;
|
||||
this.method2876(arg0);
|
||||
@Pc(21) int local21 = Integer.MAX_VALUE;
|
||||
@Pc(23) int local23 = Integer.MIN_VALUE;
|
||||
for (@Pc(25) int local25 = 0; local25 < 256; local25++) {
|
||||
if (this.anIntArray347[local25] < local21 && this.anIntArray345[local25] != 0) {
|
||||
if (this.anIntArray347[local25] < local21 && this.spriteInnerHeights[local25] != 0) {
|
||||
local21 = this.anIntArray347[local25];
|
||||
}
|
||||
if (this.anIntArray347[local25] + this.anIntArray345[local25] > local23) {
|
||||
local23 = this.anIntArray347[local25] + this.anIntArray345[local25];
|
||||
if (this.anIntArray347[local25] + this.spriteInnerHeights[local25] > local23) {
|
||||
local23 = this.anIntArray347[local25] + this.spriteInnerHeights[local25];
|
||||
}
|
||||
}
|
||||
this.anInt3625 = this.anInt3626 - local21;
|
||||
|
|
@ -128,8 +128,8 @@ public abstract class Font extends SecondaryNode {
|
|||
if (this.aByteArray50 != null && local8 != 0) {
|
||||
arg1 += this.aByteArray50[(local8 << 8) + local22];
|
||||
}
|
||||
@Pc(197) int local197 = this.anIntArray343[local22];
|
||||
local120 = this.anIntArray345[local22];
|
||||
@Pc(197) int local197 = this.spriteInnerWidths[local22];
|
||||
local120 = this.spriteInnerHeights[local22];
|
||||
if (local22 == 32) {
|
||||
if (Static218.anInt3636 > 0) {
|
||||
Static218.anInt3629 += Static218.anInt3636;
|
||||
|
|
@ -138,14 +138,14 @@ public abstract class Font extends SecondaryNode {
|
|||
}
|
||||
} else if (Static218.anInt3631 == 256) {
|
||||
if (Static218.anInt3634 != -1) {
|
||||
this.method2854(local22, arg1 + this.anIntArray344[local22] + 1, local4 + this.anIntArray347[local22] + 1, local197, local120, Static218.anInt3634);
|
||||
this.renderGlyph(local22, arg1 + this.anIntArray344[local22] + 1, local4 + this.anIntArray347[local22] + 1, local197, local120, Static218.anInt3634);
|
||||
}
|
||||
this.method2854(local22, arg1 + this.anIntArray344[local22], local4 + this.anIntArray347[local22], local197, local120, Static218.anInt3635);
|
||||
this.renderGlyph(local22, arg1 + this.anIntArray344[local22], local4 + this.anIntArray347[local22], local197, local120, Static218.anInt3635);
|
||||
} else {
|
||||
if (Static218.anInt3634 != -1) {
|
||||
this.method2855(local22, arg1 + this.anIntArray344[local22] + 1, local4 + this.anIntArray347[local22] + 1, local197, local120, Static218.anInt3634, Static218.anInt3631);
|
||||
this.renderGlyphTransparent(local22, arg1 + this.anIntArray344[local22] + 1, local4 + this.anIntArray347[local22] + 1, local197, local120, Static218.anInt3634, Static218.anInt3631);
|
||||
}
|
||||
this.method2855(local22, arg1 + this.anIntArray344[local22], local4 + this.anIntArray347[local22], local197, local120, Static218.anInt3635, Static218.anInt3631);
|
||||
this.renderGlyphTransparent(local22, arg1 + this.anIntArray344[local22], local4 + this.anIntArray347[local22], local197, local120, Static218.anInt3635, Static218.anInt3631);
|
||||
}
|
||||
@Pc(323) int local323 = this.anIntArray348[local22];
|
||||
if (Static218.anInt3627 != -1) {
|
||||
|
|
@ -170,10 +170,10 @@ public abstract class Font extends SecondaryNode {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!rk", name = "a", descriptor = "(IIIIIIZ)V")
|
||||
protected abstract void method2854(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5);
|
||||
protected abstract void renderGlyph(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5);
|
||||
|
||||
@OriginalMember(owner = "client!rk", name = "a", descriptor = "(IIIIIIIZ)V")
|
||||
protected abstract void method2855(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6);
|
||||
protected abstract void renderGlyphTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6);
|
||||
|
||||
@OriginalMember(owner = "client!rk", name = "b", descriptor = "(Lclient!na;I)I")
|
||||
public final int method2856(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1) {
|
||||
|
|
@ -809,8 +809,8 @@ public abstract class Font extends SecondaryNode {
|
|||
if (this.aByteArray50 != null && local8 != 0) {
|
||||
arg1 += this.aByteArray50[(local8 << 8) + local24];
|
||||
}
|
||||
@Pc(226) int local226 = this.anIntArray343[local24];
|
||||
local121 = this.anIntArray345[local24];
|
||||
@Pc(226) int local226 = this.spriteInnerWidths[local24];
|
||||
local121 = this.spriteInnerHeights[local24];
|
||||
if (arg3 == null) {
|
||||
local130 = 0;
|
||||
} else {
|
||||
|
|
@ -830,14 +830,14 @@ public abstract class Font extends SecondaryNode {
|
|||
}
|
||||
} else if (Static218.anInt3631 == 256) {
|
||||
if (Static218.anInt3634 != -1) {
|
||||
this.method2854(local24, arg1 + this.anIntArray344[local24] + local130 + 1, local4 + this.anIntArray347[local24] + 1 + local141, local226, local121, Static218.anInt3634);
|
||||
this.renderGlyph(local24, arg1 + this.anIntArray344[local24] + local130 + 1, local4 + this.anIntArray347[local24] + 1 + local141, local226, local121, Static218.anInt3634);
|
||||
}
|
||||
this.method2854(local24, arg1 + this.anIntArray344[local24] + local130, local4 + this.anIntArray347[local24] + local141, local226, local121, Static218.anInt3635);
|
||||
this.renderGlyph(local24, arg1 + this.anIntArray344[local24] + local130, local4 + this.anIntArray347[local24] + local141, local226, local121, Static218.anInt3635);
|
||||
} else {
|
||||
if (Static218.anInt3634 != -1) {
|
||||
this.method2855(local24, arg1 + this.anIntArray344[local24] + local130 + 1, local4 + this.anIntArray347[local24] + 1 + local141, local226, local121, Static218.anInt3634, Static218.anInt3631);
|
||||
this.renderGlyphTransparent(local24, arg1 + this.anIntArray344[local24] + local130 + 1, local4 + this.anIntArray347[local24] + 1 + local141, local226, local121, Static218.anInt3634, Static218.anInt3631);
|
||||
}
|
||||
this.method2855(local24, arg1 + this.anIntArray344[local24] + local130, local4 + this.anIntArray347[local24] + local141, local226, local121, Static218.anInt3635, Static218.anInt3631);
|
||||
this.renderGlyphTransparent(local24, arg1 + this.anIntArray344[local24] + local130, local4 + this.anIntArray347[local24] + local141, local226, local121, Static218.anInt3635, Static218.anInt3631);
|
||||
}
|
||||
@Pc(387) int local387 = this.anIntArray348[local24];
|
||||
if (Static218.anInt3627 != -1) {
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
@OriginalMember(owner = "client!rc", name = "b", descriptor = "Z")
|
||||
private boolean error = false;
|
||||
|
||||
public static double canvasScale = 1.0d;
|
||||
|
||||
@OriginalMember(owner = "client!rc", name = "providesignlink", descriptor = "(Lsignlink!ll;)V")
|
||||
public static void providesignlink(@OriginalArg(0) SignLink signLink) {
|
||||
GameShell.signLink = signLink;
|
||||
|
|
@ -223,6 +225,15 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
container.add(canvas);
|
||||
canvas.setSize(canvasWidth, canvasHeight);
|
||||
canvas.setVisible(true);
|
||||
Graphics g = canvas.getGraphics();
|
||||
if (g != null) {
|
||||
if (g instanceof Graphics2D) {
|
||||
canvasScale = ((Graphics2D) g).getTransform().getScaleX();
|
||||
} else {
|
||||
canvasScale = 1.0d;
|
||||
}
|
||||
System.out.println("Scaling factor: " + canvasScale);
|
||||
}
|
||||
if (container == frame) {
|
||||
@Pc(66) Insets insets = frame.getInsets();
|
||||
canvas.setLocation(leftMargin + insets.left, insets.top + topMargin);
|
||||
|
|
@ -376,6 +387,14 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
partialRedraws -= 50;
|
||||
canvas.setSize(canvasWidth, canvasHeight);
|
||||
canvas.setVisible(true);
|
||||
Graphics g = canvas.getGraphics();
|
||||
if (g != null) {
|
||||
if (g instanceof Graphics2D) {
|
||||
canvasScale = ((Graphics2D) g).getTransform().getScaleX();
|
||||
} else {
|
||||
canvasScale = 1.0;
|
||||
}
|
||||
}
|
||||
if (frame != null && fullScreenFrame == null) {
|
||||
@Pc(84) Insets insets = frame.getInsets();
|
||||
canvas.setLocation(insets.left + leftMargin, topMargin + insets.top);
|
||||
|
|
@ -502,6 +521,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
frame.setResizable(true);
|
||||
frame.addWindowListener(this);
|
||||
frame.setVisible(true);
|
||||
frame.setBackground(Color.black);
|
||||
frame.toFront();
|
||||
@Pc(44) Insets insets = frame.getInsets();
|
||||
frame.setSize(insets.left + frameWidth + insets.right, insets.top + frameHeight + insets.bottom);
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@ public final class GlAlphaSprite extends GlSprite {
|
|||
@OriginalMember(owner = "client!el", name = "a", descriptor = "([I)V")
|
||||
@Override
|
||||
protected final void method1430(@OriginalArg(0) int[] arg0) {
|
||||
this.anInt1870 = Static165.method3164(this.anInt1867);
|
||||
this.anInt1874 = Static165.method3164(this.anInt1859);
|
||||
@Pc(20) byte[] local20 = new byte[this.anInt1870 * this.anInt1874 * 4];
|
||||
this.powerOfTwoWidth = Static165.clp2(this.anInt1867);
|
||||
this.powerOfTwoHeight = Static165.clp2(this.anInt1859);
|
||||
@Pc(20) byte[] local20 = new byte[this.powerOfTwoWidth * this.powerOfTwoHeight * 4];
|
||||
@Pc(22) int local22 = 0;
|
||||
@Pc(24) int local24 = 0;
|
||||
@Pc(32) int local32 = (this.anInt1870 - this.anInt1867) * 4;
|
||||
@Pc(32) int local32 = (this.powerOfTwoWidth - this.anInt1867) * 4;
|
||||
for (@Pc(34) int local34 = 0; local34 < this.anInt1859; local34++) {
|
||||
for (@Pc(40) int local40 = 0; local40 < this.anInt1867; local40++) {
|
||||
@Pc(49) int local49 = arg0[local24++];
|
||||
|
|
@ -43,14 +43,14 @@ public final class GlAlphaSprite extends GlSprite {
|
|||
}
|
||||
@Pc(94) ByteBuffer local94 = ByteBuffer.wrap(local20);
|
||||
@Pc(96) GL2 local96 = GlRenderer.gl;
|
||||
if (this.anInt1872 == -1) {
|
||||
if (this.textureId == -1) {
|
||||
@Pc(103) int[] local103 = new int[1];
|
||||
local96.glGenTextures(1, local103, 0);
|
||||
this.anInt1872 = local103[0];
|
||||
this.textureId = local103[0];
|
||||
}
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
local96.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA, this.anInt1870, this.anInt1874, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, local94);
|
||||
Static63.anInt1944 += local94.limit() - this.anInt1869;
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
local96.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA, this.powerOfTwoWidth, this.powerOfTwoHeight, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, local94);
|
||||
Static63.onCard2d += local94.limit() - this.anInt1869;
|
||||
this.anInt1869 = local94.limit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,191 +9,190 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class GlFont extends Font {
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "Gb", descriptor = "[I")
|
||||
private int[] anIntArray349;
|
||||
private int[] listIds;
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "Hb", descriptor = "I")
|
||||
private int anInt3639;
|
||||
private int contextId;
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "Ib", descriptor = "I")
|
||||
private int anInt3640;
|
||||
private int powerOfTwoSize;
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "Fb", descriptor = "I")
|
||||
private int anInt3638 = -1;
|
||||
private int textureId = -1;
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "Eb", descriptor = "I")
|
||||
private int anInt3637 = 0;
|
||||
private int size = 0;
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "<init>", descriptor = "([B[I[I[I[I[[B)V")
|
||||
public GlFont(@OriginalArg(0) byte[] arg0, @OriginalArg(1) int[] arg1, @OriginalArg(2) int[] arg2, @OriginalArg(3) int[] arg3, @OriginalArg(4) int[] arg4, @OriginalArg(5) byte[][] arg5) {
|
||||
super(arg0, arg1, arg2, arg3, arg4);
|
||||
this.method2881(arg5);
|
||||
this.method2880();
|
||||
public GlFont(@OriginalArg(0) byte[] bytes, @OriginalArg(1) int[] xOffsets, @OriginalArg(2) int[] yOffsets, @OriginalArg(3) int[] innerWidths, @OriginalArg(4) int[] innerHeights, @OriginalArg(5) byte[][] pixels) {
|
||||
super(bytes, xOffsets, yOffsets, innerWidths, innerHeights);
|
||||
this.createTexture(pixels);
|
||||
this.createLists();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "finalize", descriptor = "()V")
|
||||
@Override
|
||||
public final void finalize() throws Throwable {
|
||||
if (this.anInt3638 != -1) {
|
||||
Static63.method1491(this.anInt3638, this.anInt3637, this.anInt3639);
|
||||
this.anInt3638 = -1;
|
||||
this.anInt3637 = 0;
|
||||
protected void finalize() throws Throwable {
|
||||
if (this.textureId != -1) {
|
||||
Static63.deleteTexture2d(this.textureId, this.size, this.contextId);
|
||||
this.textureId = -1;
|
||||
this.size = 0;
|
||||
}
|
||||
if (this.anIntArray349 != null) {
|
||||
for (@Pc(21) int local21 = 0; local21 < this.anIntArray349.length; local21++) {
|
||||
Static63.method1486(this.anIntArray349[local21], this.anInt3639);
|
||||
if (this.listIds != null) {
|
||||
for (@Pc(21) int i = 0; i < this.listIds.length; i++) {
|
||||
Static63.deleteList(this.listIds[i], this.contextId);
|
||||
}
|
||||
this.anIntArray349 = null;
|
||||
this.listIds = null;
|
||||
}
|
||||
super.finalize();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "a", descriptor = "(IIIIIIZ)V")
|
||||
@Override
|
||||
protected final void method2854(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) {
|
||||
@Pc(4) GL2 local4;
|
||||
if (Static46.aClass3_Sub2_Sub1_Sub2_1 == null) {
|
||||
protected final void renderGlyph(@OriginalArg(0) int glyph, @OriginalArg(1) int x, @OriginalArg(2) int y, @OriginalArg(3) int width, @OriginalArg(4) int height, @OriginalArg(5) int color) {
|
||||
@Pc(4) GL2 gl;
|
||||
if (Static46.mask == null) {
|
||||
GlRenderer.method4151();
|
||||
local4 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt3638);
|
||||
local4.glColor3ub((byte) (arg5 >> 16), (byte) (arg5 >> 8), (byte) arg5);
|
||||
local4.glTranslatef((float) arg1, (float) (GlRenderer.canvasHeight - arg2), 0.0F);
|
||||
local4.glCallList(this.anIntArray349[arg0]);
|
||||
local4.glLoadIdentity();
|
||||
gl = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
gl.glColor3ub((byte) (color >> 16), (byte) (color >> 8), (byte) color);
|
||||
gl.glTranslatef((float) x, (float) (GlRenderer.canvasHeight - y), 0.0F);
|
||||
gl.glCallList(this.listIds[glyph]);
|
||||
gl.glLoadIdentity();
|
||||
return;
|
||||
}
|
||||
GlRenderer.method4151();
|
||||
local4 = GlRenderer.gl;
|
||||
local4.glColor3ub((byte) (arg5 >> 16), (byte) (arg5 >> 8), (byte) arg5);
|
||||
local4.glTranslatef((float) arg1, (float) (GlRenderer.canvasHeight - arg2), 0.0F);
|
||||
@Pc(32) float local32 = (float) (arg0 % 16) / 16.0F;
|
||||
@Pc(39) float local39 = (float) (arg0 / 16) / 16.0F;
|
||||
@Pc(51) float local51 = local32 + (float) this.anIntArray343[arg0] / (float) this.anInt3640;
|
||||
@Pc(63) float local63 = local39 + (float) this.anIntArray345[arg0] / (float) this.anInt3640;
|
||||
GlRenderer.setTextureId(this.anInt3638);
|
||||
@Pc(68) GlSprite local68 = Static46.aClass3_Sub2_Sub1_Sub2_1;
|
||||
local4.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
local4.glEnable(GL2.GL_TEXTURE_2D);
|
||||
local4.glBindTexture(GL2.GL_TEXTURE_2D, local68.anInt1872);
|
||||
local4.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_REPLACE);
|
||||
local4.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS);
|
||||
@Pc(98) float local98 = (float) (arg1 - Static46.anInt1439) / (float) local68.anInt1870;
|
||||
@Pc(107) float local107 = (float) (arg2 - Static46.anInt1438) / (float) local68.anInt1874;
|
||||
@Pc(118) float local118 = (float) (arg1 + arg3 - Static46.anInt1439) / (float) local68.anInt1870;
|
||||
@Pc(129) float local129 = (float) (arg2 + arg4 - Static46.anInt1438) / (float) local68.anInt1874;
|
||||
local4.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
local4.glMultiTexCoord2f(GL2.GL_TEXTURE1, local118, local107);
|
||||
local4.glTexCoord2f(local51, local39);
|
||||
local4.glVertex2f((float) this.anIntArray343[arg0], 0.0F);
|
||||
local4.glMultiTexCoord2f(GL2.GL_TEXTURE1, local98, local107);
|
||||
local4.glTexCoord2f(local32, local39);
|
||||
local4.glVertex2f(0.0F, 0.0F);
|
||||
local4.glMultiTexCoord2f(GL2.GL_TEXTURE1, local98, local129);
|
||||
local4.glTexCoord2f(local32, local63);
|
||||
local4.glVertex2f(0.0F, (float) -this.anIntArray345[arg0]);
|
||||
local4.glMultiTexCoord2f(GL2.GL_TEXTURE1, local118, local129);
|
||||
local4.glTexCoord2f(local51, local63);
|
||||
local4.glVertex2f((float) this.anIntArray343[arg0], (float) -this.anIntArray345[arg0]);
|
||||
local4.glEnd();
|
||||
local4.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_MODULATE);
|
||||
local4.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_TEXTURE);
|
||||
local4.glDisable(GL2.GL_TEXTURE_2D);
|
||||
local4.glActiveTexture(GL2.GL_TEXTURE0);
|
||||
local4.glLoadIdentity();
|
||||
gl = GlRenderer.gl;
|
||||
gl.glColor3ub((byte) (color >> 16), (byte) (color >> 8), (byte) color);
|
||||
gl.glTranslatef((float) x, (float) (GlRenderer.canvasHeight - y), 0.0F);
|
||||
@Pc(32) float s0 = (float) (glyph % 16) / 16.0F;
|
||||
@Pc(39) float t0 = (float) (glyph / 16) / 16.0F;
|
||||
@Pc(51) float s1 = s0 + (float) this.spriteInnerWidths[glyph] / (float) this.powerOfTwoSize;
|
||||
@Pc(63) float t1 = t0 + (float) this.spriteInnerHeights[glyph] / (float) this.powerOfTwoSize;
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
@Pc(68) GlSprite mask = Static46.mask;
|
||||
gl.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
gl.glEnable(GL2.GL_TEXTURE_2D);
|
||||
gl.glBindTexture(GL2.GL_TEXTURE_2D, mask.textureId);
|
||||
gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_REPLACE);
|
||||
gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS);
|
||||
@Pc(98) float maskX0 = (float) (x - Static46.clipX) / (float) mask.powerOfTwoWidth;
|
||||
@Pc(107) float maskY0 = (float) (y - Static46.clipY) / (float) mask.powerOfTwoHeight;
|
||||
@Pc(118) float maskX1 = (float) (x + width - Static46.clipX) / (float) mask.powerOfTwoWidth;
|
||||
@Pc(129) float maskY1 = (float) (y + height - Static46.clipY) / (float) mask.powerOfTwoHeight;
|
||||
gl.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
gl.glMultiTexCoord2f(GL2.GL_TEXTURE1, maskX1, maskY0);
|
||||
gl.glTexCoord2f(s1, t0);
|
||||
gl.glVertex2f((float) this.spriteInnerWidths[glyph], 0.0F);
|
||||
gl.glMultiTexCoord2f(GL2.GL_TEXTURE1, maskX0, maskY0);
|
||||
gl.glTexCoord2f(s0, t0);
|
||||
gl.glVertex2f(0.0F, 0.0F);
|
||||
gl.glMultiTexCoord2f(GL2.GL_TEXTURE1, maskX0, maskY1);
|
||||
gl.glTexCoord2f(s0, t1);
|
||||
gl.glVertex2f(0.0F, (float) -this.spriteInnerHeights[glyph]);
|
||||
gl.glMultiTexCoord2f(GL2.GL_TEXTURE1, maskX1, maskY1);
|
||||
gl.glTexCoord2f(s1, t1);
|
||||
gl.glVertex2f((float) this.spriteInnerWidths[glyph], (float) -this.spriteInnerHeights[glyph]);
|
||||
gl.glEnd();
|
||||
gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_MODULATE);
|
||||
gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_TEXTURE);
|
||||
gl.glDisable(GL2.GL_TEXTURE_2D);
|
||||
gl.glActiveTexture(GL2.GL_TEXTURE0);
|
||||
gl.glLoadIdentity();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "a", descriptor = "(IIIIIIIZ)V")
|
||||
@Override
|
||||
protected final void method2855(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6) {
|
||||
GlRenderer.method4151();
|
||||
@Pc(2) GL2 local2 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt3638);
|
||||
local2.glColor4ub((byte) (arg5 >> 16), (byte) (arg5 >> 8), (byte) arg5, arg6 > 255 ? -1 : (byte) arg6);
|
||||
local2.glTranslatef((float) arg1, (float) (GlRenderer.canvasHeight - arg2), 0.0F);
|
||||
local2.glCallList(this.anIntArray349[arg0]);
|
||||
local2.glLoadIdentity();
|
||||
protected final void renderGlyphTransparent(@OriginalArg(0) int glyph, @OriginalArg(1) int x, @OriginalArg(2) int y, @OriginalArg(3) int width, @OriginalArg(4) int height, @OriginalArg(5) int color, @OriginalArg(6) int alpha) {
|
||||
GlRenderer.method4151();
|
||||
@Pc(2) GL2 gl = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
gl.glColor4ub((byte) (color >> 16), (byte) (color >> 8), (byte) color, alpha > 255 ? -1 : (byte) alpha);
|
||||
gl.glTranslatef((float) x, (float) (GlRenderer.canvasHeight - y), 0.0F);
|
||||
gl.glCallList(this.listIds[glyph]);
|
||||
gl.glLoadIdentity();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "b", descriptor = "()V")
|
||||
private void method2880() {
|
||||
if (this.anIntArray349 != null) {
|
||||
private void createLists() {
|
||||
if (this.listIds != null) {
|
||||
return;
|
||||
}
|
||||
this.anIntArray349 = new int[256];
|
||||
@Pc(9) GL2 local9 = GlRenderer.gl;
|
||||
for (@Pc(11) int local11 = 0; local11 < 256; local11++) {
|
||||
@Pc(21) float local21 = (float) (local11 % 16) / 16.0F;
|
||||
@Pc(28) float local28 = (float) (local11 / 16) / 16.0F;
|
||||
@Pc(40) float local40 = local21 + (float) this.anIntArray343[local11] / (float) this.anInt3640;
|
||||
@Pc(52) float local52 = local28 + (float) this.anIntArray345[local11] / (float) this.anInt3640;
|
||||
this.anIntArray349[local11] = local9.glGenLists(1);
|
||||
local9.glNewList(this.anIntArray349[local11], GL2.GL_COMPILE);
|
||||
local9.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
local9.glTexCoord2f(local40, local28);
|
||||
local9.glVertex2f((float) this.anIntArray343[local11], 0.0F);
|
||||
local9.glTexCoord2f(local21, local28);
|
||||
local9.glVertex2f(0.0F, 0.0F);
|
||||
local9.glTexCoord2f(local21, local52);
|
||||
local9.glVertex2f(0.0F, (float) -this.anIntArray345[local11]);
|
||||
local9.glTexCoord2f(local40, local52);
|
||||
local9.glVertex2f((float) this.anIntArray343[local11], (float) -this.anIntArray345[local11]);
|
||||
local9.glEnd();
|
||||
local9.glEndList();
|
||||
this.listIds = new int[256];
|
||||
@Pc(9) GL2 gl = GlRenderer.gl;
|
||||
for (@Pc(11) int i = 0; i < 256; i++) {
|
||||
@Pc(21) float s0 = (float) (i % 16) / 16.0F;
|
||||
@Pc(28) float t0 = (float) (i / 16) / 16.0F;
|
||||
@Pc(40) float s1 = s0 + (float) this.spriteInnerWidths[i] / (float) this.powerOfTwoSize;
|
||||
@Pc(52) float t1 = t0 + (float) this.spriteInnerHeights[i] / (float) this.powerOfTwoSize;
|
||||
this.listIds[i] = gl.glGenLists(1);
|
||||
gl.glNewList(this.listIds[i], GL2.GL_COMPILE);
|
||||
gl.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
gl.glTexCoord2f(s1, t0);
|
||||
gl.glVertex2f((float) this.spriteInnerWidths[i], 0.0F);
|
||||
gl.glTexCoord2f(s0, t0);
|
||||
gl.glVertex2f(0.0F, 0.0F);
|
||||
gl.glTexCoord2f(s0, t1);
|
||||
gl.glVertex2f(0.0F, (float) -this.spriteInnerHeights[i]);
|
||||
gl.glTexCoord2f(s1, t1);
|
||||
gl.glVertex2f((float) this.spriteInnerWidths[i], (float) -this.spriteInnerHeights[i]);
|
||||
gl.glEnd();
|
||||
gl.glEndList();
|
||||
}
|
||||
this.anInt3639 = Static63.anInt1943;
|
||||
this.contextId = Static63.contextId;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!mb", name = "a", descriptor = "([[B)V")
|
||||
private void method2881(@OriginalArg(0) byte[][] arg0) {
|
||||
if (this.anInt3638 != -1) {
|
||||
private void createTexture(@OriginalArg(0) byte[][] pixels) {
|
||||
if (this.textureId != -1) {
|
||||
return;
|
||||
}
|
||||
this.anInt3640 = 0;
|
||||
@Pc(9) int local9;
|
||||
for (local9 = 0; local9 < 256; local9++) {
|
||||
if (this.anIntArray345[local9] > this.anInt3640) {
|
||||
this.anInt3640 = this.anIntArray345[local9];
|
||||
this.powerOfTwoSize = 0;
|
||||
for (@Pc(9) int i = 0; i < 256; i++) {
|
||||
if (this.spriteInnerHeights[i] > this.powerOfTwoSize) {
|
||||
this.powerOfTwoSize = this.spriteInnerHeights[i];
|
||||
}
|
||||
if (this.anIntArray343[local9] > this.anInt3640) {
|
||||
this.anInt3640 = this.anIntArray343[local9];
|
||||
if (this.spriteInnerWidths[i] > this.powerOfTwoSize) {
|
||||
this.powerOfTwoSize = this.spriteInnerWidths[i];
|
||||
}
|
||||
}
|
||||
this.anInt3640 *= 16;
|
||||
this.anInt3640 = Static165.method3164(this.anInt3640);
|
||||
local9 = this.anInt3640 / 16;
|
||||
@Pc(66) byte[] local66 = new byte[this.anInt3640 * this.anInt3640 * 2];
|
||||
for (@Pc(68) int local68 = 0; local68 < 256; local68++) {
|
||||
@Pc(77) int local77 = local68 % 16 * local9;
|
||||
@Pc(83) int local83 = local68 / 16 * local9;
|
||||
@Pc(92) int local92 = (local83 * this.anInt3640 + local77) * 2;
|
||||
@Pc(94) int local94 = 0;
|
||||
@Pc(99) int local99 = this.anIntArray345[local68];
|
||||
@Pc(104) int local104 = this.anIntArray343[local68];
|
||||
@Pc(108) byte[] local108 = arg0[local68];
|
||||
for (@Pc(110) int local110 = 0; local110 < local99; local110++) {
|
||||
for (@Pc(115) int local115 = 0; local115 < local104; local115++) {
|
||||
if (local108[local94++] == 0) {
|
||||
local92 += 2;
|
||||
this.powerOfTwoSize *= 16;
|
||||
this.powerOfTwoSize = Static165.clp2(this.powerOfTwoSize);
|
||||
int glyphSize = this.powerOfTwoSize / 16;
|
||||
@Pc(66) byte[] dest = new byte[this.powerOfTwoSize * this.powerOfTwoSize * 2];
|
||||
for (@Pc(68) int i = 0; i < 256; i++) {
|
||||
@Pc(77) int s = i % 16 * glyphSize;
|
||||
@Pc(83) int t = i / 16 * glyphSize;
|
||||
@Pc(92) int destIndex = (t * this.powerOfTwoSize + s) * 2;
|
||||
@Pc(94) int srcIndex = 0;
|
||||
@Pc(99) int height = this.spriteInnerHeights[i];
|
||||
@Pc(104) int width = this.spriteInnerWidths[i];
|
||||
@Pc(108) byte[] src = pixels[i];
|
||||
for (@Pc(110) int y = 0; y < height; y++) {
|
||||
for (@Pc(115) int x = 0; x < width; x++) {
|
||||
if (src[srcIndex++] == 0) {
|
||||
destIndex += 2;
|
||||
} else {
|
||||
local66[local92++] = -1;
|
||||
local66[local92++] = -1;
|
||||
dest[destIndex++] = -1;
|
||||
dest[destIndex++] = -1;
|
||||
}
|
||||
}
|
||||
local92 += (this.anInt3640 - local104) * 2;
|
||||
destIndex += (this.powerOfTwoSize - width) * 2;
|
||||
}
|
||||
}
|
||||
@Pc(153) ByteBuffer local153 = ByteBuffer.wrap(local66);
|
||||
@Pc(155) GL2 local155 = GlRenderer.gl;
|
||||
if (this.anInt3638 == -1) {
|
||||
@Pc(162) int[] local162 = new int[1];
|
||||
local155.glGenTextures(1, local162, 0);
|
||||
this.anInt3638 = local162[0];
|
||||
this.anInt3639 = Static63.anInt1943;
|
||||
@Pc(153) ByteBuffer buffer = ByteBuffer.wrap(dest);
|
||||
@Pc(155) GL2 gl = GlRenderer.gl;
|
||||
if (this.textureId == -1) {
|
||||
@Pc(162) int[] temp = new int[1];
|
||||
gl.glGenTextures(1, temp, 0);
|
||||
this.textureId = temp[0];
|
||||
this.contextId = Static63.contextId;
|
||||
}
|
||||
GlRenderer.setTextureId(this.anInt3638);
|
||||
local155.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_LUMINANCE_ALPHA, this.anInt3640, this.anInt3640, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, local153);
|
||||
Static63.anInt1944 += local153.limit() - this.anInt3637;
|
||||
this.anInt3637 = local153.limit();
|
||||
local155.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
|
||||
local155.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
gl.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_LUMINANCE_ALPHA, this.powerOfTwoSize, this.powerOfTwoSize, 0, GL2.GL_LUMINANCE_ALPHA, GL2.GL_UNSIGNED_BYTE, buffer);
|
||||
Static63.onCard2d += buffer.limit() - this.size;
|
||||
this.size = buffer.limit();
|
||||
gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
|
||||
gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ public final class GlIndexedSprite extends IndexedSprite {
|
|||
|
||||
@OriginalMember(owner = "client!oh", name = "a", descriptor = "([B[I)V")
|
||||
private void method3337(@OriginalArg(0) byte[] arg0, @OriginalArg(1) int[] arg1) {
|
||||
this.anInt4287 = Static165.method3164(this.anInt4270);
|
||||
this.anInt4286 = Static165.method3164(this.anInt4278);
|
||||
this.anInt4287 = Static165.clp2(this.anInt4270);
|
||||
this.anInt4286 = Static165.clp2(this.anInt4278);
|
||||
@Pc(20) byte[] local20 = new byte[this.anInt4287 * this.anInt4286 * 4];
|
||||
@Pc(22) int local22 = 0;
|
||||
@Pc(24) int local24 = 0;
|
||||
|
|
@ -69,11 +69,11 @@ public final class GlIndexedSprite extends IndexedSprite {
|
|||
@Pc(102) int[] local102 = new int[1];
|
||||
local95.glGenTextures(1, local102, 0);
|
||||
this.anInt4281 = local102[0];
|
||||
this.anInt4285 = Static63.anInt1943;
|
||||
this.anInt4285 = Static63.contextId;
|
||||
}
|
||||
GlRenderer.setTextureId(this.anInt4281);
|
||||
local95.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA, this.anInt4287, this.anInt4286, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, local93);
|
||||
Static63.anInt1944 += local93.limit() - this.anInt4284;
|
||||
Static63.onCard2d += local93.limit() - this.anInt4284;
|
||||
this.anInt4284 = local93.limit();
|
||||
}
|
||||
|
||||
|
|
@ -120,12 +120,12 @@ public final class GlIndexedSprite extends IndexedSprite {
|
|||
@Override
|
||||
public final void finalize() throws Throwable {
|
||||
if (this.anInt4281 != -1) {
|
||||
Static63.method1491(this.anInt4281, this.anInt4284, this.anInt4285);
|
||||
Static63.deleteTexture2d(this.anInt4281, this.anInt4284, this.anInt4285);
|
||||
this.anInt4281 = -1;
|
||||
this.anInt4284 = 0;
|
||||
}
|
||||
if (this.anInt4282 != -1) {
|
||||
Static63.method1486(this.anInt4282, this.anInt4285);
|
||||
Static63.deleteList(this.anInt4282, this.anInt4285);
|
||||
this.anInt4282 = -1;
|
||||
}
|
||||
super.finalize();
|
||||
|
|
@ -138,7 +138,7 @@ public final class GlIndexedSprite extends IndexedSprite {
|
|||
@Pc(17) GL2 local17 = GlRenderer.gl;
|
||||
if (this.anInt4282 == -1) {
|
||||
this.anInt4282 = local17.glGenLists(1);
|
||||
this.anInt4285 = Static63.anInt1943;
|
||||
this.anInt4285 = Static63.contextId;
|
||||
}
|
||||
local17.glNewList(this.anInt4282, GL2.GL_COMPILE);
|
||||
local17.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ public final class GlRenderer {
|
|||
gl.glMatrixMode(GL2.GL_PROJECTION);
|
||||
gl.glLoadIdentity();
|
||||
gl.glOrtho(0.0D, (double) canvasWidth, 0.0D, (double) canvasHeight, -1.0D, 1.0D);
|
||||
gl.glViewport(0, 0, canvasWidth, canvasHeight);
|
||||
setViewportBounds(0, 0, canvasWidth, canvasHeight);
|
||||
gl.glMatrixMode(GL2.GL_MODELVIEW);
|
||||
gl.glLoadIdentity();
|
||||
aBoolean266 = true;
|
||||
|
|
@ -541,7 +541,7 @@ public final class GlRenderer {
|
|||
gl.glMatrixMode(GL2.GL_PROJECTION);
|
||||
gl.glLoadIdentity();
|
||||
method4175((float) local7 * aFloat34, (float) local17 * aFloat34, (float) -local35 * aFloat34, (float) -local25 * aFloat34, 50.0F, 3584.0F);
|
||||
gl.glViewport(arg0, canvasHeight - arg1 - arg3, arg2, arg3);
|
||||
setViewportBounds(arg0, canvasHeight - arg1 - arg3, arg2, arg3);
|
||||
gl.glMatrixMode(GL2.GL_MODELVIEW);
|
||||
gl.glLoadIdentity();
|
||||
gl.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
|
@ -740,6 +740,32 @@ public final class GlRenderer {
|
|||
aBoolean266 = false;
|
||||
}
|
||||
|
||||
public static int leftMargin;
|
||||
|
||||
public static int topMargin;
|
||||
|
||||
public static int topPadding;
|
||||
|
||||
public static int leftPadding;
|
||||
|
||||
public static int viewportWidth;
|
||||
|
||||
public static int viewportHeight;
|
||||
|
||||
public static void setViewportBounds(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int width, @OriginalArg(3) int height) {
|
||||
leftMargin = x;
|
||||
topMargin = y;
|
||||
viewportWidth = width;
|
||||
viewportHeight = height;
|
||||
resizeViewport();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!gi", name = "b", descriptor = "()V")
|
||||
private static void resizeViewport() {
|
||||
gl.glViewport((int) (leftMargin * GameShell.canvasScale + 0.5d), (int) (topMargin * GameShell.canvasScale + 0.5d),
|
||||
(int) (viewportWidth * GameShell.canvasScale + 0.5d), (int) (viewportHeight * GameShell.canvasScale + 0.5d));
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!tf", name = "a", descriptor = "(IIIIII)V")
|
||||
public static void method4182(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) {
|
||||
@Pc(2) int local2 = -arg0;
|
||||
|
|
@ -752,7 +778,7 @@ public final class GlRenderer {
|
|||
@Pc(30) float local30 = local23 * (256.0F / (float) arg4);
|
||||
@Pc(37) float local37 = local23 * (256.0F / (float) arg5);
|
||||
gl.glOrtho((double) ((float) local2 * local30), (double) ((float) local6 * local30), (double) ((float) -local13 * local37), (double) ((float) -local9 * local37), (double) (50 - arg3), (double) (3584 - arg3));
|
||||
gl.glViewport(0, 0, canvasWidth, canvasHeight);
|
||||
setViewportBounds(0, 0, canvasWidth, canvasHeight);
|
||||
gl.glMatrixMode(GL2.GL_MODELVIEW);
|
||||
gl.glLoadIdentity();
|
||||
gl.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public final class GlSolidColorTexture extends SecondaryNode {
|
|||
@Pc(12) int[] local12 = new int[1];
|
||||
local9.glGenTextures(1, local12, 0);
|
||||
this.anInt5058 = local12[0];
|
||||
this.anInt5059 = Static63.anInt1943;
|
||||
this.anInt5059 = Static63.contextId;
|
||||
GlRenderer.setTextureId(this.anInt5058);
|
||||
@Pc(32) int local32 = Rasteriser.anIntArray220[arg0];
|
||||
@Pc(58) byte[] local58 = new byte[] { (byte) (local32 >> 16), (byte) (local32 >> 8), (byte) local32, -1 };
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public class GlSprite extends Sprite {
|
||||
|
||||
@OriginalMember(owner = "client!cf", name = "O", descriptor = "I")
|
||||
public int anInt1870;
|
||||
public int powerOfTwoWidth;
|
||||
|
||||
@OriginalMember(owner = "client!cf", name = "cb", descriptor = "I")
|
||||
public int anInt1874;
|
||||
public int powerOfTwoHeight;
|
||||
|
||||
@OriginalMember(owner = "client!cf", name = "db", descriptor = "I")
|
||||
private int anInt1875;
|
||||
|
|
@ -21,7 +21,7 @@ public class GlSprite extends Sprite {
|
|||
protected int anInt1869 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!cf", name = "ab", descriptor = "I")
|
||||
public int anInt1872 = -1;
|
||||
public int textureId = -1;
|
||||
|
||||
@OriginalMember(owner = "client!cf", name = "Z", descriptor = "I")
|
||||
private int anInt1871 = -1;
|
||||
|
|
@ -75,26 +75,26 @@ public class GlSprite extends Sprite {
|
|||
return;
|
||||
}
|
||||
GlRenderer.method4149();
|
||||
GlRenderer.setTextureId(arg2.anInt1872);
|
||||
GlRenderer.setTextureId(arg2.textureId);
|
||||
arg2.method1424(1);
|
||||
@Pc(11) GL2 local11 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
local11.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
local11.glEnable(GL2.GL_TEXTURE_2D);
|
||||
local11.glBindTexture(GL2.GL_TEXTURE_2D, arg2.anInt1872);
|
||||
local11.glBindTexture(GL2.GL_TEXTURE_2D, arg2.textureId);
|
||||
local11.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_REPLACE);
|
||||
local11.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS);
|
||||
@Pc(47) float local47 = (float) (arg0 - Static46.anInt1439) / (float) arg2.anInt1870;
|
||||
@Pc(56) float local56 = (float) (arg1 - Static46.anInt1438) / (float) arg2.anInt1874;
|
||||
@Pc(68) float local68 = (float) (arg0 + this.anInt1867 - Static46.anInt1439) / (float) arg2.anInt1870;
|
||||
@Pc(80) float local80 = (float) (arg1 + this.anInt1859 - Static46.anInt1438) / (float) arg2.anInt1874;
|
||||
@Pc(47) float local47 = (float) (arg0 - Static46.clipX) / (float) arg2.powerOfTwoWidth;
|
||||
@Pc(56) float local56 = (float) (arg1 - Static46.clipY) / (float) arg2.powerOfTwoHeight;
|
||||
@Pc(68) float local68 = (float) (arg0 + this.anInt1867 - Static46.clipX) / (float) arg2.powerOfTwoWidth;
|
||||
@Pc(80) float local80 = (float) (arg1 + this.anInt1859 - Static46.clipY) / (float) arg2.powerOfTwoHeight;
|
||||
@Pc(85) int local85 = arg0 + this.anInt1863;
|
||||
@Pc(90) int local90 = arg1 + this.anInt1861;
|
||||
local11.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
local11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@Pc(107) float local107 = (float) this.anInt1867 / (float) this.anInt1870;
|
||||
@Pc(115) float local115 = (float) this.anInt1859 / (float) this.anInt1874;
|
||||
@Pc(107) float local107 = (float) this.anInt1867 / (float) this.powerOfTwoWidth;
|
||||
@Pc(115) float local115 = (float) this.anInt1859 / (float) this.powerOfTwoHeight;
|
||||
local11.glMultiTexCoord2f(GL2.GL_TEXTURE1, local68, local56);
|
||||
local11.glTexCoord2f(local107, 0.0F);
|
||||
local11.glVertex2f((float) (local85 + this.anInt1867), (float) (GlRenderer.canvasHeight - local90));
|
||||
|
|
@ -118,10 +118,10 @@ public class GlSprite extends Sprite {
|
|||
public final void method1426(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
|
||||
GlRenderer.method4155();
|
||||
@Pc(2) GL2 local2 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
@Pc(16) float local16 = (float) this.anInt1867 / (float) this.anInt1870;
|
||||
@Pc(24) float local24 = (float) this.anInt1859 / (float) this.anInt1874;
|
||||
@Pc(16) float local16 = (float) this.anInt1867 / (float) this.powerOfTwoWidth;
|
||||
@Pc(24) float local24 = (float) this.anInt1859 / (float) this.powerOfTwoHeight;
|
||||
@Pc(29) float local29 = local16 * (float) arg3;
|
||||
@Pc(34) float local34 = local24 * (float) arg4;
|
||||
@Pc(39) int local39 = arg0 + this.anInt1863;
|
||||
|
|
@ -148,14 +148,14 @@ public class GlSprite extends Sprite {
|
|||
return;
|
||||
}
|
||||
GlRenderer.method4149();
|
||||
GlRenderer.setTextureId(arg8.anInt1872);
|
||||
GlRenderer.setTextureId(arg8.textureId);
|
||||
arg8.method1424(1);
|
||||
@Pc(11) GL2 local11 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
local11.glActiveTexture(GL2.GL_TEXTURE1);
|
||||
local11.glEnable(GL2.GL_TEXTURE_2D);
|
||||
local11.glBindTexture(GL2.GL_TEXTURE_2D, arg8.anInt1872);
|
||||
local11.glBindTexture(GL2.GL_TEXTURE_2D, arg8.textureId);
|
||||
local11.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_COMBINE_RGB, GL2.GL_REPLACE);
|
||||
local11.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS);
|
||||
@Pc(43) int local43 = -arg2 / 2;
|
||||
|
|
@ -174,12 +174,12 @@ public class GlSprite extends Sprite {
|
|||
@Pc(156) int local156 = (arg5 << 16) + (local54 * local84 - local43 * local78);
|
||||
@Pc(168) int local168 = (arg4 << 16) + local54 * local78 + local51 * local84;
|
||||
@Pc(180) int local180 = (arg5 << 16) + (local54 * local84 - local51 * local78);
|
||||
@Pc(188) float local188 = (float) arg8.anInt1867 / (float) arg8.anInt1870;
|
||||
@Pc(196) float local196 = (float) arg8.anInt1859 / (float) arg8.anInt1874;
|
||||
@Pc(188) float local188 = (float) arg8.anInt1867 / (float) arg8.powerOfTwoWidth;
|
||||
@Pc(196) float local196 = (float) arg8.anInt1859 / (float) arg8.powerOfTwoHeight;
|
||||
local11.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
local11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@Pc(211) float local211 = (float) this.anInt1870 * 65536.0F;
|
||||
@Pc(217) float local217 = (float) (this.anInt1874 * 65536);
|
||||
@Pc(211) float local211 = (float) this.powerOfTwoWidth * 65536.0F;
|
||||
@Pc(217) float local217 = (float) (this.powerOfTwoHeight * 65536);
|
||||
local11.glMultiTexCoord2f(GL2.GL_TEXTURE1, local188, 0.0F);
|
||||
local11.glTexCoord2f((float) local120 / local211, (float) local132 / local217);
|
||||
local11.glVertex2f((float) (arg0 + arg2), (float) (GlRenderer.canvasHeight - arg1));
|
||||
|
|
@ -206,11 +206,11 @@ public class GlSprite extends Sprite {
|
|||
@Pc(5) int local5 = arg0 + this.anInt1863;
|
||||
@Pc(10) int local10 = arg1 + this.anInt1861;
|
||||
@Pc(12) GL2 local12 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
local12.glTranslatef((float) local5, (float) (GlRenderer.canvasHeight - local10), 0.0F);
|
||||
@Pc(35) float local35 = (float) this.anInt1867 / (float) this.anInt1870;
|
||||
@Pc(43) float local43 = (float) this.anInt1859 / (float) this.anInt1874;
|
||||
@Pc(35) float local35 = (float) this.anInt1867 / (float) this.powerOfTwoWidth;
|
||||
@Pc(43) float local43 = (float) this.anInt1859 / (float) this.powerOfTwoHeight;
|
||||
local12.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
local12.glTexCoord2f(0.0F, 0.0F);
|
||||
local12.glVertex2f((float) this.anInt1867, 0.0F);
|
||||
|
|
@ -231,7 +231,7 @@ public class GlSprite extends Sprite {
|
|||
@Pc(5) int local5 = arg0 + this.anInt1863;
|
||||
@Pc(10) int local10 = arg1 + this.anInt1861;
|
||||
@Pc(12) GL2 local12 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
local12.glTranslatef((float) local5, (float) (GlRenderer.canvasHeight - local10), 0.0F);
|
||||
local12.glCallList(this.anInt1871);
|
||||
|
|
@ -242,7 +242,7 @@ public class GlSprite extends Sprite {
|
|||
public final void method1428(@OriginalArg(2) int arg0, @OriginalArg(3) int arg1, @OriginalArg(4) int arg2) {
|
||||
GlRenderer.method4149();
|
||||
@Pc(2) GL2 local2 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(2);
|
||||
@Pc(15) int local15 = 240 - (this.anInt1863 << 4);
|
||||
@Pc(22) int local22 = 240 - (this.anInt1861 << 4);
|
||||
|
|
@ -286,14 +286,14 @@ public class GlSprite extends Sprite {
|
|||
arg3 = ((local11 << 16) + local33 - local15 - 1) / local33;
|
||||
}
|
||||
@Pc(123) GL2 local123 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(2);
|
||||
@Pc(132) float local132 = (float) arg0;
|
||||
@Pc(137) float local137 = local132 + (float) arg2;
|
||||
@Pc(142) float local142 = (float) (GlRenderer.canvasHeight - arg1);
|
||||
@Pc(147) float local147 = local142 - (float) arg3;
|
||||
@Pc(155) float local155 = (float) this.anInt1867 / (float) this.anInt1870;
|
||||
@Pc(163) float local163 = (float) this.anInt1859 / (float) this.anInt1874;
|
||||
@Pc(155) float local155 = (float) this.anInt1867 / (float) this.powerOfTwoWidth;
|
||||
@Pc(163) float local163 = (float) this.anInt1859 / (float) this.powerOfTwoHeight;
|
||||
local123.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
local123.glTexCoord2f(local155, 0.0F);
|
||||
local123.glVertex2f(local137, local142);
|
||||
|
|
@ -313,7 +313,7 @@ public class GlSprite extends Sprite {
|
|||
@Pc(5) int local5 = arg0 + this.anInt1863;
|
||||
@Pc(10) int local10 = arg1 + this.anInt1861;
|
||||
@Pc(12) GL2 local12 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
local12.glTranslatef((float) local5, (float) (GlRenderer.canvasHeight - local10), 0.0F);
|
||||
local12.glCallList(this.anInt1871);
|
||||
|
|
@ -323,13 +323,13 @@ public class GlSprite extends Sprite {
|
|||
@OriginalMember(owner = "client!cf", name = "finalize", descriptor = "()V")
|
||||
@Override
|
||||
public final void finalize() throws Throwable {
|
||||
if (this.anInt1872 != -1) {
|
||||
Static63.method1491(this.anInt1872, this.anInt1869, this.anInt1875);
|
||||
this.anInt1872 = -1;
|
||||
if (this.textureId != -1) {
|
||||
Static63.deleteTexture2d(this.textureId, this.anInt1869, this.anInt1875);
|
||||
this.textureId = -1;
|
||||
this.anInt1869 = 0;
|
||||
}
|
||||
if (this.anInt1871 != -1) {
|
||||
Static63.method1486(this.anInt1871, this.anInt1875);
|
||||
Static63.deleteList(this.anInt1871, this.anInt1875);
|
||||
this.anInt1871 = -1;
|
||||
}
|
||||
super.finalize();
|
||||
|
|
@ -340,7 +340,7 @@ public class GlSprite extends Sprite {
|
|||
protected final void method1416(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) {
|
||||
GlRenderer.method4149();
|
||||
@Pc(2) GL2 local2 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
@Pc(15) int local15 = arg0 - (this.anInt1863 << 4);
|
||||
@Pc(22) int local22 = arg1 - (this.anInt1861 << 4);
|
||||
|
|
@ -387,14 +387,14 @@ public class GlSprite extends Sprite {
|
|||
arg3 = ((local11 << 16) + local33 - local15 - 1) / local33;
|
||||
}
|
||||
@Pc(123) GL2 local123 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
@Pc(132) float local132 = (float) arg0;
|
||||
@Pc(137) float local137 = local132 + (float) arg2;
|
||||
@Pc(142) float local142 = (float) (GlRenderer.canvasHeight - arg1);
|
||||
@Pc(147) float local147 = local142 - (float) arg3;
|
||||
@Pc(155) float local155 = (float) this.anInt1867 / (float) this.anInt1870;
|
||||
@Pc(163) float local163 = (float) this.anInt1859 / (float) this.anInt1874;
|
||||
@Pc(155) float local155 = (float) this.anInt1867 / (float) this.powerOfTwoWidth;
|
||||
@Pc(163) float local163 = (float) this.anInt1859 / (float) this.powerOfTwoHeight;
|
||||
@Pc(168) float local168 = (float) arg4 / 256.0F;
|
||||
local123.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
local123.glColor4f(1.0F, 1.0F, 1.0F, local168);
|
||||
|
|
@ -413,10 +413,10 @@ public class GlSprite extends Sprite {
|
|||
public final void method1429(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
|
||||
GlRenderer.method4149();
|
||||
@Pc(2) GL2 local2 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
@Pc(16) float local16 = (float) this.anInt1867 / (float) this.anInt1870;
|
||||
@Pc(24) float local24 = (float) this.anInt1859 / (float) this.anInt1874;
|
||||
@Pc(16) float local16 = (float) this.anInt1867 / (float) this.powerOfTwoWidth;
|
||||
@Pc(24) float local24 = (float) this.anInt1859 / (float) this.powerOfTwoHeight;
|
||||
@Pc(29) float local29 = local16 * (float) arg2;
|
||||
@Pc(34) float local34 = local24 * (float) arg3;
|
||||
@Pc(39) int local39 = arg0 + this.anInt1863;
|
||||
|
|
@ -437,12 +437,12 @@ public class GlSprite extends Sprite {
|
|||
|
||||
@OriginalMember(owner = "client!cf", name = "a", descriptor = "([I)V")
|
||||
protected void method1430(@OriginalArg(0) int[] arg0) {
|
||||
this.anInt1870 = Static165.method3164(this.anInt1867);
|
||||
this.anInt1874 = Static165.method3164(this.anInt1859);
|
||||
@Pc(20) byte[] local20 = new byte[this.anInt1870 * this.anInt1874 * 4];
|
||||
this.powerOfTwoWidth = Static165.clp2(this.anInt1867);
|
||||
this.powerOfTwoHeight = Static165.clp2(this.anInt1859);
|
||||
@Pc(20) byte[] local20 = new byte[this.powerOfTwoWidth * this.powerOfTwoHeight * 4];
|
||||
@Pc(22) int local22 = 0;
|
||||
@Pc(24) int local24 = 0;
|
||||
@Pc(32) int local32 = (this.anInt1870 - this.anInt1867) * 4;
|
||||
@Pc(32) int local32 = (this.powerOfTwoWidth - this.anInt1867) * 4;
|
||||
for (@Pc(34) int local34 = 0; local34 < this.anInt1859; local34++) {
|
||||
for (@Pc(40) int local40 = 0; local40 < this.anInt1867; local40++) {
|
||||
@Pc(49) int local49 = arg0[local24++];
|
||||
|
|
@ -459,15 +459,15 @@ public class GlSprite extends Sprite {
|
|||
}
|
||||
@Pc(91) ByteBuffer local91 = ByteBuffer.wrap(local20);
|
||||
@Pc(93) GL2 local93 = GlRenderer.gl;
|
||||
if (this.anInt1872 == -1) {
|
||||
if (this.textureId == -1) {
|
||||
@Pc(100) int[] local100 = new int[1];
|
||||
local93.glGenTextures(1, local100, 0);
|
||||
this.anInt1872 = local100[0];
|
||||
this.anInt1875 = Static63.anInt1943;
|
||||
this.textureId = local100[0];
|
||||
this.anInt1875 = Static63.contextId;
|
||||
}
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
local93.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA, this.anInt1870, this.anInt1874, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, local91);
|
||||
Static63.anInt1944 += local91.limit() - this.anInt1869;
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
local93.glTexImage2D(GL2.GL_TEXTURE_2D, 0, GL2.GL_RGBA, this.powerOfTwoWidth, this.powerOfTwoHeight, 0, GL2.GL_RGBA, GL2.GL_UNSIGNED_BYTE, local91);
|
||||
Static63.onCard2d += local91.limit() - this.anInt1869;
|
||||
this.anInt1869 = local91.limit();
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +478,7 @@ public class GlSprite extends Sprite {
|
|||
@Pc(5) int local5 = arg0 + this.anInt1863;
|
||||
@Pc(10) int local10 = arg1 + this.anInt1861;
|
||||
@Pc(12) GL2 local12 = GlRenderer.gl;
|
||||
GlRenderer.setTextureId(this.anInt1872);
|
||||
GlRenderer.setTextureId(this.textureId);
|
||||
this.method1424(1);
|
||||
local12.glColor4f(1.0F, 1.0F, 1.0F, (float) arg2 / 256.0F);
|
||||
local12.glTranslatef((float) local5, (float) (GlRenderer.canvasHeight - local10), 0.0F);
|
||||
|
|
@ -488,12 +488,12 @@ public class GlSprite extends Sprite {
|
|||
|
||||
@OriginalMember(owner = "client!cf", name = "a", descriptor = "()V")
|
||||
private void method1431() {
|
||||
@Pc(7) float local7 = (float) this.anInt1867 / (float) this.anInt1870;
|
||||
@Pc(15) float local15 = (float) this.anInt1859 / (float) this.anInt1874;
|
||||
@Pc(7) float local7 = (float) this.anInt1867 / (float) this.powerOfTwoWidth;
|
||||
@Pc(15) float local15 = (float) this.anInt1859 / (float) this.powerOfTwoHeight;
|
||||
@Pc(17) GL2 local17 = GlRenderer.gl;
|
||||
if (this.anInt1871 == -1) {
|
||||
this.anInt1871 = local17.glGenLists(1);
|
||||
this.anInt1875 = Static63.anInt1943;
|
||||
this.anInt1875 = Static63.contextId;
|
||||
}
|
||||
local17.glNewList(this.anInt1871, GL2.GL_COMPILE);
|
||||
local17.glBegin(GL2.GL_TRIANGLE_FAN);
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ public final class GlTexture extends SecondaryNode {
|
|||
if (this.anInt5493 == -1) {
|
||||
@Pc(53) int[] local53 = new int[1];
|
||||
local22.glGenTextures(1, local53, 0);
|
||||
this.anInt5492 = Static63.anInt1943;
|
||||
this.anInt5492 = Static63.contextId;
|
||||
this.anInt5493 = local53[0];
|
||||
GlRenderer.setTextureId(this.anInt5493);
|
||||
@Pc(82) ByteBuffer local82 = ByteBuffer.wrap(this.aClass88_1.method2728(local28, local28, this.aBoolean288, arg1, 0.7D, arg0));
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class GlVertexBufferObject {
|
|||
local9.glGenBuffers(1, local12, 0);
|
||||
this.aBoolean300 = arg0;
|
||||
this.anInt5760 = local12[0];
|
||||
this.anInt5761 = Static63.anInt1943;
|
||||
this.anInt5761 = Static63.contextId;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!vi", name = "a", descriptor = "(Ljava/nio/ByteBuffer;)V")
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public final class JavaAudioChannel extends AudioChannel {
|
|||
this.aSourceDataLine1 = null;
|
||||
throw local36;
|
||||
} else {
|
||||
this.method3562(Static165.method3164(arg0));
|
||||
this.method3562(Static165.clp2(arg0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ public final class LocType {
|
|||
} else if (arg1 == 249) {
|
||||
local18 = arg0.g1();
|
||||
if (this.aClass133_19 == null) {
|
||||
local38 = Static165.method3164(local18);
|
||||
local38 = Static165.clp2(local18);
|
||||
this.aClass133_19 = new HashTable(local38);
|
||||
}
|
||||
for (local38 = 0; local38 < local18; local38++) {
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ public final class NpcType {
|
|||
} else if (arg0 == 249) {
|
||||
local12 = arg1.g1();
|
||||
if (this.aClass133_15 == null) {
|
||||
local18 = Static165.method3164(local12);
|
||||
local18 = Static165.clp2(local12);
|
||||
this.aClass133_15 = new HashTable(local18);
|
||||
}
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ public final class ObjType {
|
|||
} else if (arg1 == 249) {
|
||||
local169 = arg0.g1();
|
||||
if (this.aClass133_6 == null) {
|
||||
local179 = Static165.method3164(local169);
|
||||
local179 = Static165.clp2(local169);
|
||||
this.aClass133_6 = new HashTable(local179);
|
||||
}
|
||||
for (local179 = 0; local179 < local169; local179++) {
|
||||
|
|
|
|||
|
|
@ -2983,7 +2983,7 @@ public final class Rasteriser {
|
|||
anInt2470 = arg3 - arg1;
|
||||
method1915();
|
||||
if (anIntArray221.length < anInt2470) {
|
||||
anIntArray221 = new int[Static165.method3164(anInt2470)];
|
||||
anIntArray221 = new int[Static165.clp2(anInt2470)];
|
||||
}
|
||||
@Pc(23) int local23 = arg1 * Static129.anInt3144 + arg0;
|
||||
for (@Pc(25) int local25 = 0; local25 < anInt2470; local25++) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public final class SoftwareFont extends Font {
|
|||
|
||||
@OriginalMember(owner = "client!dd", name = "a", descriptor = "(IIIIIIIZ)V")
|
||||
@Override
|
||||
protected final void method2855(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6) {
|
||||
protected final void renderGlyphTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6) {
|
||||
@Pc(5) int local5 = arg1 + arg2 * Static129.anInt3144;
|
||||
@Pc(9) int local9 = Static129.anInt3144 - arg3;
|
||||
@Pc(11) int local11 = 0;
|
||||
|
|
@ -60,7 +60,7 @@ public final class SoftwareFont extends Font {
|
|||
|
||||
@OriginalMember(owner = "client!dd", name = "a", descriptor = "(IIIIIIZ)V")
|
||||
@Override
|
||||
protected final void method2854(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) {
|
||||
protected final void renderGlyph(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) {
|
||||
@Pc(5) int local5 = arg1 + arg2 * Static129.anInt3144;
|
||||
@Pc(9) int local9 = Static129.anInt3144 - arg3;
|
||||
@Pc(11) int local11 = 0;
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ public final class Static127 {
|
|||
}
|
||||
if (GlRenderer.enabled && arg0.method3111(Static201.aClass100_406)) {
|
||||
System.out.println("oncard_geometry:" + Static63.anInt1945);
|
||||
System.out.println("oncard_2d:" + Static63.anInt1944);
|
||||
System.out.println("oncard_2d:" + Static63.onCard2d);
|
||||
System.out.println("oncard_texture:" + Static63.anInt1942);
|
||||
}
|
||||
if (arg0.method3111(Static257.aClass100_99)) {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public final class Static165 {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!nb", name = "a", descriptor = "(BI)I")
|
||||
public static int method3164(@OriginalArg(1) int arg0) {
|
||||
public static int clp2(@OriginalArg(1) int arg0) {
|
||||
@Pc(0) int local0 = arg0 - 1;
|
||||
@Pc(6) int local6 = local0 | local0 >>> 1;
|
||||
@Pc(22) int local22 = local6 | local6 >>> 2;
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class Static46 {
|
||||
|
||||
@OriginalMember(owner = "client!dj", name = "a", descriptor = "Lclient!cf;")
|
||||
public static GlSprite aClass3_Sub2_Sub1_Sub2_1 = null;
|
||||
public static GlSprite mask = null;
|
||||
|
||||
@OriginalMember(owner = "client!dj", name = "b", descriptor = "I")
|
||||
public static int anInt1438 = 0;
|
||||
public static int clipY = 0;
|
||||
|
||||
@OriginalMember(owner = "client!dj", name = "c", descriptor = "I")
|
||||
public static int anInt1439 = 0;
|
||||
public static int clipX = 0;
|
||||
|
||||
@OriginalMember(owner = "client!dj", name = "d", descriptor = "I")
|
||||
private static int anInt1440 = 0;
|
||||
|
|
@ -23,7 +23,7 @@ public final class Static46 {
|
|||
|
||||
@OriginalMember(owner = "client!dj", name = "a", descriptor = "()V")
|
||||
public static void method1173() {
|
||||
aClass3_Sub2_Sub1_Sub2_1 = null;
|
||||
mask = null;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!dj", name = "a", descriptor = "(IIII)V")
|
||||
|
|
@ -56,8 +56,8 @@ public final class Static46 {
|
|||
|
||||
@OriginalMember(owner = "client!dj", name = "c", descriptor = "()V")
|
||||
public static void method1177() {
|
||||
anInt1439 = 0;
|
||||
anInt1438 = 0;
|
||||
clipX = 0;
|
||||
clipY = 0;
|
||||
anInt1440 = GlRenderer.canvasWidth;
|
||||
anInt1441 = GlRenderer.canvasHeight;
|
||||
@Pc(9) GL2 local9 = GlRenderer.gl;
|
||||
|
|
@ -66,17 +66,17 @@ public final class Static46 {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!dj", name = "a", descriptor = "([IIIII)V")
|
||||
public static void method1178(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
|
||||
public static void method1178(@OriginalArg(0) int[] arg0, @OriginalArg(1) int x, @OriginalArg(2) int y, @OriginalArg(3) int width, @OriginalArg(4) int height) {
|
||||
GlRenderer.method4162();
|
||||
@Pc(2) GL2 local2 = GlRenderer.gl;
|
||||
local2.glRasterPos2i(arg1, GlRenderer.canvasHeight - arg2);
|
||||
local2.glPixelZoom(1.0F, -1.0F);
|
||||
local2.glDisable(GL2.GL_BLEND);
|
||||
local2.glDisable(GL2.GL_ALPHA_TEST);
|
||||
local2.glDrawPixels(arg3, arg4, GL2.GL_BGRA, GlRenderer.bigEndian ? GL2.GL_UNSIGNED_INT_8_8_8_8_REV : GL2.GL_UNSIGNED_BYTE, IntBuffer.wrap(arg0));
|
||||
local2.glEnable(GL2.GL_ALPHA_TEST);
|
||||
local2.glEnable(GL2.GL_BLEND);
|
||||
local2.glPixelZoom(1.0F, 1.0F);
|
||||
@Pc(2) GL2 gl = GlRenderer.gl;
|
||||
gl.glRasterPos2i(x, GlRenderer.canvasHeight - y - height);
|
||||
gl.glDisable(GL2.GL_BLEND);
|
||||
gl.glDisable(GL2.GL_ALPHA_TEST);
|
||||
gl.glPixelZoom((float) GameShell.canvasScale, (float) GameShell.canvasScale);
|
||||
gl.glDrawPixels(width, height, GL2.GL_BGRA, GlRenderer.bigEndian ? GL2.GL_UNSIGNED_INT_8_8_8_8_REV : GL2.GL_UNSIGNED_BYTE, IntBuffer.wrap(arg0));
|
||||
gl.glPixelZoom(1.0F, 1.0F);
|
||||
gl.glEnable(GL2.GL_ALPHA_TEST);
|
||||
gl.glEnable(GL2.GL_BLEND);
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!dj", name = "a", descriptor = "(IIIII)V")
|
||||
|
|
@ -182,11 +182,11 @@ public final class Static46 {
|
|||
|
||||
@OriginalMember(owner = "client!dj", name = "c", descriptor = "(IIII)V")
|
||||
public static void method1183(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
|
||||
if (anInt1439 < arg0) {
|
||||
anInt1439 = arg0;
|
||||
if (clipX < arg0) {
|
||||
clipX = arg0;
|
||||
}
|
||||
if (anInt1438 < arg1) {
|
||||
anInt1438 = arg1;
|
||||
if (clipY < arg1) {
|
||||
clipY = arg1;
|
||||
}
|
||||
if (anInt1440 > arg2) {
|
||||
anInt1440 = arg2;
|
||||
|
|
@ -196,8 +196,8 @@ public final class Static46 {
|
|||
}
|
||||
@Pc(21) GL2 local21 = GlRenderer.gl;
|
||||
local21.glEnable(GL2.GL_SCISSOR_TEST);
|
||||
if (anInt1439 <= anInt1440 && anInt1438 <= anInt1441) {
|
||||
local21.glScissor(anInt1439, GlRenderer.canvasHeight - anInt1441, anInt1440 - anInt1439, anInt1441 - anInt1438);
|
||||
if (clipX <= anInt1440 && clipY <= anInt1441) {
|
||||
local21.glScissor((int)(clipX * GameShell.canvasScale + 0.5d), (int)((GlRenderer.canvasHeight - anInt1441) * GameShell.canvasScale + 0.5d), (int)((anInt1440 - clipX) * GameShell.canvasScale + 0.5d), (int)((anInt1441 - clipY) * GameShell.canvasScale + 0.5d));
|
||||
} else {
|
||||
local21.glScissor(0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -255,14 +255,14 @@ public final class Static46 {
|
|||
if (arg3 > GlRenderer.canvasHeight) {
|
||||
arg3 = GlRenderer.canvasHeight;
|
||||
}
|
||||
anInt1439 = arg0;
|
||||
anInt1438 = arg1;
|
||||
clipX = arg0;
|
||||
clipY = arg1;
|
||||
anInt1440 = arg2;
|
||||
anInt1441 = arg3;
|
||||
@Pc(27) GL2 local27 = GlRenderer.gl;
|
||||
local27.glEnable(GL2.GL_SCISSOR_TEST);
|
||||
if (anInt1439 <= anInt1440 && anInt1438 <= anInt1441) {
|
||||
local27.glScissor(anInt1439, GlRenderer.canvasHeight - anInt1441, anInt1440 - anInt1439, anInt1441 - anInt1438);
|
||||
if (clipX <= anInt1440 && clipY <= anInt1441) {
|
||||
local27.glScissor((int)(clipX * GameShell.canvasScale + 0.5d), (int)((GlRenderer.canvasHeight - anInt1441) * GameShell.canvasScale + 0.5d), (int)((anInt1440 - clipX) * GameShell.canvasScale + 0.5d), (int)((anInt1441 - clipY) * GameShell.canvasScale + 0.5d));
|
||||
} else {
|
||||
local27.glScissor(0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -271,9 +271,9 @@ public final class Static46 {
|
|||
|
||||
@OriginalMember(owner = "client!dj", name = "a", descriptor = "(Lclient!cf;)V")
|
||||
public static void method1188(@OriginalArg(0) GlSprite arg0) {
|
||||
if (arg0.anInt1859 != anInt1441 - anInt1438) {
|
||||
if (arg0.anInt1859 != anInt1441 - clipY) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
aClass3_Sub2_Sub1_Sub2_1 = arg0;
|
||||
mask = arg0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ public final class Static63 {
|
|||
private static final LinkedList aClass69_48 = new LinkedList();
|
||||
|
||||
@OriginalMember(owner = "client!fa", name = "c", descriptor = "I")
|
||||
public static int anInt1943 = 0;
|
||||
public static int contextId = 0;
|
||||
|
||||
@OriginalMember(owner = "client!fa", name = "d", descriptor = "J")
|
||||
private static long aLong71 = 0L;
|
||||
|
||||
@OriginalMember(owner = "client!fa", name = "e", descriptor = "I")
|
||||
public static int anInt1944 = 0;
|
||||
public static int onCard2d = 0;
|
||||
|
||||
@OriginalMember(owner = "client!fa", name = "f", descriptor = "I")
|
||||
public static int anInt1945 = 0;
|
||||
|
|
@ -37,7 +37,7 @@ public final class Static63 {
|
|||
|
||||
@OriginalMember(owner = "client!fa", name = "a", descriptor = "(III)V")
|
||||
public static synchronized void method1485(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
|
||||
if (arg2 == anInt1943) {
|
||||
if (arg2 == contextId) {
|
||||
@Pc(8) IntNode local8 = new IntNode(arg1);
|
||||
local8.aLong192 = arg0;
|
||||
aClass69_50.method2282(local8);
|
||||
|
|
@ -45,8 +45,8 @@ public final class Static63 {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!fa", name = "a", descriptor = "(II)V")
|
||||
public static synchronized void method1486(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
|
||||
if (arg1 == anInt1943) {
|
||||
public static synchronized void deleteList(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
|
||||
if (arg1 == contextId) {
|
||||
@Pc(7) IntNode local7 = new IntNode();
|
||||
local7.aLong192 = arg0;
|
||||
aClass69_51.method2282(local7);
|
||||
|
|
@ -55,19 +55,19 @@ public final class Static63 {
|
|||
|
||||
@OriginalMember(owner = "client!fa", name = "b", descriptor = "()V")
|
||||
public static synchronized void clear() {
|
||||
anInt1943++;
|
||||
contextId++;
|
||||
aClass69_48.method2278();
|
||||
aClass69_49.method2278();
|
||||
aClass69_50.method2278();
|
||||
aClass69_51.method2278();
|
||||
anInt1945 = 0;
|
||||
anInt1944 = 0;
|
||||
onCard2d = 0;
|
||||
anInt1942 = 0;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!fa", name = "b", descriptor = "(III)V")
|
||||
public static synchronized void method1489(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
|
||||
if (arg2 == anInt1943) {
|
||||
if (arg2 == contextId) {
|
||||
@Pc(8) IntNode local8 = new IntNode(arg1);
|
||||
local8.aLong192 = arg0;
|
||||
aClass69_48.method2282(local8);
|
||||
|
|
@ -97,7 +97,7 @@ public final class Static63 {
|
|||
while (true) {
|
||||
local8 = (IntNode) aClass69_51.method2287();
|
||||
if (local8 == null) {
|
||||
if (anInt1945 + anInt1944 + anInt1942 > 100663296 && MonotonicClock.currentTimeMillis() > aLong71 + 60000L) {
|
||||
if (anInt1945 + onCard2d + anInt1942 > 100663296 && MonotonicClock.currentTimeMillis() > aLong71 + 60000L) {
|
||||
System.gc();
|
||||
aLong71 = MonotonicClock.currentTimeMillis();
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ public final class Static63 {
|
|||
}
|
||||
}
|
||||
anIntArray151[local3++] = (int) local8.aLong192;
|
||||
anInt1944 -= local8.anInt3141;
|
||||
onCard2d -= local8.anInt3141;
|
||||
if (local3 == 1000) {
|
||||
local1.glDeleteTextures(local3, anIntArray151, 0);
|
||||
local3 = 0;
|
||||
|
|
@ -133,8 +133,8 @@ public final class Static63 {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!fa", name = "c", descriptor = "(III)V")
|
||||
public static synchronized void method1491(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
|
||||
if (arg2 == anInt1943) {
|
||||
public static synchronized void deleteTexture2d(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
|
||||
if (arg2 == contextId) {
|
||||
@Pc(8) IntNode local8 = new IntNode(arg1);
|
||||
local8.aLong192 = arg0;
|
||||
aClass69_49.method2282(local8);
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ public final class Static87 {
|
|||
local276 += 15;
|
||||
if (GlRenderer.enabled) {
|
||||
local514 = 16776960;
|
||||
local518 = (Static63.anInt1942 + Static63.anInt1945 + Static63.anInt1944) / 1024;
|
||||
local518 = (Static63.anInt1942 + Static63.anInt1945 + Static63.onCard2d) / 1024;
|
||||
if (local518 > 65536) {
|
||||
local514 = 16711680;
|
||||
}
|
||||
|
|
@ -446,7 +446,7 @@ public final class Static87 {
|
|||
@Pc(1575) int local1575;
|
||||
if (GlRenderer.enabled) {
|
||||
local1575 = Static46.anInt1441;
|
||||
local1577 = Static46.anInt1438;
|
||||
local1577 = Static46.clipY;
|
||||
} else {
|
||||
local1577 = Static129.anInt3147;
|
||||
local1575 = Static129.anInt3149;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public final class Static91 {
|
|||
local12.aClass133Array1 = new HashTable[local98];
|
||||
for (local107 = 0; local107 < local98; local107++) {
|
||||
local114 = local42.g2();
|
||||
@Pc(121) HashTable local121 = new HashTable(Static165.method3164(local114));
|
||||
@Pc(121) HashTable local121 = new HashTable(Static165.clp2(local114));
|
||||
local12.aClass133Array1[local107] = local121;
|
||||
while (local114-- > 0) {
|
||||
@Pc(136) int local136 = local42.g4();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class StructType extends SecondaryNode {
|
|||
@Pc(17) int local17 = arg0.g1();
|
||||
@Pc(25) int local25;
|
||||
if (this.aClass133_14 == null) {
|
||||
local25 = Static165.method3164(local17);
|
||||
local25 = Static165.clp2(local17);
|
||||
this.aClass133_14 = new HashTable(local25);
|
||||
}
|
||||
for (local25 = 0; local25 < local17; local25++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue