mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-01 19:34:31 +00:00
Fixed #116 Cyclic buttons
This commit is contained in:
@@ -258,7 +258,9 @@ public class DefineButton2Tag extends ButtonTag implements ASMSourceContainer {
|
||||
Frame frameOver = new Frame(timeline, 0);
|
||||
Frame frameHit = new Frame(timeline, 0);
|
||||
for (BUTTONRECORD r : this.characters) {
|
||||
|
||||
if (swf.getCyclicCharacters().contains(r.characterId)) {
|
||||
continue;
|
||||
}
|
||||
DepthState layer = new DepthState(swf, null);
|
||||
layer.colorTransForm = r.colorTransform;
|
||||
layer.blendMode = r.blendMode;
|
||||
@@ -312,5 +314,12 @@ public class DefineButton2Tag extends ButtonTag implements ASMSourceContainer {
|
||||
@Override
|
||||
public void setFrameCount(int frameCount) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNeededCharacters(Set<Integer> needed, SWF swf) {
|
||||
for (BUTTONRECORD rec: characters) {
|
||||
needed.add(rec.characterId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +248,9 @@ public class DefineButtonTag extends ButtonTag implements ASMSourceContainer {
|
||||
Frame frameOver = new Frame(timeline, 0);
|
||||
Frame frameHit = new Frame(timeline, 0);
|
||||
for (BUTTONRECORD r : this.characters) {
|
||||
|
||||
if (swf.getCyclicCharacters().contains(r.characterId)) {
|
||||
continue;
|
||||
}
|
||||
DepthState layer = new DepthState(swf, null);
|
||||
layer.colorTransForm = clrTrans;
|
||||
layer.blendMode = r.blendMode;
|
||||
@@ -303,5 +305,12 @@ public class DefineButtonTag extends ButtonTag implements ASMSourceContainer {
|
||||
@Override
|
||||
public void setFrameCount(int frameCount) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNeededCharacters(Set<Integer> needed, SWF swf) {
|
||||
for (BUTTONRECORD rec: characters) {
|
||||
needed.add(rec.characterId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,14 +645,14 @@ public abstract class Tag implements NeedsCharacters, Exportable, Serializable {
|
||||
public void getNeededCharactersDeep(Set<Integer> needed) {
|
||||
Set<Integer> needed2 = new LinkedHashSet<>();
|
||||
getNeededCharacters(needed2, swf);
|
||||
List<Integer> needed3 = new ArrayList<>(needed2);
|
||||
List<Integer> needed3 = new ArrayList<>(needed2);
|
||||
|
||||
for (int i = 0; i < needed3.size(); i++) {
|
||||
int characterId = needed3.get(i);
|
||||
if (swf == null) {
|
||||
return;
|
||||
}
|
||||
if (swf.getCharacters().containsKey(characterId)) {
|
||||
if (swf.getCharacters().containsKey(characterId) && !swf.getCyclicCharacters().contains(characterId)) {
|
||||
Set<Integer> needed4 = new LinkedHashSet<>();
|
||||
CharacterTag character = swf.getCharacter(characterId);
|
||||
character.getNeededCharacters(needed4, swf);
|
||||
|
||||
Reference in New Issue
Block a user