mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-20 13:30:30 -07:00
Refactored some code related to inv/sprite
This commit is contained in:
parent
77bfb744bc
commit
b57d5a0031
51 changed files with 686 additions and 625 deletions
|
|
@ -160,79 +160,4 @@ public final class Static164 {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue