Skip to content

Commit

Permalink
Deobfuscate start-up code in AApplet
Browse files Browse the repository at this point in the history
Mostly code in AdCanvas, IPanel and LoadingPanel to understand what
AApplet is doing.
  • Loading branch information
StenAL committed May 27, 2024
1 parent dc2b5b3 commit 4cc50ed
Show file tree
Hide file tree
Showing 6 changed files with 275 additions and 280 deletions.
227 changes: 114 additions & 113 deletions client/src/main/java/com/aapeli/applet/AApplet.java

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions client/src/main/java/com/aapeli/applet/AdCanvas.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AdCanvas extends Canvas implements MouseListener {

private static final String linkTarget = "_blank";
private AApplet gameApplet;
private LoadingPanel aLoadingPanel__116;
private LoadingPanel loadingPanel;
private URL anURL117;
private Vector aVector118;
private URL anURL119;
Expand Down Expand Up @@ -46,8 +46,8 @@ public void paint(Graphics var1) {
public void update(Graphics var1) {
if (this.aBoolean123) {
if (!this.aBoolean125) {
if (this.aLoadingPanel__116 != null) {
Image var2 = this.aLoadingPanel__116.method469();
if (this.loadingPanel != null) {
Image var2 = this.loadingPanel.method469();
if (var2 != null) {
Point var3 = this.getLocation();
var1.drawImage(var2, -var3.x, -var3.y, this);
Expand Down Expand Up @@ -89,34 +89,34 @@ public void mouseReleased(MouseEvent var1) {
public void mouseClicked(MouseEvent var1) {
}

protected static AdCanvas method211(AApplet var0, Parameters var1) {
protected static AdCanvas create(AApplet applet, Parameters parameters) {
try {
String var2 = var1.getParameter("ad_image");
URL var3 = new URL(var0.getCodeBase(), var2);
String var2 = parameters.getParameter("ad_image");
URL var3 = new URL(applet.getCodeBase(), var2);
Vector var4 = new Vector();

String var6;
for (int var5 = 1; (var6 = var1.getParameter("ad_text-" + var5)) != null; ++var5) {
for (int var5 = 1; (var6 = parameters.getParameter("ad_text-" + var5)) != null; ++var5) {
AdCanvasText var7 = AdCanvasText.method1547(var6);
if (var7 != null) {
var4.addElement(var7);
}
}

String var14 = var1.getParameter("ad_page");
String var14 = parameters.getParameter("ad_page");
URL var8 = var14 != null ? new URL(var14) : null;
String var9 = var1.getParameter("ad_target");
String var9 = parameters.getParameter("ad_target");
if (var9 == null) {
var9 = linkTarget;
}

int var10 = 10;
String var11 = var1.getParameter("ad_mintime");
String var11 = parameters.getParameter("ad_mintime");
if (var11 != null) {
var10 = Integer.parseInt(var11);
}

AdCanvas var12 = new AdCanvas(var0, var3, var4, var8, var9, var10);
AdCanvas var12 = new AdCanvas(applet, var3, var4, var8, var9, var10);
return var12;
} catch (Exception var13) {
return null;
Expand Down Expand Up @@ -155,8 +155,8 @@ protected boolean method213() {
}
}

protected void method214(LoadingPanel var1) {
this.aLoadingPanel__116 = var1;
protected void method214(LoadingPanel loadingPanel) {
this.loadingPanel = loadingPanel;
this.aLong126 = System.currentTimeMillis();
this.repaint();
}
Expand Down Expand Up @@ -190,7 +190,7 @@ protected void method217() {

this.anURL117 = this.anURL119 = null;
this.aString120 = null;
this.aLoadingPanel__116 = null;
this.loadingPanel = null;
this.gameApplet = null;
}
}
12 changes: 5 additions & 7 deletions client/src/main/java/com/aapeli/applet/ContentPanel.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
package com.aapeli.applet;

import com.aapeli.applet.AApplet;
import com.aapeli.client.IPanel;

import java.awt.LayoutManager;

class ContentPanel extends IPanel {

protected ContentPanel(AApplet var1) {
this.setBackground(var1.getBackground());
this.setForeground(var1.getForeground());
this.setLayout((LayoutManager) null);
protected ContentPanel(AApplet applet) {
this.setBackground(applet.getBackground());
this.setForeground(applet.getForeground());
this.setLayout(null);
}

protected void dispose() {
protected void destroy() {
this.setVisible(false);
this.removeAll();
}
Expand Down
Loading

0 comments on commit 4cc50ed

Please sign in to comment.