Merge pull request #4 from thedaneeffect/list-removal

All sorts of things
This commit is contained in:
Dane authored and GitHub committed 2021-03-16 02:47:30 -04:00
commit 0400cb9ff9
56 files changed
+1483 -1943

No files matched your search

+2 -1
View File
@@ -1,2 +1,3 @@
target/
target/
out/
+3
View File
@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
Generated
+1
View File
@@ -0,0 +1 @@
317
+11
View File
@@ -0,0 +1,11 @@
<component name="ArtifactManager">
<artifact type="jar" name="317:jar">
<output-path>$PROJECT_DIR$/out/artifacts/317_jar</output-path>
<root id="archive" name="317.jar">
<element id="module-output" name="317" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar" path-in-jar="/" />
</root>
</artifact>
</component>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="317" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="317" target="7" />
</bytecodeTargetLevel>
</component>
</project>
+10
View File
@@ -0,0 +1,10 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="IgnoreResultOfCall" enabled="false" level="WARNING" enabled_by_default="false">
<option name="m_reportAllNonLibraryCalls" value="false" />
<option name="callCheckString" value="java.io.File,.*,java.io.InputStream,read|skip|available|markSupported,java.io.Reader,read|skip|ready|markSupported,java.lang.Boolean,.*,java.lang.Byte,.*,java.lang.Character,.*,java.lang.Double,.*,java.lang.Float,.*,java.lang.Integer,.*,java.lang.Long,.*,java.lang.Math,.*,java.lang.Object,equals|hashCode|toString,java.lang.Short,.*,java.lang.StrictMath,.*,java.lang.String,.*,java.lang.Thread,interrupted,java.math.BigInteger,.*,java.math.BigDecimal,.*,java.net.InetAddress,.*,java.net.URI,.*,java.nio.channels.AsynchronousChannelGroup,.*,java.util.Arrays,.*,java.util.List,of,java.util.Set,of,java.util.Map,of|ofEntries|entry,java.util.Collections,(?!addAll).*,java.util.UUID,.*,java.util.regex.Matcher,pattern|toMatchResult|start|end|group|groupCount|matches|find|lookingAt|quoteReplacement|replaceAll|replaceFirst|regionStart|regionEnd|hasTransparentBounds|hasAnchoringBounds|hitEnd|requireEnd,java.util.regex.Pattern,.*,java.util.concurrent.CountDownLatch,await|getCount,java.util.concurrent.ExecutorService,awaitTermination|isShutdown|isTerminated,java.util.concurrent.ForkJoinPool,awaitQuiescence,java.util.concurrent.Semaphore,tryAcquire|availablePermits|isFair|hasQueuedThreads|getQueueLength|getQueuedThreads,java.util.concurrent.locks.Condition,await|awaitNanos|awaitUntil,java.util.concurrent.locks.Lock,tryLock|newCondition,java.util.stream.BaseStream,.*,java.util.stream.Stream,.*,java.util.stream.DoubleStream,.*,java.util.stream.IntStream,.*,java.util.stream.LongStream,.*" />
</inspection_tool>
</profile>
</component>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
@@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.apache.commons:commons-collections4:4.4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4-sources.jar!/" />
</SOURCES>
</library>
</component>
@@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.apache.commons:commons-compress:1.20">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-compress/1.20/commons-compress-1.20-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-compress/1.20/commons-compress-1.20-sources.jar!/" />
</SOURCES>
</library>
</component>
@@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.apache.commons:commons-math3:3.6.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1-sources.jar!/" />
</SOURCES>
</library>
</component>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/317.iml" filepath="$PROJECT_DIR$/317.iml" />
</modules>
</component>
</project>
+124
View File
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
+3
View File
@@ -11,5 +11,8 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
<orderEntry type="library" exported="" name="Maven: org.apache.commons:commons-compress:1.20" level="project" />
<orderEntry type="library" exported="" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
</component>
</module>
+24
View File
@@ -7,6 +7,7 @@
<groupId>runescape</groupId>
<artifactId>317</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
@@ -20,4 +21,27 @@
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-compress -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.20</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
</dependency>
</dependencies>
</project>
+65 -481
View File
@@ -1,493 +1,77 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.utils.IOUtils;
public class BZip2 {
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
private static final BZip2Stream stream = new BZip2Stream();
/**
* {@link BZip2} itself is an implementation of {@link InputStream} to feed the header magic to a {@link BZip2CompressorInputStream}.
*
* @see #decompress(byte[], int, int, byte[])
*/
public class BZip2 extends InputStream {
public static void decompress(byte[] dst, int dstLen, byte[] src, int srcOff, int srcLen) {
synchronized (stream) {
stream.aByteArray563 = src;
stream.anInt564 = srcOff;
stream.aByteArray568 = dst;
stream.anInt569 = 0;
stream.anInt565 = srcLen;
stream.anInt570 = dstLen;
stream.anInt577 = 0;
stream.anInt576 = 0;
stream.anInt566 = 0;
stream.anInt567 = 0;
stream.anInt571 = 0;
stream.anInt572 = 0;
stream.anInt579 = 0;
decompress(stream);
private static final byte[] MAGIC = {'B', 'Z', 'h', '1'};
/**
* Decompresses the source.
*
* @param src the source data.
* @param off the source offset.
* @param len the source length.
* @param dst the destination or <code>null</code> to create a new one.
* @throws IOException if the stream content is malformed or an I/O error occurs.
*/
public static byte[] decompress(byte[] src, int off, int len, byte[] dst) throws IOException {
ByteArrayOutputStream tmp = null;
if (dst == null) {
tmp = new ByteArrayOutputStream();
}
try(BZip2CompressorInputStream in = new BZip2CompressorInputStream(new BZip2(src, off, len))) {
if (tmp != null) {
IOUtils.copy(in, tmp);
} else {
IOUtils.readFully(in, dst);
}
}
if (tmp != null) {
return tmp.toByteArray();
}
return dst;
}
public static void method226(BZip2Stream stream) {
byte byte4 = stream.aByte573;
int i = stream.anInt574;
int j = stream.anInt584;
int k = stream.anInt582;
int[] ai = BZip2Stream.anIntArray587;
int l = stream.anInt581;
byte[] abyte0 = stream.aByteArray568;
int i1 = stream.anInt569;
int j1 = stream.anInt570;
int k1 = j1;
int l1 = stream.anInt601 + 1;
label0:
do {
if (i > 0) {
do {
if (j1 == 0) {
break label0;
}
if (i == 1) {
break;
}
abyte0[i1] = byte4;
i--;
i1++;
j1--;
} while (true);
if (j1 == 0) {
i = 1;
break;
}
abyte0[i1] = byte4;
i1++;
j1--;
}
boolean flag = true;
while (flag) {
flag = false;
if (j == l1) {
i = 0;
break label0;
}
byte4 = (byte) k;
l = ai[l];
byte byte0 = (byte) (l & 0xff);
l >>= 8;
j++;
if (byte0 != k) {
k = byte0;
if (j1 == 0) {
i = 1;
} else {
abyte0[i1] = byte4;
i1++;
j1--;
flag = true;
continue;
}
break label0;
}
if (j != l1) {
continue;
}
if (j1 == 0) {
i = 1;
break label0;
}
abyte0[i1] = byte4;
i1++;
j1--;
flag = true;
}
i = 2;
l = ai[l];
byte byte1 = (byte) (l & 0xff);
l >>= 8;
if (++j != l1) {
if (byte1 != k) {
k = byte1;
} else {
i = 3;
l = ai[l];
byte byte2 = (byte) (l & 0xff);
l >>= 8;
if (++j != l1) {
if (byte2 != k) {
k = byte2;
} else {
l = ai[l];
byte byte3 = (byte) (l & 0xff);
l >>= 8;
j++;
i = (byte3 & 0xff) + 4;
l = ai[l];
k = (byte) (l & 0xff);
l >>= 8;
j++;
}
}
}
}
} while (true);
int i2 = stream.anInt571;
stream.anInt571 += k1 - j1;
if (stream.anInt571 < i2) {
stream.anInt572++;
}
stream.aByte573 = byte4;
stream.anInt574 = i;
stream.anInt584 = j;
stream.anInt582 = k;
BZip2Stream.anIntArray587 = ai;
stream.anInt581 = l;
stream.aByteArray568 = abyte0;
stream.anInt569 = i1;
stream.anInt570 = j1;
/**
* The input.
*/
private final ByteArrayInputStream in;
/**
* The position.
*/
private int position;
/**
* Constructs a new helper class to fool that silly compressor.
*
* @param src the source.
* @param off the source offset.
* @param len the source length.
*/
private BZip2(byte[] src, int off, int len) {
this.in = new ByteArrayInputStream(src, off, len);
}
public static void decompress(BZip2Stream stream) {
int k8 = 0;
int[] ai = null;
int[] ai1 = null;
int[] ai2 = null;
stream.anInt578 = 1;
if (BZip2Stream.anIntArray587 == null) {
BZip2Stream.anIntArray587 = new int[stream.anInt578 * 100000];
}
boolean flag19 = true;
while (flag19) {
byte byte0 = method228(stream);
if (byte0 == 23) {
return;
}
method228(stream);
method228(stream);
method228(stream);
method228(stream);
method228(stream);
stream.anInt579++;
method228(stream);
method228(stream);
method228(stream);
method228(stream);
byte0 = method229(stream);
stream.aBoolean575 = byte0 != 0;
if (stream.aBoolean575) {
System.out.println("PANIC! RANDOMISED BLOCK!");
}
stream.anInt580 = 0;
byte0 = method228(stream);
stream.anInt580 = (stream.anInt580 << 8) | (byte0 & 0xff);
byte0 = method228(stream);
stream.anInt580 = (stream.anInt580 << 8) | (byte0 & 0xff);
byte0 = method228(stream);
stream.anInt580 = (stream.anInt580 << 8) | (byte0 & 0xff);
for (int j = 0; j < 16; j++) {
byte byte1 = method229(stream);
stream.aBooleanArray590[j] = byte1 == 1;
}
for (int k = 0; k < 256; k++) {
stream.aBooleanArray589[k] = false;
}
for (int l = 0; l < 16; l++) {
if (stream.aBooleanArray590[l]) {
for (int i3 = 0; i3 < 16; i3++) {
byte byte2 = method229(stream);
if (byte2 == 1) {
stream.aBooleanArray589[(l * 16) + i3] = true;
}
}
}
}
method231(stream);
int i4 = stream.anInt588 + 2;
int j4 = method230(3, stream);
int k4 = method230(15, stream);
for (int i1 = 0; i1 < k4; i1++) {
int j3 = 0;
do {
byte byte3 = method229(stream);
if (byte3 == 0) {
break;
}
j3++;
} while (true);
stream.aByteArray595[i1] = (byte) j3;
}
byte[] abyte0 = new byte[6];
for (byte byte16 = 0; byte16 < j4; byte16++) {
abyte0[byte16] = byte16;
}
for (int j1 = 0; j1 < k4; j1++) {
byte byte17 = stream.aByteArray595[j1];
byte byte15 = abyte0[byte17];
for (; byte17 > 0; byte17--) {
abyte0[byte17] = abyte0[byte17 - 1];
}
abyte0[0] = byte15;
stream.aByteArray594[j1] = byte15;
}
for (int k3 = 0; k3 < j4; k3++) {
int l6 = method230(5, stream);
for (int k1 = 0; k1 < i4; k1++) {
do {
byte byte4 = method229(stream);
if (byte4 == 0) {
break;
}
byte4 = method229(stream);
if (byte4 == 0) {
l6++;
} else {
l6--;
}
} while (true);
stream.aByteArrayArray596[k3][k1] = (byte) l6;
}
}
for (int l3 = 0; l3 < j4; l3++) {
byte byte8 = 32;
int i = 0;
for (int l1 = 0; l1 < i4; l1++) {
if (stream.aByteArrayArray596[l3][l1] > i) {
i = stream.aByteArrayArray596[l3][l1];
}
if (stream.aByteArrayArray596[l3][l1] < byte8) {
byte8 = stream.aByteArrayArray596[l3][l1];
}
}
method232(stream.anIntArrayArray597[l3], stream.anIntArrayArray598[l3], stream.anIntArrayArray599[l3], stream.aByteArrayArray596[l3], byte8, i, i4);
stream.anIntArray600[l3] = byte8;
}
int l4 = stream.anInt588 + 1;
int i5 = -1;
int j5 = 0;
for (int i2 = 0; i2 <= 255; i2++) {
stream.anIntArray583[i2] = 0;
}
int j9 = 4095;
for (int l8 = 15; l8 >= 0; l8--) {
for (int i9 = 15; i9 >= 0; i9--) {
stream.aByteArray592[j9] = (byte) ((l8 * 16) + i9);
j9--;
}
stream.anIntArray593[l8] = j9 + 1;
}
int i6 = 0;
if (j5 == 0) {
i5++;
j5 = 50;
byte byte12 = stream.aByteArray594[i5];
k8 = stream.anIntArray600[byte12];
ai = stream.anIntArrayArray597[byte12];
ai2 = stream.anIntArrayArray599[byte12];
ai1 = stream.anIntArrayArray598[byte12];
}
j5--;
int i7 = k8;
int l7;
byte byte9;
for (l7 = method230(i7, stream); l7 > ai[i7]; l7 = (l7 << 1) | byte9) {
i7++;
byte9 = method229(stream);
}
for (int k5 = ai2[l7 - ai1[i7]]; k5 != l4; ) {
if ((k5 == 0) || (k5 == 1)) {
int j6 = -1;
int k6 = 1;
do {
if (k5 == 0) {
j6 += k6;
} else if (k5 == 1) {
j6 += 2 * k6;
}
k6 *= 2;
if (j5 == 0) {
i5++;
j5 = 50;
byte byte13 = stream.aByteArray594[i5];
k8 = stream.anIntArray600[byte13];
ai = stream.anIntArrayArray597[byte13];
ai2 = stream.anIntArrayArray599[byte13];
ai1 = stream.anIntArrayArray598[byte13];
}
j5--;
int j7 = k8;
int i8;
byte byte10;
for (i8 = method230(j7, stream); i8 > ai[j7]; i8 = (i8 << 1) | byte10) {
j7++;
byte10 = method229(stream);
}
k5 = ai2[i8 - ai1[j7]];
} while ((k5 == 0) || (k5 == 1));
j6++;
byte byte5 = stream.aByteArray591[stream.aByteArray592[stream.anIntArray593[0]] & 0xff];
stream.anIntArray583[byte5 & 0xff] += j6;
for (; j6 > 0; j6--) {
BZip2Stream.anIntArray587[i6] = byte5 & 0xff;
i6++;
}
} else {
int j11 = k5 - 1;
byte byte6;
if (j11 < 16) {
int j10 = stream.anIntArray593[0];
byte6 = stream.aByteArray592[j10 + j11];
for (; j11 > 3; j11 -= 4) {
int k11 = j10 + j11;
stream.aByteArray592[k11] = stream.aByteArray592[k11 - 1];
stream.aByteArray592[k11 - 1] = stream.aByteArray592[k11 - 2];
stream.aByteArray592[k11 - 2] = stream.aByteArray592[k11 - 3];
stream.aByteArray592[k11 - 3] = stream.aByteArray592[k11 - 4];
}
for (; j11 > 0; j11--) {
stream.aByteArray592[j10 + j11] = stream.aByteArray592[(j10 + j11) - 1];
}
stream.aByteArray592[j10] = byte6;
} else {
int l10 = j11 / 16;
int i11 = j11 % 16;
int k10 = stream.anIntArray593[l10] + i11;
byte6 = stream.aByteArray592[k10];
for (; k10 > stream.anIntArray593[l10]; k10--) {
stream.aByteArray592[k10] = stream.aByteArray592[k10 - 1];
}
stream.anIntArray593[l10]++;
for (; l10 > 0; l10--) {
stream.anIntArray593[l10]--;
stream.aByteArray592[stream.anIntArray593[l10]] = stream.aByteArray592[(stream.anIntArray593[l10 - 1] + 16) - 1];
}
stream.anIntArray593[0]--;
stream.aByteArray592[stream.anIntArray593[0]] = byte6;
if (stream.anIntArray593[0] == 0) {
int i10 = 4095;
for (int k9 = 15; k9 >= 0; k9--) {
for (int l9 = 15; l9 >= 0; l9--) {
stream.aByteArray592[i10] = stream.aByteArray592[stream.anIntArray593[k9] + l9];
i10--;
}
stream.anIntArray593[k9] = i10 + 1;
}
}
}
stream.anIntArray583[stream.aByteArray591[byte6 & 0xff] & 0xff]++;
BZip2Stream.anIntArray587[i6] = stream.aByteArray591[byte6 & 0xff] & 0xff;
i6++;
if (j5 == 0) {
i5++;
j5 = 50;
byte byte14 = stream.aByteArray594[i5];
k8 = stream.anIntArray600[byte14];
ai = stream.anIntArrayArray597[byte14];
ai2 = stream.anIntArrayArray599[byte14];
ai1 = stream.anIntArrayArray598[byte14];
}
j5--;
int k7 = k8;
int j8;
byte byte11;
for (j8 = method230(k7, stream); j8 > ai[k7]; j8 = (j8 << 1) | byte11) {
k7++;
byte11 = method229(stream);
}
k5 = ai2[j8 - ai1[k7]];
}
}
stream.anInt574 = 0;
stream.aByte573 = 0;
stream.anIntArray585[0] = 0;
for (int j2 = 1; j2 <= 256; j2++) {
stream.anIntArray585[j2] = stream.anIntArray583[j2 - 1];
}
for (int k2 = 1; k2 <= 256; k2++) {
stream.anIntArray585[k2] += stream.anIntArray585[k2 - 1];
}
for (int l2 = 0; l2 < i6; l2++) {
byte byte7 = (byte) (BZip2Stream.anIntArray587[l2] & 0xff);
BZip2Stream.anIntArray587[stream.anIntArray585[byte7 & 0xff]] |= l2 << 8;
stream.anIntArray585[byte7 & 0xff]++;
}
stream.anInt581 = BZip2Stream.anIntArray587[stream.anInt580] >> 8;
stream.anInt584 = 0;
stream.anInt581 = BZip2Stream.anIntArray587[stream.anInt581];
stream.anInt582 = (byte) (stream.anInt581 & 0xff);
stream.anInt581 >>= 8;
stream.anInt584++;
stream.anInt601 = i6;
method226(stream);
flag19 = (stream.anInt584 == (stream.anInt601 + 1)) && (stream.anInt574 == 0);
}
}
public static byte method228(BZip2Stream stream) {
return (byte) method230(8, stream);
}
public static byte method229(BZip2Stream stream) {
return (byte) method230(1, stream);
}
public static int method230(int i, BZip2Stream stream) {
int j;
do {
if (stream.anInt577 >= i) {
int k = (stream.anInt576 >> (stream.anInt577 - i)) & ((1 << i) - 1);
stream.anInt577 -= i;
j = k;
break;
}
stream.anInt576 = (stream.anInt576 << 8) | (stream.aByteArray563[stream.anInt564] & 0xff);
stream.anInt577 += 8;
stream.anInt564++;
stream.anInt565--;
stream.anInt566++;
if (stream.anInt566 == 0) {
stream.anInt567++;
}
} while (true);
return j;
}
public static void method231(BZip2Stream stream) {
stream.anInt588 = 0;
for (int i = 0; i < 256; i++) {
if (stream.aBooleanArray589[i]) {
stream.aByteArray591[stream.anInt588] = (byte) i;
stream.anInt588++;
}
}
}
public static void method232(int[] ai, int[] ai1, int[] ai2, byte[] abyte0, int i, int j, int k) {
int l = 0;
for (int i1 = i; i1 <= j; i1++) {
for (int l2 = 0; l2 < k; l2++) {
if (abyte0[l2] == i1) {
ai2[l] = l2;
l++;
}
}
}
for (int j1 = 0; j1 < 23; j1++) {
ai1[j1] = 0;
}
for (int k1 = 0; k1 < k; k1++) {
ai1[abyte0[k1] + 1]++;
}
for (int l1 = 1; l1 < 23; l1++) {
ai1[l1] += ai1[l1 - 1];
}
for (int i2 = 0; i2 < 23; i2++) {
ai[i2] = 0;
}
int i3 = 0;
for (int j2 = i; j2 <= j; j2++) {
i3 += ai1[j2 + 1] - ai1[j2];
ai[j2] = i3 - 1;
i3 <<= 1;
}
for (int k2 = i + 1; k2 <= j; k2++) {
ai1[k2] = ((ai[k2 - 1] + 1) << 1) - ai1[k2];
@Override
public int read() throws IOException {
if (position < 4) {
return MAGIC[position++];
}
return in.read();
}
}
-49
View File
@@ -1,49 +0,0 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class BZip2Stream {
public static int[] anIntArray587;
public byte[] aByteArray563;
public int anInt564;
public int anInt565;
public int anInt566;
public int anInt567;
public byte[] aByteArray568;
public int anInt569;
public int anInt570;
public int anInt571;
public int anInt572;
public byte aByte573;
public int anInt574;
public boolean aBoolean575;
public int anInt576;
public int anInt577;
public int anInt578;
public int anInt579;
public int anInt580;
public int anInt581;
public int anInt582;
public final int[] anIntArray583 = new int[256];
public int anInt584;
public final int[] anIntArray585 = new int[257];
public int anInt588;
public final boolean[] aBooleanArray589 = new boolean[256];
public final boolean[] aBooleanArray590 = new boolean[16];
public final byte[] aByteArray591 = new byte[256];
public final byte[] aByteArray592 = new byte[4096];
public final int[] anIntArray593 = new int[16];
public final byte[] aByteArray594 = new byte[18002];
public final byte[] aByteArray595 = new byte[18002];
public final byte[][] aByteArrayArray596 = new byte[6][258];
public final int[][] anIntArrayArray597 = new int[6][258];
public final int[][] anIntArrayArray598 = new int[6][258];
public final int[][] anIntArrayArray599 = new int[6][258];
public final int[] anIntArray600 = new int[6];
public int anInt601;
public BZip2Stream() {
}
}
+4 -3
View File
@@ -1,3 +1,4 @@
import java.io.IOException;
import java.util.Random;
public class BitmapFont {
@@ -12,9 +13,9 @@ public class BitmapFont {
public int height;
public boolean strikethrough = false;
public BitmapFont(FileArchive archive, String name, boolean quill) {
Buffer dat = new Buffer(archive.read(name + ".dat", null));
Buffer idx = new Buffer(archive.read("index.dat", null));
public BitmapFont(FileArchive archive, String name, boolean quill) throws IOException {
Buffer dat = new Buffer(archive.read(name + ".dat"));
Buffer idx = new Buffer(archive.read("index.dat"));
idx.position = dat.get2U() + 4;
int k = idx.get1U();
+6 -30
View File
@@ -1,3 +1,5 @@
import org.apache.commons.math3.random.ISAACRandom;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
@@ -8,7 +10,7 @@ import java.nio.charset.StandardCharsets;
* <p>
* <b>Types:</b><br/>
* # — the number of bytes<br/>
* Op — 1 byte which is modified by the {@link #cipher}<br/>
* Op — 1 byte which is modified by the {@link #random} number generator.<br/>
* Smart — 1 or 2 byte value [-16384...16383]<br/>
* USmart — 1 or 2 byte value [0...32768]<br/>
* String — {@link StandardCharsets#ISO_8859_1} encoding delimited by a newline character (\n)<br/>
@@ -24,37 +26,11 @@ import java.nio.charset.StandardCharsets;
* C — put(-v) — get returns (-v)<br/>
* S — put(128 - v) — get returns (128 - v)<br/>
*/
public class Buffer extends DoublyLinkedListNode {
public class Buffer extends DoublyLinkedList.Node {
public static final LinkedList pool0 = new LinkedList();
public static final LinkedList pool1 = new LinkedList();
public static final LinkedList pool2 = new LinkedList();
private static final int[] BITMASK = {0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 0x1ffff, 0x3ffff, 0x7ffff, 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff, 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, -1};
public static int poolSize0;
public static int poolSize1;
public static int poolSize2;
public static Buffer create(int sizeType) {
synchronized (pool1) {
Buffer buffer = null;
if ((sizeType == 0) && (poolSize0 > 0)) {
poolSize0--;
buffer = (Buffer) pool0.method251();
} else if ((sizeType == 1) && (poolSize1 > 0)) {
poolSize1--;
buffer = (Buffer) pool1.method251();
} else if ((sizeType == 2) && (poolSize2 > 0)) {
poolSize2--;
buffer = (Buffer) pool2.method251();
}
if (buffer != null) {
buffer.position = 0;
return buffer;
}
}
Buffer buffer = new Buffer();
buffer.position = 0;
@@ -72,7 +48,7 @@ public class Buffer extends DoublyLinkedListNode {
public byte[] data;
public int position;
public int bitPosition;
public ISAACCipher cipher;
public ISAACRandom random;
public Buffer() {
}
@@ -83,7 +59,7 @@ public class Buffer extends DoublyLinkedListNode {
}
public void putOp(int i) {
data[position++] = (byte) (i + cipher.method246());
data[position++] = (byte) (i + random.nextInt());
}
public void putSize1(int i) {
+7 -5
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class Censor {
public static final String[] aStringArray626 = {"cook", "cook's", "cooks", "seeks", "sheet", "woop", "woops", "faq", "noob", "noobs"};
@@ -12,11 +14,11 @@ public class Censor {
public static char[][] aCharArrayArray624;
public static int[] anIntArray625;
public static void method487(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("fragmentsenc.txt", null));
Buffer buffer_1 = new Buffer(archive.read("badenc.txt", null));
Buffer class30_sub2_sub2_2 = new Buffer(archive.read("domainenc.txt", null));
Buffer buffer_3 = new Buffer(archive.read("tldlist.txt", null));
public static void method487(FileArchive archive) throws IOException {
Buffer buffer = new Buffer(archive.read("fragmentsenc.txt"));
Buffer buffer_1 = new Buffer(archive.read("badenc.txt"));
Buffer class30_sub2_sub2_2 = new Buffer(archive.read("domainenc.txt"));
Buffer buffer_3 = new Buffer(archive.read("tldlist.txt"));
method488(buffer, buffer_1, class30_sub2_sub2_2, buffer_3);
}
+10 -8
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class Component {
public static Component[] instances;
@@ -72,9 +74,9 @@ public class Component {
public Component() {
}
public static void unpack(FileArchive archive, BitmapFont[] aclass30_sub2_sub1_sub4, FileArchive archive_1) {
public static void unpack(FileArchive archive, BitmapFont[] aclass30_sub2_sub1_sub4, FileArchive archive_1) throws IOException {
aCache_238 = new LRUCache(50000);
Buffer buffer = new Buffer(archive.read("data", null));
Buffer buffer = new Buffer(archive.read("data"));
int i = -1;
int j = buffer.get2U();
instances = new Component[j];
@@ -279,13 +281,13 @@ public class Component {
public static Image24 method207(int i, FileArchive archive, String s) {
long l = (StringUtil.hashCode(s) << 8) + (long) i;
Image24 image = (Image24) aCache_238.method222(l);
Image24 image = (Image24) aCache_238.get(l);
if (image != null) {
return image;
}
try {
image = new Image24(archive, s, i);
aCache_238.method223(image, l);
aCache_238.put(l, image);
} catch (Exception _ex) {
return null;
}
@@ -293,9 +295,9 @@ public class Component {
}
public static void method208(int i, int j, Model model) {
A_CACHE___264.method224();
A_CACHE___264.clear();
if ((model != null) && (j != 4)) {
A_CACHE___264.method223(model, ((long) j << 16) + i);
A_CACHE___264.put(((long) j << 16) + i, model);
}
}
@@ -309,7 +311,7 @@ public class Component {
}
public Model method206(int i, int j) {
Model model = (Model) A_CACHE___264.method222(((long) i << 16) + j);
Model model = (Model) A_CACHE___264.get(((long) i << 16) + j);
if (model != null) {
return model;
}
@@ -329,7 +331,7 @@ public class Component {
model = null;
}
if (model != null) {
A_CACHE___264.method223(model, (i << 16) + j);
A_CACHE___264.put((i << 16) + j, model);
}
return model;
}
+83 -35
View File
@@ -1,66 +1,114 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class DoublyLinkedList {
public final DoublyLinkedListNode aNode_43;
public DoublyLinkedListNode aNode_44;
public static class Node {
public Node prev;
public Node next;
public void unlink() {
if (next != null) {
next.prev = prev;
prev.next = next;
prev = null;
next = null;
}
}
}
public final Node head;
public Node peeked;
public DoublyLinkedList() {
aNode_43 = new DoublyLinkedListNode();
aNode_43.aNode_1303 = aNode_43;
aNode_43.aNode_1304 = aNode_43;
head = new Node();
head.prev = head;
head.next = head;
}
public void method150(DoublyLinkedListNode node) {
if (node.aNode_1304 != null) {
node.method330();
public void pushBack(Node node) {
if (node.next != null) {
node.unlink();
}
node.aNode_1304 = aNode_43.aNode_1304;
node.aNode_1303 = aNode_43;
node.aNode_1304.aNode_1303 = node;
node.aNode_1303.aNode_1304 = node;
node.next = head.next;
node.prev = head;
node.next.prev = node;
node.prev.next = node;
}
public DoublyLinkedListNode method151() {
DoublyLinkedListNode node = aNode_43.aNode_1303;
if (node == aNode_43) {
public void pushFront(Node node) {
if (node.next != null) {
node.unlink();
}
node.next = head;
node.prev = head.prev;
node.next.prev = node;
node.prev.next = node;
}
public Node pollFront() {
Node node = head.prev;
if (node == head) {
return null;
} else {
node.method330();
node.unlink();
return node;
}
}
public DoublyLinkedListNode method152() {
DoublyLinkedListNode node = aNode_43.aNode_1303;
if (node == aNode_43) {
aNode_44 = null;
public Node peekFront() {
Node node = head.prev;
if (node == head) {
peeked = null;
return null;
} else {
aNode_44 = node.aNode_1303;
peeked = node.prev;
return node;
}
}
public DoublyLinkedListNode method153() {
DoublyLinkedListNode node = aNode_44;
if (node == aNode_43) {
aNode_44 = null;
public Node peekBack() {
Node node = head.next;
if (node == head) {
peeked = null;
return null;
} else {
aNode_44 = node.aNode_1303;
peeked = node.next;
return node;
}
}
public int method154() {
int i = 0;
for (DoublyLinkedListNode node = aNode_43.aNode_1303; node != aNode_43; node = node.aNode_1303) {
i++;
public Node prev() {
Node node = peeked;
if (node == head) {
peeked = null;
return null;
} else {
peeked = node.prev;
return node;
}
return i;
}
public Node next() {
Node node = peeked;
if (node == head) {
peeked = null;
return null;
}
peeked = node.next;
return node;
}
public void clear() {
if (head.prev == head) {
return;
}
do {
Node node = head.prev;
if (node == head) {
return;
}
node.unlink();
} while (true);
}
}
-22
View File
@@ -1,22 +0,0 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class DoublyLinkedListNode extends LinkedListNode {
public DoublyLinkedListNode aNode_1303;
public DoublyLinkedListNode aNode_1304;
public DoublyLinkedListNode() {
}
public void method330() {
if (aNode_1304 != null) {
aNode_1304.aNode_1303 = aNode_1303;
aNode_1303.aNode_1304 = aNode_1304;
aNode_1303 = null;
aNode_1304 = null;
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
import java.util.Arrays;
public class Draw2D extends DoublyLinkedListNode {
public class Draw2D {
public static int[] pixels;
public static int width;
+1 -1
View File
@@ -1,4 +1,4 @@
public class Entity extends DoublyLinkedListNode {
public class Entity extends DoublyLinkedList.Node {
public VertexNormal[] vertexNormal;
public int minY = 1000;
+10 -11
View File
@@ -1,3 +1,5 @@
import java.io.IOException;
/**
* A simple file archive format.
*/
@@ -11,11 +13,11 @@ public class FileArchive {
public int[] fileOffset;
public boolean unpacked;
public FileArchive(byte[] src) {
public FileArchive(byte[] src) throws IOException {
load(src);
}
public void load(byte[] src) {
public void load(byte[] src) throws IOException {
Buffer buffer = new Buffer(src);
int unpackedSize = buffer.get3();
@@ -23,7 +25,7 @@ public class FileArchive {
if (packedSize != unpackedSize) {
data = new byte[unpackedSize];
BZip2.decompress(data, unpackedSize, src, 6, packedSize);
BZip2.decompress(src, 6, packedSize, data);
buffer = new Buffer(data);
unpacked = true;
} else {
@@ -48,7 +50,7 @@ public class FileArchive {
}
}
public byte[] read(String s, byte[] dst) {
public byte[] read(String s) throws IOException {
int hash = 0;
s = s.toUpperCase();
for (int j = 0; j < s.length(); j++) {
@@ -59,16 +61,13 @@ public class FileArchive {
if (fileHash[file] != hash) {
continue;
}
if (dst == null) {
dst = new byte[fileSizeInflated[file]];
}
byte[] dst = new byte[fileSizeInflated[file]];
if (!unpacked) {
BZip2.decompress(dst, fileSizeInflated[file], data, fileOffset[file], fileSizeDeflated[file]);
BZip2.decompress(data, fileOffset[file], fileSizeDeflated[file], dst);
} else {
for (int i = 0; i < fileSizeInflated[file]; i++) {
dst[i] = data[fileOffset[file] + i];
}
System.arraycopy(data, fileOffset[file], dst, 0, fileSizeInflated[file]);
}
return dst;
}
+1 -1
View File
@@ -30,7 +30,7 @@ public class FileStore {
int size = ((buf[0] & 0xff) << 16) + ((buf[1] & 0xff) << 8) + (buf[2] & 0xff);
int sector = ((buf[3] & 0xff) << 16) + ((buf[4] & 0xff) << 8) + (buf[5] & 0xff);
if ((size < 0) || (size > maxFileSize)) {
if (size > maxFileSize) {
return null;
}
+4 -2
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class FloType {
public static int anInt387;
@@ -21,8 +23,8 @@ public class FloType {
public FloType() {
}
public static void unpack(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("flo.dat", null));
public static void unpack(FileArchive archive) throws IOException {
Buffer buffer = new Buffer(archive.read("flo.dat"));
anInt387 = buffer.get2U();
if (instances == null) {
instances = new FloType[anInt387];
+275 -268
View File
File diff suppressed because it is too large. Load diff
+101 -95
View File
@@ -5,6 +5,7 @@
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
public abstract class GameShell extends Applet implements Runnable, MouseListener, MouseMotionListener, KeyListener, FocusListener, WindowListener {
@@ -54,116 +55,121 @@ public abstract class GameShell extends Applet implements Runnable, MouseListene
@Override
public void run() {
getComponent().addMouseListener(this);
getComponent().addMouseMotionListener(this);
getComponent().addKeyListener(this);
getComponent().addFocusListener(this);
try {
getComponent().addMouseListener(this);
getComponent().addMouseMotionListener(this);
getComponent().addKeyListener(this);
getComponent().addFocusListener(this);
if (frame != null) {
frame.addWindowListener(this);
}
showProgress(0, "Loading...");
load();
int opos = 0;
int ratio = 256;
int delta = 1;
int count = 0;
int intex = 0; // interrupt exceptions
for (int k1 = 0; k1 < 10; k1++) {
otim[k1] = System.currentTimeMillis();
}
while (state >= 0) {
if (state > 0) {
state--;
if (state == 0) {
shutdown();
return;
}
if (frame != null) {
frame.addWindowListener(this);
}
int lastRatio = ratio;
int lastDelta = delta;
showProgress(0, "Loading...");
load();
ratio = 300;
delta = 1;
int opos = 0;
int ratio = 256;
int delta = 1;
int count = 0;
int intex = 0; // interrupt exceptions
long ntime = System.currentTimeMillis();
if (otim[opos] == 0L) {
ratio = lastRatio;
delta = lastDelta;
} else if (ntime > otim[opos]) {
ratio = (int) ((long) (2560L * deltime) / (ntime - otim[opos]));
for (int k1 = 0; k1 < 10; k1++) {
otim[k1] = System.currentTimeMillis();
}
if (ratio < 25) {
ratio = 25;
}
if (ratio > 256) {
ratio = 256;
delta = (int) ((long) deltime - ((ntime - otim[opos]) / 10L));
}
if (delta > deltime) {
delta = deltime;
}
otim[opos] = ntime;
opos = (opos + 1) % 10;
if (delta > 1) {
for (int k2 = 0; k2 < 10; k2++) {
if (otim[k2] != 0L) {
otim[k2] += delta;
while (state >= 0) {
if (state > 0) {
state--;
if (state == 0) {
shutdown();
return;
}
}
}
if (delta < mindel) {
delta = mindel;
}
int lastRatio = ratio;
int lastDelta = delta;
try {
Thread.sleep(delta);
} catch (InterruptedException e) {
intex++;
}
ratio = 300;
delta = 1;
for (; count < 256; count += ratio) {
mousePressButton = lastMousePressButton;
mousePressX = lastMousePressX;
mousePressY = lastMousePressY;
mousePressTime = lastMousePressTime;
lastMousePressButton = 0;
update();
anInt32 = anInt33;
}
long ntime = System.currentTimeMillis();
count &= 0xff;
if (otim[opos] == 0L) {
ratio = lastRatio;
delta = lastDelta;
} else if (ntime > otim[opos]) {
ratio = (int) ((long) (2560L * deltime) / (ntime - otim[opos]));
}
if (deltime > 0) {
fps = (1000 * ratio) / (deltime * 256);
}
if (ratio < 25) {
ratio = 25;
}
draw();
if (ratio > 256) {
ratio = 256;
delta = (int) ((long) deltime - ((ntime - otim[opos]) / 10L));
}
if (debug) {
System.out.println("ntime:" + ntime);
for (int i = 0; i < 10; i++) {
int o = ((opos - i - 1) + 20) % 10;
System.out.println("otim" + o + ":" + otim[o]);
if (delta > deltime) {
delta = deltime;
}
otim[opos] = ntime;
opos = (opos + 1) % 10;
if (delta > 1) {
for (int k2 = 0; k2 < 10; k2++) {
if (otim[k2] != 0L) {
otim[k2] += delta;
}
}
}
if (delta < mindel) {
delta = mindel;
}
try {
Thread.sleep(delta);
} catch (InterruptedException e) {
intex++;
}
for (; count < 256; count += ratio) {
mousePressButton = lastMousePressButton;
mousePressX = lastMousePressX;
mousePressY = lastMousePressY;
mousePressTime = lastMousePressTime;
lastMousePressButton = 0;
update();
anInt32 = anInt33;
}
count &= 0xff;
if (deltime > 0) {
fps = (1000 * ratio) / (deltime * 256);
}
draw();
if (debug) {
System.out.println("ntime:" + ntime);
for (int i = 0; i < 10; i++) {
int o = ((opos - i - 1) + 20) % 10;
System.out.println("otim" + o + ":" + otim[o]);
}
System.out.println("fps:" + fps + " ratio:" + ratio + " count:" + count);
System.out.println("del:" + delta + " deltime:" + deltime + " mindel:" + mindel);
System.out.println("intex:" + intex + " opos:" + opos);
debug = false;
intex = 0;
}
System.out.println("fps:" + fps + " ratio:" + ratio + " count:" + count);
System.out.println("del:" + delta + " deltime:" + deltime + " mindel:" + mindel);
System.out.println("intex:" + intex + " opos:" + opos);
debug = false;
intex = 0;
}
} catch (Exception e) {
state = -1;
e.printStackTrace();
}
if (state == -1) {
@@ -456,7 +462,7 @@ public abstract class GameShell extends Applet implements Runnable, MouseListene
*
* @see #run()
*/
public abstract void load();
public abstract void load() throws IOException;
/**
* @see #run()
@@ -471,7 +477,7 @@ public abstract class GameShell extends Applet implements Runnable, MouseListene
/**
* @see #run()
*/
public abstract void draw();
public abstract void draw() throws IOException;
/**
* Refresh is invoked whenever the shell is expected to potentially lost its display image.
@@ -501,7 +507,7 @@ public abstract class GameShell extends Applet implements Runnable, MouseListene
thread.setPriority(priority);
}
public void showProgress(int percent, String message) {
public void showProgress(int percent, String message) throws IOException {
while (graphics == null) {
graphics = getComponent().getGraphics();
try {
-42
View File
@@ -1,42 +0,0 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class Hashtable {
public final int anInt39;
public final LinkedListNode[] aNodeArray40;
public Hashtable(int j) {
anInt39 = j;
aNodeArray40 = new LinkedListNode[j];
for (int k = 0; k < j; k++) {
LinkedListNode node = aNodeArray40[k] = new LinkedListNode();
node.aNode_549 = node;
node.aNode_550 = node;
}
}
public LinkedListNode method148(long l) {
LinkedListNode node = aNodeArray40[(int) (l & (long) (anInt39 - 1))];
for (LinkedListNode node_1 = node.aNode_549; node_1 != node; node_1 = node_1.aNode_549) {
if (node_1.aLong548 == l) {
return node_1;
}
}
return null;
}
public void method149(LinkedListNode node, long l) {
if (node.aNode_550 != null) {
node.method329();
}
LinkedListNode node_1 = aNodeArray40[(int) (l & (long) (anInt39 - 1))];
node.aNode_550 = node_1.aNode_550;
node.aNode_549 = node_1;
node.aNode_550.aNode_549 = node;
node.aNode_549.aNode_550 = node;
node.aLong548 = l;
}
}
+4 -2
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class IDKType {
public static int anInt655;
@@ -16,8 +18,8 @@ public class IDKType {
public IDKType() {
}
public static void unpack(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("idk.dat", null));
public static void unpack(FileArchive archive) throws IOException {
Buffer buffer = new Buffer(archive.read("idk.dat"));
anInt655 = buffer.get2U();
if (instances == null) {
instances = new IDKType[anInt655];
-174
View File
@@ -1,174 +0,0 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class ISAACCipher {
public int anInt334;
public final int[] anIntArray335;
public final int[] anIntArray336;
public int anInt337;
public int anInt338;
public int anInt339;
public ISAACCipher(int[] ai) {
anIntArray336 = new int[256];
anIntArray335 = new int[256];
for (int j = 0; j < ai.length; j++) {
anIntArray335[j] = ai[j];
}
method248();
}
public int method246() {
if (anInt334-- == 0) {
method247();
anInt334 = 255;
}
return anIntArray335[anInt334];
}
public void method247() {
anInt338 += ++anInt339;
for (int i = 0; i < 256; i++) {
int j = anIntArray336[i];
if ((i & 3) == 0) {
anInt337 ^= anInt337 << 13;
} else if ((i & 3) == 1) {
anInt337 ^= anInt337 >>> 6;
} else if ((i & 3) == 2) {
anInt337 ^= anInt337 << 2;
} else if ((i & 3) == 3) {
anInt337 ^= anInt337 >>> 16;
}
anInt337 += anIntArray336[(i + 128) & 0xff];
int k;
anIntArray336[i] = k = anIntArray336[(j & 0x3fc) >> 2] + anInt337 + anInt338;
anIntArray335[i] = anInt338 = anIntArray336[((k >> 8) & 0x3fc) >> 2] + j;
}
}
public void method248() {
int i1;
int j1;
int k1;
int l1;
int i2;
int j2;
int k2;
int l = i1 = j1 = k1 = l1 = i2 = j2 = k2 = 0x9e3779b9;
for (int i = 0; i < 4; i++) {
l ^= i1 << 11;
k1 += l;
i1 += j1;
i1 ^= j1 >>> 2;
l1 += i1;
j1 += k1;
j1 ^= k1 << 8;
i2 += j1;
k1 += l1;
k1 ^= l1 >>> 16;
j2 += k1;
l1 += i2;
l1 ^= i2 << 10;
k2 += l1;
i2 += j2;
i2 ^= j2 >>> 4;
l += i2;
j2 += k2;
j2 ^= k2 << 8;
i1 += j2;
k2 += l;
k2 ^= l >>> 9;
j1 += k2;
l += i1;
}
for (int j = 0; j < 256; j += 8) {
l += anIntArray335[j];
i1 += anIntArray335[j + 1];
j1 += anIntArray335[j + 2];
k1 += anIntArray335[j + 3];
l1 += anIntArray335[j + 4];
i2 += anIntArray335[j + 5];
j2 += anIntArray335[j + 6];
k2 += anIntArray335[j + 7];
l ^= i1 << 11;
k1 += l;
i1 += j1;
i1 ^= j1 >>> 2;
l1 += i1;
j1 += k1;
j1 ^= k1 << 8;
i2 += j1;
k1 += l1;
k1 ^= l1 >>> 16;
j2 += k1;
l1 += i2;
l1 ^= i2 << 10;
k2 += l1;
i2 += j2;
i2 ^= j2 >>> 4;
l += i2;
j2 += k2;
j2 ^= k2 << 8;
i1 += j2;
k2 += l;
k2 ^= l >>> 9;
j1 += k2;
l += i1;
anIntArray336[j] = l;
anIntArray336[j + 1] = i1;
anIntArray336[j + 2] = j1;
anIntArray336[j + 3] = k1;
anIntArray336[j + 4] = l1;
anIntArray336[j + 5] = i2;
anIntArray336[j + 6] = j2;
anIntArray336[j + 7] = k2;
}
for (int k = 0; k < 256; k += 8) {
l += anIntArray336[k];
i1 += anIntArray336[k + 1];
j1 += anIntArray336[k + 2];
k1 += anIntArray336[k + 3];
l1 += anIntArray336[k + 4];
i2 += anIntArray336[k + 5];
j2 += anIntArray336[k + 6];
k2 += anIntArray336[k + 7];
l ^= i1 << 11;
k1 += l;
i1 += j1;
i1 ^= j1 >>> 2;
l1 += i1;
j1 += k1;
j1 ^= k1 << 8;
i2 += j1;
k1 += l1;
k1 ^= l1 >>> 16;
j2 += k1;
l1 += i2;
l1 ^= i2 << 10;
k2 += l1;
i2 += j2;
i2 ^= j2 >>> 4;
l += i2;
j2 += k2;
j2 ^= k2 << 8;
i1 += j2;
k2 += l;
k2 ^= l >>> 9;
j1 += k2;
l += i1;
anIntArray336[k] = l;
anIntArray336[k + 1] = i1;
anIntArray336[k + 2] = j1;
anIntArray336[k + 3] = k1;
anIntArray336[k + 4] = l1;
anIntArray336[k + 5] = i2;
anIntArray336[k + 6] = j2;
anIntArray336[k + 7] = k2;
}
method247();
anInt334 = 256;
}
}
+5 -8
View File
@@ -1,11 +1,8 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.awt.*;
import java.awt.image.PixelGrabber;
import java.io.IOException;
public class Image24 extends Draw2D {
public class Image24 extends DoublyLinkedList.Node {
public int[] anIntArray1439;
public int anInt1440;
@@ -42,9 +39,9 @@ public class Image24 extends Draw2D {
}
}
public Image24(FileArchive archive, String s, int i) {
Buffer buffer = new Buffer(archive.read(s + ".dat", null));
Buffer buffer_1 = new Buffer(archive.read("index.dat", null));
public Image24(FileArchive archive, String s, int i) throws IOException {
Buffer buffer = new Buffer(archive.read(s + ".dat"));
Buffer buffer_1 = new Buffer(archive.read("index.dat"));
buffer_1.position = buffer.get2U();
anInt1444 = buffer_1.get2U();
anInt1445 = buffer_1.get2U();
+4 -6
View File
@@ -1,6 +1,4 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class Image8 {
@@ -13,9 +11,9 @@ public class Image8 {
public int anInt1456;
public int anInt1457;
public Image8(FileArchive archive, String s, int i) {
Buffer buffer = new Buffer(archive.read(s + ".dat", null));
Buffer buffer_1 = new Buffer(archive.read("index.dat", null));
public Image8(FileArchive archive, String s, int i) throws IOException {
Buffer buffer = new Buffer(archive.read(s + ".dat"));
Buffer buffer_1 = new Buffer(archive.read("index.dat"));
buffer_1.position = buffer.get2U();
anInt1456 = buffer_1.get2U();
anInt1457 = buffer_1.get2U();
+20 -50
View File
@@ -1,61 +1,31 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.util.Iterator;
import java.util.LinkedHashMap;
public class LRUCache {
public class LRUCache<T> {
public int anInt298;
public int anInt299;
public final DoublyLinkedListNode aNode_300 = new DoublyLinkedListNode();
public final int anInt301;
public int anInt302;
public final Hashtable aHashtable_303 = new Hashtable(1024);
public final DoublyLinkedList aDoublyLinkedList_304 = new DoublyLinkedList();
private final int capacity;
private final LinkedHashMap<Long, T> map;
public LRUCache(int i) {
anInt301 = i;
anInt302 = i;
public LRUCache(int capacity) {
this.capacity = capacity;
this.map = new LinkedHashMap<>(capacity);
}
public DoublyLinkedListNode method222(long l) {
DoublyLinkedListNode node = (DoublyLinkedListNode) aHashtable_303.method148(l);
if (node != null) {
aDoublyLinkedList_304.method150(node);
anInt299++;
} else {
anInt298++;
public T get(long key) {
return map.get(key);
}
public void put(long key, T value) {
if (map.containsKey(key) && map.size() == capacity) {
Iterator<Long> iter = map.keySet().iterator();
iter.next();
iter.remove();
}
return node;
map.put(key, value);
}
public void method223(DoublyLinkedListNode node, long l) {
if (anInt302 == 0) {
DoublyLinkedListNode node_1 = aDoublyLinkedList_304.method151();
node_1.method329();
node_1.method330();
if (node_1 == aNode_300) {
DoublyLinkedListNode node_2 = aDoublyLinkedList_304.method151();
node_2.method329();
node_2.method330();
}
} else {
anInt302--;
}
aHashtable_303.method149(node, l);
aDoublyLinkedList_304.method150(node);
}
public void method224() {
do {
DoublyLinkedListNode node = aDoublyLinkedList_304.method151();
if (node != null) {
node.method329();
node.method330();
} else {
anInt302 = anInt301;
return;
}
} while (true);
public void clear() {
map.clear();
}
}
-102
View File
@@ -1,102 +0,0 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class LinkedList {
public final LinkedListNode aNode_346;
public LinkedListNode aNode_347;
public LinkedList() {
aNode_346 = new LinkedListNode();
aNode_346.aNode_549 = aNode_346;
aNode_346.aNode_550 = aNode_346;
}
public void method249(LinkedListNode node) {
if (node.aNode_550 != null) {
node.method329();
}
node.aNode_550 = aNode_346.aNode_550;
node.aNode_549 = aNode_346;
node.aNode_550.aNode_549 = node;
node.aNode_549.aNode_550 = node;
}
public void method250(LinkedListNode node) {
if (node.aNode_550 != null) {
node.method329();
}
node.aNode_550 = aNode_346;
node.aNode_549 = aNode_346.aNode_549;
node.aNode_550.aNode_549 = node;
node.aNode_549.aNode_550 = node;
}
public LinkedListNode method251() {
LinkedListNode node = aNode_346.aNode_549;
if (node == aNode_346) {
return null;
} else {
node.method329();
return node;
}
}
public LinkedListNode method252() {
LinkedListNode node = aNode_346.aNode_549;
if (node == aNode_346) {
aNode_347 = null;
return null;
} else {
aNode_347 = node.aNode_549;
return node;
}
}
public LinkedListNode method253() {
LinkedListNode node = aNode_346.aNode_550;
if (node == aNode_346) {
aNode_347 = null;
return null;
} else {
aNode_347 = node.aNode_550;
return node;
}
}
public LinkedListNode method254() {
LinkedListNode node = aNode_347;
if (node == aNode_346) {
aNode_347 = null;
return null;
} else {
aNode_347 = node.aNode_549;
return node;
}
}
public LinkedListNode method255() {
LinkedListNode node = aNode_347;
if (node == aNode_346) {
aNode_347 = null;
return null;
}
aNode_347 = node.aNode_550;
return node;
}
public void method256() {
if (aNode_346.aNode_549 == aNode_346) {
return;
}
do {
LinkedListNode node = aNode_346.aNode_549;
if (node == aNode_346) {
return;
}
node.method329();
} while (true);
}
}
-23
View File
@@ -1,23 +0,0 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class LinkedListNode {
public long aLong548;
public LinkedListNode aNode_549;
public LinkedListNode aNode_550;
public LinkedListNode() {
}
public void method329() {
if (aNode_550 != null) {
aNode_550.aNode_549 = aNode_549;
aNode_549.aNode_550 = aNode_550;
aNode_549 = null;
aNode_550 = null;
}
}
}
+12 -10
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class LocType {
public static final Model[] A_MODEL_ARRAY_741 = new Model[4];
@@ -79,9 +81,9 @@ public class LocType {
aBuffer_753 = null;
}
public static void unpack(FileArchive archive) {
aBuffer_753 = new Buffer(archive.read("loc.dat", null));
Buffer buffer = new Buffer(archive.read("loc.idx", null));
public static void unpack(FileArchive archive) throws IOException {
aBuffer_753 = new Buffer(archive.read("loc.dat"));
Buffer buffer = new Buffer(archive.read("loc.idx"));
anInt756 = buffer.get2U();
anIntArray755 = new int[anInt756];
int i = 2;
@@ -226,7 +228,7 @@ public class LocType {
return null;
}
l1 = (long) (((long) anInt754 << 6) + l) + ((long) (k + 1) << 32);
Model model_1 = (Model) aCache_780.method222(l1);
Model model_1 = (Model) aCache_780.get(l1);
if (model_1 != null) {
return model_1;
}
@@ -240,7 +242,7 @@ public class LocType {
if (flag1) {
l2 += 0x10000;
}
model = (Model) aCache_785.method222(l2);
model = (Model) aCache_785.get(l2);
if (model == null) {
model = Model.tryGet(l2 & 0xffff);
if (model == null) {
@@ -249,7 +251,7 @@ public class LocType {
if (flag1) {
model.rotateY180();
}
aCache_785.method223(model, l2);
aCache_785.put(l2, model);
}
if (k1 > 1) {
A_MODEL_ARRAY_741[i2] = model;
@@ -271,7 +273,7 @@ public class LocType {
return null;
}
l1 = (long) (((long) anInt754 << 6) + ((long) i1 << 3) + l) + ((long) (k + 1) << 32);
Model class30_sub2_sub4_sub6_2 = (Model) aCache_780.method222(l1);
Model class30_sub2_sub4_sub6_2 = (Model) aCache_780.get(l1);
if (class30_sub2_sub4_sub6_2 != null) {
return class30_sub2_sub4_sub6_2;
}
@@ -280,7 +282,7 @@ public class LocType {
if (flag3) {
j2 += 0x10000;
}
model = (Model) aCache_785.method222(j2);
model = (Model) aCache_785.get(j2);
if (model == null) {
model = Model.tryGet(j2 & 0xffff);
if (model == null) {
@@ -289,7 +291,7 @@ public class LocType {
if (flag3) {
model.rotateY180();
}
aCache_785.method223(model, j2);
aCache_785.put(j2, model);
}
}
boolean flag;
@@ -321,7 +323,7 @@ public class LocType {
if (anInt760 == 1) {
model_3.anInt1654 = model_3.minY;
}
aCache_780.method223(model_3, l1);
aCache_780.put(l1, model_3);
return model_3;
}
+200 -180
View File
@@ -18,7 +18,7 @@ public class Model extends Entity {
public static int[] tmpVertexZ = new int[2000];
public static int[] tmpFaceAlpha = new int[2000];
public static ModelHeader[] headers;
public static Header[] headers;
public static OnDemand ondemand;
public static boolean[] faceClippedX = new boolean[4096];
@@ -51,6 +51,204 @@ public class Model extends Entity {
public static int[] palette = Draw3D.palette;
public static int[] reciprical16 = Draw3D.reciprical16;
public static class Header {
public byte[] data;
public int vertexCount;
public int faceCount;
public int texturedFaceCount;
public int obPoint1Position;
public int obPoint2Position;
public int obPoint3Position;
public int obPoint4Position;
public int obPoint5Position;
public int obVertex1Position;
public int obVertex2Position;
public int obFace1Position;
public int obFace2Position;
public int obFace3Position;
public int obFace4Position;
public int obFace5Position;
public int obAxisPosition;
}
public static void unload() {
headers = null;
faceClippedX = null;
faceNearClipped = null;
vertexScreenX = null;
vertexScreenY = null;
vertexScreenZ = null;
vertexViewSpaceX = null;
vertexViewSpaceY = null;
vertexViewSpaceZ = null;
tmpDepthFaceCount = null;
tmpDepthFaces = null;
tmpPriorityFaceCount = null;
tmpPriorityFaces = null;
tmpPriority10FaceDepth = null;
tmpPriority11FaceDepth = null;
tmpPriorityDepthSum = null;
sin = null;
cos = null;
palette = null;
reciprical16 = null;
}
public static void init(int count, OnDemand ondemand) {
headers = new Header[count];
Model.ondemand = ondemand;
}
public static void unpack(byte[] src, int id) {
if (src == null) {
Header header = headers[id] = new Header();
header.vertexCount = 0;
header.faceCount = 0;
header.texturedFaceCount = 0;
return;
}
Buffer buffer = new Buffer(src);
buffer.position = src.length - 18;
Header header = headers[id] = new Header();
header.data = src;
header.vertexCount = buffer.get2U();
header.faceCount = buffer.get2U();
header.texturedFaceCount = buffer.get1U();
int k = buffer.get1U();
int l = buffer.get1U();
int i1 = buffer.get1U();
int j1 = buffer.get1U();
int k1 = buffer.get1U();
int l1 = buffer.get2U();
int i2 = buffer.get2U();
//noinspection unused
int j2 = buffer.get2U();
int k2 = buffer.get2U();
int offset = 0;
header.obPoint1Position = offset;
offset += header.vertexCount;
header.obVertex2Position = offset;
offset += header.faceCount;
header.obFace3Position = offset;
if (l == 255) {
offset += header.faceCount;
} else {
header.obFace3Position = -l - 1;
}
header.obFace5Position = offset;
if (j1 == 1) {
offset += header.faceCount;
} else {
header.obFace5Position = -1;
}
header.obFace2Position = offset;
if (k == 1) {
offset += header.faceCount;
} else {
header.obFace2Position = -1;
}
header.obPoint5Position = offset;
if (k1 == 1) {
offset += header.vertexCount;
} else {
header.obPoint5Position = -1;
}
header.obFace4Position = offset;
if (i1 == 1) {
offset += header.faceCount;
} else {
header.obFace4Position = -1;
}
header.obVertex1Position = offset;
offset += k2;
header.obFace1Position = offset;
offset += header.faceCount * 2;
header.obAxisPosition = offset;
offset += header.texturedFaceCount * 6;
header.obPoint2Position = offset;
offset += l1;
header.obPoint3Position = offset;
offset += i2;
header.obPoint4Position = offset;
}
public static void unload(int id) {
headers[id] = null;
}
/**
* Tries to get the model. Sends a request to the ondemand service to load the model if it isn't loaded.
*
* @param id the model id.
* @return the model, or <code>null</code> if not loaded.
*/
public static Model tryGet(int id) {
if (headers == null) {
return null;
}
Header header = headers[id];
if (header != null) {
return new Model(id);
} else {
ondemand.method548(id);
return null;
}
}
/**
* Validates the provided model id. If the model is not loaded then a request is sent to the ondemand service.
*
* @param id the model id.
* @return <code>true</code> if the model is loaded.
*/
public static boolean validate(int id) {
if (headers == null) {
return false;
}
Header header = headers[id];
if (header != null) {
return true;
} else {
ondemand.method548(id);
return false;
}
}
/**
* Utility function. Multiplies the input HSL lightness component by the provided <code>scalar</code>.
*
* @param hsl the color value.
* @param scalar the scalar. [0...127]
* @param faceInfo Provided face info to determine the type of color to return. Textured triangles (type 2) only have
* a lightness component.
* @return the color.
* @see #palette
*/
public static int mulColorLightness(int hsl, int scalar, int faceInfo) {
if ((faceInfo & 2) == 2) {
if (scalar < 0) {
scalar = 0;
} else if (scalar > 127) {
scalar = 127;
}
scalar = 127 - scalar;
return scalar;
}
scalar = (scalar * (hsl & 0x7f)) >> 7;
if (scalar < 2) {
scalar = 2;
} else if (scalar > 126) {
scalar = 126;
}
return (hsl & 0xff80) + scalar;
}
public int vertexCount;
public int[] vertexX;
public int[] vertexY;
@@ -84,7 +282,6 @@ public class Model extends Entity {
public int radius;
public int minDepth;
public int maxDepth;
/**
* minDepth = (int) Math.sqrt((radius * radius) + (super.minY * super.minY));
* maxDepth = minDepth + (int) Math.sqrt((radius * radius) + (maxY * maxY));
@@ -112,7 +309,6 @@ public class Model extends Entity {
* @see #draw(int, int, int, int, int, int, int, int, int)
*/
public boolean pickBounds = false;
/**
* A storage for the original vertex normals to give {@link Scene#method308(Model, Model, int, int, int, boolean)}
* a reference.
@@ -136,7 +332,7 @@ public class Model extends Entity {
public Model(int id) {
counter++;
ModelHeader header = headers[id];
Header header = headers[id];
vertexCount = header.vertexCount;
faceCount = header.faceCount;
texturedFaceCount = header.texturedFaceCount;
@@ -776,182 +972,6 @@ public class Model extends Entity {
maxX = model.maxX;
}
public static void unload() {
headers = null;
faceClippedX = null;
faceNearClipped = null;
vertexScreenX = null;
vertexScreenY = null;
vertexScreenZ = null;
vertexViewSpaceX = null;
vertexViewSpaceY = null;
vertexViewSpaceZ = null;
tmpDepthFaceCount = null;
tmpDepthFaces = null;
tmpPriorityFaceCount = null;
tmpPriorityFaces = null;
tmpPriority10FaceDepth = null;
tmpPriority11FaceDepth = null;
tmpPriorityDepthSum = null;
sin = null;
cos = null;
palette = null;
reciprical16 = null;
}
public static void init(int count, OnDemand ondemand) {
headers = new ModelHeader[count];
Model.ondemand = ondemand;
}
public static void unpack(byte[] src, int id) {
if (src == null) {
ModelHeader header = headers[id] = new ModelHeader();
header.vertexCount = 0;
header.faceCount = 0;
header.texturedFaceCount = 0;
return;
}
Buffer buffer = new Buffer(src);
buffer.position = src.length - 18;
ModelHeader header = headers[id] = new ModelHeader();
header.data = src;
header.vertexCount = buffer.get2U();
header.faceCount = buffer.get2U();
header.texturedFaceCount = buffer.get1U();
int k = buffer.get1U();
int l = buffer.get1U();
int i1 = buffer.get1U();
int j1 = buffer.get1U();
int k1 = buffer.get1U();
int l1 = buffer.get2U();
int i2 = buffer.get2U();
//noinspection unused
int j2 = buffer.get2U();
int k2 = buffer.get2U();
int offset = 0;
header.obPoint1Position = offset;
offset += header.vertexCount;
header.obVertex2Position = offset;
offset += header.faceCount;
header.obFace3Position = offset;
if (l == 255) {
offset += header.faceCount;
} else {
header.obFace3Position = -l - 1;
}
header.obFace5Position = offset;
if (j1 == 1) {
offset += header.faceCount;
} else {
header.obFace5Position = -1;
}
header.obFace2Position = offset;
if (k == 1) {
offset += header.faceCount;
} else {
header.obFace2Position = -1;
}
header.obPoint5Position = offset;
if (k1 == 1) {
offset += header.vertexCount;
} else {
header.obPoint5Position = -1;
}
header.obFace4Position = offset;
if (i1 == 1) {
offset += header.faceCount;
} else {
header.obFace4Position = -1;
}
header.obVertex1Position = offset;
offset += k2;
header.obFace1Position = offset;
offset += header.faceCount * 2;
header.obAxisPosition = offset;
offset += header.texturedFaceCount * 6;
header.obPoint2Position = offset;
offset += l1;
header.obPoint3Position = offset;
offset += i2;
header.obPoint4Position = offset;
}
public static void unload(int id) {
headers[id] = null;
}
/**
* Tries to get the model. Sends a request to the ondemand service to load the model if it isn't loaded.
*
* @param id the model id.
* @return the model, or <code>null</code> if not loaded.
*/
public static Model tryGet(int id) {
if (headers == null) {
return null;
}
ModelHeader header = headers[id];
if (header != null) {
return new Model(id);
} else {
ondemand.method548(id);
return null;
}
}
/**
* Validates the provided model id. If the model is not loaded then a request is sent to the ondemand service.
*
* @param id the model id.
* @return <code>true</code> if the model is loaded.
*/
public static boolean validate(int id) {
if (headers == null) {
return false;
}
ModelHeader header = headers[id];
if (header != null) {
return true;
} else {
ondemand.method548(id);
return false;
}
}
/**
* Utility function. Multiplies the input HSL lightness component by the provided <code>scalar</code>.
*
* @param hsl the color value.
* @param scalar the scalar. [0...127]
* @param faceInfo Provided face info to determine the type of color to return. Textured triangles (type 2) only have
* a lightness component.
* @return the color.
* @see #palette
*/
public static int mulColorLightness(int hsl, int scalar, int faceInfo) {
if ((faceInfo & 2) == 2) {
if (scalar < 0) {
scalar = 0;
} else if (scalar > 127) {
scalar = 127;
}
scalar = 127 - scalar;
return scalar;
}
scalar = (scalar * (hsl & 0x7f)) >> 7;
if (scalar < 2) {
scalar = 2;
} else if (scalar > 126) {
scalar = 126;
}
return (hsl & 0xff80) + scalar;
}
/**
* Sets <code>this</code> model to the provided model using a vertex pool.
* <p>
-24
View File
@@ -1,24 +0,0 @@
public class ModelHeader {
public byte[] data;
public int vertexCount;
public int faceCount;
public int texturedFaceCount;
public int obPoint1Position;
public int obPoint2Position;
public int obPoint3Position;
public int obPoint4Position;
public int obPoint5Position;
public int obVertex1Position;
public int obVertex2Position;
public int obFace1Position;
public int obFace2Position;
public int obFace3Position;
public int obFace4Position;
public int obFace5Position;
public int obAxisPosition;
public ModelHeader() {
}
}
+7 -5
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class NPCType {
public static int anInt56;
@@ -30,9 +32,9 @@ public class NPCType {
return type;
}
public static void unpack(FileArchive archive) {
aBuffer_60 = new Buffer(archive.read("npc.dat", null));
Buffer buffer = new Buffer(archive.read("npc.idx", null));
public static void unpack(FileArchive archive) throws IOException {
aBuffer_60 = new Buffer(archive.read("npc.dat"));
Buffer buffer = new Buffer(archive.read("npc.idx"));
anInt62 = buffer.get2U();
anIntArray72 = new int[anInt62];
int i = 2;
@@ -153,7 +155,7 @@ public class NPCType {
return type.method164(j, k, ai);
}
}
Model model = (Model) aCache_95.method222(aLong78);
Model model = (Model) aCache_95.get(aLong78);
if (model == null) {
boolean flag = false;
for (int value : anIntArray94) {
@@ -180,7 +182,7 @@ public class NPCType {
}
model.createLabelReferences();
model.calculateNormals(64 + anInt85, 850 + anInt92, -30, -50, -30, true);
aCache_95.method223(model, aLong78);
aCache_95.put(aLong78, model);
}
Model model_1 = Model.EMPTY;
model_1.set(model, SeqFrame.isNull(k) & SeqFrame.isNull(j));
+10 -8
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class ObjType {
public static LRUCache aCache_158 = new LRUCache(100);
@@ -64,9 +66,9 @@ public class ObjType {
aBuffer_183 = null;
}
public static void unpack(FileArchive archive) {
aBuffer_183 = new Buffer(archive.read("obj.dat", null));
Buffer buffer = new Buffer(archive.read("obj.idx", null));
public static void unpack(FileArchive archive) throws IOException {
aBuffer_183 = new Buffer(archive.read("obj.dat"));
Buffer buffer = new Buffer(archive.read("obj.idx"));
anInt203 = buffer.get2U();
anIntArray195 = new int[anInt203];
int i = 2;
@@ -107,9 +109,9 @@ public class ObjType {
public static Image24 method200(int i, int j, int k) {
if (k == 0) {
Image24 image = (Image24) aCache_158.method222(i);
Image24 image = (Image24) aCache_158.get(i);
if ((image != null) && (image.anInt1445 != j) && (image.anInt1445 != -1)) {
image.method329();
image.unlink();
image = null;
}
if (image != null) {
@@ -217,7 +219,7 @@ public class ObjType {
class30_sub2_sub1_sub1_2.anInt1445 = j6;
}
if (k == 0) {
aCache_158.method223(class30_sub2_sub1_sub1_1, i);
aCache_158.put(i, class30_sub2_sub1_sub1_1);
}
Draw2D.bind(ai1, i2, j2);
Draw2D.setBounds(j3, k2, l2, i3);
@@ -420,7 +422,7 @@ public class ObjType {
return method198(j).method201(1);
}
}
Model model = (Model) aCache_159.method222(anInt157);
Model model = (Model) aCache_159.get(anInt157);
if (model != null) {
return model;
}
@@ -438,7 +440,7 @@ public class ObjType {
}
model.calculateNormals(64 + anInt196, 768 + anInt184, -50, -10, -50, true);
model.pickBounds = true;
aCache_159.method223(model, anInt157);
aCache_159.put(anInt157, model);
return model;
}
+315 -252
View File
@@ -1,174 +1,189 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.LinkedList;
import java.util.zip.CRC32;
import java.util.zip.GZIPInputStream;
public class OnDemand implements Runnable {
public final LinkedList aList_1331 = new LinkedList();
public final DoublyLinkedList pending = new DoublyLinkedList();
public final CRC32 crc32 = new CRC32();
public final byte[] aByteArray1339 = new byte[500];
public final byte[][] storeFilePriority = new byte[4][];
public final LinkedList aList_1344 = new LinkedList();
public final LinkedList aList_1358 = new LinkedList();
public final byte[] bbuf = new byte[500];
public final byte[][] storeFilePriorities = new byte[4][];
public final DoublyLinkedList aList_1344 = new DoublyLinkedList();
public final DoublyLinkedList completed = new DoublyLinkedList();
public final byte[] aByteArray1359 = new byte[65000];
public final DoublyLinkedList aDoublyLinkedList_1361 = new DoublyLinkedList();
public final LinkedList<OnDemandRequest> requests = new LinkedList<>();
public final int[][] storeFileVersions = new int[4][];
public final int[][] storeFileChecksums = new int[4][];
public final LinkedList aList_1368 = new LinkedList();
public final LinkedList aList_1370 = new LinkedList();
public int anInt1330;
public final DoublyLinkedList aList_1368 = new DoublyLinkedList();
public final DoublyLinkedList aList_1370 = new DoublyLinkedList();
private final Object lock = new Object();
public int totalPrefetchFiles;
public int topPriority;
public String aString1333 = "";
public int anInt1334;
public long aLong1335;
public String message = "";
public int heartbeatCycle;
public long socketOpenTime;
public int[] mapLocFile;
public int cycle;
public Game game;
public int anInt1346;
public int anInt1347;
public int partOffset;
public int partAvailable;
public int[] midiIndex;
public int anInt1349;
public int[] mapLandFile;
public int anInt1351;
public int loadedPretechFiles;
public boolean running = true;
public OutputStream anOutputStream1354;
public OutputStream out;
public int[] mapPrefetched;
public boolean aBoolean1357 = false;
public int[] animIndex;
public InputStream anInputStream1362;
public Socket aSocket1363;
public int anInt1366;
public int anInt1367;
public OnDemandRequest aRequest_1369;
public InputStream in;
public Socket socket;
public int importantCount;
public int requestCount;
public OnDemandRequest current;
public int[] mapIndex;
public byte[] modelIndex;
public int anInt1373;
public int waitCycles;
public OnDemand() {
}
public boolean method549(int i, int j, byte[] abyte0) {
if ((abyte0 == null) || (abyte0.length < 2)) {
public boolean validate(int version, int crc, byte[] src) {
if ((src == null) || (src.length < 2)) {
return false;
}
int k = abyte0.length - 2;
int l = ((abyte0[k] & 0xff) << 8) + (abyte0[k + 1] & 0xff);
int foot = src.length - 2;
int footVersion = ((src[foot] & 0xff) << 8) + (src[foot + 1] & 0xff);
crc32.reset();
crc32.update(abyte0, 0, k);
int i1 = (int) crc32.getValue();
if (l != i) {
crc32.update(src, 0, foot);
int srcCrc = (int) crc32.getValue();
if (footVersion != version) {
return false;
}
return i1 == j;
return srcCrc == crc;
}
public void method550() {
public void read() {
try {
int j = anInputStream1362.available();
if ((anInt1347 == 0) && (j >= 6)) {
int available = in.available();
if ((partAvailable == 0) && (available >= 6)) {
aBoolean1357 = true;
for (int k = 0; k < 6; k += anInputStream1362.read(aByteArray1339, k, 6 - k)) {
}
int l = aByteArray1339[0] & 0xff;
int j1 = ((aByteArray1339[1] & 0xff) << 8) + (aByteArray1339[2] & 0xff);
int l1 = ((aByteArray1339[3] & 0xff) << 8) + (aByteArray1339[4] & 0xff);
int i2 = aByteArray1339[5] & 0xff;
aRequest_1369 = null;
for (OnDemandRequest request = (OnDemandRequest) aList_1331.method252(); request != null; request = (OnDemandRequest) aList_1331.method254()) {
if ((request.store == l) && (request.file == j1)) {
aRequest_1369 = request;
in.read(bbuf, 0, 6);
int store = bbuf[0] & 0xff;
int file = ((bbuf[1] & 0xff) << 8) + (bbuf[2] & 0xff);
int size = ((bbuf[3] & 0xff) << 8) + (bbuf[4] & 0xff);
int part = bbuf[5] & 0xff;
current = null;
for (OnDemandRequest request = (OnDemandRequest) pending.peekFront(); request != null; request = (OnDemandRequest) pending.prev()) {
if ((request.store == store) && (request.file == file)) {
current = request;
}
if (aRequest_1369 != null) {
request.anInt1423 = 0;
if (current != null) {
request.cycle = 0;
}
}
if (aRequest_1369 != null) {
anInt1373 = 0;
if (l1 == 0) {
Signlink.reporterror("Rej: " + l + "," + j1);
aRequest_1369.data = null;
if (aRequest_1369.aBoolean1422) {
synchronized (aList_1358) {
aList_1358.method249(aRequest_1369);
if (current != null) {
waitCycles = 0;
if (size == 0) {
Signlink.reporterror("Rej: " + store + "," + file);
current.data = null;
if (current.important) {
synchronized (completed) {
completed.pushBack(current);
}
} else {
aRequest_1369.method329();
current.unlink();
}
aRequest_1369 = null;
current = null;
} else {
if ((aRequest_1369.data == null) && (i2 == 0)) {
aRequest_1369.data = new byte[l1];
if ((current.data == null) && (part == 0)) {
current.data = new byte[size];
}
if ((aRequest_1369.data == null) && (i2 != 0)) {
if (current.data == null) {
throw new IOException("missing start of file");
}
}
}
anInt1346 = i2 * 500;
anInt1347 = 500;
if (anInt1347 > (l1 - (i2 * 500))) {
anInt1347 = l1 - (i2 * 500);
partOffset = part * 500;
partAvailable = 500;
if (partAvailable > (size - (part * 500))) {
partAvailable = size - (part * 500);
}
}
if ((anInt1347 > 0) && (j >= anInt1347)) {
if ((partAvailable > 0) && (available >= partAvailable)) {
aBoolean1357 = true;
byte[] abyte0 = aByteArray1339;
int i1 = 0;
if (aRequest_1369 != null) {
abyte0 = aRequest_1369.data;
i1 = anInt1346;
byte[] dst = bbuf;
int offset = 0;
if (current != null) {
dst = current.data;
offset = partOffset;
}
for (int k1 = 0; k1 < anInt1347; k1 += anInputStream1362.read(abyte0, k1 + i1, anInt1347 - k1)) {
}
if (((anInt1347 + anInt1346) >= abyte0.length) && (aRequest_1369 != null)) {
in.read(dst, offset, partAvailable);
if (((partAvailable + partOffset) >= dst.length) && (current != null)) {
if (game.filestores[0] != null) {
game.filestores[aRequest_1369.store + 1].write(abyte0, aRequest_1369.file, abyte0.length);
game.filestores[current.store + 1].write(dst, current.file, dst.length);
}
if (!aRequest_1369.aBoolean1422 && (aRequest_1369.store == 3)) {
aRequest_1369.aBoolean1422 = true;
aRequest_1369.store = 93;
if (!current.important && (current.store == 3)) {
current.important = true;
current.store = 93;
}
if (aRequest_1369.aBoolean1422) {
synchronized (aList_1358) {
aList_1358.method249(aRequest_1369);
if (current.important) {
synchronized (completed) {
completed.pushBack(current);
}
} else {
aRequest_1369.method329();
current.unlink();
}
}
anInt1347 = 0;
partAvailable = 0;
}
} catch (IOException ioexception) {
try {
aSocket1363.close();
socket.close();
} catch (Exception ignored) {
}
aSocket1363 = null;
anInputStream1362 = null;
anOutputStream1354 = null;
anInt1347 = 0;
socket = null;
in = null;
out = null;
partAvailable = 0;
}
}
public void load(FileArchive versionlist, Game game) {
public void load(FileArchive versionlist, Game game) throws IOException {
String[] versionFilenames = {"model_version", "anim_version", "midi_version", "map_version"};
for (int i = 0; i < 4; i++) {
byte[] data = versionlist.read(versionFilenames[i], null);
byte[] data = versionlist.read(versionFilenames[i]);
int count = data.length / 2;
Buffer buffer = new Buffer(data);
storeFileVersions[i] = new int[count];
storeFilePriority[i] = new byte[count];
storeFilePriorities[i] = new byte[count];
for (int l = 0; l < count; l++) {
storeFileVersions[i][l] = buffer.get2U();
@@ -178,7 +193,7 @@ public class OnDemand implements Runnable {
String[] crcFilenames = {"model_crc", "anim_crc", "midi_crc", "map_crc"};
for (int i = 0; i < 4; i++) {
byte[] data = versionlist.read(crcFilenames[i], null);
byte[] data = versionlist.read(crcFilenames[i]);
int count = data.length / 4;
Buffer buffer = new Buffer(data);
storeFileChecksums[i] = new int[count];
@@ -187,7 +202,7 @@ public class OnDemand implements Runnable {
}
}
byte[] data = versionlist.read("model_index", null);
byte[] data = versionlist.read("model_index");
int count = storeFileVersions[0].length;
modelIndex = new byte[count];
@@ -200,7 +215,7 @@ public class OnDemand implements Runnable {
}
}
data = versionlist.read("map_index", null);
data = versionlist.read("map_index");
Buffer buffer = new Buffer(data);
count = data.length / 7;
@@ -216,7 +231,7 @@ public class OnDemand implements Runnable {
mapPrefetched[i2] = buffer.get1U();
}
data = versionlist.read("anim_index", null);
data = versionlist.read("anim_index");
buffer = new Buffer(data);
count = data.length / 2;
animIndex = new int[count];
@@ -225,7 +240,7 @@ public class OnDemand implements Runnable {
animIndex[j2] = buffer.get2U();
}
data = versionlist.read("midi_index", null);
data = versionlist.read("midi_index");
buffer = new Buffer(data);
count = data.length;
midiIndex = new int[count];
@@ -240,8 +255,8 @@ public class OnDemand implements Runnable {
}
public int remaining() {
synchronized (aDoublyLinkedList_1361) {
return aDoublyLinkedList_1361.method154();
synchronized (lock) {
return requests.size();
}
}
@@ -253,8 +268,8 @@ public class OnDemand implements Runnable {
int count = mapIndex.length;
for (int i = 0; i < count; i++) {
if (members || (mapPrefetched[i] != 0)) {
method563((byte) 2, 3, mapLocFile[i]);
method563((byte) 2, 3, mapLandFile[i]);
prefetch((byte) 2, 3, mapLocFile[i]);
prefetch((byte) 2, 3, mapLandFile[i]);
}
}
}
@@ -263,51 +278,55 @@ public class OnDemand implements Runnable {
return storeFileVersions[store].length;
}
public void method556(OnDemandRequest request) {
public void send(OnDemandRequest request) {
try {
if (aSocket1363 == null) {
long l = System.currentTimeMillis();
if ((l - aLong1335) < 4000L) {
if (socket == null) {
long now = System.currentTimeMillis();
if ((now - socketOpenTime) < 4000L) {
return;
}
aLong1335 = l;
aSocket1363 = game.method19(43594 + Game.portOffset);
anInputStream1362 = aSocket1363.getInputStream();
anOutputStream1354 = aSocket1363.getOutputStream();
anOutputStream1354.write(15);
socketOpenTime = now;
socket = game.method19(43594 + Game.portOffset);
in = socket.getInputStream();
out = socket.getOutputStream();
out.write(15);
for (int j = 0; j < 8; j++) {
anInputStream1362.read();
in.read();
}
anInt1373 = 0;
waitCycles = 0;
}
aByteArray1339[0] = (byte) request.store;
aByteArray1339[1] = (byte) (request.file >> 8);
aByteArray1339[2] = (byte) request.file;
if (request.aBoolean1422) {
aByteArray1339[3] = 2;
} else if (!game.aBoolean1157) {
aByteArray1339[3] = 1;
bbuf[0] = (byte) request.store;
bbuf[1] = (byte) (request.file >> 8);
bbuf[2] = (byte) request.file;
if (request.important) {
bbuf[3] = 2;
} else if (!game.ingame) {
bbuf[3] = 1;
} else {
aByteArray1339[3] = 0;
bbuf[3] = 0;
}
anOutputStream1354.write(aByteArray1339, 0, 4);
anInt1334 = 0;
out.write(bbuf, 0, 4);
heartbeatCycle = 0;
anInt1349 = -10000;
return;
} catch (IOException ignored) {
}
try {
aSocket1363.close();
socket.close();
} catch (Exception ignored) {
}
aSocket1363 = null;
anInputStream1362 = null;
anOutputStream1354 = null;
anInt1347 = 0;
socket = null;
in = null;
out = null;
partAvailable = 0;
anInt1349++;
}
public int method557() {
public int getSeqFrameCount() {
return animIndex.length;
}
@@ -318,20 +337,21 @@ public class OnDemand implements Runnable {
if (storeFileVersions[archive][file] == 0) {
return;
}
synchronized (aDoublyLinkedList_1361) {
for (OnDemandRequest request = (OnDemandRequest) aDoublyLinkedList_1361.method152(); request != null; request = (OnDemandRequest) aDoublyLinkedList_1361.method153()) {
if ((request.store == archive) && (request.file == file)) {
synchronized (lock) {
for (OnDemandRequest request : requests) {
if (request.store == archive && request.file == file) {
return;
}
}
OnDemandRequest request = new OnDemandRequest();
request.store = archive;
request.file = file;
request.aBoolean1422 = true;
request.important = true;
synchronized (aList_1370) {
aList_1370.method249(request);
aList_1370.pushBack(request);
}
aDoublyLinkedList_1361.method150(request);
requests.addFirst(request);
}
}
@@ -344,79 +364,99 @@ public class OnDemand implements Runnable {
try {
while (running) {
cycle++;
int i = 20;
int del = 20;
if ((topPriority == 0) && (game.filestores[0] != null)) {
i = 50;
del = 50;
}
try {
Thread.sleep(i);
Thread.sleep(del);
} catch (Exception ignored) {
}
aBoolean1357 = true;
for (int j = 0; j < 100; j++) {
if (!aBoolean1357) {
break;
}
aBoolean1357 = false;
method567();
method565();
if ((anInt1366 == 0) && (j >= 5)) {
if ((importantCount == 0) && (j >= 5)) {
break;
}
method568();
if (anInputStream1362 != null) {
method550();
if (in != null) {
read();
}
}
boolean flag = false;
for (OnDemandRequest request = (OnDemandRequest) aList_1331.method252(); request != null; request = (OnDemandRequest) aList_1331.method254()) {
if (request.aBoolean1422) {
flag = true;
request.anInt1423++;
if (request.anInt1423 > 50) {
request.anInt1423 = 0;
method556(request);
boolean loading = false;
for (OnDemandRequest request = (OnDemandRequest) pending.peekFront(); request != null; request = (OnDemandRequest) pending.prev()) {
if (request.important) {
loading = true;
request.cycle++;
if (request.cycle > 50) {
request.cycle = 0;
send(request);
}
}
}
if (!flag) {
for (OnDemandRequest request_1 = (OnDemandRequest) aList_1331.method252(); request_1 != null; request_1 = (OnDemandRequest) aList_1331.method254()) {
flag = true;
request_1.anInt1423++;
if (request_1.anInt1423 > 50) {
request_1.anInt1423 = 0;
method556(request_1);
if (!loading) {
for (OnDemandRequest request = (OnDemandRequest) pending.peekFront(); request != null; request = (OnDemandRequest) pending.prev()) {
loading = true;
request.cycle++;
if (request.cycle > 50) {
request.cycle = 0;
send(request);
}
}
}
if (flag) {
anInt1373++;
if (anInt1373 > 750) {
if (loading) {
waitCycles++;
if (waitCycles > 750) {
try {
aSocket1363.close();
socket.close();
} catch (Exception ignored) {
}
aSocket1363 = null;
anInputStream1362 = null;
anOutputStream1354 = null;
anInt1347 = 0;
socket = null;
in = null;
out = null;
partAvailable = 0;
}
} else {
anInt1373 = 0;
aString1333 = "";
waitCycles = 0;
message = "";
}
if (game.aBoolean1157 && (aSocket1363 != null) && (anOutputStream1354 != null) && ((topPriority > 0) || (game.filestores[0] == null))) {
anInt1334++;
if (anInt1334 > 500) {
anInt1334 = 0;
aByteArray1339[0] = 0;
aByteArray1339[1] = 0;
aByteArray1339[2] = 0;
aByteArray1339[3] = 10;
if (game.ingame && (socket != null) && (out != null) && ((topPriority > 0) || (game.filestores[0] == null))) {
heartbeatCycle++;
if (heartbeatCycle > 500) {
heartbeatCycle = 0;
bbuf[0] = 0;
bbuf[1] = 0;
bbuf[2] = 0;
bbuf[3] = 10;
try {
anOutputStream1354.write(aByteArray1339, 0, 4);
out.write(bbuf, 0, 4);
} catch (IOException _ex) {
anInt1373 = 5000;
waitCycles = 5000;
}
}
}
@@ -426,42 +466,47 @@ public class OnDemand implements Runnable {
}
}
public void method560(int i, int j) {
public void method560(int file, int store) {
if (game.filestores[0] == null) {
return;
}
if (storeFileVersions[j][i] == 0) {
if (storeFileVersions[store][file] == 0) {
return;
}
if (storeFilePriority[j][i] == 0) {
if (storeFilePriorities[store][file] == 0) {
return;
}
if (topPriority == 0) {
return;
}
OnDemandRequest request = new OnDemandRequest();
request.store = j;
request.file = i;
request.aBoolean1422 = false;
request.store = store;
request.file = file;
request.important = false;
synchronized (aList_1344) {
aList_1344.method249(request);
aList_1344.pushBack(request);
}
}
public OnDemandRequest poll() {
OnDemandRequest request;
synchronized (aList_1358) {
request = (OnDemandRequest) aList_1358.method251();
synchronized (completed) {
request = (OnDemandRequest) completed.pollFront();
}
if (request == null) {
return null;
}
synchronized (aDoublyLinkedList_1361) {
request.method330();
synchronized (lock) {
requests.remove(request);
}
if (request.data == null) {
return request;
}
int i = 0;
try {
GZIPInputStream gzipinputstream = new GZIPInputStream(new ByteArrayInputStream(request.data));
@@ -503,7 +548,7 @@ public class OnDemand implements Runnable {
request(0, i);
}
public void method563(byte priority, int archive, int file) {
public void prefetch(byte priority, int archive, int file) {
if (game.filestores[0] == null) {
return;
}
@@ -513,17 +558,17 @@ public class OnDemand implements Runnable {
byte[] data = game.filestores[archive + 1].read(file);
if (method549(storeFileVersions[archive][file], storeFileChecksums[archive][file], data)) {
if (validate(storeFileVersions[archive][file], storeFileChecksums[archive][file], data)) {
return;
}
storeFilePriority[archive][file] = priority;
storeFilePriorities[archive][file] = priority;
if (priority > topPriority) {
topPriority = priority;
}
anInt1330++;
totalPrefetchFiles++;
}
public boolean method564(int i) {
@@ -536,114 +581,132 @@ public class OnDemand implements Runnable {
}
public void method565() {
anInt1366 = 0;
anInt1367 = 0;
for (OnDemandRequest request = (OnDemandRequest) aList_1331.method252(); request != null; request = (OnDemandRequest) aList_1331.method254()) {
if (request.aBoolean1422) {
anInt1366++;
importantCount = 0;
requestCount = 0;
for (OnDemandRequest request = (OnDemandRequest) pending.peekFront(); request != null; request = (OnDemandRequest) pending.prev()) {
if (request.important) {
importantCount++;
} else {
anInt1367++;
requestCount++;
}
}
while (anInt1366 < 10) {
OnDemandRequest request_1 = (OnDemandRequest) aList_1368.method251();
if (request_1 == null) {
while (importantCount < 10) {
OnDemandRequest request = (OnDemandRequest) aList_1368.pollFront();
if (request == null) {
break;
}
if (storeFilePriority[request_1.store][request_1.file] != 0) {
anInt1351++;
if (storeFilePriorities[request.store][request.file] != 0) {
loadedPretechFiles++;
}
storeFilePriority[request_1.store][request_1.file] = 0;
aList_1331.method249(request_1);
anInt1366++;
method556(request_1);
storeFilePriorities[request.store][request.file] = 0;
pending.pushBack(request);
importantCount++;
send(request);
aBoolean1357 = true;
}
}
public void method566() {
synchronized (aList_1344) {
aList_1344.method256();
aList_1344.clear();
}
}
public void method567() {
OnDemandRequest request;
synchronized (aList_1370) {
request = (OnDemandRequest) aList_1370.method251();
request = (OnDemandRequest) aList_1370.pollFront();
}
while (request != null) {
aBoolean1357 = true;
byte[] abyte0 = null;
byte[] data = null;
if (game.filestores[0] != null) {
abyte0 = game.filestores[request.store + 1].read(request.file);
data = game.filestores[request.store + 1].read(request.file);
}
if (!method549(storeFileVersions[request.store][request.file], storeFileChecksums[request.store][request.file], abyte0)) {
abyte0 = null;
if (!validate(storeFileVersions[request.store][request.file], storeFileChecksums[request.store][request.file], data)) {
data = null;
}
synchronized (aList_1370) {
if (abyte0 == null) {
aList_1368.method249(request);
if (data == null) {
aList_1368.pushBack(request);
} else {
request.data = abyte0;
synchronized (aList_1358) {
aList_1358.method249(request);
request.data = data;
synchronized (completed) {
completed.pushBack(request);
}
}
request = (OnDemandRequest) aList_1370.method251();
request = (OnDemandRequest) aList_1370.pollFront();
}
}
}
public void method568() {
while ((anInt1366 == 0) && (anInt1367 < 10)) {
while ((importantCount == 0) && (requestCount < 10)) {
if (topPriority == 0) {
break;
}
OnDemandRequest request;
OnDemandRequest extra;
synchronized (aList_1344) {
request = (OnDemandRequest) aList_1344.method251();
extra = (OnDemandRequest) aList_1344.pollFront();
}
while (request != null) {
if (storeFilePriority[request.store][request.file] != 0) {
storeFilePriority[request.store][request.file] = 0;
aList_1331.method249(request);
method556(request);
while (extra != null) {
if (storeFilePriorities[extra.store][extra.file] != 0) {
storeFilePriorities[extra.store][extra.file] = 0;
pending.pushBack(extra);
send(extra);
aBoolean1357 = true;
if (anInt1351 < anInt1330) {
anInt1351++;
if (loadedPretechFiles < totalPrefetchFiles) {
loadedPretechFiles++;
}
aString1333 = "Loading extra files - " + (anInt1351 * 100) / anInt1330 + "%";
anInt1367++;
if (anInt1367 == 10) {
message = "Loading extra files - " + (loadedPretechFiles * 100) / totalPrefetchFiles + "%";
requestCount++;
if (requestCount == 10) {
return;
}
}
synchronized (aList_1344) {
request = (OnDemandRequest) aList_1344.method251();
extra = (OnDemandRequest) aList_1344.pollFront();
}
}
for (int j = 0; j < 4; j++) {
byte[] abyte0 = storeFilePriority[j];
int k = abyte0.length;
for (int l = 0; l < k; l++) {
if (abyte0[l] == topPriority) {
abyte0[l] = 0;
OnDemandRequest request_1 = new OnDemandRequest();
request_1.store = j;
request_1.file = l;
request_1.aBoolean1422 = false;
aList_1331.method249(request_1);
method556(request_1);
aBoolean1357 = true;
if (anInt1351 < anInt1330) {
anInt1351++;
}
aString1333 = "Loading extra files - " + (anInt1351 * 100) / anInt1330 + "%";
anInt1367++;
if (anInt1367 == 10) {
return;
}
for (int store = 0; store < 4; store++) {
byte[] priorities = storeFilePriorities[store];
for (int file = 0; file < priorities.length; file++) {
if (priorities[file] != topPriority) {
continue;
}
priorities[file] = 0;
OnDemandRequest request_1 = new OnDemandRequest();
request_1.store = store;
request_1.file = file;
request_1.important = false;
pending.pushBack(request_1);
send(request_1);
aBoolean1357 = true;
if (loadedPretechFiles < totalPrefetchFiles) {
loadedPretechFiles++;
}
message = "Loading extra files - " + (loadedPretechFiles * 100) / totalPrefetchFiles + "%";
requestCount++;
if (requestCount == 10) {
return;
}
}
}
+11 -8
View File
@@ -1,17 +1,20 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.util.Arrays;
public class OnDemandRequest extends DoublyLinkedListNode {
public class OnDemandRequest extends DoublyLinkedList.Node {
public int store;
public byte[] data;
public int file;
public boolean aBoolean1422;
public int anInt1423;
public boolean important;
public int cycle;
public byte[] data;
public OnDemandRequest() {
aBoolean1422 = true;
important = true;
}
@Override
public String toString() {
return "OnDemandRequest{" + "store=" + store + ", file=" + file + ", priority=" + important + ", cycle=" + cycle + ", data=" + Arrays.toString(data) + '}';
}
}
+3 -3
View File
@@ -218,7 +218,7 @@ public class PlayerEntity extends PathingEntity {
} else if (super.anInt1517 >= 0) {
k = SeqType.instances[super.anInt1517].anIntArray353[super.anInt1518];
}
Model model_1 = (Model) modelCache.method222(l);
Model model_1 = (Model) modelCache.get(l);
if (model_1 == null) {
boolean flag = false;
for (int i2 = 0; i2 < 12; i2++) {
@@ -238,7 +238,7 @@ public class PlayerEntity extends PathingEntity {
}
if (flag) {
if (aLong1697 != -1L) {
model_1 = (Model) modelCache.method222(aLong1697);
model_1 = (Model) modelCache.get(aLong1697);
}
if (model_1 == null) {
return null;
@@ -280,7 +280,7 @@ public class PlayerEntity extends PathingEntity {
}
model_1.createLabelReferences();
model_1.calculateNormals(64, 850, -30, -50, -30, true);
modelCache.method223(model_1, l);
modelCache.put(l, model_1);
aLong1697 = l;
}
if (aBoolean1699) {
+15 -14
View File
@@ -3,6 +3,7 @@
// Decompiler options: packimports(3)
import java.util.Arrays;
import java.util.LinkedList;
public class Scene {
@@ -46,7 +47,7 @@ public class Scene {
public static SceneOccluder[][] aOccluderArrayArray474 = new SceneOccluder[anInt472][500];
public static int anInt475;
public static final SceneOccluder[] A_OCCLUDER_ARRAY_476 = new SceneOccluder[500];
public static LinkedList aList_477 = new LinkedList();
public static DoublyLinkedList aList_477 = new DoublyLinkedList();
public static boolean[][][][] aBooleanArrayArrayArrayArray491 = new boolean[8][32][51][51];
public static boolean[][] aBooleanArrayArray492;
public static int anInt493;
@@ -1038,11 +1039,11 @@ public class Scene {
}
public void method314(SceneTile tile, boolean flag) {
aList_477.method249(tile);
aList_477.pushBack(tile);
do {
SceneTile tile_1;
do {
tile_1 = (SceneTile) aList_477.method251();
tile_1 = (SceneTile) aList_477.pollFront();
if (tile_1 == null) {
return;
}
@@ -1220,25 +1221,25 @@ public class Scene {
if ((i < eyeTileX) && ((k4 & 4) != 0)) {
SceneTile tile_17 = aclass30_sub3[i + 1][j];
if ((tile_17 != null) && tile_17.aBoolean1323) {
aList_477.method249(tile_17);
aList_477.pushBack(tile_17);
}
}
if ((j < eyeTileZ) && ((k4 & 2) != 0)) {
SceneTile tile_18 = aclass30_sub3[i][j + 1];
if ((tile_18 != null) && tile_18.aBoolean1323) {
aList_477.method249(tile_18);
aList_477.pushBack(tile_18);
}
}
if ((i > eyeTileX) && ((k4 & 1) != 0)) {
SceneTile tile_19 = aclass30_sub3[i - 1][j];
if ((tile_19 != null) && tile_19.aBoolean1323) {
aList_477.method249(tile_19);
aList_477.pushBack(tile_19);
}
}
if ((j > eyeTileZ) && ((k4 & 8) != 0)) {
SceneTile tile_20 = aclass30_sub3[i][j - 1];
if ((tile_20 != null) && tile_20.aBoolean1323) {
aList_477.method249(tile_20);
aList_477.pushBack(tile_20);
}
}
}
@@ -1345,9 +1346,9 @@ public class Scene {
for (int l8 = loc_3.anInt525; l8 <= loc_3.anInt526; l8++) {
SceneTile tile_22 = aclass30_sub3[k7][l8];
if (tile_22.anInt1325 != 0) {
aList_477.method249(tile_22);
aList_477.pushBack(tile_22);
} else if (((k7 != i) || (l8 != j)) && tile_22.aBoolean1323) {
aList_477.method249(tile_22);
aList_477.pushBack(tile_22);
}
}
}
@@ -1447,31 +1448,31 @@ public class Scene {
if (k < (anInt437 - 1)) {
SceneTile tile_12 = aTileArrayArrayArray441[k + 1][i][j];
if ((tile_12 != null) && tile_12.aBoolean1323) {
aList_477.method249(tile_12);
aList_477.pushBack(tile_12);
}
}
if (i < eyeTileX) {
SceneTile tile_13 = aclass30_sub3[i + 1][j];
if ((tile_13 != null) && tile_13.aBoolean1323) {
aList_477.method249(tile_13);
aList_477.pushBack(tile_13);
}
}
if (j < eyeTileZ) {
SceneTile tile_14 = aclass30_sub3[i][j + 1];
if ((tile_14 != null) && tile_14.aBoolean1323) {
aList_477.method249(tile_14);
aList_477.pushBack(tile_14);
}
}
if (i > eyeTileX) {
SceneTile tile_15 = aclass30_sub3[i - 1][j];
if ((tile_15 != null) && tile_15.aBoolean1323) {
aList_477.method249(tile_15);
aList_477.pushBack(tile_15);
}
}
if (j > eyeTileZ) {
SceneTile tile_16 = aclass30_sub3[i][j - 1];
if ((tile_16 != null) && tile_16.aBoolean1323) {
aList_477.method249(tile_16);
aList_477.pushBack(tile_16);
}
}
} while (true);
+1 -1
View File
@@ -2,7 +2,7 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class SceneLocTemporary extends LinkedListNode {
public class SceneLocTemporary extends DoublyLinkedList.Node {
public int anInt1291;
public int anInt1292;
+1 -1
View File
@@ -2,7 +2,7 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class SceneTile extends LinkedListNode {
public class SceneTile extends DoublyLinkedList.Node {
public int anInt1307;
public final int anInt1308;
+4 -2
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class SeqType {
public static int anInt350;
@@ -25,8 +27,8 @@ public class SeqType {
public SeqType() {
}
public static void unpack(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("seq.dat", null));
public static void unpack(FileArchive archive) throws IOException {
Buffer buffer = new Buffer(archive.read("seq.dat"));
anInt350 = buffer.get2U();
if (instances == null) {
instances = new SeqType[anInt350];
+7 -7
View File
@@ -2,13 +2,13 @@ public class SoundTrack {
public static final SoundTrack[] tracks = new SoundTrack[5000];
public static final int[] delays = new int[5000];
public static byte[] buffer;
public static byte[] bbuf;
public static Buffer buffer;
public static void method240(Buffer src) {
buffer = new byte[441000];
bbuf = new byte[441000];
SoundTrack.buffer = new Buffer(buffer);
SoundTrack.buffer = new Buffer(bbuf);
SoundTone.init();
do {
@@ -128,7 +128,7 @@ public class SoundTrack {
int totalSampleCount = sampleCount + ((loopStop - loopStart) * (loopCount - 1));
for (int sample = 44; sample < (totalSampleCount + 44); sample++) {
buffer[sample] = -128;
bbuf[sample] = -128;
}
for (int tone = 0; tone < 10; tone++) {
@@ -141,7 +141,7 @@ public class SoundTrack {
int[] samples = tones[tone].generate(toneSampleCount, tones[tone].length);
for (int sample = 0; sample < toneSampleCount; sample++) {
buffer[sample + start + 44] += (byte) (samples[sample] >> 8);
bbuf[sample + start + 44] += (byte) (samples[sample] >> 8);
}
}
@@ -154,14 +154,14 @@ public class SoundTrack {
// Moves the end of the sound (after the loops) to the true end of the buffer.
int endOffset = (totalSampleCount += 44) - sampleCount;
for (int sample = sampleCount - 1; sample >= loopStop; sample--) {
buffer[sample + endOffset] = buffer[sample];
bbuf[sample + endOffset] = bbuf[sample];
}
// Duplicates loop area.
for (int loop = 1; loop < loopCount; loop++) {
int offset = (loopStop - loopStart) * loop;
for (int sample = loopStart; sample < loopStop; sample++) {
buffer[sample + offset] = buffer[sample];
bbuf[sample + offset] = bbuf[sample];
}
}
+6 -4
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class SpotAnimType {
public static int anInt402;
@@ -22,8 +24,8 @@ public class SpotAnimType {
public SpotAnimType() {
}
public static void unpack(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("spotanim.dat", null));
public static void unpack(FileArchive archive) throws IOException {
Buffer buffer = new Buffer(archive.read("spotanim.dat"));
anInt402 = buffer.get2U();
if (instances == null) {
instances = new SpotAnimType[anInt402];
@@ -71,7 +73,7 @@ public class SpotAnimType {
}
public Model method266() {
Model model = (Model) modelCache.method222(anInt404);
Model model = (Model) modelCache.get(anInt404);
if (model != null) {
return model;
}
@@ -84,7 +86,7 @@ public class SpotAnimType {
model.replaceColor(anIntArray408[i], anIntArray409[i]);
}
}
modelCache.method223(model, anInt404);
modelCache.put(anInt404, model);
return model;
}
+4 -2
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class VarbitType {
public static int anInt645;
@@ -17,8 +19,8 @@ public class VarbitType {
public VarbitType() {
}
public static void unpack(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("varbit.dat", null));
public static void unpack(FileArchive archive) throws IOException {
Buffer buffer = new Buffer(archive.read("varbit.dat"));
anInt645 = buffer.get2U();
if (aVarbitArray646 == null) {
aVarbitArray646 = new VarbitType[anInt645];
+4 -2
View File
@@ -2,6 +2,8 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.io.IOException;
public class VarpType {
public static int anInt700;
@@ -24,8 +26,8 @@ public class VarpType {
public VarpType() {
}
public static void unpack(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("varp.dat", null));
public static void unpack(FileArchive archive) throws IOException {
Buffer buffer = new Buffer(archive.read("varp.dat"));
anInt702 = 0;
anInt700 = buffer.get2U();
if (instances == null) {
+4
View File
@@ -0,0 +1,4 @@
Manifest-Version: 1.0
Main-Class: Game
Class-Path: .