Refactored some code related to inv/sprite

This commit is contained in:
Pazaz 2022-05-11 04:24:19 -04:00
parent 77bfb744bc
commit b57d5a0031
51 changed files with 686 additions and 625 deletions

View file

@ -471,15 +471,15 @@ public class ClientProt {
local30 = Static81.anInt2225; local30 = Static81.anInt2225;
} }
@Pc(41) int local41 = Mouse.anInt5032; @Pc(41) int local41 = Mouse.anInt5032;
if (Static81.anInt2225 + Static4.aClass13_1.anInt445 < local30 - -Static105.aClass13_14.anInt445) { if (Static81.anInt2225 + Static4.aClass13_1.width < local30 - -Static105.aClass13_14.width) {
local30 = Static81.anInt2225 + Static4.aClass13_1.anInt445 - Static105.aClass13_14.anInt445; local30 = Static81.anInt2225 + Static4.aClass13_1.width - Static105.aClass13_14.width;
} }
local41 -= Static165.anInt4035; local41 -= Static165.anInt4035;
if (local41 < Static228.anInt5103) { if (local41 < Static228.anInt5103) {
local41 = Static228.anInt5103; local41 = Static228.anInt5103;
} }
if (Static228.anInt5103 + Static4.aClass13_1.anInt459 < local41 - -Static105.aClass13_14.anInt459) { if (Static228.anInt5103 + Static4.aClass13_1.height < local41 - -Static105.aClass13_14.height) {
local41 = Static228.anInt5103 + Static4.aClass13_1.anInt459 - Static105.aClass13_14.anInt459; local41 = Static228.anInt5103 + Static4.aClass13_1.height - Static105.aClass13_14.height;
} }
@Pc(109) int local109 = local41 - Static20.anInt660; @Pc(109) int local109 = local41 - Static20.anInt660;
@Pc(114) int local114 = local30 - Static124.anInt3075; @Pc(114) int local114 = local30 - Static124.anInt3075;

View file

@ -192,7 +192,7 @@ public final class Component {
public int aspectHeight = 1; public int aspectHeight = 1;
@OriginalMember(owner = "client!be", name = "R", descriptor = "I") @OriginalMember(owner = "client!be", name = "R", descriptor = "I")
public int anInt459 = 0; public int height = 0;
@OriginalMember(owner = "client!be", name = "S", descriptor = "I") @OriginalMember(owner = "client!be", name = "S", descriptor = "I")
public int anInt460 = 0; public int anInt460 = 0;
@ -309,7 +309,7 @@ public final class Component {
public JagString text = Static176.aClass100_800; public JagString text = Static176.aClass100_800;
@OriginalMember(owner = "client!be", name = "n", descriptor = "I") @OriginalMember(owner = "client!be", name = "n", descriptor = "I")
public int anInt445 = 0; public int width = 0;
@OriginalMember(owner = "client!be", name = "Wb", descriptor = "I") @OriginalMember(owner = "client!be", name = "Wb", descriptor = "I")
public int anInt489 = 0; public int anInt489 = 0;
@ -372,7 +372,7 @@ public final class Component {
public JagString aClass100_82 = Static176.aClass100_800; public JagString aClass100_82 = Static176.aClass100_800;
@OriginalMember(owner = "client!be", name = "Pc", descriptor = "I") @OriginalMember(owner = "client!be", name = "Pc", descriptor = "I")
public int anInt514 = 0; public int objSelected = 0;
@OriginalMember(owner = "client!be", name = "oc", descriptor = "I") @OriginalMember(owner = "client!be", name = "oc", descriptor = "I")
public int anInt498 = -1; public int anInt498 = -1;
@ -435,7 +435,7 @@ public final class Component {
public int anInt453 = 0; public int anInt453 = 0;
@OriginalMember(owner = "client!be", name = "Oc", descriptor = "I") @OriginalMember(owner = "client!be", name = "Oc", descriptor = "I")
public int anInt513 = 0; public int objShadow = 0;
@OriginalMember(owner = "client!be", name = "fd", descriptor = "Lclient!be;") @OriginalMember(owner = "client!be", name = "fd", descriptor = "Lclient!be;")
public Component aClass13_5 = null; public Component aClass13_5 = null;
@ -474,7 +474,7 @@ public final class Component {
public int baseY = 0; public int baseY = 0;
@OriginalMember(owner = "client!be", name = "Bb", descriptor = "Z") @OriginalMember(owner = "client!be", name = "Bb", descriptor = "Z")
public boolean aBoolean31 = true; public boolean objDrawText = true;
@OriginalMember(owner = "client!be", name = "Kc", descriptor = "I") @OriginalMember(owner = "client!be", name = "Kc", descriptor = "I")
public int anInt510 = 0; public int anInt510 = 0;
@ -947,7 +947,7 @@ public final class Component {
if (local12 == -1) { if (local12 == -1) {
return null; return null;
} }
@Pc(66) long local66 = ((this.aBoolean21 ? 1L : 0L) << 38) + ((this.aBoolean18 ? 1L : 0L) << 35) + (long) local12 + ((long) this.anInt514 << 36) + ((this.aBoolean26 ? 1L : 0L) << 39) + ((long) this.anInt513 << 40); @Pc(66) long local66 = ((this.aBoolean21 ? 1L : 0L) << 38) + ((this.aBoolean18 ? 1L : 0L) << 35) + (long) local12 + ((long) this.objSelected << 36) + ((this.aBoolean26 ? 1L : 0L) << 39) + ((long) this.objShadow << 40);
@Pc(72) Sprite local72 = (Sprite) sprites.get(local66); @Pc(72) Sprite local72 = (Sprite) sprites.get(local66);
if (local72 != null) { if (local72 != null) {
return local72; return local72;
@ -968,17 +968,17 @@ public final class Component {
if (this.aBoolean26) { if (this.aBoolean26) {
local85.method299(); local85.method299();
} }
if (this.anInt514 > 0) { if (this.objSelected > 0) {
local85.method298(this.anInt514); local85.method298(this.objSelected);
} }
if (this.anInt514 >= 1) { if (this.objSelected >= 1) {
local85.method303(1); local85.drawOutline(1);
} }
if (this.anInt514 >= 2) { if (this.objSelected >= 2) {
local85.method303(16777215); local85.drawOutline(16777215);
} }
if (this.anInt513 != 0) { if (this.objShadow != 0) {
local85.method314(this.anInt513); local85.drawShadow(this.objShadow);
} }
if (!GlRenderer.enabled) { if (!GlRenderer.enabled) {
local72 = local85; local72 = local85;
@ -1029,8 +1029,8 @@ public final class Component {
this.aBoolean18 = (local175 & 0x2) != 0; this.aBoolean18 = (local175 & 0x2) != 0;
this.aBoolean23 = (local175 & 0x1) != 0; this.aBoolean23 = (local175 & 0x1) != 0;
this.anInt476 = buffer.g1(); this.anInt476 = buffer.g1();
this.anInt514 = buffer.g1(); this.objSelected = buffer.g1();
this.anInt513 = buffer.g4(); this.objShadow = buffer.g4();
this.aBoolean21 = buffer.g1() == 1; this.aBoolean21 = buffer.g1() == 1;
this.aBoolean26 = buffer.g1() == 1; this.aBoolean26 = buffer.g1() == 1;
} }

View file

@ -27,7 +27,7 @@ public abstract class FrameBuffer {
@OriginalMember(owner = "client!vk", name = "a", descriptor = "(I)V") @OriginalMember(owner = "client!vk", name = "a", descriptor = "(I)V")
public final void makeTarget() { public final void makeTarget() {
SoftwareRaster.method2491(this.pixels, this.width, this.height); SoftwareRaster.setSize(this.pixels, this.width, this.height);
} }
@OriginalMember(owner = "client!vk", name = "a", descriptor = "(IIIILjava/awt/Graphics;I)V") @OriginalMember(owner = "client!vk", name = "a", descriptor = "(IIIILjava/awt/Graphics;I)V")

View file

@ -41,7 +41,7 @@ public final class GlFont extends Font {
@OriginalMember(owner = "client!dj", name = "a", descriptor = "(Lclient!cf;)V") @OriginalMember(owner = "client!dj", name = "a", descriptor = "(Lclient!cf;)V")
public static void method1188(@OriginalArg(0) GlSprite arg0) { public static void method1188(@OriginalArg(0) GlSprite arg0) {
if (arg0.height != GlRaster.anInt1441 - GlRaster.clipY) { if (arg0.height != GlRaster.clipBottom - GlRaster.clipTop) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
masked = arg0; masked = arg0;
@ -93,10 +93,10 @@ public final class GlFont extends Font {
gl.glBindTexture(GL2.GL_TEXTURE_2D, mask.textureId); 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_COMBINE_RGB, GL2.GL_REPLACE);
gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS); gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS);
@Pc(98) float maskX0 = (float) (x - GlRaster.clipX) / (float) mask.powerOfTwoWidth; @Pc(98) float maskX0 = (float) (x - GlRaster.clipLeft) / (float) mask.powerOfTwoWidth;
@Pc(107) float maskY0 = (float) (y - GlRaster.clipY) / (float) mask.powerOfTwoHeight; @Pc(107) float maskY0 = (float) (y - GlRaster.clipTop) / (float) mask.powerOfTwoHeight;
@Pc(118) float maskX1 = (float) (x + width - GlRaster.clipX) / (float) mask.powerOfTwoWidth; @Pc(118) float maskX1 = (float) (x + width - GlRaster.clipLeft) / (float) mask.powerOfTwoWidth;
@Pc(129) float maskY1 = (float) (y + height - GlRaster.clipY) / (float) mask.powerOfTwoHeight; @Pc(129) float maskY1 = (float) (y + height - GlRaster.clipTop) / (float) mask.powerOfTwoHeight;
gl.glBegin(GL2.GL_TRIANGLE_FAN); gl.glBegin(GL2.GL_TRIANGLE_FAN);
gl.glMultiTexCoord2f(GL2.GL_TEXTURE1, maskX1, maskY0); gl.glMultiTexCoord2f(GL2.GL_TEXTURE1, maskX1, maskY0);
gl.glTexCoord2f(s1, t0); gl.glTexCoord2f(s1, t0);

View file

@ -939,20 +939,20 @@ public final class GlModel extends Model {
} }
@Pc(84) int local84 = arg7 * arg3 + arg5 * arg4 >> 16; @Pc(84) int local84 = arg7 * arg3 + arg5 * arg4 >> 16;
@Pc(90) int local90 = local84 + local13 << 9; @Pc(90) int local90 = local84 + local13 << 9;
if (local90 / local53 <= Static240.screenLowerX) { if (local90 / local53 <= Rasteriser.screenLowerX) {
return; return;
} }
@Pc(102) int local102 = local84 - local13 << 9; @Pc(102) int local102 = local84 - local13 << 9;
if (local102 / local53 >= Static247.screenUpperX) { if (local102 / local53 >= Rasteriser.screenUpperX) {
return; return;
} }
@Pc(118) int local118 = arg6 * arg2 - local31 * arg1 >> 16; @Pc(118) int local118 = arg6 * arg2 - local31 * arg1 >> 16;
@Pc(132) int local132 = local118 + (local13 * arg1 + local21 * arg2 >> 16) << 9; @Pc(132) int local132 = local118 + (local13 * arg1 + local21 * arg2 >> 16) << 9;
if (local132 / local53 <= Static1.screenLowerY) { if (local132 / local53 <= Rasteriser.screenLowerY) {
return; return;
} }
@Pc(153) int local153 = local118 + (-local13 * arg1 + local17 * arg2 >> 16) << 9; @Pc(153) int local153 = local118 + (-local13 * arg1 + local17 * arg2 >> 16) << 9;
if (local153 / local53 >= Static148.screenUpperY) { if (local153 / local53 >= Rasteriser.screenUpperY) {
return; return;
} }
@Pc(161) int local161 = 0; @Pc(161) int local161 = 0;
@ -1350,7 +1350,7 @@ public final class GlModel extends Model {
@OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIIIIJ)V") @OriginalMember(owner = "client!td", name = "a", descriptor = "(IIIIIIIJ)V")
@Override @Override
public final void method4571(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) long arg6) { public final void setCamera(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) long arg6) {
if (this.anInt5296 == 0) { if (this.anInt5296 == 0) {
return; return;
} }

View file

@ -9,16 +9,16 @@ import org.openrs2.deob.annotation.Pc;
public final class GlRaster { public final class GlRaster {
@OriginalMember(owner = "client!dj", name = "b", descriptor = "I") @OriginalMember(owner = "client!dj", name = "b", descriptor = "I")
public static int clipY = 0; public static int clipTop = 0;
@OriginalMember(owner = "client!dj", name = "c", descriptor = "I") @OriginalMember(owner = "client!dj", name = "c", descriptor = "I")
public static int clipX = 0; public static int clipLeft = 0;
@OriginalMember(owner = "client!dj", name = "d", descriptor = "I") @OriginalMember(owner = "client!dj", name = "d", descriptor = "I")
private static int anInt1440 = 0; private static int clipRight = 0;
@OriginalMember(owner = "client!dj", name = "e", descriptor = "I") @OriginalMember(owner = "client!dj", name = "e", descriptor = "I")
public static int anInt1441 = 0; public static int clipBottom = 0;
@OriginalMember(owner = "client!dj", name = "a", descriptor = "(IIII)V") @OriginalMember(owner = "client!dj", name = "a", descriptor = "(IIII)V")
public static void method1174(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { public static void method1174(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
@ -50,10 +50,10 @@ public final class GlRaster {
@OriginalMember(owner = "client!dj", name = "c", descriptor = "()V") @OriginalMember(owner = "client!dj", name = "c", descriptor = "()V")
public static void method1177() { public static void method1177() {
clipX = 0; clipLeft = 0;
clipY = 0; clipTop = 0;
anInt1440 = GlRenderer.canvasWidth; clipRight = GlRenderer.canvasWidth;
anInt1441 = GlRenderer.canvasHeight; clipBottom = GlRenderer.canvasHeight;
@Pc(9) GL2 local9 = GlRenderer.gl; @Pc(9) GL2 local9 = GlRenderer.gl;
local9.glDisable(GL2.GL_SCISSOR_TEST); local9.glDisable(GL2.GL_SCISSOR_TEST);
GlFont.method1173(); GlFont.method1173();
@ -176,22 +176,22 @@ public final class GlRaster {
@OriginalMember(owner = "client!dj", name = "c", descriptor = "(IIII)V") @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) { public static void method1183(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
if (clipX < arg0) { if (clipLeft < arg0) {
clipX = arg0; clipLeft = arg0;
} }
if (clipY < arg1) { if (clipTop < arg1) {
clipY = arg1; clipTop = arg1;
} }
if (anInt1440 > arg2) { if (clipRight > arg2) {
anInt1440 = arg2; clipRight = arg2;
} }
if (anInt1441 > arg3) { if (clipBottom > arg3) {
anInt1441 = arg3; clipBottom = arg3;
} }
@Pc(21) GL2 gl = GlRenderer.gl; @Pc(21) GL2 gl = GlRenderer.gl;
gl.glEnable(GL2.GL_SCISSOR_TEST); gl.glEnable(GL2.GL_SCISSOR_TEST);
if (clipX <= anInt1440 && clipY <= anInt1441) { if (clipLeft <= clipRight && clipTop <= clipBottom) {
gl.glScissor((int)(clipX * GameShell.canvasScale + GameShell.subpixelX), (int)((GlRenderer.canvasHeight - anInt1441) * GameShell.canvasScale + GameShell.subpixelY), (int)((anInt1440 - clipX) * GameShell.canvasScale + GameShell.subpixelX), (int)((anInt1441 - clipY) * GameShell.canvasScale + GameShell.subpixelY)); gl.glScissor((int)(clipLeft * GameShell.canvasScale + GameShell.subpixelX), (int)((GlRenderer.canvasHeight - clipBottom) * GameShell.canvasScale + GameShell.subpixelY), (int)((clipRight - clipLeft) * GameShell.canvasScale + GameShell.subpixelX), (int)((clipBottom - clipTop) * GameShell.canvasScale + GameShell.subpixelY));
} else { } else {
gl.glScissor(0, 0, 0, 0); gl.glScissor(0, 0, 0, 0);
} }
@ -249,14 +249,14 @@ public final class GlRaster {
if (arg3 > GlRenderer.canvasHeight) { if (arg3 > GlRenderer.canvasHeight) {
arg3 = GlRenderer.canvasHeight; arg3 = GlRenderer.canvasHeight;
} }
clipX = arg0; clipLeft = arg0;
clipY = arg1; clipTop = arg1;
anInt1440 = arg2; clipRight = arg2;
anInt1441 = arg3; clipBottom = arg3;
@Pc(27) GL2 local27 = GlRenderer.gl; @Pc(27) GL2 local27 = GlRenderer.gl;
local27.glEnable(GL2.GL_SCISSOR_TEST); local27.glEnable(GL2.GL_SCISSOR_TEST);
if (clipX <= anInt1440 && clipY <= anInt1441) { if (clipLeft <= clipRight && clipTop <= clipBottom) {
local27.glScissor((int)(clipX * GameShell.canvasScale + GameShell.subpixelX), (int)((GlRenderer.canvasHeight - anInt1441) * GameShell.canvasScale + GameShell.subpixelY), (int)((anInt1440 - clipX) * GameShell.canvasScale + GameShell.subpixelX), (int)((anInt1441 - clipY) * GameShell.canvasScale + GameShell.subpixelY)); local27.glScissor((int)(clipLeft * GameShell.canvasScale + GameShell.subpixelX), (int)((GlRenderer.canvasHeight - clipBottom) * GameShell.canvasScale + GameShell.subpixelY), (int)((clipRight - clipLeft) * GameShell.canvasScale + GameShell.subpixelX), (int)((clipBottom - clipTop) * GameShell.canvasScale + GameShell.subpixelY));
} else { } else {
local27.glScissor(0, 0, 0, 0); local27.glScissor(0, 0, 0, 0);
} }

View file

@ -546,10 +546,10 @@ public final class GlRenderer {
gl.glRotatef(arg7, 0.0F, 1.0F, 0.0F); gl.glRotatef(arg7, 0.0F, 1.0F, 0.0F);
} }
aBoolean266 = false; aBoolean266 = false;
Static240.screenLowerX = local7; Rasteriser.screenLowerX = local7;
Static247.screenUpperX = local17; Rasteriser.screenUpperX = local17;
Static1.screenLowerY = local25; Rasteriser.screenLowerY = local25;
Static148.screenUpperY = local35; Rasteriser.screenUpperY = local35;
} }
@OriginalMember(owner = "client!tf", name = "d", descriptor = "(Z)V") @OriginalMember(owner = "client!tf", name = "d", descriptor = "(Z)V")

View file

@ -87,10 +87,10 @@ public class GlSprite extends Sprite {
local11.glBindTexture(GL2.GL_TEXTURE_2D, arg2.textureId); 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_COMBINE_RGB, GL2.GL_REPLACE);
local11.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS); local11.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_SRC0_RGB, GL2.GL_PREVIOUS);
@Pc(47) float local47 = (float) (arg0 - GlRaster.clipX) / (float) arg2.powerOfTwoWidth; @Pc(47) float local47 = (float) (arg0 - GlRaster.clipLeft) / (float) arg2.powerOfTwoWidth;
@Pc(56) float local56 = (float) (arg1 - GlRaster.clipY) / (float) arg2.powerOfTwoHeight; @Pc(56) float local56 = (float) (arg1 - GlRaster.clipTop) / (float) arg2.powerOfTwoHeight;
@Pc(68) float local68 = (float) (arg0 + this.width - GlRaster.clipX) / (float) arg2.powerOfTwoWidth; @Pc(68) float local68 = (float) (arg0 + this.width - GlRaster.clipLeft) / (float) arg2.powerOfTwoWidth;
@Pc(80) float local80 = (float) (arg1 + this.height - GlRaster.clipY) / (float) arg2.powerOfTwoHeight; @Pc(80) float local80 = (float) (arg1 + this.height - GlRaster.clipTop) / (float) arg2.powerOfTwoHeight;
@Pc(85) int local85 = arg0 + this.anInt1863; @Pc(85) int local85 = arg0 + this.anInt1863;
@Pc(90) int local90 = arg1 + this.anInt1861; @Pc(90) int local90 = arg1 + this.anInt1861;
local11.glBegin(GL2.GL_TRIANGLE_FAN); local11.glBegin(GL2.GL_TRIANGLE_FAN);
@ -207,7 +207,7 @@ public class GlSprite extends Sprite {
@OriginalMember(owner = "client!cf", name = "d", descriptor = "(II)V") @OriginalMember(owner = "client!cf", name = "d", descriptor = "(II)V")
@Override @Override
public final void renderHorizontalFlipTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { public final void renderHorizontalFlip(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
GlRenderer.method4149(); GlRenderer.method4149();
@Pc(5) int local5 = arg0 + this.anInt1863; @Pc(5) int local5 = arg0 + this.anInt1863;
@Pc(10) int local10 = arg1 + this.anInt1861; @Pc(10) int local10 = arg1 + this.anInt1861;
@ -232,7 +232,7 @@ public class GlSprite extends Sprite {
@OriginalMember(owner = "client!cf", name = "e", descriptor = "(II)V") @OriginalMember(owner = "client!cf", name = "e", descriptor = "(II)V")
@Override @Override
public final void renderTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { public final void render(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
GlRenderer.method4149(); GlRenderer.method4149();
@Pc(5) int local5 = arg0 + this.anInt1863; @Pc(5) int local5 = arg0 + this.anInt1863;
@Pc(10) int local10 = arg1 + this.anInt1861; @Pc(10) int local10 = arg1 + this.anInt1861;
@ -261,7 +261,7 @@ public class GlSprite extends Sprite {
@OriginalMember(owner = "client!cf", name = "a", descriptor = "(IIII)V") @OriginalMember(owner = "client!cf", name = "a", descriptor = "(IIII)V")
@Override @Override
public final void renderResizedTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { public final void renderResized(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
if (arg2 <= 0 || arg3 <= 0) { if (arg2 <= 0 || arg3 <= 0) {
return; return;
} }
@ -479,7 +479,7 @@ public class GlSprite extends Sprite {
@OriginalMember(owner = "client!cf", name = "a", descriptor = "(III)V") @OriginalMember(owner = "client!cf", name = "a", descriptor = "(III)V")
@Override @Override
public final void method1417(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { public final void renderAlpha(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
GlRenderer.method4155(); GlRenderer.method4155();
@Pc(5) int local5 = arg0 + this.anInt1863; @Pc(5) int local5 = arg0 + this.anInt1863;
@Pc(10) int local10 = arg1 + this.anInt1861; @Pc(10) int local10 = arg1 + this.anInt1861;

View file

@ -27,7 +27,7 @@ public final class Inv extends Node {
} }
@Pc(17) Inv local17 = (Inv) objectContainerCache.get((long) arg0); @Pc(17) Inv local17 = (Inv) objectContainerCache.get((long) arg0);
if (local17 == null) { if (local17 == null) {
return InvTypeList.list(arg0).size; return InvTypeList.get(arg0).size;
} }
@Pc(31) int freeSpaces = 0; @Pc(31) int freeSpaces = 0;
for (@Pc(33) int id = 0; id < local17.objectIds.length; id++) { for (@Pc(33) int id = 0; id < local17.objectIds.length; id++) {
@ -35,7 +35,7 @@ public final class Inv extends Node {
freeSpaces++; freeSpaces++;
} }
} }
return freeSpaces + InvTypeList.list(arg0).size - local17.objectIds.length; return freeSpaces + InvTypeList.get(arg0).size - local17.objectIds.length;
} }
@OriginalMember(owner = "client!od", name = "a", descriptor = "(IZII)I") @OriginalMember(owner = "client!od", name = "a", descriptor = "(IZII)I")
@ -117,4 +117,149 @@ public final class Inv extends Node {
public static void method2073() { public static void method2073() {
objectContainerCache = new HashTable(32); objectContainerCache = new HashTable(32);
} }
@OriginalMember(owner = "client!wl", name = "a", descriptor = "(IIIIB)V")
public static void updateContainer(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
@Pc(12) Inv local12 = (Inv) objectContainerCache.get((long) arg3);
if (local12 == null) {
local12 = new Inv();
objectContainerCache.put(local12, (long) arg3);
}
if (arg1 >= local12.objectIds.length) {
@Pc(39) int[] local39 = new int[arg1 + 1];
@Pc(44) int[] local44 = new int[arg1 + 1];
@Pc(46) int local46;
for (local46 = 0; local46 < local12.objectIds.length; local46++) {
local39[local46] = local12.objectIds[local46];
local44[local46] = local12.anIntArray422[local46];
}
for (local46 = local12.objectIds.length; local46 < arg1; local46++) {
local39[local46] = -1;
local44[local46] = 0;
}
local12.objectIds = local39;
local12.anIntArray422 = local44;
}
local12.objectIds[arg1] = arg0;
local12.anIntArray422[arg1] = arg2;
}
@OriginalMember(owner = "client!pf", name = "a", descriptor = "(IIZIII)Lclient!qf;")
public static Sprite getObjectSprite(@OriginalArg(0) int selected, @OriginalArg(1) int id, @OriginalArg(2) boolean drawText, @OriginalArg(3) int count, @OriginalArg(4) int shadow) {
@Pc(27) int key = (drawText ? 65536 : 0) + id + (selected << 17) + (shadow << 19);
@Pc(37) long uid = (long) key * 3849834839L + (long) count * 3147483667L;
@Pc(43) Sprite sprite = (Sprite) ObjTypeList.objectSpriteCache.get(uid);
if (sprite != null) {
return sprite;
}
Rasteriser.textureHasTransparency = false;
sprite = renderObjectSprite(shadow, false, id, drawText, selected, count, false);
if (sprite != null && !Rasteriser.textureHasTransparency) {
ObjTypeList.objectSpriteCache.put(sprite, uid);
}
return sprite;
}
@OriginalMember(owner = "client!na", name = "a", descriptor = "(IBZIZIIZ)Lclient!qf;")
public static Sprite renderObjectSprite(@OriginalArg(0) int shadow, @OriginalArg(2) boolean linked, @OriginalArg(3) int id, @OriginalArg(4) boolean drawText, @OriginalArg(5) int state, @OriginalArg(6) int stack, @OriginalArg(7) boolean cert) {
@Pc(5) ObjType objType = ObjTypeList.get(id);
if (stack > 1 && objType.countObj != null) {
@Pc(15) int stackId = -1;
for (@Pc(17) int i = 0; i < 10; i++) {
if (stack >= objType.countCount[i] && objType.countCount[i] != 0) {
stackId = objType.countObj[i];
}
}
if (stackId != -1) {
objType = ObjTypeList.get(stackId);
}
}
@Pc(60) SoftwareModel model = objType.getInvModel();
if (model == null) {
return null;
}
@Pc(71) SoftwareSprite linkedSprite = null;
if (objType.certificateTemplate != -1) {
linkedSprite = (SoftwareSprite) renderObjectSprite(0, true, objType.certificateLink, false, 1, 10, true);
if (linkedSprite == null) {
return null;
}
} else if (objType.lentTemplate != -1) {
linkedSprite = (SoftwareSprite) renderObjectSprite(shadow, true, objType.lentLink, false, state, stack, false);
if (linkedSprite == null) {
return null;
}
}
@Pc(118) int[] pixels = SoftwareRaster.pixels;
@Pc(120) int width = SoftwareRaster.width;
@Pc(122) int height = SoftwareRaster.height;
@Pc(125) int[] clip = new int[4];
SoftwareRaster.saveClip(clip);
final int canvasWidth = 36;
final int canvasHeight = 32;
@Pc(133) SoftwareSprite canvas = new SoftwareSprite(canvasWidth, canvasHeight);
SoftwareRaster.setSize(canvas.pixels, canvasWidth, canvasHeight);
Rasteriser.prepare();
Rasteriser.setBounds(canvasWidth / 2, canvasHeight / 2);
Rasteriser.jagged = false;
@Pc(145) int zoom = objType.zoom2d; // / 4;
if (cert) {
zoom = (int) ((double) zoom * 1.5D);
} else if (state == 2) {
zoom = (int) ((double) zoom * 1.04D);
}
@Pc(176) int pitchcos = MathUtils.cos[objType.xAngle2d] * zoom >> 16;
@Pc(185) int pitchsin = MathUtils.sin[objType.xAngle2d] * zoom >> 16;
model.setCamera(objType.yAngle2d, objType.zAngle2d, objType.xAngle2d, objType.xOffset2d, pitchsin + objType.yOffset2d - model.getMaxY() / 2, objType.yOffset2d + pitchcos, -1L);
if (state >= 1) {
canvas.drawOutline(1);
if (state >= 2) {
canvas.drawOutline(16777215);
}
SoftwareRaster.setSize(canvas.pixels, canvasWidth, canvasHeight);
}
if (shadow != 0) {
canvas.drawShadow(shadow);
}
if (objType.certificateTemplate != -1) {
linkedSprite.render(0, 0);
} else if (objType.lentTemplate != -1) {
SoftwareRaster.setSize(linkedSprite.pixels, canvasWidth, canvasHeight);
canvas.render(0, 0);
canvas = linkedSprite;
}
if (drawText && (objType.stackable == 1 || stack != 1) && stack != -1) {
ObjTypeList.font.renderLeft(formatObjAmount(stack), 0, 9, 16776960, 1);
}
SoftwareRaster.setSize(pixels, width, height);
SoftwareRaster.restoreClip(clip);
Rasteriser.prepare();
Rasteriser.jagged = true;
return GlRenderer.enabled && !linked ? new GlSprite(canvas) : canvas;
}
@OriginalMember(owner = "client!eb", name = "b", descriptor = "(II)Lclient!na;")
public static JagString formatObjAmount(@OriginalArg(1) int arg0) {
if (arg0 < 100000) {
return JagString.concatenate(new JagString[] { Static52.aClass100_559, JagString.parseInt(arg0), Static52.aClass100_594 });
} else if (arg0 >= 10000000) {
return JagString.concatenate(new JagString[] { Static52.aClass100_819, JagString.parseInt(arg0 / 1000000), LocalizedText.MILLION, Static52.aClass100_594 });
} else {
return JagString.concatenate(new JagString[] { Static52.aClass100_637, JagString.parseInt(arg0 / 1000), LocalizedText.THOUSAND, Static52.aClass100_594 });
}
}
} }

View file

@ -16,7 +16,7 @@ public class InvTypeList {
} }
@OriginalMember(owner = "client!u", name = "a", descriptor = "(II)Lclient!md;") @OriginalMember(owner = "client!u", name = "a", descriptor = "(II)Lclient!md;")
public static InvType list(@OriginalArg(0) int id) { public static InvType get(@OriginalArg(0) int id) {
@Pc(16) InvType invType = (InvType) types.get((long) id); @Pc(16) InvType invType = (InvType) types.get((long) id);
if (invType != null) { if (invType != null) {
return invType; return invType;

View file

@ -11,7 +11,7 @@ public class LoadingBar {
if (GlRenderer.enabled || arg0) { if (GlRenderer.enabled || arg0) {
local9 = GameShell.canvasHeight; local9 = GameShell.canvasHeight;
@Pc(15) int local15 = local9 * 956 / 503; @Pc(15) int local15 = local9 * 956 / 503;
TitleScreen.titleBg.renderResizedTransparent((GameShell.canvasWidth - local15) / 2, 0, local15, local9); TitleScreen.titleBg.renderResized((GameShell.canvasWidth - local15) / 2, 0, local15, local9);
TitleScreen.logo.renderTransparent(GameShell.canvasWidth / 2 - TitleScreen.logo.width / 2, 18); TitleScreen.logo.renderTransparent(GameShell.canvasWidth / 2 - TitleScreen.logo.width / 2, 18);
} }
arg1.renderCenter(LocalizedText.GAME0_LOADING, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 - 26, 16777215, -1); arg1.renderCenter(LocalizedText.GAME0_LOADING, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 - 26, 16777215, -1);

View file

@ -212,18 +212,18 @@ public class MiniMap {
public static void render(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Component arg3) { public static void render(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Component arg3) {
client.audioLoop(); client.audioLoop();
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.setClip(arg2, arg1, arg2 + arg3.anInt445, arg1 + arg3.anInt459); GlRaster.setClip(arg2, arg1, arg2 + arg3.width, arg1 + arg3.height);
} else { } else {
SoftwareRaster.setClip(arg2, arg1, arg2 + arg3.anInt445, arg1 + arg3.anInt459); SoftwareRaster.setClip(arg2, arg1, arg2 + arg3.width, arg1 + arg3.height);
} }
if (state != 2 && state != 5 && sprite != null) { if (state != 2 && state != 5 && sprite != null) {
@Pc(48) int local48 = Static59.anInt1814 + (int)Camera.yawTarget & 0x7FF; @Pc(48) int local48 = Static59.anInt1814 + (int)Camera.yawTarget & 0x7FF;
@Pc(57) int local57 = PlayerList.self.xFine / 32 + 48; @Pc(57) int local57 = PlayerList.self.xFine / 32 + 48;
@Pc(67) int local67 = 464 - PlayerList.self.zFine / 32; @Pc(67) int local67 = 464 - PlayerList.self.zFine / 32;
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
((GlSprite) sprite).renderRotatedTransparent(arg2, arg1, arg3.anInt445, arg3.anInt459, local57, local67, local48, anInt4130 + 256, (GlSprite) arg3.method489(false)); ((GlSprite) sprite).renderRotatedTransparent(arg2, arg1, arg3.width, arg3.height, local57, local67, local48, anInt4130 + 256, (GlSprite) arg3.method489(false));
} else { } else {
((SoftwareSprite) sprite).renderRotatedTransparent(arg2, arg1, arg3.anInt445, arg3.anInt459, local57, local67, local48, anInt4130 + 256, arg3.anIntArray37, arg3.anIntArray45); ((SoftwareSprite) sprite).renderRotated(arg2, arg1, arg3.width, arg3.height, local57, local67, local48, anInt4130 + 256, arg3.anIntArray37, arg3.anIntArray45);
} }
@Pc(146) int local146; @Pc(146) int local146;
@Pc(181) int local181; @Pc(181) int local181;
@ -253,7 +253,7 @@ public class MiniMap {
local231 = local164 * local181 + local189 * local146 >> 16; local231 = local164 * local181 + local189 * local146 >> 16;
local239 = local156.method2856(Static235.mapElementList.aClass100Array153[local117], 100); local239 = local156.method2856(Static235.mapElementList.aClass100Array153[local117], 100);
@Pc(245) int local245 = local231 - local239 / 2; @Pc(245) int local245 = local231 - local239 / 2;
if (local245 >= -arg3.anInt445 && local245 <= arg3.anInt445 && local200 >= -arg3.anInt459 && local200 <= arg3.anInt459) { if (local245 >= -arg3.width && local245 <= arg3.width && local200 >= -arg3.height && local200 <= arg3.height) {
local271 = 16777215; local271 = 16777215;
if (Static235.mapElementList.anIntArray444[local117] != -1) { if (Static235.mapElementList.anIntArray444[local117] != -1) {
local271 = Static235.mapElementList.anIntArray444[local117]; local271 = Static235.mapElementList.anIntArray444[local117];
@ -263,7 +263,7 @@ public class MiniMap {
} else { } else {
SoftwareRaster.method2486(arg3.anIntArray37, arg3.anIntArray45); SoftwareRaster.method2486(arg3.anIntArray37, arg3.anIntArray45);
} }
local156.renderParagraphAlpha(Static235.mapElementList.aClass100Array153[local117], arg2 + local245 + arg3.anInt445 / 2, arg1 + arg3.anInt459 / 2 + -local200, local239, 50, local271, 0, 1, 0, 0); local156.renderParagraphAlpha(Static235.mapElementList.aClass100Array153[local117], arg2 + local245 + arg3.width / 2, arg1 + arg3.height / 2 + -local200, local239, 50, local271, 0, 1, 0, 0);
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlFont.method1173(); GlFont.method1173();
} else { } else {
@ -381,14 +381,14 @@ public class MiniMap {
method1446(arg3, Sprites.mapflags, local181, local146, arg1, arg2); method1446(arg3, Sprites.mapflags, local181, local146, arg1, arg2);
} }
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.method1186(arg2 + arg3.anInt445 / 2 - 1, arg1 + -1 - -(arg3.anInt459 / 2), 3, 3, 16777215); GlRaster.method1186(arg2 + arg3.width / 2 - 1, arg1 + -1 - -(arg3.height / 2), 3, 3, 16777215);
} else { } else {
SoftwareRaster.fillRect(arg3.anInt445 / 2 + arg2 - 1, arg3.anInt459 / 2 + -1 + arg1, 3, 3, 16777215); SoftwareRaster.fillRect(arg3.width / 2 + arg2 - 1, arg3.height / 2 + -1 + arg1, 3, 3, 16777215);
} }
} else if (GlRenderer.enabled) { } else if (GlRenderer.enabled) {
@Pc(1041) Sprite local1041 = arg3.method489(false); @Pc(1041) Sprite local1041 = arg3.method489(false);
if (local1041 != null) { if (local1041 != null) {
local1041.renderTransparent(arg2, arg1); local1041.render(arg2, arg1);
} }
} else { } else {
SoftwareRaster.method2504(arg2, arg1, arg3.anIntArray37, arg3.anIntArray45); SoftwareRaster.method2504(arg2, arg1, arg3.anIntArray37, arg3.anIntArray45);
@ -403,7 +403,7 @@ public class MiniMap {
} }
@Pc(21) int local21 = arg3 * arg3 + arg2 * arg2; @Pc(21) int local21 = arg3 * arg3 + arg2 * arg2;
@Pc(27) int local27 = Static59.anInt1814 + (int)Camera.yawTarget & 0x7FF; @Pc(27) int local27 = Static59.anInt1814 + (int)Camera.yawTarget & 0x7FF;
@Pc(39) int local39 = Math.max(arg0.anInt445 / 2, arg0.anInt459 / 2) + 10; @Pc(39) int local39 = Math.max(arg0.width / 2, arg0.height / 2) + 10;
if (local39 * local39 < local21) { if (local39 * local39 < local21) {
return; return;
} }
@ -414,9 +414,9 @@ public class MiniMap {
@Pc(81) int local81 = local58 * arg2 + arg3 * local70 >> 16; @Pc(81) int local81 = local58 * arg2 + arg3 * local70 >> 16;
@Pc(92) int local92 = local70 * arg2 - arg3 * local58 >> 16; @Pc(92) int local92 = local70 * arg2 - arg3 * local58 >> 16;
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
((GlSprite) arg1).method1425(arg0.anInt445 / 2 + arg5 + local81 - arg1.anInt1860 / 2, arg0.anInt459 / 2 + arg4 - (local92 + arg1.anInt1866 / 2), (GlSprite) arg0.method489(false)); ((GlSprite) arg1).method1425(arg0.width / 2 + arg5 + local81 - arg1.anInt1860 / 2, arg0.height / 2 + arg4 - (local92 + arg1.anInt1866 / 2), (GlSprite) arg0.method489(false));
} else { } else {
((SoftwareSprite) arg1).method312(arg0.anInt445 / 2 + arg5 + local81 - arg1.anInt1860 / 2, -(arg1.anInt1866 / 2) + arg0.anInt459 / 2 + arg4 + -local92, arg0.anIntArray37, arg0.anIntArray45); ((SoftwareSprite) arg1).method312(arg0.width / 2 + arg5 + local81 - arg1.anInt1860 / 2, -(arg1.anInt1866 / 2) + arg0.height / 2 + arg4 + -local92, arg0.anIntArray37, arg0.anIntArray45);
} }
} }
} }

View file

@ -1051,10 +1051,10 @@ public class MiniMenu {
@Pc(15) int local15; @Pc(15) int local15;
@Pc(47) int x; @Pc(47) int x;
if (anInt5014 == 0) { if (anInt5014 == 0) {
@Pc(13) int local13 = Static148.screenUpperY; @Pc(13) int local13 = Rasteriser.screenUpperY;
local15 = Static1.screenLowerY; local15 = Rasteriser.screenLowerY;
@Pc(17) int local17 = Static247.screenUpperX; @Pc(17) int local17 = Rasteriser.screenUpperX;
@Pc(19) int local19 = Static240.screenLowerX; @Pc(19) int local19 = Rasteriser.screenLowerX;
@Pc(33) int local33 = (arg5 - arg3) * (local17 - local19) / arg1 + local19; @Pc(33) int local33 = (arg5 - arg3) * (local17 - local19) / arg1 + local19;
x = local15 + (local13 - local15) * (arg4 - arg0) / arg2; x = local15 + (local13 - local15) * (arg4 - arg0) / arg2;
if (Static241.aBoolean302 && (anInt4999 & 0x40) != 0) { if (Static241.aBoolean302 && (anInt4999 & 0x40) != 0) {

View file

@ -314,7 +314,7 @@ public abstract class Model extends Entity {
} }
@OriginalMember(owner = "client!ak", name = "a", descriptor = "(IIIIIIIJ)V") @OriginalMember(owner = "client!ak", name = "a", descriptor = "(IIIIIIIJ)V")
public abstract void method4571(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) long arg6); public abstract void setCamera(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) long arg6);
@OriginalMember(owner = "client!ak", name = "c", descriptor = "(ZZZ)Lclient!ak;") @OriginalMember(owner = "client!ak", name = "c", descriptor = "(ZZZ)Lclient!ak;")
public abstract Model method4572(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2); public abstract Model method4572(@OriginalArg(0) boolean arg0, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2);

View file

@ -16,7 +16,7 @@ public class ObjTypeList {
@OriginalMember(owner = "client!sj", name = "r", descriptor = "Lclient!ve;") @OriginalMember(owner = "client!sj", name = "r", descriptor = "Lclient!ve;")
public static Js5 modelsArchive; public static Js5 modelsArchive;
@OriginalMember(owner = "client!um", name = "U", descriptor = "Lclient!dd;") @OriginalMember(owner = "client!um", name = "U", descriptor = "Lclient!dd;")
public static SoftwareFont aClass3_Sub2_Sub9_Sub1_1; public static SoftwareFont font;
@OriginalMember(owner = "client!wa", name = "X", descriptor = "[Lclient!na;") @OriginalMember(owner = "client!wa", name = "X", descriptor = "[Lclient!na;")
public static JagString[] aClass100Array87 = null; public static JagString[] aClass100Array87 = null;
@OriginalMember(owner = "client!ld", name = "g", descriptor = "[Lclient!na;") @OriginalMember(owner = "client!ld", name = "g", descriptor = "[Lclient!na;")
@ -35,7 +35,7 @@ public class ObjTypeList {
anInt3245 = archive.getGroupCapacity(local23) + local23 * 256; anInt3245 = archive.getGroupCapacity(local23) + local23 * 256;
aClass100Array104 = new JagString[] { null, null, null, null, LocalizedText.DROP}; aClass100Array104 = new JagString[] { null, null, null, null, LocalizedText.DROP};
aClass100Array87 = new JagString[] { null, null, LocalizedText.TAKE, null, null }; aClass100Array87 = new JagString[] { null, null, LocalizedText.TAKE, null, null };
aClass3_Sub2_Sub9_Sub1_1 = arg1; font = arg1;
} }
@OriginalMember(owner = "client!fk", name = "a", descriptor = "(IB)Lclient!h;") @OriginalMember(owner = "client!fk", name = "a", descriptor = "(IB)Lclient!h;")

View file

@ -2047,7 +2047,7 @@ public class Protocol {
component.objTypes[slot] = amount; component.objTypes[slot] = amount;
component.objCounts[slot] = id; component.objCounts[slot] = id;
} }
Static280.updateContainer(amount - 1, slot, id, containerId); Inv.updateContainer(amount - 1, slot, id, containerId);
} }
if (component != null) { if (component != null) {
InterfaceList.redraw(component); InterfaceList.redraw(component);
@ -2257,7 +2257,7 @@ public class Protocol {
component.objTypes[slot] = itemId; component.objTypes[slot] = itemId;
component.objCounts[slot] = amount; component.objCounts[slot] = amount;
} }
Static280.updateContainer(itemId - 1, slot, amount, containerId); Inv.updateContainer(itemId - 1, slot, amount, containerId);
} }
if (component != null) { if (component != null) {
InterfaceList.redraw(component); InterfaceList.redraw(component);
@ -2607,8 +2607,8 @@ public class Protocol {
component = InterfaceList.getComponent(i); component = InterfaceList.getComponent(i);
x = change.intArg1; x = change.intArg1;
if (component != null && component.type == 0) { if (component != null && component.type == 0) {
if (x > component.anInt491 - component.anInt459) { if (x > component.anInt491 - component.height) {
x = component.anInt491 - component.anInt459; x = component.anInt491 - component.height;
} }
if (x < 0) { if (x < 0) {
x = 0; x = 0;

View file

@ -12,6 +12,18 @@ public final class Rasteriser {
@OriginalMember(owner = "client!hf", name = "e", descriptor = "Lclient!m;") @OriginalMember(owner = "client!hf", name = "e", descriptor = "Lclient!m;")
public static TextureProvider textureProvider; public static TextureProvider textureProvider;
@OriginalMember(owner = "client!tg", name = "c", descriptor = "I")
public static int screenLowerX;
@OriginalMember(owner = "client!ub", name = "m", descriptor = "I")
public static int screenUpperX;
@OriginalMember(owner = "client!a", name = "g", descriptor = "I")
public static int screenLowerY;
@OriginalMember(owner = "client!li", name = "x", descriptor = "I")
public static int screenUpperY;
@OriginalMember(owner = "client!hf", name = "k", descriptor = "I") @OriginalMember(owner = "client!hf", name = "k", descriptor = "I")
private static int height; private static int height;
@ -1313,10 +1325,10 @@ public final class Rasteriser {
public static void prepareOffsets() { public static void prepareOffsets() {
centerX = width / 2; centerX = width / 2;
centerY = height / 2; centerY = height / 2;
Static240.screenLowerX = -centerX; screenLowerX = -centerX;
Static247.screenUpperX = width - centerX; screenUpperX = width - centerX;
Static1.screenLowerY = -centerY; screenLowerY = -centerY;
Static148.screenUpperY = height - centerY; screenUpperY = height - centerY;
} }
@OriginalMember(owner = "client!hf", name = "a", descriptor = "([I[IIIIIIIIIIIIII)V") @OriginalMember(owner = "client!hf", name = "a", descriptor = "([I[IIIIIIIIIIIIII)V")
@ -2520,10 +2532,10 @@ public final class Rasteriser {
@Pc(13) int left = offset - top * SoftwareRaster.width; @Pc(13) int left = offset - top * SoftwareRaster.width;
centerX = right - left; centerX = right - left;
centerY = bottom - top; centerY = bottom - top;
Static240.screenLowerX = -centerX; screenLowerX = -centerX;
Static247.screenUpperX = width - centerX; screenUpperX = width - centerX;
Static1.screenLowerY = -centerY; screenLowerY = -centerY;
Static148.screenUpperY = height - centerY; screenUpperY = height - centerY;
} }
@OriginalMember(owner = "client!hf", name = "a", descriptor = "([IIIIIIII)V") @OriginalMember(owner = "client!hf", name = "a", descriptor = "([IIIIIIII)V")

View file

@ -503,15 +503,15 @@ public final class ScriptRunner {
if (opcode == 1100) { if (opcode == 1100) {
isp -= 2; isp -= 2;
component.anInt489 = intStack[isp]; component.anInt489 = intStack[isp];
if (component.anInt489 > component.anInt486 - component.anInt445) { if (component.anInt489 > component.anInt486 - component.width) {
component.anInt489 = component.anInt486 - component.anInt445; component.anInt489 = component.anInt486 - component.width;
} }
if (component.anInt489 < 0) { if (component.anInt489 < 0) {
component.anInt489 = 0; component.anInt489 = 0;
} }
component.scrollY = intStack[isp + 1]; component.scrollY = intStack[isp + 1];
if (component.scrollY > component.anInt491 - component.anInt459) { if (component.scrollY > component.anInt491 - component.height) {
component.scrollY = component.anInt491 - component.anInt459; component.scrollY = component.anInt491 - component.height;
} }
if (component.scrollY < 0) { if (component.scrollY < 0) {
component.scrollY = 0; component.scrollY = 0;
@ -647,13 +647,13 @@ public final class ScriptRunner {
} }
if (opcode == 1116) { if (opcode == 1116) {
isp--; isp--;
component.anInt514 = intStack[isp]; component.objSelected = intStack[isp];
InterfaceList.redraw(component); InterfaceList.redraw(component);
continue; continue;
} }
if (opcode == 1117) { if (opcode == 1117) {
isp--; isp--;
component.anInt513 = intStack[isp]; component.objShadow = intStack[isp];
InterfaceList.redraw(component); InterfaceList.redraw(component);
continue; continue;
} }
@ -739,9 +739,9 @@ public final class ScriptRunner {
component.modelZoom = component.modelZoom * 32 / component.baseWidth; component.modelZoom = component.modelZoom * 32 / component.baseWidth;
} }
if (opcode == 1205) { if (opcode == 1205) {
component.aBoolean31 = false; component.objDrawText = false;
} else { } else {
component.aBoolean31 = true; component.objDrawText = true;
} }
} }
continue; continue;
@ -973,11 +973,11 @@ public final class ScriptRunner {
continue; continue;
} }
if (opcode == 1502) { if (opcode == 1502) {
intStack[isp++] = component.anInt445; intStack[isp++] = component.width;
continue; continue;
} }
if (opcode == 1503) { if (opcode == 1503) {
intStack[isp++] = component.anInt459; intStack[isp++] = component.height;
continue; continue;
} }
if (opcode == 1504) { if (opcode == 1504) {
@ -1097,11 +1097,11 @@ public final class ScriptRunner {
continue; continue;
} }
if (opcode == 2502) { if (opcode == 2502) {
intStack[isp++] = component.anInt445; intStack[isp++] = component.width;
continue; continue;
} }
if (opcode == 2503) { if (opcode == 2503) {
intStack[isp++] = component.anInt459; intStack[isp++] = component.height;
continue; continue;
} }
if (opcode == 2504) { if (opcode == 2504) {
@ -1369,7 +1369,7 @@ public final class ScriptRunner {
if (opcode == 3304) { if (opcode == 3304) {
isp--; isp--;
int1 = intStack[isp]; int1 = intStack[isp];
intStack[isp++] = InvTypeList.list(int1).size; intStack[isp++] = InvTypeList.get(int1).size;
continue; continue;
} }
if (opcode == 3305) { if (opcode == 3305) {
@ -3631,7 +3631,7 @@ public final class ScriptRunner {
continue; continue;
} }
if (opcode == 6203) { if (opcode == 6203) {
Static115.method2314(Static280.aClass13_26.anInt445, 0, Static280.aClass13_26.anInt459, 0, false); Static115.method2314(Static280.aClass13_26.width, 0, Static280.aClass13_26.height, 0, false);
intStack[isp++] = Static166.anInt4055; intStack[isp++] = Static166.anInt4055;
intStack[isp++] = Static245.anInt5377; intStack[isp++] = Static245.anInt5377;
continue; continue;

View file

@ -144,7 +144,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite {
@OriginalMember(owner = "client!am", name = "e", descriptor = "(II)V") @OriginalMember(owner = "client!am", name = "e", descriptor = "(II)V")
@Override @Override
public final void renderTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { public final void render(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
arg0 += this.anInt1863; arg0 += this.anInt1863;
arg1 += this.anInt1861; arg1 += this.anInt1861;
@Pc(15) int local15 = arg0 + arg1 * SoftwareRaster.width; @Pc(15) int local15 = arg0 + arg1 * SoftwareRaster.width;
@ -670,7 +670,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite {
@OriginalMember(owner = "client!am", name = "a", descriptor = "(IIIIIIII[I[I)V") @OriginalMember(owner = "client!am", name = "a", descriptor = "(IIIIIIII[I[I)V")
@Override @Override
public final void renderRotatedTransparent(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(7) int zoom, @OriginalArg(8) int[] lineStarts, @OriginalArg(9) int[] arg9) { public final void renderRotated(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(7) int zoom, @OriginalArg(8) int[] lineStarts, @OriginalArg(9) int[] arg9) {
try { try {
@Pc(4) int local4 = -w / 2; @Pc(4) int local4 = -w / 2;
@Pc(9) int local9 = -h / 2; @Pc(9) int local9 = -h / 2;
@ -705,7 +705,7 @@ public final class SoftwareAlphaSprite extends SoftwareSprite {
@OriginalMember(owner = "client!am", name = "b", descriptor = "(IIIIIIII[I[I)V") @OriginalMember(owner = "client!am", name = "b", descriptor = "(IIIIIIII[I[I)V")
@Override @Override
public final void renderRotatedTransparent(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(8) int[] lineStart, @OriginalArg(9) int[] lineWidth) { public final void renderRotated(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(8) int[] lineStart, @OriginalArg(9) int[] lineWidth) {
try { try {
@Pc(4) int local4 = -w / 2; @Pc(4) int local4 = -w / 2;
@Pc(9) int local9 = -h / 2; @Pc(9) int local9 = -h / 2;
@ -798,8 +798,8 @@ public final class SoftwareAlphaSprite extends SoftwareSprite {
@OriginalMember(owner = "client!am", name = "a", descriptor = "(IIII)V") @OriginalMember(owner = "client!am", name = "a", descriptor = "(IIII)V")
@Override @Override
public final void renderResizedTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { public final void renderResized(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int width, @OriginalArg(3) int height) {
if (arg2 <= 0 || arg3 <= 0) { if (width <= 0 || height <= 0) {
return; return;
} }
@Pc(7) int local7 = this.width; @Pc(7) int local7 = this.width;
@ -808,55 +808,55 @@ public final class SoftwareAlphaSprite extends SoftwareSprite {
@Pc(14) int local14 = 0; @Pc(14) int local14 = 0;
@Pc(17) int local17 = this.anInt1860; @Pc(17) int local17 = this.anInt1860;
@Pc(20) int local20 = this.anInt1866; @Pc(20) int local20 = this.anInt1866;
@Pc(26) int local26 = (local17 << 16) / arg2; @Pc(26) int local26 = (local17 << 16) / width;
@Pc(32) int local32 = (local20 << 16) / arg3; @Pc(32) int local32 = (local20 << 16) / height;
@Pc(46) int local46; @Pc(46) int local46;
if (this.anInt1863 > 0) { if (this.anInt1863 > 0) {
local46 = ((this.anInt1863 << 16) + local26 - 1) / local26; local46 = ((this.anInt1863 << 16) + local26 - 1) / local26;
arg0 += local46; x += local46;
local12 = local46 * local26 - (this.anInt1863 << 16); local12 = local46 * local26 - (this.anInt1863 << 16);
} }
if (this.anInt1861 > 0) { if (this.anInt1861 > 0) {
local46 = ((this.anInt1861 << 16) + local32 - 1) / local32; local46 = ((this.anInt1861 << 16) + local32 - 1) / local32;
arg1 += local46; y += local46;
local14 = local46 * local32 - (this.anInt1861 << 16); local14 = local46 * local32 - (this.anInt1861 << 16);
} }
if (local7 < local17) { if (local7 < local17) {
arg2 = ((local7 << 16) + local26 - local12 - 1) / local26; width = ((local7 << 16) + local26 - local12 - 1) / local26;
} }
if (local10 < local20) { if (local10 < local20) {
arg3 = ((local10 << 16) + local32 - local14 - 1) / local32; height = ((local10 << 16) + local32 - local14 - 1) / local32;
} }
local46 = arg0 + arg1 * SoftwareRaster.width; local46 = x + y * SoftwareRaster.width;
@Pc(130) int local130 = SoftwareRaster.width - arg2; @Pc(130) int local130 = SoftwareRaster.width - width;
if (arg1 + arg3 > SoftwareRaster.clipBottom) { if (y + height > SoftwareRaster.clipBottom) {
arg3 -= arg1 + arg3 - SoftwareRaster.clipBottom; height -= y + height - SoftwareRaster.clipBottom;
} }
@Pc(150) int local150; @Pc(150) int local150;
if (arg1 < SoftwareRaster.clipTop) { if (y < SoftwareRaster.clipTop) {
local150 = SoftwareRaster.clipTop - arg1; local150 = SoftwareRaster.clipTop - y;
arg3 -= local150; height -= local150;
local46 += local150 * SoftwareRaster.width; local46 += local150 * SoftwareRaster.width;
local14 += local32 * local150; local14 += local32 * local150;
} }
if (arg0 + arg2 > SoftwareRaster.clipRight) { if (x + width > SoftwareRaster.clipRight) {
local150 = arg0 + arg2 - SoftwareRaster.clipRight; local150 = x + width - SoftwareRaster.clipRight;
arg2 -= local150; width -= local150;
local130 += local150; local130 += local150;
} }
if (arg0 < SoftwareRaster.clipLeft) { if (x < SoftwareRaster.clipLeft) {
local150 = SoftwareRaster.clipLeft - arg0; local150 = SoftwareRaster.clipLeft - x;
arg2 -= local150; width -= local150;
local46 += local150; local46 += local150;
local12 += local26 * local150; local12 += local26 * local150;
local130 += local150; local130 += local150;
} }
method321(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, arg2, arg3, local26, local32, local7); method321(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, width, height, local26, local32, local7);
} }
@OriginalMember(owner = "client!am", name = "d", descriptor = "(II)V") @OriginalMember(owner = "client!am", name = "d", descriptor = "(II)V")
@Override @Override
public final void renderHorizontalFlipTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { public final void renderHorizontalFlip(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
arg0 += this.anInt1860 - this.width - this.anInt1863; arg0 += this.anInt1860 - this.width - this.anInt1863;
arg1 += this.anInt1861; arg1 += this.anInt1861;
@Pc(21) int local21 = arg0 + arg1 * SoftwareRaster.width; @Pc(21) int local21 = arg0 + arg1 * SoftwareRaster.width;
@ -898,43 +898,43 @@ public final class SoftwareAlphaSprite extends SoftwareSprite {
@OriginalMember(owner = "client!am", name = "a", descriptor = "(III)V") @OriginalMember(owner = "client!am", name = "a", descriptor = "(III)V")
@Override @Override
public final void method1417(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { public final void renderAlpha(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int alpha) {
arg0 += this.anInt1863; x += this.anInt1863;
arg1 += this.anInt1861; y += this.anInt1861;
@Pc(15) int local15 = arg0 + arg1 * SoftwareRaster.width; @Pc(15) int local15 = x + y * SoftwareRaster.width;
@Pc(17) int local17 = 0; @Pc(17) int local17 = 0;
@Pc(20) int local20 = this.height; @Pc(20) int local20 = this.height;
@Pc(23) int local23 = this.width; @Pc(23) int local23 = this.width;
@Pc(27) int local27 = SoftwareRaster.width - local23; @Pc(27) int local27 = SoftwareRaster.width - local23;
@Pc(29) int local29 = 0; @Pc(29) int local29 = 0;
@Pc(36) int local36; @Pc(36) int local36;
if (arg1 < SoftwareRaster.clipTop) { if (y < SoftwareRaster.clipTop) {
local36 = SoftwareRaster.clipTop - arg1; local36 = SoftwareRaster.clipTop - y;
local20 -= local36; local20 -= local36;
arg1 = SoftwareRaster.clipTop; y = SoftwareRaster.clipTop;
local17 = local36 * local23; local17 = local36 * local23;
local15 += local36 * SoftwareRaster.width; local15 += local36 * SoftwareRaster.width;
} }
if (arg1 + local20 > SoftwareRaster.clipBottom) { if (y + local20 > SoftwareRaster.clipBottom) {
local20 -= arg1 + local20 - SoftwareRaster.clipBottom; local20 -= y + local20 - SoftwareRaster.clipBottom;
} }
if (arg0 < SoftwareRaster.clipLeft) { if (x < SoftwareRaster.clipLeft) {
local36 = SoftwareRaster.clipLeft - arg0; local36 = SoftwareRaster.clipLeft - x;
local23 -= local36; local23 -= local36;
arg0 = SoftwareRaster.clipLeft; x = SoftwareRaster.clipLeft;
local17 += local36; local17 += local36;
local15 += local36; local15 += local36;
local29 = local36; local29 = local36;
local27 += local36; local27 += local36;
} }
if (arg0 + local23 > SoftwareRaster.clipRight) { if (x + local23 > SoftwareRaster.clipRight) {
local36 = arg0 + local23 - SoftwareRaster.clipRight; local36 = x + local23 - SoftwareRaster.clipRight;
local23 -= local36; local23 -= local36;
local29 += local36; local29 += local36;
local27 += local36; local27 += local36;
} }
if (local23 > 0 && local20 > 0) { if (local23 > 0 && local20 > 0) {
method320(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29, arg2); method320(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29, alpha);
} }
} }
} }

View file

@ -770,20 +770,20 @@ public final class SoftwareModel extends Model {
} }
@Pc(71) int local71 = arg7 * arg3 + arg5 * arg4 >> 16; @Pc(71) int local71 = arg7 * arg3 + arg5 * arg4 >> 16;
@Pc(78) int local78 = local71 + this.aShort34 << 9; @Pc(78) int local78 = local71 + this.aShort34 << 9;
if (local78 / local38 <= Static240.screenLowerX) { if (local78 / local38 <= Rasteriser.screenLowerX) {
return; return;
} }
@Pc(91) int local91 = local71 - this.aShort34 << 9; @Pc(91) int local91 = local71 - this.aShort34 << 9;
if (local91 / local38 >= Static247.screenUpperX) { if (local91 / local38 >= Rasteriser.screenUpperX) {
return; return;
} }
@Pc(107) int local107 = arg6 * arg2 - local14 * arg1 >> 16; @Pc(107) int local107 = arg6 * arg2 - local14 * arg1 >> 16;
@Pc(123) int local123 = local107 + (this.aShort34 * arg1 + this.aShort37 * arg2 >> 16) << 9; @Pc(123) int local123 = local107 + (this.aShort34 * arg1 + this.aShort37 * arg2 >> 16) << 9;
if (local123 / local38 <= Static1.screenLowerY) { if (local123 / local38 <= Rasteriser.screenLowerY) {
return; return;
} }
@Pc(146) int local146 = local107 + (-this.aShort34 * arg1 + this.aShort38 * arg2 >> 16) << 9; @Pc(146) int local146 = local107 + (-this.aShort34 * arg1 + this.aShort38 * arg2 >> 16) << 9;
if (local146 / local38 >= Static148.screenUpperY) { if (local146 / local38 >= Rasteriser.screenUpperY) {
return; return;
} }
@Pc(154) boolean local154 = false; @Pc(154) boolean local154 = false;
@ -1072,7 +1072,7 @@ public final class SoftwareModel extends Model {
@OriginalMember(owner = "client!w", name = "a", descriptor = "(IIIIIIIJ)V") @OriginalMember(owner = "client!w", name = "a", descriptor = "(IIIIIIIJ)V")
@Override @Override
public final void method4571(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) long arg6) { public final void setCamera(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) long arg6) {
try { try {
if (!this.boundsValid) { if (!this.boundsValid) {
this.method4592(); this.method4592();

View file

@ -107,7 +107,7 @@ public final class SoftwareRaster {
} }
@OriginalMember(owner = "client!kb", name = "a", descriptor = "([I)V") @OriginalMember(owner = "client!kb", name = "a", descriptor = "([I)V")
public static void method2488(@OriginalArg(0) int[] arg0) { public static void restoreClip(@OriginalArg(0) int[] arg0) {
clipLeft = arg0[0]; clipLeft = arg0[0];
clipTop = arg0[1]; clipTop = arg0[1];
clipRight = arg0[2]; clipRight = arg0[2];
@ -152,7 +152,7 @@ public final class SoftwareRaster {
} }
@OriginalMember(owner = "client!kb", name = "a", descriptor = "([III)V") @OriginalMember(owner = "client!kb", name = "a", descriptor = "([III)V")
public static void method2491(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { public static void setSize(@OriginalArg(0) int[] arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
pixels = arg0; pixels = arg0;
width = arg1; width = arg1;
height = arg2; height = arg2;
@ -299,7 +299,7 @@ public final class SoftwareRaster {
} }
@OriginalMember(owner = "client!kb", name = "b", descriptor = "([I)V") @OriginalMember(owner = "client!kb", name = "b", descriptor = "([I)V")
public static void method2497(@OriginalArg(0) int[] arg0) { public static void saveClip(@OriginalArg(0) int[] arg0) {
arg0[0] = clipLeft; arg0[0] = clipLeft;
arg0[1] = clipTop; arg0[1] = clipTop;
arg0[2] = clipRight; arg0[2] = clipRight;

View file

@ -164,40 +164,41 @@ public class SoftwareSprite extends Sprite {
} }
@OriginalMember(owner = "client!mm", name = "a", descriptor = "([I[IIIIIIIII)V") @OriginalMember(owner = "client!mm", name = "a", descriptor = "([I[IIIIIIIII)V")
public static void method308(@OriginalArg(0) int[] arg0, @OriginalArg(1) int[] arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6, @OriginalArg(8) int arg7, @OriginalArg(9) int arg8) { public static void drawAlpha(@OriginalArg(0) int[] dst, @OriginalArg(1) int[] src, @OriginalArg(3) int srcOff, @OriginalArg(4) int dstOff, @OriginalArg(5) int startX, @OriginalArg(6) int startY, @OriginalArg(7) int dstStep, @OriginalArg(8) int srcStep, @OriginalArg(9) int alpha) {
@Pc(3) int local3 = 256 - arg8; @Pc(3) int invAlpha = 256 - alpha;
for (@Pc(6) int local6 = -arg5; local6 < 0; local6++) { for (@Pc(6) int y = -startY; y < 0; y++) {
for (@Pc(11) int local11 = -arg4; local11 < 0; local11++) { for (@Pc(11) int x = -startX; x < 0; x++) {
@Pc(18) int local18 = arg1[arg2++]; @Pc(18) int color = src[srcOff++];
if (local18 == 0) { if (color == 0) {
arg3++; dstOff++;
} else { } else {
@Pc(24) int local24 = arg0[arg3]; @Pc(24) int rgb = dst[dstOff];
arg0[arg3++] = ((local18 & 0xFF00FF) * arg8 + (local24 & 0xFF00FF) * local3 & 0xFF00FF00) + ((local18 & 0xFF00) * arg8 + (local24 & 0xFF00) * local3 & 0xFF0000) >> 8; dst[dstOff++] = ((color & 0xFF00FF) * alpha + (rgb & 0xFF00FF) * invAlpha & 0xFF00FF00) + ((color & 0xFF00) * alpha + (rgb & 0xFF00) * invAlpha & 0xFF0000) >> 8;
} }
} }
arg3 += arg6;
arg2 += arg7; dstOff += dstStep;
srcOff += srcStep;
} }
} }
@OriginalMember(owner = "client!mm", name = "a", descriptor = "([I[IIIIIIIIIII)V") @OriginalMember(owner = "client!mm", name = "a", descriptor = "([I[IIIIIIIIIII)V")
public static void method316(@OriginalArg(0) int[] arg0, @OriginalArg(1) int[] arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) int arg6, @OriginalArg(8) int arg7, @OriginalArg(9) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) int arg10) { public static void drawResized(@OriginalArg(0) int[] dst, @OriginalArg(1) int[] src, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int dstOff, @OriginalArg(6) int arg5, @OriginalArg(7) int startX, @OriginalArg(8) int startY, @OriginalArg(9) int arg8, @OriginalArg(10) int arg9, @OriginalArg(11) int arg10) {
@Pc(1) int local1 = arg2; @Pc(1) int local1 = arg2;
for (@Pc(4) int local4 = -arg7; local4 < 0; local4++) { for (@Pc(4) int y = -startY; y < 0; y++) {
@Pc(12) int local12 = (arg3 >> 16) * arg10; @Pc(12) int local12 = (arg3 >> 16) * arg10;
for (@Pc(15) int local15 = -arg6; local15 < 0; local15++) { for (@Pc(15) int x = -startX; x < 0; x++) {
@Pc(25) int local25 = arg1[(arg2 >> 16) + local12]; @Pc(25) int color = src[(arg2 >> 16) + local12];
if (local25 == 0) { if (color == 0) {
arg4++; dstOff++;
} else { } else {
arg0[arg4++] = local25; dst[dstOff++] = color;
} }
arg2 += arg8; arg2 += arg8;
} }
arg3 += arg9; arg3 += arg9;
arg2 = local1; arg2 = local1;
arg4 += arg5; dstOff += arg5;
} }
} }
@ -783,32 +784,32 @@ public class SoftwareSprite extends Sprite {
} }
@OriginalMember(owner = "client!mm", name = "e", descriptor = "(I)V") @OriginalMember(owner = "client!mm", name = "e", descriptor = "(I)V")
public final void method303(@OriginalArg(0) int arg0) { public final void drawOutline(@OriginalArg(0) int rgb) {
@Pc(6) int[] local6 = new int[this.width * this.height]; @Pc(6) int[] dest = new int[this.width * this.height];
@Pc(8) int local8 = 0; @Pc(8) int destOff = 0;
for (@Pc(10) int local10 = 0; local10 < this.height; local10++) { for (@Pc(10) int y = 0; y < this.height; y++) {
for (@Pc(16) int local16 = 0; local16 < this.width; local16++) { for (@Pc(16) int x = 0; x < this.width; x++) {
@Pc(25) int local25 = this.pixels[local8]; @Pc(25) int src = this.pixels[destOff];
if (local25 == 0) { if (src == 0) {
if (local16 > 0 && this.pixels[local8 - 1] != 0) { if (x > 0 && this.pixels[destOff - 1] != 0) {
local25 = arg0; src = rgb;
} else if (local10 > 0 && this.pixels[local8 - this.width] != 0) { } else if (y > 0 && this.pixels[destOff - this.width] != 0) {
local25 = arg0; src = rgb;
} else if (local16 < this.width - 1 && this.pixels[local8 + 1] != 0) { } else if (x < this.width - 1 && this.pixels[destOff + 1] != 0) {
local25 = arg0; src = rgb;
} else if (local10 < this.height - 1 && this.pixels[local8 + this.width] != 0) { } else if (y < this.height - 1 && this.pixels[destOff + this.width] != 0) {
local25 = arg0; src = rgb;
} }
} }
local6[local8++] = local25; dest[destOff++] = src;
} }
} }
this.pixels = local6; this.pixels = dest;
} }
@OriginalMember(owner = "client!mm", name = "c", descriptor = "()V") @OriginalMember(owner = "client!mm", name = "c", descriptor = "()V")
public final void makeTarget() { public final void makeTarget() {
SoftwareRaster.method2491(this.pixels, this.width, this.height); SoftwareRaster.setSize(this.pixels, this.width, this.height);
} }
@OriginalMember(owner = "client!mm", name = "a", descriptor = "(IIIIIIDI)V") @OriginalMember(owner = "client!mm", name = "a", descriptor = "(IIIIIIDI)V")
@ -845,7 +846,7 @@ public class SoftwareSprite extends Sprite {
@OriginalMember(owner = "client!mm", name = "d", descriptor = "(II)V") @OriginalMember(owner = "client!mm", name = "d", descriptor = "(II)V")
@Override @Override
public void renderHorizontalFlipTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { public void renderHorizontalFlip(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
arg0 += this.anInt1860 - this.width - this.anInt1863; arg0 += this.anInt1860 - this.width - this.anInt1863;
arg1 += this.anInt1861; arg1 += this.anInt1861;
@Pc(21) int local21 = arg0 + arg1 * SoftwareRaster.width; @Pc(21) int local21 = arg0 + arg1 * SoftwareRaster.width;
@ -887,49 +888,49 @@ public class SoftwareSprite extends Sprite {
@OriginalMember(owner = "client!mm", name = "a", descriptor = "(III)V") @OriginalMember(owner = "client!mm", name = "a", descriptor = "(III)V")
@Override @Override
public void method1417(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) { public void renderAlpha(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int alpha) {
arg0 += this.anInt1863; x += this.anInt1863;
arg1 += this.anInt1861; y += this.anInt1861;
@Pc(15) int local15 = arg0 + arg1 * SoftwareRaster.width; @Pc(15) int local15 = x + y * SoftwareRaster.width;
@Pc(17) int local17 = 0; @Pc(17) int local17 = 0;
@Pc(20) int local20 = this.height; @Pc(20) int local20 = this.height;
@Pc(23) int local23 = this.width; @Pc(23) int local23 = this.width;
@Pc(27) int local27 = SoftwareRaster.width - local23; @Pc(27) int local27 = SoftwareRaster.width - local23;
@Pc(29) int local29 = 0; @Pc(29) int local29 = 0;
@Pc(36) int local36; @Pc(36) int local36;
if (arg1 < SoftwareRaster.clipTop) { if (y < SoftwareRaster.clipTop) {
local36 = SoftwareRaster.clipTop - arg1; local36 = SoftwareRaster.clipTop - y;
local20 -= local36; local20 -= local36;
arg1 = SoftwareRaster.clipTop; y = SoftwareRaster.clipTop;
local17 = local36 * local23; local17 = local36 * local23;
local15 += local36 * SoftwareRaster.width; local15 += local36 * SoftwareRaster.width;
} }
if (arg1 + local20 > SoftwareRaster.clipBottom) { if (y + local20 > SoftwareRaster.clipBottom) {
local20 -= arg1 + local20 - SoftwareRaster.clipBottom; local20 -= y + local20 - SoftwareRaster.clipBottom;
} }
if (arg0 < SoftwareRaster.clipLeft) { if (x < SoftwareRaster.clipLeft) {
local36 = SoftwareRaster.clipLeft - arg0; local36 = SoftwareRaster.clipLeft - x;
local23 -= local36; local23 -= local36;
arg0 = SoftwareRaster.clipLeft; x = SoftwareRaster.clipLeft;
local17 += local36; local17 += local36;
local15 += local36; local15 += local36;
local29 = local36; local29 = local36;
local27 += local36; local27 += local36;
} }
if (arg0 + local23 > SoftwareRaster.clipRight) { if (x + local23 > SoftwareRaster.clipRight) {
local36 = arg0 + local23 - SoftwareRaster.clipRight; local36 = x + local23 - SoftwareRaster.clipRight;
local23 -= local36; local23 -= local36;
local29 += local36; local29 += local36;
local27 += local36; local27 += local36;
} }
if (local23 > 0 && local20 > 0) { if (local23 > 0 && local20 > 0) {
method308(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29, arg2); drawAlpha(SoftwareRaster.pixels, this.pixels, local17, local15, local23, local20, local27, local29, alpha);
} }
} }
@OriginalMember(owner = "client!mm", name = "e", descriptor = "(II)V") @OriginalMember(owner = "client!mm", name = "e", descriptor = "(II)V")
@Override @Override
public void renderTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) { public void render(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
arg0 += this.anInt1863; arg0 += this.anInt1863;
arg1 += this.anInt1861; arg1 += this.anInt1861;
@Pc(15) int local15 = arg0 + arg1 * SoftwareRaster.width; @Pc(15) int local15 = arg0 + arg1 * SoftwareRaster.width;
@ -983,7 +984,7 @@ public class SoftwareSprite extends Sprite {
} }
@OriginalMember(owner = "client!mm", name = "a", descriptor = "(IIIIIIII[I[I)V") @OriginalMember(owner = "client!mm", name = "a", descriptor = "(IIIIIIII[I[I)V")
public void renderRotatedTransparent(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(7) int zoom, @OriginalArg(8) int[] lineStarts, @OriginalArg(9) int[] arg9) { public void renderRotated(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(7) int zoom, @OriginalArg(8) int[] lineStarts, @OriginalArg(9) int[] arg9) {
try { try {
@Pc(4) int centerX = -w / 2; @Pc(4) int centerX = -w / 2;
@Pc(9) int centerY = -h / 2; @Pc(9) int centerY = -h / 2;
@ -1141,7 +1142,7 @@ public class SoftwareSprite extends Sprite {
} }
@OriginalMember(owner = "client!mm", name = "b", descriptor = "(IIIIIIII[I[I)V") @OriginalMember(owner = "client!mm", name = "b", descriptor = "(IIIIIIII[I[I)V")
public void renderRotatedTransparent(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(8) int[] lineStart, @OriginalArg(9) int[] lineWidth) { public void renderRotated(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int w, @OriginalArg(3) int h, @OriginalArg(4) int anchorX, @OriginalArg(5) int anchorY, @OriginalArg(6) int theta, @OriginalArg(8) int[] lineStart, @OriginalArg(9) int[] lineWidth) {
try { try {
@Pc(4) int centerX = -w / 2; @Pc(4) int centerX = -w / 2;
@Pc(9) int centerY = -h / 2; @Pc(9) int centerY = -h / 2;
@ -1199,12 +1200,12 @@ public class SoftwareSprite extends Sprite {
} }
@OriginalMember(owner = "client!mm", name = "f", descriptor = "(I)V") @OriginalMember(owner = "client!mm", name = "f", descriptor = "(I)V")
public final void method314(@OriginalArg(0) int arg0) { public final void drawShadow(@OriginalArg(0) int rgb) {
for (@Pc(4) int local4 = this.height - 1; local4 > 0; local4--) { for (@Pc(4) int y = this.height - 1; y > 0; y--) {
@Pc(11) int local11 = local4 * this.width; @Pc(11) int row = y * this.width;
for (@Pc(16) int local16 = this.width - 1; local16 > 0; local16--) { for (@Pc(16) int x = this.width - 1; x > 0; x--) {
if (this.pixels[local16 + local11] == 0 && this.pixels[local16 + local11 - this.width - 1] != 0) { if (this.pixels[x + row] == 0 && this.pixels[x + row - this.width - 1] != 0) {
this.pixels[local16 + local11] = arg0; this.pixels[x + row] = rgb;
} }
} }
} }
@ -1301,59 +1302,68 @@ public class SoftwareSprite extends Sprite {
@OriginalMember(owner = "client!mm", name = "a", descriptor = "(IIII)V") @OriginalMember(owner = "client!mm", name = "a", descriptor = "(IIII)V")
@Override @Override
public void renderResizedTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { public void renderResized(@OriginalArg(0) int x, @OriginalArg(1) int y, @OriginalArg(2) int width, @OriginalArg(3) int height) {
if (arg2 <= 0 || arg3 <= 0) { if (width <= 0 || height <= 0) {
return; return;
} }
@Pc(7) int local7 = this.width; @Pc(7) int local7 = this.width;
@Pc(10) int local10 = this.height; @Pc(10) int local10 = this.height;
@Pc(12) int local12 = 0; @Pc(12) int local12 = 0;
@Pc(14) int local14 = 0; @Pc(14) int local14 = 0;
@Pc(17) int local17 = this.anInt1860; @Pc(17) int local17 = this.anInt1860;
@Pc(20) int local20 = this.anInt1866; @Pc(20) int local20 = this.anInt1866;
@Pc(26) int local26 = (local17 << 16) / arg2; @Pc(26) int local26 = (local17 << 16) / width;
@Pc(32) int local32 = (local20 << 16) / arg3; @Pc(32) int local32 = (local20 << 16) / height;
@Pc(46) int local46; @Pc(46) int local46;
if (this.anInt1863 > 0) { if (this.anInt1863 > 0) {
local46 = ((this.anInt1863 << 16) + local26 - 1) / local26; local46 = ((this.anInt1863 << 16) + local26 - 1) / local26;
arg0 += local46; x += local46;
local12 = local46 * local26 - (this.anInt1863 << 16); local12 = local46 * local26 - (this.anInt1863 << 16);
} }
if (this.anInt1861 > 0) { if (this.anInt1861 > 0) {
local46 = ((this.anInt1861 << 16) + local32 - 1) / local32; local46 = ((this.anInt1861 << 16) + local32 - 1) / local32;
arg1 += local46; y += local46;
local14 = local46 * local32 - (this.anInt1861 << 16); local14 = local46 * local32 - (this.anInt1861 << 16);
} }
if (local7 < local17) { if (local7 < local17) {
arg2 = ((local7 << 16) + local26 - local12 - 1) / local26; width = ((local7 << 16) + local26 - local12 - 1) / local26;
} }
if (local10 < local20) { if (local10 < local20) {
arg3 = ((local10 << 16) + local32 - local14 - 1) / local32; height = ((local10 << 16) + local32 - local14 - 1) / local32;
} }
local46 = arg0 + arg1 * SoftwareRaster.width;
@Pc(130) int local130 = SoftwareRaster.width - arg2; local46 = x + y * SoftwareRaster.width;
if (arg1 + arg3 > SoftwareRaster.clipBottom) { @Pc(130) int local130 = SoftwareRaster.width - width;
arg3 -= arg1 + arg3 - SoftwareRaster.clipBottom; if (y + height > SoftwareRaster.clipBottom) {
height -= y + height - SoftwareRaster.clipBottom;
} }
@Pc(150) int local150; @Pc(150) int local150;
if (arg1 < SoftwareRaster.clipTop) { if (y < SoftwareRaster.clipTop) {
local150 = SoftwareRaster.clipTop - arg1; local150 = SoftwareRaster.clipTop - y;
arg3 -= local150; height -= local150;
local46 += local150 * SoftwareRaster.width; local46 += local150 * SoftwareRaster.width;
local14 += local32 * local150; local14 += local32 * local150;
} }
if (arg0 + arg2 > SoftwareRaster.clipRight) {
local150 = arg0 + arg2 - SoftwareRaster.clipRight; if (x + width > SoftwareRaster.clipRight) {
arg2 -= local150; local150 = x + width - SoftwareRaster.clipRight;
width -= local150;
local130 += local150; local130 += local150;
} }
if (arg0 < SoftwareRaster.clipLeft) {
local150 = SoftwareRaster.clipLeft - arg0; if (x < SoftwareRaster.clipLeft) {
arg2 -= local150; local150 = SoftwareRaster.clipLeft - x;
width -= local150;
local46 += local150; local46 += local150;
local12 += local26 * local150; local12 += local26 * local150;
local130 += local150; local130 += local150;
} }
method316(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, arg2, arg3, local26, local32, local7);
drawResized(SoftwareRaster.pixels, this.pixels, local12, local14, local46, local130, width, height, local26, local32, local7);
} }
} }

View file

@ -37,10 +37,10 @@ public abstract class Sprite extends SecondaryNode {
protected abstract 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); protected abstract 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);
@OriginalMember(owner = "client!qf", name = "a", descriptor = "(III)V") @OriginalMember(owner = "client!qf", name = "a", descriptor = "(III)V")
public abstract void method1417(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2); public abstract void renderAlpha(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2);
@OriginalMember(owner = "client!qf", name = "a", descriptor = "(IIII)V") @OriginalMember(owner = "client!qf", name = "a", descriptor = "(IIII)V")
public abstract void renderResizedTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3); public abstract void renderResized(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3);
@OriginalMember(owner = "client!qf", name = "a", descriptor = "(IIIII)V") @OriginalMember(owner = "client!qf", name = "a", descriptor = "(IIIII)V")
public final void method1420(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { public final void method1420(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
@ -52,11 +52,11 @@ public abstract class Sprite extends SecondaryNode {
} }
@OriginalMember(owner = "client!qf", name = "d", descriptor = "(II)V") @OriginalMember(owner = "client!qf", name = "d", descriptor = "(II)V")
public abstract void renderHorizontalFlipTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1); public abstract void renderHorizontalFlip(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1);
@OriginalMember(owner = "client!qf", name = "b", descriptor = "(IIIII)V") @OriginalMember(owner = "client!qf", name = "b", descriptor = "(IIIII)V")
public abstract void method1422(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4); public abstract void method1422(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4);
@OriginalMember(owner = "client!qf", name = "e", descriptor = "(II)V") @OriginalMember(owner = "client!qf", name = "e", descriptor = "(II)V")
public abstract void renderTransparent(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1); public abstract void render(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1);
} }

View file

@ -6,9 +6,6 @@ import org.openrs2.deob.annotation.Pc;
public final class Static1 { public final class Static1 {
@OriginalMember(owner = "client!a", name = "g", descriptor = "I")
public static int screenLowerY;
@OriginalMember(owner = "client!a", name = "h", descriptor = "I") @OriginalMember(owner = "client!a", name = "h", descriptor = "I")
public static int anInt5; public static int anInt5;
@ -538,7 +535,7 @@ public final class Static1 {
} }
if (WorldMap.aClass3_Sub2_Sub1_2 == null || arg2 != WorldMap.aClass3_Sub2_Sub1_2.width || WorldMap.aClass3_Sub2_Sub1_2.height != arg1) { if (WorldMap.aClass3_Sub2_Sub1_2 == null || arg2 != WorldMap.aClass3_Sub2_Sub1_2.width || WorldMap.aClass3_Sub2_Sub1_2.height != arg1) {
@Pc(63) SoftwareSprite local63 = new SoftwareSprite(arg2, arg1); @Pc(63) SoftwareSprite local63 = new SoftwareSprite(arg2, arg1);
SoftwareRaster.method2491(local63.pixels, arg2, arg1); SoftwareRaster.setSize(local63.pixels, arg2, arg1);
Static214.method4364(arg2, 0, WorldMap.width, 0, 0, WorldMap.length, arg1, 0); Static214.method4364(arg2, 0, WorldMap.width, 0, 0, WorldMap.length, arg1, 0);
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
WorldMap.aClass3_Sub2_Sub1_2 = new GlSprite(local63); WorldMap.aClass3_Sub2_Sub1_2 = new GlSprite(local63);

View file

@ -13,41 +13,41 @@ public final class Static111 {
if (arg0.xMode == 0) { if (arg0.xMode == 0) {
arg0.y = arg0.baseY; arg0.y = arg0.baseY;
} else if (arg0.xMode == 1) { } else if (arg0.xMode == 1) {
arg0.y = (arg1 - arg0.anInt459) / 2 + arg0.baseY; arg0.y = (arg1 - arg0.height) / 2 + arg0.baseY;
} else if (arg0.xMode == 2) { } else if (arg0.xMode == 2) {
arg0.y = arg1 - arg0.anInt459 - arg0.baseY; arg0.y = arg1 - arg0.height - arg0.baseY;
} else if (arg0.xMode == 3) { } else if (arg0.xMode == 3) {
arg0.y = arg0.baseY * arg1 >> 14; arg0.y = arg0.baseY * arg1 >> 14;
} else if (arg0.xMode == 4) { } else if (arg0.xMode == 4) {
arg0.y = (arg1 * arg0.baseY >> 14) + (arg1 - arg0.anInt459) / 2; arg0.y = (arg1 * arg0.baseY >> 14) + (arg1 - arg0.height) / 2;
} else { } else {
arg0.y = arg1 - (arg1 * arg0.baseY >> 14) - arg0.anInt459; arg0.y = arg1 - (arg1 * arg0.baseY >> 14) - arg0.height;
} }
if (arg0.yMode == 0) { if (arg0.yMode == 0) {
arg0.x = arg0.baseX; arg0.x = arg0.baseX;
} else if (arg0.yMode == 1) { } else if (arg0.yMode == 1) {
arg0.x = arg0.baseX + (arg2 - arg0.anInt445) / 2; arg0.x = arg0.baseX + (arg2 - arg0.width) / 2;
} else if (arg0.yMode == 2) { } else if (arg0.yMode == 2) {
arg0.x = arg2 - arg0.baseX - arg0.anInt445; arg0.x = arg2 - arg0.baseX - arg0.width;
} else if (arg0.yMode == 3) { } else if (arg0.yMode == 3) {
arg0.x = arg0.baseX * arg2 >> 14; arg0.x = arg0.baseX * arg2 >> 14;
} else if (arg0.yMode == 4) { } else if (arg0.yMode == 4) {
arg0.x = (arg0.baseX * arg2 >> 14) + (arg2 - arg0.anInt445) / 2; arg0.x = (arg0.baseX * arg2 >> 14) + (arg2 - arg0.width) / 2;
} else { } else {
arg0.x = arg2 - (arg2 * arg0.baseX >> 14) - arg0.anInt445; arg0.x = arg2 - (arg2 * arg0.baseX >> 14) - arg0.width;
} }
if (!Static121.aBoolean154 || InterfaceList.getServerActiveProperties(arg0).accessMask == 0 && arg0.type != 0) { if (!Static121.aBoolean154 || InterfaceList.getServerActiveProperties(arg0).accessMask == 0 && arg0.type != 0) {
return; return;
} }
if (arg0.y < 0) { if (arg0.y < 0) {
arg0.y = 0; arg0.y = 0;
} else if (arg0.anInt459 + arg0.y > arg1) { } else if (arg0.height + arg0.y > arg1) {
arg0.y = arg1 - arg0.anInt459; arg0.y = arg1 - arg0.height;
} }
if (arg0.x < 0) { if (arg0.x < 0) {
arg0.x = 0; arg0.x = 0;
} else if (arg2 < arg0.x + arg0.anInt445) { } else if (arg2 < arg0.x + arg0.width) {
arg0.x = arg2 - arg0.anInt445; arg0.x = arg2 - arg0.width;
} }
} }

View file

@ -38,10 +38,10 @@ public final class Static112 {
if (Static39.aClass3_Sub2_Sub1_1 != null && Static181.aClass3_Sub2_Sub1_9 != null) { if (Static39.aClass3_Sub2_Sub1_1 != null && Static181.aClass3_Sub2_Sub1_9 != null) {
local112 = local13 / Static39.aClass3_Sub2_Sub1_1.width; local112 = local13 / Static39.aClass3_Sub2_Sub1_1.width;
for (local114 = 0; local114 < local112; local114++) { for (local114 = 0; local114 < local112; local114++) {
Static39.aClass3_Sub2_Sub1_1.renderTransparent(local114 * Static39.aClass3_Sub2_Sub1_1.width + local3, local9); Static39.aClass3_Sub2_Sub1_1.render(local114 * Static39.aClass3_Sub2_Sub1_1.width + local3, local9);
} }
Static181.aClass3_Sub2_Sub1_9.renderTransparent(local3, local9); Static181.aClass3_Sub2_Sub1_9.render(local3, local9);
Static181.aClass3_Sub2_Sub1_9.renderHorizontalFlipTransparent(local3 + local13 - Static181.aClass3_Sub2_Sub1_9.width, local9); Static181.aClass3_Sub2_Sub1_9.renderHorizontalFlip(local3 + local13 - Static181.aClass3_Sub2_Sub1_9.width, local9);
} }
Fonts.b12Full.renderLeft(LocalizedText.CHOOSE_OPTION, local3 + 3, local9 + 14, Static195.anInt4581, -1); Fonts.b12Full.renderLeft(LocalizedText.CHOOSE_OPTION, local3 + 3, local9 + 14, Static195.anInt4581, -1);
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
@ -89,15 +89,15 @@ public final class Static112 {
if (Static165.aClass3_Sub2_Sub1_8 != null && Static92.aClass3_Sub2_Sub1_6 != null && Static204.aClass3_Sub2_Sub1_10 != null) { if (Static165.aClass3_Sub2_Sub1_8 != null && Static92.aClass3_Sub2_Sub1_6 != null && Static204.aClass3_Sub2_Sub1_10 != null) {
local203 = local13 / Static165.aClass3_Sub2_Sub1_8.width; local203 = local13 / Static165.aClass3_Sub2_Sub1_8.width;
for (local219 = 0; local219 < local203; local219++) { for (local219 = 0; local219 < local203; local219++) {
Static165.aClass3_Sub2_Sub1_8.renderTransparent(local3 + Static165.aClass3_Sub2_Sub1_8.width * local219, local11 + local9 + -Static165.aClass3_Sub2_Sub1_8.height); Static165.aClass3_Sub2_Sub1_8.render(local3 + Static165.aClass3_Sub2_Sub1_8.width * local219, local11 + local9 + -Static165.aClass3_Sub2_Sub1_8.height);
} }
local219 = (local11 - 20) / Static92.aClass3_Sub2_Sub1_6.height; local219 = (local11 - 20) / Static92.aClass3_Sub2_Sub1_6.height;
for (local418 = 0; local418 < local219; local418++) { for (local418 = 0; local418 < local219; local418++) {
Static92.aClass3_Sub2_Sub1_6.renderTransparent(local3, local9 + local418 * Static92.aClass3_Sub2_Sub1_6.height + 20); Static92.aClass3_Sub2_Sub1_6.render(local3, local9 + local418 * Static92.aClass3_Sub2_Sub1_6.height + 20);
Static92.aClass3_Sub2_Sub1_6.renderHorizontalFlipTransparent(local3 + local13 - Static92.aClass3_Sub2_Sub1_6.width, local9 + 20 + local418 * Static92.aClass3_Sub2_Sub1_6.height); Static92.aClass3_Sub2_Sub1_6.renderHorizontalFlip(local3 + local13 - Static92.aClass3_Sub2_Sub1_6.width, local9 + 20 + local418 * Static92.aClass3_Sub2_Sub1_6.height);
} }
Static204.aClass3_Sub2_Sub1_10.renderTransparent(local3, local11 + local9 - Static204.aClass3_Sub2_Sub1_10.height); Static204.aClass3_Sub2_Sub1_10.render(local3, local11 + local9 - Static204.aClass3_Sub2_Sub1_10.height);
Static204.aClass3_Sub2_Sub1_10.renderHorizontalFlipTransparent(local3 + local13 - Static204.aClass3_Sub2_Sub1_10.width, local9 - -local11 + -Static204.aClass3_Sub2_Sub1_10.height); Static204.aClass3_Sub2_Sub1_10.renderHorizontalFlip(local3 + local13 - Static204.aClass3_Sub2_Sub1_10.width, local9 - -local11 + -Static204.aClass3_Sub2_Sub1_10.height);
} }
for (local203 = 0; local203 < MiniMenu.size; local203++) { for (local203 = 0; local203 < MiniMenu.size; local203++) {
local219 = (MiniMenu.size - local203 - 1) * 15 + local9 + 35; local219 = (MiniMenu.size - local203 - 1) * 15 + local9 + 35;

View file

@ -38,10 +38,10 @@ public final class Static115 {
@OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIIIB)V") @OriginalMember(owner = "client!ja", name = "a", descriptor = "(IIIIB)V")
public static void method2310(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) { public static void method2310(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
if (Cross.type == 1) { if (Cross.type == 1) {
Sprites.crosses[Cross.milliseconds / 100].renderTransparent(Cross.x - 8, Cross.y + -8); Sprites.crosses[Cross.milliseconds / 100].render(Cross.x - 8, Cross.y + -8);
} }
if (Cross.type == 2) { if (Cross.type == 2) {
Sprites.crosses[Cross.milliseconds / 100 + 4].renderTransparent(Cross.x - 8, Cross.y + -8); Sprites.crosses[Cross.milliseconds / 100 + 4].render(Cross.x - 8, Cross.y + -8);
} }
Player.setTutorialIsland(); Player.setTutorialIsland();
} }

View file

@ -12,9 +12,6 @@ public final class Static148 {
@OriginalMember(owner = "client!li", name = "w", descriptor = "Lclient!sc;") @OriginalMember(owner = "client!li", name = "w", descriptor = "Lclient!sc;")
public static HashTable aClass133_13; public static HashTable aClass133_13;
@OriginalMember(owner = "client!li", name = "x", descriptor = "I")
public static int screenUpperY;
@OriginalMember(owner = "client!li", name = "a", descriptor = "(III)V") @OriginalMember(owner = "client!li", name = "a", descriptor = "(III)V")
public static void method2766(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) { public static void method2766(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) {
VarpDomain.activeVarps[arg0] = arg1; VarpDomain.activeVarps[arg0] = arg1;

View file

@ -11,57 +11,57 @@ public final class Static150 {
@OriginalMember(owner = "client!lk", name = "a", descriptor = "(IIILclient!be;Z)V") @OriginalMember(owner = "client!lk", name = "a", descriptor = "(IIILclient!be;Z)V")
public static void method2801(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component arg2, @OriginalArg(4) boolean arg3) { public static void method2801(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component arg2, @OriginalArg(4) boolean arg3) {
@Pc(4) int local4 = arg2.anInt445; @Pc(4) int local4 = arg2.width;
@Pc(7) int local7 = arg2.anInt459; @Pc(7) int local7 = arg2.height;
if (arg2.dynamicWidthValue == 0) { if (arg2.dynamicWidthValue == 0) {
arg2.anInt445 = arg2.baseWidth; arg2.width = arg2.baseWidth;
} else if (arg2.dynamicWidthValue == 1) { } else if (arg2.dynamicWidthValue == 1) {
arg2.anInt445 = arg1 - arg2.baseWidth; arg2.width = arg1 - arg2.baseWidth;
} else if (arg2.dynamicWidthValue == 2) { } else if (arg2.dynamicWidthValue == 2) {
arg2.anInt445 = arg2.baseWidth * arg1 >> 14; arg2.width = arg2.baseWidth * arg1 >> 14;
} else if (arg2.dynamicWidthValue == 3) { } else if (arg2.dynamicWidthValue == 3) {
if (arg2.type == 2) { if (arg2.type == 2) {
arg2.anInt445 = arg2.baseWidth * 32 + (arg2.baseWidth - 1) * arg2.anInt512; arg2.width = arg2.baseWidth * 32 + (arg2.baseWidth - 1) * arg2.anInt512;
} else if (arg2.type == 7) { } else if (arg2.type == 7) {
arg2.anInt445 = arg2.baseWidth * 115 + arg2.anInt512 * (arg2.baseWidth - 1); arg2.width = arg2.baseWidth * 115 + arg2.anInt512 * (arg2.baseWidth - 1);
} }
} }
if (arg2.dynamicHeightValue == 0) { if (arg2.dynamicHeightValue == 0) {
arg2.anInt459 = arg2.baseHeight; arg2.height = arg2.baseHeight;
} else if (arg2.dynamicHeightValue == 1) { } else if (arg2.dynamicHeightValue == 1) {
arg2.anInt459 = arg0 - arg2.baseHeight; arg2.height = arg0 - arg2.baseHeight;
} else if (arg2.dynamicHeightValue == 2) { } else if (arg2.dynamicHeightValue == 2) {
arg2.anInt459 = arg0 * arg2.baseHeight >> 14; arg2.height = arg0 * arg2.baseHeight >> 14;
} else if (arg2.dynamicHeightValue == 3) { } else if (arg2.dynamicHeightValue == 3) {
if (arg2.type == 2) { if (arg2.type == 2) {
arg2.anInt459 = (arg2.baseHeight - 1) * arg2.anInt516 + arg2.baseHeight * 32; arg2.height = (arg2.baseHeight - 1) * arg2.anInt516 + arg2.baseHeight * 32;
} else if (arg2.type == 7) { } else if (arg2.type == 7) {
arg2.anInt459 = arg2.baseHeight * 12 + (arg2.baseHeight - 1) * arg2.anInt516; arg2.height = arg2.baseHeight * 12 + (arg2.baseHeight - 1) * arg2.anInt516;
} }
} }
if (arg2.dynamicWidthValue == 4) { if (arg2.dynamicWidthValue == 4) {
arg2.anInt445 = arg2.aspectWidth * arg2.anInt459 / arg2.aspectHeight; arg2.width = arg2.aspectWidth * arg2.height / arg2.aspectHeight;
} }
if (arg2.dynamicHeightValue == 4) { if (arg2.dynamicHeightValue == 4) {
arg2.anInt459 = arg2.aspectHeight * arg2.anInt445 / arg2.aspectWidth; arg2.height = arg2.aspectHeight * arg2.width / arg2.aspectWidth;
} }
if (Static121.aBoolean154 && (InterfaceList.getServerActiveProperties(arg2).accessMask != 0 || arg2.type == 0)) { if (Static121.aBoolean154 && (InterfaceList.getServerActiveProperties(arg2).accessMask != 0 || arg2.type == 0)) {
if (arg2.anInt459 < 5 && arg2.anInt445 < 5) { if (arg2.height < 5 && arg2.width < 5) {
arg2.anInt459 = 5; arg2.height = 5;
arg2.anInt445 = 5; arg2.width = 5;
} else { } else {
if (arg2.anInt445 <= 0) { if (arg2.width <= 0) {
arg2.anInt445 = 5; arg2.width = 5;
} }
if (arg2.anInt459 <= 0) { if (arg2.height <= 0) {
arg2.anInt459 = 5; arg2.height = 5;
} }
} }
} }
if (arg2.anInt453 == 1337) { if (arg2.anInt453 == 1337) {
Static280.aClass13_26 = arg2; Static280.aClass13_26 = arg2;
} }
if (arg3 && arg2.anObjectArray17 != null && (local4 != arg2.anInt445 || arg2.anInt459 != local7)) { if (arg3 && arg2.anObjectArray17 != null && (local4 != arg2.width || arg2.height != local7)) {
@Pc(305) HookRequest local305 = new HookRequest(); @Pc(305) HookRequest local305 = new HookRequest();
local305.arguments = arg2.anObjectArray17; local305.arguments = arg2.anObjectArray17;
local305.source = arg2; local305.source = arg2;

View file

@ -9,21 +9,21 @@ public final class Static160 {
@OriginalMember(owner = "client!mj", name = "a", descriptor = "(IILclient!be;IB)V") @OriginalMember(owner = "client!mj", name = "a", descriptor = "(IILclient!be;IB)V")
public static void method3047(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) Component arg2, @OriginalArg(3) int arg3) { public static void method3047(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) Component arg2, @OriginalArg(3) int arg3) {
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.setClip(arg0, arg1, arg2.anInt445 + arg0, arg2.anInt459 + arg1); GlRaster.setClip(arg0, arg1, arg2.width + arg0, arg2.height + arg1);
} }
if (MiniMap.state >= 3) { if (MiniMap.state >= 3) {
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
@Pc(44) Sprite local44 = arg2.method489(false); @Pc(44) Sprite local44 = arg2.method489(false);
if (local44 != null) { if (local44 != null) {
local44.renderTransparent(arg0, arg1); local44.render(arg0, arg1);
} }
} else { } else {
SoftwareRaster.method2504(arg0, arg1, arg2.anIntArray37, arg2.anIntArray45); SoftwareRaster.method2504(arg0, arg1, arg2.anIntArray37, arg2.anIntArray45);
} }
} else if (GlRenderer.enabled) { } else if (GlRenderer.enabled) {
((GlSprite) Static106.compass).renderRotatedTransparent(arg0, arg1, arg2.anInt445, arg2.anInt459, Static106.compass.width / 2, Static106.compass.height / 2, (int)Camera.yawTarget, 256, (GlSprite) arg2.method489(false)); ((GlSprite) Static106.compass).renderRotatedTransparent(arg0, arg1, arg2.width, arg2.height, Static106.compass.width / 2, Static106.compass.height / 2, (int)Camera.yawTarget, 256, (GlSprite) arg2.method489(false));
} else { } else {
((SoftwareSprite) Static106.compass).renderRotatedTransparent(arg0, arg1, arg2.anInt445, arg2.anInt459, Static106.compass.width / 2, Static106.compass.height / 2, (int)Camera.yawTarget, arg2.anIntArray37, arg2.anIntArray45); ((SoftwareSprite) Static106.compass).renderRotated(arg0, arg1, arg2.width, arg2.height, Static106.compass.width / 2, Static106.compass.height / 2, (int)Camera.yawTarget, arg2.anIntArray37, arg2.anIntArray45);
} }
InterfaceList.rectangleRedraw[arg3] = true; InterfaceList.rectangleRedraw[arg3] = true;
} }
@ -50,14 +50,14 @@ public final class Static160 {
return false; return false;
} else if (local29 > arg4 && local66 > arg4) { } else if (local29 > arg4 && local66 > arg4) {
return false; return false;
} else if (local50 < Static240.screenLowerX && local87 < Static240.screenLowerX) { } else if (local50 < Rasteriser.screenLowerX && local87 < Rasteriser.screenLowerX) {
return false; return false;
} else if (local50 > Static247.screenUpperX && local87 > Static247.screenUpperX) { } else if (local50 > Rasteriser.screenUpperX && local87 > Rasteriser.screenUpperX) {
return false; return false;
} else if (local56 < Static1.screenLowerY && local93 < Static1.screenLowerY) { } else if (local56 < Rasteriser.screenLowerY && local93 < Rasteriser.screenLowerY) {
return false; return false;
} else { } else {
return local56 <= Static148.screenUpperY || local93 <= Static148.screenUpperY; return local56 <= Rasteriser.screenUpperY || local93 <= Rasteriser.screenUpperY;
} }
} }
} }

View file

@ -160,79 +160,4 @@ public final class Static164 {
return SpriteLoader.decode(arg1, 0, arg0) ? Static134.method2619() : null; return SpriteLoader.decode(arg1, 0, arg0) ? Static134.method2619() : null;
} }
@OriginalMember(owner = "client!na", name = "a", descriptor = "(IBZIZIIZ)Lclient!qf;")
public static Sprite method3150(@OriginalArg(0) int arg0, @OriginalArg(2) boolean arg1, @OriginalArg(3) int arg2, @OriginalArg(4) boolean arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5, @OriginalArg(7) boolean arg6) {
@Pc(5) ObjType local5 = ObjTypeList.get(arg2);
if (arg5 > 1 && local5.countObj != null) {
@Pc(15) int local15 = -1;
for (@Pc(17) int local17 = 0; local17 < 10; local17++) {
if (arg5 >= local5.countCount[local17] && local5.countCount[local17] != 0) {
local15 = local5.countObj[local17];
}
}
if (local15 != -1) {
local5 = ObjTypeList.get(local15);
}
}
@Pc(60) SoftwareModel local60 = local5.getInvModel();
if (local60 == null) {
return null;
}
@Pc(71) SoftwareSprite local71 = null;
if (local5.certificateTemplate != -1) {
local71 = (SoftwareSprite) method3150(0, true, local5.certificateLink, false, 1, 10, true);
if (local71 == null) {
return null;
}
} else if (local5.lentTemplate != -1) {
local71 = (SoftwareSprite) method3150(arg0, true, local5.lentLink, false, arg4, arg5, false);
if (local71 == null) {
return null;
}
}
@Pc(118) int[] local118 = SoftwareRaster.pixels;
@Pc(120) int local120 = SoftwareRaster.width;
@Pc(122) int local122 = SoftwareRaster.height;
@Pc(125) int[] local125 = new int[4];
SoftwareRaster.method2497(local125);
@Pc(133) SoftwareSprite local133 = new SoftwareSprite(36, 32);
SoftwareRaster.method2491(local133.pixels, 36, 32);
Rasteriser.prepare();
Rasteriser.setBounds(16, 16);
@Pc(145) int local145 = local5.zoom2d;
Rasteriser.jagged = false;
if (arg6) {
local145 = (int) ((double) local145 * 1.5D);
} else if (arg4 == 2) {
local145 = (int) ((double) local145 * 1.04D);
}
@Pc(176) int local176 = MathUtils.cos[local5.xAngle2d] * local145 >> 16;
@Pc(185) int local185 = MathUtils.sin[local5.xAngle2d] * local145 >> 16;
local60.method4571(local5.yAngle2d, local5.zAngle2d, local5.xAngle2d, local5.xOffset2d, local185 + local5.yOffset2d - local60.getMaxY() / 2, local5.yOffset2d + local176, -1L);
if (arg4 >= 1) {
local133.method303(1);
if (arg4 >= 2) {
local133.method303(16777215);
}
SoftwareRaster.method2491(local133.pixels, 36, 32);
}
if (arg0 != 0) {
local133.method314(arg0);
}
if (local5.certificateTemplate != -1) {
local71.renderTransparent(0, 0);
} else if (local5.lentTemplate != -1) {
SoftwareRaster.method2491(local71.pixels, 36, 32);
local133.renderTransparent(0, 0);
local133 = local71;
}
if (arg3 && (local5.stackable == 1 || arg5 != 1) && arg5 != -1) {
ObjTypeList.aClass3_Sub2_Sub9_Sub1_1.renderLeft(Static52.method1288(arg5), 0, 9, 16776960, 1);
}
SoftwareRaster.method2491(local118, local120, local122);
SoftwareRaster.method2488(local125);
Rasteriser.prepare();
Rasteriser.jagged = true;
return GlRenderer.enabled && !arg1 ? new GlSprite(local133) : local133;
}
} }

View file

@ -8,8 +8,8 @@ public final class Static17 {
@OriginalMember(owner = "client!bg", name = "a", descriptor = "(Lclient!be;ZI)V") @OriginalMember(owner = "client!bg", name = "a", descriptor = "(Lclient!be;ZI)V")
public static void method531(@OriginalArg(0) Component arg0, @OriginalArg(1) boolean arg1) { public static void method531(@OriginalArg(0) Component arg0, @OriginalArg(1) boolean arg1) {
@Pc(20) int local20 = arg0.anInt486 == 0 ? arg0.anInt445 : arg0.anInt486; @Pc(20) int local20 = arg0.anInt486 == 0 ? arg0.width : arg0.anInt486;
@Pc(32) int local32 = arg0.anInt491 == 0 ? arg0.anInt459 : arg0.anInt491; @Pc(32) int local32 = arg0.anInt491 == 0 ? arg0.height : arg0.anInt491;
Static266.method4190(arg0.id, arg1, local20, local32, InterfaceList.components[arg0.id >> 16]); Static266.method4190(arg0.id, arg1, local20, local32, InterfaceList.components[arg0.id >> 16]);
if (arg0.createdComponents != null) { if (arg0.createdComponents != null) {
Static266.method4190(arg0.id, arg1, local20, local32, arg0.createdComponents); Static266.method4190(arg0.id, arg1, local20, local32, arg0.createdComponents);

View file

@ -1,25 +1,5 @@
package rt4; package rt4;
import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;
public final class Static190 { public final class Static190 {
@OriginalMember(owner = "client!pf", name = "a", descriptor = "(IIZIII)Lclient!qf;")
public static Sprite method3443(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) boolean arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
@Pc(27) int local27 = (arg2 ? 65536 : 0) + arg1 + (arg0 << 17) + (arg4 << 19);
@Pc(37) long local37 = (long) local27 * 3849834839L + (long) arg3 * 3147483667L;
@Pc(43) Sprite local43 = (Sprite) ObjTypeList.objectSpriteCache.get(local37);
if (local43 != null) {
return local43;
}
Rasteriser.textureHasTransparency = false;
local43 = Static164.method3150(arg4, false, arg1, arg2, arg0, arg3, false);
if (local43 != null && !Rasteriser.textureHasTransparency) {
ObjTypeList.objectSpriteCache.put(local43, local37);
}
return local43;
}
} }

View file

@ -55,7 +55,7 @@ public final class Static232 {
local243.id = local222.mapElement; local243.id = local222.mapElement;
Static172.aClass69_97.addTail(local243); Static172.aClass69_97.addTail(local243);
} else { } else {
MapList.sprites[local222.mapElement].renderTransparent(local65 - 7, local144 + -7); MapList.sprites[local222.mapElement].render(local65 - 7, local144 + -7);
} }
} }
} }
@ -70,7 +70,7 @@ public final class Static232 {
SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 13, local11); SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 13, local11);
SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 11, local11); SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 11, local11);
SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 9, local11); SoftwareRaster.method2502(local285.anInt4307, local285.anInt4314, 9, local11);
MapList.sprites[local285.id].renderTransparent(local285.anInt4307 - 7, local285.anInt4314 + -7); MapList.sprites[local285.id].render(local285.anInt4307 - 7, local285.anInt4314 + -7);
} }
Static172.aClass69_97.clear(); Static172.aClass69_97.clear();
} }

View file

@ -36,7 +36,7 @@ public final class Static233 {
if (local17 != null && local17.type == 2) { if (local17 != null && local17.type == 2) {
Static198.method1026(arg0 >> 1, arg4, (local17.anInt4046 - Static142.originZ << 7) + local17.anInt4047, local17.anInt4050 * 2, arg2 >> 1, local17.anInt4045 + (local17.targetX - Static225.originX << 7), arg3); Static198.method1026(arg0 >> 1, arg4, (local17.anInt4046 - Static142.originZ << 7) + local17.anInt4047, local17.anInt4050 * 2, arg2 >> 1, local17.anInt4045 + (local17.targetX - Static225.originX << 7), arg3);
if (Static65.anInt1951 > -1 && client.loop % 20 < 10) { if (Static65.anInt1951 > -1 && client.loop % 20 < 10) {
Sprites.headhints[local17.anInt4048].renderTransparent(arg1 + Static65.anInt1951 - 12, arg5 + -28 - -Static16.anInt548); Sprites.headhints[local17.anInt4048].render(arg1 + Static65.anInt1951 - 12, arg5 + -28 - -Static16.anInt548);
} }
} }
local3++; local3++;

View file

@ -53,7 +53,7 @@ public final class Static236 {
if (Static58.wheelRotation == 0) { if (Static58.wheelRotation == 0) {
return; return;
} }
local139 = arg2.anInt445; local139 = arg2.width;
if (arg4 - local139 <= arg3 && arg5 <= arg0 && arg3 < arg4 + 16 && arg1 + arg5 >= arg0) { if (arg4 - local139 <= arg3 && arg5 <= arg0 && arg3 < arg4 + 16 && arg1 + arg5 >= arg0) {
arg2.scrollY += Static58.wheelRotation * 45; arg2.scrollY += Static58.wheelRotation * 45;
InterfaceList.redraw(arg2); InterfaceList.redraw(arg2);

View file

@ -7,10 +7,7 @@ public final class Static240 {
@OriginalMember(owner = "client!tg", name = "b", descriptor = "I") @OriginalMember(owner = "client!tg", name = "b", descriptor = "I")
public static int cameraPitch; public static int cameraPitch;
@OriginalMember(owner = "client!tg", name = "c", descriptor = "I") @OriginalMember(owner = "client!tg", name = "e", descriptor = "Lclient!na;")
public static int screenLowerX;
@OriginalMember(owner = "client!tg", name = "e", descriptor = "Lclient!na;")
public static final JagString aClass100_1008 = JagString.parse("<col=00ffff>"); public static final JagString aClass100_1008 = JagString.parse("<col=00ffff>");
} }

View file

@ -6,10 +6,7 @@ import org.openrs2.deob.annotation.Pc;
public final class Static247 { public final class Static247 {
@OriginalMember(owner = "client!ub", name = "m", descriptor = "I") @OriginalMember(owner = "client!ub", name = "a", descriptor = "(IIIIIII)V")
public static int screenUpperX;
@OriginalMember(owner = "client!ub", name = "a", descriptor = "(IIIIIII)V")
public static void method4244(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) { public static void method4244(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5) {
if (TextureOp29.anInt4164 <= arg1 && TextureOp29.anInt5063 >= arg3 && TextureOp29.anInt5773 <= arg2 && arg4 <= TextureOp29.anInt2869) { if (TextureOp29.anInt4164 <= arg1 && TextureOp29.anInt5063 >= arg3 && TextureOp29.anInt5773 <= arg2 && arg4 <= TextureOp29.anInt2869) {
if (arg5 == 1) { if (arg5 == 1) {

View file

@ -99,11 +99,11 @@ public final class Static253 {
} else { } else {
Static39.aBoolean77 = true; Static39.aBoolean77 = true;
Static2.anInt7 = 0; Static2.anInt7 = 0;
local171 = Static247.screenUpperX; local171 = Rasteriser.screenUpperX;
@Pc(344) int local344 = Static1.screenLowerY; @Pc(344) int local344 = Rasteriser.screenLowerY;
local127 = Static240.screenLowerX; local127 = Rasteriser.screenLowerX;
Static150.anInt3582 = local127 + (local171 - local127) * (-arg2 + Static155.anInt3751) / arg3; Static150.anInt3582 = local127 + (local171 - local127) * (-arg2 + Static155.anInt3751) / arg3;
@Pc(361) int local361 = Static148.screenUpperY; @Pc(361) int local361 = Rasteriser.screenUpperY;
Static34.anInt1053 = (local361 - local344) * (Static60.anInt1892 - arg4) / arg0 + local344; Static34.anInt1053 = (local361 - local344) * (Static60.anInt1892 - arg4) / arg0 + local344;
} }
client.audioLoop(); client.audioLoop();
@ -204,7 +204,7 @@ public final class Static253 {
} }
Static180.method3326(arg4 >> 1, arg3, local17, arg5, local265, arg1 >> 1); Static180.method3326(arg4 >> 1, arg3, local17, arg5, local265, arg1 >> 1);
if (Static65.anInt1951 > -1) { if (Static65.anInt1951 > -1) {
Sprites.headiconPrayers[local58.prayerIcon].renderTransparent(arg2 + Static65.anInt1951 - 12, arg0 + -30 - -Static16.anInt548); Sprites.headiconPrayers[local58.prayerIcon].render(arg2 + Static65.anInt1951 - 12, arg0 + -30 - -Static16.anInt548);
} }
} }
@Pc(308) MapMarker[] local308 = Static143.hintMapMarkers; @Pc(308) MapMarker[] local308 = Static143.hintMapMarkers;
@ -218,7 +218,7 @@ public final class Static253 {
} }
Static180.method3326(arg4 >> 1, arg3, local17, arg5, local359, arg1 >> 1); Static180.method3326(arg4 >> 1, arg3, local17, arg5, local359, arg1 >> 1);
if (Static65.anInt1951 > -1) { if (Static65.anInt1951 > -1) {
Sprites.headhints[local322.anInt4048].renderTransparent(arg2 + Static65.anInt1951 - 12, Static16.anInt548 + -28 + arg0); Sprites.headhints[local322.anInt4048].render(arg2 + Static65.anInt1951 - 12, Static16.anInt548 + -28 + arg0);
} }
} }
} }
@ -229,11 +229,11 @@ public final class Static253 {
Static180.method3326(arg4 >> 1, arg3, local17, arg5, local17.method2691() + 15, arg1 >> 1); Static180.method3326(arg4 >> 1, arg3, local17, arg5, local17.method2691() + 15, arg1 >> 1);
if (Static65.anInt1951 > -1) { if (Static65.anInt1951 > -1) {
if (local77.anInt1669 != -1) { if (local77.anInt1669 != -1) {
Sprites.headiconPks[local77.anInt1669].renderTransparent(Static65.anInt1951 + arg2 - 12, arg0 + -30 + Static16.anInt548); Sprites.headiconPks[local77.anInt1669].render(Static65.anInt1951 + arg2 - 12, arg0 + -30 + Static16.anInt548);
local74 += 25; local74 += 25;
} }
if (local77.anInt1649 != -1) { if (local77.anInt1649 != -1) {
Sprites.headiconPrayers[local77.anInt1649].renderTransparent(arg2 + Static65.anInt1951 - 12, arg0 - (-Static16.anInt548 + local74)); Sprites.headiconPrayers[local77.anInt1649].render(arg2 + Static65.anInt1951 - 12, arg0 - (-Static16.anInt548 + local74));
local74 += 25; local74 += 25;
} }
} }
@ -245,7 +245,7 @@ public final class Static253 {
if (local173 != null && local173.type == 10 && PlayerList.ids[local5] == local173.actorTargetId) { if (local173 != null && local173.type == 10 && PlayerList.ids[local5] == local173.actorTargetId) {
Static180.method3326(arg4 >> 1, arg3, local17, arg5, local17.method2691() + 15, arg1 >> 1); Static180.method3326(arg4 >> 1, arg3, local17, arg5, local17.method2691() + 15, arg1 >> 1);
if (Static65.anInt1951 > -1) { if (Static65.anInt1951 > -1) {
Sprites.headhints[local173.anInt4048].renderTransparent(arg2 + Static65.anInt1951 - 12, arg0 + (Static16.anInt548 - local74)); Sprites.headhints[local173.anInt4048].render(arg2 + Static65.anInt1951 - 12, arg0 + (Static16.anInt548 - local74));
} }
} }
} }
@ -294,7 +294,7 @@ public final class Static253 {
if (Static65.anInt1951 > -1) { if (Static65.anInt1951 > -1) {
local161 = Static65.anInt1951 + arg2 - (local508.width >> 1); local161 = Static65.anInt1951 + arg2 - (local508.width >> 1);
local359 = Static16.anInt548 + arg0 - 3; local359 = Static16.anInt548 + arg0 - 3;
local508.renderTransparent(local161, local359); local508.render(local161, local359);
local639 = local508.width * local17.hitpointsBar / 255; local639 = local508.width * local17.hitpointsBar / 255;
local642 = local508.height; local642 = local508.height;
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
@ -302,7 +302,7 @@ public final class Static253 {
} else { } else {
SoftwareRaster.method2498(local161, local359, local161 + local639, local642 + local359); SoftwareRaster.method2498(local161, local359, local161 + local639, local642 + local359);
} }
local512.renderTransparent(local161, local359); local512.render(local161, local359);
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.setClip(arg2, arg0, arg1 + arg2, arg0 - -arg4); GlRaster.setClip(arg2, arg0, arg1 + arg2, arg0 - -arg4);
} else { } else {
@ -336,7 +336,7 @@ public final class Static253 {
Static16.anInt548 -= 10; Static16.anInt548 -= 10;
Static65.anInt1951 += 15; Static65.anInt1951 += 15;
} }
Sprites.hitmarks[local17.anIntArray321[local74]].renderTransparent(arg2 + Static65.anInt1951 - 12, arg0 + Static16.anInt548 - 12); Sprites.hitmarks[local17.anIntArray321[local74]].render(arg2 + Static65.anInt1951 - 12, arg0 + Static16.anInt548 - 12);
Fonts.p11Full.renderCenter(JagString.parseInt(local17.anIntArray322[local74]), Static65.anInt1951 + arg2 - 1, Static16.anInt548 + 3 + arg0, 16777215, 0); Fonts.p11Full.renderCenter(JagString.parseInt(local17.anIntArray322[local74]), Static65.anInt1951 + arg2 - 1, Static16.anInt548 + 3 + arg0, 16777215, 0);
} }
} }

View file

@ -22,11 +22,11 @@ public final class Static266 {
if (local19 != null && local19.layer == arg0) { if (local19 != null && local19.layer == arg0) {
Static150.method2801(arg3, arg2, local19, arg1); Static150.method2801(arg3, arg2, local19, arg1);
Static111.method2291(local19, arg3, arg2); Static111.method2291(local19, arg3, arg2);
if (local19.anInt486 - local19.anInt445 < local19.anInt489) { if (local19.anInt486 - local19.width < local19.anInt489) {
local19.anInt489 = local19.anInt486 - local19.anInt445; local19.anInt489 = local19.anInt486 - local19.width;
} }
if (local19.scrollY > local19.anInt491 - local19.anInt459) { if (local19.scrollY > local19.anInt491 - local19.height) {
local19.scrollY = local19.anInt491 - local19.anInt459; local19.scrollY = local19.anInt491 - local19.height;
} }
if (local19.scrollY < 0) { if (local19.scrollY < 0) {
local19.scrollY = 0; local19.scrollY = 0;

View file

@ -257,7 +257,7 @@ public final class Static269 {
WorldMap.aClass3_Sub2_Sub1_Sub1_2 = null; WorldMap.aClass3_Sub2_Sub1_Sub1_2 = null;
WorldMap.aClass3_Sub2_Sub1_Sub1_2 = new SoftwareSprite(arg3, arg2); WorldMap.aClass3_Sub2_Sub1_Sub1_2 = new SoftwareSprite(arg3, arg2);
} }
SoftwareRaster.method2491(WorldMap.aClass3_Sub2_Sub1_Sub1_2.pixels, arg3, arg2); SoftwareRaster.setSize(WorldMap.aClass3_Sub2_Sub1_Sub1_2.pixels, arg3, arg2);
Static214.method4364(arg3, 0, local61, local50, 0, local236, arg2, local211); Static214.method4364(arg3, 0, local61, local50, 0, local236, arg2, local211);
method1195(arg3, 0, local61, local236, arg2, 0, local211, local50); method1195(arg3, 0, local61, local236, arg2, 0, local211, local50);
Static38.method959(0, 0, local211, arg3, local236, local50, local61, arg2); Static38.method959(0, 0, local211, arg3, local236, local50, local61, arg2);

View file

@ -627,30 +627,4 @@ public final class Static280 {
} }
} }
@OriginalMember(owner = "client!wl", name = "a", descriptor = "(IIIIB)V")
public static void updateContainer(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
@Pc(12) Inv local12 = (Inv) Inv.objectContainerCache.get((long) arg3);
if (local12 == null) {
local12 = new Inv();
Inv.objectContainerCache.put(local12, (long) arg3);
}
if (arg1 >= local12.objectIds.length) {
@Pc(39) int[] local39 = new int[arg1 + 1];
@Pc(44) int[] local44 = new int[arg1 + 1];
@Pc(46) int local46;
for (local46 = 0; local46 < local12.objectIds.length; local46++) {
local39[local46] = local12.objectIds[local46];
local44[local46] = local12.anIntArray422[local46];
}
for (local46 = local12.objectIds.length; local46 < arg1; local46++) {
local39[local46] = -1;
local44[local46] = 0;
}
local12.objectIds = local39;
local12.anIntArray422 = local44;
}
local12.objectIds[arg1] = arg0;
local12.anIntArray422[arg1] = arg2;
}
} }

View file

@ -43,8 +43,8 @@ public final class Static36 {
local65 = arg4; local65 = arg4;
local67 = arg5; local67 = arg5;
} else { } else {
@Pc(73) int local73 = local50 + component.anInt445; @Pc(73) int local73 = local50 + component.width;
@Pc(78) int local78 = local55 + component.anInt459; @Pc(78) int local78 = local55 + component.height;
if (component.type == 9) { if (component.type == 9) {
local73++; local73++;
local78++; local78++;
@ -162,8 +162,8 @@ public final class Static36 {
WorldMap.component = component; WorldMap.component = component;
if (local221) { if (local221) {
if (Keyboard.pressedKeys[Keyboard.KEY_CTRL] && LoginManager.staffModLevel > 0) { if (Keyboard.pressedKeys[Keyboard.KEY_CTRL] && LoginManager.staffModLevel > 0) {
i = (int) ((double) (Mouse.clickX - local50 - component.anInt445 / 2) * 2.0D / (double) WorldMap.zoom); i = (int) ((double) (Mouse.clickX - local50 - component.width / 2) * 2.0D / (double) WorldMap.zoom);
skill = (int) ((double) (Mouse.clickY - local55 - component.anInt459 / 2) * 2.0D / (double) WorldMap.zoom); skill = (int) ((double) (Mouse.clickY - local55 - component.height / 2) * 2.0D / (double) WorldMap.zoom);
k = WorldMap.anInt435 + i; k = WorldMap.anInt435 + i;
@Pc(516) int local516 = WorldMap.anInt919 + skill; @Pc(516) int local516 = WorldMap.anInt919 + skill;
@Pc(520) int local520 = k + WorldMap.originX; @Pc(520) int local520 = k + WorldMap.originX;
@ -194,7 +194,7 @@ public final class Static36 {
} }
if (component.anInt453 == 1401) { if (component.anInt453 == 1401) {
if (local212) { if (local212) {
WorldMap.method2387(component.anInt445, Mouse.anInt5032 - local55, Mouse.anInt4873 - local50, component.anInt459); WorldMap.method2387(component.width, Mouse.anInt5032 - local55, Mouse.anInt4873 - local50, component.height);
} }
continue; continue;
} }
@ -459,8 +459,8 @@ public final class Static36 {
if (component.type == 8 && Mouse.anInt4873 >= local61 && Mouse.anInt5032 >= local63 && Mouse.anInt4873 < local65 && Mouse.anInt5032 < local67) { if (component.type == 8 && Mouse.anInt4873 >= local61 && Mouse.anInt5032 >= local63 && Mouse.anInt4873 < local65 && Mouse.anInt5032 < local67) {
Static43.aClass13_11 = component; Static43.aClass13_11 = component;
} }
if (component.anInt491 > component.anInt459) { if (component.anInt491 > component.height) {
Static236.method4049(Mouse.anInt5032, component.anInt459, component, Mouse.anInt4873, local50 + component.anInt445, local55, component.anInt491); Static236.method4049(Mouse.anInt5032, component.height, component, Mouse.anInt4873, local50 + component.width, local55, component.anInt491);
} }
} }
if (component.type == 0) { if (component.type == 0) {

View file

@ -107,7 +107,7 @@ public final class Static49 {
if (local59 == null) { if (local59 == null) {
local59 = Fonts.b12Full; local59 = Fonts.b12Full;
} }
local59.method2878(local24, arg2, arg1, arg0.anInt445, arg0.anInt459, arg0.color, arg0.anInt513, arg0.anInt460, arg0.anInt478, client.aRandom1, Static60.gregorianDateSeed, Static50.anIntArray132); local59.method2878(local24, arg2, arg1, arg0.width, arg0.height, arg0.color, arg0.objShadow, arg0.anInt460, arg0.anInt478, client.aRandom1, Static60.gregorianDateSeed, Static50.anIntArray132);
Static133.method4012(Static50.anIntArray132[0], Static50.anIntArray132[2], Static50.anIntArray132[1], Static50.anIntArray132[3]); Static133.method4012(Static50.anIntArray132[0], Static50.anIntArray132[2], Static50.anIntArray132[1], Static50.anIntArray132[3]);
} }

View file

@ -39,14 +39,4 @@ public final class Static52 {
} }
} }
@OriginalMember(owner = "client!eb", name = "b", descriptor = "(II)Lclient!na;")
public static JagString method1288(@OriginalArg(1) int arg0) {
if (arg0 < 100000) {
return JagString.concatenate(new JagString[] { aClass100_559, JagString.parseInt(arg0), aClass100_594 });
} else if (arg0 >= 10000000) {
return JagString.concatenate(new JagString[] { aClass100_819, JagString.parseInt(arg0 / 1000000), LocalizedText.MILLION, aClass100_594 });
} else {
return JagString.concatenate(new JagString[] { aClass100_637, JagString.parseInt(arg0 / 1000), LocalizedText.THOUSAND, aClass100_594 });
}
}
} }

View file

@ -60,8 +60,8 @@ public final class Static74 {
local17 = GameShell.canvasHeight; local17 = GameShell.canvasHeight;
local19 = GameShell.canvasWidth; local19 = GameShell.canvasWidth;
} else { } else {
local17 = local7.anInt459; local17 = local7.height;
local19 = local7.anInt445; local19 = local7.width;
} }
Static150.method2801(local17, local19, arg0, false); Static150.method2801(local17, local19, arg0, false);
Static111.method2291(arg0, local17, local19); Static111.method2291(arg0, local17, local19);

View file

@ -92,8 +92,8 @@ public final class Static87 {
if (arg8 == -1) { if (arg8 == -1) {
Static264.anIntArray410[InterfaceList.anInt766] = arg2 + local30.x; Static264.anIntArray410[InterfaceList.anInt766] = arg2 + local30.x;
Static50.anIntArray133[InterfaceList.anInt766] = local30.y + arg1; Static50.anIntArray133[InterfaceList.anInt766] = local30.y + arg1;
Static224.anIntArray443[InterfaceList.anInt766] = local30.anInt445; Static224.anIntArray443[InterfaceList.anInt766] = local30.width;
Static67.anIntArray320[InterfaceList.anInt766] = local30.anInt459; Static67.anIntArray320[InterfaceList.anInt766] = local30.height;
local57 = InterfaceList.anInt766++; local57 = InterfaceList.anInt766++;
} else { } else {
local57 = arg8; local57 = arg8;
@ -126,16 +126,16 @@ public final class Static87 {
if (local164 < Static228.anInt5103) { if (local164 < Static228.anInt5103) {
local164 = Static228.anInt5103; local164 = Static228.anInt5103;
} }
if (local164 + local30.anInt459 > Static4.aClass13_1.anInt459 + Static228.anInt5103) { if (local164 + local30.height > Static4.aClass13_1.height + Static228.anInt5103) {
local164 = Static4.aClass13_1.anInt459 + Static228.anInt5103 - local30.anInt459; local164 = Static4.aClass13_1.height + Static228.anInt5103 - local30.height;
} }
local114 = local164; local114 = local164;
local166 -= Static246.anInt5388; local166 -= Static246.anInt5388;
if (Static81.anInt2225 > local166) { if (Static81.anInt2225 > local166) {
local166 = Static81.anInt2225; local166 = Static81.anInt2225;
} }
if (Static4.aClass13_1.anInt445 + Static81.anInt2225 < local30.anInt445 + local166) { if (Static4.aClass13_1.width + Static81.anInt2225 < local30.width + local166) {
local166 = Static4.aClass13_1.anInt445 + Static81.anInt2225 - local30.anInt445; local166 = Static4.aClass13_1.width + Static81.anInt2225 - local30.width;
} }
local123 = local166; local123 = local166;
} }
@ -155,8 +155,8 @@ public final class Static87 {
} else { } else {
local164 = local114 > arg6 ? local114 : arg6; local164 = local114 > arg6 ? local114 : arg6;
local166 = arg0 < local123 ? local123 : arg0; local166 = arg0 < local123 ? local123 : arg0;
local270 = local30.anInt445 + local123; local270 = local30.width + local123;
local276 = local114 + local30.anInt459; local276 = local114 + local30.height;
if (local30.type == 9) { if (local30.type == 9) {
local276++; local276++;
local270++; local270++;
@ -172,13 +172,13 @@ public final class Static87 {
@Pc(556) int local556; @Pc(556) int local556;
@Pc(563) int local563; @Pc(563) int local563;
@Pc(571) int local571; @Pc(571) int local571;
@Pc(545) int local545; @Pc(545) int objId;
if (local30.anInt453 != 0) { if (local30.anInt453 != 0) {
if (local30.anInt453 == 1337 || local30.anInt453 == 1403 && GlRenderer.enabled) { if (local30.anInt453 == 1337 || local30.anInt453 == 1403 && GlRenderer.enabled) {
Static280.aClass13_26 = local30; Static280.aClass13_26 = local30;
Static214.anInt5574 = local114; Static214.anInt5574 = local114;
Static97.anInt2503 = local123; Static97.anInt2503 = local123;
Static253.method4326(local30.anInt459, local30.anInt453 == 1403, local123, local30.anInt445, local114); Static253.method4326(local30.height, local30.anInt453 == 1403, local123, local30.width, local114);
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.setClip(arg0, arg6, arg4, arg7); GlRaster.setClip(arg0, arg6, arg4, arg7);
} else { } else {
@ -205,17 +205,17 @@ public final class Static87 {
if (local270 < local468 || local270 > local468 + local30.anIntArray45[local276]) { if (local270 < local468 || local270 > local468 + local30.anIntArray45[local276]) {
continue; continue;
} }
local276 -= local30.anInt459 / 2; local276 -= local30.height / 2;
memory = (int)Camera.yawTarget + Static59.anInt1814 & 0x7FF; memory = (int)Camera.yawTarget + Static59.anInt1814 & 0x7FF;
local270 -= local30.anInt445 / 2; local270 -= local30.width / 2;
color = MathUtils.sin[memory]; color = MathUtils.sin[memory];
cardMemory = MathUtils.cos[memory]; cardMemory = MathUtils.cos[memory];
color = (MiniMap.anInt4130 + 256) * color >> 8; color = (MiniMap.anInt4130 + 256) * color >> 8;
cardMemory = (MiniMap.anInt4130 + 256) * cardMemory >> 8; cardMemory = (MiniMap.anInt4130 + 256) * cardMemory >> 8;
local545 = cardMemory * local276 - color * local270 >> 11; objId = cardMemory * local276 - color * local270 >> 11;
local556 = local276 * color + local270 * cardMemory >> 11; local556 = local276 * color + local270 * cardMemory >> 11;
local563 = PlayerList.self.xFine + local556 >> 7; local563 = PlayerList.self.xFine + local556 >> 7;
local571 = PlayerList.self.zFine - local545 >> 7; local571 = PlayerList.self.zFine - objId >> 7;
if (Static241.aBoolean302 && (MiniMenu.anInt4999 & 0x40) != 0) { if (Static241.aBoolean302 && (MiniMenu.anInt4999 & 0x40) != 0) {
@Pc(583) Component local583 = Static201.method1418(MiniMenu.anInt2512, MiniMenu.anInt506); @Pc(583) Component local583 = Static201.method1418(MiniMenu.anInt2512, MiniMenu.anInt506);
if (local583 == null) { if (local583 == null) {
@ -243,7 +243,7 @@ public final class Static87 {
continue; continue;
} }
if (local30.anInt453 == 1400) { if (local30.anInt453 == 1400) {
Static269.method2225(local123, local114, local30.anInt459, local30.anInt445); Static269.method2225(local123, local114, local30.height, local30.width);
Static186.aBooleanArray100[local57] = true; Static186.aBooleanArray100[local57] = true;
InterfaceList.rectangleRedraw[local57] = true; InterfaceList.rectangleRedraw[local57] = true;
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
@ -254,7 +254,7 @@ public final class Static87 {
continue; continue;
} }
if (local30.anInt453 == 1401) { if (local30.anInt453 == 1401) {
Static1.method4(local123, local30.anInt459, local30.anInt445, local114); Static1.method4(local123, local30.height, local30.width, local114);
Static186.aBooleanArray100[local57] = true; Static186.aBooleanArray100[local57] = true;
InterfaceList.rectangleRedraw[local57] = true; InterfaceList.rectangleRedraw[local57] = true;
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
@ -276,7 +276,7 @@ public final class Static87 {
if (!Cheat.displayFps) { if (!Cheat.displayFps) {
continue; continue;
} }
local270 = local30.anInt445 + local123; local270 = local30.width + local123;
local276 = local114 + 15; local276 = local114 + 15;
Fonts.p12Full.renderRight(JagString.concatenate(new JagString[] { Cheat.DEBUG_FPS2, JagString.parseInt((int)GameShell.framesPerSecond) }), local270, local276, 16776960, 0); Fonts.p12Full.renderRight(JagString.concatenate(new JagString[] { Cheat.DEBUG_FPS2, JagString.parseInt((int)GameShell.framesPerSecond) }), local270, local276, 16776960, 0);
local276 += 15; local276 += 15;
@ -298,15 +298,15 @@ public final class Static87 {
local276 += 15; local276 += 15;
} }
cardMemory = 0; cardMemory = 0;
local545 = 0; objId = 0;
local556 = 0; local556 = 0;
for (local563 = 0; local563 < 28; local563++) { for (local563 = 0; local563 < 28; local563++) {
cardMemory += client.js5Providers[local563].method535(); cardMemory += client.js5Providers[local563].method535();
local556 += client.js5Providers[local563].method529(); local556 += client.js5Providers[local563].method529();
local545 += client.js5Providers[local563].method533(); objId += client.js5Providers[local563].method533();
} }
local571 = local556 * 10000 / cardMemory; local571 = local556 * 10000 / cardMemory;
local563 = local545 * 100 / cardMemory; local563 = objId * 100 / cardMemory;
@Pc(968) JagString local968 = JagString.concatenate(new JagString[] { Cheat.DEBUG_CAHE, Static182.valueToBase10String(0, true, 2, (long) local571), Static147.aClass100_672, JagString.parseInt(local563), Static14.aClass100_80 }); @Pc(968) JagString local968 = JagString.concatenate(new JagString[] { Cheat.DEBUG_CAHE, Static182.valueToBase10String(0, true, 2, (long) local571), Static147.aClass100_672, JagString.parseInt(local563), Static14.aClass100_80 });
Fonts.p11Full.renderRight(local968, local270, local276, 16776960, 0); Fonts.p11Full.renderRight(local968, local270, local276, 16776960, 0);
local276 += 12; local276 += 12;
@ -338,8 +338,8 @@ public final class Static87 {
continue; continue;
} }
if (!local30.usingScripts) { if (!local30.usingScripts) {
if (local30.anInt491 - local30.anInt459 < local30.scrollY) { if (local30.anInt491 - local30.height < local30.scrollY) {
local30.scrollY = local30.anInt491 - local30.anInt459; local30.scrollY = local30.anInt491 - local30.height;
} }
if (local30.scrollY < 0) { if (local30.scrollY < 0) {
local30.scrollY = 0; local30.scrollY = 0;
@ -368,99 +368,118 @@ public final class Static87 {
} }
} }
if (Static223.aBooleanArray116[local57] || Cheat.rectDebug > 1) { if (Static223.aBooleanArray116[local57] || Cheat.rectDebug > 1) {
if (local30.type == 0 && !local30.usingScripts && local30.anInt491 > local30.anInt459) { if (local30.type == 0 && !local30.usingScripts && local30.anInt491 > local30.height) {
Static74.method1624(local30.scrollY, local30.anInt491, local30.anInt445 + local123, local114, local30.anInt459); Static74.method1624(local30.scrollY, local30.anInt491, local30.width + local123, local114, local30.height);
} }
if (local30.type != 1) { if (local30.type != 1) {
if (local30.type == 2) { if (local30.type == 2) {
local270 = 0; local270 = 0;
for (local276 = 0; local276 < local30.baseHeight; local276++) { for (local276 = 0; local276 < local30.baseHeight; local276++) {
for (local468 = 0; local468 < local30.baseWidth; local468++) { for (local468 = 0; local468 < local30.baseWidth; local468++) {
color = local114 + local276 * (local30.anInt516 + 32); int y = local114 + local276 * (local30.anInt516 + 32);
memory = (local30.anInt512 + 32) * local468 + local123; int x = (local30.anInt512 + 32) * local468 + local123;
if (local270 < 20) { if (local270 < 20) {
color += local30.anIntArray47[local270]; y += local30.anIntArray47[local270];
memory += local30.anIntArray41[local270]; x += local30.anIntArray41[local270];
} }
if (local30.objTypes[local270] > 0) { if (local30.objTypes[local270] > 0) {
local545 = local30.objTypes[local270] - 1; objId = local30.objTypes[local270] - 1;
if (arg0 < memory + 32 && memory < arg4 && arg6 < color + 32 && color < arg7 || local30 == Static118.aClass13_15 && Static4.anInt36 == local270) { if (arg0 < x + 32 && x < arg4 && arg6 < y + 32 && y < arg7 || local30 == Static118.aClass13_15 && Static4.anInt36 == local270) {
@Pc(1476) Sprite local1476; @Pc(1476) Sprite sprite;
if (MiniMenu.anInt5014 == 1 && Static185.anInt4370 == local270 && local30.id == Static224.anInt5062) { if (MiniMenu.anInt5014 == 1 && Static185.anInt4370 == local270 && local30.id == Static224.anInt5062) {
local1476 = Static190.method3443(2, local545, local30.aBoolean31, local30.objCounts[local270], 0); sprite = Inv.getObjectSprite(2, objId, local30.objDrawText, local30.objCounts[local270], 0);
} else { } else {
local1476 = Static190.method3443(1, local545, local30.aBoolean31, local30.objCounts[local270], 3153952); sprite = Inv.getObjectSprite(1, objId, local30.objDrawText, local30.objCounts[local270], 3153952);
} }
if (Rasteriser.textureHasTransparency) { if (Rasteriser.textureHasTransparency) {
Static186.aBooleanArray100[local57] = true; Static186.aBooleanArray100[local57] = true;
} }
if (local1476 == null) {
if (sprite == null) {
InterfaceList.redraw(local30); InterfaceList.redraw(local30);
} else if (Static118.aClass13_15 == local30 && local270 == Static4.anInt36) { } else if (Static118.aClass13_15 == local30 && local270 == Static4.anInt36) {
cardMemory = Mouse.anInt4873 - Static149.anInt3554; int dragX = Mouse.anInt4873 - Static149.anInt3554;
local556 = Mouse.anInt5032 - Static206.anInt4773; int dragY = Mouse.anInt5032 - Static206.anInt4773;
if (local556 < 5 && local556 > -5) { if (dragY < 5 && dragY > -5) {
local556 = 0; dragY = 0;
} }
if (cardMemory < 5 && cardMemory > -5) {
cardMemory = 0; if (dragX < 5 && dragX > -5) {
dragX = 0;
} }
if (Static78.anInt2145 < 5) { if (Static78.anInt2145 < 5) {
cardMemory = 0; dragX = 0;
local556 = 0; dragY = 0;
} }
local1476.method1417(memory + cardMemory, color - -local556, 128);
// draw dragged icon (at half opacity)
sprite.renderAlpha(x + dragX, y + dragY, 128);
if (arg5 != -1) { if (arg5 != -1) {
@Pc(1571) Component local1571 = arg3[arg5 & 0xFFFF]; @Pc(1571) Component local1571 = arg3[arg5 & 0xFFFF];
@Pc(1577) int local1577; @Pc(1577) int top;
@Pc(1575) int local1575; @Pc(1575) int bottom;
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
local1575 = GlRaster.anInt1441; bottom = GlRaster.clipBottom;
local1577 = GlRaster.clipY; top = GlRaster.clipTop;
} else { } else {
local1577 = SoftwareRaster.clipTop; top = SoftwareRaster.clipTop;
local1575 = SoftwareRaster.clipBottom; bottom = SoftwareRaster.clipBottom;
} }
@Pc(1611) int local1611; @Pc(1611) int local1611;
if (local1577 > local556 + color && local1571.scrollY > 0) { if (top > dragY + y && local1571.scrollY > 0) {
local1611 = Static178.anInt4247 * (local1577 - local556 - color) / 3; local1611 = Static178.anInt4247 * (top - dragY - y) / 3;
if (local1611 > Static178.anInt4247 * 10) { if (local1611 > Static178.anInt4247 * 10) {
local1611 = Static178.anInt4247 * 10; local1611 = Static178.anInt4247 * 10;
} }
if (local1611 > local1571.scrollY) { if (local1611 > local1571.scrollY) {
local1611 = local1571.scrollY; local1611 = local1571.scrollY;
} }
local1571.scrollY -= local1611; local1571.scrollY -= local1611;
Static206.anInt4773 += local1611; Static206.anInt4773 += local1611;
InterfaceList.redraw(local1571); InterfaceList.redraw(local1571);
} }
if (local1575 < local556 + color + 32 && local1571.scrollY < local1571.anInt491 - local1571.anInt459) {
local1611 = (color + local556 + 32 - local1575) * Static178.anInt4247 / 3; if (bottom < dragY + y + 32 && local1571.scrollY < local1571.anInt491 - local1571.height) {
local1611 = (y + dragY + 32 - bottom) * Static178.anInt4247 / 3;
if (local1611 > Static178.anInt4247 * 10) { if (local1611 > Static178.anInt4247 * 10) {
local1611 = Static178.anInt4247 * 10; local1611 = Static178.anInt4247 * 10;
} }
if (local1571.anInt491 - local1571.scrollY - local1571.anInt459 < local1611) {
local1611 = local1571.anInt491 - local1571.anInt459 - local1571.scrollY; if (local1571.anInt491 - local1571.scrollY - local1571.height < local1611) {
local1611 = local1571.anInt491 - local1571.height - local1571.scrollY;
} }
local1571.scrollY += local1611; local1571.scrollY += local1611;
Static206.anInt4773 -= local1611; Static206.anInt4773 -= local1611;
InterfaceList.redraw(local1571); InterfaceList.redraw(local1571);
} }
} }
} else if (local30 == MiniMenu.aClass13_7 && local270 == Static250.anInt5444) { } else if (local30 == MiniMenu.aClass13_7 && local270 == Static250.anInt5444) {
local1476.method1417(memory, color, 128); sprite.renderAlpha(x, y, 128);
} else { } else {
local1476.renderTransparent(memory, color); sprite.render(x, y);
// downscale:
// sprite.renderResized(x, y, 36, 32);
} }
} }
} else if (local30.anIntArray36 != null && local270 < 20) { } else if (local30.anIntArray36 != null && local270 < 20) {
@Pc(1381) Sprite local1381 = local30.method482(local270); @Pc(1381) Sprite local1381 = local30.method482(local270);
if (local1381 != null) { if (local1381 != null) {
local1381.renderTransparent(memory, color); local1381.render(x, y);
} else if (Static211.aBoolean72) { } else if (Static211.aBoolean72) {
InterfaceList.redraw(local30); InterfaceList.redraw(local30);
} }
} }
local270++; local270++;
} }
} }
@ -479,25 +498,25 @@ public final class Static87 {
if (local117 == 0) { if (local117 == 0) {
if (local30.aBoolean30) { if (local30.aBoolean30) {
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.method1186(local123, local114, local30.anInt445, local30.anInt459, local270); GlRaster.method1186(local123, local114, local30.width, local30.height, local270);
} else { } else {
SoftwareRaster.fillRect(local123, local114, local30.anInt445, local30.anInt459, local270); SoftwareRaster.fillRect(local123, local114, local30.width, local30.height, local270);
} }
} else if (GlRenderer.enabled) { } else if (GlRenderer.enabled) {
GlRaster.method1179(local123, local114, local30.anInt445, local30.anInt459, local270); GlRaster.method1179(local123, local114, local30.width, local30.height, local270);
} else { } else {
SoftwareRaster.drawRect(local123, local114, local30.anInt445, local30.anInt459, local270); SoftwareRaster.drawRect(local123, local114, local30.width, local30.height, local270);
} }
} else if (local30.aBoolean30) { } else if (local30.aBoolean30) {
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.fillRectAlpha(local123, local114, local30.anInt445, local30.anInt459, local270, 256 - (local117 & 0xFF)); GlRaster.fillRectAlpha(local123, local114, local30.width, local30.height, local270, 256 - (local117 & 0xFF));
} else { } else {
SoftwareRaster.fillRectAlpha(local123, local114, local30.anInt445, local30.anInt459, local270, 256 - (local117 & 0xFF)); SoftwareRaster.fillRectAlpha(local123, local114, local30.width, local30.height, local270, 256 - (local117 & 0xFF));
} }
} else if (GlRenderer.enabled) { } else if (GlRenderer.enabled) {
GlRaster.method1180(local123, local114, local30.anInt445, local30.anInt459, local270, 256 - (local117 & 0xFF)); GlRaster.method1180(local123, local114, local30.width, local30.height, local270, 256 - (local117 & 0xFF));
} else { } else {
SoftwareRaster.method2487(local123, local114, local30.anInt445, local30.anInt459, local270, 256 - (local117 & 0xFF)); SoftwareRaster.method2487(local123, local114, local30.width, local30.height, local270, 256 - (local117 & 0xFF));
} }
} else { } else {
@Pc(1921) Font local1921; @Pc(1921) Font local1921;
@ -536,29 +555,33 @@ public final class Static87 {
if (!local30.usingScripts) { if (!local30.usingScripts) {
local1934 = Static127.method2465(local30, local1934); local1934 = Static127.method2465(local30, local1934);
} }
local1921.method2852(local1934, local123, local114, local30.anInt445, local30.anInt459, local276, local30.aBoolean28 ? 0 : -1, local30.anInt460, local30.anInt478, local30.anInt467); local1921.method2852(local1934, local123, local114, local30.width, local30.height, local276, local30.aBoolean28 ? 0 : -1, local30.anInt460, local30.anInt478, local30.anInt467);
} else if (Static211.aBoolean72) { } else if (Static211.aBoolean72) {
InterfaceList.redraw(local30); InterfaceList.redraw(local30);
} }
} else if (local30.type == 5) { } else if (local30.type == 5) {
@Pc(2094) Sprite local2094; @Pc(2094) Sprite sprite = null;
if (local30.usingScripts) { if (local30.usingScripts) {
if (local30.objId == -1) { if (local30.objId == -1) {
local2094 = local30.method489(false); sprite = local30.method489(false);
} else { } else {
local2094 = Static190.method3443(local30.anInt514, local30.objId, local30.aBoolean31, local30.objCount, local30.anInt513); sprite = Inv.getObjectSprite(local30.objSelected, local30.objId, local30.objDrawText, local30.objCount, local30.objShadow);
} }
if (local2094 != null) {
local276 = local2094.anInt1860; if (sprite != null) {
local468 = local2094.anInt1866; local276 = sprite.anInt1860;
local468 = sprite.anInt1866;
if (local30.aBoolean23) { if (local30.aBoolean23) {
memory = (local276 + local30.anInt445 - 1) / local276; memory = (local276 + local30.width - 1) / local276;
color = (local30.anInt459 + local468 - 1) / local468; color = (local30.height + local468 - 1) / local468;
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
GlRaster.method1183(local123, local114, local30.anInt445 + local123, local30.anInt459 + local114); GlRaster.method1183(local123, local114, local30.width + local123, local30.height + local114);
@Pc(2274) boolean local2274 = Static209.method3702(local2094.width);
@Pc(2279) boolean local2279 = Static209.method3702(local2094.height); @Pc(2274) boolean local2274 = Static209.method3702(sprite.width);
@Pc(2282) GlSprite local2282 = (GlSprite) local2094; @Pc(2279) boolean local2279 = Static209.method3702(sprite.height);
@Pc(2282) GlSprite local2282 = (GlSprite) sprite;
if (local2274 && local2279) { if (local2274 && local2279) {
if (local117 == 0) { if (local117 == 0) {
local2282.method1429(local123, local114, memory, color); local2282.method1429(local123, local114, memory, color);
@ -585,48 +608,51 @@ public final class Static87 {
for (local563 = 0; local563 < memory; local563++) { for (local563 = 0; local563 < memory; local563++) {
for (local571 = 0; local571 < color; local571++) { for (local571 = 0; local571 < color; local571++) {
if (local117 == 0) { if (local117 == 0) {
local2094.renderTransparent(local123 + local276 * local563, local468 * local571 + local114); sprite.render(local123 + local276 * local563, local468 * local571 + local114);
} else { } else {
local2094.method1417(local563 * local276 + local123, local468 * local571 + local114, 256 - (local117 & 0xFF)); sprite.renderAlpha(local563 * local276 + local123, local468 * local571 + local114, 256 - (local117 & 0xFF));
} }
} }
} }
} }
GlRaster.setClip(arg0, arg6, arg4, arg7); GlRaster.setClip(arg0, arg6, arg4, arg7);
} else { } else {
SoftwareRaster.method2498(local123, local114, local123 + local30.anInt445, local114 - -local30.anInt459); SoftwareRaster.method2498(local123, local114, local123 + local30.width, local114 - -local30.height);
for (cardMemory = 0; cardMemory < memory; cardMemory++) { for (cardMemory = 0; cardMemory < memory; cardMemory++) {
for (local556 = 0; local556 < color; local556++) { for (local556 = 0; local556 < color; local556++) {
if (local30.anInt521 != 0) { if (local30.anInt521 != 0) {
local2094.method1420(local114 + local468 * local556 + local468 / 2, local30.anInt521, 4096, cardMemory * local276 + local123 + local276 / 2); sprite.method1420(local114 + local468 * local556 + local468 / 2, local30.anInt521, 4096, cardMemory * local276 + local123 + local276 / 2);
} else if (local117 == 0) { } else if (local117 == 0) {
local2094.renderTransparent(cardMemory * local276 + local123, local468 * local556 + local114); sprite.render(cardMemory * local276 + local123, local468 * local556 + local114);
} else { } else {
local2094.method1417(cardMemory * local276 + local123, local114 + local556 * local468, 256 - (local117 & 0xFF)); sprite.renderAlpha(cardMemory * local276 + local123, local114 + local556 * local468, 256 - (local117 & 0xFF));
} }
} }
} }
SoftwareRaster.setClip(arg0, arg6, arg4, arg7); SoftwareRaster.setClip(arg0, arg6, arg4, arg7);
} }
} else { } else {
memory = local30.anInt445 * 4096 / local276; memory = local30.width * 4096 / local276;
if (local30.anInt521 != 0) { if (local30.anInt521 != 0) {
local2094.method1420(local114 + local30.anInt459 / 2, local30.anInt521, memory, local123 + local30.anInt445 / 2); sprite.method1420(local114 + local30.height / 2, local30.anInt521, memory, local123 + local30.width / 2);
} else if (local117 != 0) { } else if (local117 != 0) {
local2094.method1422(local123, local114, local30.anInt445, local30.anInt459, 256 - (local117 & 0xFF)); sprite.method1422(local123, local114, local30.width, local30.height, 256 - (local117 & 0xFF));
} else if (local276 == local30.anInt445 && local468 == local30.anInt459) { } else if (local276 == local30.width && local468 == local30.height) {
local2094.renderTransparent(local123, local114); sprite.render(local123, local114);
} else { } else {
local2094.renderResizedTransparent(local123, local114, local30.anInt445, local30.anInt459); // render icons in a container i.e bank icons
sprite.renderResized(local123, local114, local30.width, local30.height);
} }
} }
} else if (Static211.aBoolean72) { } else if (Static211.aBoolean72) {
InterfaceList.redraw(local30); InterfaceList.redraw(local30);
} }
} else { } else {
local2094 = local30.method489(Static154.method2926(local30)); sprite = local30.method489(Static154.method2926(local30));
if (local2094 != null) { if (sprite != null) {
local2094.renderTransparent(local123, local114); sprite.render(local123, local114);
} else if (Static211.aBoolean72) { } else if (Static211.aBoolean72) {
InterfaceList.redraw(local30); InterfaceList.redraw(local30);
} }
@ -682,22 +708,22 @@ public final class Static87 {
} }
if (local2589 != null) { if (local2589 != null) {
if (local30.anInt451 > 0) { if (local30.anInt451 > 0) {
color = (local30.anInt445 << 8) / local30.anInt451; color = (local30.width << 8) / local30.anInt451;
} else { } else {
color = 256; color = 256;
} }
if (local30.anInt526 <= 0) { if (local30.anInt526 <= 0) {
cardMemory = 256; cardMemory = 256;
} else { } else {
cardMemory = (local30.anInt459 << 8) / local30.anInt526; cardMemory = (local30.height << 8) / local30.anInt526;
} }
local556 = local123 + local30.anInt445 / 2 + (color * local30.anInt495 >> 8); local556 = local123 + local30.width / 2 + (color * local30.anInt495 >> 8);
local545 = local30.anInt459 / 2 + local114 + (cardMemory * local30.anInt481 >> 8); objId = local30.height / 2 + local114 + (cardMemory * local30.anInt481 >> 8);
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
if (local30.aBoolean22) { if (local30.aBoolean22) {
GlRenderer.method4182(local556, local545, local30.modelZoom, local30.aShort11, color, cardMemory); GlRenderer.method4182(local556, objId, local30.modelZoom, local30.aShort11, color, cardMemory);
} else { } else {
GlRenderer.method4148(local556, local545, color, cardMemory); GlRenderer.method4148(local556, objId, color, cardMemory);
GlRenderer.method4152((float) local30.aShort10, (float) local30.aShort11 * 1.5F); GlRenderer.method4152((float) local30.aShort10, (float) local30.aShort11 * 1.5F);
} }
GlRenderer.restoreLighting(); GlRenderer.restoreLighting();
@ -716,23 +742,23 @@ public final class Static87 {
local563 = MathUtils.sin[local30.modelXAngle] * local30.modelZoom >> 16; local563 = MathUtils.sin[local30.modelXAngle] * local30.modelZoom >> 16;
local571 = local30.modelZoom * MathUtils.cos[local30.modelXAngle] >> 16; local571 = local30.modelZoom * MathUtils.cos[local30.modelXAngle] >> 16;
if (local30.usingScripts) { if (local30.usingScripts) {
local2589.method4571(local30.modelYAngle, local30.modelYOffset, local30.modelXAngle, local30.modelXOffset, local30.modelZOffset + local563 + memory, local30.modelZOffset + local571, -1L); local2589.setCamera(local30.modelYAngle, local30.modelYOffset, local30.modelXAngle, local30.modelXOffset, local30.modelZOffset + local563 + memory, local30.modelZOffset + local571, -1L);
} else { } else {
local2589.method4571(local30.modelYAngle, 0, local30.modelXAngle, 0, local563, local571, -1L); local2589.setCamera(local30.modelYAngle, 0, local30.modelXAngle, 0, local563, local571, -1L);
} }
if (local30.aBoolean34) { if (local30.aBoolean34) {
GlRenderer.enableDepthMask(); GlRenderer.enableDepthMask();
} }
} else { } else {
Rasteriser.setBounds(local556, local545); Rasteriser.setBounds(local556, objId);
local563 = MathUtils.sin[local30.modelXAngle] * local30.modelZoom >> 16; local563 = MathUtils.sin[local30.modelXAngle] * local30.modelZoom >> 16;
local571 = local30.modelZoom * MathUtils.cos[local30.modelXAngle] >> 16; local571 = local30.modelZoom * MathUtils.cos[local30.modelXAngle] >> 16;
if (!local30.usingScripts) { if (!local30.usingScripts) {
local2589.method4571(local30.modelYAngle, 0, local30.modelXAngle, 0, local563, local571, -1L); local2589.setCamera(local30.modelYAngle, 0, local30.modelXAngle, 0, local563, local571, -1L);
} else if (local30.aBoolean22) { } else if (local30.aBoolean22) {
((SoftwareModel) local2589).method4591(local30.modelYAngle, local30.modelYOffset, local30.modelXAngle, local30.modelXOffset, local30.modelZOffset + memory + local563, local571 + local30.modelZOffset, local30.modelZoom); ((SoftwareModel) local2589).method4591(local30.modelYAngle, local30.modelYOffset, local30.modelXAngle, local30.modelXOffset, local30.modelZOffset + memory + local563, local571 + local30.modelZOffset, local30.modelZoom);
} else { } else {
local2589.method4571(local30.modelYAngle, local30.modelYOffset, local30.modelXAngle, local30.modelXOffset, local30.modelZOffset + local563 + memory, local571 + local30.modelZOffset, -1L); local2589.setCamera(local30.modelYAngle, local30.modelYOffset, local30.modelXAngle, local30.modelXOffset, local30.modelZOffset + local563 + memory, local571 + local30.modelZOffset, -1L);
} }
Rasteriser.prepareOffsets(); Rasteriser.prepareOffsets();
} }
@ -758,13 +784,13 @@ public final class Static87 {
local3159 = JagString.concatenate(new JagString[] { MiniMenu.aClass100_32, local2611.name, Static54.aClass100_375, Static70.method1548(local30.objCounts[local276]) }); local3159 = JagString.concatenate(new JagString[] { MiniMenu.aClass100_32, local2611.name, Static54.aClass100_375, Static70.method1548(local30.objCounts[local276]) });
} }
local556 = local123 + memory * (local30.anInt512 + 115); local556 = local123 + memory * (local30.anInt512 + 115);
local545 = (local30.anInt516 + 12) * local468 + local114; objId = (local30.anInt516 + 12) * local468 + local114;
if (local30.anInt460 == 0) { if (local30.anInt460 == 0) {
local1921.renderLeft(local3159, local556, local545, local30.color, local30.aBoolean28 ? 0 : -1); local1921.renderLeft(local3159, local556, objId, local30.color, local30.aBoolean28 ? 0 : -1);
} else if (local30.anInt460 == 1) { } else if (local30.anInt460 == 1) {
local1921.renderCenter(local3159, local556 + 57, local545, local30.color, local30.aBoolean28 ? 0 : -1); local1921.renderCenter(local3159, local556 + 57, objId, local30.color, local30.aBoolean28 ? 0 : -1);
} else { } else {
local1921.renderRight(local3159, local556 + 115 - 1, local545, local30.color, local30.aBoolean28 ? 0 : -1); local1921.renderRight(local3159, local556 + 115 - 1, objId, local30.color, local30.aBoolean28 ? 0 : -1);
} }
} }
local276++; local276++;
@ -793,13 +819,13 @@ public final class Static87 {
local270 = local556; local270 = local556;
} }
} }
local556 = local114 + local30.anInt459 + 5; local556 = local114 + local30.height + 5;
local270 += 6; local270 += 6;
local276 += 7; local276 += 7;
if (local556 + local276 > arg7) { if (local556 + local276 > arg7) {
local556 = arg7 - local276; local556 = arg7 - local276;
} }
cardMemory = local123 + local30.anInt445 - local270 - 5; cardMemory = local123 + local30.width - local270 - 5;
if (cardMemory < local123 + 5) { if (cardMemory < local123 + 5) {
cardMemory = local123 + 5; cardMemory = local123 + 5;
} }
@ -814,7 +840,7 @@ public final class Static87 {
SoftwareRaster.drawRect(cardMemory, local556, local270, local276, 0); SoftwareRaster.drawRect(cardMemory, local556, local270, local276, 0);
} }
local3297 = local30.text; local3297 = local30.text;
local545 = local556 + local3299.lineHeight + 2; objId = local556 + local3299.lineHeight + 2;
local3297 = Static127.method2465(local30, local3297); local3297 = Static127.method2465(local30, local3297);
while (local3297.length() > 0) { while (local3297.length() > 0) {
local563 = local3297.indexOf(Static269.aClass100_556); local563 = local3297.indexOf(Static269.aClass100_556);
@ -825,19 +851,19 @@ public final class Static87 {
local3325 = local3297.substring(local563, 0); local3325 = local3297.substring(local563, 0);
local3297 = local3297.substring(local563 + 4); local3297 = local3297.substring(local563 + 4);
} }
local3299.renderLeft(local3325, cardMemory + 3, local545, 0, -1); local3299.renderLeft(local3325, cardMemory + 3, objId, 0, -1);
local545 += local3299.lineHeight + 1; objId += local3299.lineHeight + 1;
} }
} }
if (local30.type == 9) { if (local30.type == 9) {
if (local30.aBoolean20) { if (local30.aBoolean20) {
local468 = local123 + local30.anInt445; local468 = local123 + local30.width;
local276 = local114 + local30.anInt459; local276 = local114 + local30.height;
memory = local114; memory = local114;
} else { } else {
local276 = local114; local276 = local114;
memory = local114 + local30.anInt459; memory = local114 + local30.height;
local468 = local123 + local30.anInt445; local468 = local123 + local30.width;
} }
if (local30.anInt490 == 1) { if (local30.anInt490 == 1) {
if (GlRenderer.enabled) { if (GlRenderer.enabled) {

View file

@ -28,7 +28,7 @@ public final class Static97 {
if (local13 > 360000) { if (local13 > 360000) {
return; return;
} }
@Pc(30) int local30 = Math.min(arg5.anInt445 / 2, arg5.anInt459 / 2); @Pc(30) int local30 = Math.min(arg5.width / 2, arg5.height / 2);
if (local30 * local30 >= local13) { if (local30 * local30 >= local13) {
MiniMap.method1446(arg5, Sprites.mapmarkhints[arg0], arg4, arg3, arg1, arg2); MiniMap.method1446(arg5, Sprites.mapmarkhints[arg0], arg4, arg3, arg1, arg2);
return; return;
@ -45,9 +45,9 @@ public final class Static97 {
@Pc(117) int local117 = (int) (Math.sin(local110) * (double) local30); @Pc(117) int local117 = (int) (Math.sin(local110) * (double) local30);
@Pc(124) int local124 = (int) (Math.cos(local110) * (double) local30); @Pc(124) int local124 = (int) (Math.cos(local110) * (double) local30);
if (GlRenderer.enabled) { if (GlRenderer.enabled) {
((GlSprite) Static277.hintMapEdge[arg0]).method1428((arg5.anInt445 / 2 + arg2 + local117) * 16, (arg5.anInt459 / 2 + arg1 - local124) * 16, (int) (local110 * 10430.378D)); ((GlSprite) Static277.hintMapEdge[arg0]).method1428((arg5.width / 2 + arg2 + local117) * 16, (arg5.height / 2 + arg1 - local124) * 16, (int) (local110 * 10430.378D));
} else { } else {
((SoftwareSprite) Static277.hintMapEdge[arg0]).method306(local117 + arg5.anInt445 / 2 + arg2 - 10, arg5.anInt459 / 2 + -10 + arg1 + -local124, local110); ((SoftwareSprite) Static277.hintMapEdge[arg0]).method306(local117 + arg5.width / 2 + arg2 - 10, arg5.height / 2 + -10 + arg1 + -local124, local110);
} }
} }

View file

@ -36,7 +36,7 @@ public class TitleScreen {
@Pc(20) int height = GameShell.canvasHeight; @Pc(20) int height = GameShell.canvasHeight;
@Pc(26) int width = height * 956 / 503; @Pc(26) int width = height * 956 / 503;
titleBg = SpriteLoader.loadSpriteAutoDetect(archive, bgId); titleBg = SpriteLoader.loadSpriteAutoDetect(archive, bgId);
titleBg.renderResizedTransparent((GameShell.canvasWidth - width) / 2, 0, width, height); titleBg.renderResized((GameShell.canvasWidth - width) / 2, 0, width, height);
logo = SpriteLoader.loadIndexedSpriteAutoDetect(logoId, archive); logo = SpriteLoader.loadIndexedSpriteAutoDetect(logoId, archive);
logo.renderTransparent(GameShell.canvasWidth / 2 - logo.width / 2, 18); logo.renderTransparent(GameShell.canvasWidth / 2 - logo.width / 2, 18);
loaded = true; loaded = true;

View file

@ -1054,22 +1054,22 @@ public class WorldMap {
@OriginalMember(owner = "client!gf", name = "a", descriptor = "(BII)V") @OriginalMember(owner = "client!gf", name = "a", descriptor = "(BII)V")
public static void method3616(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) { public static void method3616(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) {
anInt3482 = arg0 - originX; anInt3482 = arg0 - originX;
@Pc(24) int local24 = anInt3482 - (int) ((float) component.anInt445 / zoom); @Pc(24) int local24 = anInt3482 - (int) ((float) component.width / zoom);
@Pc(33) int local33 = anInt3482 + (int) ((float) component.anInt445 / zoom); @Pc(33) int local33 = anInt3482 + (int) ((float) component.width / zoom);
if (local24 < 0) { if (local24 < 0) {
anInt3482 = (int) ((float) component.anInt445 / zoom); anInt3482 = (int) ((float) component.width / zoom);
} }
anInt4901 = length + originZ - arg1 - 1; anInt4901 = length + originZ - arg1 - 1;
@Pc(61) int local61 = (int) ((float) component.anInt459 / zoom) + anInt4901; @Pc(61) int local61 = (int) ((float) component.height / zoom) + anInt4901;
@Pc(70) int local70 = anInt4901 - (int) ((float) component.anInt459 / zoom); @Pc(70) int local70 = anInt4901 - (int) ((float) component.height / zoom);
if (local33 > width) { if (local33 > width) {
anInt3482 = width - (int) ((float) component.anInt445 / zoom); anInt3482 = width - (int) ((float) component.width / zoom);
} }
if (local70 < 0) { if (local70 < 0) {
anInt4901 = (int) ((float) component.anInt459 / zoom); anInt4901 = (int) ((float) component.height / zoom);
} }
if (length < local61) { if (length < local61) {
anInt4901 = length - (int) ((float) component.anInt459 / zoom); anInt4901 = length - (int) ((float) component.height / zoom);
} }
} }

View file

@ -133,13 +133,13 @@ public class Playground extends GameShell {
Fonts.load(archives[13], archives[8]); Fonts.load(archives[13], archives[8]);
state++; state++;
} else if (state == 5) { } else if (state == 5) {
LoadingBarAwt.render(null, true, JagString.parse("Prefetching"), 1); LoadingBarAwt.render(null, true, JagString.parse("Loading configs"), 1);
percentage = 0; // percentage = 0;
for (int i = 0; i < 28; ++i) { // for (int i = 0; i < 28; ++i) {
archives[i].fetchAll(); // archives[i].fetchAll();
percentage += archives[i].getPercentageComplete(); // percentage += archives[i].getPercentageComplete();
} // }
if (percentage > 2700) { // if (percentage > 2700) {
ParamTypeList.init(archives[2]); ParamTypeList.init(archives[2]);
FloTypeList.init(archives[2]); FloTypeList.init(archives[2]);
FluTypeList.init(archives[2]); FluTypeList.init(archives[2]);
@ -163,7 +163,7 @@ public class Playground extends GameShell {
MsiTypeList.init(archives[2], archives[8]); MsiTypeList.init(archives[2], archives[8]);
Equipment.init(); Equipment.init();
state++; state++;
} // }
} else if (state == 6) { } else if (state == 6) {
LoadingBarAwt.render(null, true, JagString.parse("Loading sprites"), 1); LoadingBarAwt.render(null, true, JagString.parse("Loading sprites"), 1);
int ready = Sprites.getReady(archives[8]); int ready = Sprites.getReady(archives[8]);
@ -184,8 +184,9 @@ public class Playground extends GameShell {
Rasteriser.setBounds(GameShell.canvasWidth, GameShell.canvasHeight); Rasteriser.setBounds(GameShell.canvasWidth, GameShell.canvasHeight);
Rasteriser.prepare(); Rasteriser.prepare();
Rasteriser.prepareOffsets(); Rasteriser.prepareOffsets();
loadItem(995, 10000);
try { try {
loadNpc(exportCounter); //loadNpc(exportCounter);
} catch (Exception ex) { } catch (Exception ex) {
npc = null; npc = null;
npcType = null; npcType = null;
@ -194,6 +195,12 @@ public class Playground extends GameShell {
} }
} }
Sprite sprite;
public void loadItem(int id, int count) {
sprite = Inv.getObjectSprite(0, id, false, count, 0);
}
public void loadNpc(int id) { public void loadNpc(int id) {
npcType = NpcTypeList.get(id); npcType = NpcTypeList.get(id);
npc = new Npc(); npc = new Npc();
@ -234,7 +241,7 @@ public class Playground extends GameShell {
} }
} }
public static boolean useGl = true; public static boolean useGl = false;
private void exportGlImage(String filename) { private void exportGlImage(String filename) {
GL2 gl = GLContext.getCurrentGL().getGL2(); GL2 gl = GLContext.getCurrentGL().getGL2();
@ -441,7 +448,7 @@ public class Playground extends GameShell {
if (state == 9) { if (state == 9) {
if (lastExportCounter != exportCounter) { if (lastExportCounter != exportCounter) {
try { try {
loadNpc(exportCounter); //loadNpc(exportCounter);
} catch (Exception ex) { } catch (Exception ex) {
npc = null; npc = null;
npcType = null; npcType = null;
@ -542,6 +549,10 @@ public class Playground extends GameShell {
} }
} }
if (sprite != null) {
sprite.render(canvasWidth / 2 - 144, canvasHeight / 2 - 128);
}
if (!GlRenderer.enabled) { if (!GlRenderer.enabled) {
SoftwareRaster.frameBuffer.draw(GameShell.canvas.getGraphics()); SoftwareRaster.frameBuffer.draw(GameShell.canvas.getGraphics());
} else { } else {