forked from WorldStarHipHopX/playforia
-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from StenAL/features
Deobfuscate a lot more lobby code, remove TrackDumper
- Loading branch information
Showing
42 changed files
with
1,897 additions
and
3,198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package com.aapeli.client; | ||
|
||
import java.awt.Font; | ||
import java.awt.Graphics; | ||
import java.util.Vector; | ||
|
||
class HtmlLine { | ||
|
||
private int anInt1366; | ||
private boolean aBoolean1367; | ||
private Vector<HtmlWord> words; | ||
private int nextWordStart; | ||
private int height; | ||
private final HtmlText aHtmlText1371; | ||
|
||
|
||
protected HtmlLine(HtmlText htmlText, Graphics graphics, int var3, boolean var4) { | ||
this.aHtmlText1371 = htmlText; | ||
this.anInt1366 = var3; | ||
this.aBoolean1367 = var4; | ||
this.words = new Vector<>(); | ||
this.nextWordStart = 0; | ||
this.height = graphics.getFont().getSize(); | ||
} | ||
|
||
public String toString() { | ||
int wordsLength = this.words.size(); | ||
String s = "[HtmlLine: words.size=" + wordsLength + "\n"; | ||
|
||
for (int i = 0; i < wordsLength; ++i) { | ||
s = s + " " + this.words.elementAt(i).toString() + "\n"; | ||
} | ||
|
||
s = s + "'relatx'=" + this.nextWordStart + " 'height'=" + this.height + "]"; | ||
return s; | ||
} | ||
|
||
protected boolean method1604(int var1) { | ||
return this.nextWordStart + var1 <= this.anInt1366; | ||
} | ||
|
||
protected void addWord(String text, Font font, int length) { | ||
if (!this.isEmpty() || text.trim().length() != 0) { | ||
HtmlWord word = new HtmlWord(this, text, font, this.nextWordStart, length); | ||
this.words.addElement(word); | ||
this.nextWordStart += length; | ||
int fontSize = font.getSize(); | ||
if (fontSize > this.height) { | ||
this.height = fontSize; | ||
} | ||
|
||
} | ||
} | ||
|
||
protected boolean isEmpty() { | ||
return this.words.isEmpty(); | ||
} | ||
|
||
protected int getHeight() { | ||
return this.height; | ||
} | ||
|
||
protected void draw(Graphics graphics, int x, int y) { | ||
int wordsCount = this.words.size(); | ||
HtmlWord word; | ||
int wordsLength; | ||
if (this.aBoolean1367) { | ||
wordsLength = 0; | ||
|
||
for (int i = 0; i < wordsCount; ++i) { | ||
word = this.words.elementAt(i); | ||
wordsLength += word.getLength(); | ||
} | ||
|
||
x += (this.anInt1366 - wordsLength) / 2; | ||
} | ||
|
||
for (wordsLength = 0; wordsLength < wordsCount; ++wordsLength) { | ||
word = this.words.elementAt(wordsLength); | ||
word.draw(graphics, x, y); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.aapeli.client; | ||
|
||
import java.awt.Font; | ||
import java.awt.Graphics; | ||
|
||
class HtmlWord { | ||
|
||
private String word; | ||
private Font font; | ||
private int start; | ||
private int length; | ||
private final HtmlLine htmlLine; | ||
|
||
|
||
protected HtmlWord(HtmlLine htmlLine, String word, Font font, int start, int length) { | ||
this.htmlLine = htmlLine; | ||
this.word = word; | ||
this.font = font; | ||
this.start = start; | ||
this.length = length; | ||
} | ||
|
||
public String toString() { | ||
return "[HtmlWord: 'word'=\"" + this.word + "\" 'font'=\"" + this.font.toString() + "\" 'relx'=" + this.start + "]"; | ||
} | ||
|
||
protected int getLength() { | ||
return this.length; | ||
} | ||
|
||
protected void draw(Graphics graphics, int x, int y) { | ||
graphics.setFont(this.font); | ||
graphics.drawString(this.word, x + this.start, y); | ||
} | ||
} |
Oops, something went wrong.