mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-18 02:51:53 +00:00
merge
This commit is contained in:
@@ -2289,6 +2289,8 @@ public class SWFInputStream extends InputStream {
|
||||
public MORPHGRADIENT readMORPHGRADIENT() throws IOException {
|
||||
MORPHGRADIENT ret = new MORPHGRADIENT();
|
||||
int numGradients = (int) readUI8();
|
||||
ret.numGradientsExtra = numGradients & 0xf0; //some extra data. Are these the same as in GRADIENT or just obfuscator junk???
|
||||
numGradients = numGradients & 0x0f;
|
||||
ret.gradientRecords = new MORPHGRADRECORD[numGradients];
|
||||
for (int i = 0; i < numGradients; i++) {
|
||||
ret.gradientRecords[i] = readMORPHGRADRECORD();
|
||||
|
||||
@@ -1471,7 +1471,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeMORPHGRADIENT(MORPHGRADIENT value, int shapeNum) throws IOException {
|
||||
writeUI8(value.gradientRecords.length);
|
||||
writeUI8(value.gradientRecords.length + value.numGradientsExtra);
|
||||
for (int i = 0; i < value.gradientRecords.length; i++) {
|
||||
writeMORPHGRADRECORD(value.gradientRecords[i]);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public class MORPHGRADIENT {
|
||||
|
||||
public int numGradients;
|
||||
public MORPHGRADRECORD gradientRecords[];
|
||||
public int numGradientsExtra;
|
||||
|
||||
public static RGBA morphColor(RGBA c1, RGBA c2, int ratio) {
|
||||
int r = (c1.red + (c2.red - c1.red) * ratio / 65535);
|
||||
|
||||
Reference in New Issue
Block a user