project: loose ends -blue
This commit is contained in:
@@ -2073,4 +2073,6 @@ public interface Client extends GameShell
|
||||
Widget getScriptActiveWidget();
|
||||
|
||||
ScriptEvent createScriptEvent(Object[] args);
|
||||
|
||||
int getViewportColor();
|
||||
}
|
||||
|
||||
@@ -234,6 +234,9 @@ public abstract class RSClientMixin implements RSClient
|
||||
@Inject
|
||||
private static boolean allWidgetsAreOpTargetable = false;
|
||||
|
||||
@Inject
|
||||
public static int viewportColor;
|
||||
|
||||
@Inject
|
||||
private static Set<String> unhiddenCasts = new HashSet<String>();
|
||||
|
||||
@@ -1557,7 +1560,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
|
||||
if (widget.getContentType() == WidgetType.VIEWPORT)
|
||||
{
|
||||
client.setViewportColor(0);
|
||||
viewportColor = 0;
|
||||
}
|
||||
else if (widget.getContentType() == WidgetType.RECTANGLE)
|
||||
{
|
||||
@@ -1565,14 +1568,14 @@ public abstract class RSClientMixin implements RSClient
|
||||
&& widget.getWidth() == client.getViewportWidth() && widget.getHeight() == client.getViewportHeight()
|
||||
&& widget.getOpacity() > 0 && widget.isFilled() && client.isGpu())
|
||||
{
|
||||
int textColor = widget.getTextColor();
|
||||
int tc = widget.getTextColor();
|
||||
int alpha = widget.getOpacity() & 0xFF;
|
||||
int inverseAlpha = 256 - alpha;
|
||||
int viewportColor = client.getViewportColor();
|
||||
int c1 = (alpha * (textColor & 0xff00ff) >> 8 & 0xFF00FF) + (alpha * (textColor & 0x00FF00) >> 8 & 0x00FF00);
|
||||
int c2 = (inverseAlpha * (viewportColor & 0xff00ff) >> 8 & 0xFF00FF) + (inverseAlpha * (viewportColor & 0x00FF00) >> 8 & 0x00FF00);
|
||||
int outAlpha = alpha + ((viewportColor >>> 24) * (255 - alpha) * 0x8081 >>> 23);
|
||||
client.setViewportColor(outAlpha << 24 | c1 + c2);
|
||||
int vpc = viewportColor;
|
||||
int c1 = (alpha * (tc & 0xff00ff) >> 8 & 0xFF00FF) + (alpha * (tc & 0x00FF00) >> 8 & 0x00FF00);
|
||||
int c2 = (inverseAlpha * (vpc & 0xff00ff) >> 8 & 0xFF00FF) + (inverseAlpha * (vpc & 0x00FF00) >> 8 & 0x00FF00);
|
||||
int outAlpha = alpha + ((vpc >>> 24) * (255 - alpha) * 0x8081 >>> 23);
|
||||
viewportColor = outAlpha << 24 | c1 + c2;
|
||||
widget.setHidden(true);
|
||||
hiddenWidgets.add(widget);
|
||||
continue;
|
||||
@@ -2072,8 +2075,10 @@ public abstract class RSClientMixin implements RSClient
|
||||
public void setOutdatedScript(String outdatedScript)
|
||||
{
|
||||
if (!outdatedScripts.contains(outdatedScript))
|
||||
{
|
||||
outdatedScripts.add(outdatedScript);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
@@ -2107,5 +2112,12 @@ public abstract class RSClientMixin implements RSClient
|
||||
{
|
||||
return getVarbitDefinition(id);
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public int getViewportColor()
|
||||
{
|
||||
return viewportColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1309,12 +1309,6 @@ public interface RSClient extends RSGameShell, Client
|
||||
@Import("pcmSampleLength")
|
||||
void setPcmSampleLength(int var0);
|
||||
|
||||
@Import("viewportColor")
|
||||
int getViewportColor();
|
||||
|
||||
@Import("viewportColor")
|
||||
void setViewportColor(int i);
|
||||
|
||||
@Import("changedVarps")
|
||||
int[] getChangedVarps();
|
||||
|
||||
|
||||
@@ -931,8 +931,7 @@ public final class Client extends GameShell implements Usernamed {
|
||||
@ObfuscatedGetter(
|
||||
intValue = -380994417
|
||||
)
|
||||
@Export("viewportColor")
|
||||
public static int viewportColor;
|
||||
public static int field730;
|
||||
@ObfuscatedName("il")
|
||||
static boolean field649;
|
||||
@ObfuscatedName("im")
|
||||
@@ -1369,7 +1368,7 @@ public final class Client extends GameShell implements Usernamed {
|
||||
field788 = 0; // L: 374
|
||||
oculusOrbNormalSpeed = 12; // L: 376
|
||||
oculusOrbSlowedSpeed = 6; // L: 377
|
||||
viewportColor = 0; // L: 378
|
||||
field730 = 0; // L: 378
|
||||
field649 = false; // L: 379
|
||||
field732 = 0; // L: 380
|
||||
field843 = false; // L: 381
|
||||
@@ -5625,8 +5624,8 @@ public final class Client extends GameShell implements Usernamed {
|
||||
|
||||
if (ServerPacket.field2146 == var1.serverPacket) { // L: 6617
|
||||
var16 = var3.readInt(); // L: 6618
|
||||
if (var16 != viewportColor) { // L: 6619
|
||||
viewportColor = var16; // L: 6620
|
||||
if (var16 != field730) { // L: 6619
|
||||
field730 = var16; // L: 6620
|
||||
WorldMapCacheName.method664(); // L: 6621
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ public class SecureRandomFuture {
|
||||
var17 = (Decimator.oculusOrbFocalPointY >> 7) + class41.baseY; // L: 4384
|
||||
PacketBufferNode var18 = ItemContainer.getPacketBufferNode(ClientPacket.field2269, Client.packetWriter.isaacCipher); // L: 4387
|
||||
var18.packetBuffer.method5578(var16); // L: 4388
|
||||
var18.packetBuffer.method5587(Client.viewportColor); // L: 4389
|
||||
var18.packetBuffer.method5587(Client.field730); // L: 4389
|
||||
var18.packetBuffer.method5739(var17); // L: 4390
|
||||
var18.packetBuffer.writeByte(var15); // L: 4391
|
||||
Client.packetWriter.addNode(var18); // L: 4392
|
||||
|
||||
Reference in New Issue
Block a user