Merge origin/master

This commit is contained in:
Jindra Petřík
2016-01-30 21:56:44 +01:00
20 changed files with 84 additions and 99 deletions
@@ -852,69 +852,69 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
private static SerializableImage getFrame(SWF swf, int frame, int time, Timelined drawable, DepthState stateUnderCursor, int mouseButton, int selectedDepth, double zoom) {
Timeline timeline = drawable.getTimeline();
String key = "drawable_" + frame + "_" + drawable.hashCode() + "_" + mouseButton + "_depth" + selectedDepth + "_" + (stateUnderCursor == null ? "out" : stateUnderCursor.hashCode()) + "_" + zoom + "_" + timeline.fontFrameNum;
SerializableImage img = swf.getFromCache(key);
if (img == null) {
boolean shouldCache = timeline.isSingleFrame(frame);
RECT rect = drawable.getRect();
//String key = "drawable_" + frame + "_" + drawable.hashCode() + "_" + mouseButton + "_depth" + selectedDepth + "_" + (stateUnderCursor == null ? "out" : stateUnderCursor.hashCode()) + "_" + zoom + "_" + timeline.fontFrameNum;
SerializableImage img;// = swf.getFromCache(key);
//if (img == null) {
//boolean shouldCache = timeline.isSingleFrame(frame);
RECT rect = drawable.getRect();
int width = (int) (rect.getWidth() * zoom);
int height = (int) (rect.getHeight() * zoom);
SerializableImage image = new SerializableImage((int) Math.ceil(width / SWF.unitDivisor),
(int) Math.ceil(height / SWF.unitDivisor), SerializableImage.TYPE_INT_ARGB);
image.fillTransparent();
Matrix m = new Matrix();
m.translate(-rect.Xmin * zoom, -rect.Ymin * zoom);
m.scale(zoom);
RenderContext renderContext = new RenderContext();
renderContext.stateUnderCursor = stateUnderCursor;
renderContext.mouseButton = mouseButton;
timeline.toImage(frame, time, frame, renderContext, image, m, new ColorTransform());
int width = (int) (rect.getWidth() * zoom);
int height = (int) (rect.getHeight() * zoom);
SerializableImage image = new SerializableImage((int) Math.ceil(width / SWF.unitDivisor),
(int) Math.ceil(height / SWF.unitDivisor), SerializableImage.TYPE_INT_ARGB);
image.fillTransparent();
Matrix m = new Matrix();
m.translate(-rect.Xmin * zoom, -rect.Ymin * zoom);
m.scale(zoom);
RenderContext renderContext = new RenderContext();
renderContext.stateUnderCursor = stateUnderCursor;
renderContext.mouseButton = mouseButton;
timeline.toImage(frame, time, frame, renderContext, image, m, new ColorTransform());
Graphics2D gg = (Graphics2D) image.getGraphics();
gg.setStroke(new BasicStroke(3));
gg.setPaint(Color.green);
gg.setTransform(AffineTransform.getTranslateInstance(0, 0));
List<DepthState> dss = new ArrayList<>();
List<Shape> os = new ArrayList<>();
DepthState ds = null;
if (timeline.getFrameCount() > frame) {
ds = timeline.getFrame(frame).layers.get(selectedDepth);
}
Graphics2D gg = (Graphics2D) image.getGraphics();
gg.setStroke(new BasicStroke(3));
gg.setPaint(Color.green);
gg.setTransform(AffineTransform.getTranslateInstance(0, 0));
List<DepthState> dss = new ArrayList<>();
List<Shape> os = new ArrayList<>();
DepthState ds = null;
if (timeline.getFrameCount() > frame) {
ds = timeline.getFrame(frame).layers.get(selectedDepth);
}
if (ds != null) {
CharacterTag cht = swf.getCharacter(ds.characterId);
if (cht != null) {
if (cht instanceof DrawableTag) {
DrawableTag dt = (DrawableTag) cht;
Shape outline = dt.getOutline(0, ds.time, ds.ratio, renderContext, new Matrix(ds.matrix));
Rectangle bounds = outline.getBounds();
bounds.x *= zoom;
bounds.y *= zoom;
bounds.width *= zoom;
bounds.height *= zoom;
bounds.x /= 20;
bounds.y /= 20;
bounds.width /= 20;
bounds.height /= 20;
bounds.x -= rect.Xmin / 20;
bounds.y -= rect.Ymin / 20;
gg.setStroke(new BasicStroke(2.0f,
BasicStroke.CAP_BUTT,
BasicStroke.JOIN_MITER,
10.0f, new float[]{10.0f}, 0.0f));
gg.setPaint(Color.red);
gg.draw(bounds);
}
if (ds != null) {
CharacterTag cht = swf.getCharacter(ds.characterId);
if (cht != null) {
if (cht instanceof DrawableTag) {
DrawableTag dt = (DrawableTag) cht;
Shape outline = dt.getOutline(0, ds.time, ds.ratio, renderContext, new Matrix(ds.matrix));
Rectangle bounds = outline.getBounds();
bounds.x *= zoom;
bounds.y *= zoom;
bounds.width *= zoom;
bounds.height *= zoom;
bounds.x /= 20;
bounds.y /= 20;
bounds.width /= 20;
bounds.height /= 20;
bounds.x -= rect.Xmin / 20;
bounds.y -= rect.Ymin / 20;
gg.setStroke(new BasicStroke(2.0f,
BasicStroke.CAP_BUTT,
BasicStroke.JOIN_MITER,
10.0f, new float[]{10.0f}, 0.0f));
gg.setPaint(Color.red);
gg.draw(bounds);
}
}
img = image;
if (shouldCache) {
swf.putToCache(key, img);
}
}
img = image;
/*if (shouldCache) {
swf.putToCache(key, img);
}*/
//}
return img;
}
@@ -200,7 +200,6 @@ import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JColorChooser;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
@@ -249,6 +248,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
public DumpTree dumpTree;
private final FlashPlayerPanel flashPanel;
private final FlashPlayerPanel flashPanel2;
private final JPanel contentPanel;
@@ -286,7 +286,9 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
private static final String TIMELINE_PANEL = "TIMELINEPANEL";
private static final String RESOURCES_VIEW = "RESOURCES";
private static final String DUMP_VIEW = "DUMP";
private static final String TIMELINE_VIEW = "TIMELINE";
private final JPersistentSplitPane splitPane1;
@@ -310,6 +312,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
private DumpViewPanel dumpViewPanel;
private final JPanel treePanel;
private final PreviewPanel dumpPreviewPanel;
private final TagInfoPanel tagInfoPanel;
@@ -3089,6 +3092,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
}
public void showPreview(TreeItem treeItem, PreviewPanel previewPanel) {
previewPanel.clear();
if (treeItem == null) {
previewPanel.showEmpty();
return;
@@ -3316,7 +3320,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
} else if (treeItem instanceof Frame && internalViewer) {
showPreview(treeItem, previewPanel);
showCard(CARDPREVIEWPANEL);
} else if ((treeItem instanceof SoundTag)) { //&& isInternalFlashViewerSelected() && (Arrays.asList("mp3", "wav").contains(((SoundTag) tagObj).getExportFormat())))) {
} else if ((treeItem instanceof SoundTag)) { //&& isInternalFlashViewerSelected() && (Arrays.asList("mp3", "wav").contains(((SoundTag) tagObj).getExportFormat())))) {
showPreview(treeItem, previewPanel);
showCard(CARDPREVIEWPANEL);
} else if ((treeItem instanceof Frame) || (treeItem instanceof CharacterTag) || (treeItem instanceof FontTag) || (treeItem instanceof SoundStreamHeadTypeTag)) {
@@ -17,16 +17,10 @@
package com.jpexs.decompiler.flash.gui.dumpview;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.SWFInputStream;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.flash.tags.TagStub;
import com.jpexs.decompiler.flash.treeitems.SWFList;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreeModel;
@@ -18,8 +18,6 @@ package com.jpexs.decompiler.flash.gui.dumpview;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.dumpview.DumpInfoSwfNode;
import com.jpexs.decompiler.flash.gui.Main;
import com.jpexs.decompiler.flash.gui.PreviewPanel;
import com.jpexs.decompiler.flash.gui.hexview.HexView;
import com.jpexs.decompiler.flash.gui.hexview.HexViewListener;
import com.jpexs.helpers.Helper;
@@ -379,7 +379,7 @@ config.description.lastSessionFileTitles = Contiene i titoli dei file aperti nel
config.group.name.paths = Percorsi
config.group.description.paths = Ubicazione dei file necessari
config.group.tip.paths = È possibile ottenere questi file dal sito Adobe
config.group.tip.paths = \u00c8 possibile ottenere questi file dal sito Adobe
config.group.link.paths = https://www.adobe.com/support/flashplayer/debug_downloads.html
config.group.linkText.paths = [apri]
@@ -390,7 +390,7 @@ config.name.playerDebugLocation = 2) Percorso Flash Player per debug
config.description.playerDebugLocation = Posizione eseguibile Flash Player per il debug. Utilizzato per l'azione Debug.
config.name.playerLibLocation = 3) Percorso PlayerGlobal (.swc)
config.description.playerLibLocation = Posizione della libreria Flash Player playerglobal.swc. Utilizzato perlopiù per compilare AS3.
config.description.playerLibLocation = Posizione della libreria Flash Player playerglobal.swc. Utilizzato perlopi\u00f9 per compilare AS3.
config.name.debugHalt = Blocca esecuzione all'avvio del debug
config.description.debugHalt = Pausa SWF all'avvio del debug.
@@ -418,11 +418,12 @@ config.description.internalFlashViewer.execute.as12 = Tenta esecuzione codice Ac
config.name.warning.hexViewNotUpToDate = Avvisa se Hex View non aggiornata
config.description.warning.hexViewNotUpToDate =
config.name.displayDupInstructions = Mostra istruzioni §§dup
config.description.displayDupInstructions = Visualizza istruzioni §§dup nel codice. In loro assenza il codice può essere facilmente compilato ma i dup con effetti collaterali potrebbero essere eseguiti due volte.
config.name.displayDupInstructions = Mostra istruzioni \u00a7\u00a7dup
config.description.displayDupInstructions = Visualizza istruzioni \u00a7\u00a7dup nel codice. In loro assenza il codice pu\u00f2 essere facilmente compilato ma i dup con effetti collaterali potrebbero essere eseguiti due volte.
config.name.useRegExprLiteral = Decompila RegExp nella forma /pattern/mod.
config.description.useRegExprLiteral = Usa la sintassi /pattern/mod nella decompilazione di espressioni regolari. Altrimenti, utilizzare new RegExp(\"pat\",\"mod\")
config.name.handleSkinPartsAutomatically = Gestisce metadati [SkinPart] in automatico
config.description.handleSkinPartsAutomatically = Decompila e modifica direttamente i metadati [SkinPart] in automatico. Se disattivato, l'attributo _skinParts ed il suo metodo getter sono visibili e modificabili direttamente.
@@ -348,7 +348,7 @@ ColorChooser.resetText = Reset
ColorChooser.previewText = Preview
ColorChooser.swatchesNameText = Swatches
ColorChooser.swatchesRecentText = Recent:
ColorChooser.sampleText=Sample Text Sample Text
ColorChooser.sampleText = Sample Text Sample Text
#after version 1.7.1:
@@ -648,7 +648,6 @@ menu.debugging.debug.continue = Continue
menu.debugging.debug.stack = Stack...
menu.debugging.debug.watch = New watch...
message.playerpath.notset = Flash Player projector not found. Please configure its path in Advanced Settings / Paths (1).
message.playerpath.debug.notset = Flash Player projector content debugger not found. Please configure its path in Advanced Settings / Paths (2).
message.playerpath.lib.notset = PlayerGlobal (.SWC) not found. Please configure its path in Advanced Settings / Paths (3).
@@ -348,7 +348,7 @@ ColorChooser.resetText = Reinicia
ColorChooser.previewText = Previsualitza
ColorChooser.swatchesNameText = Swatches
ColorChooser.swatchesRecentText = Recent:
ColorChooser.sampleText=Text d'Exemple Text d'Exemple
ColorChooser.sampleText = Text d'Exemple Text d'Exemple
#after version 1.7.1:
@@ -348,7 +348,7 @@ ColorChooser.resetText = Obnovit
ColorChooser.previewText = N\u00e1hled
ColorChooser.swatchesNameText = Vzorn\u00edk
ColorChooser.swatchesRecentText = Ned\u00e1vn\u00e9:
ColorChooser.sampleText=Vzorov\u00fd Text Vzorov\u00fd Text
ColorChooser.sampleText = Vzorov\u00fd Text Vzorov\u00fd Text
#after version 1.7.1:
@@ -521,13 +521,11 @@ menu.debugger.showlog = Zobrazit Log
message.debugger = Tento SWF Debugger slou\u017e\u00ed jen k pos\u00edl\u00e1n\u00ed zpr\u00e1v do okna logu, konzole prohl\u00ed\u017ee\u010de nebo alert oken.\r\nNEN\u00cd ur\u010den pro krokov\u00e1n\u00ed k\u00f3du, breakpointy atd.
contextmenu.addTag = P\u0159idat tag
deobfuscation.comment.tryenable = Tip: m\u016f\u017eete zkusit povolit "Automatickou deobfuskaci" v nastaven\u00ed
deobfuscation.comment.failed = Deobfuskace je aktivn\u00ed, ale dekompilace p\u0159esto selhala. Pokud soubor NEN\u00cd obfuskov\u00e1n, zaka\u017ete "Automatickou deobfuskaci" pro lep\u0161\u00ed v\u00fdsledky.
#after version 4.0.2
preview.nextframe = Dal\u0161\u00ed sn\u00edmek
preview.prevframe = P\u0159ede\u0161l\u00fd sn\u00edmek
@@ -631,7 +629,6 @@ contextmenu.saveUncompressedToFile = Ulo\u017eit nekomprimovan\u011b
abc.traitslist.scriptinitializer = inicializ\u00e1tor skriptu
menu.settings.autoOpenLoadedSWFs = Otev\u00edrat na\u010d\u00edtan\u00e1 SWF b\u011bhem p\u0159ehr\u00e1v\u00e1n\u00ed
#after version 6.1.1
menu.file.start = Start
menu.file.start.run = Spustit
@@ -648,7 +645,6 @@ menu.debugging.debug.continue = Pokra\u010dovat
menu.debugging.debug.stack = Stack...
menu.debugging.debug.watch = New watch...
message.playerpath.notset = Flash Player projector nenalezen. Pros\u00edm nastavte cestu k n\u011bmu v Pokro\u010dil\u00e1 nastaven\u00ed / Cesty (1).
message.playerpath.debug.notset = Flash Player projector content debugger nenalezen. Pros\u00edm nastavte cestu k n\u011bmu v Pokro\u010dil\u00e1 nastaven\u00ed / Cesty (2).
message.playerpath.lib.notset = PlayerGlobal (.SWC) nenalezen. Pros\u00edm nastavte cestu k n\u011bmu v Pokro\u010dil\u00e1 nastaven\u00ed / Cesty (3).
@@ -670,7 +666,6 @@ callStack.header.line = \u0158\u00e1dek
stack.header = Stack
stack.header.item = Polo\u017eka
work.running = B\u011bh
work.debugging = Lad\u011bn\u00ed
work.debugging.instrumenting = P\u0159\u00edprava SWF pro lad\u011bn\u00ed
@@ -680,7 +675,6 @@ work.halted = Lad\u011bn\u00ed za\u010dalo, b\u011bh je nyn\u00ed pozastaven. P\
debuglog.header = Z\u00e1znam
debuglog.button.clear = Vypr\u00e1znit
#after 7.0.1
work.debugging.wait = \u010cek\u00e1 se na p\u0159ipojen\u00ed Flash debug projektoru
@@ -348,7 +348,7 @@ ColorChooser.resetText = Zur\u00c3\u00bccksetzen
ColorChooser.previewText = Vorschau
ColorChooser.swatchesNameText = Palette
ColorChooser.swatchesRecentText = Letzte:
ColorChooser.sampleText=Beispieltext Beispieltext
ColorChooser.sampleText = Beispieltext Beispieltext
#after version 1.7.1:
@@ -348,7 +348,7 @@ ColorChooser.resetText = Reiniciar
ColorChooser.previewText = Vista previa
ColorChooser.swatchesNameText = Muestras
ColorChooser.swatchesRecentText = Reciente:
ColorChooser.sampleText=Texto de muestra Texto de muestra
ColorChooser.sampleText = Texto de muestra Texto de muestra
#after version 1.7.1:
@@ -348,7 +348,7 @@ ColorChooser.resetText = Alaphelyzet
ColorChooser.previewText = El\u0151n\u00e9zet
ColorChooser.swatchesNameText = Mint\u00e1k
ColorChooser.swatchesRecentText = El\u0151zm\u00e9nyek:
ColorChooser.sampleText=Minta Sz\u00f6veg Minta Sz\u00f6veg
ColorChooser.sampleText = Minta Sz\u00f6veg Minta Sz\u00f6veg
#after version 1.7.1:
@@ -647,7 +647,6 @@ menu.debugging.debug.continue = Folytat\u00e1s
menu.debugging.debug.stack = Stack...
menu.debugging.debug.watch = \u00daj megfigyel\u00e9s...
message.playerpath.notset = Flash Player projector nem tal\u00e1lhat\u00f3. K\u00e9rem \u00e1ll\u00edtsa be az el\u00e9r\u00e9si utat a Halad\u00f3 be\u00e1ll\u00edt\u00e1sok / \u00datvonalakn\u00e1l (1).
message.playerpath.debug.notset = Flash Player projector tartalom hibakeres\u0151 nem tal\u00e1lhat\u00f3. K\u00e9rem \u00e1ll\u00edtsa be az el\u00e9r\u00e9si utat a Halad\u00f3 be\u00e1ll\u00edt\u00e1sok / \u00datvonalakn\u00e1l (2).
message.playerpath.lib.notset = PlayerGlobal (.SWC) nem tal\u00e1lhat\u00f3. K\u00e9rem \u00e1ll\u00edtsa be az el\u00e9r\u00e9si utat a Halad\u00f3 be\u00e1ll\u00edt\u00e1sok / \u00datvonalakn\u00e1l (3).
@@ -334,12 +334,10 @@ message.confirm.reload = Questa azione annulla tutte le modifiche non salvate e
dialog.selectbkcolor.title = Scelta colore di sfondo
error.font.nocharacter = Il font sorgente selezionato non contiene il carattere "%char%".
warning.initializers = I campi statici e le costanti sono spesso valorizzati negli initializer.\nLa modifica del valore qui spesso non \u00e8 sufficiente!
#after version 1.7.0u1:
menu.tools.searchMemory = Cerca SWF in memoria
@@ -351,7 +349,7 @@ ColorChooser.resetText = Risetta
ColorChooser.previewText = Anteprima
ColorChooser.swatchesNameText = Palette
ColorChooser.swatchesRecentText = Recente:
ColorChooser.sampleText=Testo Campione Testo Campione
ColorChooser.sampleText = Testo Campione Testo Campione
#after version 1.7.1:
@@ -648,7 +646,6 @@ menu.debugging.debug.continue = Continua
menu.debugging.debug.stack = Stack...
menu.debugging.debug.watch = Nuovo osservatore...
message.playerpath.notset = Proiettore Flash Player non trovato. Si prega di configurare il suo percorso in Impostazioni avanzate / Percorsi (1).
message.playerpath.debug.notset = Proiettore Flash Player debugger di contenuto non trovato. Si prega di configurare il suo percorso in Impostazioni avanzate / Percorsi (2).
message.playerpath.lib.notset = PlayerGlobal (.swc) non trovato. Si prega di configurare il suo percorso in Impostazioni avanzate / Percorsi (3).
@@ -658,7 +655,7 @@ debugpanel.header = Debug
variables.header.registers = Registri
variables.header.locals = Variabili locali
variables.header.arguments = Argomenti
variables.header.scopeChain = Catena visibilità delle variabili
variables.header.scopeChain = Catena visibilit\u00e0 delle variabili
variables.column.name = Nome
variables.column.type = Tipo
variables.column.value = Valore
@@ -348,7 +348,7 @@ ColorChooser.resetText = Reset
ColorChooser.previewText = Podgl\u0105d
ColorChooser.swatchesNameText = Pr\u00f3bki
ColorChooser.swatchesRecentText = Ostatnie:
ColorChooser.sampleText=Przyk\u0142adowy tekst Przyk\u0142adowy tekst
ColorChooser.sampleText = Przyk\u0142adowy tekst Przyk\u0142adowy tekst
#after version 1.7.1:
@@ -348,7 +348,7 @@ ColorChooser.resetText = \u91cd\u7f6e
ColorChooser.previewText = \u9884\u89c8
ColorChooser.swatchesNameText = \u8c03\u8272\u677f
ColorChooser.swatchesRecentText = \u6700\u8fd1:
ColorChooser.sampleText=\u793a\u4f8b\u6587\u5b57 Sample Text
ColorChooser.sampleText = \u793a\u4f8b\u6587\u5b57 Sample Text
#after version 1.7.1:
@@ -17,4 +17,4 @@ dialog.title = Byt Sp\u00e5r funktionsanrop
function.debugAlert = debugAlert - webbl\u00e4sare javascript larm
function.debugConsole = debugConsole - webbl\u00e4sare javascript console.log
function.debugSocket = debugSocket - socket anslutning till dekompilerare
function.debugSocket = debugSocket - socket anslutning till dekompilerare
@@ -22,11 +22,9 @@ label.replacementtext = Sostituisci con:
dialog.title = Trova testo
dialog.title.replace = Trova e sostituisci testo
error = Errore
error.invalidregexp = Espressione non valida
checkbox.searchText = Cerca testo
checkbox.searchAS = Cerca ActionScript
checkbox.replaceInParameters = Sostituisci nei parametri
checkbox.replaceInParameters = Sostituisci nei parametri
@@ -15,4 +15,4 @@
button.goto = Ir a
button.close = Cerrar
dialog.title = Buscar resultados: %text%
dialog.title = Buscar resultados: %text%
@@ -15,4 +15,4 @@
button.goto = G\u00e5 till
button.close = St\u00e4ng
dialog.title = S\u00f6kresultat: %text%
dialog.title = S\u00f6kresultat: %text%
@@ -16,4 +16,4 @@
button.goto = P\u0159ej\u00edt na
button.cancel = Storno
dialog.title = Pou\u017eit\u00ed:
dialog.title.declaration = Deklarace:
dialog.title.declaration = Deklarace:
@@ -17,3 +17,4 @@ button.goto = Vai a
button.cancel = Annulla
dialog.title = Utilizzi:
dialog.title.declaration = Dicharazione: