Scene
This commit is contained in:
1 parent
a4bb24e7e6
commit
626e6395ea
29 files changed
+3105
-2863
No files matched your search
+5
-4
@@ -1,10 +1,11 @@
|
||||
<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 class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
@@ -322,10 +322,10 @@ public class Component {
|
||||
model = Model.tryGet(j);
|
||||
}
|
||||
if (i == 2) {
|
||||
model = NPCType.method159(j).method160();
|
||||
model = NPCType.get(j).method160();
|
||||
}
|
||||
if (i == 3) {
|
||||
model = Game.aPlayer_1126.method453();
|
||||
model = Game.self.method453();
|
||||
}
|
||||
if (i == 4) {
|
||||
model = ObjType.method198(j).method202(50);
|
||||
|
||||
@@ -135,7 +135,7 @@ public class Draw3D {
|
||||
/**
|
||||
* Nullifies the texel pool. {@link #initPool(int)} must be called again if textured triangles are drawn.
|
||||
*/
|
||||
public static void disposePool() {
|
||||
public static void clearTexels() {
|
||||
texelPool = null;
|
||||
for (int j = 0; j < 50; j++) {
|
||||
activeTexels[j] = null;
|
||||
@@ -261,7 +261,7 @@ public class Draw3D {
|
||||
}
|
||||
} else {
|
||||
// scale 64x64 textures up to 128x128
|
||||
if (texture.anInt1452 == 64) {
|
||||
if (texture.width == 64) {
|
||||
for (int y = 0; y < 128; y++) {
|
||||
for (int x = 0; x < 128; x++) {
|
||||
texels[x + (y << 7)] = palette[texture.pixels[(x >> 1) + ((y >> 1) << 6)]];
|
||||
|
||||
+1253
-1109
File diff suppressed because it is too large.
Load diff
+296
-299
@@ -4,19 +4,19 @@ import java.io.IOException;
|
||||
|
||||
public class Image24 extends DoublyLinkedList.Node {
|
||||
|
||||
public int[] anIntArray1439;
|
||||
public int anInt1440;
|
||||
public int anInt1441;
|
||||
public int anInt1442;
|
||||
public int anInt1443;
|
||||
public int anInt1444;
|
||||
public int anInt1445;
|
||||
public int[] pixels;
|
||||
public int width;
|
||||
public int height;
|
||||
public int cropX;
|
||||
public int cropY;
|
||||
public int cropW;
|
||||
public int cropH;
|
||||
|
||||
public Image24(int i, int j) {
|
||||
anIntArray1439 = new int[i * j];
|
||||
anInt1440 = anInt1444 = i;
|
||||
anInt1441 = anInt1445 = j;
|
||||
anInt1442 = anInt1443 = 0;
|
||||
pixels = new int[i * j];
|
||||
width = cropW = i;
|
||||
height = cropH = j;
|
||||
cropX = cropY = 0;
|
||||
}
|
||||
|
||||
public Image24(byte[] abyte0, java.awt.Component component) {
|
||||
@@ -25,14 +25,14 @@ public class Image24 extends DoublyLinkedList.Node {
|
||||
MediaTracker mediatracker = new MediaTracker(component);
|
||||
mediatracker.addImage(image, 0);
|
||||
mediatracker.waitForAll();
|
||||
anInt1440 = image.getWidth(component);
|
||||
anInt1441 = image.getHeight(component);
|
||||
anInt1444 = anInt1440;
|
||||
anInt1445 = anInt1441;
|
||||
anInt1442 = 0;
|
||||
anInt1443 = 0;
|
||||
anIntArray1439 = new int[anInt1440 * anInt1441];
|
||||
PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
|
||||
width = image.getWidth(component);
|
||||
height = image.getHeight(component);
|
||||
cropW = width;
|
||||
cropH = height;
|
||||
cropX = 0;
|
||||
cropY = 0;
|
||||
pixels = new int[width * height];
|
||||
PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0, width, height, pixels, 0, width);
|
||||
pixelgrabber.grabPixels();
|
||||
} catch (Exception _ex) {
|
||||
System.out.println("Error converting jpg");
|
||||
@@ -43,8 +43,8 @@ public class Image24 extends DoublyLinkedList.Node {
|
||||
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();
|
||||
cropW = buffer_1.get2U();
|
||||
cropH = buffer_1.get2U();
|
||||
int j = buffer_1.get1U();
|
||||
int[] ai = new int[j];
|
||||
for (int k = 0; k < (j - 1); k++) {
|
||||
@@ -58,35 +58,35 @@ public class Image24 extends DoublyLinkedList.Node {
|
||||
buffer.position += buffer_1.get2U() * buffer_1.get2U();
|
||||
buffer_1.position++;
|
||||
}
|
||||
anInt1442 = buffer_1.get1U();
|
||||
anInt1443 = buffer_1.get1U();
|
||||
anInt1440 = buffer_1.get2U();
|
||||
anInt1441 = buffer_1.get2U();
|
||||
int i1 = buffer_1.get1U();
|
||||
int j1 = anInt1440 * anInt1441;
|
||||
anIntArray1439 = new int[j1];
|
||||
if (i1 == 0) {
|
||||
for (int k1 = 0; k1 < j1; k1++) {
|
||||
anIntArray1439[k1] = ai[buffer.get1U()];
|
||||
cropX = buffer_1.get1U();
|
||||
cropY = buffer_1.get1U();
|
||||
width = buffer_1.get2U();
|
||||
height = buffer_1.get2U();
|
||||
int layout = buffer_1.get1U();
|
||||
int pixelLen = width * height;
|
||||
pixels = new int[pixelLen];
|
||||
if (layout == 0) {
|
||||
for (int k1 = 0; k1 < pixelLen; k1++) {
|
||||
pixels[k1] = ai[buffer.get1U()];
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (i1 == 1) {
|
||||
for (int l1 = 0; l1 < anInt1440; l1++) {
|
||||
for (int i2 = 0; i2 < anInt1441; i2++) {
|
||||
anIntArray1439[l1 + (i2 * anInt1440)] = ai[buffer.get1U()];
|
||||
if (layout == 1) {
|
||||
for (int l1 = 0; l1 < width; l1++) {
|
||||
for (int i2 = 0; i2 < height; i2++) {
|
||||
pixels[l1 + (i2 * width)] = ai[buffer.get1U()];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void method343() {
|
||||
Draw2D.bind(anIntArray1439, anInt1440, anInt1441);
|
||||
public void bind() {
|
||||
Draw2D.bind(pixels, width, height);
|
||||
}
|
||||
|
||||
public void method344(int i, int j, int k) {
|
||||
for (int i1 = 0; i1 < anIntArray1439.length; i1++) {
|
||||
int j1 = anIntArray1439[i1];
|
||||
for (int i1 = 0; i1 < pixels.length; i1++) {
|
||||
int j1 = pixels[i1];
|
||||
if (j1 != 0) {
|
||||
int k1 = (j1 >> 16) & 0xff;
|
||||
k1 += i;
|
||||
@@ -109,367 +109,364 @@ public class Image24 extends DoublyLinkedList.Node {
|
||||
} else if (i2 > 255) {
|
||||
i2 = 255;
|
||||
}
|
||||
anIntArray1439[i1] = (k1 << 16) + (l1 << 8) + i2;
|
||||
pixels[i1] = (k1 << 16) + (l1 << 8) + i2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void method345() {
|
||||
int[] ai = new int[anInt1444 * anInt1445];
|
||||
for (int j = 0; j < anInt1441; j++) {
|
||||
for (int k = 0; k < anInt1440; k++) {
|
||||
ai[((j + anInt1443) * anInt1444) + (k + anInt1442)] = anIntArray1439[(j * anInt1440) + k];
|
||||
int[] pixels = new int[cropW * cropH];
|
||||
for (int j = 0; j < height; j++) {
|
||||
for (int k = 0; k < width; k++) {
|
||||
pixels[((j + cropY) * cropW) + (k + cropX)] = this.pixels[(j * width) + k];
|
||||
}
|
||||
}
|
||||
anIntArray1439 = ai;
|
||||
anInt1440 = anInt1444;
|
||||
anInt1441 = anInt1445;
|
||||
anInt1442 = 0;
|
||||
anInt1443 = 0;
|
||||
this.pixels = pixels;
|
||||
width = cropW;
|
||||
height = cropH;
|
||||
cropX = 0;
|
||||
cropY = 0;
|
||||
}
|
||||
|
||||
public void method346(int i, int j) {
|
||||
i += anInt1442;
|
||||
j += anInt1443;
|
||||
int l = i + (j * Draw2D.width);
|
||||
int i1 = 0;
|
||||
int j1 = anInt1441;
|
||||
int k1 = anInt1440;
|
||||
int l1 = Draw2D.width - k1;
|
||||
int i2 = 0;
|
||||
if (j < Draw2D.top) {
|
||||
int j2 = Draw2D.top - j;
|
||||
j1 -= j2;
|
||||
j = Draw2D.top;
|
||||
i1 += j2 * k1;
|
||||
l += j2 * Draw2D.width;
|
||||
public void blitOpaque(int x, int y) {
|
||||
x += cropX;
|
||||
y += cropY;
|
||||
int dstOff = x + (y * Draw2D.width);
|
||||
int srcOff = 0;
|
||||
int h = height;
|
||||
int w = width;
|
||||
int dstStep = Draw2D.width - w;
|
||||
int srcStep = 0;
|
||||
if (y < Draw2D.top) {
|
||||
int trim = Draw2D.top - y;
|
||||
h -= trim;
|
||||
y = Draw2D.top;
|
||||
srcOff += trim * w;
|
||||
dstOff += trim * Draw2D.width;
|
||||
}
|
||||
if ((j + j1) > Draw2D.bottom) {
|
||||
j1 -= (j + j1) - Draw2D.bottom;
|
||||
if ((y + h) > Draw2D.bottom) {
|
||||
h -= (y + h) - Draw2D.bottom;
|
||||
}
|
||||
if (i < Draw2D.left) {
|
||||
int k2 = Draw2D.left - i;
|
||||
k1 -= k2;
|
||||
i = Draw2D.left;
|
||||
i1 += k2;
|
||||
l += k2;
|
||||
i2 += k2;
|
||||
l1 += k2;
|
||||
if (x < Draw2D.left) {
|
||||
int trim = Draw2D.left - x;
|
||||
w -= trim;
|
||||
x = Draw2D.left;
|
||||
srcOff += trim;
|
||||
dstOff += trim;
|
||||
srcStep += trim;
|
||||
dstStep += trim;
|
||||
}
|
||||
if ((i + k1) > Draw2D.right) {
|
||||
int l2 = (i + k1) - Draw2D.right;
|
||||
k1 -= l2;
|
||||
i2 += l2;
|
||||
l1 += l2;
|
||||
if ((x + w) > Draw2D.right) {
|
||||
int trim = (x + w) - Draw2D.right;
|
||||
w -= trim;
|
||||
srcStep += trim;
|
||||
dstStep += trim;
|
||||
}
|
||||
if ((k1 <= 0) || (j1 <= 0)) {
|
||||
} else {
|
||||
method347(l, k1, j1, i2, i1, l1, anIntArray1439, Draw2D.pixels);
|
||||
if ((w > 0) && (h > 0)) {
|
||||
copyPixels(dstOff, w, h, srcStep, srcOff, dstStep, pixels, Draw2D.pixels);
|
||||
}
|
||||
}
|
||||
|
||||
public void method347(int i, int j, int k, int l, int i1, int k1, int[] ai, int[] ai1) {
|
||||
int l1 = -(j >> 2);
|
||||
j = -(j & 3);
|
||||
for (int i2 = -k; i2 < 0; i2++) {
|
||||
for (int j2 = l1; j2 < 0; j2++) {
|
||||
ai1[i++] = ai[i1++];
|
||||
ai1[i++] = ai[i1++];
|
||||
ai1[i++] = ai[i1++];
|
||||
ai1[i++] = ai[i1++];
|
||||
public void copyPixels(int dstOff, int w, int h, int srcStep, int srcOff, int dstStep, int[] src, int[] dst) {
|
||||
int quarterWidth = -(w >> 2);
|
||||
w = -(w & 3);
|
||||
for (int i2 = -h; i2 < 0; i2++) {
|
||||
for (int j2 = quarterWidth; j2 < 0; j2++) {
|
||||
dst[dstOff++] = src[srcOff++];
|
||||
dst[dstOff++] = src[srcOff++];
|
||||
dst[dstOff++] = src[srcOff++];
|
||||
dst[dstOff++] = src[srcOff++];
|
||||
}
|
||||
for (int k2 = j; k2 < 0; k2++) {
|
||||
ai1[i++] = ai[i1++];
|
||||
for (int k2 = w; k2 < 0; k2++) {
|
||||
dst[dstOff++] = src[srcOff++];
|
||||
}
|
||||
i += k1;
|
||||
i1 += l;
|
||||
dstOff += dstStep;
|
||||
srcOff += srcStep;
|
||||
}
|
||||
}
|
||||
|
||||
public void method348(int i, int k) {
|
||||
i += anInt1442;
|
||||
k += anInt1443;
|
||||
int l = i + (k * Draw2D.width);
|
||||
int i1 = 0;
|
||||
int j1 = anInt1441;
|
||||
int k1 = anInt1440;
|
||||
int l1 = Draw2D.width - k1;
|
||||
int i2 = 0;
|
||||
if (k < Draw2D.top) {
|
||||
int j2 = Draw2D.top - k;
|
||||
j1 -= j2;
|
||||
k = Draw2D.top;
|
||||
i1 += j2 * k1;
|
||||
l += j2 * Draw2D.width;
|
||||
public void draw(int x, int y) {
|
||||
x += cropX;
|
||||
y += cropY;
|
||||
int dstOff = x + (y * Draw2D.width);
|
||||
int srcOff = 0;
|
||||
int h = height;
|
||||
int w = width;
|
||||
int dstStep = Draw2D.width - w;
|
||||
int srcStep = 0;
|
||||
if (y < Draw2D.top) {
|
||||
int j2 = Draw2D.top - y;
|
||||
h -= j2;
|
||||
y = Draw2D.top;
|
||||
srcOff += j2 * w;
|
||||
dstOff += j2 * Draw2D.width;
|
||||
}
|
||||
if ((k + j1) > Draw2D.bottom) {
|
||||
j1 -= (k + j1) - Draw2D.bottom;
|
||||
if ((y + h) > Draw2D.bottom) {
|
||||
h -= (y + h) - Draw2D.bottom;
|
||||
}
|
||||
if (i < Draw2D.left) {
|
||||
int k2 = Draw2D.left - i;
|
||||
k1 -= k2;
|
||||
i = Draw2D.left;
|
||||
i1 += k2;
|
||||
l += k2;
|
||||
i2 += k2;
|
||||
l1 += k2;
|
||||
if (x < Draw2D.left) {
|
||||
int k2 = Draw2D.left - x;
|
||||
w -= k2;
|
||||
x = Draw2D.left;
|
||||
srcOff += k2;
|
||||
dstOff += k2;
|
||||
srcStep += k2;
|
||||
dstStep += k2;
|
||||
}
|
||||
if ((i + k1) > Draw2D.right) {
|
||||
int l2 = (i + k1) - Draw2D.right;
|
||||
k1 -= l2;
|
||||
i2 += l2;
|
||||
l1 += l2;
|
||||
if ((x + w) > Draw2D.right) {
|
||||
int trim = (x + w) - Draw2D.right;
|
||||
w -= trim;
|
||||
srcStep += trim;
|
||||
dstStep += trim;
|
||||
}
|
||||
if ((k1 <= 0) || (j1 <= 0)) {
|
||||
} else {
|
||||
method349(Draw2D.pixels, anIntArray1439, i1, l, k1, j1, l1, i2);
|
||||
if ((w > 0) && (h > 0)) {
|
||||
copyPixels(Draw2D.pixels, pixels, srcOff, dstOff, w, h, dstStep, srcStep);
|
||||
}
|
||||
}
|
||||
|
||||
public void method349(int[] ai, int[] ai1, int j, int k, int l, int i1, int j1, int k1) {
|
||||
int l1 = -(l >> 2);
|
||||
l = -(l & 3);
|
||||
for (int i2 = -i1; i2 < 0; i2++) {
|
||||
int i;
|
||||
for (int j2 = l1; j2 < 0; j2++) {
|
||||
i = ai1[j++];
|
||||
if (i != 0) {
|
||||
ai[k++] = i;
|
||||
public void copyPixels(int[] dst, int[] src, int srcOff, int dstOff, int w, int h, int dstStep, int srcstep) {
|
||||
int quarterW = -(w >> 2);
|
||||
w = -(w & 3);
|
||||
for (int y = -h; y < 0; y++) {
|
||||
int rgb;
|
||||
for (int x = quarterW; x < 0; x++) {
|
||||
rgb = src[srcOff++];
|
||||
if (rgb != 0) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
k++;
|
||||
dstOff++;
|
||||
}
|
||||
i = ai1[j++];
|
||||
if (i != 0) {
|
||||
ai[k++] = i;
|
||||
rgb = src[srcOff++];
|
||||
if (rgb != 0) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
k++;
|
||||
dstOff++;
|
||||
}
|
||||
i = ai1[j++];
|
||||
if (i != 0) {
|
||||
ai[k++] = i;
|
||||
rgb = src[srcOff++];
|
||||
if (rgb != 0) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
k++;
|
||||
dstOff++;
|
||||
}
|
||||
i = ai1[j++];
|
||||
if (i != 0) {
|
||||
ai[k++] = i;
|
||||
rgb = src[srcOff++];
|
||||
if (rgb != 0) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
k++;
|
||||
dstOff++;
|
||||
}
|
||||
}
|
||||
for (int k2 = l; k2 < 0; k2++) {
|
||||
i = ai1[j++];
|
||||
if (i != 0) {
|
||||
ai[k++] = i;
|
||||
for (int k2 = w; k2 < 0; k2++) {
|
||||
rgb = src[srcOff++];
|
||||
if (rgb != 0) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
k++;
|
||||
dstOff++;
|
||||
}
|
||||
}
|
||||
k += j1;
|
||||
j += k1;
|
||||
dstOff += dstStep;
|
||||
srcOff += srcstep;
|
||||
}
|
||||
}
|
||||
|
||||
public void method350(int i, int j, int k) {
|
||||
i += anInt1442;
|
||||
j += anInt1443;
|
||||
int i1 = i + (j * Draw2D.width);
|
||||
public void draw(int x, int y, int alpha) {
|
||||
x += cropX;
|
||||
y += cropY;
|
||||
int i1 = x + (y * Draw2D.width);
|
||||
int j1 = 0;
|
||||
int k1 = anInt1441;
|
||||
int l1 = anInt1440;
|
||||
int i2 = Draw2D.width - l1;
|
||||
int k1 = height;
|
||||
int w = width;
|
||||
int i2 = Draw2D.width - w;
|
||||
int j2 = 0;
|
||||
if (j < Draw2D.top) {
|
||||
int k2 = Draw2D.top - j;
|
||||
if (y < Draw2D.top) {
|
||||
int k2 = Draw2D.top - y;
|
||||
k1 -= k2;
|
||||
j = Draw2D.top;
|
||||
j1 += k2 * l1;
|
||||
y = Draw2D.top;
|
||||
j1 += k2 * w;
|
||||
i1 += k2 * Draw2D.width;
|
||||
}
|
||||
if ((j + k1) > Draw2D.bottom) {
|
||||
k1 -= (j + k1) - Draw2D.bottom;
|
||||
if ((y + k1) > Draw2D.bottom) {
|
||||
k1 -= (y + k1) - Draw2D.bottom;
|
||||
}
|
||||
if (i < Draw2D.left) {
|
||||
int l2 = Draw2D.left - i;
|
||||
l1 -= l2;
|
||||
i = Draw2D.left;
|
||||
if (x < Draw2D.left) {
|
||||
int l2 = Draw2D.left - x;
|
||||
w -= l2;
|
||||
x = Draw2D.left;
|
||||
j1 += l2;
|
||||
i1 += l2;
|
||||
j2 += l2;
|
||||
i2 += l2;
|
||||
}
|
||||
if ((i + l1) > Draw2D.right) {
|
||||
int i3 = (i + l1) - Draw2D.right;
|
||||
l1 -= i3;
|
||||
if ((x + w) > Draw2D.right) {
|
||||
int i3 = (x + w) - Draw2D.right;
|
||||
w -= i3;
|
||||
j2 += i3;
|
||||
i2 += i3;
|
||||
}
|
||||
if ((l1 <= 0) || (k1 <= 0)) {
|
||||
} else {
|
||||
method351(j1, l1, Draw2D.pixels, anIntArray1439, j2, k1, i2, k, i1);
|
||||
if ((w > 0) && (k1 > 0)) {
|
||||
copyPixelsAlpha(j1, w, Draw2D.pixels, pixels, j2, k1, i2, alpha, i1);
|
||||
}
|
||||
}
|
||||
|
||||
public void method351(int i, int j, int[] ai, int[] ai1, int l, int i1, int j1, int k1, int l1) {
|
||||
int j2 = 256 - k1;
|
||||
for (int k2 = -i1; k2 < 0; k2++) {
|
||||
for (int l2 = -j; l2 < 0; l2++) {
|
||||
int k = ai1[i++];
|
||||
if (k != 0) {
|
||||
int i3 = ai[l1];
|
||||
ai[l1++] = (((((k & 0xff00ff) * k1) + ((i3 & 0xff00ff) * j2)) & 0xff00ff00) + ((((k & 0xff00) * k1) + ((i3 & 0xff00) * j2)) & 0xff0000)) >> 8;
|
||||
public void copyPixelsAlpha(int srcOff, int w, int[] dst, int[] src, int srcstep, int h, int dstStep, int alpha, int dstOff) {
|
||||
int invAlpha = 256 - alpha;
|
||||
for (int k2 = -h; k2 < 0; k2++) {
|
||||
for (int l2 = -w; l2 < 0; l2++) {
|
||||
int srcRGB = src[srcOff++];
|
||||
if (srcRGB != 0) {
|
||||
int dstRGB = dst[dstOff];
|
||||
dst[dstOff++] = (((((srcRGB & 0xff00ff) * alpha) + ((dstRGB & 0xff00ff) * invAlpha)) & 0xff00ff00) + ((((srcRGB & 0xff00) * alpha) + ((dstRGB & 0xff00) * invAlpha)) & 0xff0000)) >> 8;
|
||||
} else {
|
||||
l1++;
|
||||
dstOff++;
|
||||
}
|
||||
}
|
||||
l1 += j1;
|
||||
i += l;
|
||||
dstOff += dstStep;
|
||||
srcOff += srcstep;
|
||||
}
|
||||
}
|
||||
|
||||
public void method352(int i, int j, int[] ai, int k, int[] ai1, int i1, int j1, int k1, int l1, int i2) {
|
||||
public void drawRotatedMasked(int x, int y, int width, int height, int anchorX, int anchorY, int zoom, int angle, int[] lineLengths, int[] lineOffsets) {
|
||||
try {
|
||||
int j2 = -l1 / 2;
|
||||
int k2 = -i / 2;
|
||||
int l2 = (int) (Math.sin((double) j / 326.11000000000001D) * 65536D);
|
||||
int i3 = (int) (Math.cos((double) j / 326.11000000000001D) * 65536D);
|
||||
l2 = (l2 * k) >> 8;
|
||||
i3 = (i3 * k) >> 8;
|
||||
int j3 = (i2 << 16) + ((k2 * l2) + (j2 * i3));
|
||||
int k3 = (i1 << 16) + ((k2 * i3) - (j2 * l2));
|
||||
int l3 = k1 + (j1 * Draw2D.width);
|
||||
for (j1 = 0; j1 < i; j1++) {
|
||||
int i4 = ai1[j1];
|
||||
int j4 = l3 + i4;
|
||||
int k4 = j3 + (i3 * i4);
|
||||
int l4 = k3 - (l2 * i4);
|
||||
for (k1 = -ai[j1]; k1 < 0; k1++) {
|
||||
Draw2D.pixels[j4++] = anIntArray1439[(k4 >> 16) + ((l4 >> 16) * anInt1440)];
|
||||
k4 += i3;
|
||||
l4 -= l2;
|
||||
int midX = -width / 2;
|
||||
int midY = -height / 2;
|
||||
int sin = (int) (Math.sin((double) angle / 326.11000000000001D) * 65536D);
|
||||
int cos = (int) (Math.cos((double) angle / 326.11000000000001D) * 65536D);
|
||||
sin = (sin * zoom) >> 8;
|
||||
cos = (cos * zoom) >> 8;
|
||||
int leftX = (anchorX << 16) + ((midY * sin) + (midX * cos));
|
||||
int lefty = (anchorY << 16) + ((midY * cos) - (midX * sin));
|
||||
int leftOff = x + (y * Draw2D.width);
|
||||
for (y = 0; y < height; y++) {
|
||||
int lineOffset = lineOffsets[y];
|
||||
int dstOff = leftOff + lineOffset;
|
||||
int srcX = leftX + (cos * lineOffset);
|
||||
int srcY = lefty - (sin * lineOffset);
|
||||
for (x = -lineLengths[y]; x < 0; x++) {
|
||||
Draw2D.pixels[dstOff++] = pixels[(srcX >> 16) + ((srcY >> 16) * this.width)];
|
||||
srcX += cos;
|
||||
srcY -= sin;
|
||||
}
|
||||
j3 += l2;
|
||||
k3 += i3;
|
||||
l3 += Draw2D.width;
|
||||
leftX += sin;
|
||||
lefty += cos;
|
||||
leftOff += Draw2D.width;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
public void method353(int i, int j, int k, int l, int j1, int k1, double d, int l1) {
|
||||
public void drawRotated(int x, int y, int width, int height, int anchorX, int anchorY, double radians, int zoom) {
|
||||
try {
|
||||
int i2 = -k / 2;
|
||||
int j2 = -k1 / 2;
|
||||
int k2 = (int) (Math.sin(d) * 65536D);
|
||||
int l2 = (int) (Math.cos(d) * 65536D);
|
||||
k2 = (k2 * j1) >> 8;
|
||||
l2 = (l2 * j1) >> 8;
|
||||
int i3 = (l << 16) + ((j2 * k2) + (i2 * l2));
|
||||
int j3 = (j << 16) + ((j2 * l2) - (i2 * k2));
|
||||
int k3 = l1 + (i * Draw2D.width);
|
||||
for (i = 0; i < k1; i++) {
|
||||
int l3 = k3;
|
||||
int i4 = i3;
|
||||
int j4 = j3;
|
||||
for (l1 = -k; l1 < 0; l1++) {
|
||||
int k4 = anIntArray1439[(i4 >> 16) + ((j4 >> 16) * anInt1440)];
|
||||
if (k4 != 0) {
|
||||
Draw2D.pixels[l3++] = k4;
|
||||
int centerX = -width / 2;
|
||||
int centerY = -height / 2;
|
||||
int sin = (int) (Math.sin(radians) * 65536D);
|
||||
int cos = (int) (Math.cos(radians) * 65536D);
|
||||
sin = (sin * zoom) >> 8;
|
||||
cos = (cos * zoom) >> 8;
|
||||
int leftX = (anchorX << 16) + ((centerY * sin) + (centerX * cos));
|
||||
int leftY = (anchorY << 16) + ((centerY * cos) - (centerX * sin));
|
||||
int leftOff = x + (y * Draw2D.width);
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
int dstOff = leftOff;
|
||||
int dstX = leftX;
|
||||
int dstY = leftY;
|
||||
for (x = -width; x < 0; x++) {
|
||||
int rgb = pixels[(dstX >> 16) + ((dstY >> 16) * this.width)];
|
||||
if (rgb != 0) {
|
||||
Draw2D.pixels[dstOff++] = rgb;
|
||||
} else {
|
||||
l3++;
|
||||
dstOff++;
|
||||
}
|
||||
i4 += l2;
|
||||
j4 -= k2;
|
||||
dstX += cos;
|
||||
dstY -= sin;
|
||||
}
|
||||
i3 += k2;
|
||||
j3 += l2;
|
||||
k3 += Draw2D.width;
|
||||
leftX += sin;
|
||||
leftY += cos;
|
||||
leftOff += Draw2D.width;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
public void method354(Image8 image, int i, int j) {
|
||||
j += anInt1442;
|
||||
i += anInt1443;
|
||||
int k = j + (i * Draw2D.width);
|
||||
int l = 0;
|
||||
int i1 = anInt1441;
|
||||
int j1 = anInt1440;
|
||||
int k1 = Draw2D.width - j1;
|
||||
int l1 = 0;
|
||||
if (i < Draw2D.top) {
|
||||
int i2 = Draw2D.top - i;
|
||||
i1 -= i2;
|
||||
i = Draw2D.top;
|
||||
l += i2 * j1;
|
||||
k += i2 * Draw2D.width;
|
||||
public void drawMasked(Image8 mask, int y, int x) {
|
||||
x += cropX;
|
||||
y += cropY;
|
||||
int dstOff = x + (y * Draw2D.width);
|
||||
int srcOff = 0;
|
||||
int h = height;
|
||||
int w = width;
|
||||
int dstStep = Draw2D.width - w;
|
||||
int srcStep = 0;
|
||||
if (y < Draw2D.top) {
|
||||
int trim = Draw2D.top - y;
|
||||
h -= trim;
|
||||
y = Draw2D.top;
|
||||
srcOff += trim * w;
|
||||
dstOff += trim * Draw2D.width;
|
||||
}
|
||||
if ((i + i1) > Draw2D.bottom) {
|
||||
i1 -= (i + i1) - Draw2D.bottom;
|
||||
if ((y + h) > Draw2D.bottom) {
|
||||
h -= (y + h) - Draw2D.bottom;
|
||||
}
|
||||
if (j < Draw2D.left) {
|
||||
int j2 = Draw2D.left - j;
|
||||
j1 -= j2;
|
||||
j = Draw2D.left;
|
||||
l += j2;
|
||||
k += j2;
|
||||
l1 += j2;
|
||||
k1 += j2;
|
||||
if (x < Draw2D.left) {
|
||||
int trim = Draw2D.left - x;
|
||||
w -= trim;
|
||||
x = Draw2D.left;
|
||||
srcOff += trim;
|
||||
dstOff += trim;
|
||||
srcStep += trim;
|
||||
dstStep += trim;
|
||||
}
|
||||
if ((j + j1) > Draw2D.right) {
|
||||
int k2 = (j + j1) - Draw2D.right;
|
||||
j1 -= k2;
|
||||
l1 += k2;
|
||||
k1 += k2;
|
||||
if ((x + w) > Draw2D.right) {
|
||||
int trim = (x + w) - Draw2D.right;
|
||||
w -= trim;
|
||||
srcStep += trim;
|
||||
dstStep += trim;
|
||||
}
|
||||
if ((j1 <= 0) || (i1 <= 0)) {
|
||||
} else {
|
||||
method355(anIntArray1439, j1, image.pixels, i1, Draw2D.pixels, k1, k, l1, l);
|
||||
if ((w > 0) && (h > 0)) {
|
||||
copyPixelsMasked(pixels, srcOff, srcStep, mask.pixels, w, h, Draw2D.pixels, dstOff, dstStep);
|
||||
}
|
||||
}
|
||||
|
||||
public void method355(int[] ai, int i, byte[] abyte0, int j, int[] ai1, int l, int i1, int j1, int k1) {
|
||||
int l1 = -(i >> 2);
|
||||
i = -(i & 3);
|
||||
for (int j2 = -j; j2 < 0; j2++) {
|
||||
int k;
|
||||
for (int k2 = l1; k2 < 0; k2++) {
|
||||
k = ai[k1++];
|
||||
if ((k != 0) && (abyte0[i1] == 0)) {
|
||||
ai1[i1++] = k;
|
||||
public void copyPixelsMasked(int[] src, int srcOff, int srcStep, byte[] mask, int w, int h, int[] dst, int dstOff, int dstStep) {
|
||||
int quarterW = -(w >> 2);
|
||||
w = -(w & 3);
|
||||
for (int y = -h; y < 0; y++) {
|
||||
int rgb;
|
||||
for (int k2 = quarterW; k2 < 0; k2++) {
|
||||
rgb = src[srcOff++];
|
||||
if ((rgb != 0) && (mask[dstOff] == 0)) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
i1++;
|
||||
dstOff++;
|
||||
}
|
||||
k = ai[k1++];
|
||||
if ((k != 0) && (abyte0[i1] == 0)) {
|
||||
ai1[i1++] = k;
|
||||
rgb = src[srcOff++];
|
||||
if ((rgb != 0) && (mask[dstOff] == 0)) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
i1++;
|
||||
dstOff++;
|
||||
}
|
||||
k = ai[k1++];
|
||||
if ((k != 0) && (abyte0[i1] == 0)) {
|
||||
ai1[i1++] = k;
|
||||
rgb = src[srcOff++];
|
||||
if ((rgb != 0) && (mask[dstOff] == 0)) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
i1++;
|
||||
dstOff++;
|
||||
}
|
||||
k = ai[k1++];
|
||||
if ((k != 0) && (abyte0[i1] == 0)) {
|
||||
ai1[i1++] = k;
|
||||
rgb = src[srcOff++];
|
||||
if ((rgb != 0) && (mask[dstOff] == 0)) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
i1++;
|
||||
dstOff++;
|
||||
}
|
||||
}
|
||||
for (int l2 = i; l2 < 0; l2++) {
|
||||
k = ai[k1++];
|
||||
if ((k != 0) && (abyte0[i1] == 0)) {
|
||||
ai1[i1++] = k;
|
||||
for (int l2 = w; l2 < 0; l2++) {
|
||||
rgb = src[srcOff++];
|
||||
if ((rgb != 0) && (mask[dstOff] == 0)) {
|
||||
dst[dstOff++] = rgb;
|
||||
} else {
|
||||
i1++;
|
||||
dstOff++;
|
||||
}
|
||||
}
|
||||
i1 += l;
|
||||
k1 += j1;
|
||||
dstOff += dstStep;
|
||||
srcOff += srcStep;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+45
-45
@@ -4,8 +4,8 @@ public class Image8 {
|
||||
|
||||
public final int[] palette;
|
||||
public byte[] pixels;
|
||||
public int anInt1452;
|
||||
public int anInt1453;
|
||||
public int width;
|
||||
public int height;
|
||||
public int anInt1454;
|
||||
public int anInt1455;
|
||||
public int anInt1456;
|
||||
@@ -29,10 +29,10 @@ public class Image8 {
|
||||
}
|
||||
anInt1454 = buffer_1.get1U();
|
||||
anInt1455 = buffer_1.get1U();
|
||||
anInt1452 = buffer_1.get2U();
|
||||
anInt1453 = buffer_1.get2U();
|
||||
width = buffer_1.get2U();
|
||||
height = buffer_1.get2U();
|
||||
int i1 = buffer_1.get1U();
|
||||
int j1 = anInt1452 * anInt1453;
|
||||
int j1 = width * height;
|
||||
pixels = new byte[j1];
|
||||
if (i1 == 0) {
|
||||
for (int k1 = 0; k1 < j1; k1++) {
|
||||
@@ -41,9 +41,9 @@ public class Image8 {
|
||||
return;
|
||||
}
|
||||
if (i1 == 1) {
|
||||
for (int l1 = 0; l1 < anInt1452; l1++) {
|
||||
for (int i2 = 0; i2 < anInt1453; i2++) {
|
||||
pixels[l1 + (i2 * anInt1452)] = buffer.get1();
|
||||
for (int l1 = 0; l1 < width; l1++) {
|
||||
for (int i2 = 0; i2 < height; i2++) {
|
||||
pixels[l1 + (i2 * width)] = buffer.get1();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,58 +54,58 @@ public class Image8 {
|
||||
anInt1457 /= 2;
|
||||
byte[] abyte0 = new byte[anInt1456 * anInt1457];
|
||||
int i = 0;
|
||||
for (int j = 0; j < anInt1453; j++) {
|
||||
for (int k = 0; k < anInt1452; k++) {
|
||||
for (int j = 0; j < height; j++) {
|
||||
for (int k = 0; k < width; k++) {
|
||||
abyte0[((k + anInt1454) >> 1) + (((j + anInt1455) >> 1) * anInt1456)] = pixels[i++];
|
||||
}
|
||||
}
|
||||
pixels = abyte0;
|
||||
anInt1452 = anInt1456;
|
||||
anInt1453 = anInt1457;
|
||||
width = anInt1456;
|
||||
height = anInt1457;
|
||||
anInt1454 = 0;
|
||||
anInt1455 = 0;
|
||||
}
|
||||
|
||||
public void method357() {
|
||||
if ((anInt1452 == anInt1456) && (anInt1453 == anInt1457)) {
|
||||
if ((width == anInt1456) && (height == anInt1457)) {
|
||||
return;
|
||||
}
|
||||
byte[] abyte0 = new byte[anInt1456 * anInt1457];
|
||||
int i = 0;
|
||||
for (int j = 0; j < anInt1453; j++) {
|
||||
for (int k = 0; k < anInt1452; k++) {
|
||||
for (int j = 0; j < height; j++) {
|
||||
for (int k = 0; k < width; k++) {
|
||||
abyte0[k + anInt1454 + ((j + anInt1455) * anInt1456)] = pixels[i++];
|
||||
}
|
||||
}
|
||||
pixels = abyte0;
|
||||
anInt1452 = anInt1456;
|
||||
anInt1453 = anInt1457;
|
||||
width = anInt1456;
|
||||
height = anInt1457;
|
||||
anInt1454 = 0;
|
||||
anInt1455 = 0;
|
||||
}
|
||||
|
||||
public void method358() {
|
||||
byte[] abyte0 = new byte[anInt1452 * anInt1453];
|
||||
byte[] abyte0 = new byte[width * height];
|
||||
int j = 0;
|
||||
for (int k = 0; k < anInt1453; k++) {
|
||||
for (int l = anInt1452 - 1; l >= 0; l--) {
|
||||
abyte0[j++] = pixels[l + (k * anInt1452)];
|
||||
for (int k = 0; k < height; k++) {
|
||||
for (int l = width - 1; l >= 0; l--) {
|
||||
abyte0[j++] = pixels[l + (k * width)];
|
||||
}
|
||||
}
|
||||
pixels = abyte0;
|
||||
anInt1454 = anInt1456 - anInt1452 - anInt1454;
|
||||
anInt1454 = anInt1456 - width - anInt1454;
|
||||
}
|
||||
|
||||
public void method359() {
|
||||
byte[] abyte0 = new byte[anInt1452 * anInt1453];
|
||||
byte[] abyte0 = new byte[width * height];
|
||||
int i = 0;
|
||||
for (int j = anInt1453 - 1; j >= 0; j--) {
|
||||
for (int k = 0; k < anInt1452; k++) {
|
||||
abyte0[i++] = pixels[k + (j * anInt1452)];
|
||||
for (int j = height - 1; j >= 0; j--) {
|
||||
for (int k = 0; k < width; k++) {
|
||||
abyte0[i++] = pixels[k + (j * width)];
|
||||
}
|
||||
}
|
||||
pixels = abyte0;
|
||||
anInt1455 = anInt1457 - anInt1453 - anInt1455;
|
||||
anInt1455 = anInt1457 - height - anInt1455;
|
||||
}
|
||||
|
||||
public void method360(int i, int j, int k) {
|
||||
@@ -135,46 +135,46 @@ public class Image8 {
|
||||
}
|
||||
}
|
||||
|
||||
public void method361(int i, int k) {
|
||||
i += anInt1454;
|
||||
k += anInt1455;
|
||||
int l = i + (k * Draw2D.width);
|
||||
public void blit(int x, int y) {
|
||||
x += anInt1454;
|
||||
y += anInt1455;
|
||||
int l = x + (y * Draw2D.width);
|
||||
int i1 = 0;
|
||||
int j1 = anInt1453;
|
||||
int k1 = anInt1452;
|
||||
int j1 = height;
|
||||
int k1 = width;
|
||||
int l1 = Draw2D.width - k1;
|
||||
int i2 = 0;
|
||||
if (k < Draw2D.top) {
|
||||
int j2 = Draw2D.top - k;
|
||||
if (y < Draw2D.top) {
|
||||
int j2 = Draw2D.top - y;
|
||||
j1 -= j2;
|
||||
k = Draw2D.top;
|
||||
y = Draw2D.top;
|
||||
i1 += j2 * k1;
|
||||
l += j2 * Draw2D.width;
|
||||
}
|
||||
if ((k + j1) > Draw2D.bottom) {
|
||||
j1 -= (k + j1) - Draw2D.bottom;
|
||||
if ((y + j1) > Draw2D.bottom) {
|
||||
j1 -= (y + j1) - Draw2D.bottom;
|
||||
}
|
||||
if (i < Draw2D.left) {
|
||||
int k2 = Draw2D.left - i;
|
||||
if (x < Draw2D.left) {
|
||||
int k2 = Draw2D.left - x;
|
||||
k1 -= k2;
|
||||
i = Draw2D.left;
|
||||
x = Draw2D.left;
|
||||
i1 += k2;
|
||||
l += k2;
|
||||
i2 += k2;
|
||||
l1 += k2;
|
||||
}
|
||||
if ((i + k1) > Draw2D.right) {
|
||||
int l2 = (i + k1) - Draw2D.right;
|
||||
if ((x + k1) > Draw2D.right) {
|
||||
int l2 = (x + k1) - Draw2D.right;
|
||||
k1 -= l2;
|
||||
i2 += l2;
|
||||
l1 += l2;
|
||||
}
|
||||
if ((k1 > 0) && (j1 > 0)) {
|
||||
method362(j1, Draw2D.pixels, pixels, l1, l, k1, i1, palette, i2);
|
||||
blit(j1, Draw2D.pixels, pixels, l1, l, k1, i1, palette, i2);
|
||||
}
|
||||
}
|
||||
|
||||
public void method362(int i, int[] ai, byte[] abyte0, int j, int k, int l, int i1, int[] ai1, int j1) {
|
||||
public void blit(int i, int[] ai, byte[] abyte0, int j, int k, int l, int i1, int[] ai1, int j1) {
|
||||
int k1 = -(l >> 2);
|
||||
l = -(l & 3);
|
||||
for (int l1 = -i; l1 < 0; l1++) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
public class LocEntity extends Entity {
|
||||
|
||||
public static Game aGame1609;
|
||||
public static Game game;
|
||||
public final int[] anIntArray1600;
|
||||
public final int anInt1601;
|
||||
public final int anInt1602;
|
||||
@@ -32,8 +32,8 @@ public class LocEntity extends Entity {
|
||||
anInt1599 = 0;
|
||||
anInt1608 = Game.loopCycle;
|
||||
if (flag && (aType_1607.anInt356 != -1)) {
|
||||
anInt1599 = (int) (Math.random() * (double) aType_1607.anInt352);
|
||||
anInt1608 -= (int) (Math.random() * (double) aType_1607.method258(anInt1599));
|
||||
anInt1599 = (int) (Math.random() * (double) aType_1607.frameCount);
|
||||
anInt1608 -= (int) (Math.random() * (double) aType_1607.getFrameDelay(anInt1599));
|
||||
}
|
||||
}
|
||||
LocType type = LocType.method572(anInt1610);
|
||||
@@ -50,14 +50,14 @@ public class LocEntity extends Entity {
|
||||
if ((k > 100) && (aType_1607.anInt356 > 0)) {
|
||||
k = 100;
|
||||
}
|
||||
while (k > aType_1607.method258(anInt1599)) {
|
||||
k -= aType_1607.method258(anInt1599);
|
||||
while (k > aType_1607.getFrameDelay(anInt1599)) {
|
||||
k -= aType_1607.getFrameDelay(anInt1599);
|
||||
anInt1599++;
|
||||
if (anInt1599 < aType_1607.anInt352) {
|
||||
if (anInt1599 < aType_1607.frameCount) {
|
||||
continue;
|
||||
}
|
||||
anInt1599 -= aType_1607.anInt356;
|
||||
if ((anInt1599 >= 0) && (anInt1599 < aType_1607.anInt352)) {
|
||||
if ((anInt1599 >= 0) && (anInt1599 < aType_1607.frameCount)) {
|
||||
continue;
|
||||
}
|
||||
aType_1607 = null;
|
||||
@@ -65,7 +65,7 @@ public class LocEntity extends Entity {
|
||||
}
|
||||
anInt1608 = Game.loopCycle - k;
|
||||
if (aType_1607 != null) {
|
||||
j = aType_1607.anIntArray353[anInt1599];
|
||||
j = aType_1607.primaryFrames[anInt1599];
|
||||
}
|
||||
}
|
||||
LocType type;
|
||||
@@ -84,14 +84,14 @@ public class LocEntity extends Entity {
|
||||
public LocType method457() {
|
||||
int i = -1;
|
||||
if (anInt1601 != -1) {
|
||||
VarbitType varbit = VarbitType.aVarbitArray646[anInt1601];
|
||||
int k = varbit.anInt648;
|
||||
int l = varbit.anInt649;
|
||||
int i1 = varbit.anInt650;
|
||||
int j1 = Game.anIntArray1232[i1 - l];
|
||||
i = (aGame1609.anIntArray971[k] >> l) & j1;
|
||||
VarbitType varbit = VarbitType.instances[anInt1601];
|
||||
int k = varbit.varp;
|
||||
int l = varbit.lsb;
|
||||
int i1 = varbit.msb;
|
||||
int j1 = Game.BITMASK[i1 - l];
|
||||
i = (game.anIntArray971[k] >> l) & j1;
|
||||
} else if (anInt1602 != -1) {
|
||||
i = aGame1609.anIntArray971[anInt1602];
|
||||
i = game.anIntArray971[anInt1602];
|
||||
}
|
||||
if ((i < 0) || (i >= anIntArray1600.length) || (anIntArray1600[i] == -1)) {
|
||||
return null;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class LocType {
|
||||
public static Buffer aBuffer_753;
|
||||
public static int[] anIntArray755;
|
||||
public static int anInt756;
|
||||
public static Game aGame765;
|
||||
public static Game game;
|
||||
public static int anInt771;
|
||||
public static LRUMap<Long, Model> aCache_780 = new LRUMap(30);
|
||||
public static LocType[] aTypeArray782;
|
||||
@@ -205,14 +205,14 @@ public class LocType {
|
||||
public LocType method580() {
|
||||
int i = -1;
|
||||
if (anInt774 != -1) {
|
||||
VarbitType varbit = VarbitType.aVarbitArray646[anInt774];
|
||||
int j = varbit.anInt648;
|
||||
int k = varbit.anInt649;
|
||||
int l = varbit.anInt650;
|
||||
int i1 = Game.anIntArray1232[l - k];
|
||||
i = (aGame765.anIntArray971[j] >> k) & i1;
|
||||
VarbitType varbit = VarbitType.instances[anInt774];
|
||||
int j = varbit.varp;
|
||||
int k = varbit.lsb;
|
||||
int l = varbit.msb;
|
||||
int i1 = Game.BITMASK[l - k];
|
||||
i = (game.anIntArray971[j] >> k) & i1;
|
||||
} else if (anInt749 != -1) {
|
||||
i = aGame765.anIntArray971[anInt749];
|
||||
i = game.anIntArray971[anInt749];
|
||||
}
|
||||
if ((i < 0) || (i >= anIntArray759.length) || (anIntArray759[i] == -1)) {
|
||||
return null;
|
||||
|
||||
@@ -4,30 +4,30 @@
|
||||
|
||||
public class NPCEntity extends PathingEntity {
|
||||
|
||||
public NPCType aType_1696;
|
||||
public NPCType type;
|
||||
|
||||
public NPCEntity() {
|
||||
}
|
||||
|
||||
public Model method450() {
|
||||
if ((super.anInt1526 >= 0) && (super.anInt1529 == 0)) {
|
||||
int k = SeqType.instances[super.anInt1526].anIntArray353[super.anInt1527];
|
||||
int k = SeqType.instances[super.anInt1526].primaryFrames[super.anInt1527];
|
||||
int i1 = -1;
|
||||
if ((super.anInt1517 >= 0) && (super.anInt1517 != super.anInt1511)) {
|
||||
i1 = SeqType.instances[super.anInt1517].anIntArray353[super.anInt1518];
|
||||
if ((super.seqCurrent >= 0) && (super.seqCurrent != super.seqStand)) {
|
||||
i1 = SeqType.instances[super.seqCurrent].primaryFrames[super.seqFrame];
|
||||
}
|
||||
return aType_1696.method164(i1, k, SeqType.instances[super.anInt1526].anIntArray357);
|
||||
return type.method164(i1, k, SeqType.instances[super.anInt1526].anIntArray357);
|
||||
}
|
||||
int l = -1;
|
||||
if (super.anInt1517 >= 0) {
|
||||
l = SeqType.instances[super.anInt1517].anIntArray353[super.anInt1518];
|
||||
if (super.seqCurrent >= 0) {
|
||||
l = SeqType.instances[super.seqCurrent].primaryFrames[super.seqFrame];
|
||||
}
|
||||
return aType_1696.method164(-1, l, null);
|
||||
return type.method164(-1, l, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Model getModel() {
|
||||
if (aType_1696 == null) {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
Model model = method450();
|
||||
@@ -35,11 +35,11 @@ public class NPCEntity extends PathingEntity {
|
||||
return null;
|
||||
}
|
||||
super.anInt1507 = model.minY;
|
||||
if ((super.anInt1520 != -1) && (super.anInt1521 != -1)) {
|
||||
SpotAnimType type = SpotAnimType.instances[super.anInt1520];
|
||||
if ((super.spotanim != -1) && (super.spotanimFrame != -1)) {
|
||||
SpotAnimType type = SpotAnimType.instances[super.spotanim];
|
||||
Model model_1 = type.method266();
|
||||
if (model_1 != null) {
|
||||
int j = type.aType_407.anIntArray353[super.anInt1521];
|
||||
int j = type.seq.primaryFrames[super.spotanimFrame];
|
||||
Model class30_sub2_sub4_sub6_2 = new Model(true, SeqFrame.isNull(j), false, model_1);
|
||||
class30_sub2_sub4_sub6_2.translate(0, -super.anInt1524, 0);
|
||||
class30_sub2_sub4_sub6_2.createLabelReferences();
|
||||
@@ -54,7 +54,7 @@ public class NPCEntity extends PathingEntity {
|
||||
model = new Model(2, -819, aclass30_sub2_sub4_sub6);
|
||||
}
|
||||
}
|
||||
if (aType_1696.aByte68 == 1) {
|
||||
if (type.size == 1) {
|
||||
model.pickBounds = true;
|
||||
}
|
||||
return model;
|
||||
@@ -62,7 +62,7 @@ public class NPCEntity extends PathingEntity {
|
||||
|
||||
@Override
|
||||
public boolean method449() {
|
||||
return aType_1696 != null;
|
||||
return type != null;
|
||||
}
|
||||
|
||||
}
|
||||
+84
-79
@@ -8,78 +8,79 @@ import java.io.IOException;
|
||||
|
||||
public class NPCType {
|
||||
|
||||
public static int anInt56;
|
||||
public static Buffer aBuffer_60;
|
||||
public static int anInt62;
|
||||
public static int[] anIntArray72;
|
||||
public static NPCType[] aTypeArray80;
|
||||
public static Game aGame82;
|
||||
private static int cachePosition;
|
||||
private static Buffer dat;
|
||||
public static int[] offsets;
|
||||
private static NPCType[] cache;
|
||||
public static Game game;
|
||||
public static LRUMap<Long, Model> modelCache = new LRUMap<>(30);
|
||||
|
||||
public static NPCType method159(int i) {
|
||||
if (i > aTypeArray80.length) {
|
||||
i = 0;
|
||||
public static NPCType get(int id) {
|
||||
if (id > cache.length) {
|
||||
id = 0;
|
||||
}
|
||||
|
||||
for (int j = 0; j < 20; j++) {
|
||||
if (aTypeArray80[j].aLong78 == (long) i) {
|
||||
return aTypeArray80[j];
|
||||
if (cache[j].uid == (long) id) {
|
||||
return cache[j];
|
||||
}
|
||||
}
|
||||
anInt56 = (anInt56 + 1) % 20;
|
||||
NPCType type = aTypeArray80[anInt56] = new NPCType();
|
||||
aBuffer_60.position = anIntArray72[i];
|
||||
type.aLong78 = i;
|
||||
type.method165(aBuffer_60);
|
||||
cachePosition = (cachePosition + 1) % 20;
|
||||
NPCType type = cache[cachePosition] = new NPCType();
|
||||
dat.position = offsets[id];
|
||||
type.uid = id;
|
||||
type.read(dat);
|
||||
return type;
|
||||
}
|
||||
|
||||
public static void unpack(FileArchive archive) throws IOException {
|
||||
aBuffer_60 = new Buffer(archive.read("npc.dat"));
|
||||
dat = new Buffer(archive.read("npc.dat"));
|
||||
Buffer buffer = new Buffer(archive.read("npc.idx"));
|
||||
anInt62 = buffer.get2U();
|
||||
anIntArray72 = new int[anInt62];
|
||||
int i = 2;
|
||||
for (int j = 0; j < anInt62; j++) {
|
||||
anIntArray72[j] = i;
|
||||
i += buffer.get2U();
|
||||
int count = buffer.get2U();
|
||||
offsets = new int[count];
|
||||
|
||||
int offset = 2;
|
||||
for (int i = 0; i < count; i++) {
|
||||
offsets[i] = offset;
|
||||
offset += buffer.get2U();
|
||||
}
|
||||
aTypeArray80 = new NPCType[20];
|
||||
|
||||
cache = new NPCType[20];
|
||||
|
||||
for (int k = 0; k < 20; k++) {
|
||||
aTypeArray80[k] = new NPCType();
|
||||
cache[k] = new NPCType();
|
||||
}
|
||||
}
|
||||
|
||||
public static void unload() {
|
||||
modelCache = null;
|
||||
anIntArray72 = null;
|
||||
aTypeArray80 = null;
|
||||
aBuffer_60 = null;
|
||||
offsets = null;
|
||||
cache = null;
|
||||
dat = null;
|
||||
}
|
||||
|
||||
public int anInt55 = -1;
|
||||
public int anInt57 = -1;
|
||||
public int anInt58 = -1;
|
||||
public int anInt59 = -1;
|
||||
public int seqTurnRight = -1;
|
||||
public int varbit = -1;
|
||||
public int seqTurnAround = -1;
|
||||
public int varp = -1;
|
||||
public int anInt61 = -1;
|
||||
public String aString65;
|
||||
public String[] aStringArray66;
|
||||
public int anInt67 = -1;
|
||||
public byte aByte68 = 1;
|
||||
public int seqWalk = -1;
|
||||
public byte size = 1;
|
||||
public int[] anIntArray70;
|
||||
public int unusedInt0 = -1;
|
||||
public int[] anIntArray73;
|
||||
public int anInt75 = -1;
|
||||
public int[] anIntArray76;
|
||||
public int anInt77 = -1;
|
||||
public long aLong78 = -1L;
|
||||
public int anInt79 = 32;
|
||||
public int anInt83 = -1;
|
||||
public int seqStand = -1;
|
||||
public long uid = -1L;
|
||||
public int turnSpeed = 32;
|
||||
public int seqTurnLeft = -1;
|
||||
public boolean aBoolean84 = true;
|
||||
public int anInt85;
|
||||
public int anInt86 = 128;
|
||||
public boolean aBoolean87 = true;
|
||||
public int[] anIntArray88;
|
||||
public int[] overrides;
|
||||
public byte[] aByteArray89;
|
||||
public int unusedInt1 = -1;
|
||||
public int anInt91 = 128;
|
||||
@@ -92,8 +93,8 @@ public class NPCType {
|
||||
}
|
||||
|
||||
public Model method160() {
|
||||
if (anIntArray88 != null) {
|
||||
NPCType type = method161();
|
||||
if (overrides != null) {
|
||||
NPCType type = getOverrideType();
|
||||
if (type == null) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -130,35 +131,39 @@ public class NPCType {
|
||||
return model;
|
||||
}
|
||||
|
||||
public NPCType method161() {
|
||||
int j = -1;
|
||||
if (anInt57 != -1) {
|
||||
VarbitType varbit = VarbitType.aVarbitArray646[anInt57];
|
||||
int k = varbit.anInt648;
|
||||
int l = varbit.anInt649;
|
||||
int i1 = varbit.anInt650;
|
||||
int j1 = Game.anIntArray1232[i1 - l];
|
||||
j = (aGame82.anIntArray971[k] >> l) & j1;
|
||||
} else if (anInt59 != -1) {
|
||||
j = aGame82.anIntArray971[anInt59];
|
||||
public NPCType getOverrideType() {
|
||||
int value = -1;
|
||||
|
||||
if (varbit != -1) {
|
||||
VarbitType vb = VarbitType.instances[this.varbit];
|
||||
int varp = vb.varp;
|
||||
int lsb = vb.lsb;
|
||||
int msb = vb.msb;
|
||||
int mask = Game.BITMASK[msb - lsb];
|
||||
value = (game.anIntArray971[varp] >> lsb) & mask;
|
||||
} else if (varp != -1) {
|
||||
value = game.anIntArray971[varp];
|
||||
}
|
||||
if ((j < 0) || (j >= anIntArray88.length) || (anIntArray88[j] == -1)) {
|
||||
|
||||
if ((value < 0) || (value >= overrides.length) || (overrides[value] == -1)) {
|
||||
return null;
|
||||
} else {
|
||||
return method159(anIntArray88[j]);
|
||||
return get(overrides[value]);
|
||||
}
|
||||
}
|
||||
|
||||
public Model method164(int j, int k, int[] ai) {
|
||||
if (anIntArray88 != null) {
|
||||
NPCType type = method161();
|
||||
if (overrides != null) {
|
||||
NPCType type = getOverrideType();
|
||||
if (type == null) {
|
||||
return null;
|
||||
} else {
|
||||
return type.method164(j, k, ai);
|
||||
}
|
||||
}
|
||||
Model model = modelCache.get(aLong78);
|
||||
|
||||
Model model = modelCache.get(uid);
|
||||
|
||||
if (model == null) {
|
||||
boolean flag = false;
|
||||
for (int value : anIntArray94) {
|
||||
@@ -185,7 +190,7 @@ public class NPCType {
|
||||
}
|
||||
model.createLabelReferences();
|
||||
model.calculateNormals(64 + anInt85, 850 + anInt92, -30, -50, -30, true);
|
||||
modelCache.put(aLong78, model);
|
||||
modelCache.put(uid, model);
|
||||
}
|
||||
Model model_1 = Model.EMPTY;
|
||||
model_1.set(model, SeqFrame.isNull(k) & SeqFrame.isNull(j));
|
||||
@@ -200,13 +205,13 @@ public class NPCType {
|
||||
model_1.calculateBoundsCylinder();
|
||||
model_1.labelFaces = null;
|
||||
model_1.labelVertices = null;
|
||||
if (aByte68 == 1) {
|
||||
if (size == 1) {
|
||||
model_1.pickBounds = true;
|
||||
}
|
||||
return model_1;
|
||||
}
|
||||
|
||||
public void method165(Buffer buffer) {
|
||||
public void read(Buffer buffer) {
|
||||
do {
|
||||
int i = buffer.get1U();
|
||||
if (i == 0) {
|
||||
@@ -223,16 +228,16 @@ public class NPCType {
|
||||
} else if (i == 3) {
|
||||
aByteArray89 = buffer.getStringRaw();
|
||||
} else if (i == 12) {
|
||||
aByte68 = buffer.get1();
|
||||
size = buffer.get1();
|
||||
} else if (i == 13) {
|
||||
anInt77 = buffer.get2U();
|
||||
seqStand = buffer.get2U();
|
||||
} else if (i == 14) {
|
||||
anInt67 = buffer.get2U();
|
||||
seqWalk = buffer.get2U();
|
||||
} else if (i == 17) {
|
||||
anInt67 = buffer.get2U();
|
||||
anInt58 = buffer.get2U();
|
||||
anInt83 = buffer.get2U();
|
||||
anInt55 = buffer.get2U();
|
||||
seqWalk = buffer.get2U();
|
||||
seqTurnAround = buffer.get2U();
|
||||
seqTurnLeft = buffer.get2U();
|
||||
seqTurnRight = buffer.get2U();
|
||||
} else if ((i >= 30) && (i < 40)) {
|
||||
if (aStringArray66 == null) {
|
||||
aStringArray66 = new String[5];
|
||||
@@ -278,22 +283,22 @@ public class NPCType {
|
||||
} else if (i == 102) {
|
||||
anInt75 = buffer.get2U();
|
||||
} else if (i == 103) {
|
||||
anInt79 = buffer.get2U();
|
||||
turnSpeed = buffer.get2U();
|
||||
} else if (i == 106) {
|
||||
anInt57 = buffer.get2U();
|
||||
if (anInt57 == 65535) {
|
||||
anInt57 = -1;
|
||||
varbit = buffer.get2U();
|
||||
if (varbit == 65535) {
|
||||
varbit = -1;
|
||||
}
|
||||
anInt59 = buffer.get2U();
|
||||
if (anInt59 == 65535) {
|
||||
anInt59 = -1;
|
||||
varp = buffer.get2U();
|
||||
if (varp == 65535) {
|
||||
varp = -1;
|
||||
}
|
||||
int i1 = buffer.get1U();
|
||||
anIntArray88 = new int[i1 + 1];
|
||||
overrides = new int[i1 + 1];
|
||||
for (int i2 = 0; i2 <= i1; i2++) {
|
||||
anIntArray88[i2] = buffer.get2U();
|
||||
if (anIntArray88[i2] == 65535) {
|
||||
anIntArray88[i2] = -1;
|
||||
overrides[i2] = buffer.get2U();
|
||||
if (overrides[i2] == 65535) {
|
||||
overrides[i2] = -1;
|
||||
}
|
||||
}
|
||||
} else if (i == 107) {
|
||||
|
||||
+32
-32
@@ -69,7 +69,7 @@ public class ObjType {
|
||||
public static Image24 method200(int i, int j, int k) {
|
||||
if (k == 0) {
|
||||
Image24 image = iconCache.get(i);
|
||||
if ((image != null) && (image.anInt1445 != j) && (image.anInt1445 != -1)) {
|
||||
if ((image != null) && (image.cropH != j) && (image.cropH != -1)) {
|
||||
image.unlink();
|
||||
image = null;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class ObjType {
|
||||
int i3 = Draw2D.top;
|
||||
int j3 = Draw2D.bottom;
|
||||
Draw3D.jagged = false;
|
||||
Draw2D.bind(class30_sub2_sub1_sub1_1.anIntArray1439, 32, 32);
|
||||
Draw2D.bind(class30_sub2_sub1_sub1_1.pixels, 32, 32);
|
||||
Draw2D.fillRect(0, 0, 32, 32, 0);
|
||||
Draw3D.init2D();
|
||||
int k3 = type.anInt181;
|
||||
@@ -130,15 +130,15 @@ public class ObjType {
|
||||
model.drawSimple(0, type.anInt198, type.anInt204, type.anInt190, type.anInt169, l3 + (model.minY / 2) + type.anInt194, i4 + type.anInt194);
|
||||
for (int i5 = 31; i5 >= 0; i5--) {
|
||||
for (int j4 = 31; j4 >= 0; j4--) {
|
||||
if (class30_sub2_sub1_sub1_1.anIntArray1439[i5 + (j4 * 32)] == 0) {
|
||||
if ((i5 > 0) && (class30_sub2_sub1_sub1_1.anIntArray1439[(i5 - 1) + (j4 * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[i5 + (j4 * 32)] = 1;
|
||||
} else if ((j4 > 0) && (class30_sub2_sub1_sub1_1.anIntArray1439[i5 + ((j4 - 1) * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[i5 + (j4 * 32)] = 1;
|
||||
} else if ((i5 < 31) && (class30_sub2_sub1_sub1_1.anIntArray1439[i5 + 1 + (j4 * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[i5 + (j4 * 32)] = 1;
|
||||
} else if ((j4 < 31) && (class30_sub2_sub1_sub1_1.anIntArray1439[i5 + ((j4 + 1) * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[i5 + (j4 * 32)] = 1;
|
||||
if (class30_sub2_sub1_sub1_1.pixels[i5 + (j4 * 32)] == 0) {
|
||||
if ((i5 > 0) && (class30_sub2_sub1_sub1_1.pixels[(i5 - 1) + (j4 * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[i5 + (j4 * 32)] = 1;
|
||||
} else if ((j4 > 0) && (class30_sub2_sub1_sub1_1.pixels[i5 + ((j4 - 1) * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[i5 + (j4 * 32)] = 1;
|
||||
} else if ((i5 < 31) && (class30_sub2_sub1_sub1_1.pixels[i5 + 1 + (j4 * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[i5 + (j4 * 32)] = 1;
|
||||
} else if ((j4 < 31) && (class30_sub2_sub1_sub1_1.pixels[i5 + ((j4 + 1) * 32)] > 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[i5 + (j4 * 32)] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,15 +146,15 @@ public class ObjType {
|
||||
if (k > 0) {
|
||||
for (int j5 = 31; j5 >= 0; j5--) {
|
||||
for (int k4 = 31; k4 >= 0; k4--) {
|
||||
if (class30_sub2_sub1_sub1_1.anIntArray1439[j5 + (k4 * 32)] == 0) {
|
||||
if ((j5 > 0) && (class30_sub2_sub1_sub1_1.anIntArray1439[(j5 - 1) + (k4 * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[j5 + (k4 * 32)] = k;
|
||||
} else if ((k4 > 0) && (class30_sub2_sub1_sub1_1.anIntArray1439[j5 + ((k4 - 1) * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[j5 + (k4 * 32)] = k;
|
||||
} else if ((j5 < 31) && (class30_sub2_sub1_sub1_1.anIntArray1439[j5 + 1 + (k4 * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[j5 + (k4 * 32)] = k;
|
||||
} else if ((k4 < 31) && (class30_sub2_sub1_sub1_1.anIntArray1439[j5 + ((k4 + 1) * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[j5 + (k4 * 32)] = k;
|
||||
if (class30_sub2_sub1_sub1_1.pixels[j5 + (k4 * 32)] == 0) {
|
||||
if ((j5 > 0) && (class30_sub2_sub1_sub1_1.pixels[(j5 - 1) + (k4 * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[j5 + (k4 * 32)] = k;
|
||||
} else if ((k4 > 0) && (class30_sub2_sub1_sub1_1.pixels[j5 + ((k4 - 1) * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[j5 + (k4 * 32)] = k;
|
||||
} else if ((j5 < 31) && (class30_sub2_sub1_sub1_1.pixels[j5 + 1 + (k4 * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[j5 + (k4 * 32)] = k;
|
||||
} else if ((k4 < 31) && (class30_sub2_sub1_sub1_1.pixels[j5 + ((k4 + 1) * 32)] == 1)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[j5 + (k4 * 32)] = k;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,20 +162,20 @@ public class ObjType {
|
||||
} else if (k == 0) {
|
||||
for (int k5 = 31; k5 >= 0; k5--) {
|
||||
for (int l4 = 31; l4 >= 0; l4--) {
|
||||
if ((class30_sub2_sub1_sub1_1.anIntArray1439[k5 + (l4 * 32)] == 0) && (k5 > 0) && (l4 > 0) && (class30_sub2_sub1_sub1_1.anIntArray1439[(k5 - 1) + ((l4 - 1) * 32)] > 0)) {
|
||||
class30_sub2_sub1_sub1_1.anIntArray1439[k5 + (l4 * 32)] = 0x302020;
|
||||
if ((class30_sub2_sub1_sub1_1.pixels[k5 + (l4 * 32)] == 0) && (k5 > 0) && (l4 > 0) && (class30_sub2_sub1_sub1_1.pixels[(k5 - 1) + ((l4 - 1) * 32)] > 0)) {
|
||||
class30_sub2_sub1_sub1_1.pixels[k5 + (l4 * 32)] = 0x302020;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type.anInt163 != -1) {
|
||||
int l5 = class30_sub2_sub1_sub1_2.anInt1444;
|
||||
int j6 = class30_sub2_sub1_sub1_2.anInt1445;
|
||||
class30_sub2_sub1_sub1_2.anInt1444 = 32;
|
||||
class30_sub2_sub1_sub1_2.anInt1445 = 32;
|
||||
class30_sub2_sub1_sub1_2.method348(0, 0);
|
||||
class30_sub2_sub1_sub1_2.anInt1444 = l5;
|
||||
class30_sub2_sub1_sub1_2.anInt1445 = j6;
|
||||
int l5 = class30_sub2_sub1_sub1_2.cropW;
|
||||
int j6 = class30_sub2_sub1_sub1_2.cropH;
|
||||
class30_sub2_sub1_sub1_2.cropW = 32;
|
||||
class30_sub2_sub1_sub1_2.cropH = 32;
|
||||
class30_sub2_sub1_sub1_2.draw(0, 0);
|
||||
class30_sub2_sub1_sub1_2.cropW = l5;
|
||||
class30_sub2_sub1_sub1_2.cropH = j6;
|
||||
}
|
||||
if (k == 0) {
|
||||
iconCache.put(i, class30_sub2_sub1_sub1_1);
|
||||
@@ -187,11 +187,11 @@ public class ObjType {
|
||||
Draw3D.lineOffset = ai;
|
||||
Draw3D.jagged = true;
|
||||
if (type.aBoolean176) {
|
||||
class30_sub2_sub1_sub1_1.anInt1444 = 33;
|
||||
class30_sub2_sub1_sub1_1.cropW = 33;
|
||||
} else {
|
||||
class30_sub2_sub1_sub1_1.anInt1444 = 32;
|
||||
class30_sub2_sub1_sub1_1.cropW = 32;
|
||||
}
|
||||
class30_sub2_sub1_sub1_1.anInt1445 = j;
|
||||
class30_sub2_sub1_sub1_1.cropH = j;
|
||||
return class30_sub2_sub1_sub1_1;
|
||||
}
|
||||
public byte aByte154;
|
||||
|
||||
@@ -4,31 +4,31 @@
|
||||
|
||||
public class PathingEntity extends Entity {
|
||||
|
||||
public final int[] moveQueueTileX = new int[10];
|
||||
public final int[] moveQueueTileZ = new int[10];
|
||||
public final int[] pathTileX = new int[10];
|
||||
public final int[] pathTileZ = new int[10];
|
||||
public final int[] anIntArray1514 = new int[4];
|
||||
public final int[] anIntArray1515 = new int[4];
|
||||
public final int[] anIntArray1516 = new int[4];
|
||||
public final boolean[] aBooleanArray1553 = new boolean[10];
|
||||
public int anInt1502 = -1;
|
||||
public final boolean[] pathRunning = new boolean[10];
|
||||
public int index = -1;
|
||||
public int anInt1503;
|
||||
public int anInt1504 = 32;
|
||||
public int anInt1505 = -1;
|
||||
public int turnSpeed = 32;
|
||||
public int seqRun = -1;
|
||||
public String aString1506;
|
||||
public int anInt1507 = 200;
|
||||
public int anInt1510;
|
||||
public int anInt1511 = -1;
|
||||
public int anInt1512 = -1;
|
||||
public int dstYaw;
|
||||
public int seqStand = -1;
|
||||
public int seqTurn = -1;
|
||||
public int anInt1513;
|
||||
public int anInt1517 = -1;
|
||||
public int anInt1518;
|
||||
public int anInt1519;
|
||||
public int anInt1520 = -1;
|
||||
public int anInt1521;
|
||||
public int anInt1522;
|
||||
public int seqCurrent = -1;
|
||||
public int seqFrame;
|
||||
public int seqCycle;
|
||||
public int spotanim = -1;
|
||||
public int spotanimFrame;
|
||||
public int spotanimCycle;
|
||||
public int anInt1523;
|
||||
public int anInt1524;
|
||||
public int anInt1525;
|
||||
public int pathRemaining;
|
||||
public int anInt1526 = -1;
|
||||
public int anInt1527;
|
||||
public int anInt1528;
|
||||
@@ -40,62 +40,65 @@ public class PathingEntity extends Entity {
|
||||
public int anInt1534;
|
||||
public int anInt1535 = 100;
|
||||
public int anInt1537;
|
||||
public int anInt1538;
|
||||
public int anInt1539;
|
||||
public int anInt1540 = 1;
|
||||
public int faceTileX;
|
||||
public int faceTileZ;
|
||||
public int size = 1;
|
||||
public boolean aBoolean1541 = false;
|
||||
public int anInt1542;
|
||||
public int anInt1543;
|
||||
public int anInt1544;
|
||||
public int anInt1545;
|
||||
public int anInt1546;
|
||||
public int anInt1547;
|
||||
public int anInt1548;
|
||||
public int anInt1549;
|
||||
public int forceMoveStartSceneTileX;
|
||||
public int forceMoveEndSceneTileX;
|
||||
public int forceMoveStartSceneTileZ;
|
||||
public int forceMoveEndSceneTileZ;
|
||||
public int forceMoveEndCycle;
|
||||
public int forceMoveStartCycle;
|
||||
public int forceMoveFaceDirection;
|
||||
public int x;
|
||||
public int z;
|
||||
public int anInt1552;
|
||||
public int anInt1554 = -1;
|
||||
public int anInt1555 = -1;
|
||||
public int anInt1556 = -1;
|
||||
public int anInt1557 = -1;
|
||||
public int yaw;
|
||||
public int seqWalk = -1;
|
||||
public int seqTurnAround = -1;
|
||||
public int seqTurnLeft = -1;
|
||||
public int seqTurnRight = -1;
|
||||
|
||||
public PathingEntity() {
|
||||
}
|
||||
|
||||
public void method445(int i, int j, boolean flag) {
|
||||
public void move(int x, int z, boolean teleport) {
|
||||
if ((anInt1526 != -1) && (SeqType.instances[anInt1526].anInt364 == 1)) {
|
||||
anInt1526 = -1;
|
||||
}
|
||||
if (!flag) {
|
||||
int k = i - moveQueueTileX[0];
|
||||
int l = j - moveQueueTileZ[0];
|
||||
if ((k >= -8) && (k <= 8) && (l >= -8) && (l <= 8)) {
|
||||
if (anInt1525 < 9) {
|
||||
anInt1525++;
|
||||
if (!teleport) {
|
||||
int dx = x - pathTileX[0];
|
||||
int dz = z - pathTileZ[0];
|
||||
|
||||
if ((dx >= -8) && (dx <= 8) && (dz >= -8) && (dz <= 8)) {
|
||||
if (pathRemaining < 9) {
|
||||
pathRemaining++;
|
||||
}
|
||||
for (int i1 = anInt1525; i1 > 0; i1--) {
|
||||
moveQueueTileX[i1] = moveQueueTileX[i1 - 1];
|
||||
moveQueueTileZ[i1] = moveQueueTileZ[i1 - 1];
|
||||
aBooleanArray1553[i1] = aBooleanArray1553[i1 - 1];
|
||||
|
||||
for (int i = pathRemaining; i > 0; i--) {
|
||||
pathTileX[i] = pathTileX[i - 1];
|
||||
pathTileZ[i] = pathTileZ[i - 1];
|
||||
pathRunning[i] = pathRunning[i - 1];
|
||||
}
|
||||
moveQueueTileX[0] = i;
|
||||
moveQueueTileZ[0] = j;
|
||||
aBooleanArray1553[0] = false;
|
||||
|
||||
pathTileX[0] = x;
|
||||
pathTileZ[0] = z;
|
||||
pathRunning[0] = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
anInt1525 = 0;
|
||||
pathRemaining = 0;
|
||||
anInt1542 = 0;
|
||||
anInt1503 = 0;
|
||||
moveQueueTileX[0] = i;
|
||||
moveQueueTileZ[0] = j;
|
||||
x = (moveQueueTileX[0] * 128) + (anInt1540 * 64);
|
||||
z = (moveQueueTileZ[0] * 128) + (anInt1540 * 64);
|
||||
pathTileX[0] = x;
|
||||
pathTileZ[0] = z;
|
||||
this.x = (pathTileX[0] * 128) + (size * 64);
|
||||
this.z = (pathTileZ[0] * 128) + (size * 64);
|
||||
}
|
||||
|
||||
public void method446() {
|
||||
anInt1525 = 0;
|
||||
pathRemaining = 0;
|
||||
anInt1542 = 0;
|
||||
}
|
||||
|
||||
@@ -111,8 +114,8 @@ public class PathingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void method448(boolean flag, int i) {
|
||||
int j = moveQueueTileX[0];
|
||||
int k = moveQueueTileZ[0];
|
||||
int j = pathTileX[0];
|
||||
int k = pathTileZ[0];
|
||||
if (i == 0) {
|
||||
j--;
|
||||
k++;
|
||||
@@ -144,17 +147,17 @@ public class PathingEntity extends Entity {
|
||||
if ((anInt1526 != -1) && (SeqType.instances[anInt1526].anInt364 == 1)) {
|
||||
anInt1526 = -1;
|
||||
}
|
||||
if (anInt1525 < 9) {
|
||||
anInt1525++;
|
||||
if (pathRemaining < 9) {
|
||||
pathRemaining++;
|
||||
}
|
||||
for (int l = anInt1525; l > 0; l--) {
|
||||
moveQueueTileX[l] = moveQueueTileX[l - 1];
|
||||
moveQueueTileZ[l] = moveQueueTileZ[l - 1];
|
||||
aBooleanArray1553[l] = aBooleanArray1553[l - 1];
|
||||
for (int l = pathRemaining; l > 0; l--) {
|
||||
pathTileX[l] = pathTileX[l - 1];
|
||||
pathTileZ[l] = pathTileZ[l - 1];
|
||||
pathRunning[l] = pathRunning[l - 1];
|
||||
}
|
||||
moveQueueTileX[0] = j;
|
||||
moveQueueTileZ[0] = k;
|
||||
aBooleanArray1553[0] = flag;
|
||||
pathTileX[0] = j;
|
||||
pathTileZ[0] = k;
|
||||
pathRunning[0] = flag;
|
||||
}
|
||||
|
||||
public boolean method449() {
|
||||
|
||||
@@ -19,17 +19,17 @@ public class PlayerEntity extends PathingEntity {
|
||||
public int anInt1706;
|
||||
public int anInt1707;
|
||||
public int anInt1708;
|
||||
public int anInt1709;
|
||||
public int y;
|
||||
public boolean aBoolean1710 = false;
|
||||
public int anInt1711;
|
||||
public int anInt1712;
|
||||
public int anInt1713;
|
||||
public Model aModel_1714;
|
||||
public Model model;
|
||||
public long aLong1718;
|
||||
public int anInt1719;
|
||||
public int anInt1720;
|
||||
public int anInt1721;
|
||||
public int anInt1722;
|
||||
public int minSceneTileX;
|
||||
public int minSceneTileZ;
|
||||
public int maxSceneTileX;
|
||||
public int maxSceneTileZ;
|
||||
public int anInt1723;
|
||||
|
||||
public PlayerEntity() {
|
||||
@@ -49,14 +49,14 @@ public class PlayerEntity extends PathingEntity {
|
||||
if (aBoolean1699) {
|
||||
return model;
|
||||
}
|
||||
if ((super.anInt1520 != -1) && (super.anInt1521 != -1)) {
|
||||
SpotAnimType type = SpotAnimType.instances[super.anInt1520];
|
||||
if ((super.spotanim != -1) && (super.spotanimFrame != -1)) {
|
||||
SpotAnimType type = SpotAnimType.instances[super.spotanim];
|
||||
Model class30_sub2_sub4_sub6_2 = type.method266();
|
||||
if (class30_sub2_sub4_sub6_2 != null) {
|
||||
Model model_3 = new Model(true, SeqFrame.isNull(super.anInt1521), false, class30_sub2_sub4_sub6_2);
|
||||
Model model_3 = new Model(true, SeqFrame.isNull(super.spotanimFrame), false, class30_sub2_sub4_sub6_2);
|
||||
model_3.translate(0, -super.anInt1524, 0);
|
||||
model_3.createLabelReferences();
|
||||
model_3.applySequenceFrame(type.aType_407.anIntArray353[super.anInt1521]);
|
||||
model_3.applySequenceFrame(type.seq.primaryFrames[super.spotanimFrame]);
|
||||
model_3.labelFaces = null;
|
||||
model_3.labelVertices = null;
|
||||
if ((type.anInt410 != 128) || (type.anInt411 != 128)) {
|
||||
@@ -67,36 +67,36 @@ public class PlayerEntity extends PathingEntity {
|
||||
model = new Model(2, -819, aclass30_sub2_sub4_sub6_1);
|
||||
}
|
||||
}
|
||||
if (aModel_1714 != null) {
|
||||
if (this.model != null) {
|
||||
if (Game.loopCycle >= anInt1708) {
|
||||
aModel_1714 = null;
|
||||
this.model = null;
|
||||
}
|
||||
if ((Game.loopCycle >= anInt1707) && (Game.loopCycle < anInt1708)) {
|
||||
Model model_1 = aModel_1714;
|
||||
model_1.translate(anInt1711 - super.x, anInt1712 - anInt1709, anInt1713 - super.z);
|
||||
if (super.anInt1510 == 512) {
|
||||
Model model_1 = this.model;
|
||||
model_1.translate(anInt1711 - super.x, anInt1712 - y, anInt1713 - super.z);
|
||||
if (super.dstYaw == 512) {
|
||||
model_1.rotateY90();
|
||||
model_1.rotateY90();
|
||||
model_1.rotateY90();
|
||||
} else if (super.anInt1510 == 1024) {
|
||||
} else if (super.dstYaw == 1024) {
|
||||
model_1.rotateY90();
|
||||
model_1.rotateY90();
|
||||
} else if (super.anInt1510 == 1536) {
|
||||
} else if (super.dstYaw == 1536) {
|
||||
model_1.rotateY90();
|
||||
}
|
||||
Model[] aclass30_sub2_sub4_sub6 = {model, model_1};
|
||||
model = new Model(2, -819, aclass30_sub2_sub4_sub6);
|
||||
if (super.anInt1510 == 512) {
|
||||
if (super.dstYaw == 512) {
|
||||
model_1.rotateY90();
|
||||
} else if (super.anInt1510 == 1024) {
|
||||
} else if (super.dstYaw == 1024) {
|
||||
model_1.rotateY90();
|
||||
model_1.rotateY90();
|
||||
} else if (super.anInt1510 == 1536) {
|
||||
} else if (super.dstYaw == 1536) {
|
||||
model_1.rotateY90();
|
||||
model_1.rotateY90();
|
||||
model_1.rotateY90();
|
||||
}
|
||||
model_1.translate(super.x - anInt1711, anInt1709 - anInt1712, super.z - anInt1713);
|
||||
model_1.translate(super.x - anInt1711, y - anInt1712, super.z - anInt1713);
|
||||
}
|
||||
}
|
||||
model.pickBounds = true;
|
||||
@@ -118,7 +118,7 @@ public class PlayerEntity extends PathingEntity {
|
||||
int i1 = buffer.get1U();
|
||||
anIntArray1717[j] = (k << 8) + i1;
|
||||
if ((j == 0) && (anIntArray1717[0] == 65535)) {
|
||||
aType_1698 = NPCType.method159(buffer.get2U());
|
||||
aType_1698 = NPCType.get(buffer.get2U());
|
||||
break;
|
||||
}
|
||||
if ((anIntArray1717[j] >= 512) && ((anIntArray1717[j] - 512) < ObjType.anInt203)) {
|
||||
@@ -135,33 +135,33 @@ public class PlayerEntity extends PathingEntity {
|
||||
}
|
||||
anIntArray1700[l] = j1;
|
||||
}
|
||||
super.anInt1511 = buffer.get2U();
|
||||
if (super.anInt1511 == 65535) {
|
||||
super.anInt1511 = -1;
|
||||
super.seqStand = buffer.get2U();
|
||||
if (super.seqStand == 65535) {
|
||||
super.seqStand = -1;
|
||||
}
|
||||
super.anInt1512 = buffer.get2U();
|
||||
if (super.anInt1512 == 65535) {
|
||||
super.anInt1512 = -1;
|
||||
super.seqTurn = buffer.get2U();
|
||||
if (super.seqTurn == 65535) {
|
||||
super.seqTurn = -1;
|
||||
}
|
||||
super.anInt1554 = buffer.get2U();
|
||||
if (super.anInt1554 == 65535) {
|
||||
super.anInt1554 = -1;
|
||||
super.seqWalk = buffer.get2U();
|
||||
if (super.seqWalk == 65535) {
|
||||
super.seqWalk = -1;
|
||||
}
|
||||
super.anInt1555 = buffer.get2U();
|
||||
if (super.anInt1555 == 65535) {
|
||||
super.anInt1555 = -1;
|
||||
super.seqTurnAround = buffer.get2U();
|
||||
if (super.seqTurnAround == 65535) {
|
||||
super.seqTurnAround = -1;
|
||||
}
|
||||
super.anInt1556 = buffer.get2U();
|
||||
if (super.anInt1556 == 65535) {
|
||||
super.anInt1556 = -1;
|
||||
super.seqTurnLeft = buffer.get2U();
|
||||
if (super.seqTurnLeft == 65535) {
|
||||
super.seqTurnLeft = -1;
|
||||
}
|
||||
super.anInt1557 = buffer.get2U();
|
||||
if (super.anInt1557 == 65535) {
|
||||
super.anInt1557 = -1;
|
||||
super.seqTurnRight = buffer.get2U();
|
||||
if (super.seqTurnRight == 65535) {
|
||||
super.seqTurnRight = -1;
|
||||
}
|
||||
super.anInt1505 = buffer.get2U();
|
||||
if (super.anInt1505 == 65535) {
|
||||
super.anInt1505 = -1;
|
||||
super.seqRun = buffer.get2U();
|
||||
if (super.seqRun == 65535) {
|
||||
super.seqRun = -1;
|
||||
}
|
||||
aString1703 = StringUtil.formatName(StringUtil.fromBase37(buffer.get8()));
|
||||
anInt1705 = buffer.get1U();
|
||||
@@ -192,9 +192,9 @@ public class PlayerEntity extends PathingEntity {
|
||||
if (aType_1698 != null) {
|
||||
int j = -1;
|
||||
if ((super.anInt1526 >= 0) && (super.anInt1529 == 0)) {
|
||||
j = SeqType.instances[super.anInt1526].anIntArray353[super.anInt1527];
|
||||
} else if (super.anInt1517 >= 0) {
|
||||
j = SeqType.instances[super.anInt1517].anIntArray353[super.anInt1518];
|
||||
j = SeqType.instances[super.anInt1526].primaryFrames[super.anInt1527];
|
||||
} else if (super.seqCurrent >= 0) {
|
||||
j = SeqType.instances[super.seqCurrent].primaryFrames[super.seqFrame];
|
||||
}
|
||||
return aType_1698.method164(-1, j, null);
|
||||
}
|
||||
@@ -205,9 +205,9 @@ public class PlayerEntity extends PathingEntity {
|
||||
int k1 = -1;
|
||||
if ((super.anInt1526 >= 0) && (super.anInt1529 == 0)) {
|
||||
SeqType type = SeqType.instances[super.anInt1526];
|
||||
k = type.anIntArray353[super.anInt1527];
|
||||
if ((super.anInt1517 >= 0) && (super.anInt1517 != super.anInt1511)) {
|
||||
i1 = SeqType.instances[super.anInt1517].anIntArray353[super.anInt1518];
|
||||
k = type.primaryFrames[super.anInt1527];
|
||||
if ((super.seqCurrent >= 0) && (super.seqCurrent != super.seqStand)) {
|
||||
i1 = SeqType.instances[super.seqCurrent].primaryFrames[super.seqFrame];
|
||||
}
|
||||
if (type.anInt360 >= 0) {
|
||||
j1 = type.anInt360;
|
||||
@@ -217,8 +217,8 @@ public class PlayerEntity extends PathingEntity {
|
||||
k1 = type.anInt361;
|
||||
l += ((long) k1 - anIntArray1717[3]) << 16;
|
||||
}
|
||||
} else if (super.anInt1517 >= 0) {
|
||||
k = SeqType.instances[super.anInt1517].anIntArray353[super.anInt1518];
|
||||
} else if (super.seqCurrent >= 0) {
|
||||
k = SeqType.instances[super.seqCurrent].primaryFrames[super.seqFrame];
|
||||
}
|
||||
Model model_1 = modelCache.get(l);
|
||||
if (model_1 == null) {
|
||||
|
||||
@@ -69,8 +69,8 @@ public class ProjectileEntity extends Entity {
|
||||
return null;
|
||||
}
|
||||
int j = -1;
|
||||
if (aType_1592.aType_407 != null) {
|
||||
j = aType_1592.aType_407.anIntArray353[anInt1593];
|
||||
if (aType_1592.seq != null) {
|
||||
j = aType_1592.seq.primaryFrames[anInt1593];
|
||||
}
|
||||
Model model_1 = new Model(true, SeqFrame.isNull(j), false, model);
|
||||
if (j != -1) {
|
||||
@@ -95,11 +95,11 @@ public class ProjectileEntity extends Entity {
|
||||
aDouble1577 += aDouble1578 * (double) i;
|
||||
anInt1595 = ((int) (Math.atan2(aDouble1574, aDouble1575) * 325.94900000000001D) + 1024) & 0x7ff;
|
||||
anInt1596 = (int) (Math.atan2(aDouble1577, aDouble1576) * 325.94900000000001D) & 0x7ff;
|
||||
if (aType_1592.aType_407 != null) {
|
||||
for (anInt1594 += i; anInt1594 > aType_1592.aType_407.method258(anInt1593); ) {
|
||||
anInt1594 -= aType_1592.aType_407.method258(anInt1593) + 1;
|
||||
if (aType_1592.seq != null) {
|
||||
for (anInt1594 += i; anInt1594 > aType_1592.seq.getFrameDelay(anInt1593); ) {
|
||||
anInt1594 -= aType_1592.seq.getFrameDelay(anInt1593) + 1;
|
||||
anInt1593++;
|
||||
if (anInt1593 >= aType_1592.aType_407.anInt352) {
|
||||
if (anInt1593 >= aType_1592.seq.frameCount) {
|
||||
anInt1593 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+751
-678
File diff suppressed because it is too large.
Load diff
+254
-244
@@ -5,9 +5,9 @@
|
||||
public class SceneBuilder {
|
||||
|
||||
public static final int[] anIntArray137 = {1, 0, -1, 0};
|
||||
public static final int[] anIntArray140 = {16, 32, 64, 128};
|
||||
public static final int[] WALL_TYPE_1 = {16, 32, 64, 128};
|
||||
public static final int[] anIntArray144 = {0, -1, 0, 1};
|
||||
public static final int[] anIntArray152 = {1, 2, 4, 8};
|
||||
public static final int[] WALL_TYPE_0 = {1, 2, 4, 8};
|
||||
public static int anInt123 = (int) (Math.random() * 17.0) - 8;
|
||||
public static int anInt131;
|
||||
public static int anInt133 = (int) (Math.random() * 33.0) - 16;
|
||||
@@ -102,193 +102,206 @@ public class SceneBuilder {
|
||||
return (i & 0xff80) + i_225_;
|
||||
}
|
||||
|
||||
public static void method188(Scene scene, int i, int i_226_, int i_227_, int i_228_, SceneCollisionMap collisionMap, int[][][] is, int i_229_, int i_230_, int i_231_) {
|
||||
int i_233_ = is[i_228_][i_229_][i_226_];
|
||||
int i_234_ = is[i_228_][i_229_ + 1][i_226_];
|
||||
int i_235_ = is[i_228_][i_229_ + 1][i_226_ + 1];
|
||||
int i_236_ = is[i_228_][i_229_][i_226_ + 1];
|
||||
int i_237_ = (i_233_ + i_234_ + i_235_ + i_236_) >> 2;
|
||||
LocType type = LocType.method572(i_230_);
|
||||
int i_238_ = i_229_ + (i_226_ << 7) + (i_230_ << 14) + 1073741824;
|
||||
if (!type.aBoolean778) {
|
||||
i_238_ += -2147483648;
|
||||
public static void method188(Scene scene, int rotation, int stz, int type, int groundPlane, SceneCollisionMap collisionMap, int[][][] planeHeightmap, int stx, int locId, int locPlane) {
|
||||
int y00 = planeHeightmap[groundPlane][stx][stz];
|
||||
int y10 = planeHeightmap[groundPlane][stx + 1][stz];
|
||||
int y11 = planeHeightmap[groundPlane][stx + 1][stz + 1];
|
||||
int y01 = planeHeightmap[groundPlane][stx][stz + 1];
|
||||
int y = (y00 + y10 + y11 + y01) >> 2;
|
||||
|
||||
LocType loc = LocType.method572(locId);
|
||||
int bitset = stx + (stz << 7) + (locId << 14) + 1073741824;
|
||||
|
||||
if (!loc.aBoolean778) {
|
||||
bitset += -2147483648;
|
||||
}
|
||||
byte i_239_ = (byte) ((i << 6) + i_227_);
|
||||
if (i_227_ == 22) {
|
||||
|
||||
byte info = (byte) ((rotation << 6) + type);
|
||||
|
||||
if (type == 22) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(22, i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(22, rotation, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, i, 22, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, rotation, 22, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method280(i_231_, i_237_, i_226_, entity, i_239_, i_238_, i_229_);
|
||||
if (type.aBoolean767 && type.aBoolean778) {
|
||||
collisionMap.method213(i_226_, i_229_);
|
||||
|
||||
scene.addGroundDecoration(entity, locPlane, stx, stz, y, bitset, info);
|
||||
|
||||
if (loc.aBoolean767 && loc.aBoolean778) {
|
||||
collisionMap.method213(stz, stx);
|
||||
}
|
||||
} else if ((i_227_ == 10) || (i_227_ == 11)) {
|
||||
} else if ((type == 10) || (type == 11)) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(10, i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(10, rotation, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, i, 10, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, rotation, 10, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
|
||||
if (entity != null) {
|
||||
int i_240_ = 0;
|
||||
if (i_227_ == 11) {
|
||||
|
||||
if (type == 11) {
|
||||
i_240_ += 256;
|
||||
}
|
||||
|
||||
int i_241_;
|
||||
int i_242_;
|
||||
if ((i == 1) || (i == 3)) {
|
||||
i_241_ = type.anInt761;
|
||||
i_242_ = type.anInt744;
|
||||
|
||||
if ((rotation == 1) || (rotation == 3)) {
|
||||
i_241_ = loc.anInt761;
|
||||
i_242_ = loc.anInt744;
|
||||
} else {
|
||||
i_241_ = type.anInt744;
|
||||
i_242_ = type.anInt761;
|
||||
i_241_ = loc.anInt744;
|
||||
i_242_ = loc.anInt761;
|
||||
}
|
||||
scene.method284(i_238_, i_239_, i_237_, i_242_, entity, i_241_, i_231_, i_240_, i_226_, i_229_);
|
||||
|
||||
scene.add(entity, locPlane, stx, stz, y, i_241_, i_242_, i_240_, bitset, info);
|
||||
}
|
||||
if (type.aBoolean767) {
|
||||
collisionMap.method212(type.aBoolean757, type.anInt744, type.anInt761, i_229_, i_226_, i);
|
||||
if (loc.aBoolean767) {
|
||||
collisionMap.method212(loc.aBoolean757, loc.anInt744, loc.anInt761, stx, stz, rotation);
|
||||
}
|
||||
} else if (i_227_ >= 12) {
|
||||
} else if (type >= 12) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(i_227_, i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(type, rotation, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, i, i_227_, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, rotation, type, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method284(i_238_, i_239_, i_237_, 1, entity, 1, i_231_, 0, i_226_, i_229_);
|
||||
if (type.aBoolean767) {
|
||||
collisionMap.method212(type.aBoolean757, type.anInt744, type.anInt761, i_229_, i_226_, i);
|
||||
scene.add(entity, locPlane, stx, stz, y, 1, 1, 0, bitset, info);
|
||||
if (loc.aBoolean767) {
|
||||
collisionMap.method212(loc.aBoolean757, loc.anInt744, loc.anInt761, stx, stz, rotation);
|
||||
}
|
||||
} else if (i_227_ == 0) {
|
||||
} else if (type == 0) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(0, i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(0, rotation, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, i, 0, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, rotation, 0, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray152[i], entity, i_238_, i_226_, i_239_, i_229_, null, i_237_, 0, i_231_);
|
||||
if (type.aBoolean767) {
|
||||
collisionMap.method211(i_226_, i, i_229_, i_227_, type.aBoolean757);
|
||||
scene.addWall(WALL_TYPE_0[rotation], entity, 0, null, locPlane, stx, stz, y, bitset, info);
|
||||
if (loc.aBoolean767) {
|
||||
collisionMap.method211(stz, rotation, stx, type, loc.aBoolean757);
|
||||
}
|
||||
} else if (i_227_ == 1) {
|
||||
} else if (type == 1) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(1, i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(1, rotation, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, i, 1, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, rotation, 1, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray140[i], entity, i_238_, i_226_, i_239_, i_229_, null, i_237_, 0, i_231_);
|
||||
if (type.aBoolean767) {
|
||||
collisionMap.method211(i_226_, i, i_229_, i_227_, type.aBoolean757);
|
||||
scene.addWall(WALL_TYPE_1[rotation], entity, 0, null, locPlane, stx, stz, y, bitset, info);
|
||||
if (loc.aBoolean767) {
|
||||
collisionMap.method211(stz, rotation, stx, type, loc.aBoolean757);
|
||||
}
|
||||
} else if (i_227_ == 2) {
|
||||
int i_243_ = (i + 1) & 0x3;
|
||||
} else if (type == 2) {
|
||||
int i_243_ = (rotation + 1) & 0x3;
|
||||
Entity entity;
|
||||
Entity entity_244_;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(2, 4 + i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
entity_244_ = type.method578(2, i_243_, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(2, 4 + rotation, y00, y10, y11, y01, -1);
|
||||
entity_244_ = loc.method578(2, i_243_, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, 4 + i, 2, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity_244_ = new LocEntity(i_230_, i_243_, 2, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, 4 + rotation, 2, y10, y11, y00, y01, loc.anInt781, true);
|
||||
entity_244_ = new LocEntity(locId, i_243_, 2, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray152[i], entity, i_238_, i_226_, i_239_, i_229_, entity_244_, i_237_, anIntArray152[i_243_], i_231_);
|
||||
if (type.aBoolean767) {
|
||||
collisionMap.method211(i_226_, i, i_229_, i_227_, type.aBoolean757);
|
||||
scene.addWall(WALL_TYPE_0[rotation], entity, WALL_TYPE_0[i_243_], entity_244_, locPlane, stx, stz, y, bitset, info);
|
||||
if (loc.aBoolean767) {
|
||||
collisionMap.method211(stz, rotation, stx, type, loc.aBoolean757);
|
||||
}
|
||||
} else if (i_227_ == 3) {
|
||||
} else if (type == 3) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(3, i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(3, rotation, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, i, 3, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, rotation, 3, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray140[i], entity, i_238_, i_226_, i_239_, i_229_, null, i_237_, 0, i_231_);
|
||||
if (type.aBoolean767) {
|
||||
collisionMap.method211(i_226_, i, i_229_, i_227_, type.aBoolean757);
|
||||
scene.addWall(WALL_TYPE_1[rotation], entity, 0, null, locPlane, stx, stz, y, bitset, info);
|
||||
if (loc.aBoolean767) {
|
||||
collisionMap.method211(stz, rotation, stx, type, loc.aBoolean757);
|
||||
}
|
||||
} else if (i_227_ == 9) {
|
||||
} else if (type == 9) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(i_227_, i, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(type, rotation, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, i, i_227_, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, rotation, type, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method284(i_238_, i_239_, i_237_, 1, entity, 1, i_231_, 0, i_226_, i_229_);
|
||||
if (type.aBoolean767) {
|
||||
collisionMap.method212(type.aBoolean757, type.anInt744, type.anInt761, i_229_, i_226_, i);
|
||||
scene.add(entity, locPlane, stx, stz, y, 1, 1, 0, bitset, info);
|
||||
if (loc.aBoolean767) {
|
||||
collisionMap.method212(loc.aBoolean757, loc.anInt744, loc.anInt761, stx, stz, rotation);
|
||||
}
|
||||
} else {
|
||||
if (type.aBoolean762) {
|
||||
if (i == 1) {
|
||||
int i_245_ = i_236_;
|
||||
i_236_ = i_235_;
|
||||
i_235_ = i_234_;
|
||||
i_234_ = i_233_;
|
||||
i_233_ = i_245_;
|
||||
} else if (i == 2) {
|
||||
int i_246_ = i_236_;
|
||||
i_236_ = i_234_;
|
||||
i_234_ = i_246_;
|
||||
i_246_ = i_235_;
|
||||
i_235_ = i_233_;
|
||||
i_233_ = i_246_;
|
||||
} else if (i == 3) {
|
||||
int i_247_ = i_236_;
|
||||
i_236_ = i_233_;
|
||||
i_233_ = i_234_;
|
||||
i_234_ = i_235_;
|
||||
i_235_ = i_247_;
|
||||
if (loc.aBoolean762) {
|
||||
if (rotation == 1) {
|
||||
int i_245_ = y01;
|
||||
y01 = y11;
|
||||
y11 = y10;
|
||||
y10 = y00;
|
||||
y00 = i_245_;
|
||||
} else if (rotation == 2) {
|
||||
int i_246_ = y01;
|
||||
y01 = y10;
|
||||
y10 = i_246_;
|
||||
i_246_ = y11;
|
||||
y11 = y00;
|
||||
y00 = i_246_;
|
||||
} else if (rotation == 3) {
|
||||
int i_247_ = y01;
|
||||
y01 = y00;
|
||||
y00 = y10;
|
||||
y10 = y11;
|
||||
y11 = i_247_;
|
||||
}
|
||||
}
|
||||
if (i_227_ == 4) {
|
||||
if (type == 4) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(4, 0, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(4, 0, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, 0, 4, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, 0, 4, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method283(i_238_, i_226_, i * 512, i_231_, 0, i_237_, entity, i_229_, i_239_, 0, anIntArray152[i]);
|
||||
} else if (i_227_ == 5) {
|
||||
scene.addWallDecoration(WALL_TYPE_0[rotation], entity, locPlane, stx, stz, y, rotation * 512, 0, 0, bitset, info);
|
||||
} else if (type == 5) {
|
||||
int i_248_ = 16;
|
||||
int i_249_ = scene.method300(i_231_, i_229_, i_226_);
|
||||
int i_249_ = scene.getWallBitset(locPlane, stx, stz);
|
||||
if (i_249_ > 0) {
|
||||
i_248_ = LocType.method572((i_249_ >> 14) & 0x7fff).anInt775;
|
||||
}
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(4, 0, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(4, 0, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, 0, 4, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, 0, 4, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method283(i_238_, i_226_, i * 512, i_231_, anIntArray137[i] * i_248_, i_237_, entity, i_229_, i_239_, anIntArray144[i] * i_248_, anIntArray152[i]);
|
||||
} else if (i_227_ == 6) {
|
||||
scene.addWallDecoration(WALL_TYPE_0[rotation], entity, locPlane, stx, stz, y, rotation * 512, anIntArray137[rotation] * i_248_, anIntArray144[rotation] * i_248_, bitset, info);
|
||||
} else if (type == 6) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(4, 0, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(4, 0, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, 0, 4, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, 0, 4, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method283(i_238_, i_226_, i, i_231_, 0, i_237_, entity, i_229_, i_239_, 0, 256);
|
||||
} else if (i_227_ == 7) {
|
||||
scene.addWallDecoration(256, entity, locPlane, stx, stz, y, rotation, 0, 0, bitset, info);
|
||||
} else if (type == 7) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(4, 0, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(4, 0, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, 0, 4, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, 0, 4, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method283(i_238_, i_226_, i, i_231_, 0, i_237_, entity, i_229_, i_239_, 0, 512);
|
||||
} else if (i_227_ == 8) {
|
||||
scene.addWallDecoration(512, entity, locPlane, stx, stz, y, rotation, 0, 0, bitset, info);
|
||||
} else if (type == 8) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
entity = type.method578(4, 0, i_233_, i_234_, i_235_, i_236_, -1);
|
||||
if ((loc.anInt781 == -1) && (loc.anIntArray759 == null)) {
|
||||
entity = loc.method578(4, 0, y00, y10, y11, y01, -1);
|
||||
} else {
|
||||
entity = new LocEntity(i_230_, 0, 4, i_234_, i_235_, i_233_, i_236_, type.anInt781, true);
|
||||
entity = new LocEntity(locId, 0, 4, y10, y11, y00, y01, loc.anInt781, true);
|
||||
}
|
||||
scene.method283(i_238_, i_226_, i, i_231_, 0, i_237_, entity, i_229_, i_239_, 0, 768);
|
||||
scene.addWallDecoration(768, entity, locPlane, stx, stz, y, rotation, 0, 0, bitset, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -340,45 +353,45 @@ public class SceneBuilder {
|
||||
public final int[] anIntArray126;
|
||||
public final int[] anIntArray127;
|
||||
public final int[] anIntArray128;
|
||||
public final int[][][] anIntArrayArrayArray129;
|
||||
public final int[][][] planeHeightmap;
|
||||
public final byte[][][] aByteArrayArrayArray130;
|
||||
public final byte[][][] aByteArrayArrayArray134;
|
||||
public final int[][][] anIntArrayArrayArray135;
|
||||
public final byte[][][] aByteArrayArrayArray136;
|
||||
public final int[][] anIntArrayArray139;
|
||||
public final byte[][][] aByteArrayArrayArray142;
|
||||
public final int anInt146;
|
||||
public final int anInt147;
|
||||
public final int maxTileX;
|
||||
public final int maxTileZ;
|
||||
public final byte[][][] aByteArrayArrayArray148;
|
||||
public final byte[][][] aByteArrayArrayArray149;
|
||||
public final byte[][][] planeTileFlags;
|
||||
|
||||
public SceneBuilder(byte[][][] is, int i_0_, int i_1_, int[][][] is_2_) {
|
||||
public SceneBuilder(byte[][][] planeTileFlags, int maxTileZ, int maxTileX, int[][][] planeHeightmap) {
|
||||
anInt145 = 99;
|
||||
anInt146 = i_1_;
|
||||
anInt147 = i_0_;
|
||||
anIntArrayArrayArray129 = is_2_;
|
||||
aByteArrayArrayArray149 = is;
|
||||
aByteArrayArrayArray142 = new byte[4][anInt146][anInt147];
|
||||
aByteArrayArrayArray130 = new byte[4][anInt146][anInt147];
|
||||
aByteArrayArrayArray136 = new byte[4][anInt146][anInt147];
|
||||
aByteArrayArrayArray148 = new byte[4][anInt146][anInt147];
|
||||
anIntArrayArrayArray135 = new int[4][anInt146 + 1][anInt147 + 1];
|
||||
aByteArrayArrayArray134 = new byte[4][anInt146 + 1][anInt147 + 1];
|
||||
anIntArrayArray139 = new int[anInt146 + 1][anInt147 + 1];
|
||||
anIntArray124 = new int[anInt147];
|
||||
anIntArray125 = new int[anInt147];
|
||||
anIntArray126 = new int[anInt147];
|
||||
anIntArray127 = new int[anInt147];
|
||||
anIntArray128 = new int[anInt147];
|
||||
this.maxTileX = maxTileX;
|
||||
this.maxTileZ = maxTileZ;
|
||||
this.planeHeightmap = planeHeightmap;
|
||||
this.planeTileFlags = planeTileFlags;
|
||||
aByteArrayArrayArray142 = new byte[4][this.maxTileX][this.maxTileZ];
|
||||
aByteArrayArrayArray130 = new byte[4][this.maxTileX][this.maxTileZ];
|
||||
aByteArrayArrayArray136 = new byte[4][this.maxTileX][this.maxTileZ];
|
||||
aByteArrayArrayArray148 = new byte[4][this.maxTileX][this.maxTileZ];
|
||||
anIntArrayArrayArray135 = new int[4][this.maxTileX + 1][this.maxTileZ + 1];
|
||||
aByteArrayArrayArray134 = new byte[4][this.maxTileX + 1][this.maxTileZ + 1];
|
||||
anIntArrayArray139 = new int[this.maxTileX + 1][this.maxTileZ + 1];
|
||||
anIntArray124 = new int[this.maxTileZ];
|
||||
anIntArray125 = new int[this.maxTileZ];
|
||||
anIntArray126 = new int[this.maxTileZ];
|
||||
anIntArray127 = new int[this.maxTileZ];
|
||||
anIntArray128 = new int[this.maxTileZ];
|
||||
}
|
||||
|
||||
public void method171(SceneCollisionMap[] collisionMaps, Scene scene) {
|
||||
for (int i_6_ = 0; i_6_ < 4; i_6_++) {
|
||||
for (int i_7_ = 0; i_7_ < 104; i_7_++) {
|
||||
for (int i_8_ = 0; i_8_ < 104; i_8_++) {
|
||||
if ((aByteArrayArrayArray149[i_6_][i_7_][i_8_] & 0x1) == 1) {
|
||||
if ((planeTileFlags[i_6_][i_7_][i_8_] & 0x1) == 1) {
|
||||
int i_9_ = i_6_;
|
||||
if ((aByteArrayArrayArray149[1][i_7_][i_8_] & 0x2) == 2) {
|
||||
if ((planeTileFlags[1][i_7_][i_8_] & 0x2) == 2) {
|
||||
i_9_--;
|
||||
}
|
||||
if (i_9_ >= 0) {
|
||||
@@ -402,8 +415,8 @@ public class SceneBuilder {
|
||||
if (anInt133 > 16) {
|
||||
anInt133 = 16;
|
||||
}
|
||||
for (int i_10_ = 0; i_10_ < 4; i_10_++) {
|
||||
byte[][] is = aByteArrayArrayArray134[i_10_];
|
||||
for (int plane = 0; plane < 4; plane++) {
|
||||
byte[][] is = aByteArrayArrayArray134[plane];
|
||||
int i_11_ = 96;
|
||||
int i_12_ = 768;
|
||||
int i_13_ = -50;
|
||||
@@ -411,10 +424,10 @@ public class SceneBuilder {
|
||||
int i_15_ = -50;
|
||||
int i_16_ = (int) Math.sqrt((i_13_ * i_13_) + (i_14_ * i_14_) + (i_15_ * i_15_));
|
||||
int i_17_ = (i_12_ * i_16_) >> 8;
|
||||
for (int i_18_ = 1; i_18_ < (anInt147 - 1); i_18_++) {
|
||||
for (int i_19_ = 1; i_19_ < (anInt146 - 1); i_19_++) {
|
||||
int i_20_ = (anIntArrayArrayArray129[i_10_][i_19_ + 1][i_18_] - anIntArrayArrayArray129[i_10_][i_19_ - 1][i_18_]);
|
||||
int i_21_ = (anIntArrayArrayArray129[i_10_][i_19_][i_18_ + 1] - anIntArrayArrayArray129[i_10_][i_19_][i_18_ - 1]);
|
||||
for (int i_18_ = 1; i_18_ < (maxTileZ - 1); i_18_++) {
|
||||
for (int i_19_ = 1; i_19_ < (maxTileX - 1); i_19_++) {
|
||||
int i_20_ = (planeHeightmap[plane][i_19_ + 1][i_18_] - planeHeightmap[plane][i_19_ - 1][i_18_]);
|
||||
int i_21_ = (planeHeightmap[plane][i_19_][i_18_ + 1] - planeHeightmap[plane][i_19_][i_18_ - 1]);
|
||||
int i_22_ = (int) Math.sqrt((i_20_ * i_20_) + 65536 + (i_21_ * i_21_));
|
||||
int i_23_ = (i_20_ << 8) / i_22_;
|
||||
int i_24_ = 65536 / i_22_;
|
||||
@@ -424,18 +437,18 @@ public class SceneBuilder {
|
||||
anIntArrayArray139[i_19_][i_18_] = i_26_ - i_27_;
|
||||
}
|
||||
}
|
||||
for (int i_28_ = 0; i_28_ < anInt147; i_28_++) {
|
||||
for (int i_28_ = 0; i_28_ < maxTileZ; i_28_++) {
|
||||
anIntArray124[i_28_] = 0;
|
||||
anIntArray125[i_28_] = 0;
|
||||
anIntArray126[i_28_] = 0;
|
||||
anIntArray127[i_28_] = 0;
|
||||
anIntArray128[i_28_] = 0;
|
||||
}
|
||||
for (int i_29_ = -5; i_29_ < (anInt146 + 5); i_29_++) {
|
||||
for (int i_30_ = 0; i_30_ < anInt147; i_30_++) {
|
||||
for (int i_29_ = -5; i_29_ < (maxTileX + 5); i_29_++) {
|
||||
for (int i_30_ = 0; i_30_ < maxTileZ; i_30_++) {
|
||||
int i_31_ = i_29_ + 5;
|
||||
if ((i_31_ >= 0) && (i_31_ < anInt146)) {
|
||||
int i_32_ = aByteArrayArrayArray142[i_10_][i_31_][i_30_] & 0xff;
|
||||
if ((i_31_ >= 0) && (i_31_ < maxTileX)) {
|
||||
int i_32_ = aByteArrayArrayArray142[plane][i_31_][i_30_] & 0xff;
|
||||
if (i_32_ > 0) {
|
||||
FloType type = FloType.instances[i_32_ - 1];
|
||||
anIntArray124[i_30_] += type.anInt397;
|
||||
@@ -446,8 +459,8 @@ public class SceneBuilder {
|
||||
}
|
||||
}
|
||||
int i_33_ = i_29_ - 5;
|
||||
if ((i_33_ >= 0) && (i_33_ < anInt146)) {
|
||||
int i_34_ = aByteArrayArrayArray142[i_10_][i_33_][i_30_] & 0xff;
|
||||
if ((i_33_ >= 0) && (i_33_ < maxTileX)) {
|
||||
int i_34_ = aByteArrayArrayArray142[plane][i_33_][i_30_] & 0xff;
|
||||
if (i_34_ > 0) {
|
||||
FloType type = FloType.instances[i_34_ - 1];
|
||||
anIntArray124[i_30_] -= type.anInt397;
|
||||
@@ -458,15 +471,15 @@ public class SceneBuilder {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((i_29_ >= 1) && (i_29_ < (anInt146 - 1))) {
|
||||
if ((i_29_ >= 1) && (i_29_ < (maxTileX - 1))) {
|
||||
int i_35_ = 0;
|
||||
int i_36_ = 0;
|
||||
int i_37_ = 0;
|
||||
int i_38_ = 0;
|
||||
int i_39_ = 0;
|
||||
for (int i_40_ = -5; i_40_ < (anInt147 + 5); i_40_++) {
|
||||
for (int i_40_ = -5; i_40_ < (maxTileZ + 5); i_40_++) {
|
||||
int i_41_ = i_40_ + 5;
|
||||
if ((i_41_ >= 0) && (i_41_ < anInt147)) {
|
||||
if ((i_41_ >= 0) && (i_41_ < maxTileZ)) {
|
||||
i_35_ += anIntArray124[i_41_];
|
||||
i_36_ += anIntArray125[i_41_];
|
||||
i_37_ += anIntArray126[i_41_];
|
||||
@@ -474,24 +487,24 @@ public class SceneBuilder {
|
||||
i_39_ += anIntArray128[i_41_];
|
||||
}
|
||||
int i_42_ = i_40_ - 5;
|
||||
if ((i_42_ >= 0) && (i_42_ < anInt147)) {
|
||||
if ((i_42_ >= 0) && (i_42_ < maxTileZ)) {
|
||||
i_35_ -= anIntArray124[i_42_];
|
||||
i_36_ -= anIntArray125[i_42_];
|
||||
i_37_ -= anIntArray126[i_42_];
|
||||
i_38_ -= anIntArray127[i_42_];
|
||||
i_39_ -= anIntArray128[i_42_];
|
||||
}
|
||||
if ((i_40_ >= 1) && (i_40_ < (anInt147 - 1)) && (!lowmem || ((aByteArrayArrayArray149[0][i_29_][i_40_] & 0x2) != 0) || (((aByteArrayArrayArray149[i_10_][i_29_][i_40_] & 0x10) == 0) && (method182(i_40_, i_10_, i_29_, 0) == anInt131)))) {
|
||||
if (i_10_ < anInt145) {
|
||||
anInt145 = i_10_;
|
||||
if ((i_40_ >= 1) && (i_40_ < (maxTileZ - 1)) && (!lowmem || ((planeTileFlags[0][i_29_][i_40_] & 0x2) != 0) || (((planeTileFlags[plane][i_29_][i_40_] & 0x10) == 0) && (getDrawPlane(plane, i_29_, i_40_) == anInt131)))) {
|
||||
if (plane < anInt145) {
|
||||
anInt145 = plane;
|
||||
}
|
||||
int i_43_ = (aByteArrayArrayArray142[i_10_][i_29_][i_40_] & 0xff);
|
||||
int i_44_ = (aByteArrayArrayArray130[i_10_][i_29_][i_40_] & 0xff);
|
||||
int i_43_ = (aByteArrayArrayArray142[plane][i_29_][i_40_] & 0xff);
|
||||
int i_44_ = (aByteArrayArrayArray130[plane][i_29_][i_40_] & 0xff);
|
||||
if ((i_43_ > 0) || (i_44_ > 0)) {
|
||||
int i_45_ = anIntArrayArrayArray129[i_10_][i_29_][i_40_];
|
||||
int i_46_ = (anIntArrayArrayArray129[i_10_][i_29_ + 1][i_40_]);
|
||||
int i_47_ = (anIntArrayArrayArray129[i_10_][i_29_ + 1][i_40_ + 1]);
|
||||
int i_48_ = (anIntArrayArrayArray129[i_10_][i_29_][i_40_ + 1]);
|
||||
int i_45_ = planeHeightmap[plane][i_29_][i_40_];
|
||||
int i_46_ = (planeHeightmap[plane][i_29_ + 1][i_40_]);
|
||||
int i_47_ = (planeHeightmap[plane][i_29_ + 1][i_40_ + 1]);
|
||||
int i_48_ = (planeHeightmap[plane][i_29_][i_40_ + 1]);
|
||||
int i_49_ = anIntArrayArray139[i_29_][i_40_];
|
||||
int i_50_ = anIntArrayArray139[i_29_ + 1][i_40_];
|
||||
int i_51_ = anIntArrayArray139[i_29_ + 1][i_40_ + 1];
|
||||
@@ -512,16 +525,16 @@ public class SceneBuilder {
|
||||
}
|
||||
i_54_ = method177(i_55_, i_56_, i_57_);
|
||||
}
|
||||
if (i_10_ > 0) {
|
||||
if (plane > 0) {
|
||||
boolean bool = true;
|
||||
if ((i_43_ == 0) && ((aByteArrayArrayArray136[i_10_][i_29_][i_40_]) != 0)) {
|
||||
if ((i_43_ == 0) && ((aByteArrayArrayArray136[plane][i_29_][i_40_]) != 0)) {
|
||||
bool = false;
|
||||
}
|
||||
if ((i_44_ > 0) && !(FloType.instances[i_44_ - 1].aBoolean393)) {
|
||||
bool = false;
|
||||
}
|
||||
if (bool && (i_45_ == i_46_) && (i_45_ == i_47_) && (i_45_ == i_48_)) {
|
||||
anIntArrayArrayArray135[i_10_][i_29_][i_40_] |= 0x924;
|
||||
anIntArrayArrayArray135[plane][i_29_][i_40_] |= 0x924;
|
||||
}
|
||||
}
|
||||
int i_58_ = 0;
|
||||
@@ -529,10 +542,10 @@ public class SceneBuilder {
|
||||
i_58_ = (Draw3D.palette[method187(i_54_, 96)]);
|
||||
}
|
||||
if (i_44_ == 0) {
|
||||
scene.method279(i_10_, i_29_, i_40_, 0, 0, -1, i_45_, i_46_, i_47_, i_48_, method187(i_53_, i_49_), method187(i_53_, i_50_), method187(i_53_, i_51_), method187(i_53_, i_52_), 0, 0, 0, 0, i_58_, 0);
|
||||
scene.method279(plane, i_29_, i_40_, 0, 0, -1, i_45_, i_46_, i_47_, i_48_, method187(i_53_, i_49_), method187(i_53_, i_50_), method187(i_53_, i_51_), method187(i_53_, i_52_), 0, 0, 0, 0, i_58_, 0);
|
||||
} else {
|
||||
int i_59_ = ((aByteArrayArrayArray136[i_10_][i_29_][i_40_]) + 1);
|
||||
byte i_60_ = (aByteArrayArrayArray148[i_10_][i_29_][i_40_]);
|
||||
int i_59_ = ((aByteArrayArrayArray136[plane][i_29_][i_40_]) + 1);
|
||||
byte i_60_ = (aByteArrayArrayArray148[plane][i_29_][i_40_]);
|
||||
FloType type = FloType.instances[i_44_ - 1];
|
||||
int i_61_ = type.anInt391;
|
||||
int i_62_;
|
||||
@@ -548,24 +561,24 @@ public class SceneBuilder {
|
||||
i_63_ = method177(type.anInt394, type.anInt395, type.anInt396);
|
||||
i_62_ = (Draw3D.palette[method185(type.anInt399, 96)]);
|
||||
}
|
||||
scene.method279(i_10_, i_29_, i_40_, i_59_, i_60_, i_61_, i_45_, i_46_, i_47_, i_48_, method187(i_53_, i_49_), method187(i_53_, i_50_), method187(i_53_, i_51_), method187(i_53_, i_52_), method185(i_63_, i_49_), method185(i_63_, i_50_), method185(i_63_, i_51_), method185(i_63_, i_52_), i_58_, i_62_);
|
||||
scene.method279(plane, i_29_, i_40_, i_59_, i_60_, i_61_, i_45_, i_46_, i_47_, i_48_, method187(i_53_, i_49_), method187(i_53_, i_50_), method187(i_53_, i_51_), method187(i_53_, i_52_), method185(i_63_, i_49_), method185(i_63_, i_50_), method185(i_63_, i_51_), method185(i_63_, i_52_), i_58_, i_62_);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i_64_ = 1; i_64_ < (anInt147 - 1); i_64_++) {
|
||||
for (int i_65_ = 1; i_65_ < (anInt146 - 1); i_65_++) {
|
||||
scene.method278(i_10_, i_65_, i_64_, method182(i_64_, i_10_, i_65_, 0));
|
||||
for (int stz = 1; stz < (maxTileZ - 1); stz++) {
|
||||
for (int stx = 1; stx < (maxTileX - 1); stx++) {
|
||||
scene.setDrawPlane(plane, stx, stz, getDrawPlane(plane, stx, stz));
|
||||
}
|
||||
}
|
||||
}
|
||||
scene.method305(-10, 64, -50, 768, -50);
|
||||
for (int i_66_ = 0; i_66_ < anInt146; i_66_++) {
|
||||
for (int i_67_ = 0; i_67_ < anInt147; i_67_++) {
|
||||
if ((aByteArrayArrayArray149[1][i_66_][i_67_] & 0x2) == 2) {
|
||||
scene.method276(i_67_, i_66_);
|
||||
for (int i_66_ = 0; i_66_ < maxTileX; i_66_++) {
|
||||
for (int i_67_ = 0; i_67_ < maxTileZ; i_67_++) {
|
||||
if ((planeTileFlags[1][i_66_][i_67_] & 0x2) == 2) {
|
||||
scene.setBridge(i_66_, i_67_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -579,8 +592,8 @@ public class SceneBuilder {
|
||||
i_70_ <<= 3;
|
||||
}
|
||||
for (int i_72_ = 0; i_72_ <= i_71_; i_72_++) {
|
||||
for (int i_73_ = 0; i_73_ <= anInt147; i_73_++) {
|
||||
for (int i_74_ = 0; i_74_ <= anInt146; i_74_++) {
|
||||
for (int i_73_ = 0; i_73_ <= maxTileZ; i_73_++) {
|
||||
for (int i_74_ = 0; i_74_ <= maxTileX; i_74_++) {
|
||||
if ((anIntArrayArrayArray135[i_72_][i_74_][i_73_] & i_68_) != 0) {
|
||||
int i_75_ = i_73_;
|
||||
int i_76_ = i_73_;
|
||||
@@ -591,7 +604,7 @@ public class SceneBuilder {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (/**/; i_76_ < anInt147; i_76_++) {
|
||||
for (/**/; i_76_ < maxTileZ; i_76_++) {
|
||||
if (((anIntArrayArrayArray135[i_72_][i_74_][i_76_ + 1]) & i_68_) == 0) {
|
||||
break;
|
||||
}
|
||||
@@ -615,8 +628,8 @@ public class SceneBuilder {
|
||||
int i_81_ = ((i_78_ + 1) - i_77_) * ((i_76_ - i_75_) + 1);
|
||||
if (i_81_ >= 8) {
|
||||
int i_82_ = 240;
|
||||
int i_83_ = (anIntArrayArrayArray129[i_78_][i_74_][i_75_] - i_82_);
|
||||
int i_84_ = anIntArrayArrayArray129[i_77_][i_74_][i_75_];
|
||||
int i_83_ = (planeHeightmap[i_78_][i_74_][i_75_] - i_82_);
|
||||
int i_84_ = planeHeightmap[i_77_][i_74_][i_75_];
|
||||
Scene.method277(i_71_, i_74_ * 128, i_84_, i_74_ * 128, (i_76_ * 128) + 128, i_83_, i_75_ * 128, 1);
|
||||
for (int i_85_ = i_77_; i_85_ <= i_78_; i_85_++) {
|
||||
for (int i_86_ = i_75_; i_86_ <= i_76_; i_86_++) {
|
||||
@@ -635,7 +648,7 @@ public class SceneBuilder {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (/**/; i_88_ < anInt146; i_88_++) {
|
||||
for (/**/; i_88_ < maxTileX; i_88_++) {
|
||||
if (((anIntArrayArrayArray135[i_72_][i_88_ + 1][i_73_]) & i_69_) == 0) {
|
||||
break;
|
||||
}
|
||||
@@ -659,8 +672,8 @@ public class SceneBuilder {
|
||||
int i_93_ = ((i_90_ + 1) - i_89_) * ((i_88_ - i_87_) + 1);
|
||||
if (i_93_ >= 8) {
|
||||
int i_94_ = 240;
|
||||
int i_95_ = (anIntArrayArrayArray129[i_90_][i_87_][i_73_] - i_94_);
|
||||
int i_96_ = anIntArrayArrayArray129[i_89_][i_87_][i_73_];
|
||||
int i_95_ = (planeHeightmap[i_90_][i_87_][i_73_] - i_94_);
|
||||
int i_96_ = planeHeightmap[i_89_][i_87_][i_73_];
|
||||
Scene.method277(i_71_, i_87_ * 128, i_96_, (i_88_ * 128) + 128, i_73_ * 128, i_95_, i_73_ * 128, 2);
|
||||
for (int i_97_ = i_89_; i_97_ <= i_90_; i_97_++) {
|
||||
for (int i_98_ = i_87_; i_98_ <= i_88_; i_98_++) {
|
||||
@@ -679,7 +692,7 @@ public class SceneBuilder {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (/**/; i_102_ < anInt147; i_102_++) {
|
||||
for (/**/; i_102_ < maxTileZ; i_102_++) {
|
||||
if (((anIntArrayArrayArray135[i_72_][i_74_][i_102_ + 1]) & i_70_) == 0) {
|
||||
break;
|
||||
}
|
||||
@@ -693,7 +706,7 @@ public class SceneBuilder {
|
||||
}
|
||||
}
|
||||
while_5_:
|
||||
for (/**/; i_100_ < anInt146; i_100_++) {
|
||||
for (/**/; i_100_ < maxTileX; i_100_++) {
|
||||
for (int i_104_ = i_101_; i_104_ <= i_102_; i_104_++) {
|
||||
if (((anIntArrayArrayArray135[i_72_][i_100_ + 1][i_104_]) & i_70_) == 0) {
|
||||
break while_5_;
|
||||
@@ -701,7 +714,7 @@ public class SceneBuilder {
|
||||
}
|
||||
}
|
||||
if ((((i_100_ - i_99_) + 1) * ((i_102_ - i_101_) + 1)) >= 4) {
|
||||
int i_105_ = anIntArrayArrayArray129[i_72_][i_99_][i_101_];
|
||||
int i_105_ = planeHeightmap[i_72_][i_99_][i_101_];
|
||||
Scene.method277(i_71_, i_99_ * 128, i_105_, (i_100_ * 128) + 128, (i_102_ * 128) + 128, i_105_, i_101_ * 128, 4);
|
||||
for (int i_106_ = i_99_; i_106_ <= i_100_; i_106_++) {
|
||||
for (int i_107_ = i_101_; i_107_ <= i_102_; i_107_++) {
|
||||
@@ -719,19 +732,19 @@ public class SceneBuilder {
|
||||
public void method174(int i, int i_113_, int i_115_, int i_116_) {
|
||||
for (int i_117_ = i; i_117_ <= (i + i_113_); i_117_++) {
|
||||
for (int i_118_ = i_116_; i_118_ <= (i_116_ + i_115_); i_118_++) {
|
||||
if ((i_118_ >= 0) && (i_118_ < anInt146) && (i_117_ >= 0) && (i_117_ < anInt147)) {
|
||||
if ((i_118_ >= 0) && (i_118_ < maxTileX) && (i_117_ >= 0) && (i_117_ < maxTileZ)) {
|
||||
aByteArrayArrayArray134[0][i_118_][i_117_] = (byte) 127;
|
||||
if ((i_118_ == i_116_) && (i_118_ > 0)) {
|
||||
anIntArrayArrayArray129[0][i_118_][i_117_] = anIntArrayArrayArray129[0][i_118_ - 1][i_117_];
|
||||
planeHeightmap[0][i_118_][i_117_] = planeHeightmap[0][i_118_ - 1][i_117_];
|
||||
}
|
||||
if ((i_118_ == (i_116_ + i_115_)) && (i_118_ < (anInt146 - 1))) {
|
||||
anIntArrayArrayArray129[0][i_118_][i_117_] = anIntArrayArrayArray129[0][i_118_ + 1][i_117_];
|
||||
if ((i_118_ == (i_116_ + i_115_)) && (i_118_ < (maxTileX - 1))) {
|
||||
planeHeightmap[0][i_118_][i_117_] = planeHeightmap[0][i_118_ + 1][i_117_];
|
||||
}
|
||||
if ((i_117_ == i) && (i_117_ > 0)) {
|
||||
anIntArrayArrayArray129[0][i_118_][i_117_] = anIntArrayArrayArray129[0][i_118_][i_117_ - 1];
|
||||
planeHeightmap[0][i_118_][i_117_] = planeHeightmap[0][i_118_][i_117_ - 1];
|
||||
}
|
||||
if ((i_117_ == (i + i_113_)) && (i_117_ < (anInt147 - 1))) {
|
||||
anIntArrayArrayArray129[0][i_118_][i_117_] = anIntArrayArrayArray129[0][i_118_][i_117_ + 1];
|
||||
if ((i_117_ == (i + i_113_)) && (i_117_ < (maxTileZ - 1))) {
|
||||
planeHeightmap[0][i_118_][i_117_] = planeHeightmap[0][i_118_][i_117_ + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -739,16 +752,16 @@ public class SceneBuilder {
|
||||
}
|
||||
|
||||
public void method175(int i, Scene scene, SceneCollisionMap collisionMap, int i_119_, int i_120_, int i_121_, int i_122_, boolean bool, int i_123_) {
|
||||
if (lowmem && ((aByteArrayArrayArray149[0][i_121_][i] & 0x2) == 0) && (((aByteArrayArrayArray149[i_120_][i_121_][i] & 0x10) != 0) || (method182(i, i_120_, i_121_, 0) != anInt131))) {
|
||||
if (lowmem && ((planeTileFlags[0][i_121_][i] & 0x2) == 0) && (((planeTileFlags[i_120_][i_121_][i] & 0x10) != 0) || (getDrawPlane(i_120_, i_121_, i) != anInt131))) {
|
||||
return;
|
||||
}
|
||||
if (i_120_ < anInt145) {
|
||||
anInt145 = i_120_;
|
||||
}
|
||||
int i_124_ = anIntArrayArrayArray129[i_120_][i_121_][i];
|
||||
int i_125_ = anIntArrayArrayArray129[i_120_][i_121_ + 1][i];
|
||||
int i_126_ = anIntArrayArrayArray129[i_120_][i_121_ + 1][i + 1];
|
||||
int i_127_ = anIntArrayArrayArray129[i_120_][i_121_][i + 1];
|
||||
int i_124_ = planeHeightmap[i_120_][i_121_][i];
|
||||
int i_125_ = planeHeightmap[i_120_][i_121_ + 1][i];
|
||||
int i_126_ = planeHeightmap[i_120_][i_121_ + 1][i + 1];
|
||||
int i_127_ = planeHeightmap[i_120_][i_121_][i + 1];
|
||||
int i_128_ = (i_124_ + i_125_ + i_126_ + i_127_) >> 2;
|
||||
LocType type = LocType.method572(i_122_);
|
||||
int i_129_ = i_121_ + (i << 7) + (i_122_ << 14) + 1073741824;
|
||||
@@ -765,7 +778,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, i_123_, 22, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method280(i_120_, i_128_, i, entity, i_130_, i_129_, i_121_);
|
||||
scene.addGroundDecoration(entity, i_120_, i_121_, i, i_128_, i_129_, i_130_);
|
||||
if (type.aBoolean767 && type.aBoolean778 && (collisionMap != null)) {
|
||||
collisionMap.method213(i, i_121_);
|
||||
}
|
||||
@@ -791,7 +804,7 @@ public class SceneBuilder {
|
||||
i_132_ = type.anInt744;
|
||||
i_133_ = type.anInt761;
|
||||
}
|
||||
if (scene.method284(i_129_, i_130_, i_128_, i_133_, entity, i_132_, i_120_, i_131_, i, i_121_) && type.aBoolean779) {
|
||||
if (scene.add(entity, i_120_, i_121_, i, i_128_, i_132_, i_133_, i_131_, i_129_, i_130_) && type.aBoolean779) {
|
||||
Model model;
|
||||
if (entity instanceof Model) {
|
||||
model = (Model) entity;
|
||||
@@ -823,7 +836,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, i_123_, i_119_, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method284(i_129_, i_130_, i_128_, 1, entity, 1, i_120_, 0, i, i_121_);
|
||||
scene.add(entity, i_120_, i_121_, i, i_128_, 1, 1, 0, i_129_, i_130_);
|
||||
if ((i_119_ >= 12) && (i_119_ <= 17) && (i_119_ != 13) && (i_120_ > 0)) {
|
||||
anIntArrayArrayArray135[i_120_][i_121_][i] |= 0x924;
|
||||
}
|
||||
@@ -837,7 +850,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, i_123_, 0, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray152[i_123_], entity, i_129_, i, i_130_, i_121_, null, i_128_, 0, i_120_);
|
||||
scene.addWall(WALL_TYPE_0[i_123_], entity, 0, null, i_120_, i_121_, i, i_128_, i_129_, i_130_);
|
||||
if (i_123_ == 0) {
|
||||
if (type.aBoolean779) {
|
||||
aByteArrayArrayArray134[i_120_][i_121_][i] = (byte) 50;
|
||||
@@ -875,7 +888,7 @@ public class SceneBuilder {
|
||||
collisionMap.method211(i, i_123_, i_121_, i_119_, type.aBoolean757);
|
||||
}
|
||||
if (type.anInt775 != 16) {
|
||||
scene.method290(i, type.anInt775, i_121_, i_120_);
|
||||
scene.setWallDecorationOffset(i_120_, i_121_, i, type.anInt775);
|
||||
}
|
||||
} else if (i_119_ == 1) {
|
||||
Entity entity;
|
||||
@@ -884,7 +897,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, i_123_, 1, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray140[i_123_], entity, i_129_, i, i_130_, i_121_, null, i_128_, 0, i_120_);
|
||||
scene.addWall(WALL_TYPE_1[i_123_], entity, 0, null, i_120_, i_121_, i, i_128_, i_129_, i_130_);
|
||||
if (type.aBoolean779) {
|
||||
if (i_123_ == 0) {
|
||||
aByteArrayArrayArray134[i_120_][i_121_][i + 1] = (byte) 50;
|
||||
@@ -910,7 +923,7 @@ public class SceneBuilder {
|
||||
entity = new LocEntity(i_122_, 4 + i_123_, 2, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
entity_138_ = new LocEntity(i_122_, i_137_, 2, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray152[i_123_], entity, i_129_, i, i_130_, i_121_, entity_138_, i_128_, anIntArray152[i_137_], i_120_);
|
||||
scene.addWall(WALL_TYPE_0[i_123_], entity, WALL_TYPE_0[i_137_], entity_138_, i_120_, i_121_, i, i_128_, i_129_, i_130_);
|
||||
if (type.aBoolean764) {
|
||||
if (i_123_ == 0) {
|
||||
anIntArrayArrayArray135[i_120_][i_121_][i] |= 0x249;
|
||||
@@ -930,7 +943,7 @@ public class SceneBuilder {
|
||||
collisionMap.method211(i, i_123_, i_121_, i_119_, type.aBoolean757);
|
||||
}
|
||||
if (type.anInt775 != 16) {
|
||||
scene.method290(i, type.anInt775, i_121_, i_120_);
|
||||
scene.setWallDecorationOffset(i_120_, i_121_, i, type.anInt775);
|
||||
}
|
||||
} else if (i_119_ == 3) {
|
||||
Entity entity;
|
||||
@@ -939,7 +952,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, i_123_, 3, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method282(anIntArray140[i_123_], entity, i_129_, i, i_130_, i_121_, null, i_128_, 0, i_120_);
|
||||
scene.addWall(WALL_TYPE_1[i_123_], entity, 0, null, i_120_, i_121_, i, i_128_, i_129_, i_130_);
|
||||
if (type.aBoolean779) {
|
||||
if (i_123_ == 0) {
|
||||
aByteArrayArrayArray134[i_120_][i_121_][i + 1] = (byte) 50;
|
||||
@@ -961,7 +974,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, i_123_, i_119_, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method284(i_129_, i_130_, i_128_, 1, entity, 1, i_120_, 0, i, i_121_);
|
||||
scene.add(entity, i_120_, i_121_, i, i_128_, 1, 1, 0, i_129_, i_130_);
|
||||
if (type.aBoolean767 && (collisionMap != null)) {
|
||||
collisionMap.method212(type.aBoolean757, type.anInt744, type.anInt761, i_121_, i, i_123_);
|
||||
}
|
||||
@@ -995,10 +1008,10 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, 0, 4, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method283(i_129_, i, i_123_ * 512, i_120_, 0, i_128_, entity, i_121_, i_130_, 0, anIntArray152[i_123_]);
|
||||
scene.addWallDecoration(WALL_TYPE_0[i_123_], entity, i_120_, i_121_, i, i_128_, i_123_ * 512, 0, 0, i_129_, i_130_);
|
||||
} else if (i_119_ == 5) {
|
||||
int i_142_ = 16;
|
||||
int i_143_ = scene.method300(i_120_, i_121_, i);
|
||||
int i_143_ = scene.getWallBitset(i_120_, i_121_, i);
|
||||
if (i_143_ > 0) {
|
||||
i_142_ = LocType.method572((i_143_ >> 14) & 0x7fff).anInt775;
|
||||
}
|
||||
@@ -1008,7 +1021,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, 0, 4, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method283(i_129_, i, i_123_ * 512, i_120_, anIntArray137[i_123_] * i_142_, i_128_, entity, i_121_, i_130_, anIntArray144[i_123_] * i_142_, anIntArray152[i_123_]);
|
||||
scene.addWallDecoration(WALL_TYPE_0[i_123_], entity, i_120_, i_121_, i, i_128_, i_123_ * 512, anIntArray137[i_123_] * i_142_, anIntArray144[i_123_] * i_142_, i_129_, i_130_);
|
||||
} else if (i_119_ == 6) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
@@ -1016,7 +1029,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, 0, 4, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method283(i_129_, i, i_123_, i_120_, 0, i_128_, entity, i_121_, i_130_, 0, 256);
|
||||
scene.addWallDecoration(256, entity, i_120_, i_121_, i, i_128_, i_123_, 0, 0, i_129_, i_130_);
|
||||
} else if (i_119_ == 7) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
@@ -1024,7 +1037,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, 0, 4, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method283(i_129_, i, i_123_, i_120_, 0, i_128_, entity, i_121_, i_130_, 0, 512);
|
||||
scene.addWallDecoration(512, entity, i_120_, i_121_, i, i_128_, i_123_, 0, 0, i_129_, i_130_);
|
||||
} else if (i_119_ == 8) {
|
||||
Entity entity;
|
||||
if ((type.anInt781 == -1) && (type.anIntArray759 == null)) {
|
||||
@@ -1032,7 +1045,7 @@ public class SceneBuilder {
|
||||
} else {
|
||||
entity = new LocEntity(i_122_, 0, 4, i_125_, i_126_, i_124_, i_127_, type.anInt781, true);
|
||||
}
|
||||
scene.method283(i_129_, i, i_123_, i_120_, 0, i_128_, entity, i_121_, i_130_, 0, 768);
|
||||
scene.addWallDecoration(768, entity, i_120_, i_121_, i, i_128_, i_123_, 0, 0, i_129_, i_130_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1058,7 +1071,7 @@ public class SceneBuilder {
|
||||
for (int i_169_ = 0; i_169_ < 8; i_169_++) {
|
||||
for (int i_170_ = 0; i_170_ < 8; i_170_++) {
|
||||
if (((i_164_ + i_169_) > 0) && ((i_164_ + i_169_) < 103) && ((i_168_ + i_170_) > 0) && ((i_168_ + i_170_) < 103)) {
|
||||
collisionMaps[i_167_].anIntArrayArray294[i_164_ + i_169_][(i_168_ + i_170_)] &= ~0x1000000;
|
||||
collisionMaps[i_167_].flags[i_164_ + i_169_][(i_168_ + i_170_)] &= ~0x1000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1081,7 +1094,7 @@ public class SceneBuilder {
|
||||
for (int i_180_ = 0; i_180_ < 64; i_180_++) {
|
||||
for (int i_181_ = 0; i_181_ < 64; i_181_++) {
|
||||
if (((i_175_ + i_180_) > 0) && ((i_175_ + i_180_) < 103) && ((i + i_181_) > 0) && ((i + i_181_) < 103)) {
|
||||
collisionMaps[i_179_].anIntArrayArray294[i_175_ + i_180_][i + i_181_] &= ~0x1000000;
|
||||
collisionMaps[i_179_].flags[i_175_ + i_180_][i + i_181_] &= ~0x1000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1098,14 +1111,14 @@ public class SceneBuilder {
|
||||
|
||||
public void method181(int i, int i_185_, Buffer buffer, int i_186_, int i_187_, int i_188_, int i_190_) {
|
||||
if ((i_186_ >= 0) && (i_186_ < 104) && (i >= 0) && (i < 104)) {
|
||||
aByteArrayArrayArray149[i_187_][i_186_][i] = (byte) 0;
|
||||
planeTileFlags[i_187_][i_186_][i] = (byte) 0;
|
||||
for (; ; ) {
|
||||
int i_191_ = buffer.get1U();
|
||||
if (i_191_ == 0) {
|
||||
if (i_187_ == 0) {
|
||||
anIntArrayArrayArray129[0][i_186_][i] = -method172(932731 + i_186_ + i_190_, 556238 + i + i_185_) * 8;
|
||||
planeHeightmap[0][i_186_][i] = -method172(932731 + i_186_ + i_190_, 556238 + i + i_185_) * 8;
|
||||
} else {
|
||||
anIntArrayArrayArray129[i_187_][i_186_][i] = anIntArrayArrayArray129[i_187_ - 1][i_186_][i] - 240;
|
||||
planeHeightmap[i_187_][i_186_][i] = planeHeightmap[i_187_ - 1][i_186_][i] - 240;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -1116,9 +1129,9 @@ public class SceneBuilder {
|
||||
i_192_ = 0;
|
||||
}
|
||||
if (i_187_ == 0) {
|
||||
anIntArrayArrayArray129[0][i_186_][i] = -i_192_ * 8;
|
||||
planeHeightmap[0][i_186_][i] = -i_192_ * 8;
|
||||
} else {
|
||||
anIntArrayArrayArray129[i_187_][i_186_][i] = (anIntArrayArrayArray129[i_187_ - 1][i_186_][i] - (i_192_ * 8));
|
||||
planeHeightmap[i_187_][i_186_][i] = (planeHeightmap[i_187_ - 1][i_186_][i] - (i_192_ * 8));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -1128,7 +1141,7 @@ public class SceneBuilder {
|
||||
aByteArrayArrayArray136[i_187_][i_186_][i] = (byte) ((i_191_ - 2) / 4);
|
||||
aByteArrayArrayArray148[i_187_][i_186_][i] = (byte) (((i_191_ - 2) + i_188_) & 0x3);
|
||||
} else if (i_191_ <= 81) {
|
||||
aByteArrayArrayArray149[i_187_][i_186_][i] = (byte) (i_191_ - 49);
|
||||
planeTileFlags[i_187_][i_186_][i] = (byte) (i_191_ - 49);
|
||||
} else {
|
||||
aByteArrayArrayArray142[i_187_][i_186_][i] = (byte) (i_191_ - 81);
|
||||
}
|
||||
@@ -1150,17 +1163,14 @@ public class SceneBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
public int method182(int i, int i_194_, int i_195_, int i_196_) {
|
||||
if (i_196_ != 0) {
|
||||
return 2;
|
||||
}
|
||||
if ((aByteArrayArrayArray149[i_194_][i_195_][i] & 0x8) != 0) {
|
||||
public int getDrawPlane(int plane, int stx, int stz) {
|
||||
if ((planeTileFlags[plane][stx][stz] & 0x8) != 0) {
|
||||
return 0;
|
||||
}
|
||||
if ((i_194_ > 0) && ((aByteArrayArrayArray149[1][i_195_][i] & 0x2) != 0)) {
|
||||
return i_194_ - 1;
|
||||
if ((plane > 0) && ((planeTileFlags[1][stx][stz] & 0x2) != 0)) {
|
||||
return plane - 1;
|
||||
}
|
||||
return i_194_;
|
||||
return plane;
|
||||
}
|
||||
|
||||
public void method183(SceneCollisionMap[] collisionMaps, Scene scene, int i, int i_197_, int i_198_, int i_199_, byte[] is, int i_200_, int i_201_, int i_202_) {
|
||||
@@ -1191,7 +1201,7 @@ public class SceneBuilder {
|
||||
int i_214_ = i_202_ + ZoneUtil.method158(i_207_ & 0x7, type.anInt761, i_201_, type.anInt744, i_208_ & 0x7);
|
||||
if ((i_213_ > 0) && (i_214_ > 0) && (i_213_ < 103) && (i_214_ < 103)) {
|
||||
int i_215_ = i_209_;
|
||||
if ((aByteArrayArrayArray149[1][i_213_][i_214_] & 0x2) == 2) {
|
||||
if ((planeTileFlags[1][i_213_][i_214_] & 0x2) == 2) {
|
||||
i_215_--;
|
||||
}
|
||||
SceneCollisionMap collisionMap = null;
|
||||
@@ -1253,7 +1263,7 @@ public class SceneBuilder {
|
||||
int i_276_ = i_269_ + i_263_;
|
||||
if ((i_275_ > 0) && (i_276_ > 0) && (i_275_ < 103) && (i_276_ < 103)) {
|
||||
int i_277_ = i_271_;
|
||||
if ((aByteArrayArrayArray149[1][i_275_][i_276_] & 0x2) == 2) {
|
||||
if ((planeTileFlags[1][i_275_][i_276_] & 0x2) == 2) {
|
||||
i_277_--;
|
||||
}
|
||||
SceneCollisionMap collisionMap = null;
|
||||
|
||||
@@ -8,12 +8,12 @@ public class SceneCollisionMap {
|
||||
public final int anInt291 = 0;
|
||||
public final int anInt292;
|
||||
public final int anInt293;
|
||||
public final int[][] anIntArrayArray294;
|
||||
public final int[][] flags;
|
||||
|
||||
public SceneCollisionMap(int i, int j) {
|
||||
anInt292 = i;
|
||||
anInt293 = j;
|
||||
anIntArrayArray294 = new int[anInt292][anInt293];
|
||||
flags = new int[anInt292][anInt293];
|
||||
method210();
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ public class SceneCollisionMap {
|
||||
for (int i = 0; i < anInt292; i++) {
|
||||
for (int j = 0; j < anInt293; j++) {
|
||||
if ((i == 0) || (j == 0) || (i == (anInt292 - 1)) || (j == (anInt293 - 1))) {
|
||||
anIntArrayArray294[i][j] = 0xffffff;
|
||||
flags[i][j] = 0xffffff;
|
||||
} else {
|
||||
anIntArrayArray294[i][j] = 0x1000000;
|
||||
flags[i][j] = 0x1000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,11 +178,11 @@ public class SceneCollisionMap {
|
||||
public void method213(int i, int k) {
|
||||
k -= anInt290;
|
||||
i -= anInt291;
|
||||
anIntArrayArray294[k][i] |= 0x200000;
|
||||
flags[k][i] |= 0x200000;
|
||||
}
|
||||
|
||||
public void method214(int i, int j, int k) {
|
||||
anIntArrayArray294[i][j] |= k;
|
||||
flags[i][j] |= k;
|
||||
}
|
||||
|
||||
public void method215(int i, int j, boolean flag, int k, int l) {
|
||||
@@ -332,13 +332,13 @@ public class SceneCollisionMap {
|
||||
}
|
||||
|
||||
public void method217(int i, int j, int k) {
|
||||
anIntArrayArray294[j][k] &= 0xffffff - i;
|
||||
flags[j][k] &= 0xffffff - i;
|
||||
}
|
||||
|
||||
public void method218(int j, int k) {
|
||||
k -= anInt290;
|
||||
j -= anInt291;
|
||||
anIntArrayArray294[k][j] &= 0xdfffff;
|
||||
flags[k][j] &= 0xdfffff;
|
||||
}
|
||||
|
||||
public boolean method219(int i, int j, int k, int i1, int j1, int k1) {
|
||||
@@ -354,40 +354,40 @@ public class SceneCollisionMap {
|
||||
if ((j == (i - 1)) && (k == k1)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 + 1)) && ((anIntArrayArray294[j][k] & 0x1280120) == 0)) {
|
||||
if ((j == i) && (k == (k1 + 1)) && ((flags[j][k] & 0x1280120) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 - 1)) && ((anIntArrayArray294[j][k] & 0x1280102) == 0)) {
|
||||
if ((j == i) && (k == (k1 - 1)) && ((flags[j][k] & 0x1280102) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 1) {
|
||||
if ((j == i) && (k == (k1 + 1))) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i - 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280108) == 0)) {
|
||||
if ((j == (i - 1)) && (k == k1) && ((flags[j][k] & 0x1280108) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i + 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280180) == 0)) {
|
||||
if ((j == (i + 1)) && (k == k1) && ((flags[j][k] & 0x1280180) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 2) {
|
||||
if ((j == (i + 1)) && (k == k1)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 + 1)) && ((anIntArrayArray294[j][k] & 0x1280120) == 0)) {
|
||||
if ((j == i) && (k == (k1 + 1)) && ((flags[j][k] & 0x1280120) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 - 1)) && ((anIntArrayArray294[j][k] & 0x1280102) == 0)) {
|
||||
if ((j == i) && (k == (k1 - 1)) && ((flags[j][k] & 0x1280102) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 3) {
|
||||
if ((j == i) && (k == (k1 - 1))) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i - 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280108) == 0)) {
|
||||
if ((j == (i - 1)) && (k == k1) && ((flags[j][k] & 0x1280108) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i + 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280180) == 0)) {
|
||||
if ((j == (i + 1)) && (k == k1) && ((flags[j][k] & 0x1280180) == 0)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -400,14 +400,14 @@ public class SceneCollisionMap {
|
||||
if ((j == i) && (k == (k1 + 1))) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i + 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280180) == 0)) {
|
||||
if ((j == (i + 1)) && (k == k1) && ((flags[j][k] & 0x1280180) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 - 1)) && ((anIntArrayArray294[j][k] & 0x1280102) == 0)) {
|
||||
if ((j == i) && (k == (k1 - 1)) && ((flags[j][k] & 0x1280102) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 1) {
|
||||
if ((j == (i - 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280108) == 0)) {
|
||||
if ((j == (i - 1)) && (k == k1) && ((flags[j][k] & 0x1280108) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 + 1))) {
|
||||
@@ -416,14 +416,14 @@ public class SceneCollisionMap {
|
||||
if ((j == (i + 1)) && (k == k1)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 - 1)) && ((anIntArrayArray294[j][k] & 0x1280102) == 0)) {
|
||||
if ((j == i) && (k == (k1 - 1)) && ((flags[j][k] & 0x1280102) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 2) {
|
||||
if ((j == (i - 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280108) == 0)) {
|
||||
if ((j == (i - 1)) && (k == k1) && ((flags[j][k] & 0x1280108) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 + 1)) && ((anIntArrayArray294[j][k] & 0x1280120) == 0)) {
|
||||
if ((j == i) && (k == (k1 + 1)) && ((flags[j][k] & 0x1280120) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i + 1)) && (k == k1)) {
|
||||
@@ -436,10 +436,10 @@ public class SceneCollisionMap {
|
||||
if ((j == (i - 1)) && (k == k1)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 + 1)) && ((anIntArrayArray294[j][k] & 0x1280120) == 0)) {
|
||||
if ((j == i) && (k == (k1 + 1)) && ((flags[j][k] & 0x1280120) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i + 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x1280180) == 0)) {
|
||||
if ((j == (i + 1)) && (k == k1) && ((flags[j][k] & 0x1280180) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 - 1))) {
|
||||
@@ -448,16 +448,16 @@ public class SceneCollisionMap {
|
||||
}
|
||||
}
|
||||
if (j1 == 9) {
|
||||
if ((j == i) && (k == (k1 + 1)) && ((anIntArrayArray294[j][k] & 0x20) == 0)) {
|
||||
if ((j == i) && (k == (k1 + 1)) && ((flags[j][k] & 0x20) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == i) && (k == (k1 - 1)) && ((anIntArrayArray294[j][k] & 2) == 0)) {
|
||||
if ((j == i) && (k == (k1 - 1)) && ((flags[j][k] & 2) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j == (i - 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 8) == 0)) {
|
||||
if ((j == (i - 1)) && (k == k1) && ((flags[j][k] & 8) == 0)) {
|
||||
return true;
|
||||
}
|
||||
return (j == (i + 1)) && (k == k1) && ((anIntArrayArray294[j][k] & 0x80) == 0);
|
||||
return (j == (i + 1)) && (k == k1) && ((flags[j][k] & 0x80) == 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -475,46 +475,46 @@ public class SceneCollisionMap {
|
||||
i1 = (i1 + 2) & 3;
|
||||
}
|
||||
if (i1 == 0) {
|
||||
if ((j1 == (i + 1)) && (k == j) && ((anIntArrayArray294[j1][k] & 0x80) == 0)) {
|
||||
if ((j1 == (i + 1)) && (k == j) && ((flags[j1][k] & 0x80) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j1 == i) && (k == (j - 1)) && ((anIntArrayArray294[j1][k] & 2) == 0)) {
|
||||
if ((j1 == i) && (k == (j - 1)) && ((flags[j1][k] & 2) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 1) {
|
||||
if ((j1 == (i - 1)) && (k == j) && ((anIntArrayArray294[j1][k] & 8) == 0)) {
|
||||
if ((j1 == (i - 1)) && (k == j) && ((flags[j1][k] & 8) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j1 == i) && (k == (j - 1)) && ((anIntArrayArray294[j1][k] & 2) == 0)) {
|
||||
if ((j1 == i) && (k == (j - 1)) && ((flags[j1][k] & 2) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 2) {
|
||||
if ((j1 == (i - 1)) && (k == j) && ((anIntArrayArray294[j1][k] & 8) == 0)) {
|
||||
if ((j1 == (i - 1)) && (k == j) && ((flags[j1][k] & 8) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j1 == i) && (k == (j + 1)) && ((anIntArrayArray294[j1][k] & 0x20) == 0)) {
|
||||
if ((j1 == i) && (k == (j + 1)) && ((flags[j1][k] & 0x20) == 0)) {
|
||||
return true;
|
||||
}
|
||||
} else if (i1 == 3) {
|
||||
if ((j1 == (i + 1)) && (k == j) && ((anIntArrayArray294[j1][k] & 0x80) == 0)) {
|
||||
if ((j1 == (i + 1)) && (k == j) && ((flags[j1][k] & 0x80) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j1 == i) && (k == (j + 1)) && ((anIntArrayArray294[j1][k] & 0x20) == 0)) {
|
||||
if ((j1 == i) && (k == (j + 1)) && ((flags[j1][k] & 0x20) == 0)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (l == 8) {
|
||||
if ((j1 == i) && (k == (j + 1)) && ((anIntArrayArray294[j1][k] & 0x20) == 0)) {
|
||||
if ((j1 == i) && (k == (j + 1)) && ((flags[j1][k] & 0x20) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j1 == i) && (k == (j - 1)) && ((anIntArrayArray294[j1][k] & 2) == 0)) {
|
||||
if ((j1 == i) && (k == (j - 1)) && ((flags[j1][k] & 2) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((j1 == (i - 1)) && (k == j) && ((anIntArrayArray294[j1][k] & 8) == 0)) {
|
||||
if ((j1 == (i - 1)) && (k == j) && ((flags[j1][k] & 8) == 0)) {
|
||||
return true;
|
||||
}
|
||||
return (j1 == (i + 1)) && (k == j) && ((anIntArrayArray294[j1][k] & 0x80) == 0);
|
||||
return (j1 == (i + 1)) && (k == j) && ((flags[j1][k] & 0x80) == 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -525,16 +525,16 @@ public class SceneCollisionMap {
|
||||
if ((k >= j) && (k <= l1) && (k1 >= i) && (k1 <= i2)) {
|
||||
return true;
|
||||
}
|
||||
if ((k == (j - 1)) && (k1 >= i) && (k1 <= i2) && ((anIntArrayArray294[k - anInt290][k1 - anInt291] & 8) == 0) && ((i1 & 8) == 0)) {
|
||||
if ((k == (j - 1)) && (k1 >= i) && (k1 <= i2) && ((flags[k - anInt290][k1 - anInt291] & 8) == 0) && ((i1 & 8) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((k == (l1 + 1)) && (k1 >= i) && (k1 <= i2) && ((anIntArrayArray294[k - anInt290][k1 - anInt291] & 0x80) == 0) && ((i1 & 2) == 0)) {
|
||||
if ((k == (l1 + 1)) && (k1 >= i) && (k1 <= i2) && ((flags[k - anInt290][k1 - anInt291] & 0x80) == 0) && ((i1 & 2) == 0)) {
|
||||
return true;
|
||||
}
|
||||
if ((k1 == (i - 1)) && (k >= j) && (k <= l1) && ((anIntArrayArray294[k - anInt290][k1 - anInt291] & 2) == 0) && ((i1 & 4) == 0)) {
|
||||
if ((k1 == (i - 1)) && (k >= j) && (k <= l1) && ((flags[k - anInt290][k1 - anInt291] & 2) == 0) && ((i1 & 4) == 0)) {
|
||||
return true;
|
||||
}
|
||||
return (k1 == (i2 + 1)) && (k >= j) && (k <= l1) && ((anIntArrayArray294[k - anInt290][k1 - anInt291] & 0x20) == 0) && ((i1 & 1) == 0);
|
||||
return (k1 == (i2 + 1)) && (k >= j) && (k <= l1) && ((flags[k - anInt290][k1 - anInt291] & 0x20) == 0) && ((i1 & 1) == 0);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
public class SceneGroundDecoration {
|
||||
|
||||
public int anInt811;
|
||||
public int anInt812;
|
||||
public int anInt813;
|
||||
public Entity aEntity_814;
|
||||
public int anInt815;
|
||||
public byte aByte816;
|
||||
public int y;
|
||||
public int x;
|
||||
public int z;
|
||||
public Entity entity;
|
||||
public int bitset;
|
||||
public byte info;
|
||||
|
||||
public SceneGroundDecoration() {
|
||||
}
|
||||
|
||||
+14
-14
@@ -4,20 +4,20 @@
|
||||
|
||||
public class SceneLoc {
|
||||
|
||||
public int anInt517;
|
||||
public int anInt518;
|
||||
public int anInt519;
|
||||
public int anInt520;
|
||||
public Entity aEntity_521;
|
||||
public int anInt522;
|
||||
public int anInt523;
|
||||
public int anInt524;
|
||||
public int anInt525;
|
||||
public int anInt526;
|
||||
public int anInt527;
|
||||
public int anInt528;
|
||||
public int anInt529;
|
||||
public byte aByte530;
|
||||
public int plane;
|
||||
public int y;
|
||||
public int x;
|
||||
public int z;
|
||||
public Entity entity;
|
||||
public int yaw;
|
||||
public int minSceneTileX;
|
||||
public int maxSceneTileX;
|
||||
public int minSceneTileZ;
|
||||
public int maxSceneTileZ;
|
||||
public int distance;
|
||||
public int cycle;
|
||||
public int bitset;
|
||||
public byte info;
|
||||
|
||||
public SceneLoc() {
|
||||
}
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
|
||||
public class SceneObjStack {
|
||||
|
||||
public int anInt45;
|
||||
public int anInt46;
|
||||
public int anInt47;
|
||||
public Entity aEntity_48;
|
||||
public Entity aEntity_49;
|
||||
public Entity aEntity_50;
|
||||
public int anInt51;
|
||||
public int anInt52;
|
||||
public int y;
|
||||
public int x;
|
||||
public int z;
|
||||
public Entity entity0;
|
||||
public Entity entity1;
|
||||
public Entity entity2;
|
||||
public int bitset;
|
||||
public int offset;
|
||||
|
||||
public SceneObjStack() {
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class SceneOccluder {
|
||||
public int anInt795;
|
||||
public int anInt796;
|
||||
public int anInt797;
|
||||
public int anInt798;
|
||||
public int mode;
|
||||
public int anInt799;
|
||||
public int anInt800;
|
||||
public int anInt801;
|
||||
|
||||
@@ -7,18 +7,18 @@ public class SceneTile extends DoublyLinkedList.Node {
|
||||
public final int anInt1308;
|
||||
public final int anInt1309;
|
||||
public final int anInt1310;
|
||||
public final SceneLoc[] aLocArray1318 = new SceneLoc[5];
|
||||
public final int[] anIntArray1319 = new int[5];
|
||||
public final SceneLoc[] locs = new SceneLoc[5];
|
||||
public final int[] locFlags = new int[5];
|
||||
public int anInt1307;
|
||||
public SceneTileUnderlay aUnderlay_1311;
|
||||
public SceneTileOverlay aOverlay_1312;
|
||||
public SceneWall aWall_1313;
|
||||
public SceneWallDecoration aWallDecoration_1314;
|
||||
public SceneGroundDecoration aGroundDecoration_1315;
|
||||
public SceneObjStack aObjStack_1316;
|
||||
public int anInt1317;
|
||||
public int anInt1320;
|
||||
public int anInt1321;
|
||||
public SceneTileUnderlay underlay;
|
||||
public SceneTileOverlay overlay;
|
||||
public SceneWall wall;
|
||||
public SceneWallDecoration wallDecoration;
|
||||
public SceneGroundDecoration groundDecoration;
|
||||
public SceneObjStack objStack;
|
||||
public int locCount;
|
||||
public int flags;
|
||||
public int drawPlane;
|
||||
public boolean aBoolean1322;
|
||||
public boolean aBoolean1323;
|
||||
public boolean aBoolean1324;
|
||||
@@ -26,7 +26,7 @@ public class SceneTile extends DoublyLinkedList.Node {
|
||||
public int anInt1326;
|
||||
public int anInt1327;
|
||||
public int anInt1328;
|
||||
public SceneTile aTile_1329;
|
||||
public SceneTile bridge;
|
||||
|
||||
public SceneTile(int i, int j, int k) {
|
||||
anInt1310 = anInt1307 = i;
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
|
||||
public class SceneWall {
|
||||
|
||||
public int anInt273;
|
||||
public int anInt274;
|
||||
public int anInt275;
|
||||
public int anInt276;
|
||||
public int anInt277;
|
||||
public Entity aEntity_278;
|
||||
public Entity aEntity_279;
|
||||
public int anInt280;
|
||||
public byte aByte281;
|
||||
public int y;
|
||||
public int x;
|
||||
public int z;
|
||||
public int type0;
|
||||
public int type1;
|
||||
public Entity entity0;
|
||||
public Entity entity1;
|
||||
public int bitset;
|
||||
public byte info;
|
||||
|
||||
public SceneWall() {
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
// 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 SceneWallDecoration {
|
||||
|
||||
public int anInt499;
|
||||
public int anInt500;
|
||||
public int anInt501;
|
||||
public int anInt502;
|
||||
public int anInt503;
|
||||
public Entity aEntity_504;
|
||||
public int anInt505;
|
||||
public byte aByte506;
|
||||
public int y;
|
||||
public int x;
|
||||
public int z;
|
||||
public int type;
|
||||
public int yaw;
|
||||
public Entity entity;
|
||||
public int bitset;
|
||||
public byte info;
|
||||
|
||||
public SceneWallDecoration() {
|
||||
}
|
||||
|
||||
+60
-54
@@ -6,26 +6,29 @@ import java.io.IOException;
|
||||
|
||||
public class SeqType {
|
||||
|
||||
public static int anInt350;
|
||||
public static int count;
|
||||
public static SeqType[] instances;
|
||||
|
||||
public static void unpack(FileArchive archive) throws IOException {
|
||||
Buffer buffer = new Buffer(archive.read("seq.dat"));
|
||||
anInt350 = buffer.get2U();
|
||||
count = buffer.get2U();
|
||||
|
||||
if (instances == null) {
|
||||
instances = new SeqType[anInt350];
|
||||
instances = new SeqType[count];
|
||||
}
|
||||
for (int j = 0; j < anInt350; j++) {
|
||||
if (instances[j] == null) {
|
||||
instances[j] = new SeqType();
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (instances[i] == null) {
|
||||
instances[i] = new SeqType();
|
||||
}
|
||||
instances[j].method259(buffer);
|
||||
instances[i].load(buffer);
|
||||
}
|
||||
}
|
||||
public int anInt352;
|
||||
public int[] anIntArray353;
|
||||
public int[] anIntArray354;
|
||||
public int[] anIntArray355;
|
||||
|
||||
public int frameCount;
|
||||
public int[] primaryFrames;
|
||||
public int[] secondaryFrames;
|
||||
public int[] frameDelays;
|
||||
public int anInt356 = -1;
|
||||
public int[] anIntArray357;
|
||||
public boolean aBoolean358 = false;
|
||||
@@ -41,79 +44,81 @@ public class SeqType {
|
||||
public SeqType() {
|
||||
}
|
||||
|
||||
public int method258(int i) {
|
||||
int j = anIntArray355[i];
|
||||
if (j == 0) {
|
||||
SeqFrame transform = SeqFrame.get(anIntArray353[i]);
|
||||
public int getFrameDelay(int frame) {
|
||||
int delay = frameDelays[frame];
|
||||
if (delay == 0) {
|
||||
SeqFrame transform = SeqFrame.get(primaryFrames[frame]);
|
||||
|
||||
if (transform != null) {
|
||||
j = anIntArray355[i] = transform.delay;
|
||||
delay = frameDelays[frame] = transform.delay;
|
||||
}
|
||||
}
|
||||
if (j == 0) {
|
||||
j = 1;
|
||||
if (delay == 0) {
|
||||
delay = 1;
|
||||
}
|
||||
return j;
|
||||
return delay;
|
||||
}
|
||||
|
||||
public void method259(Buffer buffer) {
|
||||
public void load(Buffer buffer) {
|
||||
do {
|
||||
int i = buffer.get1U();
|
||||
if (i == 0) {
|
||||
int op = buffer.get1U();
|
||||
if (op == 0) {
|
||||
break;
|
||||
}
|
||||
if (i == 1) {
|
||||
anInt352 = buffer.get1U();
|
||||
anIntArray353 = new int[anInt352];
|
||||
anIntArray354 = new int[anInt352];
|
||||
anIntArray355 = new int[anInt352];
|
||||
for (int j = 0; j < anInt352; j++) {
|
||||
anIntArray353[j] = buffer.get2U();
|
||||
anIntArray354[j] = buffer.get2U();
|
||||
if (anIntArray354[j] == 65535) {
|
||||
anIntArray354[j] = -1;
|
||||
} else if (op == 1) {
|
||||
frameCount = buffer.get1U();
|
||||
primaryFrames = new int[frameCount];
|
||||
secondaryFrames = new int[frameCount];
|
||||
frameDelays = new int[frameCount];
|
||||
for (int j = 0; j < frameCount; j++) {
|
||||
primaryFrames[j] = buffer.get2U();
|
||||
secondaryFrames[j] = buffer.get2U();
|
||||
if (secondaryFrames[j] == 65535) {
|
||||
secondaryFrames[j] = -1;
|
||||
}
|
||||
anIntArray355[j] = buffer.get2U();
|
||||
frameDelays[j] = buffer.get2U();
|
||||
}
|
||||
} else if (i == 2) {
|
||||
} else if (op == 2) {
|
||||
anInt356 = buffer.get2U();
|
||||
} else if (i == 3) {
|
||||
} else if (op == 3) {
|
||||
int k = buffer.get1U();
|
||||
anIntArray357 = new int[k + 1];
|
||||
for (int l = 0; l < k; l++) {
|
||||
anIntArray357[l] = buffer.get1U();
|
||||
}
|
||||
anIntArray357[k] = 9999999;
|
||||
} else if (i == 4) {
|
||||
} else if (op == 4) {
|
||||
aBoolean358 = true;
|
||||
} else if (i == 5) {
|
||||
} else if (op == 5) {
|
||||
anInt359 = buffer.get1U();
|
||||
} else if (i == 6) {
|
||||
} else if (op == 6) {
|
||||
anInt360 = buffer.get2U();
|
||||
} else if (i == 7) {
|
||||
} else if (op == 7) {
|
||||
anInt361 = buffer.get2U();
|
||||
} else if (i == 8) {
|
||||
} else if (op == 8) {
|
||||
anInt362 = buffer.get1U();
|
||||
} else if (i == 9) {
|
||||
} else if (op == 9) {
|
||||
anInt363 = buffer.get1U();
|
||||
} else if (i == 10) {
|
||||
} else if (op == 10) {
|
||||
anInt364 = buffer.get1U();
|
||||
} else if (i == 11) {
|
||||
} else if (op == 11) {
|
||||
anInt365 = buffer.get1U();
|
||||
} else if (i == 12) {
|
||||
} else if (op == 12) {
|
||||
unusedInt = buffer.get4();
|
||||
} else {
|
||||
System.out.println("Error unrecognised seq config code: " + i);
|
||||
System.out.println("Error unrecognised seq config code: " + op);
|
||||
}
|
||||
} while (true);
|
||||
if (anInt352 == 0) {
|
||||
anInt352 = 1;
|
||||
anIntArray353 = new int[1];
|
||||
anIntArray353[0] = -1;
|
||||
anIntArray354 = new int[1];
|
||||
anIntArray354[0] = -1;
|
||||
anIntArray355 = new int[1];
|
||||
anIntArray355[0] = -1;
|
||||
|
||||
if (frameCount == 0) {
|
||||
frameCount = 1;
|
||||
primaryFrames = new int[1];
|
||||
primaryFrames[0] = -1;
|
||||
secondaryFrames = new int[1];
|
||||
secondaryFrames[0] = -1;
|
||||
frameDelays = new int[1];
|
||||
frameDelays[0] = -1;
|
||||
}
|
||||
|
||||
if (anInt363 == -1) {
|
||||
if (anIntArray357 != null) {
|
||||
anInt363 = 2;
|
||||
@@ -121,6 +126,7 @@ public class SeqType {
|
||||
anInt363 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (anInt364 == -1) {
|
||||
if (anIntArray357 != null) {
|
||||
anInt364 = 2;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SpotAnimEntity extends Entity {
|
||||
if (model == null) {
|
||||
return null;
|
||||
}
|
||||
int j = aType_1568.aType_407.anIntArray353[anInt1569];
|
||||
int j = aType_1568.seq.primaryFrames[anInt1569];
|
||||
Model model_1 = new Model(true, SeqFrame.isNull(j), false, model);
|
||||
if (!aBoolean1567) {
|
||||
model_1.createLabelReferences();
|
||||
@@ -59,10 +59,10 @@ public class SpotAnimEntity extends Entity {
|
||||
}
|
||||
|
||||
public void method454(int i) {
|
||||
for (anInt1570 += i; anInt1570 > aType_1568.aType_407.method258(anInt1569); ) {
|
||||
anInt1570 -= aType_1568.aType_407.method258(anInt1569) + 1;
|
||||
for (anInt1570 += i; anInt1570 > aType_1568.seq.getFrameDelay(anInt1569); ) {
|
||||
anInt1570 -= aType_1568.seq.getFrameDelay(anInt1569) + 1;
|
||||
anInt1569++;
|
||||
if ((anInt1569 >= aType_1568.aType_407.anInt352) && ((anInt1569 < 0) || (anInt1569 >= aType_1568.aType_407.anInt352))) {
|
||||
if ((anInt1569 >= aType_1568.seq.frameCount) && ((anInt1569 < 0) || (anInt1569 >= aType_1568.seq.frameCount))) {
|
||||
anInt1569 = 0;
|
||||
aBoolean1567 = true;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SpotAnimType {
|
||||
public int anInt404;
|
||||
public int anInt405;
|
||||
public int anInt406 = -1;
|
||||
public SeqType aType_407;
|
||||
public SeqType seq;
|
||||
public int anInt410 = 128;
|
||||
public int anInt411 = 128;
|
||||
public int anInt412;
|
||||
@@ -52,7 +52,7 @@ public class SpotAnimType {
|
||||
} else if (i == 2) {
|
||||
anInt406 = buffer.get2U();
|
||||
if (SeqType.instances != null) {
|
||||
aType_407 = SeqType.instances[anInt406];
|
||||
seq = SeqType.instances[anInt406];
|
||||
}
|
||||
} else if (i == 4) {
|
||||
anInt410 = buffer.get2U();
|
||||
|
||||
@@ -6,59 +6,66 @@ import java.io.IOException;
|
||||
|
||||
public class VarbitType {
|
||||
|
||||
public static int anInt645;
|
||||
public static VarbitType[] aVarbitArray646;
|
||||
public static VarbitType[] instances;
|
||||
|
||||
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];
|
||||
int count = buffer.get2U();
|
||||
|
||||
if (instances == null) {
|
||||
instances = new VarbitType[count];
|
||||
}
|
||||
for (int j = 0; j < anInt645; j++) {
|
||||
if (aVarbitArray646[j] == null) {
|
||||
aVarbitArray646[j] = new VarbitType();
|
||||
|
||||
for (int j = 0; j < count; j++) {
|
||||
if (instances[j] == null) {
|
||||
instances[j] = new VarbitType();
|
||||
}
|
||||
aVarbitArray646[j].method534(buffer);
|
||||
if (aVarbitArray646[j].aBoolean651) {
|
||||
VarpType.instances[aVarbitArray646[j].anInt648].unusedBool3 = true;
|
||||
instances[j].read(buffer);
|
||||
if (instances[j].unusedBool) {
|
||||
VarpType.instances[instances[j].varp].unusedBool3 = true;
|
||||
}
|
||||
}
|
||||
if (buffer.position != buffer.data.length) {
|
||||
System.out.println("varbit load mismatch");
|
||||
}
|
||||
}
|
||||
|
||||
public String unusedString;
|
||||
public int anInt648;
|
||||
public int anInt649;
|
||||
public int anInt650;
|
||||
public boolean aBoolean651 = false;
|
||||
public int varp;
|
||||
/**
|
||||
* The least significant bit.
|
||||
*/
|
||||
public int lsb;
|
||||
/**
|
||||
* The most significant bit.
|
||||
*/
|
||||
public int msb;
|
||||
public boolean unusedBool = false;
|
||||
public int unusedInt0 = -1;
|
||||
public int unusedInt1;
|
||||
|
||||
public VarbitType() {
|
||||
}
|
||||
|
||||
public void method534(Buffer buffer) {
|
||||
public void read(Buffer buffer) {
|
||||
do {
|
||||
int j = buffer.get1U();
|
||||
if (j == 0) {
|
||||
int op = buffer.get1U();
|
||||
if (op == 0) {
|
||||
return;
|
||||
}
|
||||
if (j == 1) {
|
||||
anInt648 = buffer.get2U();
|
||||
anInt649 = buffer.get1U();
|
||||
anInt650 = buffer.get1U();
|
||||
} else if (j == 10) {
|
||||
} else if (op == 1) {
|
||||
varp = buffer.get2U();
|
||||
lsb = buffer.get1U();
|
||||
msb = buffer.get1U();
|
||||
} else if (op == 10) {
|
||||
unusedString = buffer.getString();
|
||||
} else if (j == 2) {
|
||||
aBoolean651 = true;
|
||||
} else if (j == 3) {
|
||||
} else if (op == 2) {
|
||||
unusedBool = true;
|
||||
} else if (op == 3) {
|
||||
unusedInt0 = buffer.get4();
|
||||
} else if (j == 4) {
|
||||
} else if (op == 4) {
|
||||
unusedInt1 = buffer.get4();
|
||||
} else {
|
||||
System.out.println("Error unrecognised config code: " + j);
|
||||
System.out.println("Error unrecognised config code: " + op);
|
||||
}
|
||||
} while (true);
|
||||
}
|
||||
|
||||
+18
-18
@@ -25,12 +25,13 @@ public class VarpType {
|
||||
if (instances[j] == null) {
|
||||
instances[j] = new VarpType();
|
||||
}
|
||||
instances[j].method547(buffer, j);
|
||||
instances[j].read(buffer, j);
|
||||
}
|
||||
if (buffer.position != buffer.data.length) {
|
||||
System.out.println("varptype load mismatch");
|
||||
}
|
||||
}
|
||||
|
||||
public String unusedString;
|
||||
public int unusedInt0;
|
||||
public int unusedInt1;
|
||||
@@ -46,40 +47,39 @@ public class VarpType {
|
||||
public VarpType() {
|
||||
}
|
||||
|
||||
public void method547(Buffer buffer, int i) {
|
||||
public void read(Buffer buffer, int i) {
|
||||
do {
|
||||
int j = buffer.get1U();
|
||||
if (j == 0) {
|
||||
int op = buffer.get1U();
|
||||
if (op == 0) {
|
||||
return;
|
||||
}
|
||||
if (j == 1) {
|
||||
} else if (op == 1) {
|
||||
unusedInt0 = buffer.get1U();
|
||||
} else if (j == 2) {
|
||||
} else if (op == 2) {
|
||||
unusedInt1 = buffer.get1U();
|
||||
} else if (j == 3) {
|
||||
} else if (op == 3) {
|
||||
unusedBool0 = true;
|
||||
anIntArray703[anInt702++] = i;
|
||||
} else if (j == 4) {
|
||||
} else if (op == 4) {
|
||||
unusedBool1 = false;
|
||||
} else if (j == 5) {
|
||||
} else if (op == 5) {
|
||||
anInt709 = buffer.get2U();
|
||||
} else if (j == 6) {
|
||||
} else if (op == 6) {
|
||||
unusedBool2 = true;
|
||||
} else if (j == 7) {
|
||||
} else if (op == 7) {
|
||||
unusedInt2 = buffer.get4();
|
||||
} else if (j == 8) {
|
||||
} else if (op == 8) {
|
||||
unusedInt3 = 1;
|
||||
unusedBool3 = true;
|
||||
} else if (j == 10) {
|
||||
} else if (op == 10) {
|
||||
unusedString = buffer.getString();
|
||||
} else if (j == 11) {
|
||||
} else if (op == 11) {
|
||||
unusedBool3 = true;
|
||||
} else if (j == 12) {
|
||||
} else if (op == 12) {
|
||||
unusedInt4 = buffer.get4();
|
||||
} else if (j == 13) {
|
||||
} else if (op == 13) {
|
||||
unusedInt3 = 2;
|
||||
} else {
|
||||
System.out.println("Error unrecognised config code: " + j);
|
||||
System.out.println("Error unrecognised config code: " + op);
|
||||
}
|
||||
} while (true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user