mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 09:31:09 +00:00
MORPHGRADIENT fix
This commit is contained in:
@@ -2635,8 +2635,8 @@ public class SWFInputStream extends InputStream {
|
||||
public MORPHGRADIENT readMORPHGRADIENT() throws IOException {
|
||||
MORPHGRADIENT ret = new MORPHGRADIENT();
|
||||
int numGradients = (int) readUI8();
|
||||
numGradients = numGradients % 8; //there should be 1 to 8 but sometimes there is more. This modulo seems to be OK.
|
||||
|
||||
ret.numGradientsExtra = numGradients & 0xf8; //some extra data. Are these the same as in GRADIENT or just obfuscator junk???
|
||||
numGradients = numGradients & 0x7;
|
||||
ret.gradientRecords = new MORPHGRADRECORD[numGradients];
|
||||
for (int i = 0; i < numGradients; i++) {
|
||||
ret.gradientRecords[i] = readMORPHGRADRECORD();
|
||||
|
||||
@@ -1453,7 +1453,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeMORPHGRADIENT(MORPHGRADIENT value, int shapeNum) throws IOException {
|
||||
writeUB(4, value.gradientRecords.length);
|
||||
writeUI8(value.gradientRecords.length + value.numGradientsExtra);
|
||||
for (int i = 0; i < value.gradientRecords.length; i++) {
|
||||
writeMORPHGRADRECORD(value.gradientRecords[i]);
|
||||
}
|
||||
@@ -1603,7 +1603,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
public void writeBytesZlib(byte data[]) throws IOException {
|
||||
DeflaterOutputStream deflater = new DeflaterOutputStream(this,new Deflater(9));
|
||||
DeflaterOutputStream deflater = new DeflaterOutputStream(this, new Deflater(9));
|
||||
deflater.write(data);
|
||||
deflater.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user