mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 05:35:10 +00:00
tag writing fixes + test
This commit is contained in:
@@ -1441,7 +1441,7 @@ public class SWFInputStream implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Error during tag reading", ex);
|
||||
logger.log(Level.SEVERE, "Error during tag reading. ID: " + tag.getId() + " name: " + tag.getName() + " pos: " + data.getPos(), ex);
|
||||
ret = new TagStub(swf, tag.getId(), "ErrorTag", data, null);
|
||||
}
|
||||
ret.forceWriteAsLong = tag.forceWriteAsLong;
|
||||
@@ -2631,7 +2631,7 @@ public class SWFInputStream implements AutoCloseable {
|
||||
}
|
||||
if (stateNewStyles) {
|
||||
if (morphShape) {
|
||||
// This should never happen
|
||||
// This should never happen in a valid SWF
|
||||
throw new IOException("MorphShape should not have new styles.");
|
||||
} else {
|
||||
scr.fillStyles = readFILLSTYLEARRAY(shapeNum, "fillStyles");
|
||||
|
||||
@@ -1376,7 +1376,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
scr.numFillBits = getNeededBitsU(scr.fillStyles.fillStyles.length);
|
||||
scr.numLineBits = getNeededBitsU(scr.lineStyles.lineStyles.length);
|
||||
fillBits = scr.numFillBits;
|
||||
fillBits = scr.numLineBits;
|
||||
lineBits = scr.numLineBits;
|
||||
writeUB(4, scr.numFillBits);
|
||||
writeUB(4, scr.numLineBits);
|
||||
}
|
||||
@@ -1501,7 +1501,8 @@ public class SWFOutputStream extends OutputStream {
|
||||
writeRGBA(value.endColor);
|
||||
}
|
||||
if ((value.fillStyleType == MORPHFILLSTYLE.LINEAR_GRADIENT)
|
||||
|| (value.fillStyleType == MORPHFILLSTYLE.RADIAL_GRADIENT)) {
|
||||
|| (value.fillStyleType == MORPHFILLSTYLE.RADIAL_GRADIENT)
|
||||
|| (value.fillStyleType == MORPHFILLSTYLE.FOCAL_RADIAL_GRADIENT)) {
|
||||
writeMatrix(value.startGradientMatrix);
|
||||
writeMatrix(value.endGradientMatrix);
|
||||
}
|
||||
@@ -1509,6 +1510,9 @@ public class SWFOutputStream extends OutputStream {
|
||||
|| (value.fillStyleType == MORPHFILLSTYLE.RADIAL_GRADIENT)) {
|
||||
writeMORPHGRADIENT(value.gradient, shapeNum);
|
||||
}
|
||||
if (value.fillStyleType == MORPHFILLSTYLE.FOCAL_RADIAL_GRADIENT) {
|
||||
writeMORPHFOCALGRADIENT((MORPHFOCALGRADIENT) value.gradient, shapeNum);
|
||||
}
|
||||
|
||||
if ((value.fillStyleType == MORPHFILLSTYLE.REPEATING_BITMAP)
|
||||
|| (value.fillStyleType == MORPHFILLSTYLE.CLIPPED_BITMAP)
|
||||
|
||||
Reference in New Issue
Block a user